From: Kevin Day Date: Fri, 24 Dec 2021 05:49:32 +0000 (-0600) Subject: Cleanup: Append "_e" to all enums, update status types, and update status strings. X-Git-Tag: 0.5.7~1 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=2cfde2f7dc75a834b1b0317d0aaaeadcc500646b;p=fll Cleanup: Append "_e" to all enums, update status types, and update status strings. A new practice is to have "_e" at the end of all enums. Update all of the existing enums to follow this practice. I noticed some fixme comments about moving the status codes to a lower level. Do this. Update all code accordingly. The status code strings are only for special cases, so make this its own project directory (for both Status and FSS Status). These are f_status_string and fll_fss_status_string. --- diff --git a/build/level_0/settings b/build/level_0/settings index 7bf74d4..20fb48e 100644 --- a/build/level_0/settings +++ b/build/level_0/settings @@ -25,14 +25,14 @@ build_libraries-level build_libraries-level_threadless build_libraries_shared build_libraries_static -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 conversion-common.c private-conversion.c directory.c private-directory.c environment.c private-environment.c execute.c file.c file-common.c private-file.c fss.c private-fss.c fss-common.c fss_named.c fss_nest.c fss_set.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 print_to.c print-common.c private-print.c private-print_to.c serialize.c serialize-common.c private-serialize.c signal.c socket.c string.c string-common.c private-string.c string_dynamic.c string_map.c string_quantity.c string_range.c string_triple.c type_array.c private-type_array.c utf.c utf-common.c utf_dynamic.c utf_map.c utf_string.c utf_triple.c private-utf.c private-utf-is_unassigned.c private-utf_string.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 conversion-common.c private-conversion.c directory.c private-directory.c environment.c private-environment.c execute.c file.c file-common.c private-file.c fss.c private-fss.c fss-common.c fss_named.c fss_nest.c fss_set.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 print_to.c print-common.c private-print.c private-print_to.c serialize.c serialize-common.c private-serialize.c signal.c socket.c status_string.c string.c string-common.c private-string.c string_dynamic.c string_map.c string_quantity.c string_range.c string_triple.c type_array.c private-type_array.c utf.c utf-common.c utf_dynamic.c utf_map.c utf_string.c utf_triple.c private-utf.c private-utf-is_unassigned.c private-utf_string.c build_sources_library-level thread.c private-thread.c build_sources_library_shared build_sources_library_static build_sources_program build_sources_program_shared build_sources_program_static -build_sources_headers 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 print_to.h print-common.h serialize.h serialize-common.h signal.h signal-common.h socket.h socket-common.h status.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 type_array-common.h utf.h utf-common.h utf_dynamic.h utf_map.h utf_string.h utf_triple.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 print_to.h print-common.h serialize.h serialize-common.h signal.h signal-common.h socket.h socket-common.h status.h status_string.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 type_array-common.h utf.h utf-common.h utf_dynamic.h utf_map.h utf_string.h utf_triple.h build_sources_headers-level thread.h thread-common.h build_sources_headers_shared build_sources_headers_static diff --git a/build/level_1/settings b/build/level_1/settings index ab9d47a..fca6df1 100644 --- a/build/level_1/settings +++ b/build/level_1/settings @@ -25,14 +25,14 @@ build_libraries-level -lfll_0 build_libraries-level_threadless -lfll_0 build_libraries_shared build_libraries_static -build_sources_library console.c control_group.c conversion.c private-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 print-common.c private-print.c signal.c status.c string.c private-string.c utf.c private-utf.c utf_file.c private-utf_file.c +build_sources_library console.c control_group.c conversion.c private-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 print-common.c private-print.c signal.c string.c private-string.c utf.c private-utf.c utf_file.c private-utf_file.c build_sources_library-level build_sources_library_shared build_sources_library_static build_sources_program build_sources_program_shared build_sources_program_static -build_sources_headers 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 print-common.h signal.h signal-common.h status.h string.h utf.h utf_file.h +build_sources_headers 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 iki.h print.h print-common.h signal.h signal-common.h string.h utf.h utf_file.h build_sources_headers-level build_sources_headers_shared build_sources_headers_static diff --git a/build/level_2/settings b/build/level_2/settings index c8e9ef2..ba03b29 100644 --- a/build/level_2/settings +++ b/build/level_2/settings @@ -25,14 +25,14 @@ build_libraries-level -lfll_1 -lfll_0 build_libraries-level_threadless -lfll_1 -lfll_0 build_libraries_shared build_libraries_static -build_sources_library control_group.c error.c error-common.c private-error.c execute.c private-execute.c file.c private-file.c fss.c private-fss.c fss_basic.c fss_basic_list.c fss_embedded_list.c fss_extended.c fss_extended_list.c fss_status.c iki.c private-iki.c path.c print.c program.c status.c +build_sources_library control_group.c error.c error-common.c private-error.c execute.c private-execute.c file.c private-file.c fss.c private-fss.c fss_basic.c fss_basic_list.c fss_embedded_list.c fss_extended.c fss_extended_list.c fss_status_string.c iki.c private-iki.c path.c print.c program.c status_string.c build_sources_library-level build_sources_library_shared build_sources_library_static build_sources_program build_sources_program_shared build_sources_program_static -build_sources_headers control_group.h error.h error-common.h execute.h file.h fss.h fss_basic.h fss_basic_list.h fss_embedded_list.h fss_extended.h fss_extended_list.h fss_status.h iki.h path.h print.h program.h status.h +build_sources_headers control_group.h error.h error-common.h execute.h file.h fss.h fss_basic.h fss_basic_list.h fss_embedded_list.h fss_extended.h fss_extended_list.h fss_status_string.h iki.h path.h print.h program.h status_string.h build_sources_headers-level build_sources_headers_shared build_sources_headers_static diff --git a/build/monolithic/settings b/build/monolithic/settings index b8870d5..3406da5 100644 --- a/build/monolithic/settings +++ b/build/monolithic/settings @@ -25,14 +25,14 @@ build_libraries-monolithic build_libraries-monolithic_threadless build_libraries_shared build_libraries_static -build_sources_library level_0/account.c level_0/private-account.c level_0/capability.c level_0/color.c level_0/color-common.c level_0/console.c level_0/console-common.c level_0/control_group.c level_0/control_group-common.c level_0/conversion.c level_0/conversion-common.c level_0/private-conversion.c level_0/directory.c level_0/private-directory.c level_0/environment.c level_0/private-environment.c level_0/execute.c level_0/file.c level_0/file-common.c level_0/private-file.c level_0/fss.c level_0/private-fss.c level_0/fss-common.c level_0/fss_named.c level_0/fss_nest.c level_0/fss_set.c level_0/iki.c level_0/iki-common.c level_0/private-iki.c level_0/limit.c level_0/memory.c level_0/memory_structure.c level_0/private-memory.c level_0/path.c level_0/path-common.c level_0/private-path.c level_0/pipe.c level_0/print.c level_0/print_to.c level_0/print-common.c level_0/private-print.c level_0/private-print_to.c level_0/serialize.c level_0/serialize-common.c level_0/private-serialize.c level_0/signal.c level_0/socket.c level_0/string.c level_0/string-common.c level_0/private-string.c level_0/string_dynamic.c level_0/string_map.c level_0/string_quantity.c level_0/string_range.c level_0/string_triple.c level_0/type_array.c level_0/private-type_array.c level_0/utf.c level_0/utf-common.c level_0/utf_dynamic.c level_0/utf_map.c level_0/utf_string.c level_0/utf_triple.c level_0/private-utf.c level_0/private-utf-is_unassigned.c level_0/private-utf_string.c level_1/console.c level_1/control_group.c level_1/conversion.c level_1/private-conversion.c level_1/directory.c level_1/private-directory.c level_1/environment.c level_1/private-fss.c level_1/fss_basic.c level_1/fss_basic_list.c level_1/fss_embedded_list.c level_1/fss_extended.c level_1/fss_extended_list.c level_1/iki.c level_1/print.c level_1/print-common.c level_1/private-print.c level_1/signal.c level_1/status.c level_1/string.c level_1/private-string.c level_1/utf.c level_1/private-utf.c level_1/utf_file.c level_1/private-utf_file.c level_2/control_group.c level_2/error.c level_2/error-common.c level_2/private-error.c level_2/execute.c level_2/private-execute.c level_2/file.c level_2/private-file.c level_2/fss.c level_2/private-fss.c level_2/fss_basic.c level_2/fss_basic_list.c level_2/fss_embedded_list.c level_2/fss_extended.c level_2/fss_extended_list.c level_2/fss_status.c level_2/iki.c level_2/private-iki.c level_2/path.c level_2/print.c level_2/program.c level_2/status.c +build_sources_library level_0/account.c level_0/private-account.c level_0/capability.c level_0/color.c level_0/color-common.c level_0/console.c level_0/console-common.c level_0/control_group.c level_0/control_group-common.c level_0/conversion.c level_0/conversion-common.c level_0/private-conversion.c level_0/directory.c level_0/private-directory.c level_0/environment.c level_0/private-environment.c level_0/execute.c level_0/file.c level_0/file-common.c level_0/private-file.c level_0/fss.c level_0/private-fss.c level_0/fss-common.c level_0/fss_named.c level_0/fss_nest.c level_0/fss_set.c level_0/iki.c level_0/iki-common.c level_0/private-iki.c level_0/limit.c level_0/memory.c level_0/memory_structure.c level_0/private-memory.c level_0/path.c level_0/path-common.c level_0/private-path.c level_0/pipe.c level_0/print.c level_0/print_to.c level_0/print-common.c level_0/private-print.c level_0/private-print_to.c level_0/serialize.c level_0/serialize-common.c level_0/private-serialize.c level_0/signal.c level_0/socket.c level_0/status_string.c level_0/string.c level_0/string-common.c level_0/private-string.c level_0/string_dynamic.c level_0/string_map.c level_0/string_quantity.c level_0/string_range.c level_0/string_triple.c level_0/type_array.c level_0/private-type_array.c level_0/utf.c level_0/utf-common.c level_0/utf_dynamic.c level_0/utf_map.c level_0/utf_string.c level_0/utf_triple.c level_0/private-utf.c level_0/private-utf-is_unassigned.c level_0/private-utf_string.c level_1/console.c level_1/control_group.c level_1/conversion.c level_1/private-conversion.c level_1/directory.c level_1/private-directory.c level_1/environment.c level_1/private-fss.c level_1/fss_basic.c level_1/fss_basic_list.c level_1/fss_embedded_list.c level_1/fss_extended.c level_1/fss_extended_list.c level_1/iki.c level_1/print.c level_1/print-common.c level_1/private-print.c level_1/signal.c level_1/string.c level_1/private-string.c level_1/utf.c level_1/private-utf.c level_1/utf_file.c level_1/private-utf_file.c level_2/control_group.c level_2/error.c level_2/error-common.c level_2/private-error.c level_2/execute.c level_2/private-execute.c level_2/file.c level_2/private-file.c level_2/fss.c level_2/private-fss.c level_2/fss_basic.c level_2/fss_basic_list.c level_2/fss_embedded_list.c level_2/fss_extended.c level_2/fss_extended_list.c level_2/fss_status_string.c level_2/iki.c level_2/private-iki.c level_2/path.c level_2/print.c level_2/program.c level_2/status_string.c build_sources_library-monolithic level_0/thread.c level_0/private-thread.c build_sources_library_shared build_sources_library_static build_sources_program build_sources_program_shared build_sources_program_static -build_sources_headers level_0/account.h level_0/account-common.h level_0/capability.h level_0/capability-common.h level_0/color.h level_0/color-common.h level_0/console.h level_0/console-common.h level_0/control_group.h level_0/control_group-common.h level_0/conversion.h level_0/conversion-common.h level_0/directory.h level_0/directory_type.h level_0/directory-common.h level_0/environment.h level_0/environment-common.h level_0/execute.h level_0/execute-common.h level_0/file.h level_0/file-common.h level_0/fss.h level_0/fss-common.h level_0/fss_comment.h level_0/fss_delimit.h level_0/fss_named.h level_0/fss_nest.h level_0/fss_quote.h level_0/fss_set.h level_0/iki.h level_0/iki-common.h level_0/limit.h level_0/limit-common.h level_0/memory.h level_0/memory_structure.h level_0/memory-common.h level_0/path.h level_0/path-common.h level_0/pipe.h level_0/print.h level_0/print_to.h level_0/print-common.h level_0/serialize.h level_0/serialize-common.h level_0/signal.h level_0/signal-common.h level_0/socket.h level_0/socket-common.h level_0/status.h level_0/string.h level_0/string-common.h level_0/string_dynamic.h level_0/string_map.h level_0/string_quantity.h level_0/string_range.h level_0/string_triple.h level_0/type.h level_0/type_array.h level_0/type_array-common.h level_0/utf.h level_0/utf-common.h level_0/utf_dynamic.h level_0/utf_map.h level_0/utf_string.h level_0/utf_triple.h level_1/console.h level_1/control_group.h level_1/conversion.h level_1/directory.h level_1/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/print-common.h level_1/signal.h level_1/signal-common.h level_1/status.h level_1/string.h level_1/utf.h level_1/utf_file.h level_2/control_group.h level_2/error.h level_2/error-common.h level_2/execute.h level_2/file.h level_2/fss.h level_2/fss_basic.h level_2/fss_basic_list.h level_2/fss_embedded_list.h level_2/fss_extended.h level_2/fss_extended_list.h level_2/fss_status.h level_2/iki.h level_2/path.h level_2/print.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/print_to.h level_0/print-common.h level_0/serialize.h level_0/serialize-common.h level_0/signal.h level_0/signal-common.h level_0/socket.h level_0/socket-common.h level_0/status.h level_0/status_string.h level_0/string.h level_0/string-common.h level_0/string_dynamic.h level_0/string_map.h level_0/string_quantity.h level_0/string_range.h level_0/string_triple.h level_0/type.h level_0/type_array.h level_0/type_array-common.h level_0/utf.h level_0/utf-common.h level_0/utf_dynamic.h level_0/utf_map.h level_0/utf_string.h level_0/utf_triple.h level_1/console.h level_1/control_group.h level_1/conversion.h level_1/directory.h level_1/environment.h level_1/execute.h level_1/execute-common.h level_1/fss.h level_1/fss_basic.h level_1/fss_basic_list.h level_1/fss_embedded_list.h level_1/fss_extended.h level_1/fss_extended_list.h level_1/iki.h level_1/print.h level_1/print-common.h level_1/signal.h level_1/signal-common.h level_1/string.h level_1/utf.h level_1/utf_file.h level_2/control_group.h level_2/error.h level_2/error-common.h level_2/execute.h level_2/file.h level_2/fss.h level_2/fss_basic.h level_2/fss_basic_list.h level_2/fss_embedded_list.h level_2/fss_extended.h level_2/fss_extended_list.h level_2/fss_status_string.h level_2/iki.h level_2/path.h level_2/print.h level_2/program.h level_2/status_string.h build_sources_headers-monolithic level_0/thread.h level_0/thread-common.h build_sources_headers_shared build_sources_headers_static diff --git a/build/scripts/bootstrap-example.sh b/build/scripts/bootstrap-example.sh index 9caf8e3..e27dce2 100644 --- a/build/scripts/bootstrap-example.sh +++ b/build/scripts/bootstrap-example.sh @@ -56,7 +56,7 @@ if [[ $1 == "individual" ]] ; then bash build/scripts/package.sh $verbose $color build -i if [[ $? -eq 0 ]] ; then - for i in f_type f_status f_memory f_type_array f_string f_utf f_account f_capability f_color f_console f_control_group f_conversion f_directory f_environment f_execute f_file f_fss f_iki f_limit f_path f_pipe f_print f_serialize f_signal f_socket f_thread fl_console fl_control_group fl_conversion fl_directory fl_environment fl_execute fl_fss fl_iki fl_print fl_signal fl_status fl_string fl_utf fl_utf_file fll_control_group fll_error fll_execute fll_file fll_fss fll_iki fll_path fll_print fll_program fll_status ; do + for i in f_type f_status f_memory f_type_array f_string f_utf f_account f_capability f_color f_console f_control_group f_conversion f_directory f_environment f_execute f_file f_fss f_iki f_limit f_path f_pipe f_print f_status_string f_serialize f_signal f_socket f_thread fl_console fl_control_group fl_conversion fl_directory fl_environment fl_execute fl_fss fl_iki fl_print fl_signal fl_string fl_utf fl_utf_file fll_control_group fll_error fll_execute fll_file fll_fss fll_fss_status_string fll_iki fll_path fll_print fll_program fll_status_string ; do echo && echo "Processing $i." && cd package/individual/$i-$2/ && diff --git a/level_0/f_capability/c/capability-common.h b/level_0/f_capability/c/capability-common.h index 605ecf0..effd6ff 100644 --- a/level_0/f_capability/c/capability-common.h +++ b/level_0/f_capability/c/capability-common.h @@ -18,18 +18,27 @@ extern "C" { /** * Provide a typedef of cap_t such that if _di_libcap_ is defined then a stub is used in its place. + * + * f_capability_value_type_*: + * - effective: Specify "effective" capability. + * - permitted: Specify "permitted" capability. + * - inheritable: Specify "inheritable" capability. + * + * f_capability_flag_type_*: + * - clear: Clear (remove) the capability. + * - set: Set the capability. */ #ifndef _di_f_capability_t_ enum { - f_capability_value_type_effective = 0, - f_capability_value_type_permitted, - f_capability_value_type_inheritable, + f_capability_value_type_effective_e = 0, + f_capability_value_type_permitted_e, + f_capability_value_type_inheritable_e, }; enum { - f_capability_flag_type_clear = 0, - f_capability_flag_type_set, + f_capability_flag_type_clear_e = 0, + f_capability_flag_type_set_e, }; // provide stubs in the event that libcap is disabled. diff --git a/level_0/f_console/c/console-common.h b/level_0/f_console/c/console-common.h index 13b0382..8e1e75f 100644 --- a/level_0/f_console/c/console-common.h +++ b/level_0/f_console/c/console-common.h @@ -20,18 +20,32 @@ extern "C" { * Result values that represent the type of command found. * * Here "empty" refers to '-', or '++', in that they only have the symbols (whereas '-x', or '++x' would not be empty). + * + * Historically, a "-" is used as a parameter. + * To be consistent with the historical use, "-" is referred to as "enable" and "+" is referred to as disable (which is the opposite of the usual mathematical interpetation of those symbols). + * + * f_console_*: + * - none: A basic parameter without any prefixes attached. + * - short_enable: An "enable" short parameter: "-". + * - short_disable: An "disable" short parameter: "+". + * - long_enable: An "enable" long parameter: "--". + * - long_disable: An "disable" long parameter: "++". + * - empty_short_enable: A "-" by itself, considered an "enable". + * - empty_short_disable: A "+" by itself, considered an "disable". + * - empty_long_enable: A "--" by itself, considered an "enable". + * - empty_long_disable: A "++" by itself, considered an "disable". */ #ifndef _di_f_console_ids_ enum { - f_console_none = 1, - f_console_short_enable, - f_console_short_disable, - f_console_long_enable, - f_console_long_disable, - f_console_empty_short_enable, - f_console_empty_short_disable, - f_console_empty_long_enable, - f_console_empty_long_disable, + f_console_none_e = 1, + f_console_short_enable_e, + f_console_short_disable_e, + f_console_long_enable_e, + f_console_long_disable_e, + f_console_empty_short_enable_e, + f_console_empty_short_disable_e, + f_console_empty_long_enable_e, + f_console_empty_long_disable_e, }; #endif // _di_f_console_ids_ @@ -179,10 +193,12 @@ extern "C" { /** * Provide console type enumerations: * + * f_console_result_*: * - none: Parameter not found. * - found: Parameter found. * - values: Parameter found, extra data exists (such as '-f filename', 'filename' would be the extra data). * + * f_console_type_*: * - normal: Parameters using minus sign, such as '--help'. * - inverse: Parameters using plus sign, such as '++version'. * - other: Parameters using neither minus nor plus sign, such as 'build'. @@ -191,15 +207,15 @@ extern "C" { typedef uint16_t f_console_id_t; enum { - f_console_result_none = 1, - f_console_result_found, - f_console_result_additional, + f_console_result_none_e = 1, + f_console_result_found_e, + f_console_result_additional_e, }; enum { - f_console_type_normal = 1, - f_console_type_inverse, - f_console_type_other, + f_console_type_normal_e = 1, + f_console_type_inverse_e, + f_console_type_other_e, }; #endif // _di_f_console_types_t_ @@ -207,13 +223,19 @@ extern "C" { * Provide the standard verbosity codes. * * Intended to be used for the basic/standard verbosity modes for all programs following this practice. + * + * f_console_verbosity_*: + * - quiet: Verbosity is set to quiet. + * - normal: Verbosity is set to normal. + * - verbose: Verbosity is set to verbose. + * - debug: Verbosity is set to debug. */ #ifndef _di_f_console_verbosity_ enum { - f_console_verbosity_quiet = 1, - f_console_verbosity_normal, - f_console_verbosity_verbose, - f_console_verbosity_debug, + f_console_verbosity_quiet_e = 1, + f_console_verbosity_normal_e, + f_console_verbosity_verbose_e, + f_console_verbosity_debug_e, }; #endif // _di_f_console_verbosity_ @@ -256,7 +278,7 @@ extern "C" { f_array_lengths_t values; } f_console_parameter_t; - #define f_console_parameter_t_initialize(symbol_short, symbol_long, symbol_other, has_values, type_value) { symbol_short, symbol_long, symbol_other, has_values, type_value, f_console_result_none, 0, 0, f_array_lengths_t_initialize, f_array_lengths_t_initialize, f_array_lengths_t_initialize } + #define f_console_parameter_t_initialize(symbol_short, symbol_long, symbol_other, has_values, type_value) { symbol_short, symbol_long, symbol_other, has_values, type_value, f_console_result_none_e, 0, 0, f_array_lengths_t_initialize, f_array_lengths_t_initialize, f_array_lengths_t_initialize } #define macro_f_console_parameter_t_initialize(symbol_short, symbol_long, symbol_other, has_values, type_value, result, location, location_sub, locations, locations_sub, values) { symbol_short, symbol_long, symbol_other, has_values, type_value, result, total, location, location_sub, locations, locations_sub, values } #endif // _di_f_console_parameter_t_ diff --git a/level_0/f_console/c/console.c b/level_0/f_console/c/console.c index 0581f4a..e9a6093 100644 --- a/level_0/f_console/c/console.c +++ b/level_0/f_console/c/console.c @@ -13,7 +13,7 @@ extern "C" { const f_array_length_t length = strnlen(input, 3); if (!length) { - *result = f_console_none; + *result = f_console_none_e; return F_data_not; } @@ -22,27 +22,27 @@ extern "C" { if (length > 1) { if (input[1] == f_console_symbol_short_enable_s[0]) { if (length > 2) { - *result = f_console_long_enable; + *result = f_console_long_enable_e; } - else *result = f_console_empty_long_enable; + else *result = f_console_empty_long_enable_e; } - else *result = f_console_short_enable; + else *result = f_console_short_enable_e; } - else *result = f_console_empty_short_enable; + else *result = f_console_empty_short_enable_e; } else if (input[0] == f_console_symbol_short_disable_s[0]) { if (length > 1) { if (input[1] == f_console_symbol_short_disable_s[0]) { if (length > 2) { - *result = f_console_long_disable; + *result = f_console_long_disable_e; } - else *result = f_console_empty_long_disable; + else *result = f_console_empty_long_disable_e; } - else *result = f_console_short_disable; + else *result = f_console_short_disable_e; } - else *result = f_console_empty_short_disable; + else *result = f_console_empty_short_disable_e; } - else *result = f_console_none; + else *result = f_console_none_e; return F_none; } @@ -67,9 +67,9 @@ extern "C" { f_array_length_t i = 0; f_array_length_t values = 0; - uint8_t console_short = f_console_none; - uint8_t console_long = f_console_none; - uint8_t console_type = f_console_type_normal; + uint8_t console_short = f_console_none_e; + uint8_t console_long = f_console_none_e; + uint8_t console_type = f_console_type_normal_e; f_array_lengths_t needs_value = f_array_lengths_t_initialize; @@ -90,7 +90,7 @@ extern "C" { return status; } - parameters.parameter[i].result = f_console_result_additional; + parameters.parameter[i].result = f_console_result_additional_e; parameters.parameter[i].values.array[parameters.parameter[i].values.used++] = location; --needs_value.used; @@ -109,11 +109,11 @@ extern "C" { argument_length = strnlen(arguments.argv[location], f_console_parameter_size); // process the current parameter. - if (result == f_console_short_enable || result == f_console_short_disable) { + if (result == f_console_short_enable_e || result == f_console_short_disable_e) { increment_by = 1; sub_location = 1; } - else if (result == f_console_long_enable || result == f_console_long_disable) { + else if (result == f_console_long_enable_e || result == f_console_long_disable_e) { increment_by = argument_length; sub_location = 2; } @@ -123,23 +123,23 @@ extern "C" { } // Handle the normal commands. - if (result == f_console_short_enable || result == f_console_long_enable) { - console_short = f_console_short_enable; - console_long = f_console_long_enable; - console_type = f_console_type_normal; + if (result == f_console_short_enable_e || result == f_console_long_enable_e) { + console_short = f_console_short_enable_e; + console_long = f_console_long_enable_e; + console_type = f_console_type_normal_e; } - else if (result == f_console_short_disable || result == f_console_long_disable) { - console_short = f_console_short_disable; - console_long = f_console_long_disable; - console_type = f_console_type_inverse; + else if (result == f_console_short_disable_e || result == f_console_long_disable_e) { + console_short = f_console_short_disable_e; + console_long = f_console_long_disable_e; + console_type = f_console_type_inverse_e; } else { - console_short = f_console_none; + console_short = f_console_none_e; } found = F_false; - if (console_short != f_console_none) { + if (console_short != f_console_none_e) { // The sub_location is used on a per increment basis (such as 'tar -xcf', the '-' would have an increment of 1, therefore x, c, and f would all be three separate parameters). while (sub_location < argument_length) { @@ -220,7 +220,7 @@ extern "C" { parameters.parameter[i].locations.array[parameters.parameter[i].locations.used++] = location; - parameters.parameter[i].result = f_console_result_found; + parameters.parameter[i].result = f_console_result_found_e; parameters.parameter[i].location = location; parameters.parameter[i].location_sub = 0; @@ -257,7 +257,7 @@ extern "C" { else { for (i = 0; i < parameters.used; ++i) { - if (parameters.parameter[i].type != f_console_type_other) continue; + if (parameters.parameter[i].type != f_console_type_other_e) continue; if (!parameters.parameter[i].symbol_other) continue; @@ -282,7 +282,7 @@ extern "C" { parameters.parameter[i].locations.array[parameters.parameter[i].locations.used++] = location; parameters.parameter[i].locations_sub.array[parameters.parameter[i].locations_sub.used++] = 0; - parameters.parameter[i].result = f_console_result_found; + parameters.parameter[i].result = f_console_result_found_e; parameters.parameter[i].location = location; parameters.parameter[i].location_sub = 0; @@ -363,7 +363,7 @@ extern "C" { return F_status_set_error(F_parameter); } - if (parameters.parameter[choices.id[i]].result == f_console_result_found) { + if (parameters.parameter[choices.id[i]].result == f_console_result_found_e) { if (parameters.parameter[choices.id[i]].location < location) { location = parameters.parameter[choices.id[i]].location; location_sub = parameters.parameter[choices.id[i]].location_sub; @@ -412,7 +412,7 @@ extern "C" { return F_status_set_error(F_parameter); } - if (parameters.parameter[choices.id[i]].result == f_console_result_found) { + if (parameters.parameter[choices.id[i]].result == f_console_result_found_e) { if (parameters.parameter[choices.id[i]].location > location) { location = parameters.parameter[choices.id[i]].location; location_sub = parameters.parameter[choices.id[i]].location_sub; diff --git a/level_0/f_fss/c/fss-common.h b/level_0/f_fss/c/fss-common.h index 04d2fa7..b0f9178 100644 --- a/level_0/f_fss/c/fss-common.h +++ b/level_0/f_fss/c/fss-common.h @@ -98,24 +98,40 @@ extern "C" { #endif //_di_f_fss_delimiters_ /** - * Codes for every FSS standard. + * Codes for every known FSS standard. + * + * f_fss_*: + * - basic: FSS-0000: Basic. + * - extended: FSS-0001: Extended. + * - basic_list: FSS-0002: Basic List. + * - extended_list: FSS-0003: Extended List. + * - very_basic_list: FSS-0004: Very Basic List. + * - somewhat_basic_list: FSS-0005: Somewhat Basic List. + * - somewhat_extended_list: FSS-0006: Somewhat Extended List. + * - very_extended_list: FSS-0007: Very Extended List. + * - embedded_list: FSS-0008: Embedded List. + * - reverse_mapping: FSS-0009: Reverse Mapping. + * - extended_reverse_mapping: FSS-000A: Extended Reverse Mapping. + * - simple_list: FSS-000B: Simple List. + * - iki_text: FSS-000C: IKI Text. + * - basic_rule: FSS-000D: Basic Rule. */ #ifndef _di_f_fss_codes_ enum { - f_fss_basic = 1, - f_fss_extended, - f_fss_basic_list, - f_fss_extended_list, - f_fss_very_basic_list, - f_fss_somewhat_basic_list, - f_fss_somewhat_extended_list, - f_fss_very_extended_list, - f_fss_embeded_list, - f_fss_reverse_mapping, - f_fss_extended_reverse_mapping, - f_fss_simple_list, - f_fss_iki_text, - f_fss_basic_rule, + f_fss_basic_e = 1, + f_fss_extended_e, + f_fss_basic_list_e, + f_fss_extended_list_e, + f_fss_very_basic_list_e, + f_fss_somewhat_basic_list_e, + f_fss_somewhat_extended_list_e, + f_fss_very_extended_list_e, + f_fss_embedded_list_e, + f_fss_reverse_mapping_e, + f_fss_extended_reverse_mapping_e, + f_fss_simple_list_e, + f_fss_iki_text_e, + f_fss_basic_rule_e, }; #endif // _di_f_fss_codes_ @@ -127,27 +143,59 @@ extern "C" { * * Only "next" and "end" are only meaningful for a Content and will be treated as "none" for an Object. * - * none: Disable completeness. - * end: Complete as if this is the final piece of a set (such as FSS-0001, adding terminating EOL). - * full: Complete and add terminating EOL, where applicable. - * full_trim: Complete and add terminating EOL but remove any leading or trailing whitespace, where applicable. - * next: Complete as if this is a piece of a set (such as FSS-0001, adding a separating space). - * partial: Complete, but do not add terminating EOL, where applicable. - * partial_trim: Complete, but do not add terminating EOL and remove any leading or trailing whitespace, where applicable. + * f_fss_complete_*: + * - none: Disable completeness. + * - end: Complete as if this is the final piece of a set (such as FSS-0001, adding terminating EOL). + * - full: Complete and add terminating EOL, where applicable. + * - full_trim: Complete and add terminating EOL but remove any leading or trailing whitespace, where applicable. + * - next: Complete as if this is a piece of a set (such as FSS-0001, adding a separating space). + * - partial: Complete, but do not add terminating EOL, where applicable. + * - partial_trim: Complete, but do not add terminating EOL and remove any leading or trailing whitespace, where applicable. */ #ifndef _di_f_fss_complete_ enum { - f_fss_complete_none = 1, - f_fss_complete_end, - f_fss_complete_full, - f_fss_complete_full_trim, - f_fss_complete_next, - f_fss_complete_partial, - f_fss_complete_partial_trim, + f_fss_complete_none_e = 1, + f_fss_complete_end_e, + f_fss_complete_full_e, + f_fss_complete_full_trim_e, + f_fss_complete_next_e, + f_fss_complete_partial_e, + f_fss_complete_partial_trim_e, }; #endif // _di_f_fss_complete_ /** + * FSS-specific Status codes. + */ +enum { + F_fss_status_code_first = F_status_code_last + 1, + + #ifndef _di_F_fss_status_error_ + F_fss_format, + F_fss_format_eos, + #endif // _di_F_fss_status_error_ + + #ifndef _di_F_fss_status_warning_ + F_fss_accepted_invalid, + F_fss_accepted_invalid_eos, + #endif // _di_F_fss_status_warning_ + + #ifndef _di_F_fss_status_success_ + F_fss_found_content, + F_fss_found_object, + F_fss_found_object_content_not, + F_fss_found_content_not, + F_fss_found_object_not, + #endif // _di_F_fss_status_success_ + + #ifndef _di_F_fss_status_codes_ + F_fss_found_comment, + #endif // _di_F_fss_status_codes_ + + F_fss_status_code_last, +}; // enum + +/** * Default allocation steps. * * Recommended to be set to at least 4 to be UTF-8 friendlier. diff --git a/level_0/f_fss/c/fss_quote.h b/level_0/f_fss/c/fss_quote.h index 9fb2786..9a4b489 100644 --- a/level_0/f_fss/c/fss_quote.h +++ b/level_0/f_fss/c/fss_quote.h @@ -18,11 +18,15 @@ extern "C" { /** * Types for FSS quote. + * + * f_fss_quote_type_*: + * - single: Quote type is a single quote. + * - double: Quote type is a double quote. */ #ifndef _di_f_fss_quote_type_ enum { - f_fss_quote_type_single = 1, - f_fss_quote_type_double, + f_fss_quote_type_single_e = 1, + f_fss_quote_type_double_e, }; #endif // _di_f_fss_quote_type_ diff --git a/level_0/f_print/c/print-common.h b/level_0/f_print/c/print-common.h index 2b4b05f..5758f87 100644 --- a/level_0/f_print/c/print-common.h +++ b/level_0/f_print/c/print-common.h @@ -164,7 +164,7 @@ extern "C" { /** * Provide type format flags. * - * @todo There may be support in the future for min/max type sizes, such that "%n" = min, "%m" = max, and "%niii" = min int8_t. + * @todo There may or may not be support in the future for min/max type sizes, such that "%n" = min, "%m" = max, and "%niii" = min int8_t. * * f_print_format_type_*: * - character: "c", Type is a 1-byte unsigned character. @@ -197,31 +197,31 @@ extern "C" { */ #ifndef _di_f_print_format_type_ enum { - f_print_format_type_character = 1, - f_print_format_type_character_safe, - f_print_format_type_color_after, - f_print_format_type_color_before, - f_print_format_type_double_32, - f_print_format_type_double_64, - f_print_format_type_signed_8, - f_print_format_type_signed_16, - f_print_format_type_signed_32, - f_print_format_type_signed_64, - f_print_format_type_signed_128, - f_print_format_type_signed_number, - f_print_format_type_size, - f_print_format_type_string, - f_print_format_type_string_safe, - f_print_format_type_string_static, - f_print_format_type_string_static_raw, - f_print_format_type_string_static_safe, - f_print_format_type_string_static_safe_raw, // @todo not yet implemented. - f_print_format_type_unsigned_8, - f_print_format_type_unsigned_16, - f_print_format_type_unsigned_32, - f_print_format_type_unsigned_64, - f_print_format_type_unsigned_128, - f_print_format_type_unsigned_number, + f_print_format_type_character_e = 1, + f_print_format_type_character_safe_e, + f_print_format_type_color_after_e, + f_print_format_type_color_before_e, + f_print_format_type_double_32_e, + f_print_format_type_double_64_e, + f_print_format_type_signed_8_e, + f_print_format_type_signed_16_e, + f_print_format_type_signed_32_e, + f_print_format_type_signed_64_e, + f_print_format_type_signed_128_e, + f_print_format_type_signed_number_e, + f_print_format_type_size_e, + f_print_format_type_string_e, + f_print_format_type_string_safe_e, + f_print_format_type_string_static_e, + f_print_format_type_string_static_raw_e, + f_print_format_type_string_static_safe_e, + f_print_format_type_string_static_safe_raw_e, // @todo not yet implemented. + f_print_format_type_unsigned_8_e, + f_print_format_type_unsigned_16_e, + f_print_format_type_unsigned_32_e, + f_print_format_type_unsigned_64_e, + f_print_format_type_unsigned_128_e, + f_print_format_type_unsigned_number_e, }; #endif // _di_f_print_format_type_ diff --git a/level_0/f_socket/c/socket-common.h b/level_0/f_socket/c/socket-common.h index 0f0d919..205e04a 100644 --- a/level_0/f_socket/c/socket-common.h +++ b/level_0/f_socket/c/socket-common.h @@ -13,18 +13,24 @@ #define _F_socket_common_h #ifdef __cplusplus -extern "C"{ +extern "C" { #endif /** * Socket Types. + * + * f_socket_close_*: + * - fast: Fast Socket close, as in close(). + * - read: Read close, as in shutdown(, SHUT_RD). + * - write: Write close, as in shutdown(, SHUT_WR). + * - read_write: Read/Write close, as in shutdown(, SHUT_RDWR). */ #ifndef _di_f_socket_types_ enum { - f_socket_close_fast = 1, // As in close(); - f_socket_close_read, // As in shutdown(, SHUT_RD); - f_socket_close_write, // As in shutdown(, SHUT_WR); - f_socket_close_read_write, // As in shutdown(, SHUT_RDWR); + f_socket_close_fast_e = 1, + f_socket_close_read_e, + f_socket_close_write_e, + f_socket_close_read_write_e, }; #endif // _di_f_socket_types_ diff --git a/level_0/f_socket/c/socket.c b/level_0/f_socket/c/socket.c index 8bd42af..3b64774 100644 --- a/level_0/f_socket/c/socket.c +++ b/level_0/f_socket/c/socket.c @@ -1,7 +1,7 @@ #include "socket.h" #ifdef __cplusplus -extern "C"{ +extern "C" { #endif #ifndef _di_f_socket_file_bind_ @@ -55,11 +55,11 @@ extern "C"{ f_status_t f_socket_close_client(const int id, const unsigned short action) { int result = 0; - if (action == f_socket_close_fast) { + if (action == f_socket_close_fast_e) { result = close(id); } else { - if (action == f_socket_close_read || action == f_socket_close_write || action == f_socket_close_read_write) { + if (action == f_socket_close_read_e || action == f_socket_close_write_e || action == f_socket_close_read_write_e) { result = shutdown(id, action); } else { diff --git a/level_0/f_socket/c/socket.h b/level_0/f_socket/c/socket.h index 31a4399..4de7fda 100644 --- a/level_0/f_socket/c/socket.h +++ b/level_0/f_socket/c/socket.h @@ -29,7 +29,7 @@ #include #ifdef __cplusplus -extern "C"{ +extern "C" { #endif /** @@ -94,7 +94,7 @@ extern "C"{ * The ID of a socket. * @param action * The action to perform on close. - * f_socket_close_fast calls close(). + * f_socket_close_fast_e calls close(). * * @return * F_none on success. diff --git a/level_0/f_status_string/c/status_string.c b/level_0/f_status_string/c/status_string.c new file mode 100644 index 0000000..bcb15c7 --- /dev/null +++ b/level_0/f_status_string/c/status_string.c @@ -0,0 +1,2382 @@ +#include "status_string.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_F_status_string_ + #ifndef _di_F_status_boolean_ + const f_string_t f_status_false_s = F_status_false_s; + const f_string_t f_status_true_s = F_status_true_s; + #endif // _di_F_status_boolean_ + + #ifndef _di_F_status_signal_ + const f_string_t f_status_signal_hangup_s = F_status_signal_hangup_s; + const f_string_t f_status_signal_interrupt_s = F_status_signal_interrupt_s; + const f_string_t f_status_signal_quit_s = F_status_signal_quit_s; + const f_string_t f_status_signal_illegal_s = F_status_signal_illegal_s; + const f_string_t f_status_signal_trap_s = F_status_signal_trap_s; + const f_string_t f_status_signal_abort_s = F_status_signal_abort_s; + const f_string_t f_status_signal_bus_error_s = F_status_signal_bus_error_s; + const f_string_t f_status_signal_floating_point_error_s = F_status_signal_floating_point_error_s; + const f_string_t f_status_signal_kill_s = F_status_signal_kill_s; + const f_string_t f_status_signal_user_1_s = F_status_signal_user_1_s; + const f_string_t f_status_signal_segmentation_fault_s = F_status_signal_segmentation_fault_s; + const f_string_t f_status_signal_user_2_s = F_status_signal_user_2_s; + const f_string_t f_status_signal_broken_pipe_s = F_status_signal_broken_pipe_s; + const f_string_t f_status_signal_alarm_clock_s = F_status_signal_alarm_clock_s; + const f_string_t f_status_signal_termination_s = F_status_signal_termination_s; + const f_string_t f_status_signal_stack_fault_s = F_status_signal_stack_fault_s; + const f_string_t f_status_signal_child_s = F_status_signal_child_s; + const f_string_t f_status_signal_continue_s = F_status_signal_continue_s; + const f_string_t f_status_signal_stop_s = F_status_signal_stop_s; + const f_string_t f_status_signal_keyboard_stop_s = F_status_signal_keyboard_stop_s; + const f_string_t f_status_signal_tty_in_s = F_status_signal_tty_in_s; + const f_string_t f_status_signal_tty_out_s = F_status_signal_tty_out_s; + const f_string_t f_status_signal_urgent_s = F_status_signal_urgent_s; + const f_string_t f_status_signal_cpu_limit_s = F_status_signal_cpu_limit_s; + const f_string_t f_status_signal_file_size_limit_s = F_status_signal_file_size_limit_s; + const f_string_t f_status_signal_virtual_alarm_clock_s = F_status_signal_virtual_alarm_clock_s; + const f_string_t f_status_signal_profile_alarm_clock_s = F_status_signal_profile_alarm_clock_s; + const f_string_t f_status_signal_window_size_change_s = F_status_signal_window_size_change_s; + const f_string_t f_status_signal_pollable_event_s = F_status_signal_pollable_event_s; + const f_string_t f_status_signal_power_failure_s = F_status_signal_power_failure_s; + const f_string_t f_status_signal_bad_system_call_s = F_status_signal_bad_system_call_s; + const f_string_t f_status_signal_reserved_32_s = F_status_signal_reserved_32_s; + const f_string_t f_status_signal_reserved_33_s = F_status_signal_reserved_33_s; + const f_string_t f_status_signal_reserved_34_s = F_status_signal_reserved_34_s; + const f_string_t f_status_signal_reserved_35_s = F_status_signal_reserved_35_s; + const f_string_t f_status_signal_reserved_36_s = F_status_signal_reserved_36_s; + const f_string_t f_status_signal_reserved_37_s = F_status_signal_reserved_37_s; + const f_string_t f_status_signal_reserved_38_s = F_status_signal_reserved_38_s; + const f_string_t f_status_signal_reserved_39_s = F_status_signal_reserved_39_s; + const f_string_t f_status_signal_reserved_40_s = F_status_signal_reserved_40_s; + const f_string_t f_status_signal_reserved_41_s = F_status_signal_reserved_41_s; + const f_string_t f_status_signal_reserved_42_s = F_status_signal_reserved_42_s; + const f_string_t f_status_signal_reserved_43_s = F_status_signal_reserved_43_s; + const f_string_t f_status_signal_reserved_44_s = F_status_signal_reserved_44_s; + const f_string_t f_status_signal_reserved_45_s = F_status_signal_reserved_45_s; + const f_string_t f_status_signal_reserved_46_s = F_status_signal_reserved_46_s; + const f_string_t f_status_signal_reserved_47_s = F_status_signal_reserved_47_s; + const f_string_t f_status_signal_reserved_48_s = F_status_signal_reserved_48_s; + const f_string_t f_status_signal_reserved_49_s = F_status_signal_reserved_49_s; + const f_string_t f_status_signal_reserved_50_s = F_status_signal_reserved_50_s; + const f_string_t f_status_signal_reserved_51_s = F_status_signal_reserved_51_s; + const f_string_t f_status_signal_reserved_52_s = F_status_signal_reserved_52_s; + const f_string_t f_status_signal_reserved_53_s = F_status_signal_reserved_53_s; + const f_string_t f_status_signal_reserved_54_s = F_status_signal_reserved_54_s; + const f_string_t f_status_signal_reserved_55_s = F_status_signal_reserved_55_s; + const f_string_t f_status_signal_reserved_56_s = F_status_signal_reserved_56_s; + const f_string_t f_status_signal_reserved_57_s = F_status_signal_reserved_57_s; + const f_string_t f_status_signal_reserved_58_s = F_status_signal_reserved_58_s; + const f_string_t f_status_signal_reserved_59_s = F_status_signal_reserved_59_s; + const f_string_t f_status_signal_reserved_60_s = F_status_signal_reserved_60_s; + const f_string_t f_status_signal_reserved_61_s = F_status_signal_reserved_61_s; + const f_string_t f_status_signal_reserved_62_s = F_status_signal_reserved_62_s; + const f_string_t f_status_signal_reserved_63_s = F_status_signal_reserved_63_s; + const f_string_t f_status_signal_reserved_64_s = F_status_signal_reserved_64_s; + #endif // _di_F_status_signal_ + + #ifndef _di_F_status_basic_ + const f_string_t f_status_none_s = F_status_none_s; + const f_string_t f_status_absolute_s = F_status_absolute_s; + const f_string_t f_status_absolute_not_s = F_status_absolute_not_s; + const f_string_t f_status_address_s = F_status_address_s; + const f_string_t f_status_address_not_s = F_status_address_not_s; + const f_string_t f_status_ascii_s = F_status_ascii_s; + const f_string_t f_status_ascii_not_s = F_status_ascii_not_s; + const f_string_t f_status_block_s = F_status_block_s; + const f_string_t f_status_block_not_s = F_status_block_not_s; + const f_string_t f_status_bound_s = F_status_bound_s; + const f_string_t f_status_bound_not_s = F_status_bound_not_s; + const f_string_t f_status_capability_s = F_status_capability_s; + const f_string_t f_status_capability_not_s = F_status_capability_not_s; + const f_string_t f_status_child_s = F_status_child_s; + const f_string_t f_status_child_not_s = F_status_child_not_s; + const f_string_t f_status_complete_s = F_status_complete_s; + const f_string_t f_status_complete_not_s = F_status_complete_not_s; + const f_string_t f_status_connected_s = F_status_connected_s; + const f_string_t f_status_connected_not_s = F_status_connected_not_s; + const f_string_t f_status_container_s = F_status_container_s; + const f_string_t f_status_container_not_s = F_status_container_not_s; + const f_string_t f_status_control_s = F_status_control_s; + const f_string_t f_status_control_not_s = F_status_control_not_s; + const f_string_t f_status_control_group_s = F_status_control_group_s; + const f_string_t f_status_control_group_not_s = F_status_control_group_not_s; + const f_string_t f_status_critical_s = F_status_critical_s; + const f_string_t f_status_critical_not_s = F_status_critical_not_s; + const f_string_t f_status_dead_s = F_status_dead_s; + const f_string_t f_status_dead_not_s = F_status_dead_not_s; + const f_string_t f_status_deadlock_s = F_status_deadlock_s; + const f_string_t f_status_deadlock_not_s = F_status_deadlock_not_s; + const f_string_t f_status_descriptor_s = F_status_descriptor_s; + const f_string_t f_status_descriptor_not_s = F_status_descriptor_not_s; + const f_string_t f_status_device_s = F_status_device_s; + const f_string_t f_status_device_not_s = F_status_device_not_s; + const f_string_t f_status_disable_s = F_status_disable_s; + const f_string_t f_status_disable_not_s = F_status_disable_not_s; + const f_string_t f_status_done_s = F_status_done_s; + const f_string_t f_status_done_not_s = F_status_done_not_s; + const f_string_t f_status_dummy_s = F_status_dummy_s; + const f_string_t f_status_dummy_not_s = F_status_dummy_not_s; + const f_string_t f_status_empty_s = F_status_empty_s; + const f_string_t f_status_empty_not_s = F_status_empty_not_s; + const f_string_t f_status_enable_s = F_status_enable_s; + const f_string_t f_status_enable_not_s = F_status_enable_not_s; + const f_string_t f_status_encoding_s = F_status_encoding_s; + const f_string_t f_status_encoding_not_s = F_status_encoding_not_s; + const f_string_t f_status_eoa_s = F_status_eoa_s; + const f_string_t f_status_eoa_not_s = F_status_eoa_not_s; + const f_string_t f_status_eof_s = F_status_eof_s; + const f_string_t f_status_eof_not_s = F_status_eof_not_s; + const f_string_t f_status_eol_s = F_status_eol_s; + const f_string_t f_status_eol_not_s = F_status_eol_not_s; + const f_string_t f_status_eos_s = F_status_eos_s; + const f_string_t f_status_eos_not_s = F_status_eos_not_s; + const f_string_t f_status_execute_s = F_status_execute_s; + const f_string_t f_status_execute_not_s = F_status_execute_not_s; + const f_string_t f_status_exist_s = F_status_exist_s; + const f_string_t f_status_exist_not_s = F_status_exist_not_s; + const f_string_t f_status_failure_s = F_status_failure_s; + const f_string_t f_status_failure_not_s = F_status_failure_not_s; + const f_string_t f_status_first_s = F_status_first_s; + const f_string_t f_status_first_not_s = F_status_first_not_s; + const f_string_t f_status_fork_s = F_status_fork_s; + const f_string_t f_status_fork_not_s = F_status_fork_not_s; + const f_string_t f_status_format_s = F_status_format_s; + const f_string_t f_status_format_not_s = F_status_format_not_s; + const f_string_t f_status_found_s = F_status_found_s; + const f_string_t f_status_found_not_s = F_status_found_not_s; + const f_string_t f_status_full_s = F_status_full_s; + const f_string_t f_status_full_not_s = F_status_full_not_s; + const f_string_t f_status_group_s = F_status_group_s; + const f_string_t f_status_group_not_s = F_status_group_not_s; + const f_string_t f_status_ignore_s = F_status_ignore_s; + const f_string_t f_status_ignore_not_s = F_status_ignore_not_s; + const f_string_t f_status_implemented_s = F_status_implemented_s; + const f_string_t f_status_implemented_not_s = F_status_implemented_not_s; + const f_string_t f_status_input_s = F_status_input_s; + const f_string_t f_status_input_not_s = F_status_input_not_s; + const f_string_t f_status_input_output_s = F_status_input_output_s; + const f_string_t f_status_interrupt_s = F_status_interrupt_s; + const f_string_t f_status_interrupt_not_s = F_status_interrupt_not_s; + const f_string_t f_status_known_s = F_status_known_s; + const f_string_t f_status_known_not_s = F_status_known_not_s; + const f_string_t f_status_last_s = F_status_last_s; + const f_string_t f_status_last_not_s = F_status_last_not_s; + const f_string_t f_status_limit_s = F_status_limit_s; + const f_string_t f_status_limit_not_s = F_status_limit_not_s; + const f_string_t f_status_link_s = F_status_link_s; + const f_string_t f_status_link_not_s = F_status_link_not_s; + const f_string_t f_status_live_s = F_status_live_s; + const f_string_t f_status_live_not_s = F_status_live_not_s; + const f_string_t f_status_lock_s = F_status_lock_s; + const f_string_t f_status_lock_not_s = F_status_lock_not_s; + const f_string_t f_status_loop_s = F_status_loop_s; + const f_string_t f_status_loop_not_s = F_status_loop_not_s; + const f_string_t f_status_maybe_s = F_status_maybe_s; + const f_string_t f_status_maybe_not_s = F_status_maybe_not_s; + const f_string_t f_status_memory_s = F_status_memory_s; + const f_string_t f_status_memory_not_s = F_status_memory_not_s; + const f_string_t f_status_minor_s = F_status_minor_s; + const f_string_t f_status_minor_not_s = F_status_minor_not_s; + const f_string_t f_status_moderate_s = F_status_moderate_s; + const f_string_t f_status_moderate_not_s = F_status_moderate_not_s; + const f_string_t f_status_mount_s = F_status_mount_s; + const f_string_t f_status_mount_not_s = F_status_mount_not_s; + const f_string_t f_status_name_s = F_status_name_s; + const f_string_t f_status_name_not_s = F_status_name_not_s; + const f_string_t f_status_next_s = F_status_next_s; + const f_string_t f_status_next_not_s = F_status_next_not_s; + const f_string_t f_status_nice_s = F_status_nice_s; + const f_string_t f_status_nice_not_s = F_status_nice_not_s; + const f_string_t f_status_optional_s = F_status_optional_s; + const f_string_t f_status_optional_not_s = F_status_optional_not_s; + const f_string_t f_status_output_s = F_status_output_s; + const f_string_t f_status_output_not_s = F_status_output_not_s; + const f_string_t f_status_parameter_s = F_status_parameter_s; + const f_string_t f_status_parameter_not_s = F_status_parameter_not_s; + const f_string_t f_status_parent_s = F_status_parent_s; + const f_string_t f_status_parent_not_s = F_status_parent_not_s; + const f_string_t f_status_previous_s = F_status_previous_s; + const f_string_t f_status_previous_not_s = F_status_previous_not_s; + const f_string_t f_status_pipe_s = F_status_pipe_s; + const f_string_t f_status_pipe_not_s = F_status_pipe_not_s; + const f_string_t f_status_port_s = F_status_port_s; + const f_string_t f_status_port_not_s = F_status_port_not_s; + const f_string_t f_status_processor_s = F_status_processor_s; + const f_string_t f_status_processor_not_s = F_status_processor_not_s; + const f_string_t f_status_prohibited_s = F_status_prohibited_s; + const f_string_t f_status_prohibited_not_s = F_status_prohibited_not_s; + const f_string_t f_status_range_s = F_status_range_s; + const f_string_t f_status_range_not_s = F_status_range_not_s; + const f_string_t f_status_read_s = F_status_read_s; + const f_string_t f_status_read_not_s = F_status_read_not_s; + const f_string_t f_status_read_only_s = F_status_read_only_s; + const f_string_t f_status_ready_s = F_status_ready_s; + const f_string_t f_status_ready_not_s = F_status_ready_not_s; + const f_string_t f_status_recover_s = F_status_recover_s; + const f_string_t f_status_recover_not_s = F_status_recover_not_s; + const f_string_t f_status_recurse_s = F_status_recurse_s; + const f_string_t f_status_recurse_not_s = F_status_recurse_not_s; + const f_string_t f_status_relative_s = F_status_relative_s; + const f_string_t f_status_relative_not_s = F_status_relative_not_s; + const f_string_t f_status_require_s = F_status_require_s; + const f_string_t f_status_require_not_s = F_status_require_not_s; + const f_string_t f_status_resource_s = F_status_resource_s; + const f_string_t f_status_resource_not_s = F_status_resource_not_s; + const f_string_t f_status_search_s = F_status_search_s; + const f_string_t f_status_search_not_s = F_status_search_not_s; + const f_string_t f_status_schedule_s = F_status_schedule_s; + const f_string_t f_status_schedule_not_s = F_status_schedule_not_s; + const f_string_t f_status_signal_s = F_status_signal_s; + const f_string_t f_status_signal_not_s = F_status_signal_not_s; + const f_string_t f_status_space_s = F_status_space_s; + const f_string_t f_status_space_not_s = F_status_space_not_s; + const f_string_t f_status_stop_s = F_status_stop_s; + const f_string_t f_status_stop_not_s = F_status_stop_not_s; + const f_string_t f_status_string_s = F_status_string_s; + const f_string_t f_status_string_not_s = F_status_string_not_s; + const f_string_t f_status_string_too_large_s = F_status_string_too_large_s; + const f_string_t f_status_string_too_small_s = F_status_string_too_small_s; + const f_string_t f_status_syntax_s = F_status_syntax_s; + const f_string_t f_status_syntax_not_s = F_status_syntax_not_s; + const f_string_t f_status_thread_s = F_status_thread_s; + const f_string_t f_status_thread_not_s = F_status_thread_not_s; + const f_string_t f_status_time_s = F_status_time_s; + const f_string_t f_status_time_not_s = F_status_time_not_s; + const f_string_t f_status_too_large_s = F_status_too_large_s; + const f_string_t f_status_too_small_s = F_status_too_small_s; + const f_string_t f_status_success_s = F_status_success_s; + const f_string_t f_status_success_not_s = F_status_success_not_s; + const f_string_t f_status_supported_s = F_status_supported_s; + const f_string_t f_status_supported_not_s = F_status_supported_not_s; + const f_string_t f_status_user_s = F_status_user_s; + const f_string_t f_status_user_not_s = F_status_user_not_s; + const f_string_t f_status_utf_s = F_status_utf_s; + const f_string_t f_status_utf_fragment_s = F_status_utf_fragment_s; + const f_string_t f_status_utf_fragment_not_s = F_status_utf_fragment_not_s; + const f_string_t f_status_utf_not_s = F_status_utf_not_s; + const f_string_t f_status_valid_s = F_status_valid_s; + const f_string_t f_status_valid_not_s = F_status_valid_not_s; + const f_string_t f_status_value_s = F_status_value_s; + const f_string_t f_status_value_not_s = F_status_value_not_s; + const f_string_t f_status_wait_s = F_status_wait_s; + const f_string_t f_status_wait_not_s = F_status_wait_not_s; + const f_string_t f_status_warn_s = F_status_warn_s; + const f_string_t f_status_warn_not_s = F_status_warn_not_s; + const f_string_t f_status_world_s = F_status_world_s; + const f_string_t f_status_world_not_s = F_status_world_not_s; + const f_string_t f_status_write_s = F_status_write_s; + const f_string_t f_status_write_not_s = F_status_write_not_s; + const f_string_t f_status_write_only_s = F_status_write_only_s; + #endif // _di_F_status_basic_ + + #ifndef _di_F_status_array_ + const f_string_t f_status_array_s = F_status_array_s; + const f_string_t f_status_array_not_s = F_status_array_not_s; + const f_string_t f_status_array_too_large_s = F_status_array_too_large_s; + const f_string_t f_status_array_too_small_s = F_status_array_too_small_s; + #endif // _di_F_status_array_ + + #ifndef _di_F_status_available_ + const f_string_t f_status_available_s = F_status_available_s; + const f_string_t f_status_available_not_s = F_status_available_not_s; + const f_string_t f_status_available_not_address_s = F_status_available_not_address_s; + const f_string_t f_status_available_not_buffer_s = F_status_available_not_buffer_s; + const f_string_t f_status_available_not_device_s = F_status_available_not_device_s; + const f_string_t f_status_available_not_pipe_s = F_status_available_not_pipe_s; + const f_string_t f_status_available_not_port_s = F_status_available_not_port_s; + const f_string_t f_status_available_not_process_s = F_status_available_not_process_s; + const f_string_t f_status_available_not_socket_s = F_status_available_not_socket_s; + #endif // _di_F_status_available_ + + #ifndef _di_F_status_busy_ + const f_string_t f_status_busy_s = F_status_busy_s; + const f_string_t f_status_busy_address_s = F_status_busy_address_s; + const f_string_t f_status_busy_buffer_s = F_status_busy_buffer_s; + const f_string_t f_status_busy_device_s = F_status_busy_device_s; + const f_string_t f_status_busy_not_s = F_status_busy_not_s; + const f_string_t f_status_busy_pipe_s = F_status_busy_pipe_s; + const f_string_t f_status_busy_port_s = F_status_busy_port_s; + const f_string_t f_status_busy_process_s = F_status_busy_process_s; + const f_string_t f_status_busy_socket_s = F_status_busy_socket_s; + #endif // _di_F_status_busy_ + + #ifndef _di_F_status_number_ + const f_string_t f_status_number_s = F_status_number_s; + const f_string_t f_status_number_decimal_s = F_status_number_decimal_s; + const f_string_t f_status_number_decimal_not_s = F_status_number_decimal_not_s; + const f_string_t f_status_number_divide_by_zero_s = F_status_number_divide_by_zero_s; + const f_string_t f_status_number_negative_s = F_status_number_negative_s; + const f_string_t f_status_number_negative_not_s = F_status_number_negative_not_s; + const f_string_t f_status_number_not_s = F_status_number_not_s; + const f_string_t f_status_number_overflow_s = F_status_number_overflow_s; + const f_string_t f_status_number_positive_s = F_status_number_positive_s; + const f_string_t f_status_number_positive_not_s = F_status_number_positive_not_s; + const f_string_t f_status_number_too_large_s = F_status_number_too_large_s; + const f_string_t f_status_number_too_small_s = F_status_number_too_small_s; + const f_string_t f_status_number_underflow_s = F_status_number_underflow_s; + const f_string_t f_status_number_whole_s = F_status_number_whole_s; + const f_string_t f_status_number_whole_not_s = F_status_number_whole_not_s; + const f_string_t f_status_number_zero_s = F_status_number_zero_s; + const f_string_t f_status_number_zero_not_s = F_status_number_zero_not_s; + #endif // _di_F_status_number_ + + #ifndef _di_F_status_buffer_ + const f_string_t f_status_buffer_s = F_status_buffer_s; + const f_string_t f_status_buffer_not_s = F_status_buffer_not_s; + const f_string_t f_status_buffer_too_large_s = F_status_buffer_too_large_s; + const f_string_t f_status_buffer_too_small_s = F_status_buffer_too_small_s; + const f_string_t f_status_complete_not_utf_s = F_status_complete_not_utf_s; + const f_string_t f_status_complete_not_utf_block_s = F_status_complete_not_utf_block_s; + const f_string_t f_status_complete_not_utf_eoa_s = F_status_complete_not_utf_eoa_s; + const f_string_t f_status_complete_not_utf_eof_s = F_status_complete_not_utf_eof_s; + const f_string_t f_status_complete_not_utf_eol_s = F_status_complete_not_utf_eol_s; + const f_string_t f_status_complete_not_utf_eos_s = F_status_complete_not_utf_eos_s; + const f_string_t f_status_complete_not_utf_stop_s = F_status_complete_not_utf_stop_s; + const f_string_t f_status_none_block_s = F_status_none_block_s; + const f_string_t f_status_none_eoa_s = F_status_none_eoa_s; + const f_string_t f_status_none_eof_s = F_status_none_eof_s; + const f_string_t f_status_none_eol_s = F_status_none_eol_s; + const f_string_t f_status_none_eos_s = F_status_none_eos_s; + const f_string_t f_status_none_not_s = F_status_none_not_s; + const f_string_t f_status_none_stop_s = F_status_none_stop_s; + const f_string_t f_status_data_s = F_status_data_s; + const f_string_t f_status_data_not_s = F_status_data_not_s; + const f_string_t f_status_data_not_block_s = F_status_data_not_block_s; + const f_string_t f_status_data_not_eoa_s = F_status_data_not_eoa_s; + const f_string_t f_status_data_not_eof_s = F_status_data_not_eof_s; + const f_string_t f_status_data_not_eol_s = F_status_data_not_eol_s; + const f_string_t f_status_data_not_eos_s = F_status_data_not_eos_s; + const f_string_t f_status_data_not_stop_s = F_status_data_not_stop_s; + const f_string_t f_status_terminated_s = F_status_terminated_s; + const f_string_t f_status_terminated_not_s = F_status_terminated_not_s; + const f_string_t f_status_terminated_not_block_s = F_status_terminated_not_block_s; + const f_string_t f_status_terminated_not_eoa_s = F_status_terminated_not_eoa_s; + const f_string_t f_status_terminated_not_eof_s = F_status_terminated_not_eof_s; + const f_string_t f_status_terminated_not_eol_s = F_status_terminated_not_eol_s; + const f_string_t f_status_terminated_not_eos_s = F_status_terminated_not_eos_s; + const f_string_t f_status_terminated_not_stop_s = F_status_terminated_not_stop_s; + const f_string_t f_status_terminated_not_group_s = F_status_terminated_not_group_s; + const f_string_t f_status_terminated_not_group_block_s = F_status_terminated_not_group_block_s; + const f_string_t f_status_terminated_not_group_eoa_s = F_status_terminated_not_group_eoa_s; + const f_string_t f_status_terminated_not_group_eof_s = F_status_terminated_not_group_eof_s; + const f_string_t f_status_terminated_not_group_eol_s = F_status_terminated_not_group_eol_s; + const f_string_t f_status_terminated_not_group_eos_s = F_status_terminated_not_group_eos_s; + const f_string_t f_status_terminated_not_group_stop_s = F_status_terminated_not_group_stop_s; + const f_string_t f_status_terminated_not_nest_s = F_status_terminated_not_nest_s; + const f_string_t f_status_terminated_not_nest_block_s = F_status_terminated_not_nest_block_s; + const f_string_t f_status_terminated_not_nest_eoa_s = F_status_terminated_not_nest_eoa_s; + const f_string_t f_status_terminated_not_nest_eof_s = F_status_terminated_not_nest_eof_s; + const f_string_t f_status_terminated_not_nest_eol_s = F_status_terminated_not_nest_eol_s; + const f_string_t f_status_terminated_not_nest_eos_s = F_status_terminated_not_nest_eos_s; + const f_string_t f_status_terminated_not_nest_stop_s = F_status_terminated_not_nest_stop_s; + #endif // _di_F_status_buffer_ + + #ifndef _di_F_status_process_ + const f_string_t f_status_process_s = F_status_process_s; + const f_string_t f_status_process_not_s = F_status_process_not_s; + const f_string_t f_status_process_too_many_s = F_status_process_too_many_s; + #endif // _di_F_status_process_ + + #ifndef _di_F_status_file_ + const f_string_t f_status_file_s = F_status_file_s; + const f_string_t f_status_file_close_s = F_status_file_close_s; + const f_string_t f_status_file_closed_s = F_status_file_closed_s; + const f_string_t f_status_file_descriptor_s = F_status_file_descriptor_s; + const f_string_t f_status_file_descriptor_max_s = F_status_file_descriptor_max_s; + const f_string_t f_status_file_descriptor_not_s = F_status_file_descriptor_not_s; + const f_string_t f_status_file_empty_s = F_status_file_empty_s; + const f_string_t f_status_file_flush_s = F_status_file_flush_s; + const f_string_t f_status_file_found_s = F_status_file_found_s; + const f_string_t f_status_file_found_not_s = F_status_file_found_not_s; + const f_string_t f_status_file_not_s = F_status_file_not_s; + const f_string_t f_status_file_open_s = F_status_file_open_s; + const f_string_t f_status_file_open_max_s = F_status_file_open_max_s; + const f_string_t f_status_file_opened_s = F_status_file_opened_s; + const f_string_t f_status_file_overflow_s = F_status_file_overflow_s; + const f_string_t f_status_file_purge_s = F_status_file_purge_s; + const f_string_t f_status_file_read_s = F_status_file_read_s; + const f_string_t f_status_file_reallocation_s = F_status_file_reallocation_s; + const f_string_t f_status_file_seek_s = F_status_file_seek_s; + const f_string_t f_status_file_stat_s = F_status_file_stat_s; + const f_string_t f_status_file_synchronize_s = F_status_file_synchronize_s; + const f_string_t f_status_file_type_block_s = F_status_file_type_block_s; + const f_string_t f_status_file_type_character_s = F_status_file_type_character_s; + const f_string_t f_status_file_type_directory_s = F_status_file_type_directory_s; + const f_string_t f_status_file_type_fifo_s = F_status_file_type_fifo_s; + const f_string_t f_status_file_type_link_s = F_status_file_type_link_s; + const f_string_t f_status_file_type_not_block_s = F_status_file_type_not_block_s; + const f_string_t f_status_file_type_not_character_s = F_status_file_type_not_character_s; + const f_string_t f_status_file_type_not_directory_s = F_status_file_type_not_directory_s; + const f_string_t f_status_file_type_not_fifo_s = F_status_file_type_not_fifo_s; + const f_string_t f_status_file_type_not_link_s = F_status_file_type_not_link_s; + const f_string_t f_status_file_type_not_pipe_s = F_status_file_type_not_pipe_s; + const f_string_t f_status_file_type_not_regular_s = F_status_file_type_not_regular_s; + const f_string_t f_status_file_type_not_socket_s = F_status_file_type_not_socket_s; + const f_string_t f_status_file_type_not_unknown_s = F_status_file_type_not_unknown_s; + const f_string_t f_status_file_type_pipe_s = F_status_file_type_pipe_s; + const f_string_t f_status_file_type_regular_s = F_status_file_type_regular_s; + const f_string_t f_status_file_type_socket_s = F_status_file_type_socket_s; + const f_string_t f_status_file_type_unknown_s = F_status_file_type_unknown_s; + const f_string_t f_status_file_underflow_s = F_status_file_underflow_s; + const f_string_t f_status_file_utf_s = F_status_file_utf_s; + const f_string_t f_status_file_utf_not_s = F_status_file_utf_not_s; + const f_string_t f_status_file_write_s = F_status_file_write_s; + #endif // _di_F_status_file_ + + #ifndef _di_F_status_filesystem_ + const f_string_t f_status_filesystem_s = F_status_filesystem_s; + const f_string_t f_status_filesystem_not_s = F_status_filesystem_not_s; + const f_string_t f_status_filesystem_quota_block_s = F_status_filesystem_quota_block_s; + const f_string_t f_status_filesystem_quota_reached_s = F_status_filesystem_quota_reached_s; + #endif // _di_F_status_filesystem_ + + #ifndef _di_F_status_directory_ + const f_string_t f_status_directory_s = F_status_directory_s; + const f_string_t f_status_directory_close_s = F_status_directory_close_s; + const f_string_t f_status_directory_closed_s = F_status_directory_closed_s; + const f_string_t f_status_directory_descriptor_s = F_status_directory_descriptor_s; + const f_string_t f_status_directory_empty_s = F_status_directory_empty_s; + const f_string_t f_status_directory_empty_not_s = F_status_directory_empty_not_s; + const f_string_t f_status_directory_found_s = F_status_directory_found_s; + const f_string_t f_status_directory_found_not_s = F_status_directory_found_not_s; + const f_string_t f_status_directory_flush_s = F_status_directory_flush_s; + const f_string_t f_status_directory_link_max_s = F_status_directory_link_max_s; + const f_string_t f_status_directory_not_s = F_status_directory_not_s; + const f_string_t f_status_directory_open_s = F_status_directory_open_s; + const f_string_t f_status_directory_purge_s = F_status_directory_purge_s; + const f_string_t f_status_directory_read_s = F_status_directory_read_s; + const f_string_t f_status_directory_stream_s = F_status_directory_stream_s; + const f_string_t f_status_directory_supported_not_s = F_status_directory_supported_not_s; + const f_string_t f_status_directory_synchronize_s = F_status_directory_synchronize_s; + const f_string_t f_status_directory_utf_s = F_status_directory_utf_s; + const f_string_t f_status_directory_utf_not_s = F_status_directory_utf_not_s; + const f_string_t f_status_directory_write_s = F_status_directory_write_s; + #endif // _di_F_status_directory_ + + #ifndef _di_F_status_socket_ + const f_string_t f_status_socket_s = F_status_socket_s; + const f_string_t f_status_socket_client_s = F_status_socket_client_s; + const f_string_t f_status_socket_not_s = F_status_socket_not_s; + const f_string_t f_status_socket_receive_s = F_status_socket_receive_s; + const f_string_t f_status_socket_send_s = F_status_socket_send_s; + const f_string_t f_status_socket_target_s = F_status_socket_target_s; + #endif // _di_F_status_socket_ + + #ifndef _di_F_status_compare_ + const f_string_t f_status_equal_to_s = F_status_equal_to_s; + const f_string_t f_status_equal_to_not_s = F_status_equal_to_not_s; + const f_string_t f_status_than_greater_s = F_status_than_greater_s; + const f_string_t f_status_than_less_s = F_status_than_less_s; + #endif // _di_F_status_compare_ + + #ifndef _di_F_status_access_ + const f_string_t f_status_access_s = F_status_access_s; + const f_string_t f_status_access_denied_s = F_status_access_denied_s; + const f_string_t f_status_access_denied_user_s = F_status_access_denied_user_s; + const f_string_t f_status_access_denied_group_s = F_status_access_denied_group_s; + const f_string_t f_status_access_denied_world_s = F_status_access_denied_world_s; + const f_string_t f_status_access_denied_read_s = F_status_access_denied_read_s; + const f_string_t f_status_access_denied_write_s = F_status_access_denied_write_s; + const f_string_t f_status_access_denied_execute_s = F_status_access_denied_execute_s; + const f_string_t f_status_access_denied_super_s = F_status_access_denied_super_s; + const f_string_t f_status_access_granted_s = F_status_access_granted_s; + const f_string_t f_status_access_granted_user_s = F_status_access_granted_user_s; + const f_string_t f_status_access_granted_group_s = F_status_access_granted_group_s; + const f_string_t f_status_access_granted_world_s = F_status_access_granted_world_s; + const f_string_t f_status_access_granted_read_s = F_status_access_granted_read_s; + const f_string_t f_status_access_granted_write_s = F_status_access_granted_write_s; + const f_string_t f_status_access_granted_execute_s = F_status_access_granted_execute_s; + const f_string_t f_status_access_granted_super_s = F_status_access_granted_super_s; + const f_string_t f_status_access_group_s = F_status_access_group_s; + const f_string_t f_status_access_mode_s = F_status_access_mode_s; + const f_string_t f_status_access_not_s = F_status_access_not_s; + const f_string_t f_status_access_owner_s = F_status_access_owner_s; + #endif // _di_F_status_access_ + + #ifndef _di_F_status_terminal_ + const f_string_t f_status_terminal_s = F_status_terminal_s; + const f_string_t f_status_terminal_access_s = F_status_terminal_access_s; + const f_string_t f_status_terminal_known_s = F_status_terminal_known_s; + const f_string_t f_status_terminal_known_not_s = F_status_terminal_known_not_s; + const f_string_t f_status_terminal_not_s = F_status_terminal_not_s; + const f_string_t f_status_terminal_prohibited_s = F_status_terminal_prohibited_s; + const f_string_t f_status_terminal_read_s = F_status_terminal_read_s; + const f_string_t f_status_terminal_valid_s = F_status_terminal_valid_s; + const f_string_t f_status_terminal_valid_not_s = F_status_terminal_valid_not_s; + const f_string_t f_status_terminal_write_s = F_status_terminal_write_s; + #endif // _di_F_status_terminal_ + + const f_string_t f_status_status_code_last_s = F_status_status_code_last_s; +#endif // _di_F_status_string_ + +#ifndef _di_f_status_string_to_ + f_status_t f_status_string_to(const f_status_t code, f_string_t *string) { + #ifndef _di_level_0_parameter_checking_ + if (!string) return F_status_set_error(F_parameter); + #endif // _di_level_0_parameter_checking_ + + f_status_t unmasked_code = F_status_set_fine(code); + + switch (unmasked_code) { + #ifndef _di_F_status_boolean_ + case F_false: + *string = f_status_false_s; + break; + + case F_true: + *string = f_status_true_s; + break; + #endif // _di_F_status_boolean_ + + #ifndef _di_F_status_signal_ + + // F_signal_hangup is not used because it has the same code as F_true. + case F_signal_interrupt: + *string = f_status_signal_interrupt_s; + break; + + case F_signal_quit: + *string = f_status_signal_quit_s; + break; + + case F_signal_illegal: + *string = f_status_signal_illegal_s; + break; + + case F_signal_trap: + *string = f_status_signal_trap_s; + break; + + case F_signal_abort: + *string = f_status_signal_abort_s; + break; + + case F_signal_bus_error: + *string = f_status_signal_bus_error_s; + break; + + case F_signal_floating_point_error: + *string = f_status_signal_floating_point_error_s; + break; + + case F_signal_kill: + *string = f_status_signal_kill_s; + break; + + case F_signal_user_1: + *string = f_status_signal_user_1_s; + break; + + case F_signal_segmentation_fault: + *string = f_status_signal_segmentation_fault_s; + break; + + case F_signal_user_2: + *string = f_status_signal_user_2_s; + break; + + case F_signal_broken_pipe: + *string = f_status_signal_broken_pipe_s; + break; + + case F_signal_alarm_clock: + *string = f_status_signal_alarm_clock_s; + break; + + case F_signal_termination: + *string = f_status_signal_termination_s; + break; + + case F_signal_stack_fault: + *string = f_status_signal_stack_fault_s; + break; + + case F_signal_child: + *string = f_status_signal_child_s; + break; + + case F_signal_continue: + *string = f_status_signal_continue_s; + break; + + case F_signal_stop: + *string = f_status_signal_stop_s; + break; + + case F_signal_keyboard_stop: + *string = f_status_signal_keyboard_stop_s; + break; + + case F_signal_tty_in: + *string = f_status_signal_tty_in_s; + break; + + case F_signal_tty_out: + *string = f_status_signal_tty_out_s; + break; + + case F_signal_urgent: + *string = f_status_signal_urgent_s; + break; + + case F_signal_cpu_limit: + *string = f_status_signal_cpu_limit_s; + break; + + case F_signal_file_size_limit: + *string = f_status_signal_file_size_limit_s; + break; + + case F_signal_virtual_alarm_clock: + *string = f_status_signal_virtual_alarm_clock_s; + break; + + case F_signal_profile_alarm_clock: + *string = f_status_signal_profile_alarm_clock_s; + break; + + case F_signal_window_size_change: + *string = f_status_signal_window_size_change_s; + break; + + case F_signal_pollable_event: + *string = f_status_signal_pollable_event_s; + break; + + case F_signal_power_failure: + *string = f_status_signal_power_failure_s; + break; + + case F_signal_bad_system_call: + *string = f_status_signal_bad_system_call_s; + break; + + case F_signal_reserved_32: + *string = f_status_signal_reserved_32_s; + break; + + case F_signal_reserved_33: + *string = f_status_signal_reserved_33_s; + break; + + case F_signal_reserved_34: + *string = f_status_signal_reserved_34_s; + break; + + case F_signal_reserved_35: + *string = f_status_signal_reserved_35_s; + break; + + case F_signal_reserved_36: + *string = f_status_signal_reserved_36_s; + break; + + case F_signal_reserved_37: + *string = f_status_signal_reserved_37_s; + break; + + case F_signal_reserved_38: + *string = f_status_signal_reserved_38_s; + break; + + case F_signal_reserved_39: + *string = f_status_signal_reserved_39_s; + break; + + case F_signal_reserved_40: + *string = f_status_signal_reserved_40_s; + break; + + case F_signal_reserved_41: + *string = f_status_signal_reserved_41_s; + break; + + case F_signal_reserved_42: + *string = f_status_signal_reserved_42_s; + break; + + case F_signal_reserved_43: + *string = f_status_signal_reserved_43_s; + break; + + case F_signal_reserved_44: + *string = f_status_signal_reserved_44_s; + break; + + case F_signal_reserved_45: + *string = f_status_signal_reserved_45_s; + break; + + case F_signal_reserved_46: + *string = f_status_signal_reserved_46_s; + break; + + case F_signal_reserved_47: + *string = f_status_signal_reserved_47_s; + break; + + case F_signal_reserved_48: + *string = f_status_signal_reserved_48_s; + break; + + case F_signal_reserved_49: + *string = f_status_signal_reserved_49_s; + break; + + case F_signal_reserved_50: + *string = f_status_signal_reserved_50_s; + break; + + case F_signal_reserved_51: + *string = f_status_signal_reserved_51_s; + break; + + case F_signal_reserved_52: + *string = f_status_signal_reserved_52_s; + break; + + case F_signal_reserved_53: + *string = f_status_signal_reserved_53_s; + break; + + case F_signal_reserved_54: + *string = f_status_signal_reserved_54_s; + break; + + case F_signal_reserved_55: + *string = f_status_signal_reserved_55_s; + break; + + case F_signal_reserved_56: + *string = f_status_signal_reserved_56_s; + break; + + case F_signal_reserved_57: + *string = f_status_signal_reserved_57_s; + break; + + case F_signal_reserved_58: + *string = f_status_signal_reserved_58_s; + break; + + case F_signal_reserved_59: + *string = f_status_signal_reserved_59_s; + break; + + case F_signal_reserved_60: + *string = f_status_signal_reserved_60_s; + break; + + case F_signal_reserved_61: + *string = f_status_signal_reserved_61_s; + break; + + case F_signal_reserved_62: + *string = f_status_signal_reserved_62_s; + break; + + case F_signal_reserved_63: + *string = f_status_signal_reserved_63_s; + break; + + case F_signal_reserved_64: + *string = f_status_signal_reserved_64_s; + break; + #endif // _di_F_status_signal_ + + #ifndef _di_F_status_basic_ + case F_none: + *string = f_status_none_s; + break; + + case F_absolute: + *string = f_status_absolute_s; + break; + + case F_absolute_not: + *string = f_status_absolute_not_s; + break; + + case F_address: + *string = f_status_address_s; + break; + + case F_address_not: + *string = f_status_address_not_s; + break; + + case F_ascii: + *string = f_status_ascii_s; + break; + + case F_ascii_not: + *string = f_status_ascii_not_s; + break; + + case F_block: + *string = f_status_block_s; + break; + + case F_block_not: + *string = f_status_block_not_s; + break; + + case F_bound: + *string = f_status_bound_s; + break; + + case F_bound_not: + *string = f_status_bound_not_s; + break; + + case F_capability: + *string = f_status_capability_s; + break; + + case F_capability_not: + *string = f_status_capability_not_s; + break; + + case F_child: + *string = f_status_child_s; + break; + + case F_child_not: + *string = f_status_child_not_s; + break; + + case F_complete: + *string = f_status_complete_s; + break; + + case F_complete_not: + *string = f_status_complete_not_s; + break; + + case F_connected: + *string = f_status_connected_s; + break; + + case F_connected_not: + *string = f_status_connected_not_s; + break; + + case F_container: + *string = f_status_container_s; + break; + + case F_container_not: + *string = f_status_container_not_s; + break; + + case F_control: + *string = f_status_control_s; + break; + + case F_control_not: + *string = f_status_control_not_s; + break; + + case F_control_group: + *string = f_status_control_group_s; + break; + + case F_control_group_not: + *string = f_status_control_group_not_s; + break; + + case F_critical: + *string = f_status_critical_s; + break; + + case F_critical_not: + *string = f_status_critical_not_s; + break; + + case F_dead: + *string = f_status_dead_s; + break; + + case F_dead_not: + *string = f_status_dead_not_s; + break; + + case F_deadlock: + *string = f_status_deadlock_s; + break; + + case F_deadlock_not: + *string = f_status_deadlock_not_s; + break; + + case F_descriptor: + *string = f_status_descriptor_s; + break; + + case F_descriptor_not: + *string = f_status_descriptor_not_s; + break; + + case F_device: + *string = f_status_device_s; + break; + + case F_device_not: + *string = f_status_device_not_s; + break; + + case F_disable: + *string = f_status_disable_s; + break; + + case F_disable_not: + *string = f_status_disable_not_s; + break; + + case F_done: + *string = f_status_done_s; + break; + + case F_done_not: + *string = f_status_done_not_s; + break; + + case F_dummy: + *string = f_status_dummy_s; + break; + + case F_dummy_not: + *string = f_status_dummy_not_s; + break; + + case F_empty: + *string = f_status_empty_s; + break; + + case F_empty_not: + *string = f_status_empty_not_s; + break; + + case F_enable: + *string = f_status_enable_s; + break; + + case F_enable_not: + *string = f_status_enable_not_s; + break; + + case F_encoding: + *string = f_status_encoding_s; + break; + + case F_encoding_not: + *string = f_status_encoding_not_s; + break; + + case F_eoa: + *string = f_status_eoa_s; + break; + + case F_eoa_not: + *string = f_status_eoa_not_s; + break; + + case F_eof: + *string = f_status_eof_s; + break; + + case F_eof_not: + *string = f_status_eof_not_s; + break; + + case F_eol: + *string = f_status_eol_s; + break; + + case F_eol_not: + *string = f_status_eol_not_s; + break; + + case F_eos: + *string = f_status_eos_s; + break; + + case F_eos_not: + *string = f_status_eos_not_s; + break; + + case F_execute: + *string = f_status_execute_s; + break; + + case F_execute_not: + *string = f_status_execute_not_s; + break; + + case F_exist: + *string = f_status_exist_s; + break; + + case F_exist_not: + *string = f_status_exist_not_s; + break; + + case F_failure: + *string = f_status_failure_s; + break; + + case F_failure_not: + *string = f_status_failure_not_s; + break; + + case F_first: + *string = f_status_first_s; + break; + + case F_first_not: + *string = f_status_first_not_s; + break; + + case F_fork: + *string = f_status_fork_s; + break; + + case F_fork_not: + *string = f_status_fork_not_s; + break; + + case F_format: + *string = f_status_format_s; + break; + + case F_format_not: + *string = f_status_format_not_s; + break; + + case F_found: + *string = f_status_found_s; + break; + + case F_found_not: + *string = f_status_found_not_s; + break; + + case F_full: + *string = f_status_full_s; + break; + + case F_full_not: + *string = f_status_full_not_s; + break; + + case F_group: + *string = f_status_group_s; + break; + + case F_group_not: + *string = f_status_group_not_s; + break; + + case F_ignore: + *string = f_status_ignore_s; + break; + + case F_ignore_not: + *string = f_status_ignore_not_s; + break; + + case F_implemented: + *string = f_status_implemented_s; + break; + + case F_implemented_not: + *string = f_status_implemented_not_s; + break; + + case F_input: + *string = f_status_input_s; + break; + + case F_input_not: + *string = f_status_input_not_s; + break; + + case F_input_output: + *string = f_status_input_output_s; + break; + + case F_interrupt: + *string = f_status_interrupt_s; + break; + + case F_interrupt_not: + *string = f_status_interrupt_not_s; + break; + + case F_last: + *string = f_status_last_s; + break; + + case F_last_not: + *string = f_status_last_not_s; + break; + + case F_limit: + *string = f_status_limit_s; + break; + + case F_limit_not: + *string = f_status_limit_not_s; + break; + + case F_link: + *string = f_status_link_s; + break; + + case F_link_not: + *string = f_status_link_not_s; + break; + + case F_live: + *string = f_status_live_s; + break; + + case F_live_not: + *string = f_status_live_not_s; + break; + + case F_lock: + *string = f_status_lock_s; + break; + + case F_lock_not: + *string = f_status_lock_not_s; + break; + + case F_loop: + *string = f_status_loop_s; + break; + + case F_loop_not: + *string = f_status_loop_not_s; + break; + + case F_maybe: + *string = f_status_maybe_s; + break; + + case F_maybe_not: + *string = f_status_maybe_not_s; + break; + + case F_memory: + *string = f_status_memory_s; + break; + + case F_memory_not: + *string = f_status_memory_not_s; + break; + + case F_minor: + *string = f_status_minor_s; + break; + + case F_minor_not: + *string = f_status_minor_not_s; + break; + + case F_moderate: + *string = f_status_moderate_s; + break; + + case F_moderate_not: + *string = f_status_moderate_not_s; + break; + + case F_mount: + *string = f_status_mount_s; + break; + + case F_mount_not: + *string = f_status_mount_not_s; + break; + + case F_name: + *string = f_status_name_s; + break; + + case F_name_not: + *string = f_status_name_not_s; + break; + + case F_next: + *string = f_status_next_s; + break; + + case F_next_not: + *string = f_status_next_not_s; + break; + + case F_nice: + *string = f_status_nice_s; + break; + + case F_nice_not: + *string = f_status_nice_not_s; + break; + + case F_optional: + *string = f_status_optional_s; + break; + + case F_optional_not: + *string = f_status_optional_not_s; + break; + + case F_output: + *string = f_status_output_s; + break; + + case F_output_not: + *string = f_status_output_not_s; + break; + + case F_parameter: + *string = f_status_parameter_s; + break; + + case F_parameter_not: + *string = f_status_parameter_not_s; + break; + + case F_parent: + *string = f_status_parent_s; + break; + + case F_parent_not: + *string = f_status_parent_not_s; + break; + + case F_previous: + *string = f_status_previous_s; + break; + + case F_previous_not: + *string = f_status_previous_not_s; + break; + + case F_pipe: + *string = f_status_pipe_s; + break; + + case F_pipe_not: + *string = f_status_pipe_not_s; + break; + + case F_port: + *string = f_status_port_s; + break; + + case F_port_not: + *string = f_status_port_not_s; + break; + + case F_processor: + *string = f_status_processor_s; + break; + + case F_processor_not: + *string = f_status_processor_not_s; + break; + + case F_prohibited: + *string = f_status_prohibited_s; + break; + + case F_prohibited_not: + *string = f_status_prohibited_not_s; + break; + + case F_range: + *string = f_status_range_s; + break; + + case F_range_not: + *string = f_status_range_not_s; + break; + + case F_read: + *string = f_status_read_s; + break; + + case F_read_not: + *string = f_status_read_not_s; + break; + + case F_read_only: + *string = f_status_read_only_s; + break; + + case F_ready: + *string = f_status_ready_s; + break; + + case F_ready_not: + *string = f_status_ready_not_s; + break; + + case F_recover: + *string = f_status_recover_s; + break; + + case F_recover_not: + *string = f_status_recover_not_s; + break; + + case F_recurse: + *string = f_status_recurse_s; + break; + + case F_recurse_not: + *string = f_status_recurse_not_s; + break; + + case F_relative: + *string = f_status_relative_s; + break; + + case F_relative_not: + *string = f_status_relative_not_s; + break; + + case F_require: + *string = f_status_require_s; + break; + + case F_require_not: + *string = f_status_require_not_s; + break; + + case F_resource: + *string = f_status_resource_s; + break; + + case F_resource_not: + *string = f_status_resource_not_s; + break; + + case F_search: + *string = f_status_search_s; + break; + + case F_search_not: + *string = f_status_search_not_s; + break; + + case F_schedule: + *string = f_status_schedule_s; + break; + + case F_schedule_not: + *string = f_status_schedule_not_s; + break; + + case F_signal: + *string = f_status_signal_s; + break; + + case F_signal_not: + *string = f_status_signal_not_s; + break; + + case F_space: + *string = f_status_space_s; + break; + + case F_space_not: + *string = f_status_space_not_s; + break; + + case F_stop: + *string = f_status_stop_s; + break; + + case F_stop_not: + *string = f_status_stop_not_s; + break; + + case F_string: + *string = f_status_string_s; + break; + + case F_string_not: + *string = f_status_string_not_s; + break; + + case F_string_too_large: + *string = f_status_too_large_s; + break; + + case F_string_too_small: + *string = f_status_too_small_s; + break; + + case F_syntax: + *string = f_status_syntax_s; + break; + + case F_syntax_not: + *string = f_status_syntax_not_s; + break; + + case F_thread: + *string = f_status_thread_s; + break; + + case F_thread_not: + *string = f_status_thread_not_s; + break; + + case F_time: + *string = f_status_time_s; + break; + + case F_time_not: + *string = f_status_time_not_s; + break; + + case F_too_large: + *string = f_status_too_large_s; + break; + + case F_too_small: + *string = f_status_too_small_s; + break; + + case F_known: + *string = f_status_known_s; + break; + + case F_known_not: + *string = f_status_known_not_s; + break; + + case F_success: + *string = f_status_success_s; + break; + + case F_success_not: + *string = f_status_success_not_s; + break; + + case F_supported: + *string = f_status_supported_s; + break; + + case F_supported_not: + *string = f_status_supported_not_s; + break; + + case F_user: + *string = f_status_user_s; + break; + + case F_user_not: + *string = f_status_user_not_s; + break; + + case F_utf: + *string = f_status_utf_s; + break; + + case F_utf_fragment: + *string = f_status_utf_fragment_s; + break; + + case F_utf_fragment_not: + *string = f_status_utf_fragment_not_s; + break; + + case F_utf_not: + *string = f_status_utf_not_s; + break; + + case F_valid: + *string = f_status_valid_s; + break; + + case F_valid_not: + *string = f_status_valid_not_s; + break; + + case F_value: + *string = f_status_value_s; + break; + + case F_value_not: + *string = f_status_value_not_s; + break; + + case F_wait: + *string = f_status_wait_s; + break; + + case F_wait_not: + *string = f_status_wait_not_s; + break; + + case F_warn: + *string = f_status_warn_s; + break; + + case F_warn_not: + *string = f_status_warn_not_s; + break; + + case F_world: + *string = f_status_world_s; + break; + + case F_world_not: + *string = f_status_world_not_s; + break; + + case F_write: + *string = f_status_write_s; + break; + + case F_write_not: + *string = f_status_write_not_s; + break; + + case F_write_only: + *string = f_status_write_only_s; + break; + #endif // _di_F_status_basic_ + + #ifndef _di_F_status_array_ + case F_array: + *string = f_status_array_s; + break; + + case F_array_not: + *string = f_status_array_not_s; + break; + + case F_array_too_large: + *string = f_status_array_too_large_s; + break; + + case F_array_too_small: + *string = f_status_array_too_small_s; + break; + #endif // _di_F_status_array_ + + #ifndef _di_F_status_available_ + case F_available: + *string = f_status_available_s; + break; + + case F_available_not: + *string = f_status_available_not_s; + break; + + case F_available_not_address: + *string = f_status_available_not_address_s; + break; + + case F_available_not_buffer: + *string = f_status_available_not_buffer_s; + break; + + case F_available_not_device: + *string = f_status_available_not_device_s; + break; + + case F_available_not_pipe: + *string = f_status_available_not_pipe_s; + break; + + case F_available_not_port: + *string = f_status_available_not_port_s; + break; + + case F_available_not_process: + *string = f_status_available_not_process_s; + break; + + case F_available_not_socket: + *string = f_status_available_not_socket_s; + break; + #endif // _di_F_status_available_ + + #ifndef _di_F_status_busy_ + case F_busy: + *string = f_status_busy_s; + break; + + case F_busy_address: + *string = f_status_busy_address_s; + break; + + case F_busy_buffer: + *string = f_status_busy_buffer_s; + break; + + case F_busy_device: + *string = f_status_busy_device_s; + break; + + case F_busy_not: + *string = f_status_busy_not_s; + break; + + case F_busy_pipe: + *string = f_status_busy_pipe_s; + break; + + case F_busy_port: + *string = f_status_busy_port_s; + break; + + case F_busy_process: + *string = f_status_busy_process_s; + break; + + case F_busy_socket: + *string = f_status_busy_socket_s; + break; + #endif // _di_F_status_busy_ + + #ifndef _di_F_status_number_ + case F_number: + *string = f_status_number_s; + break; + + case F_number_decimal: + *string = f_status_number_decimal_s; + break; + + case F_number_decimal_not: + *string = f_status_number_decimal_not_s; + break; + + case F_number_divide_by_zero: + *string = f_status_number_divide_by_zero_s; + break; + + case F_number_negative: + *string = f_status_number_negative_s; + break; + + case F_number_negative_not: + *string = f_status_number_negative_not_s; + break; + + case F_number_not: + *string = f_status_number_not_s; + break; + + case F_number_overflow: + *string = f_status_number_overflow_s; + break; + + case F_number_positive: + *string = f_status_number_positive_s; + break; + + case F_number_positive_not: + *string = f_status_number_positive_not_s; + break; + + case F_number_too_large: + *string = f_status_number_too_large_s; + break; + + case F_number_too_small: + *string = f_status_number_too_small_s; + break; + + case F_number_underflow: + *string = f_status_number_underflow_s; + break; + + case F_number_whole: + *string = f_status_number_whole_s; + break; + + case F_number_whole_not: + *string = f_status_number_whole_not_s; + break; + + case F_number_zero: + *string = f_status_number_zero_s; + break; + + case F_number_zero_not: + *string = f_status_number_zero_not_s; + break; + #endif // _di_F_status_number_ + + #ifndef _di_F_status_buffers_ + case F_buffer: + *string = f_status_buffer_s; + break; + + case F_buffer_not: + *string = f_status_buffer_not_s; + break; + + case F_buffer_too_large: + *string = f_status_buffer_too_large_s; + break; + + case F_buffer_too_small: + *string = f_status_buffer_too_small_s; + break; + + case F_complete_not_utf_block: + *string = f_status_complete_not_utf_block_s; + break; + + case F_complete_not_utf_eoa: + *string = f_status_complete_not_utf_eoa_s; + break; + + case F_complete_not_utf_eof: + *string = f_status_complete_not_utf_eof_s; + break; + + case F_complete_not_utf_eol: + *string = f_status_complete_not_utf_eol_s; + break; + + case F_complete_not_utf_eos: + *string = f_status_complete_not_utf_eos_s; + break; + + case F_complete_not_utf_stop: + *string = f_status_complete_not_utf_stop_s; + break; + + case F_none_block: + *string = f_status_none_block_s; + break; + + case F_none_eoa: + *string = f_status_none_eoa_s; + break; + + case F_none_eof: + *string = f_status_none_eof_s; + break; + + case F_none_eol: + *string = f_status_none_eol_s; + break; + + case F_none_eos: + *string = f_status_none_eos_s; + break; + + case F_none_stop: + *string = f_status_none_stop_s; + break; + + case F_data: + *string = f_status_data_s; + break; + + case F_data_not: + *string = f_status_data_not_s; + break; + + case F_data_not_block: + *string = f_status_data_not_block_s; + break; + + case F_data_not_eoa: + *string = f_status_data_not_eoa_s; + break; + + case F_data_not_eof: + *string = f_status_data_not_eof_s; + break; + + case F_data_not_eol: + *string = f_status_data_not_eol_s; + break; + + case F_data_not_eos: + *string = f_status_data_not_eos_s; + break; + + case F_data_not_stop: + *string = f_status_data_not_stop_s; + break; + + case F_terminated: + *string = f_status_terminated_s; + break; + + case F_terminated_not: + *string = f_status_terminated_not_s; + break; + + case F_terminated_not_block: + *string = f_status_terminated_not_block_s; + break; + + case F_terminated_not_eoa: + *string = f_status_terminated_not_eoa_s; + break; + + case F_terminated_not_eof: + *string = f_status_terminated_not_eof_s; + break; + + case F_terminated_not_eol: + *string = f_status_terminated_not_eol_s; + break; + + case F_terminated_not_eos: + *string = f_status_terminated_not_eos_s; + break; + + case F_terminated_not_group: + *string = f_status_terminated_not_group_s; + break; + + case F_terminated_not_group_block: + *string = f_status_terminated_not_group_block_s; + break; + + case F_terminated_not_group_eoa: + *string = f_status_terminated_not_group_eoa_s; + break; + + case F_terminated_not_group_eof: + *string = f_status_terminated_not_group_eof_s; + break; + + case F_terminated_not_group_eol: + *string = f_status_terminated_not_group_eol_s; + break; + + case F_terminated_not_group_eos: + *string = f_status_terminated_not_group_eos_s; + break; + + case F_terminated_not_group_stop: + *string = f_status_terminated_not_group_stop_s; + break; + + case F_terminated_not_nest: + *string = f_status_terminated_not_nest_s; + break; + + case F_terminated_not_nest_block: + *string = f_status_terminated_not_nest_block_s; + break; + + case F_terminated_not_nest_eoa: + *string = f_status_terminated_not_nest_eoa_s; + break; + + case F_terminated_not_nest_eof: + *string = f_status_terminated_not_nest_eof_s; + break; + + case F_terminated_not_nest_eol: + *string = f_status_terminated_not_nest_eol_s; + break; + + case F_terminated_not_nest_eos: + *string = f_status_terminated_not_nest_eos_s; + break; + + case F_terminated_not_nest_stop: + *string = f_status_terminated_not_nest_stop_s; + break; + + case F_terminated_not_stop: + *string = f_status_terminated_not_stop_s; + break; + #endif // _di_F_status_buffers_ + + #ifndef _di_F_status_process_ + case F_process: + *string = f_status_process_s; + break; + + case F_process_not: + *string = f_status_process_not_s; + break; + + case F_process_too_many: + *string = f_status_process_too_many_s; + break; + #endif // _di_F_status_process_ + + #ifndef _di_F_status_file_ + case F_file: + *string = f_status_file_s; + break; + + case F_file_close: + *string = f_status_file_close_s; + break; + + case F_file_closed: + *string = f_status_file_closed_s; + break; + + case F_file_descriptor: + *string = f_status_file_descriptor_s; + break; + + case F_file_descriptor_max: + *string = f_status_file_descriptor_max_s; + break; + + case F_file_descriptor_not: + *string = f_status_file_descriptor_not_s; + break; + + case F_file_empty: + *string = f_status_file_empty_s; + break; + + case F_file_flush: + *string = f_status_file_flush_s; + break; + + case F_file_found: + *string = f_status_file_found_s; + break; + + case F_file_found_not: + *string = f_status_file_found_not_s; + break; + + case F_file_not: + *string = f_status_file_not_s; + break; + + case F_file_open: + *string = f_status_file_open_s; + break; + + case F_file_open_max: + *string = f_status_file_open_max_s; + break; + + case F_file_opened: + *string = f_status_file_opened_s; + break; + + case F_file_overflow: + *string = f_status_file_overflow_s; + break; + + case F_file_purge: + *string = f_status_file_purge_s; + break; + + case F_file_read: + *string = f_status_file_read_s; + break; + + case F_file_reallocation: + *string = f_status_file_reallocation_s; + break; + + case F_file_seek: + *string = f_status_file_seek_s; + break; + + case F_file_stat: + *string = f_status_file_stat_s; + break; + + case F_file_synchronize: + *string = f_status_file_synchronize_s; + break; + + case F_file_type_block: + *string = f_status_file_type_block_s; + break; + + case F_file_type_character: + *string = f_status_file_type_character_s; + break; + + case F_file_type_directory: + *string = f_status_file_type_directory_s; + break; + + case F_file_type_fifo: + *string = f_status_file_type_fifo_s; + break; + + case F_file_type_link: + *string = f_status_file_type_link_s; + break; + + case F_file_type_not_character: + *string = f_status_file_type_not_character_s; + break; + + case F_file_type_not_directory: + *string = f_status_file_type_not_directory_s; + break; + + case F_file_type_not_fifo: + *string = f_status_file_type_not_fifo_s; + break; + + case F_file_type_not_link: + *string = f_status_file_type_not_link_s; + break; + + case F_file_type_not_pipe: + *string = f_status_file_type_not_pipe_s; + break; + + case F_file_type_not_regular: + *string = f_status_file_type_not_regular_s; + break; + + case F_file_type_not_socket: + *string = f_status_file_type_not_socket_s; + break; + + case F_file_type_not_unknown: + *string = f_status_file_type_not_unknown_s; + break; + + case F_file_type_pipe: + *string = f_status_file_type_pipe_s; + break; + + case F_file_type_regular: + *string = f_status_file_type_regular_s; + break; + + case F_file_type_socket: + *string = f_status_file_type_socket_s; + break; + + case F_file_type_unknown: + *string = f_status_file_type_unknown_s; + break; + + case F_file_underflow: + *string = f_status_file_underflow_s; + break; + + case F_file_utf: + *string = f_status_file_utf_s; + break; + + case F_file_utf_not: + *string = f_status_file_utf_not_s; + break; + + case F_file_write: + *string = f_status_file_write_s; + break; + #endif // _di_F_status_file_ + + #ifndef _di_F_status_filesystem_ + case F_filesystem: + *string = f_status_filesystem_s; + break; + + case F_filesystem_not: + *string = f_status_filesystem_not_s; + break; + + case F_filesystem_quota_block: + *string = f_status_filesystem_quota_block_s; + break; + + case F_filesystem_quota_reached: + *string = f_status_filesystem_quota_reached_s; + break; + #endif // _di_F_status_filesystem_ + + #ifndef _di_F_status_directory_ + case F_directory: + *string = f_status_directory_s; + break; + + case F_directory_close: + *string = f_status_directory_close_s; + break; + + case F_directory_closed: + *string = f_status_directory_closed_s; + break; + + case F_directory_descriptor: + *string = f_status_directory_descriptor_s; + break; + + case F_directory_empty: + *string = f_status_directory_empty_s; + break; + + case F_directory_empty_not: + *string = f_status_directory_empty_not_s; + break; + + case F_directory_found: + *string = f_status_directory_found_s; + break; + + case F_directory_found_not: + *string = f_status_directory_found_not_s; + break; + + case F_directory_flush: + *string = f_status_directory_flush_s; + break; + + case F_directory_link_max: + *string = f_status_directory_link_max_s; + break; + + case F_directory_not: + *string = f_status_directory_not_s; + break; + + case F_directory_open: + *string = f_status_directory_open_s; + break; + + case F_directory_purge: + *string = f_status_directory_purge_s; + break; + + case F_directory_read: + *string = f_status_directory_read_s; + break; + + case F_directory_stream: + *string = f_status_directory_stream_s; + break; + + case F_directory_synchronize: + *string = f_status_directory_synchronize_s; + break; + + case F_directory_supported_not: + *string = f_status_directory_supported_not_s; + break; + + case F_directory_utf: + *string = f_status_directory_utf_s; + break; + + case F_directory_utf_not: + *string = f_status_directory_utf_not_s; + break; + + case F_directory_write: + *string = f_status_directory_utf_not_s; + break; + #endif // _di_F_status_directory_ + + #ifndef _di_F_status_socket_ + case F_socket: + *string = f_status_socket_s; + break; + + case F_socket_client: + *string = f_status_socket_client_s; + break; + + case F_socket_not: + *string = f_status_socket_not_s; + break; + + case F_socket_receive: + *string = f_status_socket_receive_s; + break; + + case F_socket_send: + *string = f_status_socket_send_s; + break; + + case F_socket_target: + *string = f_status_socket_target_s; + break; + #endif // _di_F_status_socket_ + + #ifndef _di_F_error_compare_ + case F_equal_to: + *string = f_status_equal_to_s; + break; + + case F_equal_to_not: + *string = f_status_equal_to_not_s; + break; + + case F_than_greater: + *string = f_status_than_greater_s; + break; + + case F_than_less: + *string = f_status_than_less_s; + break; + #endif // _di_F_status_compare_ + + #ifndef _di_F_status_access_ + case F_access: + *string = f_status_access_s; + break; + + case F_access_denied: + *string = f_status_access_denied_s; + break; + + case F_access_denied_user: + *string = f_status_access_denied_user_s; + break; + + case F_access_denied_group: + *string = f_status_access_denied_group_s; + break; + + case F_access_denied_world: + *string = f_status_access_denied_world_s; + break; + + case F_access_denied_read: + *string = f_status_access_denied_read_s; + break; + + case F_access_denied_write: + *string = f_status_access_denied_write_s; + break; + + case F_access_denied_execute: + *string = f_status_access_denied_execute_s; + break; + + case F_access_denied_super: + *string = f_status_access_denied_super_s; + break; + + case F_access_granted: + *string = f_status_access_granted_s; + break; + + case F_access_granted_user: + *string = f_status_access_granted_user_s; + break; + + case F_access_granted_group: + *string = f_status_access_granted_group_s; + break; + + case F_access_granted_world: + *string = f_status_access_granted_world_s; + break; + + case F_access_granted_read: + *string = f_status_access_granted_read_s; + break; + + case F_access_granted_write: + *string = f_status_access_granted_write_s; + break; + + case F_access_granted_execute: + *string = f_status_access_granted_execute_s; + break; + + case F_access_granted_super: + *string = f_status_access_granted_super_s; + break; + + case F_access_group: + *string = f_status_access_group_s; + break; + + case F_access_mode: + *string = f_status_access_mode_s; + break; + + case F_access_not: + *string = f_status_access_not_s; + break; + + case F_access_owner: + *string = f_status_access_owner_s; + break; + #endif // _di_F_status_access_ + + #ifndef _di_F_status_terminal_ + case F_terminal: + *string = f_status_terminal_s; + break; + + case F_terminal_access: + *string = f_status_terminal_access_s; + break; + + case F_terminal_known: + *string = f_status_terminal_known_s; + break; + + case F_terminal_known_not: + *string = f_status_terminal_known_not_s; + break; + + case F_terminal_not: + *string = f_status_terminal_not_s; + break; + + case F_terminal_prohibited: + *string = f_status_terminal_prohibited_s; + break; + + case F_terminal_read: + *string = f_status_terminal_read_s; + break; + + case F_terminal_valid: + *string = f_status_terminal_valid_s; + break; + + case F_terminal_valid_not: + *string = f_status_terminal_valid_not_s; + break; + + case F_terminal_write: + *string = f_status_terminal_write_s; + break; + #endif // _di_F_status_terminal_ + + case F_status_code_last: + *string = f_status_status_code_last_s; + break; + + default: + *string = 0; + + return F_status_set_error(F_data); + } + + return F_none; + } +#endif // _di_f_status_string_to_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_status_string/c/status_string.h b/level_0/f_status_string/c/status_string.h new file mode 100644 index 0000000..d4eeaa1 --- /dev/null +++ b/level_0/f_status_string/c/status_string.h @@ -0,0 +1,1503 @@ +/** + * FLL - Level 0 + * + * Project: Status + * API Version: 0.5 + * Licenses: lgpl-2.1-or-later + * + * Provides status code functions, such as those that translate status codes into strings. + */ +#ifndef _F_status_string_h +#define _F_status_string_h + +// fll-0 includes +#include +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_F_status_string_ + #ifndef _di_F_status_boolean_ + #define F_status_false_s "F_false" + #define F_status_true_s "F_true" + + #define F_status_false_s_length 7 + #define F_status_true_s_length 6 + + extern const f_string_t f_status_false_s; + extern const f_string_t f_status_true_s; + #endif // _di_F_status_boolean_ + + #ifndef _di_F_status_signal_ + #define F_status_signal_hangup_s "F_signal_hangup" + #define F_status_signal_interrupt_s "F_signal_interrupt" + #define F_status_signal_quit_s "F_signal_quit" + #define F_status_signal_illegal_s "F_signal_illegal" + #define F_status_signal_trap_s "F_signal_trap" + #define F_status_signal_abort_s "F_signal_abort" + #define F_status_signal_bus_error_s "F_signal_bus_error" + #define F_status_signal_floating_point_error_s "F_signal_floating_point_error" + #define F_status_signal_kill_s "F_signal_kill" + #define F_status_signal_user_1_s "F_signal_user_1" + #define F_status_signal_segmentation_fault_s "F_signal_segmentation_fault" + #define F_status_signal_user_2_s "F_signal_user_2" + #define F_status_signal_broken_pipe_s "F_signal_broken_pipe" + #define F_status_signal_alarm_clock_s "F_signal_alarm_clock" + #define F_status_signal_termination_s "F_signal_termination" + #define F_status_signal_stack_fault_s "F_signal_stack_fault" + #define F_status_signal_child_s "F_signal_child" + #define F_status_signal_continue_s "F_signal_continue" + #define F_status_signal_stop_s "F_signal_stop" + #define F_status_signal_keyboard_stop_s "F_signal_keyboard_stop" + #define F_status_signal_tty_in_s "F_signal_tty_in" + #define F_status_signal_tty_out_s "F_signal_tty_out" + #define F_status_signal_urgent_s "F_signal_urgent" + #define F_status_signal_cpu_limit_s "F_signal_cpu_limit" + #define F_status_signal_file_size_limit_s "F_signal_file_size_limit" + #define F_status_signal_virtual_alarm_clock_s "F_signal_virtual_alarm_clock" + #define F_status_signal_profile_alarm_clock_s "F_signal_profile_alarm_clock" + #define F_status_signal_window_size_change_s "F_signal_window_size_change" + #define F_status_signal_pollable_event_s "F_signal_pollable_event" + #define F_status_signal_power_failure_s "F_signal_power_failure" + #define F_status_signal_bad_system_call_s "F_signal_bad_system_call" + #define F_status_signal_reserved_32_s "F_signal_reserved_32" + #define F_status_signal_reserved_33_s "F_signal_reserved_33" + #define F_status_signal_reserved_34_s "F_signal_reserved_34" + #define F_status_signal_reserved_35_s "F_signal_reserved_35" + #define F_status_signal_reserved_36_s "F_signal_reserved_36" + #define F_status_signal_reserved_37_s "F_signal_reserved_37" + #define F_status_signal_reserved_38_s "F_signal_reserved_38" + #define F_status_signal_reserved_39_s "F_signal_reserved_39" + #define F_status_signal_reserved_40_s "F_signal_reserved_40" + #define F_status_signal_reserved_41_s "F_signal_reserved_41" + #define F_status_signal_reserved_42_s "F_signal_reserved_42" + #define F_status_signal_reserved_43_s "F_signal_reserved_43" + #define F_status_signal_reserved_44_s "F_signal_reserved_44" + #define F_status_signal_reserved_45_s "F_signal_reserved_45" + #define F_status_signal_reserved_46_s "F_signal_reserved_46" + #define F_status_signal_reserved_47_s "F_signal_reserved_47" + #define F_status_signal_reserved_48_s "F_signal_reserved_48" + #define F_status_signal_reserved_49_s "F_signal_reserved_49" + #define F_status_signal_reserved_50_s "F_signal_reserved_50" + #define F_status_signal_reserved_51_s "F_signal_reserved_51" + #define F_status_signal_reserved_52_s "F_signal_reserved_52" + #define F_status_signal_reserved_53_s "F_signal_reserved_53" + #define F_status_signal_reserved_54_s "F_signal_reserved_54" + #define F_status_signal_reserved_55_s "F_signal_reserved_55" + #define F_status_signal_reserved_56_s "F_signal_reserved_56" + #define F_status_signal_reserved_57_s "F_signal_reserved_57" + #define F_status_signal_reserved_58_s "F_signal_reserved_58" + #define F_status_signal_reserved_59_s "F_signal_reserved_59" + #define F_status_signal_reserved_60_s "F_signal_reserved_60" + #define F_status_signal_reserved_61_s "F_signal_reserved_61" + #define F_status_signal_reserved_62_s "F_signal_reserved_62" + #define F_status_signal_reserved_63_s "F_signal_reserved_63" + #define F_status_signal_reserved_64_s "F_signal_reserved_64" + + #define F_status_signal_hangup_s_length 15 + #define F_status_signal_interrupt_s_length 18 + #define F_status_signal_quit_s_length 13 + #define F_status_signal_illegal_s_length 16 + #define F_status_signal_trap_s_length 13 + #define F_status_signal_abort_s_length 14 + #define F_status_signal_bus_error_s_length 17 + #define F_status_signal_floating_point_error_s_length 33 + #define F_status_signal_kill_s_length 13 + #define F_status_signal_user_1_s_length 15 + #define F_status_signal_segmentation_fault_s_length 27 + #define F_status_signal_user_2_s_length 15 + #define F_status_signal_broken_pipe_s_length 20 + #define F_status_signal_alarm_clock_s_length 20 + #define F_status_signal_termination_s_length 20 + #define F_status_signal_stack_fault_s_length 20 + #define F_status_signal_child_s_length 14 + #define F_status_signal_continue_s_length 17 + #define F_status_signal_stop_s_length 13 + #define F_status_signal_keyboard_stop_s_length 22 + #define F_status_signal_tty_in_s_length 15 + #define F_status_signal_tty_out_s_length 16 + #define F_status_signal_urgent_s_length 15 + #define F_status_signal_cpu_limit_s_length 18 + #define F_status_signal_file_size_limit_s_length 24 + #define F_status_signal_virtual_alarm_clock_s_length 28 + #define F_status_signal_profile_alarm_clock_s_length 28 + #define F_status_signal_window_size_change_s_length 27 + #define F_status_signal_pollable_event_s_length 23 + #define F_status_signal_power_failure_s_length 22 + #define F_status_signal_bad_system_call_s_length 24 + #define F_status_signal_reserved_32_s_length 20 + #define F_status_signal_reserved_33_s_length 20 + #define F_status_signal_reserved_34_s_length 20 + #define F_status_signal_reserved_35_s_length 20 + #define F_status_signal_reserved_36_s_length 20 + #define F_status_signal_reserved_37_s_length 20 + #define F_status_signal_reserved_38_s_length 20 + #define F_status_signal_reserved_39_s_length 20 + #define F_status_signal_reserved_40_s_length 20 + #define F_status_signal_reserved_41_s_length 20 + #define F_status_signal_reserved_42_s_length 20 + #define F_status_signal_reserved_43_s_length 20 + #define F_status_signal_reserved_44_s_length 20 + #define F_status_signal_reserved_45_s_length 20 + #define F_status_signal_reserved_46_s_length 20 + #define F_status_signal_reserved_47_s_length 20 + #define F_status_signal_reserved_48_s_length 20 + #define F_status_signal_reserved_49_s_length 20 + #define F_status_signal_reserved_50_s_length 20 + #define F_status_signal_reserved_51_s_length 20 + #define F_status_signal_reserved_52_s_length 20 + #define F_status_signal_reserved_53_s_length 20 + #define F_status_signal_reserved_54_s_length 20 + #define F_status_signal_reserved_55_s_length 20 + #define F_status_signal_reserved_56_s_length 20 + #define F_status_signal_reserved_57_s_length 20 + #define F_status_signal_reserved_58_s_length 20 + #define F_status_signal_reserved_59_s_length 20 + #define F_status_signal_reserved_60_s_length 20 + #define F_status_signal_reserved_61_s_length 20 + #define F_status_signal_reserved_62_s_length 20 + #define F_status_signal_reserved_63_s_length 20 + #define F_status_signal_reserved_64_s_length 20 + + extern const f_string_t f_status_signal_hangup_s; + extern const f_string_t f_status_signal_interrupt_s; + extern const f_string_t f_status_signal_quit_s; + extern const f_string_t f_status_signal_illegal_s; + extern const f_string_t f_status_signal_trap_s; + extern const f_string_t f_status_signal_abort_s; + extern const f_string_t f_status_signal_bus_error_s; + extern const f_string_t f_status_signal_floating_point_error_s; + extern const f_string_t f_status_signal_kill_s; + extern const f_string_t f_status_signal_user_1_s; + extern const f_string_t f_status_signal_segmentation_fault_s; + extern const f_string_t f_status_signal_user_2_s; + extern const f_string_t f_status_signal_broken_pipe_s; + extern const f_string_t f_status_signal_alarm_clock_s; + extern const f_string_t f_status_signal_termination_s; + extern const f_string_t f_status_signal_stack_fault_s; + extern const f_string_t f_status_signal_child_s; + extern const f_string_t f_status_signal_continue_s; + extern const f_string_t f_status_signal_stop_s; + extern const f_string_t f_status_signal_keyboard_stop_s; + extern const f_string_t f_status_signal_tty_in_s; + extern const f_string_t f_status_signal_tty_out_s; + extern const f_string_t f_status_signal_urgent_s; + extern const f_string_t f_status_signal_cpu_limit_s; + extern const f_string_t f_status_signal_file_size_limit_s; + extern const f_string_t f_status_signal_virtual_alarm_clock_s; + extern const f_string_t f_status_signal_profile_alarm_clock_s; + extern const f_string_t f_status_signal_window_size_change_s; + extern const f_string_t f_status_signal_pollable_event_s; + extern const f_string_t f_status_signal_power_failure_s; + extern const f_string_t f_status_signal_bad_system_call_s; + extern const f_string_t f_status_signal_reserved_32_s; + extern const f_string_t f_status_signal_reserved_33_s; + extern const f_string_t f_status_signal_reserved_34_s; + extern const f_string_t f_status_signal_reserved_35_s; + extern const f_string_t f_status_signal_reserved_36_s; + extern const f_string_t f_status_signal_reserved_37_s; + extern const f_string_t f_status_signal_reserved_38_s; + extern const f_string_t f_status_signal_reserved_39_s; + extern const f_string_t f_status_signal_reserved_40_s; + extern const f_string_t f_status_signal_reserved_41_s; + extern const f_string_t f_status_signal_reserved_42_s; + extern const f_string_t f_status_signal_reserved_43_s; + extern const f_string_t f_status_signal_reserved_44_s; + extern const f_string_t f_status_signal_reserved_45_s; + extern const f_string_t f_status_signal_reserved_46_s; + extern const f_string_t f_status_signal_reserved_47_s; + extern const f_string_t f_status_signal_reserved_48_s; + extern const f_string_t f_status_signal_reserved_49_s; + extern const f_string_t f_status_signal_reserved_50_s; + extern const f_string_t f_status_signal_reserved_51_s; + extern const f_string_t f_status_signal_reserved_52_s; + extern const f_string_t f_status_signal_reserved_53_s; + extern const f_string_t f_status_signal_reserved_54_s; + extern const f_string_t f_status_signal_reserved_55_s; + extern const f_string_t f_status_signal_reserved_56_s; + extern const f_string_t f_status_signal_reserved_57_s; + extern const f_string_t f_status_signal_reserved_58_s; + extern const f_string_t f_status_signal_reserved_59_s; + extern const f_string_t f_status_signal_reserved_60_s; + extern const f_string_t f_status_signal_reserved_61_s; + extern const f_string_t f_status_signal_reserved_62_s; + extern const f_string_t f_status_signal_reserved_63_s; + extern const f_string_t f_status_signal_reserved_64_s; + #endif // _di_F_status_signal_ + + #ifndef _di_F_status_basic_ + #define F_status_none_s "F_none" + #define F_status_absolute_s "F_absolute" + #define F_status_absolute_not_s "F_absolute_not" + #define F_status_address_s "F_address" + #define F_status_address_not_s "F_address_not" + #define F_status_ascii_s "F_ascii" + #define F_status_ascii_not_s "F_ascii_not" + #define F_status_block_s "F_block" + #define F_status_block_not_s "F_block_not" + #define F_status_bound_s "F_bound" + #define F_status_bound_not_s "F_bound_not" + #define F_status_capability_s "F_capability" + #define F_status_capability_not_s "F_capability_not" + #define F_status_child_s "F_child" + #define F_status_child_not_s "F_child_not" + #define F_status_complete_s "F_complete" + #define F_status_complete_not_s "F_complete_not" + #define F_status_connected_s "F_connected" + #define F_status_connected_not_s "F_connected_not" + #define F_status_container_s "F_container" + #define F_status_container_not_s "F_container_not" + #define F_status_control_s "F_control" + #define F_status_control_not_s "F_control_not" + #define F_status_control_group_s "F_control_group" + #define F_status_control_group_not_s "F_control_group_not" + #define F_status_critical_s "F_critical" + #define F_status_critical_not_s "F_critical_not" + #define F_status_dead_s "F_dead" + #define F_status_dead_not_s "F_dead_not" + #define F_status_deadlock_s "F_deadlock" + #define F_status_deadlock_not_s "F_deadlock_not" + #define F_status_descriptor_s "F_descriptor" + #define F_status_descriptor_not_s "F_descriptor_not" + #define F_status_device_s "F_device" + #define F_status_device_not_s "F_device_not" + #define F_status_disable_s "F_disable" + #define F_status_disable_not_s "F_disable_not" + #define F_status_done_s "F_done" + #define F_status_done_not_s "F_done_not" + #define F_status_dummy_s "F_dummy" + #define F_status_dummy_not_s "F_dummy_not" + #define F_status_empty_s "F_empty" + #define F_status_empty_not_s "F_empty_not" + #define F_status_enable_s "F_enable" + #define F_status_enable_not_s "F_enable_not" + #define F_status_encoding_s "F_encoding" + #define F_status_encoding_not_s "F_encoding_not" + #define F_status_eoa_s "F_eoa" + #define F_status_eoa_not_s "F_eoa_not" + #define F_status_eof_s "F_eof" + #define F_status_eof_not_s "F_eof_not" + #define F_status_eol_s "F_eol" + #define F_status_eol_not_s "F_eol_not" + #define F_status_eos_s "F_eos" + #define F_status_eos_not_s "F_eos_not" + #define F_status_execute_s "F_execute" + #define F_status_execute_not_s "F_execute_not" + #define F_status_exist_s "F_exist" + #define F_status_exist_not_s "F_exist_not" + #define F_status_failure_s "F_failure" + #define F_status_failure_not_s "F_failure_not" + #define F_status_first_s "F_first" + #define F_status_first_not_s "F_first_not" + #define F_status_fork_s "F_fork" + #define F_status_fork_not_s "F_fork_not" + #define F_status_format_s "F_format" + #define F_status_format_not_s "F_format_not" + #define F_status_found_s "F_found" + #define F_status_found_not_s "F_found_not" + #define F_status_full_s "F_full" + #define F_status_full_not_s "F_full_not" + #define F_status_group_s "F_group" + #define F_status_group_not_s "F_group_not" + #define F_status_ignore_s "F_ignore" + #define F_status_ignore_not_s "F_ignore_not" + #define F_status_implemented_s "F_implemented" + #define F_status_implemented_not_s "F_implemented_not" + #define F_status_input_s "F_input" + #define F_status_input_not_s "F_input_not" + #define F_status_input_output_s "F_input_output" + #define F_status_interrupt_s "F_interrupt" + #define F_status_interrupt_not_s "F_interrupt_not" + #define F_status_known_s "F_known" + #define F_status_known_not_s "F_known_not" + #define F_status_last_s "F_last" + #define F_status_last_not_s "F_last_not" + #define F_status_limit_s "F_limit" + #define F_status_limit_not_s "F_limit_not" + #define F_status_link_s "F_link" + #define F_status_link_not_s "F_link_not" + #define F_status_live_s "F_live" + #define F_status_live_not_s "F_live_not" + #define F_status_lock_s "F_lock" + #define F_status_lock_not_s "F_lock_not" + #define F_status_loop_s "F_loop" + #define F_status_loop_not_s "F_loop_not" + #define F_status_maybe_s "F_maybe" + #define F_status_maybe_not_s "F_maybe_not" + #define F_status_memory_s "F_memory" + #define F_status_memory_not_s "F_memory_not" + #define F_status_minor_s "F_minor" + #define F_status_minor_not_s "F_minor_not" + #define F_status_moderate_s "F_moderate" + #define F_status_moderate_not_s "F_moderate_not" + #define F_status_mount_s "F_mount" + #define F_status_mount_not_s "F_mount_not" + #define F_status_name_s "F_name" + #define F_status_name_not_s "F_name_not" + #define F_status_next_s "F_next" + #define F_status_next_not_s "F_next_not" + #define F_status_nice_s "F_nice" + #define F_status_nice_not_s "F_nice_not" + #define F_status_optional_s "F_optional" + #define F_status_optional_not_s "F_optional_not" + #define F_status_output_s "F_output" + #define F_status_output_not_s "F_output_not" + #define F_status_parameter_s "F_parameter" + #define F_status_parameter_not_s "F_parameter_not" + #define F_status_parent_s "F_parent" + #define F_status_parent_not_s "F_parent_not" + #define F_status_previous_s "F_previous" + #define F_status_previous_not_s "F_previous_not" + #define F_status_pipe_s "F_pipe" + #define F_status_pipe_not_s "F_pipe_not" + #define F_status_port_s "F_port" + #define F_status_port_not_s "F_port_not" + #define F_status_processor_s "F_processor" + #define F_status_processor_not_s "F_processor_not" + #define F_status_prohibited_s "F_prohibited" + #define F_status_prohibited_not_s "F_prohibited_not" + #define F_status_range_s "F_range" + #define F_status_range_not_s "F_range_not" + #define F_status_read_s "F_read" + #define F_status_read_not_s "F_read_not" + #define F_status_read_only_s "F_read_only" + #define F_status_ready_s "F_ready" + #define F_status_ready_not_s "F_ready_not" + #define F_status_recover_s "F_recover" + #define F_status_recover_not_s "F_recover_not" + #define F_status_recurse_s "F_recurse" + #define F_status_recurse_not_s "F_recurse_not" + #define F_status_relative_s "F_relative" + #define F_status_relative_not_s "F_relative_not" + #define F_status_require_s "F_require" + #define F_status_require_not_s "F_require_not" + #define F_status_resource_s "F_resource" + #define F_status_resource_not_s "F_resource_not" + #define F_status_search_s "F_search" + #define F_status_search_not_s "F_search_not" + #define F_status_schedule_s "F_schedule" + #define F_status_schedule_not_s "F_schedule_not" + #define F_status_signal_s "F_signal" + #define F_status_signal_not_s "F_signal_not" + #define F_status_space_s "F_space" + #define F_status_space_not_s "F_space_not" + #define F_status_stop_s "F_stop" + #define F_status_stop_not_s "F_stop_not" + #define F_status_string_s "F_string" + #define F_status_string_not_s "F_string_not" + #define F_status_string_too_large_s "F_string_too_large" + #define F_status_string_too_small_s "F_string_too_small" + #define F_status_syntax_s "F_syntax" + #define F_status_syntax_not_s "F_syntax_not" + #define F_status_thread_s "F_thread" + #define F_status_thread_not_s "F_thread_not" + #define F_status_time_s "F_time" + #define F_status_time_not_s "F_time_not" + #define F_status_too_large_s "F_too_large" + #define F_status_too_small_s "F_too_small" + #define F_status_success_s "F_success" + #define F_status_success_not_s "F_success_not" + #define F_status_supported_s "F_supported" + #define F_status_supported_not_s "F_supported_not" + #define F_status_user_s "F_user" + #define F_status_user_not_s "F_user_not" + #define F_status_utf_s "F_utf" + #define F_status_utf_fragment_s "F_utf_fragment" + #define F_status_utf_fragment_not_s "F_utf_fragment_not" + #define F_status_utf_not_s "F_utf_not" + #define F_status_valid_s "F_valid" + #define F_status_valid_not_s "F_valid_not" + #define F_status_value_s "F_value" + #define F_status_value_not_s "F_value_not" + #define F_status_wait_s "F_wait" + #define F_status_wait_not_s "F_wait_not" + #define F_status_warn_s "F_warn" + #define F_status_warn_not_s "F_warn_not" + #define F_status_world_s "F_world" + #define F_status_world_not_s "F_world_not" + #define F_status_write_s "F_write" + #define F_status_write_not_s "F_write_not" + #define F_status_write_only_s "F_write_only" + + #define F_status_none_s_length 6 + #define F_status_absolute_s_length 10 + #define F_status_absolute_not_s_length 14 + #define F_status_address_s_length 9 + #define F_status_address_not_s_length 13 + #define F_status_ascii_s_length 7 + #define F_status_ascii_not_s_length 11 + #define F_status_block_s_length 7 + #define F_status_block_not_s_length 11 + #define F_status_bound_s_length 7 + #define F_status_bound_not_s_length 11 + #define F_status_capability_s_length 12 + #define F_status_capability_not_s_length 16 + #define F_status_child_s_length 7 + #define F_status_child_not_s_length 11 + #define F_status_complete_s_length 10 + #define F_status_complete_not_s_length 14 + #define F_status_connected_s_length 11 + #define F_status_connected_not_s_length 15 + #define F_status_container_s_length 11 + #define F_status_container_not_s_length 15 + #define F_status_control_s_length 9 + #define F_status_control_not_s_length 13 + #define F_status_control_group_s_length 15 + #define F_status_control_group_not_s_length 19 + #define F_status_critical_s_length 10 + #define F_status_critical_not_s_length 14 + #define F_status_dead_s_length 6 + #define F_status_dead_not_s_length 10 + #define F_status_deadlock_s_length 10 + #define F_status_deadlock_not_s_length 14 + #define F_status_descriptor_s_length 12 + #define F_status_descriptor_not_s_length 16 + #define F_status_device_s_length 8 + #define F_status_device_not_s_length 12 + #define F_status_disable_s_length 9 + #define F_status_disable_not_s_length 13 + #define F_status_done_s_length 6 + #define F_status_done_not_s_length 10 + #define F_status_dummy_s_length 7 + #define F_status_dummy_not_s_length 11 + #define F_status_empty_s_length 7 + #define F_status_empty_not_s_length 11 + #define F_status_enable_s_length 8 + #define F_status_enable_not_s_length 12 + #define F_status_encoding_s_length 10 + #define F_status_encoding_not_s_length 14 + #define F_status_eoa_s_length 5 + #define F_status_eoa_not_s_length 9 + #define F_status_eof_s_length 5 + #define F_status_eof_not_s_length 9 + #define F_status_eol_s_length 5 + #define F_status_eol_not_s_length 9 + #define F_status_eos_s_length 5 + #define F_status_eos_not_s_length 9 + #define F_status_execute_s_length 9 + #define F_status_execute_not_s_length 13 + #define F_status_exist_s_length 7 + #define F_status_exist_not_s_length 11 + #define F_status_failure_s_length 9 + #define F_status_failure_not_s_length 13 + #define F_status_first_s_length 7 + #define F_status_first_not_s_length 11 + #define F_status_fork_s_length 6 + #define F_status_fork_not_s_length 10 + #define F_status_format_s_length 8 + #define F_status_format_not_s_length 12 + #define F_status_found_s_length 7 + #define F_status_found_not_s_length 11 + #define F_status_full_s_length 6 + #define F_status_full_not_s_length 10 + #define F_status_group_s_length 7 + #define F_status_group_not_s_length 11 + #define F_status_ignore_s_length 8 + #define F_status_ignore_not_s_length 12 + #define F_status_implemented_s_length 13 + #define F_status_implemented_not_s_length 17 + #define F_status_input_s_length 7 + #define F_status_input_not_s_length 11 + #define F_status_input_output_s_length 14 + #define F_status_interrupt_s_length 11 + #define F_status_interrupt_not_s_length 15 + #define F_status_known_s_length 7 + #define F_status_known_not_s_length 11 + #define F_status_last_s_length 6 + #define F_status_last_not_s_length 10 + #define F_status_limit_s_length 7 + #define F_status_limit_not_s_length 11 + #define F_status_link_s_length 6 + #define F_status_link_not_s_length 10 + #define F_status_live_s_length 6 + #define F_status_live_not_s_length 10 + #define F_status_lock_s_length 6 + #define F_status_lock_not_s_length 10 + #define F_status_loop_s_length 6 + #define F_status_loop_not_s_length 10 + #define F_status_maybe_s_length 7 + #define F_status_maybe_not_s_length 11 + #define F_status_memory_s_length 8 + #define F_status_memory_not_s_length 12 + #define F_status_minor_s_length 7 + #define F_status_minor_not_s_length 11 + #define F_status_moderate_s_length 10 + #define F_status_moderate_not_s_length 14 + #define F_status_mount_s_length 7 + #define F_status_mount_not_s_length 11 + #define F_status_name_s_length 6 + #define F_status_name_not_s_length 10 + #define F_status_next_s_length 6 + #define F_status_next_not_s_length 10 + #define F_status_nice_s_length 6 + #define F_status_nice_not_s_length 10 + #define F_status_optional_s_length 10 + #define F_status_optional_not_s_length 14 + #define F_status_output_s_length 8 + #define F_status_output_not_s_length 12 + #define F_status_parameter_s_length 11 + #define F_status_parameter_not_s_length 15 + #define F_status_parent_s_length 8 + #define F_status_parent_not_s_length 12 + #define F_status_pipe_s_length 6 + #define F_status_pipe_not_s_length 10 + #define F_status_port_s_length 6 + #define F_status_port_not_s_length 10 + #define F_status_previous_s_length 10 + #define F_status_previous_not_s_length 14 + #define F_status_processor_s_length 11 + #define F_status_processor_not_s_length 15 + #define F_status_prohibited_s_length 12 + #define F_status_prohibited_not_s_length 16 + #define F_status_range_s_length 7 + #define F_status_range_not_s_length 11 + #define F_status_read_s_length 6 + #define F_status_read_not_s_length 10 + #define F_status_read_only_s_length 11 + #define F_status_ready_s_length 7 + #define F_status_ready_not_s_length 11 + #define F_status_recover_s_length 9 + #define F_status_recover_not_s_length 13 + #define F_status_recurse_s_length 9 + #define F_status_recurse_not_s_length 13 + #define F_status_relative_s_length 10 + #define F_status_relative_not_s_length 14 + #define F_status_require_s_length 9 + #define F_status_require_not_s_length 13 + #define F_status_resource_s_length 10 + #define F_status_resource_not_s_length 14 + #define F_status_search_s_length 8 + #define F_status_search_not_s_length 12 + #define F_status_schedule_s_length 10 + #define F_status_schedule_not_s_length 14 + #define F_status_signal_s_length 8 + #define F_status_signal_not_s_length 12 + #define F_status_space_s_length 7 + #define F_status_space_not_s_length 11 + #define F_status_stop_s_length 6 + #define F_status_stop_not_s_length 10 + #define F_status_string_s_length 8 + #define F_status_string_not_s_length 12 + #define F_status_string_too_large_s_length 18 + #define F_status_string_too_small_s_length 18 + #define F_status_success_s_length 9 + #define F_status_success_not_s_length 13 + #define F_status_supported_s_length 11 + #define F_status_supported_not_s_length 15 + #define F_status_syntax_s_length 8 + #define F_status_syntax_not_s_length 12 + #define F_status_thread_s_length 8 + #define F_status_thread_not_s_length 12 + #define F_status_time_s_length 6 + #define F_status_time_not_s_length 10 + #define F_status_too_large_s_length 11 + #define F_status_too_small_s_length 11 + #define F_status_user_s_length 6 + #define F_status_user_not_s_length 10 + #define F_status_utf_s_length 5 + #define F_status_utf_fragment_s_length 14 + #define F_status_utf_fragment_not_s_length 18 + #define F_status_utf_not_s_length 9 + #define F_status_valid_s_length 7 + #define F_status_valid_not_s_length 11 + #define F_status_value_s_length 7 + #define F_status_value_not_s_length 11 + #define F_status_wait_s_length 6 + #define F_status_wait_not_s_length 10 + #define F_status_warn_s_length 6 + #define F_status_warn_not_s_length 10 + #define F_status_world_s_length 7 + #define F_status_world_not_s_length 11 + #define F_status_write_s_length 7 + #define F_status_write_not_s_length 11 + #define F_status_write_only_s_length 12 + + extern const f_string_t f_status_none_s; + extern const f_string_t f_status_absolute_s; + extern const f_string_t f_status_absolute_not_s; + extern const f_string_t f_status_address_s; + extern const f_string_t f_status_address_not_s; + extern const f_string_t f_status_ascii_s; + extern const f_string_t f_status_ascii_not_s; + extern const f_string_t f_status_block_s; + extern const f_string_t f_status_block_not_s; + extern const f_string_t f_status_bound_s; + extern const f_string_t f_status_bound_not_s; + extern const f_string_t f_status_capability_s; + extern const f_string_t f_status_capability_not_s; + extern const f_string_t f_status_child_s; + extern const f_string_t f_status_child_not_s; + extern const f_string_t f_status_complete_s; + extern const f_string_t f_status_complete_not_s; + extern const f_string_t f_status_connected_s; + extern const f_string_t f_status_connected_not_s; + extern const f_string_t f_status_container_s; + extern const f_string_t f_status_container_not_s; + extern const f_string_t f_status_control_s; + extern const f_string_t f_status_control_not_s; + extern const f_string_t f_status_control_group_s; + extern const f_string_t f_status_control_group_not_s; + extern const f_string_t f_status_critical_s; + extern const f_string_t f_status_critical_not_s; + extern const f_string_t f_status_dead_s; + extern const f_string_t f_status_dead_not_s; + extern const f_string_t f_status_deadlock_s; + extern const f_string_t f_status_deadlock_not_s; + extern const f_string_t f_status_descriptor_s; + extern const f_string_t f_status_descriptor_not_s; + extern const f_string_t f_status_device_s; + extern const f_string_t f_status_device_not_s; + extern const f_string_t f_status_disable_s; + extern const f_string_t f_status_disable_not_s; + extern const f_string_t f_status_done_s; + extern const f_string_t f_status_done_not_s; + extern const f_string_t f_status_dummy_s; + extern const f_string_t f_status_dummy_not_s; + extern const f_string_t f_status_empty_s; + extern const f_string_t f_status_empty_not_s; + extern const f_string_t f_status_enable_s; + extern const f_string_t f_status_enable_not_s; + extern const f_string_t f_status_encoding_s; + extern const f_string_t f_status_encoding_not_s; + extern const f_string_t f_status_eoa_s; + extern const f_string_t f_status_eoa_not_s; + extern const f_string_t f_status_eof_s; + extern const f_string_t f_status_eof_not_s; + extern const f_string_t f_status_eol_s; + extern const f_string_t f_status_eol_not_s; + extern const f_string_t f_status_eos_s; + extern const f_string_t f_status_eos_not_s; + extern const f_string_t f_status_execute_s; + extern const f_string_t f_status_execute_not_s; + extern const f_string_t f_status_exist_s; + extern const f_string_t f_status_exist_not_s; + extern const f_string_t f_status_failure_s; + extern const f_string_t f_status_failure_not_s; + extern const f_string_t f_status_first_s; + extern const f_string_t f_status_first_not_s; + extern const f_string_t f_status_fork_s; + extern const f_string_t f_status_fork_not_s; + extern const f_string_t f_status_format_s; + extern const f_string_t f_status_format_not_s; + extern const f_string_t f_status_found_s; + extern const f_string_t f_status_found_not_s; + extern const f_string_t f_status_full_s; + extern const f_string_t f_status_full_not_s; + extern const f_string_t f_status_group_s; + extern const f_string_t f_status_group_not_s; + extern const f_string_t f_status_ignore_s; + extern const f_string_t f_status_ignore_not_s; + extern const f_string_t f_status_implemented_s; + extern const f_string_t f_status_implemented_not_s; + extern const f_string_t f_status_input_s; + extern const f_string_t f_status_input_not_s; + extern const f_string_t f_status_input_output_s; + extern const f_string_t f_status_interrupt_s; + extern const f_string_t f_status_interrupt_not_s; + extern const f_string_t f_status_known_s; + extern const f_string_t f_status_known_not_s; + extern const f_string_t f_status_last_s; + extern const f_string_t f_status_last_not_s; + extern const f_string_t f_status_limit_s; + extern const f_string_t f_status_limit_not_s; + extern const f_string_t f_status_link_s; + extern const f_string_t f_status_link_not_s; + extern const f_string_t f_status_live_s; + extern const f_string_t f_status_live_not_s; + extern const f_string_t f_status_lock_s; + extern const f_string_t f_status_lock_not_s; + extern const f_string_t f_status_loop_s; + extern const f_string_t f_status_loop_not_s; + extern const f_string_t f_status_maybe_s; + extern const f_string_t f_status_maybe_not_s; + extern const f_string_t f_status_memory_s; + extern const f_string_t f_status_memory_not_s; + extern const f_string_t f_status_minor_s; + extern const f_string_t f_status_minor_not_s; + extern const f_string_t f_status_moderate_s; + extern const f_string_t f_status_moderate_not_s; + extern const f_string_t f_status_mount_s; + extern const f_string_t f_status_mount_not_s; + extern const f_string_t f_status_name_s; + extern const f_string_t f_status_name_not_s; + extern const f_string_t f_status_next_s; + extern const f_string_t f_status_next_not_s; + extern const f_string_t f_status_nice_s; + extern const f_string_t f_status_nice_not_s; + extern const f_string_t f_status_optional_s; + extern const f_string_t f_status_optional_not_s; + extern const f_string_t f_status_output_s; + extern const f_string_t f_status_output_not_s; + extern const f_string_t f_status_parameter_s; + extern const f_string_t f_status_parameter_not_s; + extern const f_string_t f_status_parent_s; + extern const f_string_t f_status_parent_not_s; + extern const f_string_t f_status_previous_s; + extern const f_string_t f_status_previous_not_s; + extern const f_string_t f_status_pipe_s; + extern const f_string_t f_status_pipe_not_s; + extern const f_string_t f_status_port_s; + extern const f_string_t f_status_port_not_s; + extern const f_string_t f_status_processor_s; + extern const f_string_t f_status_processor_not_s; + extern const f_string_t f_status_prohibited_s; + extern const f_string_t f_status_prohibited_not_s; + extern const f_string_t f_status_range_s; + extern const f_string_t f_status_range_not_s; + extern const f_string_t f_status_read_s; + extern const f_string_t f_status_read_not_s; + extern const f_string_t f_status_read_only_s; + extern const f_string_t f_status_ready_s; + extern const f_string_t f_status_ready_not_s; + extern const f_string_t f_status_recover_s; + extern const f_string_t f_status_recover_not_s; + extern const f_string_t f_status_recurse_s; + extern const f_string_t f_status_recurse_not_s; + extern const f_string_t f_status_relative_s; + extern const f_string_t f_status_relative_not_s; + extern const f_string_t f_status_require_s; + extern const f_string_t f_status_require_not_s; + extern const f_string_t f_status_resource_s; + extern const f_string_t f_status_resource_not_s; + extern const f_string_t f_status_search_s; + extern const f_string_t f_status_search_not_s; + extern const f_string_t f_status_schedule_s; + extern const f_string_t f_status_schedule_not_s; + extern const f_string_t f_status_signal_s; + extern const f_string_t f_status_signal_not_s; + extern const f_string_t f_status_space_s; + extern const f_string_t f_status_space_not_s; + extern const f_string_t f_status_stop_s; + extern const f_string_t f_status_stop_not_s; + extern const f_string_t f_status_string_s; + extern const f_string_t f_status_string_not_s; + extern const f_string_t f_status_string_too_large_s; + extern const f_string_t f_status_string_too_small_s; + extern const f_string_t f_status_syntax_s; + extern const f_string_t f_status_syntax_not_s; + extern const f_string_t f_status_thread_s; + extern const f_string_t f_status_thread_not_s; + extern const f_string_t f_status_time_s; + extern const f_string_t f_status_time_not_s; + extern const f_string_t f_status_too_large_s; + extern const f_string_t f_status_too_small_s; + extern const f_string_t f_status_success_s; + extern const f_string_t f_status_success_not_s; + extern const f_string_t f_status_supported_s; + extern const f_string_t f_status_supported_not_s; + extern const f_string_t f_status_user_s; + extern const f_string_t f_status_user_not_s; + extern const f_string_t f_status_utf_s; + extern const f_string_t f_status_utf_fragment_s; + extern const f_string_t f_status_utf_fragment_not_s; + extern const f_string_t f_status_utf_not_s; + extern const f_string_t f_status_valid_s; + extern const f_string_t f_status_valid_not_s; + extern const f_string_t f_status_value_s; + extern const f_string_t f_status_value_not_s; + extern const f_string_t f_status_wait_s; + extern const f_string_t f_status_wait_not_s; + extern const f_string_t f_status_warn_s; + extern const f_string_t f_status_warn_not_s; + extern const f_string_t f_status_world_s; + extern const f_string_t f_status_world_not_s; + extern const f_string_t f_status_write_s; + extern const f_string_t f_status_write_not_s; + extern const f_string_t f_status_write_only_s; + #endif // _di_F_status_basic_ + + #ifndef _di_F_status_array_ + #define F_status_array_s "F_array" + #define F_status_array_not_s "F_array_not" + #define F_status_array_too_large_s "F_array_too_large" + #define F_status_array_too_small_s "F_array_too_small" + + #define F_status_array_s_length 7 + #define F_status_array_not_s_length 11 + #define F_status_array_too_large_s_length 17 + #define F_status_array_too_small_s_length 17 + + extern const f_string_t f_status_array_s; + extern const f_string_t f_status_array_not_s; + extern const f_string_t f_status_array_too_large_s; + extern const f_string_t f_status_array_too_small_s; + #endif // _di_F_status_array_ + + #ifndef _di_F_status_available_ + #define F_status_available_s "F_available" + #define F_status_available_not_s "F_available_not" + #define F_status_available_not_address_s "F_available_not_address" + #define F_status_available_not_buffer_s "F_available_not_buffer" + #define F_status_available_not_device_s "F_available_not_device" + #define F_status_available_not_pipe_s "F_available_not_pipe" + #define F_status_available_not_port_s "F_available_not_port" + #define F_status_available_not_process_s "F_available_not_process" + #define F_status_available_not_socket_s "F_available_not_socket" + + #define F_status_available_s_length 11 + #define F_status_available_not_s_length 15 + #define F_status_available_not_address_s_length 23 + #define F_status_available_not_buffer_s_length 22 + #define F_status_available_not_device_s_length 22 + #define F_status_available_not_pipe_s_length 20 + #define F_status_available_not_port_s_length 20 + #define F_status_available_not_process_s_length 23 + #define F_status_available_not_socket_s_length 22 + + extern const f_string_t f_status_available_s; + extern const f_string_t f_status_available_not_s; + extern const f_string_t f_status_available_not_address_s; + extern const f_string_t f_status_available_not_buffer_s; + extern const f_string_t f_status_available_not_device_s; + extern const f_string_t f_status_available_not_pipe_s; + extern const f_string_t f_status_available_not_port_s; + extern const f_string_t f_status_available_not_process_s; + extern const f_string_t f_status_available_not_socket_s; + #endif // _di_F_status_available_ + + #ifndef _di_F_status_busy_ + #define F_status_busy_s "F_busy" + #define F_status_busy_address_s "F_busy_address" + #define F_status_busy_buffer_s "F_busy_buffer" + #define F_status_busy_device_s "F_busy_device" + #define F_status_busy_not_s "F_busy_not" + #define F_status_busy_pipe_s "F_busy_pipe" + #define F_status_busy_port_s "F_busy_port" + #define F_status_busy_process_s "F_busy_process" + #define F_status_busy_socket_s "F_busy_socket" + + #define F_status_busy_s_length 6 + #define F_status_busy_address_s_length 14 + #define F_status_busy_buffer_s_length 13 + #define F_status_busy_device_s_length 13 + #define F_status_busy_not_s_length 10 + #define F_status_busy_pipe_s_length 11 + #define F_status_busy_port_s_length 11 + #define F_status_busy_process_s_length 14 + #define F_status_busy_socket_s_length 13 + + extern const f_string_t f_status_busy_s; + extern const f_string_t f_status_busy_address_s; + extern const f_string_t f_status_busy_buffer_s; + extern const f_string_t f_status_busy_device_s; + extern const f_string_t f_status_busy_not_s; + extern const f_string_t f_status_busy_pipe_s; + extern const f_string_t f_status_busy_port_s; + extern const f_string_t f_status_busy_process_s; + extern const f_string_t f_status_busy_socket_s; + #endif // _di_F_status_busy_ + + #ifndef _di_F_status_number_ + #define F_status_number_s "F_number" + #define F_status_number_decimal_s "F_number_decimal" + #define F_status_number_decimal_not_s "F_number_decimal_not" + #define F_status_number_divide_by_zero_s "F_number_divide_by_zero" + #define F_status_number_negative_s "F_number_negative" + #define F_status_number_negative_not_s "F_number_negative_not" + #define F_status_number_not_s "F_number_not" + #define F_status_number_overflow_s "F_number_overflow" + #define F_status_number_positive_s "F_number_positive" + #define F_status_number_positive_not_s "F_number_positive_not" + #define F_status_number_too_large_s "F_number_too_large" + #define F_status_number_too_small_s "F_number_too_small" + #define F_status_number_underflow_s "F_number_underflow" + #define F_status_number_whole_s "F_number_whole" + #define F_status_number_whole_not_s "F_number_whole_not" + #define F_status_number_zero_s "F_number_zero" + #define F_status_number_zero_not_s "F_number_zero_not" + + #define F_status_number_s_length 8 + #define F_status_number_decimal_s_length 16 + #define F_status_number_decimal_not_s_length 20 + #define F_status_number_divide_by_zero_s_length 23 + #define F_status_number_negative_s_length 17 + #define F_status_number_negative_not_s_length 21 + #define F_status_number_not_s_length 12 + #define F_status_number_overflow_s_length 17 + #define F_status_number_positive_s_length 17 + #define F_status_number_positive_not_s_length 21 + #define F_status_number_too_large_s_length 18 + #define F_status_number_too_small_s_length 18 + #define F_status_number_underflow_s_length 18 + #define F_status_number_whole_s_length 14 + #define F_status_number_whole_not_s_length 18 + #define F_status_number_zero_s_length 13 + #define F_status_number_zero_not_s_length 17 + + extern const f_string_t f_status_number_s; + extern const f_string_t f_status_number_decimal_s; + extern const f_string_t f_status_number_decimal_not_s; + extern const f_string_t f_status_number_divide_by_zero_s; + extern const f_string_t f_status_number_negative_s; + extern const f_string_t f_status_number_negative_not_s; + extern const f_string_t f_status_number_not_s; + extern const f_string_t f_status_number_overflow_s; + extern const f_string_t f_status_number_positive_s; + extern const f_string_t f_status_number_positive_not_s; + extern const f_string_t f_status_number_too_large_s; + extern const f_string_t f_status_number_too_small_s; + extern const f_string_t f_status_number_underflow_s; + extern const f_string_t f_status_number_whole_s; + extern const f_string_t f_status_number_whole_not_s; + extern const f_string_t f_status_number_zero_s; + extern const f_string_t f_status_number_zero_not_s; + #endif // _di_F_status_number_ + + #ifndef _di_F_status_buffer_ + #define F_status_buffer_s "F_buffer" + #define F_status_buffer_not_s "F_buffer_not" + #define F_status_buffer_too_large_s "F_buffer_too_large" + #define F_status_buffer_too_small_s "F_buffer_too_small" + #define F_status_complete_not_utf_s "F_complete_not_utf" + #define F_status_complete_not_utf_block_s "F_complete_not_utf_block" + #define F_status_complete_not_utf_eoa_s "F_complete_not_utf_eoa" + #define F_status_complete_not_utf_eof_s "F_complete_not_utf_eof" + #define F_status_complete_not_utf_eol_s "F_complete_not_utf_eol" + #define F_status_complete_not_utf_eos_s "F_complete_not_utf_eos" + #define F_status_complete_not_utf_stop_s "F_complete_not_utf_stop" + #define F_status_none_block_s "F_none_block" + #define F_status_none_eoa_s "F_none_eoa" + #define F_status_none_eof_s "F_none_eof" + #define F_status_none_eol_s "F_none_eol" + #define F_status_none_eos_s "F_none_eos" + #define F_status_none_not_s "F_none_not" + #define F_status_none_stop_s "F_none_stop" + #define F_status_data_s "F_data" + #define F_status_data_not_s "F_data_not" + #define F_status_data_not_block_s "F_data_not_block" + #define F_status_data_not_eoa_s "F_data_not_eoa" + #define F_status_data_not_eof_s "F_data_not_eof" + #define F_status_data_not_eol_s "F_data_not_eol" + #define F_status_data_not_eos_s "F_data_not_eos" + #define F_status_data_not_stop_s "F_data_not_stop" + #define F_status_terminated_s "F_terminated" + #define F_status_terminated_not_s "F_terminated_not" + #define F_status_terminated_not_block_s "F_terminated_not_block" + #define F_status_terminated_not_eoa_s "F_terminated_not_eoa" + #define F_status_terminated_not_eof_s "F_terminated_not_eof" + #define F_status_terminated_not_eol_s "F_terminated_not_eol" + #define F_status_terminated_not_eos_s "F_terminated_not_eos" + #define F_status_terminated_not_stop_s "F_terminated_not_stop" + #define F_status_terminated_not_group_s "F_terminated_not_group" + #define F_status_terminated_not_group_block_s "F_terminated_not_group_block" + #define F_status_terminated_not_group_eoa_s "F_terminated_not_group_eoa" + #define F_status_terminated_not_group_eof_s "F_terminated_not_group_eof" + #define F_status_terminated_not_group_eol_s "F_terminated_not_group_eol" + #define F_status_terminated_not_group_eos_s "F_terminated_not_group_eos" + #define F_status_terminated_not_group_stop_s "F_terminated_not_group_stop" + #define F_status_terminated_not_nest_s "F_terminated_not_nest" + #define F_status_terminated_not_nest_block_s "F_terminated_not_nest_block" + #define F_status_terminated_not_nest_eoa_s "F_terminated_not_nest_eoa" + #define F_status_terminated_not_nest_eof_s "F_terminated_not_nest_eof" + #define F_status_terminated_not_nest_eol_s "F_terminated_not_nest_eol" + #define F_status_terminated_not_nest_eos_s "F_terminated_not_nest_eos" + #define F_status_terminated_not_nest_stop_s "F_terminated_not_nest_stop" + + #define F_status_buffer_s_length 8 + #define F_status_buffer_not_s_length 12 + #define F_status_buffer_too_large_s_length 18 + #define F_status_buffer_too_small_s_length 18 + #define F_status_complete_not_utf_s_length 18 + #define F_status_complete_not_utf_block_s_length 24 + #define F_status_complete_not_utf_eoa_s_length 22 + #define F_status_complete_not_utf_eof_s_length 22 + #define F_status_complete_not_utf_eol_s_length 22 + #define F_status_complete_not_utf_eos_s_length 22 + #define F_status_complete_not_utf_stop_s_length 23 + #define F_status_none_block_s_length 12 + #define F_status_none_eoa_s_length 10 + #define F_status_none_eof_s_length 10 + #define F_status_none_eol_s_length 10 + #define F_status_none_eos_s_length 10 + #define F_status_none_stop_s_length 11 + #define F_status_data_s_length 6 + #define F_status_data_not_s_length 10 + #define F_status_data_not_block_s_length 16 + #define F_status_data_not_eoa_s_length 14 + #define F_status_data_not_eof_s_length 14 + #define F_status_data_not_eol_s_length 14 + #define F_status_data_not_eos_s_length 14 + #define F_status_data_not_stop_s_length 15 + #define F_status_terminated_s_length 12 + #define F_status_terminated_not_s_length 16 + #define F_status_terminated_not_block_s_length 22 + #define F_status_terminated_not_eoa_s_length 20 + #define F_status_terminated_not_eof_s_length 20 + #define F_status_terminated_not_eol_s_length 20 + #define F_status_terminated_not_eos_s_length 20 + #define F_status_terminated_not_stop_s_length 21 + #define F_status_terminated_not_group_s_length 22 + #define F_status_terminated_not_group_block_s_length 28 + #define F_status_terminated_not_group_eoa_s_length 25 + #define F_status_terminated_not_group_eof_s_length 25 + #define F_status_terminated_not_group_eol_s_length 25 + #define F_status_terminated_not_group_eos_s_length 25 + #define F_status_terminated_not_group_stop_s_length 26 + #define F_status_terminated_not_nest_s_length 21 + #define F_status_terminated_not_nest_block_s_length 26 + #define F_status_terminated_not_nest_eoa_s_length 25 + #define F_status_terminated_not_nest_eof_s_length 25 + #define F_status_terminated_not_nest_eol_s_length 25 + #define F_status_terminated_not_nest_eos_s_length 25 + #define F_status_terminated_not_nest_stop_s_length 26 + + extern const f_string_t f_status_buffer_s; + extern const f_string_t f_status_buffer_not_s; + extern const f_string_t f_status_buffer_too_large_s; + extern const f_string_t f_status_buffer_too_small_s; + extern const f_string_t f_status_complete_not_utf_s; + extern const f_string_t f_status_complete_not_utf_block_s; + extern const f_string_t f_status_complete_not_utf_eoa_s; + extern const f_string_t f_status_complete_not_utf_eof_s; + extern const f_string_t f_status_complete_not_utf_eol_s; + extern const f_string_t f_status_complete_not_utf_eos_s; + extern const f_string_t f_status_complete_not_utf_stop_s; + extern const f_string_t f_status_none_block_s; + extern const f_string_t f_status_none_eoa_s; + extern const f_string_t f_status_none_eof_s; + extern const f_string_t f_status_none_eol_s; + extern const f_string_t f_status_none_eos_s; + extern const f_string_t f_status_none_not_s; + extern const f_string_t f_status_none_stop_s; + extern const f_string_t f_status_data_s; + extern const f_string_t f_status_data_not_s; + extern const f_string_t f_status_data_not_block_s; + extern const f_string_t f_status_data_not_eoa_s; + extern const f_string_t f_status_data_not_eof_s; + extern const f_string_t f_status_data_not_eol_s; + extern const f_string_t f_status_data_not_eos_s; + extern const f_string_t f_status_data_not_stop_s; + extern const f_string_t f_status_terminated_s; + extern const f_string_t f_status_terminated_not_s; + extern const f_string_t f_status_terminated_not_block_s; + extern const f_string_t f_status_terminated_not_eoa_s; + extern const f_string_t f_status_terminated_not_eof_s; + extern const f_string_t f_status_terminated_not_eol_s; + extern const f_string_t f_status_terminated_not_eos_s; + extern const f_string_t f_status_terminated_not_stop_s; + extern const f_string_t f_status_terminated_not_group_s; + extern const f_string_t f_status_terminated_not_group_block_s; + extern const f_string_t f_status_terminated_not_group_eoa_s; + extern const f_string_t f_status_terminated_not_group_eof_s; + extern const f_string_t f_status_terminated_not_group_eol_s; + extern const f_string_t f_status_terminated_not_group_eos_s; + extern const f_string_t f_status_terminated_not_group_stop_s; + extern const f_string_t f_status_terminated_not_nest_s; + extern const f_string_t f_status_terminated_not_nest_block_s; + extern const f_string_t f_status_terminated_not_nest_eoa_s; + extern const f_string_t f_status_terminated_not_nest_eof_s; + extern const f_string_t f_status_terminated_not_nest_eol_s; + extern const f_string_t f_status_terminated_not_nest_eos_s; + extern const f_string_t f_status_terminated_not_nest_stop_s; + #endif // _di_F_status_buffer_ + + #ifndef _di_F_status_process_ + #define F_status_process_s "F_process" + #define F_status_process_not_s "F_process_not" + #define F_status_process_too_many_s "F_process_too_many" + + #define F_status_process_s_length 9 + #define F_status_process_not_s_length 13 + #define F_status_process_too_many_s_length 18 + + extern const f_string_t f_status_process_s; + extern const f_string_t f_status_process_not_s; + extern const f_string_t f_status_process_too_many_s; + #endif // _di_F_status_process_ + + #ifndef _di_F_status_file_ + #define F_status_file_s "F_file" + #define F_status_file_close_s "F_file_close" + #define F_status_file_closed_s "F_file_closed" + #define F_status_file_descriptor_s "F_file_descriptor" + #define F_status_file_descriptor_max_s "F_file_descriptor_max" + #define F_status_file_descriptor_not_s "F_file_descriptor_not" + #define F_status_file_empty_s "F_file_empty" + #define F_status_file_flush_s "F_file_flush" + #define F_status_file_found_s "F_file_found" + #define F_status_file_found_not_s "F_file_found_not" + #define F_status_file_not_s "F_file_not" + #define F_status_file_open_s "F_file_open" + #define F_status_file_open_max_s "F_file_open_max" + #define F_status_file_opened_s "F_file_opened" + #define F_status_file_overflow_s "F_file_overflow" + #define F_status_file_purge_s "F_file_purge" + #define F_status_file_read_s "F_file_read" + #define F_status_file_reallocation_s "F_file_reallocation" + #define F_status_file_seek_s "F_file_seek" + #define F_status_file_stat_s "F_file_stat" + #define F_status_file_synchronize_s "F_file_synchronize" + #define F_status_file_type_block_s "F_file_type_block" + #define F_status_file_type_character_s "F_file_type_character" + #define F_status_file_type_directory_s "F_file_type_directory" + #define F_status_file_type_fifo_s "F_file_type_fifo" + #define F_status_file_type_link_s "F_file_type_link" + #define F_status_file_type_not_block_s "F_file_type_not_block" + #define F_status_file_type_not_character_s "F_file_type_not_character" + #define F_status_file_type_not_directory_s "F_file_type_not_directory" + #define F_status_file_type_not_fifo_s "F_file_type_not_fifo" + #define F_status_file_type_not_link_s "F_file_type_not_link" + #define F_status_file_type_not_pipe_s "F_file_type_not_pipe" + #define F_status_file_type_not_regular_s "F_file_type_not_regular" + #define F_status_file_type_not_socket_s "F_file_type_not_socket" + #define F_status_file_type_not_unknown_s "F_file_type_not_unknown" + #define F_status_file_type_pipe_s "F_file_type_pipe" + #define F_status_file_type_regular_s "F_file_type_regular" + #define F_status_file_type_socket_s "F_file_type_socket" + #define F_status_file_type_unknown_s "F_file_type_unknown" + #define F_status_file_underflow_s "F_file_underflow" + #define F_status_file_utf_s "F_file_utf" + #define F_status_file_utf_not_s "F_file_utf_not" + #define F_status_file_write_s "F_file_write" + + #define F_status_file_s_length 6 + #define F_status_file_close_s_length 12 + #define F_status_file_closed_s_length 13 + #define F_status_file_descriptor_s_length 17 + #define F_status_file_descriptor_max_s_length 21 + #define F_status_file_descriptor_not_s_length 21 + #define F_status_file_empty_s_length 12 + #define F_status_file_flush_s_length 12 + #define F_status_file_found_s_length 12 + #define F_status_file_found_not_s_length 16 + #define F_status_file_not_s_length 10 + #define F_status_file_open_s_length 11 + #define F_status_file_open_max_s_length 15 + #define F_status_file_opened_s_length 13 + #define F_status_file_overflow_s_length 15 + #define F_status_file_purge_s_length 12 + #define F_status_file_read_s_length 11 + #define F_status_file_reallocation_s_length 19 + #define F_status_file_seek_s_length 11 + #define F_status_file_stat_s_length 11 + #define F_status_file_synchronize_s_length 18 + #define F_status_file_type_block_s_length 17 + #define F_status_file_type_character_s_length 21 + #define F_status_file_type_directory_s_length 21 + #define F_status_file_type_fifo_s_length 16 + #define F_status_file_type_link_s_length 16 + #define F_status_file_type_not_block_s_length 21 + #define F_status_file_type_not_character_s_length 25 + #define F_status_file_type_not_directory_s_length 25 + #define F_status_file_type_not_fifo_s_length 20 + #define F_status_file_type_not_link_s_length 20 + #define F_status_file_type_not_pipe_s_length 20 + #define F_status_file_type_not_regular_s_length 23 + #define F_status_file_type_not_socket_s_length 22 + #define F_status_file_type_not_unknown_s_length 23 + #define F_status_file_type_pipe_s_length 16 + #define F_status_file_type_regular_s_length 19 + #define F_status_file_type_socket_s_length 18 + #define F_status_file_type_unknown_s_length 19 + #define F_status_file_underflow_s_length 16 + #define F_status_file_utf_s_length 10 + #define F_status_file_utf_not_s_length 14 + #define F_status_file_write_s_length 12 + + extern const f_string_t f_status_file_s; + extern const f_string_t f_status_file_close_s; + extern const f_string_t f_status_file_closed_s; + extern const f_string_t f_status_file_descriptor_s; + extern const f_string_t f_status_file_descriptor_max_s; + extern const f_string_t f_status_file_descriptor_not_s; + extern const f_string_t f_status_file_empty_s; + extern const f_string_t f_status_file_flush_s; + extern const f_string_t f_status_file_found_s; + extern const f_string_t f_status_file_found_not_s; + extern const f_string_t f_status_file_not_s; + extern const f_string_t f_status_file_open_s; + extern const f_string_t f_status_file_open_max_s; + extern const f_string_t f_status_file_opened_s; + extern const f_string_t f_status_file_overflow_s; + extern const f_string_t f_status_file_purge_s; + extern const f_string_t f_status_file_read_s; + extern const f_string_t f_status_file_reallocation_s; + extern const f_string_t f_status_file_seek_s; + extern const f_string_t f_status_file_stat_s; + extern const f_string_t f_status_file_synchronize_s; + extern const f_string_t f_status_file_type_block_s; + extern const f_string_t f_status_file_type_character_s; + extern const f_string_t f_status_file_type_directory_s; + extern const f_string_t f_status_file_type_fifo_s; + extern const f_string_t f_status_file_type_link_s; + extern const f_string_t f_status_file_type_not_block_s; + extern const f_string_t f_status_file_type_not_character_s; + extern const f_string_t f_status_file_type_not_directory_s; + extern const f_string_t f_status_file_type_not_fifo_s; + extern const f_string_t f_status_file_type_not_link_s; + extern const f_string_t f_status_file_type_not_pipe_s; + extern const f_string_t f_status_file_type_not_regular_s; + extern const f_string_t f_status_file_type_not_socket_s; + extern const f_string_t f_status_file_type_not_unknown_s; + extern const f_string_t f_status_file_type_pipe_s; + extern const f_string_t f_status_file_type_regular_s; + extern const f_string_t f_status_file_type_socket_s; + extern const f_string_t f_status_file_type_unknown_s; + extern const f_string_t f_status_file_underflow_s; + extern const f_string_t f_status_file_utf_s; + extern const f_string_t f_status_file_utf_not_s; + extern const f_string_t f_status_file_write_s; + #endif // _di_F_status_file_ + + #ifndef _di_F_status_filesystem_ + #define F_status_filesystem_s "F_filesystem" + #define F_status_filesystem_not_s "F_filesystem_not" + #define F_status_filesystem_quota_block_s "F_filesystem_quota_block" + #define F_status_filesystem_quota_reached_s "F_filesystem_quota_reached" + + #define F_status_filesystem_s_length 12 + #define F_status_filesystem_not_s_length 16 + #define F_status_filesystem_quota_block_s_length 24 + #define F_status_filesystem_quota_reached_s_length 26 + + extern const f_string_t f_status_filesystem_s; + extern const f_string_t f_status_filesystem_not_s; + extern const f_string_t f_status_filesystem_quota_block_s; + extern const f_string_t f_status_filesystem_quota_reached_s; + #endif // _di_F_status_filesystem_ + + #ifndef _di_F_status_directory_ + #define F_status_directory_s "F_directory" + #define F_status_directory_close_s "F_directory_close" + #define F_status_directory_closed_s "F_directory_closed" + #define F_status_directory_descriptor_s "F_directory_descriptor" + #define F_status_directory_empty_s "F_directory_empty" + #define F_status_directory_empty_not_s "F_directory_empty_not" + #define F_status_directory_found_s "F_directory_found" + #define F_status_directory_found_not_s "F_directory_found_not" + #define F_status_directory_flush_s "F_directory_flush" + #define F_status_directory_link_max_s "F_directory_link_max" + #define F_status_directory_not_s "F_directory_not" + #define F_status_directory_open_s "F_directory_open" + #define F_status_directory_purge_s "F_directory_purge" + #define F_status_directory_read_s "F_directory_read" + #define F_status_directory_stream_s "F_directory_stream" + #define F_status_directory_supported_not_s "F_directory_supported_not" + #define F_status_directory_synchronize_s "F_directory_synchronize" + #define F_status_directory_utf_s "F_directory_utf" + #define F_status_directory_utf_not_s "F_directory_utf_not" + #define F_status_directory_write_s "F_directory_write" + + #define F_status_directory_s_length 11 + #define F_status_directory_close_s_length 17 + #define F_status_directory_closed_s_length 18 + #define F_status_directory_descriptor_s_length 22 + #define F_status_directory_empty_s_length 17 + #define F_status_directory_empty_not_s_length 21 + #define F_status_directory_found_s_length 17 + #define F_status_directory_found_not_s_length 21 + #define F_status_directory_flush_s_length 17 + #define F_status_directory_link_max_s_length 20 + #define F_status_directory_not_s_length 15 + #define F_status_directory_open_s_length 16 + #define F_status_directory_purge_s_length 17 + #define F_status_directory_read_s_length 16 + #define F_status_directory_stream_s_length 18 + #define F_status_directory_supported_not_s_length 25 + #define F_status_directory_synchronize_s_length 23 + #define F_status_directory_utf_s_length 15 + #define F_status_directory_utf_not_s_length 19 + #define F_status_directory_write_s_length 17 + + extern const f_string_t f_status_directory_s; + extern const f_string_t f_status_directory_close_s; + extern const f_string_t f_status_directory_closed_s; + extern const f_string_t f_status_directory_descriptor_s; + extern const f_string_t f_status_directory_empty_s; + extern const f_string_t f_status_directory_empty_not_s; + extern const f_string_t f_status_directory_found_s; + extern const f_string_t f_status_directory_found_not_s; + extern const f_string_t f_status_directory_flush_s; + extern const f_string_t f_status_directory_link_max_s; + extern const f_string_t f_status_directory_not_s; + extern const f_string_t f_status_directory_open_s; + extern const f_string_t f_status_directory_purge_s; + extern const f_string_t f_status_directory_read_s; + extern const f_string_t f_status_directory_stream_s; + extern const f_string_t f_status_directory_supported_not_s; + extern const f_string_t f_status_directory_synchronize_s; + extern const f_string_t f_status_directory_utf_s; + extern const f_string_t f_status_directory_utf_not_s; + extern const f_string_t f_status_directory_write_s; + #endif // _di_F_status_directory_ + + #ifndef _di_F_status_socket_ + #define F_status_socket_s "F_socket" + #define F_status_socket_client_s "F_socket_client" + #define F_status_socket_not_s "F_socket_not" + #define F_status_socket_receive_s "F_socket_receive" + #define F_status_socket_send_s "F_socket_send" + #define F_status_socket_target_s "F_socket_target" + + #define F_status_socket_s_length 8 + #define F_status_socket_client_s_length 15 + #define F_status_socket_not_s_length 12 + #define F_status_socket_receive_s_length 16 + #define F_status_socket_send_s_length 13 + #define F_status_socket_target_s_length 15 + + extern const f_string_t f_status_socket_s; + extern const f_string_t f_status_socket_client_s; + extern const f_string_t f_status_socket_not_s; + extern const f_string_t f_status_socket_receive_s; + extern const f_string_t f_status_socket_send_s; + extern const f_string_t f_status_socket_target_s; + #endif // _di_F_status_socket_ + + #ifndef _di_F_status_compare_ + #define F_status_equal_to_s "F_equal_to" + #define F_status_equal_to_not_s "F_equal_to_not" + #define F_status_than_greater_s "F_than_greater" + #define F_status_than_less_s "F_than_less" + + #define F_status_equal_to_s_length 10 + #define F_status_equal_to_not_s_length 14 + #define F_status_than_greater_s_length 14 + #define F_status_than_less_s_length 11 + + extern const f_string_t f_status_equal_to_s; + extern const f_string_t f_status_equal_to_not_s; + extern const f_string_t f_status_than_greater_s; + extern const f_string_t f_status_than_less_s; + #endif // _di_F_status_compare_ + + #ifndef _di_F_status_access_ + #define F_status_access_s "F_access" + #define F_status_access_denied_s "F_access_denied" + #define F_status_access_denied_user_s "F_access_denied_user" + #define F_status_access_denied_group_s "F_access_denied_group" + #define F_status_access_denied_world_s "F_access_denied_world" + #define F_status_access_denied_read_s "F_access_denied_read" + #define F_status_access_denied_write_s "F_access_denied_write" + #define F_status_access_denied_execute_s "F_access_denied_execute" + #define F_status_access_denied_super_s "F_access_denied_super" + #define F_status_access_granted_s "F_access_granted" + #define F_status_access_granted_user_s "F_access_granted_user" + #define F_status_access_granted_group_s "F_access_granted_group" + #define F_status_access_granted_world_s "F_access_granted_world" + #define F_status_access_granted_read_s "F_access_granted_read" + #define F_status_access_granted_write_s "F_access_granted_write" + #define F_status_access_granted_execute_s "F_access_granted_execute" + #define F_status_access_granted_super_s "F_access_granted_super" + #define F_status_access_group_s "F_access_group" + #define F_status_access_mode_s "F_access_mode" + #define F_status_access_not_s "F_access_not" + #define F_status_access_owner_s "F_access_owner" + + #define F_status_access_s_length 8 + #define F_status_access_denied_s_length 15 + #define F_status_access_denied_user_s_length 20 + #define F_status_access_denied_group_s_length 21 + #define F_status_access_denied_world_s_length 21 + #define F_status_access_denied_read_s_length 20 + #define F_status_access_denied_write_s_length 21 + #define F_status_access_denied_execute_s_length 23 + #define F_status_access_denied_super_s_length 21 + #define F_status_access_granted_s_length 16 + #define F_status_access_granted_user_s_length 21 + #define F_status_access_granted_group_s_length 22 + #define F_status_access_granted_world_s_length 22 + #define F_status_access_granted_read_s_length 21 + #define F_status_access_granted_write_s_length 22 + #define F_status_access_granted_execute_s_length 24 + #define F_status_access_granted_super_s_length 22 + #define F_status_access_group_s_length 14 + #define F_status_access_mode_s_length 13 + #define F_status_access_not_s_length 12 + #define F_status_access_owner_s_length 14 + + extern const f_string_t f_status_access_s; + extern const f_string_t f_status_access_denied_s; + extern const f_string_t f_status_access_denied_user_s; + extern const f_string_t f_status_access_denied_group_s; + extern const f_string_t f_status_access_denied_world_s; + extern const f_string_t f_status_access_denied_read_s; + extern const f_string_t f_status_access_denied_write_s; + extern const f_string_t f_status_access_denied_execute_s; + extern const f_string_t f_status_access_denied_super_s; + extern const f_string_t f_status_access_granted_s; + extern const f_string_t f_status_access_granted_user_s; + extern const f_string_t f_status_access_granted_group_s; + extern const f_string_t f_status_access_granted_world_s; + extern const f_string_t f_status_access_granted_read_s; + extern const f_string_t f_status_access_granted_write_s; + extern const f_string_t f_status_access_granted_execute_s; + extern const f_string_t f_status_access_granted_super_s; + extern const f_string_t f_status_access_group_s; + extern const f_string_t f_status_access_mode_s; + extern const f_string_t f_status_access_not_s; + extern const f_string_t f_status_access_owner_s; + #endif // _di_F_status_access_ + + #ifndef _di_F_status_terminal_ + #define F_status_terminal_s "F_terminal" + #define F_status_terminal_access_s "F_terminal_access" + #define F_status_terminal_known_s "F_terminal_known" + #define F_status_terminal_known_not_s "F_terminal_known_not" + #define F_status_terminal_not_s "F_terminal_not" + #define F_status_terminal_prohibited_s "F_terminal_prohibited" + #define F_status_terminal_read_s "F_terminal_read" + #define F_status_terminal_valid_s "F_terminal_valid" + #define F_status_terminal_valid_not_s "F_terminal_valid_not" + #define F_status_terminal_write_s "F_terminal_write" + + #define F_status_terminal_s_length 10 + #define F_status_terminal_access_s_length 17 + #define F_status_terminal_known_s_length 16 + #define F_status_terminal_known_not_s_length 20 + #define F_status_terminal_not_s_length 14 + #define F_status_terminal_prohibited_s_length 21 + #define F_status_terminal_read_s_length 15 + #define F_status_terminal_valid_s_length 16 + #define F_status_terminal_valid_not_s_length 20 + #define F_status_terminal_write_s_length 16 + + extern const f_string_t f_status_terminal_s; + extern const f_string_t f_status_terminal_access_s; + extern const f_string_t f_status_terminal_known_s; + extern const f_string_t f_status_terminal_known_not_s; + extern const f_string_t f_status_terminal_not_s; + extern const f_string_t f_status_terminal_prohibited_s; + extern const f_string_t f_status_terminal_read_s; + extern const f_string_t f_status_terminal_valid_s; + extern const f_string_t f_status_terminal_valid_not_s; + extern const f_string_t f_status_terminal_write_s; + #endif // _di_F_status_terminal_ + + #define F_status_status_code_last_s "F_status_code_last" + + extern const f_string_t f_status_status_code_last_s; + + #define F_status_status_code_last_s_length 18 +#endif // _di_F_status_string_ + +/** + * Convert status codes to their string representation. + * + * The error, warning, and signal bits are ignored. + * + * @param code + * The status code to process. + * @param string + * The processed code code. + * + * @return + * F_none on success. + * + * F_data (with error bit) if there status is unknown. + * F_parameter (with error bit) if a parameter is invalid. + */ +#ifndef _di_f_status_string_to_ + extern f_status_t f_status_string_to(const f_status_t code, f_string_t *string); +#endif // _di_f_status_string_to_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _F_status_string_h diff --git a/level_1/fl_status/data/build/defines b/level_0/f_status_string/data/build/defines similarity index 100% rename from level_1/fl_status/data/build/defines rename to level_0/f_status_string/data/build/defines diff --git a/level_1/fl_status/data/build/dependencies b/level_0/f_status_string/data/build/dependencies similarity index 100% rename from level_1/fl_status/data/build/dependencies rename to level_0/f_status_string/data/build/dependencies diff --git a/level_1/fl_status/data/build/settings b/level_0/f_status_string/data/build/settings similarity index 91% rename from level_1/fl_status/data/build/settings rename to level_0/f_status_string/data/build/settings index 5270821..33b1605 100644 --- a/level_1/fl_status/data/build/settings +++ b/level_0/f_status_string/data/build/settings @@ -1,6 +1,6 @@ # fss-0001 -project_name fl_status +project_name f_status_string version_major 0 version_minor 5 @@ -24,13 +24,13 @@ build_libraries -lc build_libraries-individual -lf_memory -lf_string -lf_utf build_libraries_shared build_libraries_static -build_sources_library status.c +build_sources_library status_string.c build_sources_library_shared build_sources_library_static build_sources_program build_sources_program_shared build_sources_program_static -build_sources_headers status.h +build_sources_headers status_string.h build_sources_headers_shared build_sources_headers_static build_sources_script @@ -39,7 +39,7 @@ build_script yes build_shared yes build_static no -path_headers fll/level_1 +path_headers fll/level_0 path_headers_preserve no path_library_script script path_library_shared shared diff --git a/level_1/fl_fss/c/fss.h b/level_1/fl_fss/c/fss.h index f6a0351..be241b7 100644 --- a/level_1/fl_fss/c/fss.h +++ b/level_1/fl_fss/c/fss.h @@ -21,9 +21,6 @@ #include #include -// fll-1 includes -#include - #ifdef __cplusplus extern "C" { #endif diff --git a/level_1/fl_fss/c/fss_basic.c b/level_1/fl_fss/c/fss_basic.c index 18b4bc9..8135cbb 100644 --- a/level_1/fl_fss/c/fss_basic.c +++ b/level_1/fl_fss/c/fss_basic.c @@ -42,7 +42,7 @@ extern "C" { if (status == F_none_eol) { ++range->start; - return FL_fss_found_content_not; + return F_fss_found_content_not; } if (status == F_none_eos) { @@ -88,7 +88,7 @@ extern "C" { status = f_utf_buffer_increment(buffer, range, 1); if (F_status_is_error(status)) return status; - return FL_fss_found_content; + return F_fss_found_content; } #endif // _di_fl_fss_basic_content_read_ @@ -118,11 +118,11 @@ extern "C" { destination->string[destination->used++] = quote ? quote : F_fss_delimit_quote_double_s; } - if (complete == f_fss_complete_partial || complete == f_fss_complete_partial_trim || complete == f_fss_complete_full || complete == f_fss_complete_full_trim) { + if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) { if (status == F_none_stop || status == F_none_eos || status == F_data_not_stop || status == F_data_not_eos) { f_status_t status2 = F_none; - if (complete == f_fss_complete_full_trim) { + if (complete == f_fss_complete_full_trim_e) { status2 = private_fl_fss_basic_write_object_trim(quote ? quote : F_fss_delimit_quote_double_s, destination_used, state, destination); if (F_status_is_error(status2)) { @@ -166,7 +166,7 @@ extern "C" { if (range->start > range->stop || range->start >= content.used) { // content should be terminated, even if empty. - if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim || complete == f_fss_complete_end) { + if (complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e || complete == f_fss_complete_end_e) { status = f_string_dynamic_increase(state.step_large, destination); if (F_status_is_error(status)) return status; @@ -209,7 +209,7 @@ extern "C" { destination->string[destination->used++] = content.string[range->start]; } // for - if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim || complete == f_fss_complete_end) { + if (complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e || complete == f_fss_complete_end_e) { destination->string[destination->used++] = f_fss_basic_close_s[0]; } diff --git a/level_1/fl_fss/c/fss_basic.h b/level_1/fl_fss/c/fss_basic.h index 1dcb9a5..0031fb6 100644 --- a/level_1/fl_fss/c/fss_basic.h +++ b/level_1/fl_fss/c/fss_basic.h @@ -15,16 +15,15 @@ #include // fll-0 includes -#include -#include -#include #include +#include #include +#include #include +#include // fll-1 includes #include -#include #ifdef __cplusplus extern "C" { @@ -60,9 +59,9 @@ extern "C" { * A delimits array representing where delimits exist within the buffer. * * @return - * FL_fss_found_object on success and object was found (start location is at end of object). - * FL_fss_found_object_content_not on success but object ended at the line so there can be no content. - * FL_fss_found_object_not on success and no object was found (start location is after character designating this is not an object). + * F_fss_found_object on success and object was found (start location is at end of object). + * F_fss_found_object_content_not on success but object ended at the line so there can be no content. + * F_fss_found_object_not on success and no object was found (start location is after character designating this is not an object). * F_none_eos on success after reaching the end of the buffer (a valid object is not yet confirmed). * F_none_stop on success after reaching stopping point (a valid object is not yet confirmed). * F_data_not_eos no objects found after reaching the end of the buffer (essentially only comments are found). @@ -112,8 +111,8 @@ extern "C" { * A delimits array representing where delimits exist within the buffer. * * @return - * FL_fss_found_content on success and content was found (start location is at end of content). - * FL_fss_found_content_not on success and no content was found (start location is after character designating this is not a content). + * F_fss_found_content on success and content was found (start location is at end of content). + * F_fss_found_content_not on success and no content was found (start location is after character designating this is not a content). * F_none_eos on success after reaching the end of the buffer (a valid object is not yet confirmed). * F_none_stop on success after reaching stopping point (a valid object is not yet confirmed). * F_data_not_eos no objects found after reaching the end of the buffer (essentially only comments are found). @@ -147,10 +146,10 @@ extern "C" { * If 0, then double quotes are auto-inserted, when required. * Otherwise, this is the type of quote to wrap the object in when writing. * @param complete - * If f_fss_complete_none, then only the object name is written. - * If f_fss_complete_full, this will write any appropriate open and close aspects of this object. - * If f_fss_complete_full_trim, this will write any appropriate open and close aspects of this object, but will omit whitespace before and after the object (inside the quotes). - * If f_fss_complete_partial, this will write any appropriate open and close aspects of this object. + * If f_fss_complete_none_e, then only the object name is written. + * If f_fss_complete_full_e, this will write any appropriate open and close aspects of this object. + * If f_fss_complete_full_trim_e, this will write any appropriate open and close aspects of this object, but will omit whitespace before and after the object (inside the quotes). + * If f_fss_complete_partial_e, this will write any appropriate open and close aspects of this object. * If f_fss_complete_partial_tim, this will write any appropriate open and close aspects of this object, but will omit whitespace before and after the object (inside the quotes). * @param state * A state for handling interrupts during long running operations. @@ -199,11 +198,11 @@ extern "C" { * @param content * The string to write as (does not stop at NULLS, they are ignored and not written). * @param complete - * If f_fss_complete_none, then only the content is written. - * If f_fss_complete_next, then the content followed by any appropriate "next" character separating one content from the next, if applicable. - * If f_fss_complete_end, then the content followed by any appropriate "end" character designating the last content for some object, printing final newline, if applicable. - * If f_fss_complete_partial, this will write any appropriate open and close aspects of this content, except for the final newline. - * If f_fss_complete_full, this will write any appropriate open and close aspects of this content, including the final newline. + * If f_fss_complete_none_e, then only the content is written. + * If f_fss_complete_next_e, then the content followed by any appropriate "next" character separating one content from the next, if applicable. + * If f_fss_complete_end_e, then the content followed by any appropriate "end" character designating the last content for some object, printing final newline, if applicable. + * If f_fss_complete_partial_e, this will write any appropriate open and close aspects of this content, except for the final newline. + * If f_fss_complete_full_e, this will write any appropriate open and close aspects of this content, including the final newline. * @param state * A state for handling interrupts during long running operations. * There is no print_error() usage at this time (@todo this should be implemented and supported). diff --git a/level_1/fl_fss/c/fss_basic_list.c b/level_1/fl_fss/c/fss_basic_list.c index e56219d..e3c3c43 100644 --- a/level_1/fl_fss/c/fss_basic_list.c +++ b/level_1/fl_fss/c/fss_basic_list.c @@ -24,7 +24,7 @@ extern "C" { // move the start position to after the EOL. ++range->start; - return FL_fss_found_object_not; + return F_fss_found_object_not; } if (status == F_none_eos) { @@ -55,7 +55,7 @@ extern "C" { // move the start position to after the EOL. ++range->start; - return FL_fss_found_object_not; + return F_fss_found_object_not; } f_array_length_t slash_first = 0; @@ -166,12 +166,12 @@ extern "C" { found->stop = stop; range->start = start + 1; - return FL_fss_found_object; + return F_fss_found_object; } range->start = start + 1; - return FL_fss_found_object_not; + return F_fss_found_object_not; } } else if (graph_first && buffer.string[range->start] == f_fss_comment_s[0]) { @@ -227,7 +227,7 @@ extern "C" { status = f_utf_buffer_increment(buffer, range, 1); if (F_status_is_error(status)) break; - return FL_fss_found_object; + return F_fss_found_object; } continue; @@ -265,7 +265,7 @@ extern "C" { // move the start position to after the EOL. ++range->start; - return FL_fss_found_object_not; + return F_fss_found_object_not; } #endif // _di_fl_fss_basic_list_object_read_ @@ -388,7 +388,7 @@ extern "C" { found->array[found->used++].stop = newline_last; range->start = newline_last + 1; - return FL_fss_found_content; + return F_fss_found_content; } macro_f_fss_delimits_t_increase_by(status, (*delimits), (slash_count / 2) + 1); @@ -465,14 +465,14 @@ extern "C" { if (newline_last == found->array[found->used].start && buffer.string[found->array[found->used].start] != f_fss_eol_s[0]) { range->start = newline_last; - return FL_fss_found_content_not; + return F_fss_found_content_not; } else { range->start = newline_last + 1; found->array[found->used++].stop = newline_last; } - return FL_fss_found_content; + return F_fss_found_content; } if (buffer.string[range->start] == f_fss_eol_s[0]) { @@ -535,7 +535,7 @@ extern "C" { private_macro_fl_fss_content_return_on_overflow_delimited((buffer), (*range), (*found), F_none_eos, F_none_stop); - return FL_fss_found_content; + return F_fss_found_content; } #endif // _di_fl_fss_basic_list_content_read_ @@ -549,13 +549,13 @@ extern "C" { if (F_status_is_error(status)) return status; if (status == F_none_stop || status == F_none_eos) { - if (complete == f_fss_complete_partial || complete == f_fss_complete_partial_trim || complete == f_fss_complete_full || complete == f_fss_complete_full_trim) { + if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) { const f_status_t status_allocation = f_string_dynamic_increase_by(2, destination); if (F_status_is_error(status_allocation)) return status_allocation; destination->string[destination->used++] = f_fss_basic_list_open_s[0]; - if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim) { + if (complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) { destination->string[destination->used++] = f_fss_basic_list_open_end_s[0]; } } @@ -717,8 +717,8 @@ extern "C" { return status; } - if (complete == f_fss_complete_partial || complete == f_fss_complete_partial_trim || complete == f_fss_complete_full || complete == f_fss_complete_full_trim) { - if (complete == f_fss_complete_full_trim) { + if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) { + if (complete == f_fss_complete_full_trim_e) { status = private_fl_fss_basic_list_write_object_trim(used_start, state, destination); if (F_status_is_error(status)) { @@ -738,7 +738,7 @@ extern "C" { destination->string[destination->used++] = f_fss_basic_list_open_s[0]; - if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim) { + if (complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) { destination->string[destination->used++] = f_fss_basic_list_open_end_s[0]; } } @@ -766,7 +766,7 @@ extern "C" { if (F_status_is_error(status)) return status; if (status == F_none_stop || status == F_none_eos) { - if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim || complete == f_fss_complete_end) { + if (complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e || complete == f_fss_complete_end_e) { const f_status_t status_allocation = f_string_dynamic_increase(state.step_large, destination); if (F_status_is_error(status_allocation)) return status_allocation; @@ -962,7 +962,7 @@ extern "C" { return status; } - if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim || complete == f_fss_complete_end) { + if (complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e || complete == f_fss_complete_end_e) { status = f_string_dynamic_increase(state.step_large, destination); if (F_status_is_error(status)) return status; diff --git a/level_1/fl_fss/c/fss_basic_list.h b/level_1/fl_fss/c/fss_basic_list.h index 7814e16..22d043f 100644 --- a/level_1/fl_fss/c/fss_basic_list.h +++ b/level_1/fl_fss/c/fss_basic_list.h @@ -15,17 +15,17 @@ #include // fll-0 includes + +#include #include -#include #include #include -#include #include +#include // fll-1 includes #include #include -#include #ifdef __cplusplus extern "C" { @@ -58,8 +58,8 @@ extern "C" { * A delimits array representing where delimits exist within the buffer. * * @return - * FL_fss_found_object on success and object was found (start location is at end of object). - * FL_fss_found_object_not on success and no object was found (start location is after character designating this is not an object). + * F_fss_found_object on success and object was found (start location is at end of object). + * F_fss_found_object_not on success and no object was found (start location is after character designating this is not an object). * F_none_eos on success after reaching the end of the buffer (a valid object is not yet confirmed). * F_none_stop on success after reaching stopping point (a valid object is not yet confirmed). * F_data_not_eos no objects found after reaching the end of the buffer (essentially only comments are found). @@ -117,8 +117,8 @@ extern "C" { * The comment range will include the trailing newline. * * @return - * FL_fss_found_content on success and content was found (start location is at end of content). - * FL_fss_found_content_not on success and no content was found (start location is after character designating this is not a content). + * F_fss_found_content on success and content was found (start location is at end of content). + * F_fss_found_content_not on success and no content was found (start location is after character designating this is not a content). * F_none_eos on success after reaching the end of the buffer (a valid object is not yet confirmed). * F_none_stop on success after reaching stopping point (a valid object is not yet confirmed). * F_data_not_eos no objects found after reaching the end of the buffer (essentially only comments are found). @@ -157,10 +157,10 @@ extern "C" { * @param object * The string to write as (does not stop at NULLS, they are ignored and not written). * @param complete - * If f_fss_complete_none, then only the object name is written. - * If f_fss_complete_full, this will write any appropriate open and close aspects of this object. - * If f_fss_complete_full_trim, this will write any appropriate open and close aspects of this object, but will omit whitespace before and after the object. - * If f_fss_complete_partial, this will write any appropriate open and close aspects of this object. + * If f_fss_complete_none_e, then only the object name is written. + * If f_fss_complete_full_e, this will write any appropriate open and close aspects of this object. + * If f_fss_complete_full_trim_e, this will write any appropriate open and close aspects of this object, but will omit whitespace before and after the object. + * If f_fss_complete_partial_e, this will write any appropriate open and close aspects of this object. * If f_fss_complete_partial_tim, this will write any appropriate open and close aspects of this object, but will omit whitespace before and after the object. * @param state * A state for handling interrupts during long running operations. @@ -207,11 +207,11 @@ extern "C" { * @param content * The string to write as (does not stop at NULLS, they are ignored and not written). * @param complete - * If f_fss_complete_none, then only the content is written. - * If f_fss_complete_next, then the content followed by any appropriate "next" character separating one content from the next, if applicable. - * If f_fss_complete_end, then the content followed by any appropriate "end" character designating the last content for some object, printing final newline, if applicable. - * If f_fss_complete_partial, this will write any appropriate open and close aspects of this content, except for the final newline. - * If f_fss_complete_full, this will write any appropriate open and close aspects of this content, including the final newline. + * If f_fss_complete_none_e, then only the content is written. + * If f_fss_complete_next_e, then the content followed by any appropriate "next" character separating one content from the next, if applicable. + * If f_fss_complete_end_e, then the content followed by any appropriate "end" character designating the last content for some object, printing final newline, if applicable. + * If f_fss_complete_partial_e, this will write any appropriate open and close aspects of this content, except for the final newline. + * If f_fss_complete_full_e, this will write any appropriate open and close aspects of this content, including the final newline. * @param prepend * A string of whitespace to prepend at the start of each line. * This should only be whitespace, anything else could product invalid content. diff --git a/level_1/fl_fss/c/fss_embedded_list.c b/level_1/fl_fss/c/fss_embedded_list.c index 6533484..3c29085 100644 --- a/level_1/fl_fss/c/fss_embedded_list.c +++ b/level_1/fl_fss/c/fss_embedded_list.c @@ -24,7 +24,7 @@ extern "C" { // move the start position to after the EOL. ++range->start; - return FL_fss_found_object_not; + return F_fss_found_object_not; } if (status == F_none_eos) { @@ -41,7 +41,7 @@ extern "C" { // move the start position to after the EOL. ++range->start; - return FL_fss_found_object_not; + return F_fss_found_object_not; } // begin the search. @@ -68,7 +68,7 @@ extern "C" { // move the start position to after the EOL. ++range->start; - return FL_fss_found_object_not; + return F_fss_found_object_not; } f_array_length_t start = 0; @@ -176,11 +176,11 @@ extern "C" { found->stop = stop; range->start = start + 1; - return FL_fss_found_object; + return F_fss_found_object; } range->start = start + 1; - return FL_fss_found_object_not; + return F_fss_found_object_not; } } else if (graph_first && buffer.string[range->start] == f_fss_comment_s[0]) { @@ -238,7 +238,7 @@ extern "C" { // move the start position to after the EOL. ++range->start; - return FL_fss_found_object; + return F_fss_found_object; } continue; @@ -292,7 +292,7 @@ extern "C" { return status; } - return FL_fss_found_object_not; + return F_fss_found_object_not; } #endif // _di_fl_fss_embedded_list_object_read_ @@ -826,7 +826,7 @@ extern "C" { macro_f_fss_objects_t_delete_simple(objects); macro_f_array_lengths_t_delete_simple(slashes); - return FL_fss_found_content; + return F_fss_found_content; } --depth; @@ -975,13 +975,13 @@ extern "C" { } if (status == F_data_not_stop || status == F_data_not_eos) { - if (complete == f_fss_complete_partial || complete == f_fss_complete_partial_trim || complete == f_fss_complete_full || complete == f_fss_complete_full_trim) { + if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) { const f_status_t status_allocation = f_string_dynamic_increase_by(2, destination); if (F_status_is_error(status_allocation)) return status_allocation; destination->string[destination->used++] = f_fss_embedded_list_open_s[0]; - if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim) { + if (complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) { destination->string[destination->used++] = f_fss_embedded_list_open_end_s[0]; } } @@ -1147,8 +1147,8 @@ extern "C" { return status; } - if (complete == f_fss_complete_partial || complete == f_fss_complete_partial_trim || complete == f_fss_complete_full || complete == f_fss_complete_full_trim) { - if (complete == f_fss_complete_full_trim) { + if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) { + if (complete == f_fss_complete_full_trim_e) { status = private_fl_fss_basic_list_write_object_trim(used_start, state, destination); if (F_status_is_error(status)) { @@ -1175,7 +1175,7 @@ extern "C" { destination->string[destination->used++] = f_fss_embedded_list_open_s[0]; - if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim) { + if (complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) { destination->string[destination->used++] = f_fss_embedded_list_open_end_s[0]; } } @@ -1210,7 +1210,7 @@ extern "C" { } if (range->start > range->stop || range->start >= content.used) { - if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim || complete == f_fss_complete_end) { + if (complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e || complete == f_fss_complete_end_e) { const f_status_t status_allocation = f_string_dynamic_increase_by(2, destination); if (F_status_is_error(status_allocation)) return status_allocation; @@ -1444,7 +1444,7 @@ extern "C" { return status; } - if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim || complete == f_fss_complete_end) { + if (complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e || complete == f_fss_complete_end_e) { status = f_string_dynamic_increase_by(3, destination); if (F_status_is_error(status)) return status; diff --git a/level_1/fl_fss/c/fss_embedded_list.h b/level_1/fl_fss/c/fss_embedded_list.h index b30ab06..85b7fe6 100644 --- a/level_1/fl_fss/c/fss_embedded_list.h +++ b/level_1/fl_fss/c/fss_embedded_list.h @@ -15,17 +15,17 @@ #include // fll-0 includes + +#include #include -#include #include #include -#include #include +#include // fll-1 includes #include #include -#include #ifdef __cplusplus extern "C" { @@ -58,8 +58,8 @@ extern "C" { * A delimits array representing where delimits exist within the buffer. * * @return - * FL_fss_found_object on success and object was found (start location is at end of object). - * FL_fss_found_object_not on success and no object was found (start location is after character designating this is not an object). + * F_fss_found_object on success and object was found (start location is at end of object). + * F_fss_found_object_not on success and no object was found (start location is after character designating this is not an object). * F_none_eos on success after reaching the end of the buffer (a valid object is not yet confirmed). * F_none_stop on success after reaching stopping point (a valid object is not yet confirmed). * F_data_not_eos no objects found after reaching the end of the buffer (essentially only comments are found). @@ -121,8 +121,8 @@ extern "C" { * The comment range will include the trailing newline. * * @return - * FL_fss_found_content on success and content was found (start location is at end of content). - * FL_fss_found_content_not on success and no content was found (start location is after character designating this is not a content). + * F_fss_found_content on success and content was found (start location is at end of content). + * F_fss_found_content_not on success and no content was found (start location is after character designating this is not a content). * F_none_eos on success after reaching the end of the buffer (a valid object is not yet confirmed). * F_none_stop on success after reaching stopping point (a valid object is not yet confirmed). * F_data_not_eos no objects found after reaching the end of the buffer (essentially only comments are found). @@ -160,10 +160,10 @@ extern "C" { * @param object * The string to write as (does not stop at NULLS, they are ignored and not written). * @param complete - * If f_fss_complete_none, then only the object name is written. - * If f_fss_complete_full, this will write any appropriate open and close aspects of this object. - * If f_fss_complete_full_trim, this will write any appropriate open and close aspects of this object, but will omit whitespace before and after the object. - * If f_fss_complete_partial, this will write any appropriate open and close aspects of this object. + * If f_fss_complete_none_e, then only the object name is written. + * If f_fss_complete_full_e, this will write any appropriate open and close aspects of this object. + * If f_fss_complete_full_trim_e, this will write any appropriate open and close aspects of this object, but will omit whitespace before and after the object. + * If f_fss_complete_partial_e, this will write any appropriate open and close aspects of this object. * If f_fss_complete_partial_tim, this will write any appropriate open and close aspects of this object, but will omit whitespace before and after the object. * @param state * A state for handling interrupts during long running operations. @@ -210,11 +210,11 @@ extern "C" { * @param content * The string to write as (does not stop at NULLS, they are ignored and not written). * @param complete - * If f_fss_complete_none, then only the content is written. - * If f_fss_complete_next, then the content followed by any appropriate "next" character separating one content from the next, if applicable. - * If f_fss_complete_end, then the content followed by any appropriate "end" character designating the last content for some object, printing final newline, if applicable. - * If f_fss_complete_partial, this will write any appropriate open and close aspects of this content, except for the final newline. - * If f_fss_complete_full, this will write any appropriate open and close aspects of this content, including the final newline. + * If f_fss_complete_none_e, then only the content is written. + * If f_fss_complete_next_e, then the content followed by any appropriate "next" character separating one content from the next, if applicable. + * If f_fss_complete_end_e, then the content followed by any appropriate "end" character designating the last content for some object, printing final newline, if applicable. + * If f_fss_complete_partial_e, this will write any appropriate open and close aspects of this content, except for the final newline. + * If f_fss_complete_full_e, this will write any appropriate open and close aspects of this content, including the final newline. * @param prepend * A string of whitespace to prepend at the start of each line. * This should only be whitespace, anything else could product invalid content. diff --git a/level_1/fl_fss/c/fss_extended.c b/level_1/fl_fss/c/fss_extended.c index bfa61a5..7b30140 100644 --- a/level_1/fl_fss/c/fss_extended.c +++ b/level_1/fl_fss/c/fss_extended.c @@ -24,7 +24,7 @@ extern "C" { return status; } - if (status == FL_fss_found_object_not || status == F_data_not || status == F_data_not_eos || status == F_data_not_stop) { + if (status == F_fss_found_object_not || status == F_data_not || status == F_data_not_eos || status == F_data_not_stop) { delimits->used = delimits_used; return status; @@ -51,7 +51,7 @@ extern "C" { if (status == F_none_eol) { ++range->start; - return FL_fss_found_content_not; + return F_fss_found_content_not; } if (status == F_none_eos) { @@ -73,7 +73,7 @@ extern "C" { status = private_fl_fss_basic_read(buffer, F_false, state, range, &content_partial, "ed, delimits); - if (status == FL_fss_found_object || status == FL_fss_found_object_content_not) { + if (status == F_fss_found_object || status == F_fss_found_object_content_not) { if (found->used + 1 > found->size) { macro_f_string_ranges_t_increase(status_allocate, state.step_small, (*found)); @@ -99,9 +99,9 @@ extern "C" { content_found = 1; - if (status == FL_fss_found_object_content_not) break; + if (status == F_fss_found_object_content_not) break; } - else if (status == FL_fss_found_object_not) { + else if (status == F_fss_found_object_not) { break; } else if (status == F_data_not_eos) { @@ -138,10 +138,10 @@ extern "C" { return status; } - return FL_fss_found_content; + return F_fss_found_content; } - return FL_fss_found_content_not; + return F_fss_found_content_not; } #endif // _di_fl_fss_extended_content_read_ @@ -166,11 +166,11 @@ f_status_t fl_fss_extended_object_write(const f_string_static_t object, const f_ destination->string[destination->used++] = quote ? quote : F_fss_delimit_quote_double_s; } - if (complete == f_fss_complete_partial || complete == f_fss_complete_partial_trim || complete == f_fss_complete_full || complete == f_fss_complete_full_trim) { + if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) { if (status == F_none_stop || status == F_none_eos || status == F_data_not_stop || status == F_data_not_eos) { f_status_t status2 = F_none; - if (complete == f_fss_complete_full_trim) { + if (complete == f_fss_complete_full_trim_e) { status2 = private_fl_fss_basic_write_object_trim(quote ? quote : F_fss_delimit_quote_double_s, used_start, state, destination); if (F_status_is_error(status2)) return status2; } @@ -206,11 +206,11 @@ f_status_t fl_fss_extended_object_write(const f_string_static_t object, const f_ destination->string[destination->used++] = quote ? quote : F_fss_delimit_quote_double_s; // content should be terminated, even if empty. - if (complete == f_fss_complete_partial || complete == f_fss_complete_partial_trim || complete == f_fss_complete_full || complete == f_fss_complete_full_trim || complete == f_fss_complete_next) { + if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e || complete == f_fss_complete_next_e) { destination->string[destination->used++] = f_fss_extended_next_s[0]; } - if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim || complete == f_fss_complete_end) { + if (complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e || complete == f_fss_complete_end_e) { destination->string[destination->used++] = f_fss_extended_close_s[0]; } @@ -225,11 +225,11 @@ f_status_t fl_fss_extended_object_write(const f_string_static_t object, const f_ const f_status_t status_allocation = f_string_dynamic_increase_by(2, destination); if (F_status_is_error(status_allocation)) return status_allocation; - if (complete == f_fss_complete_partial || complete == f_fss_complete_partial_trim || complete == f_fss_complete_full || complete == f_fss_complete_full_trim || complete == f_fss_complete_next) { + if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e || complete == f_fss_complete_next_e) { destination->string[destination->used++] = f_fss_extended_next_s[0]; } - if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim || complete == f_fss_complete_end) { + if (complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e || complete == f_fss_complete_end_e) { destination->string[destination->used++] = f_fss_extended_close_s[0]; } } diff --git a/level_1/fl_fss/c/fss_extended.h b/level_1/fl_fss/c/fss_extended.h index 5b4ccd5..be5174a 100644 --- a/level_1/fl_fss/c/fss_extended.h +++ b/level_1/fl_fss/c/fss_extended.h @@ -15,16 +15,16 @@ #include // fll-0 includes + +#include #include -#include #include #include -#include #include +#include // fll-1 includes #include -#include #ifdef __cplusplus extern "C" { @@ -60,9 +60,9 @@ extern "C" { * A delimits array representing where delimits exist within the buffer. * * @return - * FL_fss_found_object on success and object was found (start location is at end of object). - * FL_fss_found_object_content_not on success but object ended at the line so there can be no content. - * FL_fss_found_object_not on success and no object was found (start location is after character designating this is not an object). + * F_fss_found_object on success and object was found (start location is at end of object). + * F_fss_found_object_content_not on success but object ended at the line so there can be no content. + * F_fss_found_object_not on success and no object was found (start location is after character designating this is not an object). * F_none_eos on success after reaching the end of the buffer (a valid object is not yet confirmed). * F_none_stop on success after reaching stopping point (a valid object is not yet confirmed). * F_data_not_eos no objects found after reaching the end of the buffer (essentially only comments are found). @@ -115,8 +115,8 @@ extern "C" { * A delimits array representing where delimits exist within the buffer. * * @return - * FL_fss_found_content on success and content was found (start location is at end of content). - * FL_fss_found_content_not on success and no content was found (start location is after character designating this is not a content). + * F_fss_found_content on success and content was found (start location is at end of content). + * F_fss_found_content_not on success and no content was found (start location is after character designating this is not a content). * F_none_eos on success after reaching the end of the buffer (a valid object is not yet confirmed). * F_none_stop on success after reaching stopping point (a valid object is not yet confirmed). * F_data_not_eos no objects found after reaching the end of the buffer (essentially only comments are found). @@ -153,9 +153,9 @@ extern "C" { * If 0, then double quotes are auto-inserted, when required. * Otherwise, this is the type of quote to wrap the object in when writing. * @param complete - * If f_fss_complete_none, then only the object name is written. - * If f_fss_complete_full, this will write any appropriate open and close aspects of this object. - * If f_fss_complete_partial, this will write any appropriate open and close aspects of this object. + * If f_fss_complete_none_e, then only the object name is written. + * If f_fss_complete_full_e, this will write any appropriate open and close aspects of this object. + * If f_fss_complete_partial_e, this will write any appropriate open and close aspects of this object. * @param state * A state for handling interrupts during long running operations. * There is no print_error() usage at this time (@todo this should be implemented and supported). @@ -206,11 +206,11 @@ extern "C" { * If 0, then double quotes are auto-inserted, when required. * Otherwise, this is the type of quote to wrap the object in when writing. * @param complete - * If f_fss_complete_none, then only the content is written. - * If f_fss_complete_next, then the content followed by any appropriate "next" character separating one content from the next, if applicable. - * If f_fss_complete_end, then the content followed by any appropriate "end" character designating the last content for some object, printing final newline, if applicable. - * If f_fss_complete_partial, this will write any appropriate open and close aspects of this content, except for the final newline. - * If f_fss_complete_full, this will write any appropriate open and close aspects of this content, including the final newline. + * If f_fss_complete_none_e, then only the content is written. + * If f_fss_complete_next_e, then the content followed by any appropriate "next" character separating one content from the next, if applicable. + * If f_fss_complete_end_e, then the content followed by any appropriate "end" character designating the last content for some object, printing final newline, if applicable. + * If f_fss_complete_partial_e, this will write any appropriate open and close aspects of this content, except for the final newline. + * If f_fss_complete_full_e, this will write any appropriate open and close aspects of this content, including the final newline. * @param state * A state for handling interrupts during long running operations. * There is no print_error() usage at this time (@todo this should be implemented and supported). diff --git a/level_1/fl_fss/c/fss_extended_list.c b/level_1/fl_fss/c/fss_extended_list.c index 9834a30..672f46c 100644 --- a/level_1/fl_fss/c/fss_extended_list.c +++ b/level_1/fl_fss/c/fss_extended_list.c @@ -24,7 +24,7 @@ extern "C" { // move the start position to after the EOL. ++range->start; - return FL_fss_found_object_not; + return F_fss_found_object_not; } if (status == F_none_eos) { @@ -41,7 +41,7 @@ extern "C" { // move the start position to after the EOL. ++range->start; - return FL_fss_found_object_not; + return F_fss_found_object_not; } // begin the search. @@ -68,7 +68,7 @@ extern "C" { // move the start position to after the EOL. ++range->start; - return FL_fss_found_object_not; + return F_fss_found_object_not; } f_array_length_t start = 0; @@ -176,11 +176,11 @@ extern "C" { found->stop = stop; range->start = start + 1; - return FL_fss_found_object; + return F_fss_found_object; } range->start = start + 1; - return FL_fss_found_object_not; + return F_fss_found_object_not; } } else if (graph_first && buffer.string[range->start] == f_fss_comment_s[0]) { @@ -238,7 +238,7 @@ extern "C" { // move the start position to after the EOL. ++range->start; - return FL_fss_found_object; + return F_fss_found_object; } continue; @@ -293,7 +293,7 @@ extern "C" { return status; } - return FL_fss_found_object_not; + return F_fss_found_object_not; } #endif // _di_fl_fss_extended_list_object_read_ @@ -463,12 +463,12 @@ extern "C" { found->array[found->used].start = 1; found->array[found->used++].stop = 0; - return FL_fss_found_content_not; + return F_fss_found_content_not; } found->array[found->used++].stop = newline_last; - return FL_fss_found_content; + return F_fss_found_content; } continue; @@ -507,7 +507,7 @@ extern "C" { return status; } - return FL_fss_found_content_not; + return F_fss_found_content_not; } #endif // _di_fl_fss_extended_list_content_read_ @@ -528,13 +528,13 @@ extern "C" { } if (status == F_data_not_stop || status == F_data_not_eos) { - if (complete == f_fss_complete_partial || complete == f_fss_complete_partial_trim || complete == f_fss_complete_full || complete == f_fss_complete_full_trim) { + if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) { const f_status_t status_allocation = f_string_dynamic_increase_by(2, destination); if (F_status_is_error(status_allocation)) return status_allocation; destination->string[destination->used++] = f_fss_extended_list_open_s[0]; - if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim) { + if (complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) { destination->string[destination->used++] = f_fss_extended_list_open_end_s[0]; } } @@ -699,8 +699,8 @@ extern "C" { return status; } - if (complete == f_fss_complete_partial || complete == f_fss_complete_partial_trim || complete == f_fss_complete_full || complete == f_fss_complete_full_trim) { - if (complete == f_fss_complete_full_trim) { + if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) { + if (complete == f_fss_complete_full_trim_e) { status = private_fl_fss_basic_list_write_object_trim(used_start, state, destination); if (F_status_is_error(status)) { @@ -727,7 +727,7 @@ extern "C" { destination->string[destination->used++] = f_fss_extended_list_open_s[0]; - if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim) { + if (complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) { destination->string[destination->used++] = f_fss_extended_list_open_end_s[0]; } } @@ -762,7 +762,7 @@ extern "C" { } if (range->start > range->stop || range->start >= content.used) { - if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim || complete == f_fss_complete_end) { + if (complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e || complete == f_fss_complete_end_e) { const f_status_t status_allocation = f_string_dynamic_increase_by(2, destination); if (F_status_is_error(status_allocation)) return status_allocation; @@ -995,7 +995,7 @@ extern "C" { return status; } - if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim || complete == f_fss_complete_end) { + if (complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e || complete == f_fss_complete_end_e) { status = f_string_dynamic_increase_by(3, destination); if (F_status_is_error(status)) return status; diff --git a/level_1/fl_fss/c/fss_extended_list.h b/level_1/fl_fss/c/fss_extended_list.h index e25e012..724d087 100644 --- a/level_1/fl_fss/c/fss_extended_list.h +++ b/level_1/fl_fss/c/fss_extended_list.h @@ -15,17 +15,17 @@ #include // fll-0 includes + +#include #include -#include #include #include -#include #include +#include // fll-1 includes #include #include -#include #ifdef __cplusplus extern "C" { @@ -58,8 +58,8 @@ extern "C" { * A delimits array representing where delimits exist within the buffer. * * @return - * FL_fss_found_object on success and object was found (start location is at end of object). - * FL_fss_found_object_not on success and no object was found (start location is after character designating this is not an object). + * F_fss_found_object on success and object was found (start location is at end of object). + * F_fss_found_object_not on success and no object was found (start location is after character designating this is not an object). * F_none_eos on success after reaching the end of the buffer (a valid object is not yet confirmed). * F_none_stop on success after reaching stopping point (a valid object is not yet confirmed). * F_data_not_eos no objects found after reaching the end of the buffer (essentially only comments are found). @@ -119,8 +119,8 @@ extern "C" { * The comment range will include the trailing newline. * * @return - * FL_fss_found_content on success and content was found (start location is at end of content). - * FL_fss_found_content_not on success and no content was found (start location is after character designating this is not a content). + * F_fss_found_content on success and content was found (start location is at end of content). + * F_fss_found_content_not on success and no content was found (start location is after character designating this is not a content). * F_none_eos on success after reaching the end of the buffer (a valid content is not yet confirmed). * F_none_stop on success after reaching stopping point (a valid content is not yet confirmed). * F_data_not_eos no content found after reaching the end of the buffer (essentially only comments are found). @@ -158,10 +158,10 @@ extern "C" { * @param object * The string to write as (does not stop at NULLS, they are ignored and not written). * @param complete - * If f_fss_complete_none, then only the object name is written. - * If f_fss_complete_full, this will write any appropriate open and close aspects of this object. - * If f_fss_complete_full_trim, this will write any appropriate open and close aspects of this object, but will omit whitespace before and after the object. - * If f_fss_complete_partial, this will write any appropriate open and close aspects of this object. + * If f_fss_complete_none_e, then only the object name is written. + * If f_fss_complete_full_e, this will write any appropriate open and close aspects of this object. + * If f_fss_complete_full_trim_e, this will write any appropriate open and close aspects of this object, but will omit whitespace before and after the object. + * If f_fss_complete_partial_e, this will write any appropriate open and close aspects of this object. * If f_fss_complete_partial_tim, this will write any appropriate open and close aspects of this object, but will omit whitespace before and after the object. * @param state * A state for handling interrupts during long running operations. @@ -208,11 +208,11 @@ extern "C" { * @param content * The string to write as (does not stop at NULLS, they are ignored and not written). * @param complete - * If f_fss_complete_none, then only the content is written. - * If f_fss_complete_next, then the content followed by any appropriate "next" character separating one content from the next, if applicable. - * If f_fss_complete_end, then the content followed by any appropriate "end" character designating the last content for some object, printing final newline, if applicable. - * If f_fss_complete_partial, this will write any appropriate open and close aspects of this content, except for the final newline. - * If f_fss_complete_full, this will write any appropriate open and close aspects of this content, including the final newline. + * If f_fss_complete_none_e, then only the content is written. + * If f_fss_complete_next_e, then the content followed by any appropriate "next" character separating one content from the next, if applicable. + * If f_fss_complete_end_e, then the content followed by any appropriate "end" character designating the last content for some object, printing final newline, if applicable. + * If f_fss_complete_partial_e, this will write any appropriate open and close aspects of this content, except for the final newline. + * If f_fss_complete_full_e, this will write any appropriate open and close aspects of this content, including the final newline. * @param prepend * A string of whitespace to prepend at the start of each line. * This should only be whitespace, anything else could product invalid content. diff --git a/level_1/fl_fss/c/fss_status.h b/level_1/fl_fss/c/fss_status.h deleted file mode 100644 index 8cf2ee9..0000000 --- a/level_1/fl_fss/c/fss_status.h +++ /dev/null @@ -1,55 +0,0 @@ -/** - * FLL - Level 1 - * - * Project: Strings - * API Version: 0.5 - * Licenses: lgpl-2.1-or-later - * - * Provides fss-specific status definitions. - * - * Warning: changing status codes will break abi, so recompile every file that includes and uses these error codes when this gets changed. - * @fixme this can be moved into level_0 because level_0/status is now a special case that can be included by other level_0 projects. - */ -#ifndef _FL_fss_status_h -#define _FL_fss_status_h - -// fll-0 includes -#include - -#ifdef __cplusplus -extern "C" { -#endif - -enum { - FL_fss_status_code_first = F_status_code_last + 1, - - #ifndef _di_FL_fss_status_error_ - FL_fss_format, - FL_fss_format_eos, - #endif // _di_FL_fss_status_error_ - - #ifndef _di_FL_fss_status_warning_ - FL_fss_accepted_invalid, - FL_fss_accepted_invalid_eos, - #endif // _di_FL_fss_status_warning_ - - #ifndef _di_FL_fss_status_success_ - FL_fss_found_content, - FL_fss_found_object, - FL_fss_found_object_content_not, - FL_fss_found_content_not, - FL_fss_found_object_not, - #endif // _di_FL_fss_status_success_ - - #ifndef _di_FL_fss_status_codes_ - FL_fss_found_comment, - #endif // _di_FL_fss_status_codes_ - - FL_fss_status_code_last, -}; // enum - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // _FL_fss_status_h diff --git a/level_1/fl_fss/c/private-fss.c b/level_1/fl_fss/c/private-fss.c index 830bd50..3017860 100644 --- a/level_1/fl_fss/c/private-fss.c +++ b/level_1/fl_fss/c/private-fss.c @@ -287,7 +287,7 @@ extern "C" { // move the start position to after the EOL. ++range->start; - return FL_fss_found_object_not; + return F_fss_found_object_not; } if (status == F_none_eos) { @@ -328,7 +328,7 @@ extern "C" { // move the start position to after the EOL. ++range->start; - return FL_fss_found_object_not; + return F_fss_found_object_not; } // handle quoted support. @@ -380,10 +380,10 @@ extern "C" { if (F_status_is_error(status)) break; if (buffer.string[range->start] == f_fss_eol_s[0]) { - return FL_fss_found_object_content_not; + return F_fss_found_object_content_not; } - return FL_fss_found_object; + return F_fss_found_object; } break; @@ -463,13 +463,13 @@ extern "C" { // move the start position to after the EOL. ++range->start; - return FL_fss_found_object_content_not; + return F_fss_found_object_content_not; } status = f_utf_buffer_increment(buffer, range, 1); if (F_status_is_error(status)) return status; - return FL_fss_found_object; + return F_fss_found_object; } else { f_array_length_t first_slash = 0; @@ -562,10 +562,10 @@ extern "C" { if (status == F_true) { if (quote) { if (quote_found == F_fss_delimit_quote_single_s) { - *quote = f_fss_quote_type_single; + *quote = f_fss_quote_type_single_e; } else if (quote_found == F_fss_delimit_quote_double_s) { - *quote = f_fss_quote_type_double; + *quote = f_fss_quote_type_double_e; } } @@ -640,7 +640,7 @@ extern "C" { status = f_utf_buffer_increment(buffer, range, 1); if (F_status_is_error(status)) return status; - return FL_fss_found_object_not; + return F_fss_found_object_not; } if (buffer.string[range->start] == f_fss_eol_s[0]) { @@ -649,7 +649,7 @@ extern "C" { // move the start position to after the EOL. ++range->start; - return FL_fss_found_object_content_not; + return F_fss_found_object_content_not; } found->stop = location - 1; @@ -657,7 +657,7 @@ extern "C" { status = f_utf_buffer_increment(buffer, range, 1); if (F_status_is_error(status)) return status; - return FL_fss_found_object; + return F_fss_found_object; } else { macro_f_fss_delimits_t_increase_by(status, (*delimits), (slash_count / 2) + 1); @@ -718,10 +718,10 @@ extern "C" { if (status == F_true) { if (quote) { if (quote_found == F_fss_delimit_quote_single_s) { - *quote = f_fss_quote_type_single; + *quote = f_fss_quote_type_single_e; } else if (quote_found == F_fss_delimit_quote_double_s) { - *quote = f_fss_quote_type_double; + *quote = f_fss_quote_type_double_e; } } @@ -745,7 +745,7 @@ extern "C" { // move the start position to after the EOL. ++range->start; - return FL_fss_found_object_content_not; + return F_fss_found_object_content_not; } status = f_fss_is_space(buffer, *range); @@ -755,7 +755,7 @@ extern "C" { status = f_utf_buffer_increment(buffer, range, 1); if (F_status_is_error(status)) return status; - return FL_fss_found_object; + return F_fss_found_object; } if (buffer.string[range->start] != F_fss_delimit_placeholder_s) { @@ -789,7 +789,7 @@ extern "C" { status = f_utf_buffer_increment(buffer, range, 1); if (F_status_is_error(status)) return status; - return FL_fss_found_object_not; + return F_fss_found_object_not; } status = f_utf_buffer_increment(buffer, range, 1); @@ -814,7 +814,7 @@ extern "C" { // move the start position to after the EOL. ++range->start; - return FL_fss_found_object_not; + return F_fss_found_object_not; } status = f_utf_buffer_increment(buffer, range, 1); @@ -841,7 +841,7 @@ extern "C" { // move the start position to after the EOL. ++range->start; - return FL_fss_found_object_not; + return F_fss_found_object_not; } #endif // !defined(_di_fl_fss_basic_object_read_) || !defined(_di_fl_fss_extended_object_read_) diff --git a/level_1/fl_fss/c/private-fss.h b/level_1/fl_fss/c/private-fss.h index 9ea28d8..476d26c 100644 --- a/level_1/fl_fss/c/private-fss.h +++ b/level_1/fl_fss/c/private-fss.h @@ -152,8 +152,8 @@ extern "C" { * The caller is expected to decide if and when to process them. * * @return - * FL_fss_found_object on success and object was found (start location is at end of object). - * FL_fss_found_object_not on success and no object was found (start location is after character designating this is not an object). + * F_fss_found_object on success and object was found (start location is at end of object). + * F_fss_found_object_not on success and no object was found (start location is after character designating this is not an object). * F_none_eos on success after reaching the end of the buffer (a valid object is not yet confirmed). * F_none_stop on success after reaching stopping point (a valid object is not yet confirmed). * F_data_not_eos no objects found after reaching the end of the buffer (essentially only comments are found). diff --git a/level_1/fl_fss/data/build/settings b/level_1/fl_fss/data/build/settings index 7e89d14..5dd512b 100644 --- a/level_1/fl_fss/data/build/settings +++ b/level_1/fl_fss/data/build/settings @@ -30,7 +30,7 @@ build_sources_library_static build_sources_program build_sources_program_shared build_sources_program_static -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 +build_sources_headers fss.h fss_basic.h fss_basic_list.h fss_embedded_list.h fss_extended.h fss_extended_list.h build_sources_headers_shared build_sources_headers_static build_sources_script diff --git a/level_1/fl_print/c/print-common.h b/level_1/fl_print/c/print-common.h index 76d4369..f558e10 100644 --- a/level_1/fl_print/c/print-common.h +++ b/level_1/fl_print/c/print-common.h @@ -54,7 +54,7 @@ extern "C" { #define fl_print_t_initialize { \ macro_f_file_t_initialize2(F_type_output_d, F_type_descriptor_output_d, F_file_flag_write_only_d), \ - f_console_verbosity_normal, \ + f_console_verbosity_normal_e, \ 0, \ 0, \ f_color_set_t_initialize, \ @@ -63,12 +63,12 @@ extern "C" { } #define macro_fl_print_t_initialize(to, verbosity, prefix, suffix, context, notable, set) { to, verbosity, prefix, suffix, context, notable, set } - #define macro_fl_print_t_initialize_debug() macro_fl_print_t_initialize(macro_f_file_t_initialize2(F_type_debug_d, F_type_descriptor_debug_d, F_file_flag_write_only_d), f_console_verbosity_normal, fl_print_debug_s, 0, f_color_set_t_initialize, f_color_set_t_initialize, 0) - #define macro_fl_print_t_initialize_debug2(suffix, set) macro_fl_print_t_initialize(macro_f_file_t_initialize2(F_type_debug_d, F_type_descriptor_debug_d, F_file_flag_write_only_d), f_console_verbosity_normal, fl_print_debug_s, suffix, f_color_set_t_initialize, f_color_set_t_initialize, set) - #define macro_fl_print_t_initialize_error() macro_fl_print_t_initialize(macro_f_file_t_initialize2(F_type_error_d, F_type_descriptor_error_d, F_file_flag_write_only_d), f_console_verbosity_normal, fl_print_error_s, 0, f_color_set_t_initialize, f_color_set_t_initialize, 0) - #define macro_fl_print_t_initialize_error2(suffix, set) macro_fl_print_t_initialize(macro_f_file_t_initialize2(F_type_error_d, F_type_descriptor_error_d, F_file_flag_write_only_d), f_console_verbosity_normal, fl_print_error_s, suffix, f_color_set_t_initialize, f_color_set_t_initialize, set) - #define macro_fl_print_t_initialize_warning() macro_fl_print_t_initialize(macro_f_file_t_initialize2(F_type_warning_d, F_type_descriptor_warning_d, F_file_flag_write_only_d), f_console_verbosity_normal, fl_print_warning_s, 0, f_color_set_t_initialize, f_color_set_t_initialize, 0) - #define macro_fl_print_t_initialize_warning2(suffix, set) macro_fl_print_t_initialize(macro_f_file_t_initialize2(F_type_warning_d, F_type_descriptor_warning_d, F_file_flag_write_only_d), f_console_verbosity_normal, fl_print_warning_s, suffix, f_color_set_t_initialize, f_color_set_t_initialize, set) + #define macro_fl_print_t_initialize_debug() macro_fl_print_t_initialize(macro_f_file_t_initialize2(F_type_debug_d, F_type_descriptor_debug_d, F_file_flag_write_only_d), f_console_verbosity_normal_e, fl_print_debug_s, 0, f_color_set_t_initialize, f_color_set_t_initialize, 0) + #define macro_fl_print_t_initialize_debug2(suffix, set) macro_fl_print_t_initialize(macro_f_file_t_initialize2(F_type_debug_d, F_type_descriptor_debug_d, F_file_flag_write_only_d), f_console_verbosity_normal_e, fl_print_debug_s, suffix, f_color_set_t_initialize, f_color_set_t_initialize, set) + #define macro_fl_print_t_initialize_error() macro_fl_print_t_initialize(macro_f_file_t_initialize2(F_type_error_d, F_type_descriptor_error_d, F_file_flag_write_only_d), f_console_verbosity_normal_e, fl_print_error_s, 0, f_color_set_t_initialize, f_color_set_t_initialize, 0) + #define macro_fl_print_t_initialize_error2(suffix, set) macro_fl_print_t_initialize(macro_f_file_t_initialize2(F_type_error_d, F_type_descriptor_error_d, F_file_flag_write_only_d), f_console_verbosity_normal_e, fl_print_error_s, suffix, f_color_set_t_initialize, f_color_set_t_initialize, set) + #define macro_fl_print_t_initialize_warning() macro_fl_print_t_initialize(macro_f_file_t_initialize2(F_type_warning_d, F_type_descriptor_warning_d, F_file_flag_write_only_d), f_console_verbosity_normal_e, fl_print_warning_s, 0, f_color_set_t_initialize, f_color_set_t_initialize, 0) + #define macro_fl_print_t_initialize_warning2(suffix, set) macro_fl_print_t_initialize(macro_f_file_t_initialize2(F_type_warning_d, F_type_descriptor_warning_d, F_file_flag_write_only_d), f_console_verbosity_normal_e, fl_print_warning_s, suffix, f_color_set_t_initialize, f_color_set_t_initialize, set) #endif // _di_fl_print_t_ #ifdef __cplusplus diff --git a/level_1/fl_print/c/private-print.c b/level_1/fl_print/c/private-print.c index 68edfab..7df219b 100644 --- a/level_1/fl_print/c/private-print.c +++ b/level_1/fl_print/c/private-print.c @@ -181,12 +181,12 @@ extern "C" { return string; } else if (*string == f_string_ascii_D_s[0]) { - type = f_print_format_type_double_32; + type = f_print_format_type_double_32_e; flag |= F_print_format_flag_uppercase_d; if (*(string + 1)) { if (*(string + 1) == f_string_ascii_L_s[0]) { - type = f_print_format_type_double_64; + type = f_print_format_type_double_64_e; if (*(string + 2) == f_string_ascii_e_s[0]) { flag |= F_print_format_flag_exponent_d; @@ -227,31 +227,31 @@ extern "C" { } } else if (*string == f_string_ascii_I_s[0]) { - type = f_print_format_type_signed_32; + type = f_print_format_type_signed_32_e; flag |= F_print_format_flag_uppercase_d; if (*(string + 1) == f_string_ascii_I_s[0]) { if (*(string + 2) == f_string_ascii_I_s[0]) { - type = f_print_format_type_signed_8; + type = f_print_format_type_signed_8_e; string += 2; } else { - type = f_print_format_type_signed_16; + type = f_print_format_type_signed_16_e; ++string; } } else if (*(string + 1) == f_string_ascii_L_s[0]) { if (*(string + 2) == f_string_ascii_L_s[0]) { - type = f_print_format_type_signed_128; + type = f_print_format_type_signed_128_e; string += 2; } else { - type = f_print_format_type_signed_64; + type = f_print_format_type_signed_64_e; ++string; } } else if (*(string + 1) == f_string_ascii_N_s[0]) { - type = f_print_format_type_signed_number; + type = f_print_format_type_signed_number_e; flag |= F_print_format_flag_uppercase_d; ++string; } @@ -381,31 +381,31 @@ extern "C" { return string; } else if (*string == f_string_ascii_U_s[0]) { - type = f_print_format_type_unsigned_32; + type = f_print_format_type_unsigned_32_e; flag |= F_print_format_flag_uppercase_d; if (*(string + 1) == f_string_ascii_I_s[0]) { if (*(string + 2) == f_string_ascii_I_s[0]) { - type = f_print_format_type_unsigned_8; + type = f_print_format_type_unsigned_8_e; string += 2; } else { - type = f_print_format_type_unsigned_16; + type = f_print_format_type_unsigned_16_e; ++string; } } else if (*(string + 1) == f_string_ascii_L_s[0]) { if (*(string + 2) == f_string_ascii_L_s[0]) { - type = f_print_format_type_unsigned_128; + type = f_print_format_type_unsigned_128_e; string += 2; } else { - type = f_print_format_type_unsigned_64; + type = f_print_format_type_unsigned_64_e; ++string; } } else if (*(string + 1) == f_string_ascii_N_s[0]) { - type = f_print_format_type_unsigned_number; + type = f_print_format_type_unsigned_number_e; ++string; } } @@ -417,7 +417,7 @@ extern "C" { } else if (*string < 0x60) { if (*string == f_string_ascii_Z_s[0]) { - type = f_print_format_type_size; + type = f_print_format_type_size_e; flag |= F_print_format_flag_uppercase_d; } else if (*string == f_string_ascii_bracket_open_s[0]) { @@ -465,11 +465,11 @@ extern "C" { return string; } else if (*string == f_string_ascii_d_s[0]) { - type = f_print_format_type_double_32; + type = f_print_format_type_double_32_e; if (*(string + 1)) { if (*(string + 1) == f_string_ascii_L_s[0]) { - type = f_print_format_type_double_64; + type = f_print_format_type_double_64_e; if (*(string + 2) == f_string_ascii_e_s[0]) { flag |= F_print_format_flag_exponent_d; @@ -510,30 +510,30 @@ extern "C" { } } else if (*string == f_string_ascii_i_s[0]) { - type = f_print_format_type_signed_32; + type = f_print_format_type_signed_32_e; if (*(string + 1) == f_string_ascii_i_s[0]) { if (*(string + 2) == f_string_ascii_i_s[0]) { - type = f_print_format_type_signed_8; + type = f_print_format_type_signed_8_e; string += 2; } else { - type = f_print_format_type_signed_16; + type = f_print_format_type_signed_16_e; ++string; } } else if (*(string + 1) == f_string_ascii_l_s[0]) { if (*(string + 2) == f_string_ascii_l_s[0]) { - type = f_print_format_type_signed_128; + type = f_print_format_type_signed_128_e; string += 2; } else { - type = f_print_format_type_signed_64; + type = f_print_format_type_signed_64_e; ++string; } } else if (*(string + 1) == f_string_ascii_n_s[0]) { - type = f_print_format_type_signed_number; + type = f_print_format_type_signed_number_e; ++string; } } @@ -786,35 +786,35 @@ extern "C" { return string; } else if (*string == f_string_ascii_u_s[0]) { - type = f_print_format_type_unsigned_32; + type = f_print_format_type_unsigned_32_e; if (*(string + 1) == f_string_ascii_i_s[0]) { if (*(string + 2) == f_string_ascii_i_s[0]) { - type = f_print_format_type_unsigned_8; + type = f_print_format_type_unsigned_8_e; string += 2; } else { - type = f_print_format_type_unsigned_16; + type = f_print_format_type_unsigned_16_e; ++string; } } else if (*(string + 1) == f_string_ascii_l_s[0]) { if (*(string + 2) == f_string_ascii_l_s[0]) { - type = f_print_format_type_unsigned_128; + type = f_print_format_type_unsigned_128_e; string += 2; } else { - type = f_print_format_type_unsigned_64; + type = f_print_format_type_unsigned_64_e; ++string; } } else if (*(string + 1) == f_string_ascii_n_s[0]) { - type = f_print_format_type_unsigned_number; + type = f_print_format_type_unsigned_number_e; ++string; } } else if (*string == f_string_ascii_z_s[0]) { - type = f_print_format_type_size; + type = f_print_format_type_size_e; } else { *status = F_status_set_error(F_valid_not); @@ -865,54 +865,54 @@ extern "C" { conversion_data.width = precision; } - if (type == f_print_format_type_signed_number) { + if (type == f_print_format_type_signed_number_e) { *status = f_conversion_number_signed_print(va_arg(*ap, f_number_signed_t), conversion_data, stream); } - else if (type == f_print_format_type_signed_64) { + else if (type == f_print_format_type_signed_64_e) { *status = f_conversion_number_signed_print((f_number_signed_t) va_arg(*ap, int64_t), conversion_data, stream); } - else if (type == f_print_format_type_signed_128) { + else if (type == f_print_format_type_signed_128_e) { *status = f_conversion_number_signed_print((f_number_signed_t) va_arg(*ap, f_int_128_t), conversion_data, stream); } - else if (type == f_print_format_type_signed_32) { + else if (type == f_print_format_type_signed_32_e) { *status = f_conversion_number_signed_print((f_number_signed_t) va_arg(*ap, int32_t), conversion_data, stream); } - else if (type == f_print_format_type_signed_16) { + else if (type == f_print_format_type_signed_16_e) { const int16_t value = (int16_t) va_arg(*ap, int); *status = f_conversion_number_signed_print((f_number_signed_t) value, conversion_data, stream); } - else if (type == f_print_format_type_signed_8) { + else if (type == f_print_format_type_signed_8_e) { const int8_t value = (int8_t) va_arg(*ap, int); *status = f_conversion_number_signed_print((f_number_signed_t) value, conversion_data, stream); } - else if (type == f_print_format_type_size) { + else if (type == f_print_format_type_size_e) { *status = f_conversion_number_unsigned_print((f_number_unsigned_t) va_arg(*ap, size_t), conversion_data, stream); } - else if (type == f_print_format_type_unsigned_32) { + else if (type == f_print_format_type_unsigned_32_e) { *status = f_conversion_number_unsigned_print((f_number_unsigned_t) va_arg(*ap, uint32_t), conversion_data, stream); } - else if (type == f_print_format_type_unsigned_16) { + else if (type == f_print_format_type_unsigned_16_e) { const uint16_t value = (uint16_t) va_arg(*ap, unsigned); *status = f_conversion_number_unsigned_print((f_number_unsigned_t) value, conversion_data, stream); } - else if (type == f_print_format_type_unsigned_8) { + else if (type == f_print_format_type_unsigned_8_e) { const uint8_t value = (uint8_t) va_arg(*ap, unsigned); *status = f_conversion_number_unsigned_print((f_number_unsigned_t) value, conversion_data, stream); } - else if (type == f_print_format_type_unsigned_64) { + else if (type == f_print_format_type_unsigned_64_e) { *status = f_conversion_number_unsigned_print((f_number_unsigned_t) va_arg(*ap, uint64_t), conversion_data, stream); } - else if (type == f_print_format_type_unsigned_128) { + else if (type == f_print_format_type_unsigned_128_e) { *status = f_conversion_number_unsigned_print((f_number_unsigned_t) va_arg(*ap, f_uint_128_t), conversion_data, stream); } - else if (type == f_print_format_type_unsigned_number) { + else if (type == f_print_format_type_unsigned_number_e) { *status = f_conversion_number_unsigned_print(va_arg(*ap, f_number_unsigned_t), conversion_data, stream); } - else if (type == f_print_format_type_double_32 || type == f_print_format_type_double_64) { + else if (type == f_print_format_type_double_32_e || type == f_print_format_type_double_64_e) { int f = 0; char format[32]; char buffer[128]; @@ -965,7 +965,7 @@ extern "C" { format[f] = 0; - if (type == f_print_format_type_double_32) { + if (type == f_print_format_type_double_32_e) { const double value = va_arg(*ap, double); if (flag & F_print_format_flag_width_d) { diff --git a/level_1/fl_status/c/status.c b/level_1/fl_status/c/status.c deleted file mode 100644 index 5a4c8c9..0000000 --- a/level_1/fl_status/c/status.c +++ /dev/null @@ -1,1437 +0,0 @@ -#include "status.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef _di_fl_status_to_string_ - f_status_t fl_status_to_string(const f_status_t code, f_string_t *string) { - #ifndef _di_level_1_parameter_checking_ - if (!string) return F_status_set_error(F_parameter); - #endif // _di_level_1_parameter_checking_ - - f_status_t unmasked_code = F_status_set_fine(code); - - switch (unmasked_code) { - #ifndef _di_F_status_boolean_ - case F_false: - *string = FL_status_string_false; - break; - case F_true: - *string = FL_status_string_true; - break; - #endif // _di_F_status_boolean_ - - #ifndef _di_F_status_signal_ - // F_signal_hangup is not used because it has the same code as F_true. - case F_signal_interrupt: - *string = FL_status_string_signal_interrupt; - break; - case F_signal_quit: - *string = FL_status_string_signal_quit; - break; - case F_signal_illegal: - *string = FL_status_string_signal_illegal; - break; - case F_signal_trap: - *string = FL_status_string_signal_trap; - break; - case F_signal_abort: - *string = FL_status_string_signal_abort; - break; - case F_signal_bus_error: - *string = FL_status_string_signal_bus_error; - break; - case F_signal_floating_point_error: - *string = FL_status_string_signal_floating_point_error; - break; - case F_signal_kill: - *string = FL_status_string_signal_kill; - break; - case F_signal_user_1: - *string = FL_status_string_signal_user_1; - break; - case F_signal_segmentation_fault: - *string = FL_status_string_signal_segmentation_fault; - break; - case F_signal_user_2: - *string = FL_status_string_signal_user_2; - break; - case F_signal_broken_pipe: - *string = FL_status_string_signal_broken_pipe; - break; - case F_signal_alarm_clock: - *string = FL_status_string_signal_alarm_clock; - break; - case F_signal_termination: - *string = FL_status_string_signal_termination; - break; - case F_signal_stack_fault: - *string = FL_status_string_signal_stack_fault; - break; - case F_signal_child: - *string = FL_status_string_signal_child; - break; - case F_signal_continue: - *string = FL_status_string_signal_continue; - break; - case F_signal_stop: - *string = FL_status_string_signal_stop; - break; - case F_signal_keyboard_stop: - *string = FL_status_string_signal_keyboard_stop; - break; - case F_signal_tty_in: - *string = FL_status_string_signal_tty_in; - break; - case F_signal_tty_out: - *string = FL_status_string_signal_tty_out; - break; - case F_signal_urgent: - *string = FL_status_string_signal_urgent; - break; - case F_signal_cpu_limit: - *string = FL_status_string_signal_cpu_limit; - break; - case F_signal_file_size_limit: - *string = FL_status_string_signal_file_size_limit; - break; - case F_signal_virtual_alarm_clock: - *string = FL_status_string_signal_virtual_alarm_clock; - break; - case F_signal_profile_alarm_clock: - *string = FL_status_string_signal_profile_alarm_clock; - break; - case F_signal_window_size_change: - *string = FL_status_string_signal_window_size_change; - break; - case F_signal_pollable_event: - *string = FL_status_string_signal_pollable_event; - break; - case F_signal_power_failure: - *string = FL_status_string_signal_power_failure; - break; - case F_signal_bad_system_call: - *string = FL_status_string_signal_bad_system_call; - break; - case F_signal_reserved_32: - *string = FL_status_string_signal_reserved_32; - break; - case F_signal_reserved_33: - *string = FL_status_string_signal_reserved_33; - break; - case F_signal_reserved_34: - *string = FL_status_string_signal_reserved_34; - break; - case F_signal_reserved_35: - *string = FL_status_string_signal_reserved_35; - break; - case F_signal_reserved_36: - *string = FL_status_string_signal_reserved_36; - break; - case F_signal_reserved_37: - *string = FL_status_string_signal_reserved_37; - break; - case F_signal_reserved_38: - *string = FL_status_string_signal_reserved_38; - break; - case F_signal_reserved_39: - *string = FL_status_string_signal_reserved_39; - break; - case F_signal_reserved_40: - *string = FL_status_string_signal_reserved_40; - break; - case F_signal_reserved_41: - *string = FL_status_string_signal_reserved_41; - break; - case F_signal_reserved_42: - *string = FL_status_string_signal_reserved_42; - break; - case F_signal_reserved_43: - *string = FL_status_string_signal_reserved_43; - break; - case F_signal_reserved_44: - *string = FL_status_string_signal_reserved_44; - break; - case F_signal_reserved_45: - *string = FL_status_string_signal_reserved_45; - break; - case F_signal_reserved_46: - *string = FL_status_string_signal_reserved_46; - break; - case F_signal_reserved_47: - *string = FL_status_string_signal_reserved_47; - break; - case F_signal_reserved_48: - *string = FL_status_string_signal_reserved_48; - break; - case F_signal_reserved_49: - *string = FL_status_string_signal_reserved_49; - break; - case F_signal_reserved_50: - *string = FL_status_string_signal_reserved_50; - break; - case F_signal_reserved_51: - *string = FL_status_string_signal_reserved_51; - break; - case F_signal_reserved_52: - *string = FL_status_string_signal_reserved_52; - break; - case F_signal_reserved_53: - *string = FL_status_string_signal_reserved_53; - break; - case F_signal_reserved_54: - *string = FL_status_string_signal_reserved_54; - break; - case F_signal_reserved_55: - *string = FL_status_string_signal_reserved_55; - break; - case F_signal_reserved_56: - *string = FL_status_string_signal_reserved_56; - break; - case F_signal_reserved_57: - *string = FL_status_string_signal_reserved_57; - break; - case F_signal_reserved_58: - *string = FL_status_string_signal_reserved_58; - break; - case F_signal_reserved_59: - *string = FL_status_string_signal_reserved_59; - break; - case F_signal_reserved_60: - *string = FL_status_string_signal_reserved_60; - break; - case F_signal_reserved_61: - *string = FL_status_string_signal_reserved_61; - break; - case F_signal_reserved_62: - *string = FL_status_string_signal_reserved_62; - break; - case F_signal_reserved_63: - *string = FL_status_string_signal_reserved_63; - break; - case F_signal_reserved_64: - *string = FL_status_string_signal_reserved_64; - break; - #endif // _di_F_status_signal_ - - #ifndef _di_F_status_basic_ - case F_none: - *string = FL_status_string_none; - break; - case F_absolute: - *string = FL_status_string_absolute; - break; - case F_absolute_not: - *string = FL_status_string_absolute_not; - break; - case F_address: - *string = FL_status_string_address; - break; - case F_address_not: - *string = FL_status_string_address_not; - break; - case F_ascii: - *string = FL_status_string_ascii; - break; - case F_ascii_not: - *string = FL_status_string_ascii_not; - break; - case F_block: - *string = FL_status_string_block; - break; - case F_block_not: - *string = FL_status_string_block_not; - break; - case F_bound: - *string = FL_status_string_bound; - break; - case F_bound_not: - *string = FL_status_string_bound_not; - break; - case F_capability: - *string = FL_status_string_capability; - break; - case F_capability_not: - *string = FL_status_string_capability_not; - break; - case F_child: - *string = FL_status_string_child; - break; - case F_child_not: - *string = FL_status_string_child_not; - break; - case F_complete: - *string = FL_status_string_complete; - break; - case F_complete_not: - *string = FL_status_string_complete_not; - break; - case F_connected: - *string = FL_status_string_connected; - break; - case F_connected_not: - *string = FL_status_string_connected_not; - break; - case F_container: - *string = FL_status_string_container; - break; - case F_container_not: - *string = FL_status_string_container_not; - break; - case F_control: - *string = FL_status_string_control; - break; - case F_control_not: - *string = FL_status_string_control_not; - break; - case F_control_group: - *string = FL_status_string_control_group; - break; - case F_control_group_not: - *string = FL_status_string_control_group_not; - break; - case F_critical: - *string = FL_status_string_critical; - break; - case F_critical_not: - *string = FL_status_string_critical_not; - break; - case F_dead: - *string = FL_status_string_dead; - break; - case F_dead_not: - *string = FL_status_string_dead_not; - break; - case F_deadlock: - *string = FL_status_string_deadlock; - break; - case F_deadlock_not: - *string = FL_status_string_deadlock_not; - break; - case F_descriptor: - *string = FL_status_string_descriptor; - break; - case F_descriptor_not: - *string = FL_status_string_descriptor_not; - break; - case F_device: - *string = FL_status_string_device; - break; - case F_device_not: - *string = FL_status_string_device_not; - break; - case F_disable: - *string = FL_status_string_disable; - break; - case F_disable_not: - *string = FL_status_string_disable_not; - break; - case F_done: - *string = FL_status_string_done; - break; - case F_done_not: - *string = FL_status_string_done_not; - break; - case F_dummy: - *string = FL_status_string_dummy; - break; - case F_dummy_not: - *string = FL_status_string_dummy_not; - break; - case F_empty: - *string = FL_status_string_empty; - break; - case F_empty_not: - *string = FL_status_string_empty_not; - break; - case F_enable: - *string = FL_status_string_enable; - break; - case F_enable_not: - *string = FL_status_string_enable_not; - break; - case F_encoding: - *string = FL_status_string_encoding; - break; - case F_encoding_not: - *string = FL_status_string_encoding_not; - break; - case F_eoa: - *string = FL_status_string_eoa; - break; - case F_eoa_not: - *string = FL_status_string_eoa_not; - break; - case F_eof: - *string = FL_status_string_eof; - break; - case F_eof_not: - *string = FL_status_string_eof_not; - break; - case F_eol: - *string = FL_status_string_eol; - break; - case F_eol_not: - *string = FL_status_string_eol_not; - break; - case F_eos: - *string = FL_status_string_eos; - break; - case F_eos_not: - *string = FL_status_string_eos_not; - break; - case F_execute: - *string = FL_status_string_execute; - break; - case F_execute_not: - *string = FL_status_string_execute_not; - break; - case F_exist: - *string = FL_status_string_exist; - break; - case F_exist_not: - *string = FL_status_string_exist_not; - break; - case F_failure: - *string = FL_status_string_failure; - break; - case F_failure_not: - *string = FL_status_string_failure_not; - break; - case F_first: - *string = FL_status_string_first; - break; - case F_first_not: - *string = FL_status_string_first_not; - break; - case F_fork: - *string = FL_status_string_fork; - break; - case F_fork_not: - *string = FL_status_string_fork_not; - break; - case F_format: - *string = FL_status_string_format; - break; - case F_format_not: - *string = FL_status_string_format_not; - break; - case F_found: - *string = FL_status_string_found; - break; - case F_found_not: - *string = FL_status_string_found_not; - break; - case F_full: - *string = FL_status_string_full; - break; - case F_full_not: - *string = FL_status_string_full_not; - break; - case F_group: - *string = FL_status_string_group; - break; - case F_group_not: - *string = FL_status_string_group_not; - break; - case F_ignore: - *string = FL_status_string_ignore; - break; - case F_ignore_not: - *string = FL_status_string_ignore_not; - break; - case F_implemented: - *string = FL_status_string_implemented; - break; - case F_implemented_not: - *string = FL_status_string_implemented_not; - break; - case F_input: - *string = FL_status_string_input; - break; - case F_input_not: - *string = FL_status_string_input_not; - break; - case F_input_output: - *string = FL_status_string_input_output; - break; - case F_interrupt: - *string = FL_status_string_interrupt; - break; - case F_interrupt_not: - *string = FL_status_string_interrupt_not; - break; - case F_last: - *string = FL_status_string_last; - break; - case F_last_not: - *string = FL_status_string_last_not; - break; - case F_limit: - *string = FL_status_string_limit; - break; - case F_limit_not: - *string = FL_status_string_limit_not; - break; - case F_link: - *string = FL_status_string_link; - break; - case F_link_not: - *string = FL_status_string_link_not; - break; - case F_live: - *string = FL_status_string_live; - break; - case F_live_not: - *string = FL_status_string_live_not; - break; - case F_lock: - *string = FL_status_string_lock; - break; - case F_lock_not: - *string = FL_status_string_lock_not; - break; - case F_loop: - *string = FL_status_string_loop; - break; - case F_loop_not: - *string = FL_status_string_loop_not; - break; - case F_maybe: - *string = FL_status_string_maybe; - break; - 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; - case F_minor_not: - *string = FL_status_string_minor_not; - break; - case F_moderate: - *string = FL_status_string_moderate; - break; - case F_moderate_not: - *string = FL_status_string_moderate_not; - break; - case F_mount: - *string = FL_status_string_mount; - break; - case F_mount_not: - *string = FL_status_string_mount_not; - break; - case F_name: - *string = FL_status_string_name; - break; - case F_name_not: - *string = FL_status_string_name_not; - break; - case F_next: - *string = FL_status_string_next; - break; - case F_next_not: - *string = FL_status_string_next_not; - break; - case F_nice: - *string = FL_status_string_nice; - break; - case F_nice_not: - *string = FL_status_string_nice_not; - break; - case F_optional: - *string = FL_status_string_optional; - break; - case F_optional_not: - *string = FL_status_string_optional_not; - break; - case F_output: - *string = FL_status_string_output; - break; - case F_output_not: - *string = FL_status_string_output_not; - break; - case F_parameter: - *string = FL_status_string_parameter; - break; - case F_parameter_not: - *string = FL_status_string_parameter_not; - break; - case F_parent: - *string = FL_status_string_parent; - break; - case F_parent_not: - *string = FL_status_string_parent_not; - break; - case F_previous: - *string = FL_status_string_previous; - break; - case F_previous_not: - *string = FL_status_string_previous_not; - break; - case F_pipe: - *string = FL_status_string_pipe; - break; - case F_pipe_not: - *string = FL_status_string_pipe_not; - break; - case F_port: - *string = FL_status_string_port; - break; - case F_port_not: - *string = FL_status_string_port_not; - break; - case F_processor: - *string = FL_status_string_processor; - break; - case F_processor_not: - *string = FL_status_string_processor_not; - break; - case F_prohibited: - *string = FL_status_string_prohibited; - break; - case F_prohibited_not: - *string = FL_status_string_prohibited_not; - break; - case F_range: - *string = FL_status_string_range; - break; - case F_range_not: - *string = FL_status_string_range_not; - break; - case F_read: - *string = FL_status_string_read; - break; - case F_read_not: - *string = FL_status_string_read_not; - break; - case F_read_only: - *string = FL_status_string_read_only; - break; - case F_ready: - *string = FL_status_string_ready; - break; - case F_ready_not: - *string = FL_status_string_ready_not; - break; - case F_recover: - *string = FL_status_string_recover; - break; - case F_recover_not: - *string = FL_status_string_recover_not; - break; - case F_recurse: - *string = FL_status_string_recurse; - break; - case F_recurse_not: - *string = FL_status_string_recurse_not; - break; - case F_relative: - *string = FL_status_string_relative; - break; - case F_relative_not: - *string = FL_status_string_relative_not; - break; - case F_require: - *string = FL_status_string_require; - break; - case F_require_not: - *string = FL_status_string_require_not; - break; - case F_resource: - *string = FL_status_string_resource; - break; - case F_resource_not: - *string = FL_status_string_resource_not; - break; - case F_search: - *string = FL_status_string_search; - break; - case F_search_not: - *string = FL_status_string_search_not; - break; - case F_schedule: - *string = FL_status_string_schedule; - break; - case F_schedule_not: - *string = FL_status_string_schedule_not; - break; - case F_signal: - *string = FL_status_string_signal; - break; - case F_signal_not: - *string = FL_status_string_signal_not; - break; - case F_space: - *string = FL_status_string_space; - break; - case F_space_not: - *string = FL_status_string_space_not; - break; - case F_stop: - *string = FL_status_string_stop; - break; - case F_stop_not: - *string = FL_status_string_stop_not; - break; - case F_string: - *string = FL_status_string_string; - break; - case F_string_not: - *string = FL_status_string_string_not; - break; - case F_string_too_large: - *string = FL_status_string_string_too_large; - break; - case F_string_too_small: - *string = FL_status_string_string_too_small; - break; - case F_syntax: - *string = FL_status_string_syntax; - break; - case F_syntax_not: - *string = FL_status_string_syntax_not; - break; - case F_thread: - *string = FL_status_string_thread; - break; - case F_thread_not: - *string = FL_status_string_thread_not; - break; - case F_time: - *string = FL_status_string_time; - break; - case F_time_not: - *string = FL_status_string_time_not; - break; - case F_too_large: - *string = FL_status_string_too_large; - break; - case F_too_small: - *string = FL_status_string_too_small; - break; - case F_known: - *string = FL_status_string_known; - break; - case F_known_not: - *string = FL_status_string_known_not; - break; - case F_success: - *string = FL_status_string_success; - break; - case F_success_not: - *string = FL_status_string_success_not; - break; - case F_supported: - *string = FL_status_string_supported; - break; - case F_supported_not: - *string = FL_status_string_supported_not; - break; - case F_user: - *string = FL_status_string_user; - break; - case F_user_not: - *string = FL_status_string_user_not; - break; - case F_utf: - *string = FL_status_string_utf; - break; - case F_utf_fragment: - *string = FL_status_string_utf_fragment; - break; - case F_utf_fragment_not: - *string = FL_status_string_utf_fragment_not; - break; - case F_utf_not: - *string = FL_status_string_utf_not; - break; - case F_valid: - *string = FL_status_string_valid; - break; - case F_valid_not: - *string = FL_status_string_valid_not; - break; - case F_value: - *string = FL_status_string_value; - break; - case F_value_not: - *string = FL_status_string_value_not; - break; - case F_wait: - *string = FL_status_string_wait; - break; - case F_wait_not: - *string = FL_status_string_wait_not; - break; - case F_warn: - *string = FL_status_string_warn; - break; - case F_warn_not: - *string = FL_status_string_warn_not; - break; - case F_world: - *string = FL_status_string_world; - break; - case F_world_not: - *string = FL_status_string_world_not; - break; - case F_write: - *string = FL_status_string_write; - break; - case F_write_not: - *string = FL_status_string_write_not; - break; - case F_write_only: - *string = FL_status_string_write_only; - break; - #endif // _di_F_status_basic_ - - #ifndef _di_F_status_array_ - case F_array: - *string = FL_status_string_array; - break; - case F_array_not: - *string = FL_status_string_array_not; - break; - case F_array_too_large: - *string = FL_status_string_array_too_large; - break; - case F_array_too_small: - *string = FL_status_string_array_too_small; - break; - #endif // _di_F_status_array_ - - #ifndef _di_F_status_available_ - case F_available: - *string = FL_status_string_available; - break; - case F_available_not: - *string = FL_status_string_available_not; - break; - case F_available_not_address: - *string = FL_status_string_available_not_address; - break; - case F_available_not_buffer: - *string = FL_status_string_available_not_buffer; - break; - case F_available_not_device: - *string = FL_status_string_available_not_device; - break; - case F_available_not_pipe: - *string = FL_status_string_available_not_pipe; - break; - case F_available_not_port: - *string = FL_status_string_available_not_port; - break; - case F_available_not_process: - *string = FL_status_string_available_not_process; - break; - case F_available_not_socket: - *string = FL_status_string_available_not_socket; - break; - #endif // _di_F_status_available_ - - #ifndef _di_F_status_busy_ - case F_busy: - *string = FL_status_string_busy; - break; - case F_busy_address: - *string = FL_status_string_busy_address; - break; - case F_busy_buffer: - *string = FL_status_string_busy_buffer; - break; - case F_busy_device: - *string = FL_status_string_busy_device; - break; - case F_busy_not: - *string = FL_status_string_busy_not; - break; - case F_busy_pipe: - *string = FL_status_string_busy_pipe; - break; - case F_busy_port: - *string = FL_status_string_busy_port; - break; - case F_busy_process: - *string = FL_status_string_busy_process; - break; - case F_busy_socket: - *string = FL_status_string_busy_socket; - break; - #endif // _di_F_status_busy_ - - #ifndef _di_F_status_number_ - case F_number: - *string = FL_status_string_number; - break; - case F_number_decimal: - *string = FL_status_string_number_decimal; - break; - case F_number_decimal_not: - *string = FL_status_string_number_decimal_not; - break; - case F_number_divide_by_zero: - *string = FL_status_string_number_divide_by_zero; - break; - case F_number_negative: - *string = FL_status_string_number_negative; - break; - case F_number_negative_not: - *string = FL_status_string_number_negative_not; - break; - case F_number_not: - *string = FL_status_string_number_not; - break; - case F_number_overflow: - *string = FL_status_string_number_overflow; - break; - case F_number_positive: - *string = FL_status_string_number_positive; - break; - case F_number_positive_not: - *string = FL_status_string_number_positive_not; - break; - case F_number_too_large: - *string = FL_status_string_number_too_large; - break; - case F_number_too_small: - *string = FL_status_string_number_too_small; - break; - case F_number_underflow: - *string = FL_status_string_number_underflow; - break; - case F_number_whole: - *string = FL_status_string_number_whole; - break; - case F_number_whole_not: - *string = FL_status_string_number_whole_not; - break; - case F_number_zero: - *string = FL_status_string_number_zero; - break; - case F_number_zero_not: - *string = FL_status_string_number_zero_not; - break; - #endif // _di_F_status_number_ - - #ifndef _di_F_status_buffers_ - case F_buffer: - *string = FL_status_string_buffer; - break; - case F_buffer_not: - *string = FL_status_string_buffer_not; - break; - case F_buffer_too_large: - *string = FL_status_string_buffer_too_large; - break; - case F_buffer_too_small: - *string = FL_status_string_buffer_too_small; - break; - case F_complete_not_utf_block: - *string = FL_status_string_complete_not_utf_block; - break; - case F_complete_not_utf_eoa: - *string = FL_status_string_complete_not_utf_eoa; - break; - case F_complete_not_utf_eof: - *string = FL_status_string_complete_not_utf_eof; - break; - case F_complete_not_utf_eol: - *string = FL_status_string_complete_not_utf_eol; - break; - case F_complete_not_utf_eos: - *string = FL_status_string_complete_not_utf_eos; - break; - case F_complete_not_utf_stop: - *string = FL_status_string_complete_not_utf_stop; - break; - case F_none_block: - *string = FL_status_string_none_block; - break; - case F_none_eoa: - *string = FL_status_string_none_eoa; - break; - case F_none_eof: - *string = FL_status_string_none_eof; - break; - case F_none_eol: - *string = FL_status_string_none_eol; - break; - case F_none_eos: - *string = FL_status_string_none_eos; - break; - case F_none_stop: - *string = FL_status_string_none_stop; - break; - case F_data: - *string = FL_status_string_data; - break; - case F_data_not: - *string = FL_status_string_data_not; - break; - case F_data_not_block: - *string = FL_status_string_data_not_block; - break; - case F_data_not_eoa: - *string = FL_status_string_data_not_eoa; - break; - case F_data_not_eof: - *string = FL_status_string_data_not_eof; - break; - case F_data_not_eol: - *string = FL_status_string_data_not_eol; - break; - case F_data_not_eos: - *string = FL_status_string_data_not_eos; - break; - case F_data_not_stop: - *string = FL_status_string_data_not_stop; - break; - case F_terminated: - *string = FL_status_string_terminated; - break; - case F_terminated_not: - *string = FL_status_string_terminated_not; - break; - case F_terminated_not_block: - *string = FL_status_string_terminated_not_block; - break; - case F_terminated_not_eoa: - *string = FL_status_string_terminated_not_eoa; - break; - case F_terminated_not_eof: - *string = FL_status_string_terminated_not_eof; - break; - case F_terminated_not_eol: - *string = FL_status_string_terminated_not_eol; - break; - case F_terminated_not_eos: - *string = FL_status_string_terminated_not_eos; - break; - case F_terminated_not_group: - *string = FL_status_string_terminated_not_group; - break; - case F_terminated_not_group_block: - *string = FL_status_string_terminated_not_group_block; - break; - case F_terminated_not_group_eoa: - *string = FL_status_string_terminated_not_group_eoa; - break; - case F_terminated_not_group_eof: - *string = FL_status_string_terminated_not_group_eof; - break; - case F_terminated_not_group_eol: - *string = FL_status_string_terminated_not_group_eol; - break; - case F_terminated_not_group_eos: - *string = FL_status_string_terminated_not_group_eos; - break; - case F_terminated_not_group_stop: - *string = FL_status_string_terminated_not_group_stop; - break; - case F_terminated_not_nest: - *string = FL_status_string_terminated_not_nest; - break; - case F_terminated_not_nest_block: - *string = FL_status_string_terminated_not_nest_block; - break; - case F_terminated_not_nest_eoa: - *string = FL_status_string_terminated_not_nest_eoa; - break; - case F_terminated_not_nest_eof: - *string = FL_status_string_terminated_not_nest_eof; - break; - case F_terminated_not_nest_eol: - *string = FL_status_string_terminated_not_nest_eol; - break; - case F_terminated_not_nest_eos: - *string = FL_status_string_terminated_not_nest_eos; - break; - case F_terminated_not_nest_stop: - *string = FL_status_string_terminated_not_nest_stop; - break; - case F_terminated_not_stop: - *string = FL_status_string_terminated_not_stop; - break; - #endif // _di_F_status_buffers_ - - #ifndef _di_F_status_process_ - case F_process: - *string = FL_status_string_process; - break; - case F_process_not: - *string = FL_status_string_process_not; - break; - case F_process_too_many: - *string = FL_status_string_process_too_many; - break; - #endif // _di_F_status_process_ - - #ifndef _di_F_status_file_ - case F_file: - *string = FL_status_string_file; - break; - case F_file_close: - *string = FL_status_string_file_close; - break; - case F_file_closed: - *string = FL_status_string_file_closed; - break; - case F_file_descriptor: - *string = FL_status_string_file_descriptor; - break; - case F_file_descriptor_max: - *string = FL_status_string_file_descriptor_max; - break; - case F_file_descriptor_not: - *string = FL_status_string_file_descriptor_not; - break; - case F_file_empty: - *string = FL_status_string_file_empty; - break; - case F_file_flush: - *string = FL_status_string_file_flush; - break; - case F_file_found: - *string = FL_status_string_file_found; - break; - case F_file_found_not: - *string = FL_status_string_file_found_not; - break; - case F_file_not: - *string = FL_status_string_file_not; - break; - case F_file_open: - *string = FL_status_string_file_open; - break; - case F_file_open_max: - *string = FL_status_string_file_open_max; - break; - case F_file_opened: - *string = FL_status_string_file_opened; - break; - case F_file_overflow: - *string = FL_status_string_file_overflow; - break; - case F_file_purge: - *string = FL_status_string_file_purge; - break; - case F_file_read: - *string = FL_status_string_file_read; - break; - case F_file_reallocation: - *string = FL_status_string_file_reallocation; - break; - case F_file_seek: - *string = FL_status_string_file_seek; - break; - case F_file_stat: - *string = FL_status_string_file_stat; - break; - case F_file_synchronize: - *string = FL_status_string_file_synchronize; - break; - case F_file_type_block: - *string = FL_status_string_file_type_block; - break; - case F_file_type_character: - *string = FL_status_string_file_type_character; - break; - case F_file_type_directory: - *string = FL_status_string_file_type_directory; - break; - case F_file_type_fifo: - *string = FL_status_string_file_type_fifo; - break; - case F_file_type_link: - *string = FL_status_string_file_type_link; - break; - case F_file_type_not_character: - *string = FL_status_string_file_type_not_character; - break; - case F_file_type_not_directory: - *string = FL_status_string_file_type_not_directory; - break; - case F_file_type_not_fifo: - *string = FL_status_string_file_type_not_fifo; - break; - case F_file_type_not_link: - *string = FL_status_string_file_type_not_link; - break; - case F_file_type_not_pipe: - *string = FL_status_string_file_type_not_pipe; - break; - case F_file_type_not_regular: - *string = FL_status_string_file_type_not_regular; - break; - case F_file_type_not_socket: - *string = FL_status_string_file_type_not_socket; - break; - case F_file_type_not_unknown: - *string = FL_status_string_file_type_not_unknown; - break; - case F_file_type_pipe: - *string = FL_status_string_file_type_pipe; - break; - case F_file_type_regular: - *string = FL_status_string_file_type_regular; - break; - case F_file_type_socket: - *string = FL_status_string_file_type_socket; - break; - case F_file_type_unknown: - *string = FL_status_string_file_type_unknown; - break; - case F_file_underflow: - *string = FL_status_string_file_underflow; - break; - case F_file_utf: - *string = FL_status_string_file_utf; - break; - case F_file_utf_not: - *string = FL_status_string_file_utf_not; - break; - case F_file_write: - *string = FL_status_string_file_write; - break; - #endif // _di_F_status_file_ - - #ifndef _di_F_status_filesystem_ - case F_filesystem: - *string = FL_status_string_filesystem; - break; - case F_filesystem_not: - *string = FL_status_string_filesystem_not; - break; - case F_filesystem_quota_block: - *string = FL_status_string_filesystem_quota_block; - break; - case F_filesystem_quota_reached: - *string = FL_status_string_filesystem_quota_reached; - break; - #endif // _di_F_status_filesystem_ - - #ifndef _di_F_status_directory_ - case F_directory: - *string = FL_status_string_directory; - break; - case F_directory_close: - *string = FL_status_string_directory_close; - break; - case F_directory_closed: - *string = FL_status_string_directory_closed; - break; - case F_directory_descriptor: - *string = FL_status_string_directory_descriptor; - break; - case F_directory_empty: - *string = FL_status_string_directory_empty; - break; - case F_directory_empty_not: - *string = FL_status_string_directory_empty_not; - break; - case F_directory_found: - *string = FL_status_string_directory_found; - break; - case F_directory_found_not: - *string = FL_status_string_directory_found_not; - break; - case F_directory_flush: - *string = FL_status_string_directory_flush; - break; - case F_directory_link_max: - *string = FL_status_string_directory_link_max; - break; - case F_directory_not: - *string = FL_status_string_directory_not; - break; - case F_directory_open: - *string = FL_status_string_directory_open; - break; - case F_directory_purge: - *string = FL_status_string_directory_purge; - break; - case F_directory_read: - *string = FL_status_string_directory_read; - break; - case F_directory_stream: - *string = FL_status_string_directory_stream; - break; - case F_directory_synchronize: - *string = FL_status_string_directory_synchronize; - break; - case F_directory_supported_not: - *string = FL_status_string_directory_supported_not; - break; - case F_directory_utf: - *string = FL_status_string_directory_utf; - break; - case F_directory_utf_not: - *string = FL_status_string_directory_utf_not; - break; - case F_directory_write: - *string = FL_status_string_directory_utf_not; - break; - #endif // _di_F_status_directory_ - - #ifndef _di_F_status_socket_ - case F_socket: - *string = FL_status_string_socket; - break; - case F_socket_client: - *string = FL_status_string_socket_client; - break; - case F_socket_not: - *string = FL_status_string_socket_not; - break; - case F_socket_receive: - *string = FL_status_string_socket_receive; - break; - case F_socket_send: - *string = FL_status_string_socket_send; - break; - case F_socket_target: - *string = FL_status_string_socket_target; - break; - #endif // _di_F_status_socket_ - - #ifndef _di_F_error_compare_ - case F_equal_to: - *string = FL_status_string_equal_to; - break; - case F_equal_to_not: - *string = FL_status_string_equal_to_not; - break; - case F_than_greater: - *string = FL_status_string_than_greater; - break; - case F_than_less: - *string = FL_status_string_than_less; - break; - #endif // _di_F_status_compare_ - - #ifndef _di_F_status_access_ - case F_access: - *string = FL_status_string_access; - break; - case F_access_denied: - *string = FL_status_string_access_denied; - break; - case F_access_denied_user: - *string = FL_status_string_access_denied_user; - break; - case F_access_denied_group: - *string = FL_status_string_access_denied_group; - break; - case F_access_denied_world: - *string = FL_status_string_access_denied_world; - break; - case F_access_denied_read: - *string = FL_status_string_access_denied_read; - break; - case F_access_denied_write: - *string = FL_status_string_access_denied_write; - break; - case F_access_denied_execute: - *string = FL_status_string_access_denied_execute; - break; - case F_access_denied_super: - *string = FL_status_string_access_denied_super; - break; - case F_access_granted: - *string = FL_status_string_access_granted; - break; - case F_access_granted_user: - *string = FL_status_string_access_granted_user; - break; - case F_access_granted_group: - *string = FL_status_string_access_granted_group; - break; - case F_access_granted_world: - *string = FL_status_string_access_granted_world; - break; - case F_access_granted_read: - *string = FL_status_string_access_granted_read; - break; - case F_access_granted_write: - *string = FL_status_string_access_granted_write; - break; - case F_access_granted_execute: - *string = FL_status_string_access_granted_execute; - break; - case F_access_granted_super: - *string = FL_status_string_access_granted_super; - break; - case F_access_group: - *string = FL_status_string_access_group; - break; - case F_access_mode: - *string = FL_status_string_access_mode; - break; - case F_access_not: - *string = FL_status_string_access_not; - break; - case F_access_owner: - *string = FL_status_string_access_owner; - break; - #endif // _di_F_status_access_ - - #ifndef _di_F_status_terminal_ - case F_terminal: - *string = FL_status_string_terminal; - break; - case F_terminal_access: - *string = FL_status_string_terminal_access; - break; - case F_terminal_known: - *string = FL_status_string_terminal_known; - break; - case F_terminal_known_not: - *string = FL_status_string_terminal_known_not; - break; - case F_terminal_not: - *string = FL_status_string_terminal_not; - break; - case F_terminal_prohibited: - *string = FL_status_string_terminal_prohibited; - break; - case F_terminal_read: - *string = FL_status_string_terminal_read; - break; - case F_terminal_valid: - *string = FL_status_string_terminal_valid; - break; - case F_terminal_valid_not: - *string = FL_status_string_terminal_valid_not; - break; - case F_terminal_write: - *string = FL_status_string_terminal_write; - break; - #endif // _di_F_status_terminal_ - - case F_status_code_last: - *string = FL_status_string_status_code_last; - break; - - default: - *string = 0; - - return F_status_set_error(F_data); - } - - return F_none; - } -#endif // _di_fl_status_to_string_ - -#ifdef __cplusplus -} // extern "C" -#endif diff --git a/level_1/fl_status/c/status.h b/level_1/fl_status/c/status.h deleted file mode 100644 index 752cdea..0000000 --- a/level_1/fl_status/c/status.h +++ /dev/null @@ -1,1030 +0,0 @@ -/** - * FLL - Level 1 - * - * Project: Status - * API Version: 0.5 - * Licenses: lgpl-2.1-or-later - * - * Provides status code functions, such as those that translate status codes into strings. - */ -#ifndef _FL_status_h -#define _FL_status_h - -// fll-0 includes -#include -#include -#include -#include -#include - -#ifdef __cplusplus -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" - #define FL_status_string_true "F_true" - - #define FL_status_string_false_length 7 - #define FL_status_string_true_length 6 - #endif // _di_F_status_boolean_ - - #ifndef _di_F_status_signal_ - #define FL_status_string_signal_hangup "F_signal_hangup" - #define FL_status_string_signal_interrupt "F_signal_interrupt" - #define FL_status_string_signal_quit "F_signal_quit" - #define FL_status_string_signal_illegal "F_signal_illegal" - #define FL_status_string_signal_trap "F_signal_trap" - #define FL_status_string_signal_abort "F_signal_abort" - #define FL_status_string_signal_bus_error "F_signal_bus_error" - #define FL_status_string_signal_floating_point_error "F_signal_floating_point_error" - #define FL_status_string_signal_kill "F_signal_kill" - #define FL_status_string_signal_user_1 "F_signal_user_1" - #define FL_status_string_signal_segmentation_fault "F_signal_segmentation_fault" - #define FL_status_string_signal_user_2 "F_signal_user_2" - #define FL_status_string_signal_broken_pipe "F_signal_broken_pipe" - #define FL_status_string_signal_alarm_clock "F_signal_alarm_clock" - #define FL_status_string_signal_termination "F_signal_termination" - #define FL_status_string_signal_stack_fault "F_signal_stack_fault" - #define FL_status_string_signal_child "F_signal_child" - #define FL_status_string_signal_continue "F_signal_continue" - #define FL_status_string_signal_stop "F_signal_stop" - #define FL_status_string_signal_keyboard_stop "F_signal_keyboard_stop" - #define FL_status_string_signal_tty_in "F_signal_tty_in" - #define FL_status_string_signal_tty_out "F_signal_tty_out" - #define FL_status_string_signal_urgent "F_signal_urgent" - #define FL_status_string_signal_cpu_limit "F_signal_cpu_limit" - #define FL_status_string_signal_file_size_limit "F_signal_file_size_limit" - #define FL_status_string_signal_virtual_alarm_clock "F_signal_virtual_alarm_clock" - #define FL_status_string_signal_profile_alarm_clock "F_signal_profile_alarm_clock" - #define FL_status_string_signal_window_size_change "F_signal_window_size_change" - #define FL_status_string_signal_pollable_event "F_signal_pollable_event" - #define FL_status_string_signal_power_failure "F_signal_power_failure" - #define FL_status_string_signal_bad_system_call "F_signal_bad_system_call" - #define FL_status_string_signal_reserved_32 "F_signal_reserved_32" - #define FL_status_string_signal_reserved_33 "F_signal_reserved_33" - #define FL_status_string_signal_reserved_34 "F_signal_reserved_34" - #define FL_status_string_signal_reserved_35 "F_signal_reserved_35" - #define FL_status_string_signal_reserved_36 "F_signal_reserved_36" - #define FL_status_string_signal_reserved_37 "F_signal_reserved_37" - #define FL_status_string_signal_reserved_38 "F_signal_reserved_38" - #define FL_status_string_signal_reserved_39 "F_signal_reserved_39" - #define FL_status_string_signal_reserved_40 "F_signal_reserved_40" - #define FL_status_string_signal_reserved_41 "F_signal_reserved_41" - #define FL_status_string_signal_reserved_42 "F_signal_reserved_42" - #define FL_status_string_signal_reserved_43 "F_signal_reserved_43" - #define FL_status_string_signal_reserved_44 "F_signal_reserved_44" - #define FL_status_string_signal_reserved_45 "F_signal_reserved_45" - #define FL_status_string_signal_reserved_46 "F_signal_reserved_46" - #define FL_status_string_signal_reserved_47 "F_signal_reserved_47" - #define FL_status_string_signal_reserved_48 "F_signal_reserved_48" - #define FL_status_string_signal_reserved_49 "F_signal_reserved_49" - #define FL_status_string_signal_reserved_50 "F_signal_reserved_50" - #define FL_status_string_signal_reserved_51 "F_signal_reserved_51" - #define FL_status_string_signal_reserved_52 "F_signal_reserved_52" - #define FL_status_string_signal_reserved_53 "F_signal_reserved_53" - #define FL_status_string_signal_reserved_54 "F_signal_reserved_54" - #define FL_status_string_signal_reserved_55 "F_signal_reserved_55" - #define FL_status_string_signal_reserved_56 "F_signal_reserved_56" - #define FL_status_string_signal_reserved_57 "F_signal_reserved_57" - #define FL_status_string_signal_reserved_58 "F_signal_reserved_58" - #define FL_status_string_signal_reserved_59 "F_signal_reserved_59" - #define FL_status_string_signal_reserved_60 "F_signal_reserved_60" - #define FL_status_string_signal_reserved_61 "F_signal_reserved_61" - #define FL_status_string_signal_reserved_62 "F_signal_reserved_62" - #define FL_status_string_signal_reserved_63 "F_signal_reserved_63" - #define FL_status_string_signal_reserved_64 "F_signal_reserved_64" - - #define FL_status_string_signal_hangup_length 15 - #define FL_status_string_signal_interrupt_length 18 - #define FL_status_string_signal_quit_length 13 - #define FL_status_string_signal_illegal_length 16 - #define FL_status_string_signal_trap_length 13 - #define FL_status_string_signal_abort_length 14 - #define FL_status_string_signal_bus_error_length 17 - #define FL_status_string_signal_floating_point_error_length 33 - #define FL_status_string_signal_kill_length 13 - #define FL_status_string_signal_user_1_length 15 - #define FL_status_string_signal_segmentation_fault_length 27 - #define FL_status_string_signal_user_2_length 15 - #define FL_status_string_signal_broken_pipe_length 20 - #define FL_status_string_signal_alarm_clock_length 20 - #define FL_status_string_signal_termination_length 20 - #define FL_status_string_signal_stack_fault_length 20 - #define FL_status_string_signal_child_length 14 - #define FL_status_string_signal_continue_length 17 - #define FL_status_string_signal_stop_length 13 - #define FL_status_string_signal_keyboard_stop_length 22 - #define FL_status_string_signal_tty_in_length 15 - #define FL_status_string_signal_tty_out_length 16 - #define FL_status_string_signal_urgent_length 15 - #define FL_status_string_signal_cpu_limit_length 18 - #define FL_status_string_signal_file_size_limit_length 24 - #define FL_status_string_signal_virtual_alarm_clock_length 28 - #define FL_status_string_signal_profile_alarm_clock_length 28 - #define FL_status_string_signal_window_size_change_length 27 - #define FL_status_string_signal_pollable_event_length 23 - #define FL_status_string_signal_power_failure_length 22 - #define FL_status_string_signal_bad_system_call_length 24 - #define FL_status_string_signal_reserved_32_length 20 - #define FL_status_string_signal_reserved_33_length 20 - #define FL_status_string_signal_reserved_34_length 20 - #define FL_status_string_signal_reserved_35_length 20 - #define FL_status_string_signal_reserved_36_length 20 - #define FL_status_string_signal_reserved_37_length 20 - #define FL_status_string_signal_reserved_38_length 20 - #define FL_status_string_signal_reserved_39_length 20 - #define FL_status_string_signal_reserved_40_length 20 - #define FL_status_string_signal_reserved_41_length 20 - #define FL_status_string_signal_reserved_42_length 20 - #define FL_status_string_signal_reserved_43_length 20 - #define FL_status_string_signal_reserved_44_length 20 - #define FL_status_string_signal_reserved_45_length 20 - #define FL_status_string_signal_reserved_46_length 20 - #define FL_status_string_signal_reserved_47_length 20 - #define FL_status_string_signal_reserved_48_length 20 - #define FL_status_string_signal_reserved_49_length 20 - #define FL_status_string_signal_reserved_50_length 20 - #define FL_status_string_signal_reserved_51_length 20 - #define FL_status_string_signal_reserved_52_length 20 - #define FL_status_string_signal_reserved_53_length 20 - #define FL_status_string_signal_reserved_54_length 20 - #define FL_status_string_signal_reserved_55_length 20 - #define FL_status_string_signal_reserved_56_length 20 - #define FL_status_string_signal_reserved_57_length 20 - #define FL_status_string_signal_reserved_58_length 20 - #define FL_status_string_signal_reserved_59_length 20 - #define FL_status_string_signal_reserved_60_length 20 - #define FL_status_string_signal_reserved_61_length 20 - #define FL_status_string_signal_reserved_62_length 20 - #define FL_status_string_signal_reserved_63_length 20 - #define FL_status_string_signal_reserved_64_length 20 - #endif // _di_F_status_signal_ - - #ifndef _di_F_status_basic_ - #define FL_status_string_none "F_none" - #define FL_status_string_absolute "F_absolute" - #define FL_status_string_absolute_not "F_absolute_not" - #define FL_status_string_address "F_address" - #define FL_status_string_address_not "F_address_not" - #define FL_status_string_ascii "F_ascii" - #define FL_status_string_ascii_not "F_ascii_not" - #define FL_status_string_block "F_block" - #define FL_status_string_block_not "F_block_not" - #define FL_status_string_bound "F_bound" - #define FL_status_string_bound_not "F_bound_not" - #define FL_status_string_capability "F_capability" - #define FL_status_string_capability_not "F_capability_not" - #define FL_status_string_child "F_child" - #define FL_status_string_child_not "F_child_not" - #define FL_status_string_complete "F_complete" - #define FL_status_string_complete_not "F_complete_not" - #define FL_status_string_connected "F_connected" - #define FL_status_string_connected_not "F_connected_not" - #define FL_status_string_container "F_container" - #define FL_status_string_container_not "F_container_not" - #define FL_status_string_control "F_control" - #define FL_status_string_control_not "F_control_not" - #define FL_status_string_control_group "F_control_group" - #define FL_status_string_control_group_not "F_control_group_not" - #define FL_status_string_critical "F_critical" - #define FL_status_string_critical_not "F_critical_not" - #define FL_status_string_dead "F_dead" - #define FL_status_string_dead_not "F_dead_not" - #define FL_status_string_deadlock "F_deadlock" - #define FL_status_string_deadlock_not "F_deadlock_not" - #define FL_status_string_descriptor "F_descriptor" - #define FL_status_string_descriptor_not "F_descriptor_not" - #define FL_status_string_device "F_device" - #define FL_status_string_device_not "F_device_not" - #define FL_status_string_disable "F_disable" - #define FL_status_string_disable_not "F_disable_not" - #define FL_status_string_done "F_done" - #define FL_status_string_done_not "F_done_not" - #define FL_status_string_dummy "F_dummy" - #define FL_status_string_dummy_not "F_dummy_not" - #define FL_status_string_empty "F_empty" - #define FL_status_string_empty_not "F_empty_not" - #define FL_status_string_enable "F_enable" - #define FL_status_string_enable_not "F_enable_not" - #define FL_status_string_encoding "F_encoding" - #define FL_status_string_encoding_not "F_encoding_not" - #define FL_status_string_eoa "F_eoa" - #define FL_status_string_eoa_not "F_eoa_not" - #define FL_status_string_eof "F_eof" - #define FL_status_string_eof_not "F_eof_not" - #define FL_status_string_eol "F_eol" - #define FL_status_string_eol_not "F_eol_not" - #define FL_status_string_eos "F_eos" - #define FL_status_string_eos_not "F_eos_not" - #define FL_status_string_execute "F_execute" - #define FL_status_string_execute_not "F_execute_not" - #define FL_status_string_exist "F_exist" - #define FL_status_string_exist_not "F_exist_not" - #define FL_status_string_failure "F_failure" - #define FL_status_string_failure_not "F_failure_not" - #define FL_status_string_first "F_first" - #define FL_status_string_first_not "F_first_not" - #define FL_status_string_fork "F_fork" - #define FL_status_string_fork_not "F_fork_not" - #define FL_status_string_format "F_format" - #define FL_status_string_format_not "F_format_not" - #define FL_status_string_found "F_found" - #define FL_status_string_found_not "F_found_not" - #define FL_status_string_full "F_full" - #define FL_status_string_full_not "F_full_not" - #define FL_status_string_group "F_group" - #define FL_status_string_group_not "F_group_not" - #define FL_status_string_ignore "F_ignore" - #define FL_status_string_ignore_not "F_ignore_not" - #define FL_status_string_implemented "F_implemented" - #define FL_status_string_implemented_not "F_implemented_not" - #define FL_status_string_input "F_input" - #define FL_status_string_input_not "F_input_not" - #define FL_status_string_input_output "F_input_output" - #define FL_status_string_interrupt "F_interrupt" - #define FL_status_string_interrupt_not "F_interrupt_not" - #define FL_status_string_known "F_known" - #define FL_status_string_known_not "F_known_not" - #define FL_status_string_last "F_last" - #define FL_status_string_last_not "F_last_not" - #define FL_status_string_limit "F_limit" - #define FL_status_string_limit_not "F_limit_not" - #define FL_status_string_link "F_link" - #define FL_status_string_link_not "F_link_not" - #define FL_status_string_live "F_live" - #define FL_status_string_live_not "F_live_not" - #define FL_status_string_lock "F_lock" - #define FL_status_string_lock_not "F_lock_not" - #define FL_status_string_loop "F_loop" - #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" - #define FL_status_string_moderate_not "F_moderate_not" - #define FL_status_string_mount "F_mount" - #define FL_status_string_mount_not "F_mount_not" - #define FL_status_string_name "F_name" - #define FL_status_string_name_not "F_name_not" - #define FL_status_string_next "F_next" - #define FL_status_string_next_not "F_next_not" - #define FL_status_string_nice "F_nice" - #define FL_status_string_nice_not "F_nice_not" - #define FL_status_string_optional "F_optional" - #define FL_status_string_optional_not "F_optional_not" - #define FL_status_string_output "F_output" - #define FL_status_string_output_not "F_output_not" - #define FL_status_string_parameter "F_parameter" - #define FL_status_string_parameter_not "F_parameter_not" - #define FL_status_string_parent "F_parent" - #define FL_status_string_parent_not "F_parent_not" - #define FL_status_string_previous "F_previous" - #define FL_status_string_previous_not "F_previous_not" - #define FL_status_string_pipe "F_pipe" - #define FL_status_string_pipe_not "F_pipe_not" - #define FL_status_string_port "F_port" - #define FL_status_string_port_not "F_port_not" - #define FL_status_string_processor "F_processor" - #define FL_status_string_processor_not "F_processor_not" - #define FL_status_string_prohibited "F_prohibited" - #define FL_status_string_prohibited_not "F_prohibited_not" - #define FL_status_string_range "F_range" - #define FL_status_string_range_not "F_range_not" - #define FL_status_string_read "F_read" - #define FL_status_string_read_not "F_read_not" - #define FL_status_string_read_only "F_read_only" - #define FL_status_string_ready "F_ready" - #define FL_status_string_ready_not "F_ready_not" - #define FL_status_string_recover "F_recover" - #define FL_status_string_recover_not "F_recover_not" - #define FL_status_string_recurse "F_recurse" - #define FL_status_string_recurse_not "F_recurse_not" - #define FL_status_string_relative "F_relative" - #define FL_status_string_relative_not "F_relative_not" - #define FL_status_string_require "F_require" - #define FL_status_string_require_not "F_require_not" - #define FL_status_string_resource "F_resource" - #define FL_status_string_resource_not "F_resource_not" - #define FL_status_string_search "F_search" - #define FL_status_string_search_not "F_search_not" - #define FL_status_string_schedule "F_schedule" - #define FL_status_string_schedule_not "F_schedule_not" - #define FL_status_string_signal "F_signal" - #define FL_status_string_signal_not "F_signal_not" - #define FL_status_string_space "F_space" - #define FL_status_string_space_not "F_space_not" - #define FL_status_string_stop "F_stop" - #define FL_status_string_stop_not "F_stop_not" - #define FL_status_string_string "F_string" - #define FL_status_string_string_not "F_string_not" - #define FL_status_string_string_too_large "F_string_too_large" - #define FL_status_string_string_too_small "F_string_too_small" - #define FL_status_string_syntax "F_syntax" - #define FL_status_string_syntax_not "F_syntax_not" - #define FL_status_string_thread "F_thread" - #define FL_status_string_thread_not "F_thread_not" - #define FL_status_string_time "F_time" - #define FL_status_string_time_not "F_time_not" - #define FL_status_string_too_large "F_too_large" - #define FL_status_string_too_small "F_too_small" - #define FL_status_string_success "F_success" - #define FL_status_string_success_not "F_success_not" - #define FL_status_string_supported "F_supported" - #define FL_status_string_supported_not "F_supported_not" - #define FL_status_string_user "F_user" - #define FL_status_string_user_not "F_user_not" - #define FL_status_string_utf "F_utf" - #define FL_status_string_utf_fragment "F_utf_fragment" - #define FL_status_string_utf_fragment_not "F_utf_fragment_not" - #define FL_status_string_utf_not "F_utf_not" - #define FL_status_string_valid "F_valid" - #define FL_status_string_valid_not "F_valid_not" - #define FL_status_string_value "F_value" - #define FL_status_string_value_not "F_value_not" - #define FL_status_string_wait "F_wait" - #define FL_status_string_wait_not "F_wait_not" - #define FL_status_string_warn "F_warn" - #define FL_status_string_warn_not "F_warn_not" - #define FL_status_string_world "F_world" - #define FL_status_string_world_not "F_world_not" - #define FL_status_string_write "F_write" - #define FL_status_string_write_not "F_write_not" - #define FL_status_string_write_only "F_write_only" - - #define FL_status_string_none_length 6 - #define FL_status_string_absolute_length 10 - #define FL_status_string_absolute_not_length 14 - #define FL_status_string_address_length 9 - #define FL_status_string_address_not_length 13 - #define FL_status_string_ascii_length 7 - #define FL_status_string_ascii_not_length 11 - #define FL_status_string_block_length 7 - #define FL_status_string_block_not_length 11 - #define FL_status_string_bound_length 7 - #define FL_status_string_bound_not_length 11 - #define FL_status_string_capability_length 12 - #define FL_status_string_capability_not_length 16 - #define FL_status_string_child_length 7 - #define FL_status_string_child_not_length 11 - #define FL_status_string_complete_length 10 - #define FL_status_string_complete_not_length 14 - #define FL_status_string_connected_length 11 - #define FL_status_string_connected_not_length 15 - #define FL_status_string_container_length 11 - #define FL_status_string_container_not_length 15 - #define FL_status_string_control_length 9 - #define FL_status_string_control_not_length 13 - #define FL_status_string_control_group_length 15 - #define FL_status_string_control_group_not_length 19 - #define FL_status_string_critical_length 10 - #define FL_status_string_critical_not_length 14 - #define FL_status_string_dead_length 6 - #define FL_status_string_dead_not_length 10 - #define FL_status_string_deadlock_length 10 - #define FL_status_string_deadlock_not_length 14 - #define FL_status_string_descriptor_length 12 - #define FL_status_string_descriptor_not_length 16 - #define FL_status_string_device_length 8 - #define FL_status_string_device_not_length 12 - #define FL_status_string_disable_length 9 - #define FL_status_string_disable_not_length 13 - #define FL_status_string_done_length 6 - #define FL_status_string_done_not_length 10 - #define FL_status_string_dummy_length 7 - #define FL_status_string_dummy_not_length 11 - #define FL_status_string_empty_length 7 - #define FL_status_string_empty_not_length 11 - #define FL_status_string_enable_length 8 - #define FL_status_string_enable_not_length 12 - #define FL_status_string_encoding_length 10 - #define FL_status_string_encoding_not_length 14 - #define FL_status_string_eoa_length 5 - #define FL_status_string_eoa_not_length 9 - #define FL_status_string_eof_length 5 - #define FL_status_string_eof_not_length 9 - #define FL_status_string_eol_length 5 - #define FL_status_string_eol_not_length 9 - #define FL_status_string_eos_length 5 - #define FL_status_string_eos_not_length 9 - #define FL_status_string_execute_length 9 - #define FL_status_string_execute_not_length 13 - #define FL_status_string_exist_length 7 - #define FL_status_string_exist_not_length 11 - #define FL_status_string_failure_length 9 - #define FL_status_string_failure_not_length 13 - #define FL_status_string_first_length 7 - #define FL_status_string_first_not_length 11 - #define FL_status_string_fork_length 6 - #define FL_status_string_fork_not_length 10 - #define FL_status_string_format_length 8 - #define FL_status_string_format_not_length 12 - #define FL_status_string_found_length 7 - #define FL_status_string_found_not_length 11 - #define FL_status_string_full_length 6 - #define FL_status_string_full_not_length 10 - #define FL_status_string_group_length 7 - #define FL_status_string_group_not_length 11 - #define FL_status_string_ignore_length 8 - #define FL_status_string_ignore_not_length 12 - #define FL_status_string_implemented_length 13 - #define FL_status_string_implemented_not_length 17 - #define FL_status_string_input_length 7 - #define FL_status_string_input_not_length 11 - #define FL_status_string_input_output_length 14 - #define FL_status_string_interrupt_length 11 - #define FL_status_string_interrupt_not_length 15 - #define FL_status_string_known_length 7 - #define FL_status_string_known_not_length 11 - #define FL_status_string_last_length 6 - #define FL_status_string_last_not_length 10 - #define FL_status_string_limit_length 7 - #define FL_status_string_limit_not_length 11 - #define FL_status_string_link_length 6 - #define FL_status_string_link_not_length 10 - #define FL_status_string_live_length 6 - #define FL_status_string_live_not_length 10 - #define FL_status_string_lock_length 6 - #define FL_status_string_lock_not_length 10 - #define FL_status_string_loop_length 6 - #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 - #define FL_status_string_moderate_not_length 14 - #define FL_status_string_mount_length 7 - #define FL_status_string_mount_not_length 11 - #define FL_status_string_name_length 6 - #define FL_status_string_name_not_length 10 - #define FL_status_string_next_length 6 - #define FL_status_string_next_not_length 10 - #define FL_status_string_nice_length 6 - #define FL_status_string_nice_not_length 10 - #define FL_status_string_optional_length 10 - #define FL_status_string_optional_not_length 14 - #define FL_status_string_output_length 8 - #define FL_status_string_output_not_length 12 - #define FL_status_string_parameter_length 11 - #define FL_status_string_parameter_not_length 15 - #define FL_status_string_parent_length 8 - #define FL_status_string_parent_not_length 12 - #define FL_status_string_pipe_length 6 - #define FL_status_string_pipe_not_length 10 - #define FL_status_string_port_length 6 - #define FL_status_string_port_not_length 10 - #define FL_status_string_previous_length 10 - #define FL_status_string_previous_not_length 14 - #define FL_status_string_processor_length 11 - #define FL_status_string_processor_not_length 15 - #define FL_status_string_prohibited_length 12 - #define FL_status_string_prohibited_not_length 16 - #define FL_status_string_range_length 7 - #define FL_status_string_range_not_length 11 - #define FL_status_string_read_length 6 - #define FL_status_string_read_not_length 10 - #define FL_status_string_read_only_length 11 - #define FL_status_string_ready_length 7 - #define FL_status_string_ready_not_length 11 - #define FL_status_string_recover_length 9 - #define FL_status_string_recover_not_length 13 - #define FL_status_string_recurse_length 9 - #define FL_status_string_recurse_not_length 13 - #define FL_status_string_relative_length 10 - #define FL_status_string_relative_not_length 14 - #define FL_status_string_require_length 9 - #define FL_status_string_require_not_length 13 - #define FL_status_string_resource_length 10 - #define FL_status_string_resource_not_length 14 - #define FL_status_string_search_length 8 - #define FL_status_string_search_not_length 12 - #define FL_status_string_schedule_length 10 - #define FL_status_string_schedule_not_length 14 - #define FL_status_string_signal_length 8 - #define FL_status_string_signal_not_length 12 - #define FL_status_string_space_length 7 - #define FL_status_string_space_not_length 11 - #define FL_status_string_stop_length 6 - #define FL_status_string_stop_not_length 10 - #define FL_status_string_string_length 8 - #define FL_status_string_string_not_length 12 - #define FL_status_string_string_too_large_length 18 - #define FL_status_string_string_too_small_length 18 - #define FL_status_string_success_length 9 - #define FL_status_string_success_not_length 13 - #define FL_status_string_supported_length 11 - #define FL_status_string_supported_not_length 15 - #define FL_status_string_syntax_length 8 - #define FL_status_string_syntax_not_length 12 - #define FL_status_string_thread_length 8 - #define FL_status_string_thread_not_length 12 - #define FL_status_string_time_length 6 - #define FL_status_string_time_not_length 10 - #define FL_status_string_too_large_length 11 - #define FL_status_string_too_small_length 11 - #define FL_status_string_user_length 6 - #define FL_status_string_user_not_length 10 - #define FL_status_string_utf_length 5 - #define FL_status_string_utf_fragment_length 14 - #define FL_status_string_utf_fragment_not_length 18 - #define FL_status_string_utf_not_length 9 - #define FL_status_string_valid_length 7 - #define FL_status_string_valid_not_length 11 - #define FL_status_string_value_length 7 - #define FL_status_string_value_not_length 11 - #define FL_status_string_wait_length 6 - #define FL_status_string_wait_not_length 10 - #define FL_status_string_warn_length 6 - #define FL_status_string_warn_not_length 10 - #define FL_status_string_world_length 7 - #define FL_status_string_world_not_length 11 - #define FL_status_string_write_length 7 - #define FL_status_string_write_not_length 11 - #define FL_status_string_write_only_length 12 - #endif // _di_F_status_basic_ - - #ifndef _di_F_status_array_ - #define FL_status_string_array "F_array" - #define FL_status_string_array_not "F_array_not" - #define FL_status_string_array_too_large "F_array_too_large" - #define FL_status_string_array_too_small "F_array_too_small" - - #define FL_status_string_array_length 7 - #define FL_status_string_array_not_length 11 - #define FL_status_string_array_too_large_length 17 - #define FL_status_string_array_too_small_length 17 - #endif // _di_F_status_array_ - - #ifndef _di_F_status_available_ - #define FL_status_string_available "F_available" - #define FL_status_string_available_not "F_available_not" - #define FL_status_string_available_not_address "F_available_not_address" - #define FL_status_string_available_not_buffer "F_available_not_buffer" - #define FL_status_string_available_not_device "F_available_not_device" - #define FL_status_string_available_not_pipe "F_available_not_pipe" - #define FL_status_string_available_not_port "F_available_not_port" - #define FL_status_string_available_not_process "F_available_not_process" - #define FL_status_string_available_not_socket "F_available_not_socket" - - #define FL_status_string_available_length 11 - #define FL_status_string_available_not_length 15 - #define FL_status_string_available_not_address_length 23 - #define FL_status_string_available_not_buffer_length 22 - #define FL_status_string_available_not_device_length 22 - #define FL_status_string_available_not_pipe_length 20 - #define FL_status_string_available_not_port_length 20 - #define FL_status_string_available_not_process_length 23 - #define FL_status_string_available_not_socket_length 22 - #endif // _di_F_status_available_ - - #ifndef _di_F_status_busy_ - #define FL_status_string_busy "F_busy" - #define FL_status_string_busy_address "F_busy_address" - #define FL_status_string_busy_buffer "F_busy_buffer" - #define FL_status_string_busy_device "F_busy_device" - #define FL_status_string_busy_not "F_busy_not" - #define FL_status_string_busy_pipe "F_busy_pipe" - #define FL_status_string_busy_port "F_busy_port" - #define FL_status_string_busy_process "F_busy_process" - #define FL_status_string_busy_socket "F_busy_socket" - - #define FL_status_string_busy_length 6 - #define FL_status_string_busy_address_length 14 - #define FL_status_string_busy_buffer_length 13 - #define FL_status_string_busy_device_length 13 - #define FL_status_string_busy_not_length 10 - #define FL_status_string_busy_pipe_length 11 - #define FL_status_string_busy_port_length 11 - #define FL_status_string_busy_process_length 14 - #define FL_status_string_busy_socket_length 13 - #endif // _di_F_status_busy_ - - #ifndef _di_F_status_number_ - #define FL_status_string_number "F_number" - #define FL_status_string_number_decimal "F_number_decimal" - #define FL_status_string_number_decimal_not "F_number_decimal_not" - #define FL_status_string_number_divide_by_zero "F_number_divide_by_zero" - #define FL_status_string_number_negative "F_number_negative" - #define FL_status_string_number_negative_not "F_number_negative_not" - #define FL_status_string_number_not "F_number_not" - #define FL_status_string_number_overflow "F_number_overflow" - #define FL_status_string_number_positive "F_number_positive" - #define FL_status_string_number_positive_not "F_number_positive_not" - #define FL_status_string_number_too_large "F_number_too_large" - #define FL_status_string_number_too_small "F_number_too_small" - #define FL_status_string_number_underflow "F_number_underflow" - #define FL_status_string_number_whole "F_number_whole" - #define FL_status_string_number_whole_not "F_number_whole_not" - #define FL_status_string_number_zero "F_number_zero" - #define FL_status_string_number_zero_not "F_number_zero_not" - - #define FL_status_string_number_length 8 - #define FL_status_string_number_decimal_length 16 - #define FL_status_string_number_decimal_not_length 20 - #define FL_status_string_number_divide_by_zero_length 23 - #define FL_status_string_number_negative_length 17 - #define FL_status_string_number_negative_not_length 21 - #define FL_status_string_number_not_length 12 - #define FL_status_string_number_overflow_length 17 - #define FL_status_string_number_positive_length 17 - #define FL_status_string_number_positive_not_length 21 - #define FL_status_string_number_too_large_length 18 - #define FL_status_string_number_too_small_length 18 - #define FL_status_string_number_underflow_length 18 - #define FL_status_string_number_whole_length 14 - #define FL_status_string_number_whole_not_length 18 - #define FL_status_string_number_zero_length 13 - #define FL_status_string_number_zero_not_length 17 - #endif // _di_F_status_number_ - - #ifndef _di_F_status_buffer_ - #define FL_status_string_buffer "F_buffer" - #define FL_status_string_buffer_not "F_buffer_not" - #define FL_status_string_buffer_too_large "F_buffer_too_large" - #define FL_status_string_buffer_too_small "F_buffer_too_small" - #define FL_status_string_complete_not_utf "F_complete_not_utf" - #define FL_status_string_complete_not_utf_block "F_complete_not_utf_block" - #define FL_status_string_complete_not_utf_eoa "F_complete_not_utf_eoa" - #define FL_status_string_complete_not_utf_eof "F_complete_not_utf_eof" - #define FL_status_string_complete_not_utf_eol "F_complete_not_utf_eol" - #define FL_status_string_complete_not_utf_eos "F_complete_not_utf_eos" - #define FL_status_string_complete_not_utf_stop "F_complete_not_utf_stop" - #define FL_status_string_none_block "F_none_block" - #define FL_status_string_none_eoa "F_none_eoa" - #define FL_status_string_none_eof "F_none_eof" - #define FL_status_string_none_eol "F_none_eol" - #define FL_status_string_none_eos "F_none_eos" - #define FL_status_string_none_not "F_none_not" - #define FL_status_string_none_stop "F_none_stop" - #define FL_status_string_data "F_data" - #define FL_status_string_data_not "F_data_not" - #define FL_status_string_data_not_block "F_data_not_block" - #define FL_status_string_data_not_eoa "F_data_not_eoa" - #define FL_status_string_data_not_eof "F_data_not_eof" - #define FL_status_string_data_not_eol "F_data_not_eol" - #define FL_status_string_data_not_eos "F_data_not_eos" - #define FL_status_string_data_not_stop "F_data_not_stop" - #define FL_status_string_terminated "F_terminated" - #define FL_status_string_terminated_not "F_terminated_not" - #define FL_status_string_terminated_not_block "F_terminated_not_block" - #define FL_status_string_terminated_not_eoa "F_terminated_not_eoa" - #define FL_status_string_terminated_not_eof "F_terminated_not_eof" - #define FL_status_string_terminated_not_eol "F_terminated_not_eol" - #define FL_status_string_terminated_not_eos "F_terminated_not_eos" - #define FL_status_string_terminated_not_stop "F_terminated_not_stop" - #define FL_status_string_terminated_not_group "F_terminated_not_group" - #define FL_status_string_terminated_not_group_block "F_terminated_not_group_block" - #define FL_status_string_terminated_not_group_eoa "F_terminated_not_group_eoa" - #define FL_status_string_terminated_not_group_eof "F_terminated_not_group_eof" - #define FL_status_string_terminated_not_group_eol "F_terminated_not_group_eol" - #define FL_status_string_terminated_not_group_eos "F_terminated_not_group_eos" - #define FL_status_string_terminated_not_group_stop "F_terminated_not_group_stop" - #define FL_status_string_terminated_not_nest "F_terminated_not_nest" - #define FL_status_string_terminated_not_nest_block "F_terminated_not_nest_block" - #define FL_status_string_terminated_not_nest_eoa "F_terminated_not_nest_eoa" - #define FL_status_string_terminated_not_nest_eof "F_terminated_not_nest_eof" - #define FL_status_string_terminated_not_nest_eol "F_terminated_not_nest_eol" - #define FL_status_string_terminated_not_nest_eos "F_terminated_not_nest_eos" - #define FL_status_string_terminated_not_nest_stop "F_terminated_not_nest_stop" - - #define FL_status_string_buffer_length 8 - #define FL_status_string_buffer_not_length 12 - #define FL_status_string_buffer_too_large_length 18 - #define FL_status_string_buffer_too_small_length 18 - #define FL_status_string_complete_not_utf_length 18 - #define FL_status_string_complete_not_utf_block_length 24 - #define FL_status_string_complete_not_utf_eoa_length 22 - #define FL_status_string_complete_not_utf_eof_length 22 - #define FL_status_string_complete_not_utf_eol_length 22 - #define FL_status_string_complete_not_utf_eos_length 22 - #define FL_status_string_complete_not_utf_stop_length 23 - #define FL_status_string_none_block_length 12 - #define FL_status_string_none_eoa_length 10 - #define FL_status_string_none_eof_length 10 - #define FL_status_string_none_eol_length 10 - #define FL_status_string_none_eos_length 10 - #define FL_status_string_none_stop_length 11 - #define FL_status_string_data_length 6 - #define FL_status_string_data_not_length 10 - #define FL_status_string_data_not_block_length 16 - #define FL_status_string_data_not_eoa_length 14 - #define FL_status_string_data_not_eof_length 14 - #define FL_status_string_data_not_eol_length 14 - #define FL_status_string_data_not_eos_length 14 - #define FL_status_string_data_not_stop_length 15 - #define FL_status_string_terminated_length 12 - #define FL_status_string_terminated_not_length 16 - #define FL_status_string_terminated_not_block_length 22 - #define FL_status_string_terminated_not_eoa_length 20 - #define FL_status_string_terminated_not_eof_length 20 - #define FL_status_string_terminated_not_eol_length 20 - #define FL_status_string_terminated_not_eos_length 20 - #define FL_status_string_terminated_not_stop_length 21 - #define FL_status_string_terminated_not_group_length 22 - #define FL_status_string_terminated_not_group_block_length 28 - #define FL_status_string_terminated_not_group_eoa_length 25 - #define FL_status_string_terminated_not_group_eof_length 25 - #define FL_status_string_terminated_not_group_eol_length 25 - #define FL_status_string_terminated_not_group_eos_length 25 - #define FL_status_string_terminated_not_group_stop_length 26 - #define FL_status_string_terminated_not_nest_length 21 - #define FL_status_string_terminated_not_nest_block_length 26 - #define FL_status_string_terminated_not_nest_eoa_length 25 - #define FL_status_string_terminated_not_nest_eof_length 25 - #define FL_status_string_terminated_not_nest_eol_length 25 - #define FL_status_string_terminated_not_nest_eos_length 25 - #define FL_status_string_terminated_not_nest_stop_length 26 - #endif // _di_F_status_buffer_ - - #ifndef _di_F_status_process_ - #define FL_status_string_process "F_process" - #define FL_status_string_process_not "F_process_not" - #define FL_status_string_process_too_many "F_process_too_many" - - #define FL_status_string_process_length 9 - #define FL_status_string_process_not_length 13 - #define FL_status_string_process_too_many_length 18 - #endif // _di_F_status_process_ - - #ifndef _di_F_status_file_ - #define FL_status_string_file "F_file" - #define FL_status_string_file_close "F_file_close" - #define FL_status_string_file_closed "F_file_closed" - #define FL_status_string_file_descriptor "F_file_descriptor" - #define FL_status_string_file_descriptor_max "F_file_descriptor_max" - #define FL_status_string_file_descriptor_not "F_file_descriptor_not" - #define FL_status_string_file_empty "F_file_empty" - #define FL_status_string_file_flush "F_file_flush" - #define FL_status_string_file_found "F_file_found" - #define FL_status_string_file_found_not "F_file_found_not" - #define FL_status_string_file_not "F_file_not" - #define FL_status_string_file_open "F_file_open" - #define FL_status_string_file_open_max "F_file_open_max" - #define FL_status_string_file_opened "F_file_opened" - #define FL_status_string_file_overflow "F_file_overflow" - #define FL_status_string_file_purge "F_file_purge" - #define FL_status_string_file_read "F_file_read" - #define FL_status_string_file_reallocation "F_file_reallocation" - #define FL_status_string_file_seek "F_file_seek" - #define FL_status_string_file_stat "F_file_stat" - #define FL_status_string_file_synchronize "F_file_synchronize" - #define FL_status_string_file_type_block "F_file_type_block" - #define FL_status_string_file_type_character "F_file_type_character" - #define FL_status_string_file_type_directory "F_file_type_directory" - #define FL_status_string_file_type_fifo "F_file_type_fifo" - #define FL_status_string_file_type_link "F_file_type_link" - #define FL_status_string_file_type_not_block "F_file_type_not_block" - #define FL_status_string_file_type_not_character "F_file_type_not_character" - #define FL_status_string_file_type_not_directory "F_file_type_not_directory" - #define FL_status_string_file_type_not_fifo "F_file_type_not_fifo" - #define FL_status_string_file_type_not_link "F_file_type_not_link" - #define FL_status_string_file_type_not_pipe "F_file_type_not_pipe" - #define FL_status_string_file_type_not_regular "F_file_type_not_regular" - #define FL_status_string_file_type_not_socket "F_file_type_not_socket" - #define FL_status_string_file_type_not_unknown "F_file_type_not_unknown" - #define FL_status_string_file_type_pipe "F_file_type_pipe" - #define FL_status_string_file_type_regular "F_file_type_regular" - #define FL_status_string_file_type_socket "F_file_type_socket" - #define FL_status_string_file_type_unknown "F_file_type_unknown" - #define FL_status_string_file_underflow "F_file_underflow" - #define FL_status_string_file_utf "F_file_utf" - #define FL_status_string_file_utf_not "F_file_utf_not" - #define FL_status_string_file_write "F_file_write" - - #define FL_status_string_file_length 6 - #define FL_status_string_file_close_length 12 - #define FL_status_string_file_closed_length 13 - #define FL_status_string_file_descriptor_length 17 - #define FL_status_string_file_descriptor_max_length 21 - #define FL_status_string_file_descriptor_not_length 21 - #define FL_status_string_file_empty_length 12 - #define FL_status_string_file_flush_length 12 - #define FL_status_string_file_found_length 12 - #define FL_status_string_file_found_not_length 16 - #define FL_status_string_file_not_length 10 - #define FL_status_string_file_open_length 11 - #define FL_status_string_file_open_max_length 15 - #define FL_status_string_file_opened_length 13 - #define FL_status_string_file_overflow_length 15 - #define FL_status_string_file_purge_length 12 - #define FL_status_string_file_read_length 11 - #define FL_status_string_file_reallocation_length 19 - #define FL_status_string_file_seek_length 11 - #define FL_status_string_file_stat_length 11 - #define FL_status_string_file_synchronize_length 18 - #define FL_status_string_file_type_block_length 17 - #define FL_status_string_file_type_character_length 21 - #define FL_status_string_file_type_directory_length 21 - #define FL_status_string_file_type_fifo_length 16 - #define FL_status_string_file_type_link_length 16 - #define FL_status_string_file_type_not_block_length 21 - #define FL_status_string_file_type_not_character_length 25 - #define FL_status_string_file_type_not_directory_length 25 - #define FL_status_string_file_type_not_fifo_length 20 - #define FL_status_string_file_type_not_link_length 20 - #define FL_status_string_file_type_not_pipe_length 20 - #define FL_status_string_file_type_not_regular_length 23 - #define FL_status_string_file_type_not_socket_length 22 - #define FL_status_string_file_type_not_unknown_length 23 - #define FL_status_string_file_type_pipe_length 16 - #define FL_status_string_file_type_regular_length 19 - #define FL_status_string_file_type_socket_length 18 - #define FL_status_string_file_type_unknown_length 19 - #define FL_status_string_file_underflow_length 16 - #define FL_status_string_file_utf_length 10 - #define FL_status_string_file_utf_not_length 14 - #define FL_status_string_file_write_length 12 - #endif // _di_F_status_file_ - - #ifndef _di_F_status_filesystem_ - #define FL_status_string_filesystem "F_filesystem" - #define FL_status_string_filesystem_not "F_filesystem_not" - #define FL_status_string_filesystem_quota_block "F_filesystem_quota_block" - #define FL_status_string_filesystem_quota_reached "F_filesystem_quota_reached" - - #define FL_status_string_filesystem_length 12 - #define FL_status_string_filesystem_not_length 16 - #define FL_status_string_filesystem_quota_block_length 24 - #define FL_status_string_filesystem_quota_reached_length 26 - #endif // _di_F_status_filesystem_ - - #ifndef _di_F_status_directory_ - #define FL_status_string_directory "F_directory" - #define FL_status_string_directory_close "F_directory_close" - #define FL_status_string_directory_closed "F_directory_closed" - #define FL_status_string_directory_descriptor "F_directory_descriptor" - #define FL_status_string_directory_empty "F_directory_empty" - #define FL_status_string_directory_empty_not "F_directory_empty_not" - #define FL_status_string_directory_found "F_directory_found" - #define FL_status_string_directory_found_not "F_directory_found_not" - #define FL_status_string_directory_flush "F_directory_flush" - #define FL_status_string_directory_link_max "F_directory_link_max" - #define FL_status_string_directory_not "F_directory_not" - #define FL_status_string_directory_open "F_directory_open" - #define FL_status_string_directory_purge "F_directory_purge" - #define FL_status_string_directory_read "F_directory_read" - #define FL_status_string_directory_stream "F_directory_stream" - #define FL_status_string_directory_supported_not "F_directory_supported_not" - #define FL_status_string_directory_synchronize "F_directory_synchronize" - #define FL_status_string_directory_utf "F_directory_utf" - #define FL_status_string_directory_utf_not "F_directory_utf_not" - #define FL_status_string_directory_write "F_directory_write" - - #define FL_status_string_directory_length 11 - #define FL_status_string_directory_close_length 17 - #define FL_status_string_directory_closed_length 18 - #define FL_status_string_directory_descriptor_length 22 - #define FL_status_string_directory_empty_length 17 - #define FL_status_string_directory_empty_not_length 21 - #define FL_status_string_directory_found_length 17 - #define FL_status_string_directory_found_not_length 21 - #define FL_status_string_directory_flush_length 17 - #define FL_status_string_directory_link_max_length 20 - #define FL_status_string_directory_not_length 15 - #define FL_status_string_directory_open_length 16 - #define FL_status_string_directory_purge_length 17 - #define FL_status_string_directory_read_length 16 - #define FL_status_string_directory_stream_length 18 - #define FL_status_string_directory_supported_not_length 25 - #define FL_status_string_directory_synchronize_length 23 - #define FL_status_string_directory_utf_length 15 - #define FL_status_string_directory_utf_not_length 19 - #define FL_status_string_directory_write_length 17 - #endif // _di_F_status_directory_ - - #ifndef _di_F_status_socket_ - #define FL_status_string_socket "F_socket" - #define FL_status_string_socket_client "F_socket_client" - #define FL_status_string_socket_not "F_socket_not" - #define FL_status_string_socket_receive "F_socket_receive" - #define FL_status_string_socket_send "F_socket_send" - #define FL_status_string_socket_target "F_socket_target" - - #define FL_status_string_socket_length 8 - #define FL_status_string_socket_client_length 15 - #define FL_status_string_socket_not_length 12 - #define FL_status_string_socket_receive_length 16 - #define FL_status_string_socket_send_length 13 - #define FL_status_string_socket_target_length 15 - #endif // _di_F_status_socket_ - - #ifndef _di_F_status_compare_ - #define FL_status_string_equal_to "F_equal_to" - #define FL_status_string_equal_to_not "F_equal_to_not" - #define FL_status_string_than_greater "F_than_greater" - #define FL_status_string_than_less "F_than_less" - - #define FL_status_string_equal_to_length 10 - #define FL_status_string_equal_to_not_length 14 - #define FL_status_string_than_greater_length 14 - #define FL_status_string_than_less_length 11 - #endif // _di_F_status_compare_ - - #ifndef _di_F_status_access_ - #define FL_status_string_access "F_access" - #define FL_status_string_access_denied "F_access_denied" - #define FL_status_string_access_denied_user "F_access_denied_user" - #define FL_status_string_access_denied_group "F_access_denied_group" - #define FL_status_string_access_denied_world "F_access_denied_world" - #define FL_status_string_access_denied_read "F_access_denied_read" - #define FL_status_string_access_denied_write "F_access_denied_write" - #define FL_status_string_access_denied_execute "F_access_denied_execute" - #define FL_status_string_access_denied_super "F_access_denied_super" - #define FL_status_string_access_granted "F_access_granted" - #define FL_status_string_access_granted_user "F_access_granted_user" - #define FL_status_string_access_granted_group "F_access_granted_group" - #define FL_status_string_access_granted_world "F_access_granted_world" - #define FL_status_string_access_granted_read "F_access_granted_read" - #define FL_status_string_access_granted_write "F_access_granted_write" - #define FL_status_string_access_granted_execute "F_access_granted_execute" - #define FL_status_string_access_granted_super "F_access_granted_super" - #define FL_status_string_access_group "F_access_group" - #define FL_status_string_access_mode "F_access_mode" - #define FL_status_string_access_not "F_access_not" - #define FL_status_string_access_owner "F_access_owner" - - #define FL_status_string_access_length 8 - #define FL_status_string_access_denied_length 15 - #define FL_status_string_access_denied_user_length 20 - #define FL_status_string_access_denied_group_length 21 - #define FL_status_string_access_denied_world_length 21 - #define FL_status_string_access_denied_read_length 20 - #define FL_status_string_access_denied_write_length 21 - #define FL_status_string_access_denied_execute_length 23 - #define FL_status_string_access_denied_super_length 21 - #define FL_status_string_access_granted_length 16 - #define FL_status_string_access_granted_user_length 21 - #define FL_status_string_access_granted_group_length 22 - #define FL_status_string_access_granted_world_length 22 - #define FL_status_string_access_granted_read_length 21 - #define FL_status_string_access_granted_write_length 22 - #define FL_status_string_access_granted_execute_length 24 - #define FL_status_string_access_granted_super_length 22 - #define FL_status_string_access_group_length 14 - #define FL_status_string_access_mode_length 13 - #define FL_status_string_access_not_length 12 - #define FL_status_string_access_owner_length 14 - #endif // _di_F_status_access_ - - #ifndef _di_F_status_terminal_ - #define FL_status_string_terminal "F_terminal" - #define FL_status_string_terminal_access "F_terminal_access" - #define FL_status_string_terminal_known "F_terminal_known" - #define FL_status_string_terminal_known_not "F_terminal_known_not" - #define FL_status_string_terminal_not "F_terminal_not" - #define FL_status_string_terminal_prohibited "F_terminal_prohibited" - #define FL_status_string_terminal_read "F_terminal_read" - #define FL_status_string_terminal_valid "F_terminal_valid" - #define FL_status_string_terminal_valid_not "F_terminal_valid_not" - #define FL_status_string_terminal_write "F_terminal_write" - - #define FL_status_string_terminal_length 10 - #define FL_status_string_terminal_access_length 17 - #define FL_status_string_terminal_known_length 16 - #define FL_status_string_terminal_known_not_length 20 - #define FL_status_string_terminal_not_length 14 - #define FL_status_string_terminal_prohibited_length 21 - #define FL_status_string_terminal_read_length 15 - #define FL_status_string_terminal_valid_length 16 - #define FL_status_string_terminal_valid_not_length 20 - #define FL_status_string_terminal_write_length 16 - #endif // _di_F_status_terminal_ - - #define FL_status_string_status_code_last "F_status_code_last" - - #define FL_status_string_status_code_last_length 18 -#endif // _di_FL_status_string_ - -/** - * Convert status codes to their string representation. - * - * The error, warning, and signal bits are ignored. - * - * @param code - * The status code to process. - * @param string - * The processed code code. - * - * @return - * F_none on success. - * - * F_data (with error bit) if there status is unknown. - * F_parameter (with error bit) if a parameter is invalid. - */ -#ifndef _di_fl_status_to_string_ - extern f_status_t fl_status_to_string(const f_status_t code, f_string_t *string); -#endif // _di_fl_status_to_string_ - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // _FL_status_h diff --git a/level_2/fll_error/c/error-common.h b/level_2/fll_error/c/error-common.h index 4322d52..37f3a79 100644 --- a/level_2/fll_error/c/error-common.h +++ b/level_2/fll_error/c/error-common.h @@ -18,12 +18,17 @@ extern "C" { /** * Error file types. + * + * fll_error_file_type_*: + * - file: File error. + * - directory: Directory error. + * - pipe: Pipe error. */ #ifndef _di_fll_error_file_type_ enum { - fll_error_file_type_file = 1, - fll_error_file_type_directory, - fll_error_file_type_pipe, + fll_error_file_type_file_e = 1, + fll_error_file_type_directory_e, + fll_error_file_type_pipe_e, }; #define FLL_error_file_type_directory_s "directory" diff --git a/level_2/fll_error/c/error.c b/level_2/fll_error/c/error.c index e46e5d0..c4ba282 100644 --- a/level_2/fll_error/c/error.c +++ b/level_2/fll_error/c/error.c @@ -17,15 +17,15 @@ extern "C" { const char *type_name = FLL_error_file_type_file_s; - if (type == fll_error_file_type_directory) { + if (type == fll_error_file_type_directory_e) { type_name = FLL_error_file_type_directory_s; } - else if (type == fll_error_file_type_pipe) { + else if (type == fll_error_file_type_pipe_e) { type_name = FLL_error_file_type_pipe_s; } if (status == F_access_denied) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SAccess denied while trying to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -39,7 +39,7 @@ extern "C" { } if (status == F_access_group) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SCurrent user is not allowed to use the given group while trying to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -53,7 +53,7 @@ extern "C" { } if (status == F_access_owner) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SCurrent user is not allowed to use the given owner while trying to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -67,7 +67,7 @@ extern "C" { } if (status == F_directory) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SInvalid directory while trying to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -81,7 +81,7 @@ extern "C" { } if (status == F_directory_empty_not) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SUnable to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -95,7 +95,7 @@ extern "C" { } if (status == F_failure) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SFailed to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -109,7 +109,7 @@ extern "C" { } if (status == F_file_close) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SUnable to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -123,7 +123,7 @@ extern "C" { } if (status == F_file_closed) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SUnable to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -137,7 +137,7 @@ extern "C" { } if (status == F_file_descriptor) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SFile descriptor error while trying to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -151,7 +151,7 @@ extern "C" { } if (status == F_file_descriptor_max) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SMax file descriptors reached while trying to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -165,7 +165,7 @@ extern "C" { } if (status == F_file_descriptor_not) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SInvalid file descriptor while trying to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -179,7 +179,7 @@ extern "C" { } if (status == F_file_empty) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SUnable to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -193,7 +193,7 @@ extern "C" { } if (status == F_file_flush) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SUnable to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -207,7 +207,7 @@ extern "C" { } if (status == F_file_found) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SUnable to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -221,7 +221,7 @@ extern "C" { } if (status == F_file_found_not) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SUnable to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -235,7 +235,7 @@ extern "C" { } if (status == F_file_open) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SUnable to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -249,7 +249,7 @@ extern "C" { } if (status == F_file_open_max) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SMax open files reached while trying to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -263,7 +263,7 @@ extern "C" { } if (status == F_file_overflow) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SOverflow while trying to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -277,7 +277,7 @@ extern "C" { } if (status == F_file_purge) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SUnable to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -291,7 +291,7 @@ extern "C" { } if (status == F_file_read) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SRead failed while trying to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -305,7 +305,7 @@ extern "C" { } if (status == F_file_seek) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SSeek failed while trying to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -319,7 +319,7 @@ extern "C" { } if (status == F_file_stat) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SStat failed while trying to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -333,7 +333,7 @@ extern "C" { } if (status == F_file_synchronize) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SSynchronize failed while trying to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -347,7 +347,7 @@ extern "C" { } if (status == F_file_type_unknown) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SFailed to %S %S, the path '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -361,7 +361,7 @@ extern "C" { } if (status == F_file_utf) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SUTF failure while trying to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -375,7 +375,7 @@ extern "C" { } if (status == F_file_utf_not) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SInvalid UTF while trying to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -389,7 +389,7 @@ extern "C" { } if (status == F_file_underflow) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SUnderflow while trying to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -403,7 +403,7 @@ extern "C" { } if (status == F_file_write) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SFailed to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -417,7 +417,7 @@ extern "C" { } if (status == F_loop) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SLoop while trying to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -431,7 +431,7 @@ extern "C" { } if (status == F_name) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SInvalid %S name '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, type_name, print.context); @@ -445,7 +445,7 @@ extern "C" { } if (status == F_number_overflow) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SNumber overflow while trying to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -459,7 +459,7 @@ extern "C" { } if (status == F_number_underflow) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SNumber underflow while trying to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -473,7 +473,7 @@ extern "C" { } if (status == F_parameter) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SInvalid parameter", print.to.stream, f_string_eol_s[0], print.context, print.prefix); @@ -491,7 +491,7 @@ extern "C" { } if (status == F_prohibited) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SProhibited by system while trying to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -505,7 +505,7 @@ extern "C" { } if (status == F_read_only) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SUnable to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -519,7 +519,7 @@ extern "C" { } if (status == F_write_only) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SUnable to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -532,9 +532,9 @@ extern "C" { return F_false; } - if (type == fll_error_file_type_file) { + if (type == fll_error_file_type_file_e) { if (status == F_file_type_not_directory) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SInvalid or missing directory in path while trying to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -548,7 +548,7 @@ extern "C" { } if (status == F_file_type_directory) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SFailed to %S %S, the path '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -561,9 +561,9 @@ extern "C" { return F_false; } } - else if (type == fll_error_file_type_directory) { + else if (type == fll_error_file_type_directory_e) { if (status == F_file_type_regular) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SFailed to %S %S, the path '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -577,9 +577,9 @@ extern "C" { } } - if (type == fll_error_file_type_file || type == fll_error_file_type_directory) { + if (type == fll_error_file_type_file_e || type == fll_error_file_type_directory_e) { if (status == F_directory_found_not) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SFailed to %S %S '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -593,7 +593,7 @@ extern "C" { } if (status == F_file_type_pipe || status == F_file_type_socket) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SFailed to %S %S, the path '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, operation, type_name, print.context); @@ -615,7 +615,7 @@ extern "C" { f_status_t fll_error_parameter_integer_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_t parameter, const f_string_t argument) { if (status == F_data_not) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SThe argument for the parameter '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, print.context); @@ -629,7 +629,7 @@ extern "C" { } if (status == F_number) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SThe argument '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, print.context); @@ -645,7 +645,7 @@ extern "C" { } if (status == F_number_negative) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SThe argument '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, print.context); @@ -661,7 +661,7 @@ extern "C" { } if (status == F_number_overflow) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SThe argument '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, print.context); @@ -677,7 +677,7 @@ extern "C" { } if (status == F_number_positive) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SThe argument '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, print.context); @@ -693,7 +693,7 @@ extern "C" { } if (status == F_number_underflow) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SThe argument '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, print.context); diff --git a/level_2/fll_error/c/private-error.c b/level_2/fll_error/c/private-error.c index 61c4fde..5911cd7 100644 --- a/level_2/fll_error/c/private-error.c +++ b/level_2/fll_error/c/private-error.c @@ -9,7 +9,7 @@ extern "C" { f_status_t private_fll_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback) { if (status == F_access_denied) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SAccess denied", print.to.stream, f_string_eol_s[0], print.context, print.prefix); @@ -25,7 +25,7 @@ extern "C" { } if (status == F_array_too_large) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SMaximum array length reached", print.to.stream, f_string_eol_s[0], print.context, print.prefix); @@ -41,7 +41,7 @@ extern "C" { } if (status == F_buffer_too_large) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SMaximum buffer length reached", print.to.stream, f_string_eol_s[0], print.context, print.prefix); @@ -57,7 +57,7 @@ extern "C" { } if (status == F_memory_not) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SUnable to allocate memory", print.to.stream, f_string_eol_s[0], print.context, print.prefix); @@ -73,7 +73,7 @@ extern "C" { } if (status == F_parameter) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SInvalid parameter", print.to.stream, f_string_eol_s[0], print.context, print.prefix); @@ -89,7 +89,7 @@ extern "C" { } if (status == F_string_too_large) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SMaximum string length reached", print.to.stream, f_string_eol_s[0], print.context, print.prefix); @@ -105,7 +105,7 @@ extern "C" { } if (status == F_utf) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SInvalid UTF-8 character found", print.to.stream, f_string_eol_s[0], print.context, print.prefix); @@ -121,7 +121,7 @@ extern "C" { } if (status == F_utf_fragment) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SInvalid UTF-8 character (Fragment) found", print.to.stream, f_string_eol_s[0], print.context, print.prefix); @@ -137,7 +137,7 @@ extern "C" { } if (status == F_complete_not_utf || status == F_complete_not_utf_eos || status == F_complete_not_utf_stop) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SInvalid (incomplete) UTF-8 character found", print.to.stream, f_string_eol_s[0], print.context, print.prefix); @@ -161,7 +161,7 @@ extern "C" { } if (status == F_failure) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SFailure", print.to.stream, f_string_eol_s[0], print.context, print.prefix); @@ -177,7 +177,7 @@ extern "C" { } if (status == F_signal) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SSignal received", print.to.stream, f_string_eol_s[0], print.context, print.prefix); @@ -193,7 +193,7 @@ extern "C" { } if (status == F_interrupt) { - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%SInterrupt signal received", print.to.stream, f_string_eol_s[0], print.context, print.prefix); @@ -208,8 +208,8 @@ extern "C" { return F_false; } - if (fallback && print.verbosity != f_console_verbosity_quiet) { - if (print.verbosity != f_console_verbosity_quiet) { + if (fallback && print.verbosity != f_console_verbosity_quiet_e) { + if (print.verbosity != f_console_verbosity_quiet_e) { flockfile(print.to.stream); fl_print_format("%c%[%S(%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, print.context); diff --git a/level_2/fll_fss/c/fss.h b/level_2/fll_fss/c/fss.h index 99d40c9..f9f7ee2 100644 --- a/level_2/fll_fss/c/fss.h +++ b/level_2/fll_fss/c/fss.h @@ -23,7 +23,6 @@ // fll-1 includes #include #include -#include #include #ifdef __cplusplus diff --git a/level_2/fll_fss/c/fss_basic.c b/level_2/fll_fss/c/fss_basic.c index 09f4f3b..33abe75 100644 --- a/level_2/fll_fss/c/fss_basic.c +++ b/level_2/fll_fss/c/fss_basic.c @@ -44,7 +44,7 @@ extern "C" { if (F_status_is_error(status)) return status; if (range->start >= range->stop || range->start >= buffer.used) { - if (status == FL_fss_found_object || status == FL_fss_found_object_content_not) { + if (status == F_fss_found_object || status == F_fss_found_object_content_not) { ++objects->used; if (objects_quoted) { @@ -56,7 +56,7 @@ extern "C" { ++contents->used; - return FL_fss_found_object_content_not; + return F_fss_found_object_content_not; } if (found_data) { @@ -75,7 +75,7 @@ extern "C" { } } - if (status == FL_fss_found_object) { + if (status == F_fss_found_object) { found_data = F_true; status = fl_fss_basic_content_read(buffer, state, range, &contents->array[contents->used], contents_delimits ? contents_delimits : objects_delimits); @@ -83,7 +83,7 @@ extern "C" { break; } - else if (status == FL_fss_found_object_content_not) { + else if (status == F_fss_found_object_content_not) { found_data = F_true; macro_f_fss_content_t_increase(status2, F_fss_default_allocation_step_small_d, contents->array[contents->used]) @@ -91,7 +91,7 @@ extern "C" { break; } - } while (status == FL_fss_found_object_not); + } while (status == F_fss_found_object_not); if (status == F_none_eos || status == F_none_stop) { ++contents->array[contents->used].used; @@ -119,12 +119,12 @@ extern "C" { return status; } - else if (status != FL_fss_found_object && status != FL_fss_found_content && status != FL_fss_found_content_not && status != FL_fss_found_object_content_not) { + else if (status != F_fss_found_object && status != F_fss_found_content && status != F_fss_found_content_not && status != F_fss_found_object_content_not) { return status; } // When content is found, the range->start is incremented, if content is found at range->stop, then range->start will be > range.stop. else if (range->start >= range->stop || range->start >= buffer.used) { - if (status == FL_fss_found_object || status == FL_fss_found_content || status == FL_fss_found_content_not || status == FL_fss_found_object_content_not) { + if (status == F_fss_found_object || status == F_fss_found_content || status == F_fss_found_content_not || status == F_fss_found_object_content_not) { ++objects->used; ++contents->used; @@ -162,7 +162,7 @@ extern "C" { f_status_t status = 0; f_string_range_t range = macro_f_string_range_t_initialize(object.used); - status = fl_fss_basic_object_write(object, quote, f_fss_complete_full, state, &range, destination); + status = fl_fss_basic_object_write(object, quote, f_fss_complete_full_e, state, &range, destination); if (F_status_is_error(status) || status == F_data_not_stop || status == F_data_not_eos) { return status; @@ -173,7 +173,7 @@ extern "C" { range.start = 0; range.stop = content.used - 1; - status = fl_fss_basic_content_write(content, f_fss_complete_full, state, &range, destination); + status = fl_fss_basic_content_write(content, f_fss_complete_full_e, state, &range, destination); if (F_status_is_error(status)) return status; } else { diff --git a/level_2/fll_fss/c/fss_basic.h b/level_2/fll_fss/c/fss_basic.h index 1916801..2d9ab56 100644 --- a/level_2/fll_fss/c/fss_basic.h +++ b/level_2/fll_fss/c/fss_basic.h @@ -11,16 +11,15 @@ #define _FLL_fss_basic_h // fll-0 includes +#include #include -#include #include #include -#include #include +#include // fll-1 includes #include -#include #include #include diff --git a/level_2/fll_fss/c/fss_basic_list.c b/level_2/fll_fss/c/fss_basic_list.c index 4351da7..85f251f 100644 --- a/level_2/fll_fss/c/fss_basic_list.c +++ b/level_2/fll_fss/c/fss_basic_list.c @@ -33,7 +33,7 @@ extern "C" { if (F_status_is_error(status)) return status; if (range->start >= range->stop || range->start >= buffer.used) { - if (status == FL_fss_found_object || status == FL_fss_found_object_content_not) { + if (status == F_fss_found_object || status == F_fss_found_object_content_not) { ++objects->used; macro_f_fss_content_t_increase(status2, F_fss_default_allocation_step_small_d, contents->array[contents->used]) @@ -41,7 +41,7 @@ extern "C" { ++contents->used; - return FL_fss_found_object_content_not; + return F_fss_found_object_content_not; } if (found_data) { @@ -60,7 +60,7 @@ extern "C" { } } - if (status == FL_fss_found_object) { + if (status == F_fss_found_object) { found_data = F_true; status = fl_fss_basic_list_content_read(buffer, state, range, &contents->array[contents->used], contents_delimits ? contents_delimits : objects_delimits, comments); @@ -68,7 +68,7 @@ extern "C" { break; } - else if (status == FL_fss_found_object_content_not) { + else if (status == F_fss_found_object_content_not) { found_data = F_true; macro_f_fss_content_t_increase(status2, F_fss_default_allocation_step_small_d, contents->array[contents->used]) @@ -76,7 +76,7 @@ extern "C" { break; } - } while (status == FL_fss_found_object_not); + } while (status == F_fss_found_object_not); if (status == F_none_eos || status == F_none_stop) { ++contents->array[contents->used].used; @@ -100,13 +100,13 @@ extern "C" { return status; } - else if (status != FL_fss_found_object && status != FL_fss_found_content && status != FL_fss_found_content_not && status != FL_fss_found_object_content_not) { + else if (status != F_fss_found_object && status != F_fss_found_content && status != F_fss_found_content_not && status != F_fss_found_object_content_not) { return status; } else if (range->start >= range->stop || range->start >= buffer.used) { // When content is found, the range->start is incremented, if content is found at range->stop, then range->start will be > range.stop. - if (status == FL_fss_found_object || status == FL_fss_found_content || status == FL_fss_found_content_not || status == FL_fss_found_object_content_not) { + if (status == F_fss_found_object || status == F_fss_found_content || status == F_fss_found_content_not || status == F_fss_found_object_content_not) { ++objects->used; ++contents->used; } @@ -136,7 +136,7 @@ extern "C" { f_status_t status = 0; f_string_range_t range = macro_f_string_range_t_initialize(object.used); - status = fl_fss_basic_list_object_write(object, f_fss_complete_full, state, &range, destination); + status = fl_fss_basic_list_object_write(object, f_fss_complete_full_e, state, &range, destination); if (F_status_is_error(status) || status == F_data_not_stop || status == F_data_not_eos) { return status; @@ -152,7 +152,7 @@ extern "C" { range.stop = 0; } - status = fl_fss_basic_list_content_write(content, f_fss_complete_full, content_prepend, state, &range, destination); + status = fl_fss_basic_list_content_write(content, f_fss_complete_full_e, content_prepend, state, &range, destination); } return status; diff --git a/level_2/fll_fss/c/fss_basic_list.h b/level_2/fll_fss/c/fss_basic_list.h index d76e0a2..3c1f6b7 100644 --- a/level_2/fll_fss/c/fss_basic_list.h +++ b/level_2/fll_fss/c/fss_basic_list.h @@ -11,16 +11,16 @@ #define _FLL_fss_basic_list_h // fll-0 includes +#include #include -#include #include #include -#include +#include +#include // fll-1 includes #include #include -#include #include #ifdef __cplusplus diff --git a/level_2/fll_fss/c/fss_embedded_list.c b/level_2/fll_fss/c/fss_embedded_list.c index 0d709bb..4c3f57f 100644 --- a/level_2/fll_fss/c/fss_embedded_list.c +++ b/level_2/fll_fss/c/fss_embedded_list.c @@ -38,10 +38,10 @@ extern "C" { if (F_status_is_error(status)) return status; if (range->start >= range->stop || range->start >= buffer.used) { - if (status == FL_fss_found_object || status == FL_fss_found_object_content_not) { + if (status == F_fss_found_object || status == F_fss_found_object_content_not) { // extended list requires content closure, so this could be an error. - return FL_fss_found_object_content_not; + return F_fss_found_object_content_not; } if (found_data) { @@ -60,18 +60,18 @@ extern "C" { } } - if (status == FL_fss_found_object) { + if (status == F_fss_found_object) { found_data = F_true; status = fl_fss_embedded_list_content_read(buffer, state, range, nest, contents_delimits ? contents_delimits : objects_delimits, comments); break; } - else if (status == FL_fss_found_object_content_not) { + else if (status == F_fss_found_object_content_not) { found_data = F_true; break; } - } while (status == FL_fss_found_object_not); + } while (status == F_fss_found_object_not); if (status == F_none_eos || status == F_none_stop) { return status; @@ -106,7 +106,7 @@ extern "C" { return status; } - else if (status != FL_fss_found_object && status != FL_fss_found_content && status != FL_fss_found_content_not && status != FL_fss_found_object_content_not) { + else if (status != F_fss_found_object && status != F_fss_found_content && status != F_fss_found_content_not && status != F_fss_found_object_content_not) { return status; } else if (range->start >= range->stop || range->start >= buffer.used) { @@ -134,7 +134,7 @@ extern "C" { f_status_t status = 0; f_string_range_t range = macro_f_string_range_t_initialize(object.used); - status = fl_fss_embedded_list_object_write(object, f_fss_complete_full, state, &range, destination); + status = fl_fss_embedded_list_object_write(object, f_fss_complete_full_e, state, &range, destination); if (F_status_is_error(status) || status == F_data_not_stop || status == F_data_not_eos) { return status; @@ -150,7 +150,7 @@ extern "C" { range.stop = 0; } - status = fl_fss_embedded_list_content_write(content, f_fss_complete_full, content_prepend, ignore, state, &range, destination); + status = fl_fss_embedded_list_content_write(content, f_fss_complete_full_e, content_prepend, ignore, state, &range, destination); } return status; diff --git a/level_2/fll_fss/c/fss_embedded_list.h b/level_2/fll_fss/c/fss_embedded_list.h index a7b542a..f78c8b7 100644 --- a/level_2/fll_fss/c/fss_embedded_list.h +++ b/level_2/fll_fss/c/fss_embedded_list.h @@ -11,16 +11,16 @@ #define _FLL_fss_embedded_list_h // fll-0 includes +#include #include -#include #include #include -#include +#include +#include // fll-1 includes #include #include -#include #ifdef __cplusplus extern "C" { @@ -62,7 +62,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_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. - * FL_fss_found_object_content_not on success and object was found but no content was found (start location is at end of object). + * F_fss_found_object_content_not on success and object was found but no content was found (start location is at end of object). * * 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. diff --git a/level_2/fll_fss/c/fss_extended.c b/level_2/fll_fss/c/fss_extended.c index d3c628d..4db9787 100644 --- a/level_2/fll_fss/c/fss_extended.c +++ b/level_2/fll_fss/c/fss_extended.c @@ -50,7 +50,7 @@ extern "C" { if (F_status_is_error(status)) return status; if (range->start >= range->stop || range->start >= buffer.used) { - if (status == FL_fss_found_object || status == FL_fss_found_object_content_not) { + if (status == F_fss_found_object || status == F_fss_found_object_content_not) { ++objects->used; if (objects_quoted) { @@ -69,7 +69,7 @@ extern "C" { ++contents_quoted->used; } - return FL_fss_found_object_content_not; + return F_fss_found_object_content_not; } if (found_data) { @@ -87,7 +87,7 @@ extern "C" { return F_data_not_stop; } - if (status == FL_fss_found_object) { + if (status == F_fss_found_object) { found_data = F_true; if (contents_quoted) { @@ -102,12 +102,12 @@ extern "C" { break; } - else if (status == FL_fss_found_object_content_not) { + else if (status == F_fss_found_object_content_not) { found_data = F_true; break; } - } while (status == FL_fss_found_object_not); + } while (status == F_fss_found_object_not); if (status == F_none_eos || status == F_none_stop) { contents->array[contents->used].used++; @@ -141,13 +141,13 @@ extern "C" { return status; } - else if (status != FL_fss_found_object && status != FL_fss_found_content && status != FL_fss_found_content_not && status != FL_fss_found_object_content_not && status != F_terminated_not_group) { + else if (status != F_fss_found_object && status != F_fss_found_content && status != F_fss_found_content_not && status != F_fss_found_object_content_not && status != F_terminated_not_group) { return status; } else if (range->start >= range->stop || range->start >= buffer.used) { // When content is found, the range->start is incremented, if content is found at range->stop, then range->start will be > range.stop. - if (status == FL_fss_found_object || status == FL_fss_found_content || status == FL_fss_found_content_not || status == FL_fss_found_object_content_not || status == F_terminated_not_group) { + if (status == F_fss_found_object || status == F_fss_found_content || status == F_fss_found_content_not || status == F_fss_found_object_content_not || status == F_terminated_not_group) { ++objects->used; ++contents->used; @@ -201,19 +201,19 @@ extern "C" { f_status_t status = 0; f_string_range_t range = macro_f_string_range_t_initialize(object.used); - status = fl_fss_extended_object_write(object, quote, f_fss_complete_full, state, &range, destination); + status = fl_fss_extended_object_write(object, quote, f_fss_complete_full_e, state, &range, destination); if (F_status_is_error(status) || status == F_data_not_stop || status == F_data_not_eos) { return status; } if (status == F_none || status == F_none_stop || status == F_none_eos || status == F_none_eol) { - uint8_t complete = f_fss_complete_next; + uint8_t complete = f_fss_complete_next_e; for (f_array_length_t i = 0; i < contents.used; ++i) { if (i + 1 == contents.used) { - complete = f_fss_complete_end; + complete = f_fss_complete_end_e; } if (contents.array[i].used) { diff --git a/level_2/fll_fss/c/fss_extended.h b/level_2/fll_fss/c/fss_extended.h index b19708b..d34a397 100644 --- a/level_2/fll_fss/c/fss_extended.h +++ b/level_2/fll_fss/c/fss_extended.h @@ -11,15 +11,15 @@ #define _FLL_fss_extended_h // fll-0 includes +#include #include -#include #include #include -#include +#include +#include // fll-1 includes #include -#include #include #ifdef __cplusplus diff --git a/level_2/fll_fss/c/fss_extended_list.c b/level_2/fll_fss/c/fss_extended_list.c index d439127..ca2c770 100644 --- a/level_2/fll_fss/c/fss_extended_list.c +++ b/level_2/fll_fss/c/fss_extended_list.c @@ -33,7 +33,7 @@ extern "C" { if (F_status_is_error(status)) return status; if (range->start >= range->stop || range->start >= buffer.used) { - if (status == FL_fss_found_object || status == FL_fss_found_object_content_not) { + if (status == F_fss_found_object || status == F_fss_found_object_content_not) { ++objects->used; macro_f_fss_content_t_increase(status2, F_fss_default_allocation_step_small_d, contents->array[contents->used]) @@ -41,7 +41,7 @@ extern "C" { ++contents->used; - return FL_fss_found_object_content_not; + return F_fss_found_object_content_not; } if (found_data) { @@ -60,7 +60,7 @@ extern "C" { } } - if (status == FL_fss_found_object) { + if (status == F_fss_found_object) { found_data = F_true; status = fl_fss_extended_list_content_read(buffer, state, range, &contents->array[contents->used], contents_delimits ? contents_delimits : objects_delimits, comments); @@ -68,7 +68,7 @@ extern "C" { break; } - else if (status == FL_fss_found_object_content_not) { + else if (status == F_fss_found_object_content_not) { found_data = F_true; macro_f_fss_content_t_increase(status2, F_fss_default_allocation_step_small_d, contents->array[contents->used]) @@ -76,7 +76,7 @@ extern "C" { break; } - } while (status == FL_fss_found_object_not); + } while (status == F_fss_found_object_not); if (status == F_none_eos || status == F_none_stop) { ++contents->array[contents->used].used; @@ -100,13 +100,13 @@ extern "C" { return status; } - else if (status != FL_fss_found_object && status != FL_fss_found_content && status != FL_fss_found_content_not && status != FL_fss_found_object_content_not) { + else if (status != F_fss_found_object && status != F_fss_found_content && status != F_fss_found_content_not && status != F_fss_found_object_content_not) { return status; } else if (range->start >= range->stop || range->start >= buffer.used) { // When content is found, the range->start is incremented, if content is found at range->stop, then range->start will be > range.stop. - if (status == FL_fss_found_object || status == FL_fss_found_content || status == FL_fss_found_content_not || status == FL_fss_found_object_content_not) { + if (status == F_fss_found_object || status == F_fss_found_content || status == F_fss_found_content_not || status == F_fss_found_object_content_not) { ++objects->used; ++contents->used; } @@ -136,7 +136,7 @@ extern "C" { f_status_t status = 0; f_string_range_t range = macro_f_string_range_t_initialize(object.used); - status = fl_fss_extended_list_object_write(object, f_fss_complete_full, state, &range, destination); + status = fl_fss_extended_list_object_write(object, f_fss_complete_full_e, state, &range, destination); if (F_status_is_error(status) || status == F_data_not_stop || status == F_data_not_eos) { return status; @@ -152,7 +152,7 @@ extern "C" { range.stop = 0; } - status = fl_fss_extended_list_content_write(content, f_fss_complete_full, content_prepend, ignore, state, &range, destination); + status = fl_fss_extended_list_content_write(content, f_fss_complete_full_e, content_prepend, ignore, state, &range, destination); } return status; diff --git a/level_2/fll_fss/c/fss_extended_list.h b/level_2/fll_fss/c/fss_extended_list.h index 1bc7fc8..d2af4a4 100644 --- a/level_2/fll_fss/c/fss_extended_list.h +++ b/level_2/fll_fss/c/fss_extended_list.h @@ -11,16 +11,16 @@ #define _FLL_fss_extended_list_h // fll-0 includes +#include #include -#include #include #include -#include +#include +#include // fll-1 includes #include #include -#include #ifdef __cplusplus extern "C" { @@ -66,7 +66,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_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. - * FL_fss_found_object_content_not on success and object was found but no content was found (start location is at end of object). + * F_fss_found_object_content_not on success and object was found but no content was found (start location is at end of object). * * 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. diff --git a/level_2/fll_fss/c/fss_status.h b/level_2/fll_fss/c/fss_status.h deleted file mode 100644 index e119f78..0000000 --- a/level_2/fll_fss/c/fss_status.h +++ /dev/null @@ -1,128 +0,0 @@ -/** - * FLL - Level 2 - * - * Project: FSS - * API Version: 0.5 - * Licenses: lgpl-2.1-or-later - * - * This provides fss status code translation. - */ -#ifndef _FLL_fss_status_h -#define _FLL_fss_status_h - -// fll-0 includes -#include -#include -#include -#include -#include -#include - -// fll-1 includes -#include -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef _di_fll_fss_status_string_ - #ifndef _di_fll_fss_status_error_ - #define FLL_fss_status_format_s "FL_fss_format" - #define FLL_fss_status_format_s_length 13 - - #define FLL_fss_status_format_eos_s "FL_fss_format_eos" - #define FLL_fss_status_format_eos_s_length 17 - #endif // _di_fll_fss_status_error_ - - #ifndef _di_fll_fss_status_warning_ - #define FLL_fss_status_accepted_invalid_s "FL_fss_accepted_invalid" - #define FLL_fss_status_accepted_invalid_s_length 23 - - #define FLL_fss_status_accepted_invalid_eos_s "FL_fss_accepted_invalid_eos" - #define FLL_fss_status_accepted_invalid_eos_s_length 27 - #endif // _di_fll_fss_status_warning_ - - #ifndef _di_fll_fss_status_success_ - #define FLL_fss_status_found_object_s "FL_fss_found_object" - #define FLL_fss_status_found_object_s_length 19 - - #define FLL_fss_status_found_content_s "FL_fss_found_content" - #define FLL_fss_status_found_content_s_length 20 - - #define FLL_fss_status_found_object_not_s "FL_fss_found_object_not" - #define FLL_fss_status_found_object_not_s_length 23 - - #define FLL_fss_status_found_content_not_s "FL_fss_found_content_not" - #define FLL_fss_status_found_content_not_s_length 24 - - #define FLL_fss_status_found_object_content_not_s "FL_fss_found_object_content_not" - #define FLL_fss_status_found_object_content_not_s_length 31 - #endif // _di_fll_fss_status_success_ - - #ifndef _di_fll_fss_status_codes_ - #define FLL_fss_status_found_comment_s "FL_fss_found_comment" - #define FLL_fss_status_found_comment_length_s 14 - #endif // _di_fll_fss_status_codes_ - - #define FLL_fss_status_status_code_first_s "FL_fss_status_code_first" - #define FLL_fss_status_status_code_first_s_length 24 - - #define FLL_fss_status_status_code_last_s "FL_fss_status_code_last" - #define FLL_fss_status_status_code_last_s_length 22 -#endif // _di_fll_fss_status_string_ - -/** - * Convert FSS status codes from their string equivalents to a status code. - * - * Error, warning, and signal flags will not be assigned to the code. - * - * This process the string until either a match or NULL is reached. - * - * @param string - * The code name to process. - * @param code - * The code code a matched string represents. - * - * @return - * F_none on success. - * F_data_not if string is empty. - * - * F_data (with error bit) if not found. - * F_parameter (with error bit) if a parameter is invalid. - * - * Errors (with error bit) from: f_conversion_character_is_decimal(). - */ -#ifndef _di_fll_fss_status_from_string_ - extern f_status_t fll_fss_status_from_string(const f_string_t string, f_status_t *code); -#endif // _di_fll_fss_status_to_string_ - -/** - * Convert code codes to their string equivalents. - * - * @param code - * The code to process. - * @param string - * The code name that represents the given code. - * - * @return - * F_none on success. - * - * F_parameter (with error bit) if a parameter is invalid. - * - * Errors (with error bit) from: fl_status_to_string(). - * - * @see fl_status_to_string() - */ -#ifndef _di_fll_fss_status_to_string_ - extern f_status_t fll_fss_status_to_string(const f_status_t code, f_string_t *string); -#endif // _di_fll_status_to_string_ - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // _FLL_fss_status_h diff --git a/level_2/fll_fss/data/build/dependencies b/level_2/fll_fss/data/build/dependencies index b86e46d..d30f4e0 100644 --- a/level_2/fll_fss/data/build/dependencies +++ b/level_2/fll_fss/data/build/dependencies @@ -8,7 +8,7 @@ f_utf f_conversion f_fss f_file +f_status_string fl_conversion fl_fss -fl_status fl_string diff --git a/level_2/fll_fss/data/build/settings b/level_2/fll_fss/data/build/settings index ba7e9d8..08648f7 100644 --- a/level_2/fll_fss/data/build/settings +++ b/level_2/fll_fss/data/build/settings @@ -21,16 +21,16 @@ build_indexer ar build_indexer_arguments rcs 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_string -lf_type_array -lf_utf +build_libraries-individual -lfl_conversion -lfl_fss -lfl_string -lf_conversion -lf_file -lf_fss -lf_memory -lf_status_string -lf_string -lf_type_array -lf_utf build_libraries_shared build_libraries_static -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_library fss.c private-fss.c fss_basic.c fss_basic_list.c fss_embedded_list.c fss_extended.c fss_extended_list.c build_sources_library_shared build_sources_library_static build_sources_program build_sources_program_shared build_sources_program_static -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 +build_sources_headers fss.h fss_basic.h fss_basic_list.h fss_embedded_list.h fss_extended.h fss_extended_list.h build_sources_headers_shared build_sources_headers_static build_sources_script diff --git a/level_2/fll_fss/c/fss_status.c b/level_2/fll_fss_status_string/c/fss_status_string.c similarity index 62% rename from level_2/fll_fss/c/fss_status.c rename to level_2/fll_fss_status_string/c/fss_status_string.c index 77b848a..08585c9 100644 --- a/level_2/fll_fss/c/fss_status.c +++ b/level_2/fll_fss_status_string/c/fss_status_string.c @@ -1,11 +1,38 @@ -#include "fss_status.h" +#include "fss_status_string.h" #ifdef __cplusplus extern "C" { #endif -#ifndef _di_fll_fss_status_from_string_ - f_status_t fll_fss_status_from_string(const f_string_t string, f_status_t *code) { +#ifndef _di_fll_fss_status_string_ + #ifndef _di_fll_fss_status_error_ + const f_string_t fll_fss_status_format_s = FLL_fss_status_format_s; + const f_string_t fll_fss_status_format_eos_s = FLL_fss_status_format_eos_s; + #endif // _di_fll_fss_status_error_ + + #ifndef _di_fll_fss_status_warning_ + const f_string_t fll_fss_status_accepted_invalid_s = FLL_fss_status_accepted_invalid_s; + const f_string_t fll_fss_status_accepted_invalid_eos_s = FLL_fss_status_accepted_invalid_eos_s; + #endif // _di_fll_fss_status_warning_ + + #ifndef _di_fll_fss_status_success_ + const f_string_t fll_fss_status_found_object_s = FLL_fss_status_found_object_s; + const f_string_t fll_fss_status_found_content_s = FLL_fss_status_found_content_s; + const f_string_t fll_fss_status_found_object_not_s = FLL_fss_status_found_object_not_s; + const f_string_t fll_fss_status_found_content_not_s = FLL_fss_status_found_content_not_s; + const f_string_t fll_fss_status_found_object_content_not_s = FLL_fss_status_found_object_content_not_s; + #endif // _di_fll_fss_status_success_ + + #ifndef _di_fll_fss_status_codes_ + const f_string_t fll_fss_status_found_comment_s = FLL_fss_status_found_comment_s; + #endif // _di_fll_fss_status_codes_ + + const f_string_t fll_fss_status_status_code_first_s = FLL_fss_status_status_code_first_s; + const f_string_t fll_fss_status_status_code_last_s = FLL_fss_status_status_code_last_s; +#endif // _di_FLL_fss_status_string_ + +#ifndef _di_fll_fss_status_string_from_ + f_status_t fll_fss_status_string_from(const f_string_t string, f_status_t *code) { #ifndef _di_level_2_parameter_checking_ if (!code) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ @@ -30,13 +57,13 @@ extern "C" { #ifndef _di_fll_fss_status_error_ if (fl_string_compare(string, FLL_fss_status_format_s, length, FLL_fss_status_format_s_length) == F_equal_to) { - *code = FL_fss_format; + *code = F_fss_format; return F_none; } if (fl_string_compare(string, FLL_fss_status_format_eos_s, length, FLL_fss_status_format_eos_s_length) == F_equal_to) { - *code = FL_fss_format_eos; + *code = F_fss_format_eos; return F_none; } @@ -44,13 +71,13 @@ extern "C" { #ifndef _di_fll_fss_status_warning_ if (fl_string_compare(string, FLL_fss_status_accepted_invalid_s, length, FLL_fss_status_accepted_invalid_s_length) == F_equal_to) { - *code = FL_fss_accepted_invalid; + *code = F_fss_accepted_invalid; return F_none; } if (fl_string_compare(string, FLL_fss_status_accepted_invalid_eos_s, length, FLL_fss_status_accepted_invalid_eos_s_length) == F_equal_to) { - *code = FL_fss_accepted_invalid_eos; + *code = F_fss_accepted_invalid_eos; return F_none; } @@ -58,31 +85,31 @@ extern "C" { #ifndef _di_fll_fss_status_success_ if (fl_string_compare(string, FLL_fss_status_found_object_s, length, FLL_fss_status_found_object_s_length) == F_equal_to) { - *code = FL_fss_found_object; + *code = F_fss_found_object; return F_none; } if (fl_string_compare(string, FLL_fss_status_found_content_s, length, FLL_fss_status_found_content_s_length) == F_equal_to) { - *code = FL_fss_found_content; + *code = F_fss_found_content; return F_none; } if (fl_string_compare(string, FLL_fss_status_found_object_not_s, length, FLL_fss_status_found_object_not_s_length) == F_equal_to) { - *code = FL_fss_found_object_not; + *code = F_fss_found_object_not; return F_none; } if (fl_string_compare(string, FLL_fss_status_found_content_not_s, length, FLL_fss_status_found_content_not_s_length) == F_equal_to) { - *code = FL_fss_found_content_not; + *code = F_fss_found_content_not; return F_none; } if (fl_string_compare(string, FLL_fss_status_found_object_content_not_s, length, FLL_fss_status_found_object_content_not_s_length) == F_equal_to) { - *code = FL_fss_found_object_content_not; + *code = F_fss_found_object_content_not; return F_none; } @@ -90,30 +117,30 @@ extern "C" { #ifndef _di_fll_fss_status_codes_ if (fl_string_compare(string, FLL_fss_status_found_comment_s, length, FLL_fss_status_found_comment_length_s) == F_equal_to) { - *code = FL_fss_found_object; + *code = F_fss_found_object; return F_none; } #endif // _di_fll_fss_status_codes_ if (fl_string_compare(string, FLL_fss_status_status_code_first_s, length, FLL_fss_status_status_code_first_s_length) == F_equal_to) { - *code = FL_fss_status_code_first; + *code = F_fss_status_code_first; return F_none; } if (fl_string_compare(string, FLL_fss_status_status_code_last_s, length, FLL_fss_status_status_code_last_s_length) == F_equal_to) { - *code = FL_fss_status_code_last; + *code = F_fss_status_code_last; return F_none; } return F_status_set_error(F_data); } -#endif // _di_fll_fss_status_from_string_ +#endif // _di_fll_fss_status_string_from_ -#ifndef _di_fll_fss_status_to_string_ - f_status_t fll_fss_status_to_string(const f_status_t code, f_string_t *string) { +#ifndef _di_fll_fss_status_string_to_ + f_status_t fll_fss_status_string_to(const f_status_t code, f_string_t *string) { #ifndef _di_level_2_parameter_checking_ if (!string) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ @@ -122,62 +149,62 @@ extern "C" { switch (unmasked_code) { #ifndef _di_fll_fss_status_error_ - case FL_fss_format: + case F_fss_format: *string = FLL_fss_status_format_s; break; - case FL_fss_format_eos: + case F_fss_format_eos: *string = FLL_fss_status_format_eos_s; break; #endif // _di_fll_fss_status_error_ #ifndef _di_fll_fss_status_warning_ - case FL_fss_accepted_invalid: + case F_fss_accepted_invalid: *string = FLL_fss_status_accepted_invalid_s; break; - case FL_fss_accepted_invalid_eos: + case F_fss_accepted_invalid_eos: *string = FLL_fss_status_accepted_invalid_eos_s; break; #endif // _di_fll_fss_status_warning_ #ifndef _di_fll_fss_status_success_ - case FL_fss_found_object: + case F_fss_found_object: *string = FLL_fss_status_found_object_s; break; - case FL_fss_found_content: + case F_fss_found_content: *string = FLL_fss_status_found_content_s; break; - case FL_fss_found_object_not: + case F_fss_found_object_not: *string = FLL_fss_status_found_object_not_s; break; - case FL_fss_found_content_not: + case F_fss_found_content_not: *string = FLL_fss_status_found_content_not_s; break; - case FL_fss_found_object_content_not: + case F_fss_found_object_content_not: *string = FLL_fss_status_found_object_content_not_s; break; #endif // _di_fll_fss_status_success_ #ifndef _di_fll_fss_status_codes_ - case FL_fss_found_comment: + case F_fss_found_comment: *string = FLL_fss_status_found_comment_s; break; #endif // _di_fll_fss_status_codes_ - case FL_fss_status_code_first: + case F_fss_status_code_first: *string = FLL_fss_status_status_code_first_s; break; - case FL_fss_status_code_last: + case F_fss_status_code_last: *string = FLL_fss_status_status_code_last_s; break; default: - return fl_status_to_string(code, string); + return f_status_string_to(code, string); } return F_none; } -#endif // _di_fll_status_to_string_ +#endif // _di_fll_status_string_to_ #ifdef __cplusplus } // extern "C" diff --git a/level_2/fll_fss_status_string/c/fss_status_string.h b/level_2/fll_fss_status_string/c/fss_status_string.h new file mode 100644 index 0000000..e911ef8 --- /dev/null +++ b/level_2/fll_fss_status_string/c/fss_status_string.h @@ -0,0 +1,141 @@ +/** + * FLL - Level 2 + * + * Project: FSS + * API Version: 0.5 + * Licenses: lgpl-2.1-or-later + * + * Provides FSS status code functions, such as those that translate status codes into strings. + */ +#ifndef _FLL_fss_status_string_h +#define _FLL_fss_status_string_h + +// fll-0 includes +#include +#include +#include +#include +#include +#include +#include +#include + +// fll-1 includes +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_fll_fss_status_string_ + #ifndef _di_fll_fss_status_error_ + #define FLL_fss_status_format_s "F_fss_format" + #define FLL_fss_status_format_eos_s "F_fss_format_eos" + + #define FLL_fss_status_format_s_length 12 + #define FLL_fss_status_format_eos_s_length 16 + + extern const f_string_t fll_fss_status_format_s; + extern const f_string_t fll_fss_status_format_eos_s; + #endif // _di_fll_fss_status_error_ + + #ifndef _di_fll_fss_status_warning_ + #define FLL_fss_status_accepted_invalid_s "F_fss_accepted_invalid" + #define FLL_fss_status_accepted_invalid_eos_s "F_fss_accepted_invalid_eos" + + #define FLL_fss_status_accepted_invalid_s_length 22 + #define FLL_fss_status_accepted_invalid_eos_s_length 26 + + extern const f_string_t fll_fss_status_accepted_invalid_s; + extern const f_string_t fll_fss_status_accepted_invalid_eos_s; + #endif // _di_fll_fss_status_warning_ + + #ifndef _di_fll_fss_status_success_ + #define FLL_fss_status_found_object_s "F_fss_found_object" + #define FLL_fss_status_found_content_s "F_fss_found_content" + #define FLL_fss_status_found_object_not_s "F_fss_found_object_not" + #define FLL_fss_status_found_content_not_s "F_fss_found_content_not" + #define FLL_fss_status_found_object_content_not_s "F_fss_found_object_content_not" + + #define FLL_fss_status_found_object_s_length 18 + #define FLL_fss_status_found_content_s_length 19 + #define FLL_fss_status_found_object_not_s_length 22 + #define FLL_fss_status_found_content_not_s_length 23 + #define FLL_fss_status_found_object_content_not_s_length 30 + + extern const f_string_t fll_fss_status_found_object_s; + extern const f_string_t fll_fss_status_found_content_s; + extern const f_string_t fll_fss_status_found_object_not_s; + extern const f_string_t fll_fss_status_found_content_not_s; + extern const f_string_t fll_fss_status_found_object_content_not_s; + #endif // _di_fll_fss_status_success_ + + #ifndef _di_fll_fss_status_codes_ + #define FLL_fss_status_found_comment_s "F_fss_found_comment" + + #define FLL_fss_status_found_comment_length_s 19 + + extern const f_string_t fll_fss_status_found_comment_s; + #endif // _di_fll_fss_status_codes_ + + #define FLL_fss_status_status_code_first_s "F_fss_status_code_first" + #define FLL_fss_status_status_code_last_s "F_fss_status_code_last" + + #define FLL_fss_status_status_code_first_s_length 23 + #define FLL_fss_status_status_code_last_s_length 21 + + extern const f_string_t fll_fss_status_status_code_first_s; + extern const f_string_t fll_fss_status_status_code_last_s; +#endif // _di_fll_fss_status_string_ + +/** + * Convert FSS status codes from their string equivalents to a status code. + * + * Error, warning, and signal flags will not be assigned to the code. + * + * This process the string until either a match or NULL is reached. + * + * @param string + * The code name to process. + * @param code + * The code code a matched string represents. + * + * @return + * F_none on success. + * F_data_not if string is empty. + * + * F_data (with error bit) if not found. + * F_parameter (with error bit) if a parameter is invalid. + * + * Errors (with error bit) from: f_conversion_character_is_decimal(). + */ +#ifndef _di_fll_fss_status_string_from_ + extern f_status_t fll_fss_status_string_from(const f_string_t string, f_status_t *code); +#endif // _di_fll_fss_status_string_to_ + +/** + * Convert code codes to their string equivalents. + * + * @param code + * The code to process. + * @param string + * The code name that represents the given code. + * + * @return + * F_none on success. + * + * F_parameter (with error bit) if a parameter is invalid. + * + * Errors (with error bit) from: f_status_string_to(). + * + * @see f_status_string_to() + */ +#ifndef _di_fll_fss_status_string_to_ + extern f_status_t fll_fss_status_string_to(const f_status_t code, f_string_t *string); +#endif // _di_fll_fss_status_string_to_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _FLL_fss_status_string_h diff --git a/level_2/fll_status/data/build/defines b/level_2/fll_fss_status_string/data/build/defines similarity index 100% rename from level_2/fll_status/data/build/defines rename to level_2/fll_fss_status_string/data/build/defines diff --git a/level_2/fll_fss_status_string/data/build/dependencies b/level_2/fll_fss_status_string/data/build/dependencies new file mode 100644 index 0000000..377335f --- /dev/null +++ b/level_2/fll_fss_status_string/data/build/dependencies @@ -0,0 +1,11 @@ +# fss-0000 + +f_type +f_status +f_memory +f_string +f_utf +f_conversion +f_fss +f_status_string +fl_string diff --git a/level_2/fll_fss_status_string/data/build/settings b/level_2/fll_fss_status_string/data/build/settings new file mode 100644 index 0000000..5a5212e --- /dev/null +++ b/level_2/fll_fss_status_string/data/build/settings @@ -0,0 +1,75 @@ +# fss-0001 + +project_name fll_fss_status_string + +version_major 0 +version_minor 5 +version_micro 7 +version_file micro +version_target minor + +environment + +process_pre +process_post + +modes individual +modes_default individual + +build_compiler gcc +build_indexer ar +build_indexer_arguments rcs +build_language c +build_libraries -lc +build_libraries-individual -lfl_string -lf_conversion -lf_fss -lf_memory -lf_status_string -lf_string -lf_type_array -lf_utf +build_libraries_shared +build_libraries_static +build_sources_library fss_status_string.c +build_sources_library_shared +build_sources_library_static +build_sources_program +build_sources_program_shared +build_sources_program_static +build_sources_headers fss_status_string.h +build_sources_headers_shared +build_sources_headers_static +build_sources_script +build_sources_setting +build_script yes +build_shared yes +build_static no + +path_headers fll/level_2 +path_headers_preserve no +path_library_script script +path_library_shared shared +path_library_static static +path_program_script script +path_program_shared shared +path_program_static static +path_sources +path_standard yes + +search_exclusive yes +search_shared yes +search_static yes + +defines +defines_library +defines_library_shared +defines_library_static +defines_program +defines_program_shared +defines_program_static +defines_static +defines_shared + +flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-logical-op-parentheses -Wno-parentheses +flags_library -fPIC +flags_library_shared +flags_library_static +flags_program -fPIE +flags_program_shared +flags_program_static +flags_shared +flags_static diff --git a/level_2/fll_status/c/status.c b/level_2/fll_status/c/status.c deleted file mode 100644 index c634c52..0000000 --- a/level_2/fll_status/c/status.c +++ /dev/null @@ -1,2797 +0,0 @@ -#include "status.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef _di_fll_status_from_string_ - f_status_t fll_status_from_string(const f_string_t string, f_status_t *code) { - #ifndef _di_level_2_parameter_checking_ - if (!code) return F_status_set_error(F_parameter); - #endif // _di_level_2_parameter_checking_ - - f_status_t status = F_none; - const f_array_length_t length = strlen(string); - - if (!length) { - return F_data_not; - } - - // Numbers are not valid status code strings. - if ((status = f_conversion_character_is_decimal(string[0])) == F_true) { - return F_status_set_error(F_data); - } - - if (F_status_is_error(status)) { - return status; - } - - #ifndef _di_F_status_boolean_ - if (fl_string_compare(string, FL_status_string_false, length, FL_status_string_false_length) == F_equal_to) { - *code = F_false; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_true, length, FL_status_string_true_length) == F_equal_to) { - *code = F_true; - - return F_none; - } - #endif // _di_F_status_boolean_ - - #ifndef _di_F_status_signal_ - if (fl_string_compare(string, FL_status_string_signal_hangup, length, FL_status_string_signal_hangup_length) == F_equal_to) { - *code = F_signal_hangup; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_interrupt, length, FL_status_string_signal_interrupt_length) == F_equal_to) { - *code = F_signal_interrupt; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_quit, length, FL_status_string_signal_quit_length) == F_equal_to) { - *code = F_signal_quit; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_illegal, length, FL_status_string_signal_illegal_length) == F_equal_to) { - *code = F_signal_illegal; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_trap, length, FL_status_string_signal_trap_length) == F_equal_to) { - *code = F_signal_trap; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_abort, length, FL_status_string_signal_abort_length) == F_equal_to) { - *code = F_signal_abort; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_bus_error, length, FL_status_string_signal_bus_error_length) == F_equal_to) { - *code = F_signal_bus_error; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_floating_point_error, length, FL_status_string_signal_floating_point_error_length) == F_equal_to) { - *code = F_signal_floating_point_error; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_kill, length, FL_status_string_signal_kill_length) == F_equal_to) { - *code = F_signal_kill; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_user_1, length, FL_status_string_signal_user_1_length) == F_equal_to) { - *code = F_signal_user_1; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_segmentation_fault, length, FL_status_string_signal_segmentation_fault_length) == F_equal_to) { - *code = F_signal_segmentation_fault; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_user_2, length, FL_status_string_signal_user_2_length) == F_equal_to) { - *code = F_signal_user_2; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_broken_pipe, length, FL_status_string_signal_broken_pipe_length) == F_equal_to) { - *code = F_signal_broken_pipe; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_alarm_clock, length, FL_status_string_signal_alarm_clock_length) == F_equal_to) { - *code = F_signal_alarm_clock; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_termination, length, FL_status_string_signal_termination_length) == F_equal_to) { - *code = F_signal_termination; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_stack_fault, length, FL_status_string_signal_stack_fault_length) == F_equal_to) { - *code = F_signal_stack_fault; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_child, length, FL_status_string_signal_child_length) == F_equal_to) { - *code = F_signal_child; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_continue, length, FL_status_string_signal_continue_length) == F_equal_to) { - *code = F_signal_continue; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_stop, length, FL_status_string_signal_stop_length) == F_equal_to) { - *code = F_signal_stop; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_keyboard_stop, length, FL_status_string_signal_keyboard_stop_length) == F_equal_to) { - *code = F_signal_keyboard_stop; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_tty_in, length, FL_status_string_signal_tty_in_length) == F_equal_to) { - *code = F_signal_tty_in; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_tty_out, length, FL_status_string_signal_tty_out_length) == F_equal_to) { - *code = F_signal_tty_out; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_urgent, length, FL_status_string_signal_urgent_length) == F_equal_to) { - *code = F_signal_urgent; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_cpu_limit, length, FL_status_string_signal_cpu_limit_length) == F_equal_to) { - *code = F_signal_cpu_limit; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_file_size_limit, length, FL_status_string_signal_file_size_limit_length) == F_equal_to) { - *code = F_signal_file_size_limit; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_virtual_alarm_clock, length, FL_status_string_signal_virtual_alarm_clock_length) == F_equal_to) { - *code = F_signal_virtual_alarm_clock; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_profile_alarm_clock, length, FL_status_string_signal_profile_alarm_clock_length) == F_equal_to) { - *code = F_signal_profile_alarm_clock; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_window_size_change, length, FL_status_string_signal_window_size_change_length) == F_equal_to) { - *code = F_signal_window_size_change; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_pollable_event, length, FL_status_string_signal_pollable_event_length) == F_equal_to) { - *code = F_signal_pollable_event; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_power_failure, length, FL_status_string_signal_power_failure_length) == F_equal_to) { - *code = F_signal_power_failure; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_bad_system_call, length, FL_status_string_signal_bad_system_call_length) == F_equal_to) { - *code = F_signal_bad_system_call; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_32, length, FL_status_string_signal_reserved_32_length) == F_equal_to) { - *code = F_signal_reserved_32; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_33, length, FL_status_string_signal_reserved_33_length) == F_equal_to) { - *code = F_signal_reserved_33; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_34, length, FL_status_string_signal_reserved_34_length) == F_equal_to) { - *code = F_signal_reserved_34; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_35, length, FL_status_string_signal_reserved_35_length) == F_equal_to) { - *code = F_signal_reserved_35; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_36, length, FL_status_string_signal_reserved_36_length) == F_equal_to) { - *code = F_signal_reserved_36; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_37, length, FL_status_string_signal_reserved_37_length) == F_equal_to) { - *code = F_signal_reserved_37; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_38, length, FL_status_string_signal_reserved_38_length) == F_equal_to) { - *code = F_signal_reserved_38; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_39, length, FL_status_string_signal_reserved_39_length) == F_equal_to) { - *code = F_signal_reserved_39; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_40, length, FL_status_string_signal_reserved_40_length) == F_equal_to) { - *code = F_signal_reserved_40; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_41, length, FL_status_string_signal_reserved_41_length) == F_equal_to) { - *code = F_signal_reserved_41; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_42, length, FL_status_string_signal_reserved_42_length) == F_equal_to) { - *code = F_signal_reserved_42; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_43, length, FL_status_string_signal_reserved_43_length) == F_equal_to) { - *code = F_signal_reserved_43; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_44, length, FL_status_string_signal_reserved_44_length) == F_equal_to) { - *code = F_signal_reserved_44; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_45, length, FL_status_string_signal_reserved_45_length) == F_equal_to) { - *code = F_signal_reserved_45; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_46, length, FL_status_string_signal_reserved_46_length) == F_equal_to) { - *code = F_signal_reserved_46; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_47, length, FL_status_string_signal_reserved_47_length) == F_equal_to) { - *code = F_signal_reserved_47; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_48, length, FL_status_string_signal_reserved_48_length) == F_equal_to) { - *code = F_signal_reserved_48; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_49, length, FL_status_string_signal_reserved_49_length) == F_equal_to) { - *code = F_signal_reserved_49; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_50, length, FL_status_string_signal_reserved_50_length) == F_equal_to) { - *code = F_signal_reserved_50; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_51, length, FL_status_string_signal_reserved_51_length) == F_equal_to) { - *code = F_signal_reserved_51; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_52, length, FL_status_string_signal_reserved_52_length) == F_equal_to) { - *code = F_signal_reserved_52; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_53, length, FL_status_string_signal_reserved_53_length) == F_equal_to) { - *code = F_signal_reserved_53; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_54, length, FL_status_string_signal_reserved_54_length) == F_equal_to) { - *code = F_signal_reserved_54; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_55, length, FL_status_string_signal_reserved_55_length) == F_equal_to) { - *code = F_signal_reserved_55; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_56, length, FL_status_string_signal_reserved_56_length) == F_equal_to) { - *code = F_signal_reserved_56; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_57, length, FL_status_string_signal_reserved_57_length) == F_equal_to) { - *code = F_signal_reserved_57; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_58, length, FL_status_string_signal_reserved_58_length) == F_equal_to) { - *code = F_signal_reserved_58; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_59, length, FL_status_string_signal_reserved_59_length) == F_equal_to) { - *code = F_signal_reserved_59; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_60, length, FL_status_string_signal_reserved_60_length) == F_equal_to) { - *code = F_signal_reserved_60; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_61, length, FL_status_string_signal_reserved_61_length) == F_equal_to) { - *code = F_signal_reserved_61; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_62, length, FL_status_string_signal_reserved_62_length) == F_equal_to) { - *code = F_signal_reserved_62; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_63, length, FL_status_string_signal_reserved_63_length) == F_equal_to) { - *code = F_signal_reserved_63; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_reserved_64, length, FL_status_string_signal_reserved_64_length) == F_equal_to) { - *code = F_signal_reserved_64; - - return F_none; - } - #endif // _di_F_status_signal_ - - #ifndef _di_F_status_basic_ - if (fl_string_compare(string, FL_status_string_none, length, FL_status_string_none_length) == F_equal_to) { - *code = F_none; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_absolute, length, FL_status_string_absolute_length) == F_equal_to) { - *code = F_absolute; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_absolute_not, length, FL_status_string_absolute_not_length) == F_equal_to) { - *code = F_absolute_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_address, length, FL_status_string_address_length) == F_equal_to) { - *code = F_address; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_address_not, length, FL_status_string_address_not_length) == F_equal_to) { - *code = F_address_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_ascii, length, FL_status_string_ascii_length) == F_equal_to) { - *code = F_ascii; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_ascii_not, length, FL_status_string_ascii_not_length) == F_equal_to) { - *code = F_ascii_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_block, length, FL_status_string_block_length) == F_equal_to) { - *code = F_block; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_block_not, length, FL_status_string_block_not_length) == F_equal_to) { - *code = F_block_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_bound, length, FL_status_string_bound_length) == F_equal_to) { - *code = F_bound; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_bound_not, length, FL_status_string_bound_not_length) == F_equal_to) { - *code = F_bound_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_capability, length, FL_status_string_capability_length) == F_equal_to) { - *code = F_capability; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_capability_not, length, FL_status_string_capability_not_length) == F_equal_to) { - *code = F_capability_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_child, length, FL_status_string_child_length) == F_equal_to) { - *code = F_child; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_child_not, length, FL_status_string_child_not_length) == F_equal_to) { - *code = F_child_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_complete, length, FL_status_string_complete_length) == F_equal_to) { - *code = F_complete; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_complete_not, length, FL_status_string_complete_not_length) == F_equal_to) { - *code = F_complete_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_connected, length, FL_status_string_connected_length) == F_equal_to) { - *code = F_connected; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_connected_not, length, FL_status_string_connected_not_length) == F_equal_to) { - *code = F_connected_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_container, length, FL_status_string_container_length) == F_equal_to) { - *code = F_container; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_container_not, length, FL_status_string_container_not_length) == F_equal_to) { - *code = F_container_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_control, length, FL_status_string_control_length) == F_equal_to) { - *code = F_control; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_control_not, length, FL_status_string_control_not_length) == F_equal_to) { - *code = F_control_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_control_group, length, FL_status_string_control_group_length) == F_equal_to) { - *code = F_control_group; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_control_group_not, length, FL_status_string_control_group_not_length) == F_equal_to) { - *code = F_control_group_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_critical, length, FL_status_string_critical_length) == F_equal_to) { - *code = F_critical; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_critical_not, length, FL_status_string_critical_not_length) == F_equal_to) { - *code = F_critical_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_dead, length, FL_status_string_dead_length) == F_equal_to) { - *code = F_dead; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_dead_not, length, FL_status_string_dead_not_length) == F_equal_to) { - *code = F_dead_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_deadlock, length, FL_status_string_deadlock_length) == F_equal_to) { - *code = F_deadlock; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_deadlock_not, length, FL_status_string_deadlock_not_length) == F_equal_to) { - *code = F_deadlock_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_descriptor, length, FL_status_string_descriptor_length) == F_equal_to) { - *code = F_descriptor; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_descriptor_not, length, FL_status_string_descriptor_not_length) == F_equal_to) { - *code = F_descriptor_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_device, length, FL_status_string_device_length) == F_equal_to) { - *code = F_device; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_device_not, length, FL_status_string_device_not_length) == F_equal_to) { - *code = F_device_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_disable, length, FL_status_string_disable_length) == F_equal_to) { - *code = F_disable; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_disable_not, length, FL_status_string_disable_not_length) == F_equal_to) { - *code = F_disable_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_done, length, FL_status_string_done_length) == F_equal_to) { - *code = F_done; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_done_not, length, FL_status_string_done_not_length) == F_equal_to) { - *code = F_done_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_dummy, length, FL_status_string_dummy_length) == F_equal_to) { - *code = F_dummy; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_dummy_not, length, FL_status_string_dummy_not_length) == F_equal_to) { - *code = F_dummy_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_empty, length, FL_status_string_empty_length) == F_equal_to) { - *code = F_empty; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_empty_not, length, FL_status_string_empty_not_length) == F_equal_to) { - *code = F_empty_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_enable, length, FL_status_string_enable_length) == F_equal_to) { - *code = F_enable; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_enable_not, length, FL_status_string_enable_not_length) == F_equal_to) { - *code = F_enable_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_encoding, length, FL_status_string_encoding_length) == F_equal_to) { - *code = F_encoding; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_encoding_not, length, FL_status_string_encoding_not_length) == F_equal_to) { - *code = F_encoding_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_eoa, length, FL_status_string_eoa_length) == F_equal_to) { - *code = F_eoa; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_eoa_not, length, FL_status_string_eoa_not_length) == F_equal_to) { - *code = F_eoa_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_eof, length, FL_status_string_eof_length) == F_equal_to) { - *code = F_eof; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_eof_not, length, FL_status_string_eof_not_length) == F_equal_to) { - *code = F_eof_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_eol, length, FL_status_string_eol_length) == F_equal_to) { - *code = F_eol; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_eol_not, length, FL_status_string_eol_not_length) == F_equal_to) { - *code = F_eol_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_eos, length, FL_status_string_eos_length) == F_equal_to) { - *code = F_eos; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_eos_not, length, FL_status_string_eos_not_length) == F_equal_to) { - *code = F_eos_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_execute, length, FL_status_string_execute_length) == F_equal_to) { - *code = F_execute; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_execute_not, length, FL_status_string_execute_not_length) == F_equal_to) { - *code = F_execute_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_exist, length, FL_status_string_exist_length) == F_equal_to) { - *code = F_exist; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_exist_not, length, FL_status_string_exist_not_length) == F_equal_to) { - *code = F_exist_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_failure, length, FL_status_string_failure_length) == F_equal_to) { - *code = F_failure; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_failure_not, length, FL_status_string_failure_not_length) == F_equal_to) { - *code = F_failure_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_first, length, FL_status_string_first_length) == F_equal_to) { - *code = F_first; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_first_not, length, FL_status_string_first_not_length) == F_equal_to) { - *code = F_first_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_fork, length, FL_status_string_fork_length) == F_equal_to) { - *code = F_fork; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_fork_not, length, FL_status_string_fork_not_length) == F_equal_to) { - *code = F_fork_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_format, length, FL_status_string_format_length) == F_equal_to) { - *code = F_format; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_format_not, length, FL_status_string_format_not_length) == F_equal_to) { - *code = F_format_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_found, length, FL_status_string_found_length) == F_equal_to) { - *code = F_found; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_found_not, length, FL_status_string_found_not_length) == F_equal_to) { - *code = F_found_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_full, length, FL_status_string_full_length) == F_equal_to) { - *code = F_full; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_full_not, length, FL_status_string_full_not_length) == F_equal_to) { - *code = F_full_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_group, length, FL_status_string_group_length) == F_equal_to) { - *code = F_group; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_group_not, length, FL_status_string_group_not_length) == F_equal_to) { - *code = F_group_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_ignore, length, FL_status_string_ignore_length) == F_equal_to) { - *code = F_ignore; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_ignore_not, length, FL_status_string_ignore_not_length) == F_equal_to) { - *code = F_ignore_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_implemented, length, FL_status_string_implemented_length) == F_equal_to) { - *code = F_implemented; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_implemented_not, length, FL_status_string_implemented_not_length) == F_equal_to) { - *code = F_implemented_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_input, length, FL_status_string_input_length) == F_equal_to) { - *code = F_input; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_input_not, length, FL_status_string_input_not_length) == F_equal_to) { - *code = F_input_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_input_output, length, FL_status_string_input_output_length) == F_equal_to) { - *code = F_input_output; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_interrupt, length, FL_status_string_interrupt_length) == F_equal_to) { - *code = F_interrupt; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_interrupt_not, length, FL_status_string_interrupt_not_length) == F_equal_to) { - *code = F_interrupt_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_known, length, FL_status_string_known_length) == F_equal_to) { - *code = F_known; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_known_not, length, FL_status_string_known_not_length) == F_equal_to) { - *code = F_known_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_last, length, FL_status_string_last_length) == F_equal_to) { - *code = F_last; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_last_not, length, FL_status_string_last_not_length) == F_equal_to) { - *code = F_last_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_limit, length, FL_status_string_limit_length) == F_equal_to) { - *code = F_limit; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_limit_not, length, FL_status_string_limit_not_length) == F_equal_to) { - *code = F_limit_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_link, length, FL_status_string_link_length) == F_equal_to) { - *code = F_link; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_link_not, length, FL_status_string_link_not_length) == F_equal_to) { - *code = F_link_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_live, length, FL_status_string_live_length) == F_equal_to) { - *code = F_live; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_live_not, length, FL_status_string_live_not_length) == F_equal_to) { - *code = F_live_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_lock, length, FL_status_string_lock_length) == F_equal_to) { - *code = F_lock; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_lock_not, length, FL_status_string_lock_not_length) == F_equal_to) { - *code = F_lock_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_loop, length, FL_status_string_loop_length) == F_equal_to) { - *code = F_loop; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_loop_not, length, FL_status_string_loop_not_length) == F_equal_to) { - *code = F_loop_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_maybe, length, FL_status_string_maybe_length) == F_equal_to) { - *code = F_maybe; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_maybe_not, length, FL_status_string_maybe_not_length) == F_equal_to) { - *code = F_maybe_not; - - 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; - } - - if (fl_string_compare(string, FL_status_string_minor_not, length, FL_status_string_minor_not_length) == F_equal_to) { - *code = F_minor_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_moderate, length, FL_status_string_moderate_length) == F_equal_to) { - *code = F_moderate; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_moderate_not, length, FL_status_string_moderate_not_length) == F_equal_to) { - *code = F_moderate_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_mount, length, FL_status_string_mount_length) == F_equal_to) { - *code = F_mount; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_mount_not, length, FL_status_string_mount_not_length) == F_equal_to) { - *code = F_mount_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_name, length, FL_status_string_name_length) == F_equal_to) { - *code = F_name; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_name_not, length, FL_status_string_name_not_length) == F_equal_to) { - *code = F_name_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_next, length, FL_status_string_next_length) == F_equal_to) { - *code = F_next; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_next_not, length, FL_status_string_next_not_length) == F_equal_to) { - *code = F_next_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_nice, length, FL_status_string_nice_length) == F_equal_to) { - *code = F_nice; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_nice_not, length, FL_status_string_nice_not_length) == F_equal_to) { - *code = F_nice_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_optional, length, FL_status_string_optional_length) == F_equal_to) { - *code = F_optional; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_optional_not, length, FL_status_string_optional_not_length) == F_equal_to) { - *code = F_optional_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_output, length, FL_status_string_output_length) == F_equal_to) { - *code = F_output; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_output_not, length, FL_status_string_output_not_length) == F_equal_to) { - *code = F_output_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_parameter, length, FL_status_string_parameter_length) == F_equal_to) { - *code = F_parameter; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_parameter_not, length, FL_status_string_parameter_not_length) == F_equal_to) { - *code = F_parameter_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_parent, length, FL_status_string_parent_length) == F_equal_to) { - *code = F_parent; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_parent_not, length, FL_status_string_parent_not_length) == F_equal_to) { - *code = F_parent_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_pipe, length, FL_status_string_pipe_length) == F_equal_to) { - *code = F_pipe; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_pipe_not, length, FL_status_string_pipe_not_length) == F_equal_to) { - *code = F_pipe_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_port, length, FL_status_string_port_length) == F_equal_to) { - *code = F_port; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_port_not, length, FL_status_string_port_not_length) == F_equal_to) { - *code = F_port_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_previous, length, FL_status_string_previous_length) == F_equal_to) { - *code = F_previous; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_previous_not, length, FL_status_string_previous_not_length) == F_equal_to) { - *code = F_previous_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_processor, length, FL_status_string_processor_length) == F_equal_to) { - *code = F_processor; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_processor_not, length, FL_status_string_processor_not_length) == F_equal_to) { - *code = F_processor_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_prohibited, length, FL_status_string_prohibited_length) == F_equal_to) { - *code = F_prohibited; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_prohibited_not, length, FL_status_string_prohibited_not_length) == F_equal_to) { - *code = F_prohibited_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_range, length, FL_status_string_range_length) == F_equal_to) { - *code = F_range; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_range_not, length, FL_status_string_range_not_length) == F_equal_to) { - *code = F_range_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_read, length, FL_status_string_read_length) == F_equal_to) { - *code = F_read; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_read_not, length, FL_status_string_read_not_length) == F_equal_to) { - *code = F_read_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_read_only, length, FL_status_string_read_only_length) == F_equal_to) { - *code = F_read_only; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_ready, length, FL_status_string_ready_length) == F_equal_to) { - *code = F_ready; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_ready_not, length, FL_status_string_ready_not_length) == F_equal_to) { - *code = F_ready_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_recover, length, FL_status_string_recover_length) == F_equal_to) { - *code = F_recover; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_recover_not, length, FL_status_string_recover_not_length) == F_equal_to) { - *code = F_recover_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_recurse, length, FL_status_string_recurse_length) == F_equal_to) { - *code = F_recurse; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_recurse_not, length, FL_status_string_recurse_not_length) == F_equal_to) { - *code = F_recurse_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_relative, length, FL_status_string_relative_length) == F_equal_to) { - *code = F_relative; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_relative_not, length, FL_status_string_relative_not_length) == F_equal_to) { - *code = F_relative_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_require, length, FL_status_string_require_length) == F_equal_to) { - *code = F_require; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_require_not, length, FL_status_string_require_not_length) == F_equal_to) { - *code = F_require_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_resource, length, FL_status_string_resource_length) == F_equal_to) { - *code = F_resource; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_resource_not, length, FL_status_string_resource_not_length) == F_equal_to) { - *code = F_resource_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_search, length, FL_status_string_search_length) == F_equal_to) { - *code = F_search; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_search_not, length, FL_status_string_search_not_length) == F_equal_to) { - *code = F_search_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_schedule, length, FL_status_string_schedule_length) == F_equal_to) { - *code = F_schedule; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_schedule_not, length, FL_status_string_schedule_not_length) == F_equal_to) { - *code = F_schedule_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal, length, FL_status_string_signal_length) == F_equal_to) { - *code = F_signal; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_signal_not, length, FL_status_string_signal_not_length) == F_equal_to) { - *code = F_signal_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_space, length, FL_status_string_space_length) == F_equal_to) { - *code = F_space; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_space_not, length, FL_status_string_space_not_length) == F_equal_to) { - *code = F_space_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_stop, length, FL_status_string_stop_length) == F_equal_to) { - *code = F_stop; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_stop_not, length, FL_status_string_stop_not_length) == F_equal_to) { - *code = F_stop_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_string, length, FL_status_string_string_length) == F_equal_to) { - *code = F_string; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_string_not, length, FL_status_string_string_not_length) == F_equal_to) { - *code = F_string_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_string_too_large, length, FL_status_string_string_too_large_length) == F_equal_to) { - *code = F_string_too_large; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_string_too_small, length, FL_status_string_string_too_small_length) == F_equal_to) { - *code = F_string_too_small; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_success, length, FL_status_string_success_length) == F_equal_to) { - *code = F_success; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_success_not, length, FL_status_string_success_not_length) == F_equal_to) { - *code = F_success_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_supported, length, FL_status_string_supported_length) == F_equal_to) { - *code = F_supported; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_supported_not, length, FL_status_string_supported_not_length) == F_equal_to) { - *code = F_supported_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_syntax, length, FL_status_string_syntax_length) == F_equal_to) { - *code = F_syntax; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_syntax_not, length, FL_status_string_syntax_not_length) == F_equal_to) { - *code = F_syntax_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_thread, length, FL_status_string_thread_length) == F_equal_to) { - *code = F_thread; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_thread_not, length, FL_status_string_thread_not_length) == F_equal_to) { - *code = F_thread_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_time, length, FL_status_string_time_length) == F_equal_to) { - *code = F_time; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_time_not, length, FL_status_string_time_not_length) == F_equal_to) { - *code = F_time_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_too_large, length, FL_status_string_too_large_length) == F_equal_to) { - *code = F_too_large; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_too_small, length, FL_status_string_too_small_length) == F_equal_to) { - *code = F_too_small; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_user, length, FL_status_string_user_length) == F_equal_to) { - *code = F_user; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_user_not, length, FL_status_string_user_not_length) == F_equal_to) { - *code = F_user_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_utf, length, FL_status_string_utf_length) == F_equal_to) { - *code = F_utf; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_utf_fragment, length, FL_status_string_utf_fragment_length) == F_equal_to) { - *code = F_utf_fragment; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_utf_fragment_not, length, FL_status_string_utf_fragment_not_length) == F_equal_to) { - *code = F_utf_fragment_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_utf_not, length, FL_status_string_utf_not_length) == F_equal_to) { - *code = F_utf_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_valid, length, FL_status_string_valid_length) == F_equal_to) { - *code = F_valid; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_valid_not, length, FL_status_string_valid_not_length) == F_equal_to) { - *code = F_valid_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_value, length, FL_status_string_value_length) == F_equal_to) { - *code = F_value; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_value_not, length, FL_status_string_value_not_length) == F_equal_to) { - *code = F_value_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_wait, length, FL_status_string_wait_length) == F_equal_to) { - *code = F_wait; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_wait_not, length, FL_status_string_wait_not_length) == F_equal_to) { - *code = F_wait_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_warn, length, FL_status_string_warn_length) == F_equal_to) { - *code = F_warn; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_warn_not, length, FL_status_string_warn_not_length) == F_equal_to) { - *code = F_warn_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_world, length, FL_status_string_world_length) == F_equal_to) { - *code = F_world; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_world_not, length, FL_status_string_world_not_length) == F_equal_to) { - *code = F_world_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_write, length, FL_status_string_write_length) == F_equal_to) { - *code = F_write; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_write_not, length, FL_status_string_write_not_length) == F_equal_to) { - *code = F_write_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_write_only, length, FL_status_string_write_only_length) == F_equal_to) { - *code = F_write_only; - - return F_none; - } - #endif // _di_F_status_basic_ - - #ifndef _di_F_status_array_ - if (fl_string_compare(string, FL_status_string_array, length, FL_status_string_array_length) == F_equal_to) { - *code = F_array; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_array_not, length, FL_status_string_array_not_length) == F_equal_to) { - *code = F_array_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_array_too_large, length, FL_status_string_array_too_large_length) == F_equal_to) { - *code = F_array_too_large; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_array_too_small, length, FL_status_string_array_too_small_length) == F_equal_to) { - *code = F_array_too_small; - - return F_none; - } - #endif // _di_F_status_array_ - - #ifndef _di_F_status_available_ - if (fl_string_compare(string, FL_status_string_available, length, FL_status_string_available_length) == F_equal_to) { - *code = F_available; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_available_not, length, FL_status_string_available_not_length) == F_equal_to) { - *code = F_available_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_available_not_address, length, FL_status_string_available_not_address_length) == F_equal_to) { - *code = F_available_not_address; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_available_not_buffer, length, FL_status_string_available_not_buffer_length) == F_equal_to) { - *code = F_available_not_buffer; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_available_not_device, length, FL_status_string_available_not_device_length) == F_equal_to) { - *code = F_available_not_device; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_available_not_pipe, length, FL_status_string_available_not_pipe_length) == F_equal_to) { - *code = F_available_not_pipe; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_available_not_port, length, FL_status_string_available_not_port_length) == F_equal_to) { - *code = F_available_not_port; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_available_not_process, length, FL_status_string_available_not_process_length) == F_equal_to) { - *code = F_available_not_process; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_available_not_socket, length, FL_status_string_available_not_socket_length) == F_equal_to) { - *code = F_available_not_socket; - - return F_none; - } - #endif // _di_F_status_available_ - - #ifndef _di_F_status_busy_ - if (fl_string_compare(string, FL_status_string_busy, length, FL_status_string_busy_length) == F_equal_to) { - *code = F_busy; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_busy_address, length, FL_status_string_busy_address_length) == F_equal_to) { - *code = F_busy_address; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_busy_buffer, length, FL_status_string_busy_buffer_length) == F_equal_to) { - *code = F_busy_buffer; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_busy_device, length, FL_status_string_busy_device_length) == F_equal_to) { - *code = F_busy_device; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_busy_not, length, FL_status_string_busy_not_length) == F_equal_to) { - *code = F_busy_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_busy_pipe, length, FL_status_string_busy_pipe_length) == F_equal_to) { - *code = F_busy_pipe; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_busy_port, length, FL_status_string_busy_port_length) == F_equal_to) { - *code = F_busy_port; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_busy_process, length, FL_status_string_busy_process_length) == F_equal_to) { - *code = F_busy_process; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_busy_socket, length, FL_status_string_busy_socket_length) == F_equal_to) { - *code = F_busy_socket; - - return F_none; - } - #endif // _di_F_status_busy_ - - #ifndef _di_F_status_number_ - if (fl_string_compare(string, FL_status_string_number, length, FL_status_string_number_length) == F_equal_to) { - *code = F_number; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_number_decimal, length, FL_status_string_number_decimal_length) == F_equal_to) { - *code = F_number_decimal; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_number_decimal_not, length, FL_status_string_number_decimal_not_length) == F_equal_to) { - *code = F_number_decimal_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_number_divide_by_zero, length, FL_status_string_number_divide_by_zero_length) == F_equal_to) { - *code = F_number_divide_by_zero; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_number_negative, length, FL_status_string_number_negative_length) == F_equal_to) { - *code = F_number_negative; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_number_negative_not, length, FL_status_string_number_negative_not_length) == F_equal_to) { - *code = F_number_negative_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_number_not, length, FL_status_string_number_not_length) == F_equal_to) { - *code = F_number_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_number_overflow, length, FL_status_string_number_overflow_length) == F_equal_to) { - *code = F_number_overflow; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_number_positive, length, FL_status_string_number_positive_length) == F_equal_to) { - *code = F_number_positive; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_number_positive_not, length, FL_status_string_number_positive_not_length) == F_equal_to) { - *code = F_number_positive_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_number_too_large, length, FL_status_string_number_too_large_length) == F_equal_to) { - *code = F_number_too_large; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_number_too_small, length, FL_status_string_number_too_small_length) == F_equal_to) { - *code = F_number_too_small; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_number_underflow, length, FL_status_string_number_underflow_length) == F_equal_to) { - *code = F_number_underflow; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_number_whole, length, FL_status_string_number_whole_length) == F_equal_to) { - *code = F_number_whole; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_number_whole_not, length, FL_status_string_number_whole_not_length) == F_equal_to) { - *code = F_number_whole_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_number_zero, length, FL_status_string_number_zero_length) == F_equal_to) { - *code = F_number_zero; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_number_zero_not, length, FL_status_string_number_zero_not_length) == F_equal_to) { - *code = F_number_zero_not; - - return F_none; - } - #endif // _di_F_status_number_ - - #ifndef _di_F_status_buffer_ - if (fl_string_compare(string, FL_status_string_buffer, length, FL_status_string_buffer_length) == F_equal_to) { - *code = F_buffer; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_buffer_not, length, FL_status_string_buffer_not_length) == F_equal_to) { - *code = F_buffer_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_buffer_too_large, length, FL_status_string_buffer_too_large_length) == F_equal_to) { - *code = F_buffer_too_large; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_buffer_too_small, length, FL_status_string_buffer_too_small_length) == F_equal_to) { - *code = F_buffer_too_small; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_complete_not_utf, length, FL_status_string_complete_not_utf_length) == F_equal_to) { - *code = F_complete_not_utf; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_complete_not_utf_block, length, FL_status_string_complete_not_utf_block_length) == F_equal_to) { - *code = F_complete_not_utf_block; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_complete_not_utf_eoa, length, FL_status_string_complete_not_utf_eoa_length) == F_equal_to) { - *code = F_complete_not_utf_eoa; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_complete_not_utf_eof, length, FL_status_string_complete_not_utf_eof_length) == F_equal_to) { - *code = F_complete_not_utf_eof; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_complete_not_utf_eol, length, FL_status_string_complete_not_utf_eol_length) == F_equal_to) { - *code = F_complete_not_utf_eol; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_complete_not_utf_eos, length, FL_status_string_complete_not_utf_eos_length) == F_equal_to) { - *code = F_complete_not_utf_eos; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_complete_not_utf_stop, length, FL_status_string_complete_not_utf_stop_length) == F_equal_to) { - *code = F_complete_not_utf_stop; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_none_block, length, FL_status_string_none_block_length) == F_equal_to) { - *code = F_none_block; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_none_eoa, length, FL_status_string_none_eoa_length) == F_equal_to) { - *code = F_none_eoa; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_none_eof, length, FL_status_string_none_eof_length) == F_equal_to) { - *code = F_none_eof; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_none_eol, length, FL_status_string_none_eol_length) == F_equal_to) { - *code = F_none_eol; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_none_eos, length, FL_status_string_none_eos_length) == F_equal_to) { - *code = F_none_eos; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_none_stop, length, FL_status_string_none_stop_length) == F_equal_to) { - *code = F_none_stop; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_data, length, FL_status_string_data_length) == F_equal_to) { - *code = F_data; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_data_not, length, FL_status_string_data_not_length) == F_equal_to) { - *code = F_data_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_data_not_block, length, FL_status_string_data_not_block_length) == F_equal_to) { - *code = F_data_not_block; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_data_not_eoa, length, FL_status_string_data_not_eoa_length) == F_equal_to) { - *code = F_data_not_eoa; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_data_not_eof, length, FL_status_string_data_not_eof_length) == F_equal_to) { - *code = F_data_not_eof; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_data_not_eol, length, FL_status_string_data_not_eol_length) == F_equal_to) { - *code = F_data_not_eol; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_data_not_eos, length, FL_status_string_data_not_eos_length) == F_equal_to) { - *code = F_data_not_eos; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_data_not_stop, length, FL_status_string_data_not_stop_length) == F_equal_to) { - *code = F_data_not_stop; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminated, length, FL_status_string_terminated_length) == F_equal_to) { - *code = F_terminated; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminated_not, length, FL_status_string_terminated_not_length) == F_equal_to) { - *code = F_terminated_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminated_not_block, length, FL_status_string_terminated_not_block_length) == F_equal_to) { - *code = F_terminated_not_block; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminated_not_eoa, length, FL_status_string_terminated_not_eoa_length) == F_equal_to) { - *code = F_terminated_not_eoa; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminated_not_eof, length, FL_status_string_terminated_not_eof_length) == F_equal_to) { - *code = F_terminated_not_eof; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminated_not_eol, length, FL_status_string_terminated_not_eol_length) == F_equal_to) { - *code = F_terminated_not_eol; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminated_not_eos, length, FL_status_string_terminated_not_eos_length) == F_equal_to) { - *code = F_terminated_not_eos; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminated_not_group, length, FL_status_string_terminated_not_group_length) == F_equal_to) { - *code = F_terminated_not_group; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminated_not_group_block, length, FL_status_string_terminated_not_group_block_length) == F_equal_to) { - *code = F_terminated_not_group_block; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminated_not_group_eoa, length, FL_status_string_terminated_not_group_eoa_length) == F_equal_to) { - *code = F_terminated_not_group_eoa; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminated_not_group_eof, length, FL_status_string_terminated_not_group_eof_length) == F_equal_to) { - *code = F_terminated_not_group_eof; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminated_not_group_eol, length, FL_status_string_terminated_not_group_eol_length) == F_equal_to) { - *code = F_terminated_not_group_eol; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminated_not_group_eos, length, FL_status_string_terminated_not_group_eos_length) == F_equal_to) { - *code = F_terminated_not_group_eos; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminated_not_group_stop, length, FL_status_string_terminated_not_group_stop_length) == F_equal_to) { - *code = F_terminated_not_group_stop; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminated_not_nest, length, FL_status_string_terminated_not_nest_length) == F_equal_to) { - *code = F_terminated_not_nest; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminated_not_nest_block, length, FL_status_string_terminated_not_nest_block_length) == F_equal_to) { - *code = F_terminated_not_nest_block; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminated_not_nest_eoa, length, FL_status_string_terminated_not_nest_eoa_length) == F_equal_to) { - *code = F_terminated_not_nest_eoa; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminated_not_nest_eof, length, FL_status_string_terminated_not_nest_eof_length) == F_equal_to) { - *code = F_terminated_not_nest_eof; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminated_not_nest_eol, length, FL_status_string_terminated_not_nest_eol_length) == F_equal_to) { - *code = F_terminated_not_nest_eol; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminated_not_nest_eos, length, FL_status_string_terminated_not_nest_eos_length) == F_equal_to) { - *code = F_terminated_not_nest_eos; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminated_not_nest_stop, length, FL_status_string_terminated_not_nest_stop_length) == F_equal_to) { - *code = F_terminated_not_nest_stop; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminated_not_stop, length, FL_status_string_terminated_not_stop_length) == F_equal_to) { - *code = F_terminated_not_stop; - - return F_none; - } - #endif // _di_F_status_buffer_ - - #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; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_process_not, length, FL_status_string_process_not_length) == F_equal_to) { - *code = F_process_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_process_too_many, length, FL_status_string_process_too_many_length) == F_equal_to) { - *code = F_process_too_many; - - return F_none; - } - #endif // _di_F_status_process_ - - #ifndef _di_F_status_file_ - if (fl_string_compare(string, FL_status_string_file, length, FL_status_string_file_length) == F_equal_to) { - *code = F_file; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_close, length, FL_status_string_file_close_length) == F_equal_to) { - *code = F_file_close; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_closed, length, FL_status_string_file_closed_length) == F_equal_to) { - *code = F_file_closed; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_descriptor, length, FL_status_string_file_descriptor_length) == F_equal_to) { - *code = F_file_descriptor; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_descriptor_max, length, FL_status_string_file_descriptor_max_length) == F_equal_to) { - *code = F_file_descriptor_max; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_descriptor_not, length, FL_status_string_file_descriptor_not_length) == F_equal_to) { - *code = F_file_descriptor_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_empty, length, FL_status_string_file_empty_length) == F_equal_to) { - *code = F_file_empty; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_flush, length, FL_status_string_file_flush_length) == F_equal_to) { - *code = F_file_flush; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_found, length, FL_status_string_file_found_length) == F_equal_to) { - *code = F_file_found; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_found_not, length, FL_status_string_file_found_not_length) == F_equal_to) { - *code = F_file_found_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_not, length, FL_status_string_file_not_length) == F_equal_to) { - *code = F_file_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_open, length, FL_status_string_file_open_length) == F_equal_to) { - *code = F_file_open; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_open_max, length, FL_status_string_file_open_max_length) == F_equal_to) { - *code = F_file_open_max; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_opened, length, FL_status_string_file_opened_length) == F_equal_to) { - *code = F_file_opened; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_overflow, length, FL_status_string_file_overflow_length) == F_equal_to) { - *code = F_file_overflow; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_purge, length, FL_status_string_file_purge_length) == F_equal_to) { - *code = F_file_purge; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_read, length, FL_status_string_file_read_length) == F_equal_to) { - *code = F_file_read; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_reallocation, length, FL_status_string_file_reallocation_length) == F_equal_to) { - *code = F_file_reallocation; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_seek, length, FL_status_string_file_seek_length) == F_equal_to) { - *code = F_file_seek; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_stat, length, FL_status_string_file_stat_length) == F_equal_to) { - *code = F_file_stat; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_synchronize, length, FL_status_string_file_synchronize_length) == F_equal_to) { - *code = F_file_synchronize; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_type_block, length, FL_status_string_file_type_block_length) == F_equal_to) { - *code = F_file_type_block; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_type_character, length, FL_status_string_file_type_character_length) == F_equal_to) { - *code = F_file_type_character; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_type_directory, length, FL_status_string_file_type_directory_length) == F_equal_to) { - *code = F_file_type_directory; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_type_link, length, FL_status_string_file_type_link_length) == F_equal_to) { - *code = F_file_type_link; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_type_not_block, length, FL_status_string_file_type_not_block_length) == F_equal_to) { - *code = F_file_type_not_block; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_type_not_character, length, FL_status_string_file_type_not_character_length) == F_equal_to) { - *code = F_file_type_not_character; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_type_not_directory, length, FL_status_string_file_type_not_directory_length) == F_equal_to) { - *code = F_file_type_not_directory; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_type_not_fifo, length, FL_status_string_file_type_not_fifo_length) == F_equal_to) { - *code = F_file_type_not_fifo; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_type_not_link, length, FL_status_string_file_type_not_link_length) == F_equal_to) { - *code = F_file_type_not_link; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_type_not_pipe, length, FL_status_string_file_type_not_pipe_length) == F_equal_to) { - *code = F_file_type_not_pipe; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_type_not_regular, length, FL_status_string_file_type_not_regular_length) == F_equal_to) { - *code = F_file_type_not_regular; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_type_not_socket, length, FL_status_string_file_type_not_socket_length) == F_equal_to) { - *code = F_file_type_not_socket; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_type_not_unknown, length, FL_status_string_file_type_not_unknown_length) == F_equal_to) { - *code = F_file_type_not_unknown; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_type_pipe, length, FL_status_string_file_type_pipe_length) == F_equal_to) { - *code = F_file_type_pipe; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_type_regular, length, FL_status_string_file_type_regular_length) == F_equal_to) { - *code = F_file_type_regular; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_type_socket, length, FL_status_string_file_type_socket_length) == F_equal_to) { - *code = F_file_type_socket; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_type_unknown, length, FL_status_string_file_type_unknown_length) == F_equal_to) { - *code = F_file_type_unknown; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_underflow, length, FL_status_string_file_underflow_length) == F_equal_to) { - *code = F_file_underflow; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_utf, length, FL_status_string_file_utf_length) == F_equal_to) { - *code = F_file_utf; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_utf_not, length, FL_status_string_file_utf_not_length) == F_equal_to) { - *code = F_file_utf_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_file_write, length, FL_status_string_file_write_length) == F_equal_to) { - *code = F_file_write; - - return F_none; - } - #endif // _di_F_status_file_ - - #ifndef _di_F_status_filesystem_ - if (fl_string_compare(string, FL_status_string_filesystem, length, FL_status_string_filesystem_length) == F_equal_to) { - *code = F_filesystem; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_filesystem_not, length, FL_status_string_filesystem_not_length) == F_equal_to) { - *code = F_filesystem_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_filesystem_quota_block, length, FL_status_string_filesystem_quota_block_length) == F_equal_to) { - *code = F_filesystem_quota_block; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_filesystem_quota_reached, length, FL_status_string_filesystem_quota_reached_length) == F_equal_to) { - *code = F_filesystem_quota_reached; - - return F_none; - } - #endif // _di_F_status_filesystem_ - - #ifndef _di_F_status_directory_ - if (fl_string_compare(string, FL_status_string_directory, length, FL_status_string_directory_length) == F_equal_to) { - *code = F_directory; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_directory_close, length, FL_status_string_directory_close_length) == F_equal_to) { - *code = F_directory_close; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_directory_closed, length, FL_status_string_directory_closed_length) == F_equal_to) { - *code = F_directory_closed; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_directory_descriptor, length, FL_status_string_directory_descriptor_length) == F_equal_to) { - *code = F_directory_descriptor; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_directory_empty, length, FL_status_string_directory_empty_length) == F_equal_to) { - *code = F_directory_empty; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_directory_empty_not, length, FL_status_string_directory_empty_not_length) == F_equal_to) { - *code = F_directory_empty_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_directory_found, length, FL_status_string_directory_found_length) == F_equal_to) { - *code = F_directory_found; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_directory_found_not, length, FL_status_string_directory_found_not_length) == F_equal_to) { - *code = F_directory_found_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_directory_flush, length, FL_status_string_directory_flush_length) == F_equal_to) { - *code = F_directory_flush; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_directory_link_max, length, FL_status_string_directory_link_max_length) == F_equal_to) { - *code = F_directory_link_max; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_directory_not, length, FL_status_string_directory_not_length) == F_equal_to) { - *code = F_directory_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_directory_open, length, FL_status_string_directory_open_length) == F_equal_to) { - *code = F_directory_open; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_directory_purge, length, FL_status_string_directory_purge_length) == F_equal_to) { - *code = F_directory_purge; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_directory_read, length, FL_status_string_directory_read_length) == F_equal_to) { - *code = F_directory_read; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_directory_stream, length, FL_status_string_directory_stream_length) == F_equal_to) { - *code = F_directory_stream; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_directory_supported_not, length, FL_status_string_directory_supported_not_length) == F_equal_to) { - *code = F_directory_supported_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_directory_synchronize, length, FL_status_string_directory_synchronize_length) == F_equal_to) { - *code = F_directory_synchronize; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_directory_utf, length, FL_status_string_directory_utf_length) == F_equal_to) { - *code = F_directory_utf; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_directory_utf_not, length, FL_status_string_directory_utf_not_length) == F_equal_to) { - *code = F_directory_utf_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_directory_write, length, FL_status_string_directory_write_length) == F_equal_to) { - *code = F_directory_write; - - return F_none; - } - #endif // _di_F_status_directory_ - - #ifndef _di_F_status_socket_ - if (fl_string_compare(string, FL_status_string_socket, length, FL_status_string_socket_length) == F_equal_to) { - *code = F_socket; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_socket_client, length, FL_status_string_socket_client_length) == F_equal_to) { - *code = F_socket_client; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_socket_not, length, FL_status_string_socket_not_length) == F_equal_to) { - *code = F_socket_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_socket_receive, length, FL_status_string_socket_receive_length) == F_equal_to) { - *code = F_socket_receive; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_socket_send, length, FL_status_string_socket_send_length) == F_equal_to) { - *code = F_socket_send; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_socket_target, length, FL_status_string_socket_target_length) == F_equal_to) { - *code = F_socket_target; - - return F_none; - } - #endif // _di_F_status_socket_ - - #ifndef _di_F_status_compare_ - if (fl_string_compare(string, FL_status_string_equal_to, length, FL_status_string_equal_to_length) == F_equal_to) { - *code = F_equal_to; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_equal_to_not, length, FL_status_string_equal_to_not_length) == F_equal_to) { - *code = F_equal_to_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_than_greater, length, FL_status_string_than_greater_length) == F_equal_to) { - *code = F_than_greater; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_than_less, length, FL_status_string_than_less_length) == F_equal_to) { - *code = F_than_less; - - return F_none; - } - #endif // _di_F_status_compare_ - - #ifndef _di_F_status_access_ - if (fl_string_compare(string, FL_status_string_access, length, FL_status_string_access_length) == F_equal_to) { - *code = F_access; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_access_denied, length, FL_status_string_access_denied_length) == F_equal_to) { - *code = F_access_denied; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_access_denied_user, length, FL_status_string_access_denied_user_length) == F_equal_to) { - *code = F_access_denied_user; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_access_denied_group, length, FL_status_string_access_denied_group_length) == F_equal_to) { - *code = F_access_denied_group; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_access_denied_world, length, FL_status_string_access_denied_world_length) == F_equal_to) { - *code = F_access_denied_world; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_access_denied_read, length, FL_status_string_access_denied_read_length) == F_equal_to) { - *code = F_access_denied_read; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_access_denied_write, length, FL_status_string_access_denied_write_length) == F_equal_to) { - *code = F_access_denied_write; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_access_denied_execute, length, FL_status_string_access_denied_execute_length) == F_equal_to) { - *code = F_access_denied_execute; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_access_denied_super, length, FL_status_string_access_denied_super_length) == F_equal_to) { - *code = F_access_denied_super; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_access_granted, length, FL_status_string_access_granted_length) == F_equal_to) { - *code = F_access_granted; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_access_granted_user, length, FL_status_string_access_granted_user_length) == F_equal_to) { - *code = F_access_granted_user; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_access_granted_group, length, FL_status_string_access_granted_group_length) == F_equal_to) { - *code = F_access_granted_group; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_access_granted_world, length, FL_status_string_access_granted_world_length) == F_equal_to) { - *code = F_access_granted_world; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_access_granted_read, length, FL_status_string_access_granted_read_length) == F_equal_to) { - *code = F_access_granted_read; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_access_granted_write, length, FL_status_string_access_granted_write_length) == F_equal_to) { - *code = F_access_granted_write; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_access_granted_execute, length, FL_status_string_access_granted_execute_length) == F_equal_to) { - *code = F_access_granted_execute; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_access_granted_super, length, FL_status_string_access_granted_super_length) == F_equal_to) { - *code = F_access_granted_super; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_access_group, length, FL_status_string_access_group_length) == F_equal_to) { - *code = F_access_mode; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_access_mode, length, FL_status_string_access_mode_length) == F_equal_to) { - *code = F_access_group; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_access_not, length, FL_status_string_access_not_length) == F_equal_to) { - *code = F_access_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_access_owner, length, FL_status_string_access_owner_length) == F_equal_to) { - *code = F_access_owner; - - return F_none; - } - #endif // _di_F_status_access_ - - #ifndef _di_F_status_terminal_ - if (fl_string_compare(string, FL_status_string_terminal, length, FL_status_string_terminal_length) == F_equal_to) { - *code = F_terminal; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminal_access, length, FL_status_string_terminal_access_length) == F_equal_to) { - *code = F_terminal_access; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminal_known, length, FL_status_string_terminal_known_length) == F_equal_to) { - *code = F_terminal_known; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminal_known_not, length, FL_status_string_terminal_known_not_length) == F_equal_to) { - *code = F_terminal_known_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminal_not, length, FL_status_string_terminal_not_length) == F_equal_to) { - *code = F_terminal_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminal_prohibited, length, FL_status_string_terminal_prohibited_length) == F_equal_to) { - *code = F_terminal_prohibited; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminal_read, length, FL_status_string_terminal_read_length) == F_equal_to) { - *code = F_terminal_read; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminal_valid, length, FL_status_string_terminal_valid_length) == F_equal_to) { - *code = F_terminal_valid; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminal_valid_not, length, FL_status_string_terminal_valid_not_length) == F_equal_to) { - *code = F_terminal_valid_not; - - return F_none; - } - - if (fl_string_compare(string, FL_status_string_terminal_write, length, FL_status_string_terminal_write_length) == F_equal_to) { - *code = F_terminal_write; - - return F_none; - } - #endif // _di_F_status_terminal_ - - if (fl_string_compare(string, FL_status_string_status_code_last, length, FL_status_string_status_code_last_length) == F_equal_to) { - *code = F_status_code_last; - - return F_none; - } - - return F_status_set_error(F_data); - } -#endif // _di_fll_status_from_string_ - -#ifdef __cplusplus -} // extern "C" -#endif diff --git a/level_2/fll_status_string/c/status_string.c b/level_2/fll_status_string/c/status_string.c new file mode 100644 index 0000000..7c6bb72 --- /dev/null +++ b/level_2/fll_status_string/c/status_string.c @@ -0,0 +1,2797 @@ +#include "status_string.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_fll_status_string_from_ + f_status_t fll_status_string_from(const f_string_t string, f_status_t *code) { + #ifndef _di_level_2_parameter_checking_ + if (!code) return F_status_set_error(F_parameter); + #endif // _di_level_2_parameter_checking_ + + f_status_t status = F_none; + const f_array_length_t length = strlen(string); + + if (!length) { + return F_data_not; + } + + // Numbers are not valid status code strings. + if ((status = f_conversion_character_is_decimal(string[0])) == F_true) { + return F_status_set_error(F_data); + } + + if (F_status_is_error(status)) { + return status; + } + + #ifndef _di_F_status_boolean_ + if (fl_string_compare(string, f_status_false_s, length, F_status_false_s_length) == F_equal_to) { + *code = F_false; + + return F_none; + } + + if (fl_string_compare(string, f_status_true_s, length, F_status_true_s_length) == F_equal_to) { + *code = F_true; + + return F_none; + } + #endif // _di_F_status_boolean_ + + #ifndef _di_F_status_signal_ + if (fl_string_compare(string, f_status_signal_hangup_s, length, F_status_signal_hangup_s_length) == F_equal_to) { + *code = F_signal_hangup; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_interrupt_s, length, F_status_signal_interrupt_s_length) == F_equal_to) { + *code = F_signal_interrupt; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_quit_s, length, F_status_signal_quit_s_length) == F_equal_to) { + *code = F_signal_quit; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_illegal_s, length, F_status_signal_illegal_s_length) == F_equal_to) { + *code = F_signal_illegal; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_trap_s, length, F_status_signal_trap_s_length) == F_equal_to) { + *code = F_signal_trap; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_abort_s, length, F_status_signal_abort_s_length) == F_equal_to) { + *code = F_signal_abort; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_bus_error_s, length, F_status_signal_bus_error_s_length) == F_equal_to) { + *code = F_signal_bus_error; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_floating_point_error_s, length, F_status_signal_floating_point_error_s_length) == F_equal_to) { + *code = F_signal_floating_point_error; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_kill_s, length, F_status_signal_kill_s_length) == F_equal_to) { + *code = F_signal_kill; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_user_1_s, length, F_status_signal_user_1_s_length) == F_equal_to) { + *code = F_signal_user_1; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_segmentation_fault_s, length, F_status_signal_segmentation_fault_s_length) == F_equal_to) { + *code = F_signal_segmentation_fault; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_user_2_s, length, F_status_signal_user_2_s_length) == F_equal_to) { + *code = F_signal_user_2; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_broken_pipe_s, length, F_status_signal_broken_pipe_s_length) == F_equal_to) { + *code = F_signal_broken_pipe; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_alarm_clock_s, length, F_status_signal_alarm_clock_s_length) == F_equal_to) { + *code = F_signal_alarm_clock; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_termination_s, length, F_status_signal_termination_s_length) == F_equal_to) { + *code = F_signal_termination; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_stack_fault_s, length, F_status_signal_stack_fault_s_length) == F_equal_to) { + *code = F_signal_stack_fault; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_child_s, length, F_status_signal_child_s_length) == F_equal_to) { + *code = F_signal_child; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_continue_s, length, F_status_signal_continue_s_length) == F_equal_to) { + *code = F_signal_continue; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_stop_s, length, F_status_signal_stop_s_length) == F_equal_to) { + *code = F_signal_stop; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_keyboard_stop_s, length, F_status_signal_keyboard_stop_s_length) == F_equal_to) { + *code = F_signal_keyboard_stop; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_tty_in_s, length, F_status_signal_tty_in_s_length) == F_equal_to) { + *code = F_signal_tty_in; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_tty_out_s, length, F_status_signal_tty_out_s_length) == F_equal_to) { + *code = F_signal_tty_out; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_urgent_s, length, F_status_signal_urgent_s_length) == F_equal_to) { + *code = F_signal_urgent; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_cpu_limit_s, length, F_status_signal_cpu_limit_s_length) == F_equal_to) { + *code = F_signal_cpu_limit; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_file_size_limit_s, length, F_status_signal_file_size_limit_s_length) == F_equal_to) { + *code = F_signal_file_size_limit; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_virtual_alarm_clock_s, length, F_status_signal_virtual_alarm_clock_s_length) == F_equal_to) { + *code = F_signal_virtual_alarm_clock; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_profile_alarm_clock_s, length, F_status_signal_profile_alarm_clock_s_length) == F_equal_to) { + *code = F_signal_profile_alarm_clock; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_window_size_change_s, length, F_status_signal_window_size_change_s_length) == F_equal_to) { + *code = F_signal_window_size_change; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_pollable_event_s, length, F_status_signal_pollable_event_s_length) == F_equal_to) { + *code = F_signal_pollable_event; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_power_failure_s, length, F_status_signal_power_failure_s_length) == F_equal_to) { + *code = F_signal_power_failure; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_bad_system_call_s, length, F_status_signal_bad_system_call_s_length) == F_equal_to) { + *code = F_signal_bad_system_call; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_32_s, length, F_status_signal_reserved_32_s_length) == F_equal_to) { + *code = F_signal_reserved_32; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_33_s, length, F_status_signal_reserved_33_s_length) == F_equal_to) { + *code = F_signal_reserved_33; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_34_s, length, F_status_signal_reserved_34_s_length) == F_equal_to) { + *code = F_signal_reserved_34; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_35_s, length, F_status_signal_reserved_35_s_length) == F_equal_to) { + *code = F_signal_reserved_35; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_36_s, length, F_status_signal_reserved_36_s_length) == F_equal_to) { + *code = F_signal_reserved_36; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_37_s, length, F_status_signal_reserved_37_s_length) == F_equal_to) { + *code = F_signal_reserved_37; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_38_s, length, F_status_signal_reserved_38_s_length) == F_equal_to) { + *code = F_signal_reserved_38; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_39_s, length, F_status_signal_reserved_39_s_length) == F_equal_to) { + *code = F_signal_reserved_39; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_40_s, length, F_status_signal_reserved_40_s_length) == F_equal_to) { + *code = F_signal_reserved_40; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_41_s, length, F_status_signal_reserved_41_s_length) == F_equal_to) { + *code = F_signal_reserved_41; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_42_s, length, F_status_signal_reserved_42_s_length) == F_equal_to) { + *code = F_signal_reserved_42; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_43_s, length, F_status_signal_reserved_43_s_length) == F_equal_to) { + *code = F_signal_reserved_43; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_44_s, length, F_status_signal_reserved_44_s_length) == F_equal_to) { + *code = F_signal_reserved_44; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_45_s, length, F_status_signal_reserved_45_s_length) == F_equal_to) { + *code = F_signal_reserved_45; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_46_s, length, F_status_signal_reserved_46_s_length) == F_equal_to) { + *code = F_signal_reserved_46; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_47_s, length, F_status_signal_reserved_47_s_length) == F_equal_to) { + *code = F_signal_reserved_47; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_48_s, length, F_status_signal_reserved_48_s_length) == F_equal_to) { + *code = F_signal_reserved_48; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_49_s, length, F_status_signal_reserved_49_s_length) == F_equal_to) { + *code = F_signal_reserved_49; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_50_s, length, F_status_signal_reserved_50_s_length) == F_equal_to) { + *code = F_signal_reserved_50; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_51_s, length, F_status_signal_reserved_51_s_length) == F_equal_to) { + *code = F_signal_reserved_51; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_52_s, length, F_status_signal_reserved_52_s_length) == F_equal_to) { + *code = F_signal_reserved_52; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_53_s, length, F_status_signal_reserved_53_s_length) == F_equal_to) { + *code = F_signal_reserved_53; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_54_s, length, F_status_signal_reserved_54_s_length) == F_equal_to) { + *code = F_signal_reserved_54; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_55_s, length, F_status_signal_reserved_55_s_length) == F_equal_to) { + *code = F_signal_reserved_55; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_56_s, length, F_status_signal_reserved_56_s_length) == F_equal_to) { + *code = F_signal_reserved_56; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_57_s, length, F_status_signal_reserved_57_s_length) == F_equal_to) { + *code = F_signal_reserved_57; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_58_s, length, F_status_signal_reserved_58_s_length) == F_equal_to) { + *code = F_signal_reserved_58; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_59_s, length, F_status_signal_reserved_59_s_length) == F_equal_to) { + *code = F_signal_reserved_59; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_60_s, length, F_status_signal_reserved_60_s_length) == F_equal_to) { + *code = F_signal_reserved_60; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_61_s, length, F_status_signal_reserved_61_s_length) == F_equal_to) { + *code = F_signal_reserved_61; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_62_s, length, F_status_signal_reserved_62_s_length) == F_equal_to) { + *code = F_signal_reserved_62; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_63_s, length, F_status_signal_reserved_63_s_length) == F_equal_to) { + *code = F_signal_reserved_63; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_reserved_64_s, length, F_status_signal_reserved_64_s_length) == F_equal_to) { + *code = F_signal_reserved_64; + + return F_none; + } + #endif // _di_F_status_signal_ + + #ifndef _di_F_status_basic_ + if (fl_string_compare(string, f_status_none_s, length, F_status_none_s_length) == F_equal_to) { + *code = F_none; + + return F_none; + } + + if (fl_string_compare(string, f_status_absolute_s, length, F_status_absolute_s_length) == F_equal_to) { + *code = F_absolute; + + return F_none; + } + + if (fl_string_compare(string, f_status_absolute_not_s, length, F_status_absolute_not_s_length) == F_equal_to) { + *code = F_absolute_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_address_s, length, F_status_address_s_length) == F_equal_to) { + *code = F_address; + + return F_none; + } + + if (fl_string_compare(string, f_status_address_not_s, length, F_status_address_not_s_length) == F_equal_to) { + *code = F_address_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_ascii_s, length, F_status_ascii_s_length) == F_equal_to) { + *code = F_ascii; + + return F_none; + } + + if (fl_string_compare(string, f_status_ascii_not_s, length, F_status_ascii_not_s_length) == F_equal_to) { + *code = F_ascii_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_block_s, length, F_status_block_s_length) == F_equal_to) { + *code = F_block; + + return F_none; + } + + if (fl_string_compare(string, f_status_block_not_s, length, F_status_block_not_s_length) == F_equal_to) { + *code = F_block_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_bound_s, length, F_status_bound_s_length) == F_equal_to) { + *code = F_bound; + + return F_none; + } + + if (fl_string_compare(string, f_status_bound_not_s, length, F_status_bound_not_s_length) == F_equal_to) { + *code = F_bound_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_capability_s, length, F_status_capability_s_length) == F_equal_to) { + *code = F_capability; + + return F_none; + } + + if (fl_string_compare(string, f_status_capability_not_s, length, F_status_capability_not_s_length) == F_equal_to) { + *code = F_capability_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_child_s, length, F_status_child_s_length) == F_equal_to) { + *code = F_child; + + return F_none; + } + + if (fl_string_compare(string, f_status_child_not_s, length, F_status_child_not_s_length) == F_equal_to) { + *code = F_child_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_complete_s, length, F_status_complete_s_length) == F_equal_to) { + *code = F_complete; + + return F_none; + } + + if (fl_string_compare(string, f_status_complete_not_s, length, F_status_complete_not_s_length) == F_equal_to) { + *code = F_complete_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_connected_s, length, F_status_connected_s_length) == F_equal_to) { + *code = F_connected; + + return F_none; + } + + if (fl_string_compare(string, f_status_connected_not_s, length, F_status_connected_not_s_length) == F_equal_to) { + *code = F_connected_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_container_s, length, F_status_container_s_length) == F_equal_to) { + *code = F_container; + + return F_none; + } + + if (fl_string_compare(string, f_status_container_not_s, length, F_status_container_not_s_length) == F_equal_to) { + *code = F_container_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_control_s, length, F_status_control_s_length) == F_equal_to) { + *code = F_control; + + return F_none; + } + + if (fl_string_compare(string, f_status_control_not_s, length, F_status_control_not_s_length) == F_equal_to) { + *code = F_control_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_control_group_s, length, F_status_control_group_s_length) == F_equal_to) { + *code = F_control_group; + + return F_none; + } + + if (fl_string_compare(string, f_status_control_group_not_s, length, F_status_control_group_not_s_length) == F_equal_to) { + *code = F_control_group_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_critical_s, length, F_status_critical_s_length) == F_equal_to) { + *code = F_critical; + + return F_none; + } + + if (fl_string_compare(string, f_status_critical_not_s, length, F_status_critical_not_s_length) == F_equal_to) { + *code = F_critical_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_dead_s, length, F_status_dead_s_length) == F_equal_to) { + *code = F_dead; + + return F_none; + } + + if (fl_string_compare(string, f_status_dead_not_s, length, F_status_dead_not_s_length) == F_equal_to) { + *code = F_dead_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_deadlock_s, length, F_status_deadlock_s_length) == F_equal_to) { + *code = F_deadlock; + + return F_none; + } + + if (fl_string_compare(string, f_status_deadlock_not_s, length, F_status_deadlock_not_s_length) == F_equal_to) { + *code = F_deadlock_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_descriptor_s, length, F_status_descriptor_s_length) == F_equal_to) { + *code = F_descriptor; + + return F_none; + } + + if (fl_string_compare(string, f_status_descriptor_not_s, length, F_status_descriptor_not_s_length) == F_equal_to) { + *code = F_descriptor_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_device_s, length, F_status_device_s_length) == F_equal_to) { + *code = F_device; + + return F_none; + } + + if (fl_string_compare(string, f_status_device_not_s, length, F_status_device_not_s_length) == F_equal_to) { + *code = F_device_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_disable_s, length, F_status_disable_s_length) == F_equal_to) { + *code = F_disable; + + return F_none; + } + + if (fl_string_compare(string, f_status_disable_not_s, length, F_status_disable_not_s_length) == F_equal_to) { + *code = F_disable_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_done_s, length, F_status_done_s_length) == F_equal_to) { + *code = F_done; + + return F_none; + } + + if (fl_string_compare(string, f_status_done_not_s, length, F_status_done_not_s_length) == F_equal_to) { + *code = F_done_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_dummy_s, length, F_status_dummy_s_length) == F_equal_to) { + *code = F_dummy; + + return F_none; + } + + if (fl_string_compare(string, f_status_dummy_not_s, length, F_status_dummy_not_s_length) == F_equal_to) { + *code = F_dummy_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_empty_s, length, F_status_empty_s_length) == F_equal_to) { + *code = F_empty; + + return F_none; + } + + if (fl_string_compare(string, f_status_empty_not_s, length, F_status_empty_not_s_length) == F_equal_to) { + *code = F_empty_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_enable_s, length, F_status_enable_s_length) == F_equal_to) { + *code = F_enable; + + return F_none; + } + + if (fl_string_compare(string, f_status_enable_not_s, length, F_status_enable_not_s_length) == F_equal_to) { + *code = F_enable_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_encoding_s, length, F_status_encoding_s_length) == F_equal_to) { + *code = F_encoding; + + return F_none; + } + + if (fl_string_compare(string, f_status_encoding_not_s, length, F_status_encoding_not_s_length) == F_equal_to) { + *code = F_encoding_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_eoa_s, length, F_status_eoa_s_length) == F_equal_to) { + *code = F_eoa; + + return F_none; + } + + if (fl_string_compare(string, f_status_eoa_not_s, length, F_status_eoa_not_s_length) == F_equal_to) { + *code = F_eoa_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_eof_s, length, F_status_eof_s_length) == F_equal_to) { + *code = F_eof; + + return F_none; + } + + if (fl_string_compare(string, f_status_eof_not_s, length, F_status_eof_not_s_length) == F_equal_to) { + *code = F_eof_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_eol_s, length, F_status_eol_s_length) == F_equal_to) { + *code = F_eol; + + return F_none; + } + + if (fl_string_compare(string, f_status_eol_not_s, length, F_status_eol_not_s_length) == F_equal_to) { + *code = F_eol_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_eos_s, length, F_status_eos_s_length) == F_equal_to) { + *code = F_eos; + + return F_none; + } + + if (fl_string_compare(string, f_status_eos_not_s, length, F_status_eos_not_s_length) == F_equal_to) { + *code = F_eos_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_execute_s, length, F_status_execute_s_length) == F_equal_to) { + *code = F_execute; + + return F_none; + } + + if (fl_string_compare(string, f_status_execute_not_s, length, F_status_execute_not_s_length) == F_equal_to) { + *code = F_execute_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_exist_s, length, F_status_exist_s_length) == F_equal_to) { + *code = F_exist; + + return F_none; + } + + if (fl_string_compare(string, f_status_exist_not_s, length, F_status_exist_not_s_length) == F_equal_to) { + *code = F_exist_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_failure_s, length, F_status_failure_s_length) == F_equal_to) { + *code = F_failure; + + return F_none; + } + + if (fl_string_compare(string, f_status_failure_not_s, length, F_status_failure_not_s_length) == F_equal_to) { + *code = F_failure_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_first_s, length, F_status_first_s_length) == F_equal_to) { + *code = F_first; + + return F_none; + } + + if (fl_string_compare(string, f_status_first_not_s, length, F_status_first_not_s_length) == F_equal_to) { + *code = F_first_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_fork_s, length, F_status_fork_s_length) == F_equal_to) { + *code = F_fork; + + return F_none; + } + + if (fl_string_compare(string, f_status_fork_not_s, length, F_status_fork_not_s_length) == F_equal_to) { + *code = F_fork_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_format_s, length, F_status_format_s_length) == F_equal_to) { + *code = F_format; + + return F_none; + } + + if (fl_string_compare(string, f_status_format_not_s, length, F_status_format_not_s_length) == F_equal_to) { + *code = F_format_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_found_s, length, F_status_found_s_length) == F_equal_to) { + *code = F_found; + + return F_none; + } + + if (fl_string_compare(string, f_status_found_not_s, length, F_status_found_not_s_length) == F_equal_to) { + *code = F_found_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_full_s, length, F_status_full_s_length) == F_equal_to) { + *code = F_full; + + return F_none; + } + + if (fl_string_compare(string, f_status_full_not_s, length, F_status_full_not_s_length) == F_equal_to) { + *code = F_full_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_group_s, length, F_status_group_s_length) == F_equal_to) { + *code = F_group; + + return F_none; + } + + if (fl_string_compare(string, f_status_group_not_s, length, F_status_group_not_s_length) == F_equal_to) { + *code = F_group_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_ignore_s, length, F_status_ignore_s_length) == F_equal_to) { + *code = F_ignore; + + return F_none; + } + + if (fl_string_compare(string, f_status_ignore_not_s, length, F_status_ignore_not_s_length) == F_equal_to) { + *code = F_ignore_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_implemented_s, length, F_status_implemented_s_length) == F_equal_to) { + *code = F_implemented; + + return F_none; + } + + if (fl_string_compare(string, f_status_implemented_not_s, length, F_status_implemented_not_s_length) == F_equal_to) { + *code = F_implemented_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_input_s, length, F_status_input_s_length) == F_equal_to) { + *code = F_input; + + return F_none; + } + + if (fl_string_compare(string, f_status_input_not_s, length, F_status_input_not_s_length) == F_equal_to) { + *code = F_input_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_input_output_s, length, F_status_input_output_s_length) == F_equal_to) { + *code = F_input_output; + + return F_none; + } + + if (fl_string_compare(string, f_status_interrupt_s, length, F_status_interrupt_s_length) == F_equal_to) { + *code = F_interrupt; + + return F_none; + } + + if (fl_string_compare(string, f_status_interrupt_not_s, length, F_status_interrupt_not_s_length) == F_equal_to) { + *code = F_interrupt_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_known_s, length, F_status_known_s_length) == F_equal_to) { + *code = F_known; + + return F_none; + } + + if (fl_string_compare(string, f_status_known_not_s, length, F_status_known_not_s_length) == F_equal_to) { + *code = F_known_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_last_s, length, F_status_last_s_length) == F_equal_to) { + *code = F_last; + + return F_none; + } + + if (fl_string_compare(string, f_status_last_not_s, length, F_status_last_not_s_length) == F_equal_to) { + *code = F_last_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_limit_s, length, F_status_limit_s_length) == F_equal_to) { + *code = F_limit; + + return F_none; + } + + if (fl_string_compare(string, f_status_limit_not_s, length, F_status_limit_not_s_length) == F_equal_to) { + *code = F_limit_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_link_s, length, F_status_link_s_length) == F_equal_to) { + *code = F_link; + + return F_none; + } + + if (fl_string_compare(string, f_status_link_not_s, length, F_status_link_not_s_length) == F_equal_to) { + *code = F_link_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_live_s, length, F_status_live_s_length) == F_equal_to) { + *code = F_live; + + return F_none; + } + + if (fl_string_compare(string, f_status_live_not_s, length, F_status_live_not_s_length) == F_equal_to) { + *code = F_live_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_lock_s, length, F_status_lock_s_length) == F_equal_to) { + *code = F_lock; + + return F_none; + } + + if (fl_string_compare(string, f_status_lock_not_s, length, F_status_lock_not_s_length) == F_equal_to) { + *code = F_lock_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_loop_s, length, F_status_loop_s_length) == F_equal_to) { + *code = F_loop; + + return F_none; + } + + if (fl_string_compare(string, f_status_loop_not_s, length, F_status_loop_not_s_length) == F_equal_to) { + *code = F_loop_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_maybe_s, length, F_status_maybe_s_length) == F_equal_to) { + *code = F_maybe; + + return F_none; + } + + if (fl_string_compare(string, f_status_maybe_not_s, length, F_status_maybe_not_s_length) == F_equal_to) { + *code = F_maybe_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_memory_s, length, F_status_memory_s_length) == F_equal_to) { + *code = F_memory; + + return F_none; + } + + if (fl_string_compare(string, f_status_memory_not_s, length, F_status_memory_not_s_length) == F_equal_to) { + *code = F_memory_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_minor_s, length, F_status_minor_s_length) == F_equal_to) { + *code = F_minor; + + return F_none; + } + + if (fl_string_compare(string, f_status_minor_not_s, length, F_status_minor_not_s_length) == F_equal_to) { + *code = F_minor_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_moderate_s, length, F_status_moderate_s_length) == F_equal_to) { + *code = F_moderate; + + return F_none; + } + + if (fl_string_compare(string, f_status_moderate_not_s, length, F_status_moderate_not_s_length) == F_equal_to) { + *code = F_moderate_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_mount_s, length, F_status_mount_s_length) == F_equal_to) { + *code = F_mount; + + return F_none; + } + + if (fl_string_compare(string, f_status_mount_not_s, length, F_status_mount_not_s_length) == F_equal_to) { + *code = F_mount_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_name_s, length, F_status_name_s_length) == F_equal_to) { + *code = F_name; + + return F_none; + } + + if (fl_string_compare(string, f_status_name_not_s, length, F_status_name_not_s_length) == F_equal_to) { + *code = F_name_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_next_s, length, F_status_next_s_length) == F_equal_to) { + *code = F_next; + + return F_none; + } + + if (fl_string_compare(string, f_status_next_not_s, length, F_status_next_not_s_length) == F_equal_to) { + *code = F_next_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_nice_s, length, F_status_nice_s_length) == F_equal_to) { + *code = F_nice; + + return F_none; + } + + if (fl_string_compare(string, f_status_nice_not_s, length, F_status_nice_not_s_length) == F_equal_to) { + *code = F_nice_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_optional_s, length, F_status_optional_s_length) == F_equal_to) { + *code = F_optional; + + return F_none; + } + + if (fl_string_compare(string, f_status_optional_not_s, length, F_status_optional_not_s_length) == F_equal_to) { + *code = F_optional_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_output_s, length, F_status_output_s_length) == F_equal_to) { + *code = F_output; + + return F_none; + } + + if (fl_string_compare(string, f_status_output_not_s, length, F_status_output_not_s_length) == F_equal_to) { + *code = F_output_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_parameter_s, length, F_status_parameter_s_length) == F_equal_to) { + *code = F_parameter; + + return F_none; + } + + if (fl_string_compare(string, f_status_parameter_not_s, length, F_status_parameter_not_s_length) == F_equal_to) { + *code = F_parameter_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_parent_s, length, F_status_parent_s_length) == F_equal_to) { + *code = F_parent; + + return F_none; + } + + if (fl_string_compare(string, f_status_parent_not_s, length, F_status_parent_not_s_length) == F_equal_to) { + *code = F_parent_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_pipe_s, length, F_status_pipe_s_length) == F_equal_to) { + *code = F_pipe; + + return F_none; + } + + if (fl_string_compare(string, f_status_pipe_not_s, length, F_status_pipe_not_s_length) == F_equal_to) { + *code = F_pipe_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_port_s, length, F_status_port_s_length) == F_equal_to) { + *code = F_port; + + return F_none; + } + + if (fl_string_compare(string, f_status_port_not_s, length, F_status_port_not_s_length) == F_equal_to) { + *code = F_port_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_previous_s, length, F_status_previous_s_length) == F_equal_to) { + *code = F_previous; + + return F_none; + } + + if (fl_string_compare(string, f_status_previous_not_s, length, F_status_previous_not_s_length) == F_equal_to) { + *code = F_previous_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_processor_s, length, F_status_processor_s_length) == F_equal_to) { + *code = F_processor; + + return F_none; + } + + if (fl_string_compare(string, f_status_processor_not_s, length, F_status_processor_not_s_length) == F_equal_to) { + *code = F_processor_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_prohibited_s, length, F_status_prohibited_s_length) == F_equal_to) { + *code = F_prohibited; + + return F_none; + } + + if (fl_string_compare(string, f_status_prohibited_not_s, length, F_status_prohibited_not_s_length) == F_equal_to) { + *code = F_prohibited_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_range_s, length, F_status_range_s_length) == F_equal_to) { + *code = F_range; + + return F_none; + } + + if (fl_string_compare(string, f_status_range_not_s, length, F_status_range_not_s_length) == F_equal_to) { + *code = F_range_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_read_s, length, F_status_read_s_length) == F_equal_to) { + *code = F_read; + + return F_none; + } + + if (fl_string_compare(string, f_status_read_not_s, length, F_status_read_not_s_length) == F_equal_to) { + *code = F_read_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_read_only_s, length, F_status_read_only_s_length) == F_equal_to) { + *code = F_read_only; + + return F_none; + } + + if (fl_string_compare(string, f_status_ready_s, length, F_status_ready_s_length) == F_equal_to) { + *code = F_ready; + + return F_none; + } + + if (fl_string_compare(string, f_status_ready_not_s, length, F_status_ready_not_s_length) == F_equal_to) { + *code = F_ready_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_recover_s, length, F_status_recover_s_length) == F_equal_to) { + *code = F_recover; + + return F_none; + } + + if (fl_string_compare(string, f_status_recover_not_s, length, F_status_recover_not_s_length) == F_equal_to) { + *code = F_recover_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_recurse_s, length, F_status_recurse_s_length) == F_equal_to) { + *code = F_recurse; + + return F_none; + } + + if (fl_string_compare(string, f_status_recurse_not_s, length, F_status_recurse_not_s_length) == F_equal_to) { + *code = F_recurse_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_relative_s, length, F_status_relative_s_length) == F_equal_to) { + *code = F_relative; + + return F_none; + } + + if (fl_string_compare(string, f_status_relative_not_s, length, F_status_relative_not_s_length) == F_equal_to) { + *code = F_relative_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_require_s, length, F_status_require_s_length) == F_equal_to) { + *code = F_require; + + return F_none; + } + + if (fl_string_compare(string, f_status_require_not_s, length, F_status_require_not_s_length) == F_equal_to) { + *code = F_require_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_resource_s, length, F_status_resource_s_length) == F_equal_to) { + *code = F_resource; + + return F_none; + } + + if (fl_string_compare(string, f_status_resource_not_s, length, F_status_resource_not_s_length) == F_equal_to) { + *code = F_resource_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_search_s, length, F_status_search_s_length) == F_equal_to) { + *code = F_search; + + return F_none; + } + + if (fl_string_compare(string, f_status_search_not_s, length, F_status_search_not_s_length) == F_equal_to) { + *code = F_search_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_schedule_s, length, F_status_schedule_s_length) == F_equal_to) { + *code = F_schedule; + + return F_none; + } + + if (fl_string_compare(string, f_status_schedule_not_s, length, F_status_schedule_not_s_length) == F_equal_to) { + *code = F_schedule_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_s, length, F_status_signal_s_length) == F_equal_to) { + *code = F_signal; + + return F_none; + } + + if (fl_string_compare(string, f_status_signal_not_s, length, F_status_signal_not_s_length) == F_equal_to) { + *code = F_signal_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_space_s, length, F_status_space_s_length) == F_equal_to) { + *code = F_space; + + return F_none; + } + + if (fl_string_compare(string, f_status_space_not_s, length, F_status_space_not_s_length) == F_equal_to) { + *code = F_space_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_stop_s, length, F_status_stop_s_length) == F_equal_to) { + *code = F_stop; + + return F_none; + } + + if (fl_string_compare(string, f_status_stop_not_s, length, F_status_stop_not_s_length) == F_equal_to) { + *code = F_stop_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_string_s, length, F_status_string_s_length) == F_equal_to) { + *code = F_string; + + return F_none; + } + + if (fl_string_compare(string, f_status_string_not_s, length, F_status_string_not_s_length) == F_equal_to) { + *code = F_string_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_string_too_large_s, length, F_status_string_too_large_s_length) == F_equal_to) { + *code = F_string_too_large; + + return F_none; + } + + if (fl_string_compare(string, f_status_string_too_small_s, length, F_status_string_too_small_s_length) == F_equal_to) { + *code = F_string_too_small; + + return F_none; + } + + if (fl_string_compare(string, f_status_success_s, length, F_status_success_s_length) == F_equal_to) { + *code = F_success; + + return F_none; + } + + if (fl_string_compare(string, f_status_success_not_s, length, F_status_success_not_s_length) == F_equal_to) { + *code = F_success_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_supported_s, length, F_status_supported_s_length) == F_equal_to) { + *code = F_supported; + + return F_none; + } + + if (fl_string_compare(string, f_status_supported_not_s, length, F_status_supported_not_s_length) == F_equal_to) { + *code = F_supported_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_syntax_s, length, F_status_syntax_s_length) == F_equal_to) { + *code = F_syntax; + + return F_none; + } + + if (fl_string_compare(string, f_status_syntax_not_s, length, F_status_syntax_not_s_length) == F_equal_to) { + *code = F_syntax_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_thread_s, length, F_status_thread_s_length) == F_equal_to) { + *code = F_thread; + + return F_none; + } + + if (fl_string_compare(string, f_status_thread_not_s, length, F_status_thread_not_s_length) == F_equal_to) { + *code = F_thread_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_time_s, length, F_status_time_s_length) == F_equal_to) { + *code = F_time; + + return F_none; + } + + if (fl_string_compare(string, f_status_time_not_s, length, F_status_time_not_s_length) == F_equal_to) { + *code = F_time_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_too_large_s, length, F_status_too_large_s_length) == F_equal_to) { + *code = F_too_large; + + return F_none; + } + + if (fl_string_compare(string, f_status_too_small_s, length, F_status_too_small_s_length) == F_equal_to) { + *code = F_too_small; + + return F_none; + } + + if (fl_string_compare(string, f_status_user_s, length, F_status_user_s_length) == F_equal_to) { + *code = F_user; + + return F_none; + } + + if (fl_string_compare(string, f_status_user_not_s, length, F_status_user_not_s_length) == F_equal_to) { + *code = F_user_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_utf_s, length, F_status_utf_s_length) == F_equal_to) { + *code = F_utf; + + return F_none; + } + + if (fl_string_compare(string, f_status_utf_fragment_s, length, F_status_utf_fragment_s_length) == F_equal_to) { + *code = F_utf_fragment; + + return F_none; + } + + if (fl_string_compare(string, f_status_utf_fragment_not_s, length, F_status_utf_fragment_not_s_length) == F_equal_to) { + *code = F_utf_fragment_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_utf_not_s, length, F_status_utf_not_s_length) == F_equal_to) { + *code = F_utf_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_valid_s, length, F_status_valid_s_length) == F_equal_to) { + *code = F_valid; + + return F_none; + } + + if (fl_string_compare(string, f_status_valid_not_s, length, F_status_valid_not_s_length) == F_equal_to) { + *code = F_valid_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_value_s, length, F_status_value_s_length) == F_equal_to) { + *code = F_value; + + return F_none; + } + + if (fl_string_compare(string, f_status_value_not_s, length, F_status_value_not_s_length) == F_equal_to) { + *code = F_value_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_wait_s, length, F_status_wait_s_length) == F_equal_to) { + *code = F_wait; + + return F_none; + } + + if (fl_string_compare(string, f_status_wait_not_s, length, F_status_wait_not_s_length) == F_equal_to) { + *code = F_wait_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_warn_s, length, F_status_warn_s_length) == F_equal_to) { + *code = F_warn; + + return F_none; + } + + if (fl_string_compare(string, f_status_warn_not_s, length, F_status_warn_not_s_length) == F_equal_to) { + *code = F_warn_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_world_s, length, F_status_world_s_length) == F_equal_to) { + *code = F_world; + + return F_none; + } + + if (fl_string_compare(string, f_status_world_not_s, length, F_status_world_not_s_length) == F_equal_to) { + *code = F_world_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_write_s, length, F_status_write_s_length) == F_equal_to) { + *code = F_write; + + return F_none; + } + + if (fl_string_compare(string, f_status_write_not_s, length, F_status_write_not_s_length) == F_equal_to) { + *code = F_write_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_write_only_s, length, F_status_write_only_s_length) == F_equal_to) { + *code = F_write_only; + + return F_none; + } + #endif // _di_F_status_basic_ + + #ifndef _di_F_status_array_ + if (fl_string_compare(string, f_status_array_s, length, F_status_array_s_length) == F_equal_to) { + *code = F_array; + + return F_none; + } + + if (fl_string_compare(string, f_status_array_not_s, length, F_status_array_not_s_length) == F_equal_to) { + *code = F_array_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_array_too_large_s, length, F_status_array_too_large_s_length) == F_equal_to) { + *code = F_array_too_large; + + return F_none; + } + + if (fl_string_compare(string, f_status_array_too_small_s, length, F_status_array_too_small_s_length) == F_equal_to) { + *code = F_array_too_small; + + return F_none; + } + #endif // _di_F_status_array_ + + #ifndef _di_F_status_available_ + if (fl_string_compare(string, f_status_available_s, length, F_status_available_s_length) == F_equal_to) { + *code = F_available; + + return F_none; + } + + if (fl_string_compare(string, f_status_available_not_s, length, F_status_available_not_s_length) == F_equal_to) { + *code = F_available_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_available_not_address_s, length, F_status_available_not_address_s_length) == F_equal_to) { + *code = F_available_not_address; + + return F_none; + } + + if (fl_string_compare(string, f_status_available_not_buffer_s, length, F_status_available_not_buffer_s_length) == F_equal_to) { + *code = F_available_not_buffer; + + return F_none; + } + + if (fl_string_compare(string, f_status_available_not_device_s, length, F_status_available_not_device_s_length) == F_equal_to) { + *code = F_available_not_device; + + return F_none; + } + + if (fl_string_compare(string, f_status_available_not_pipe_s, length, F_status_available_not_pipe_s_length) == F_equal_to) { + *code = F_available_not_pipe; + + return F_none; + } + + if (fl_string_compare(string, f_status_available_not_port_s, length, F_status_available_not_port_s_length) == F_equal_to) { + *code = F_available_not_port; + + return F_none; + } + + if (fl_string_compare(string, f_status_available_not_process_s, length, F_status_available_not_process_s_length) == F_equal_to) { + *code = F_available_not_process; + + return F_none; + } + + if (fl_string_compare(string, f_status_available_not_socket_s, length, F_status_available_not_socket_s_length) == F_equal_to) { + *code = F_available_not_socket; + + return F_none; + } + #endif // _di_F_status_available_ + + #ifndef _di_F_status_busy_ + if (fl_string_compare(string, f_status_busy_s, length, F_status_busy_s_length) == F_equal_to) { + *code = F_busy; + + return F_none; + } + + if (fl_string_compare(string, f_status_busy_address_s, length, F_status_busy_address_s_length) == F_equal_to) { + *code = F_busy_address; + + return F_none; + } + + if (fl_string_compare(string, f_status_busy_buffer_s, length, F_status_busy_buffer_s_length) == F_equal_to) { + *code = F_busy_buffer; + + return F_none; + } + + if (fl_string_compare(string, f_status_busy_device_s, length, F_status_busy_device_s_length) == F_equal_to) { + *code = F_busy_device; + + return F_none; + } + + if (fl_string_compare(string, f_status_busy_not_s, length, F_status_busy_not_s_length) == F_equal_to) { + *code = F_busy_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_busy_pipe_s, length, F_status_busy_pipe_s_length) == F_equal_to) { + *code = F_busy_pipe; + + return F_none; + } + + if (fl_string_compare(string, f_status_busy_port_s, length, F_status_busy_port_s_length) == F_equal_to) { + *code = F_busy_port; + + return F_none; + } + + if (fl_string_compare(string, f_status_busy_process_s, length, F_status_busy_process_s_length) == F_equal_to) { + *code = F_busy_process; + + return F_none; + } + + if (fl_string_compare(string, f_status_busy_socket_s, length, F_status_busy_socket_s_length) == F_equal_to) { + *code = F_busy_socket; + + return F_none; + } + #endif // _di_F_status_busy_ + + #ifndef _di_F_status_number_ + if (fl_string_compare(string, f_status_number_s, length, F_status_number_s_length) == F_equal_to) { + *code = F_number; + + return F_none; + } + + if (fl_string_compare(string, f_status_number_decimal_s, length, F_status_number_decimal_s_length) == F_equal_to) { + *code = F_number_decimal; + + return F_none; + } + + if (fl_string_compare(string, f_status_number_decimal_not_s, length, F_status_number_decimal_not_s_length) == F_equal_to) { + *code = F_number_decimal_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_number_divide_by_zero_s, length, F_status_number_divide_by_zero_s_length) == F_equal_to) { + *code = F_number_divide_by_zero; + + return F_none; + } + + if (fl_string_compare(string, f_status_number_negative_s, length, F_status_number_negative_s_length) == F_equal_to) { + *code = F_number_negative; + + return F_none; + } + + if (fl_string_compare(string, f_status_number_negative_not_s, length, F_status_number_negative_not_s_length) == F_equal_to) { + *code = F_number_negative_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_number_not_s, length, F_status_number_not_s_length) == F_equal_to) { + *code = F_number_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_number_overflow_s, length, F_status_number_overflow_s_length) == F_equal_to) { + *code = F_number_overflow; + + return F_none; + } + + if (fl_string_compare(string, f_status_number_positive_s, length, F_status_number_positive_s_length) == F_equal_to) { + *code = F_number_positive; + + return F_none; + } + + if (fl_string_compare(string, f_status_number_positive_not_s, length, F_status_number_positive_not_s_length) == F_equal_to) { + *code = F_number_positive_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_number_too_large_s, length, F_status_number_too_large_s_length) == F_equal_to) { + *code = F_number_too_large; + + return F_none; + } + + if (fl_string_compare(string, f_status_number_too_small_s, length, F_status_number_too_small_s_length) == F_equal_to) { + *code = F_number_too_small; + + return F_none; + } + + if (fl_string_compare(string, f_status_number_underflow_s, length, F_status_number_underflow_s_length) == F_equal_to) { + *code = F_number_underflow; + + return F_none; + } + + if (fl_string_compare(string, f_status_number_whole_s, length, F_status_number_whole_s_length) == F_equal_to) { + *code = F_number_whole; + + return F_none; + } + + if (fl_string_compare(string, f_status_number_whole_not_s, length, F_status_number_whole_not_s_length) == F_equal_to) { + *code = F_number_whole_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_number_zero_s, length, F_status_number_zero_s_length) == F_equal_to) { + *code = F_number_zero; + + return F_none; + } + + if (fl_string_compare(string, f_status_number_zero_not_s, length, F_status_number_zero_not_s_length) == F_equal_to) { + *code = F_number_zero_not; + + return F_none; + } + #endif // _di_F_status_number_ + + #ifndef _di_F_status_buffer_ + if (fl_string_compare(string, f_status_buffer_s, length, F_status_buffer_s_length) == F_equal_to) { + *code = F_buffer; + + return F_none; + } + + if (fl_string_compare(string, f_status_buffer_not_s, length, F_status_buffer_not_s_length) == F_equal_to) { + *code = F_buffer_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_buffer_too_large_s, length, F_status_buffer_too_large_s_length) == F_equal_to) { + *code = F_buffer_too_large; + + return F_none; + } + + if (fl_string_compare(string, f_status_buffer_too_small_s, length, F_status_buffer_too_small_s_length) == F_equal_to) { + *code = F_buffer_too_small; + + return F_none; + } + + if (fl_string_compare(string, f_status_complete_not_utf_s, length, F_status_complete_not_utf_s_length) == F_equal_to) { + *code = F_complete_not_utf; + + return F_none; + } + + if (fl_string_compare(string, f_status_complete_not_utf_block_s, length, F_status_complete_not_utf_block_s_length) == F_equal_to) { + *code = F_complete_not_utf_block; + + return F_none; + } + + if (fl_string_compare(string, f_status_complete_not_utf_eoa_s, length, F_status_complete_not_utf_eoa_s_length) == F_equal_to) { + *code = F_complete_not_utf_eoa; + + return F_none; + } + + if (fl_string_compare(string, f_status_complete_not_utf_eof_s, length, F_status_complete_not_utf_eof_s_length) == F_equal_to) { + *code = F_complete_not_utf_eof; + + return F_none; + } + + if (fl_string_compare(string, f_status_complete_not_utf_eol_s, length, F_status_complete_not_utf_eol_s_length) == F_equal_to) { + *code = F_complete_not_utf_eol; + + return F_none; + } + + if (fl_string_compare(string, f_status_complete_not_utf_eos_s, length, F_status_complete_not_utf_eos_s_length) == F_equal_to) { + *code = F_complete_not_utf_eos; + + return F_none; + } + + if (fl_string_compare(string, f_status_complete_not_utf_stop_s, length, F_status_complete_not_utf_stop_s_length) == F_equal_to) { + *code = F_complete_not_utf_stop; + + return F_none; + } + + if (fl_string_compare(string, f_status_none_block_s, length, F_status_none_block_s_length) == F_equal_to) { + *code = F_none_block; + + return F_none; + } + + if (fl_string_compare(string, f_status_none_eoa_s, length, F_status_none_eoa_s_length) == F_equal_to) { + *code = F_none_eoa; + + return F_none; + } + + if (fl_string_compare(string, f_status_none_eof_s, length, F_status_none_eof_s_length) == F_equal_to) { + *code = F_none_eof; + + return F_none; + } + + if (fl_string_compare(string, f_status_none_eol_s, length, F_status_none_eol_s_length) == F_equal_to) { + *code = F_none_eol; + + return F_none; + } + + if (fl_string_compare(string, f_status_none_eos_s, length, F_status_none_eos_s_length) == F_equal_to) { + *code = F_none_eos; + + return F_none; + } + + if (fl_string_compare(string, f_status_none_stop_s, length, F_status_none_stop_s_length) == F_equal_to) { + *code = F_none_stop; + + return F_none; + } + + if (fl_string_compare(string, f_status_data_s, length, F_status_data_s_length) == F_equal_to) { + *code = F_data; + + return F_none; + } + + if (fl_string_compare(string, f_status_data_not_s, length, F_status_data_not_s_length) == F_equal_to) { + *code = F_data_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_data_not_block_s, length, F_status_data_not_block_s_length) == F_equal_to) { + *code = F_data_not_block; + + return F_none; + } + + if (fl_string_compare(string, f_status_data_not_eoa_s, length, F_status_data_not_eoa_s_length) == F_equal_to) { + *code = F_data_not_eoa; + + return F_none; + } + + if (fl_string_compare(string, f_status_data_not_eof_s, length, F_status_data_not_eof_s_length) == F_equal_to) { + *code = F_data_not_eof; + + return F_none; + } + + if (fl_string_compare(string, f_status_data_not_eol_s, length, F_status_data_not_eol_s_length) == F_equal_to) { + *code = F_data_not_eol; + + return F_none; + } + + if (fl_string_compare(string, f_status_data_not_eos_s, length, F_status_data_not_eos_s_length) == F_equal_to) { + *code = F_data_not_eos; + + return F_none; + } + + if (fl_string_compare(string, f_status_data_not_stop_s, length, F_status_data_not_stop_s_length) == F_equal_to) { + *code = F_data_not_stop; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminated_s, length, F_status_terminated_s_length) == F_equal_to) { + *code = F_terminated; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminated_not_s, length, F_status_terminated_not_s_length) == F_equal_to) { + *code = F_terminated_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminated_not_block_s, length, F_status_terminated_not_block_s_length) == F_equal_to) { + *code = F_terminated_not_block; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminated_not_eoa_s, length, F_status_terminated_not_eoa_s_length) == F_equal_to) { + *code = F_terminated_not_eoa; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminated_not_eof_s, length, F_status_terminated_not_eof_s_length) == F_equal_to) { + *code = F_terminated_not_eof; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminated_not_eol_s, length, F_status_terminated_not_eol_s_length) == F_equal_to) { + *code = F_terminated_not_eol; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminated_not_eos_s, length, F_status_terminated_not_eos_s_length) == F_equal_to) { + *code = F_terminated_not_eos; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminated_not_group_s, length, F_status_terminated_not_group_s_length) == F_equal_to) { + *code = F_terminated_not_group; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminated_not_group_block_s, length, F_status_terminated_not_group_block_s_length) == F_equal_to) { + *code = F_terminated_not_group_block; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminated_not_group_eoa_s, length, F_status_terminated_not_group_eoa_s_length) == F_equal_to) { + *code = F_terminated_not_group_eoa; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminated_not_group_eof_s, length, F_status_terminated_not_group_eof_s_length) == F_equal_to) { + *code = F_terminated_not_group_eof; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminated_not_group_eol_s, length, F_status_terminated_not_group_eol_s_length) == F_equal_to) { + *code = F_terminated_not_group_eol; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminated_not_group_eos_s, length, F_status_terminated_not_group_eos_s_length) == F_equal_to) { + *code = F_terminated_not_group_eos; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminated_not_group_stop_s, length, F_status_terminated_not_group_stop_s_length) == F_equal_to) { + *code = F_terminated_not_group_stop; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminated_not_nest_s, length, F_status_terminated_not_nest_s_length) == F_equal_to) { + *code = F_terminated_not_nest; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminated_not_nest_block_s, length, F_status_terminated_not_nest_block_s_length) == F_equal_to) { + *code = F_terminated_not_nest_block; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminated_not_nest_eoa_s, length, F_status_terminated_not_nest_eoa_s_length) == F_equal_to) { + *code = F_terminated_not_nest_eoa; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminated_not_nest_eof_s, length, F_status_terminated_not_nest_eof_s_length) == F_equal_to) { + *code = F_terminated_not_nest_eof; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminated_not_nest_eol_s, length, F_status_terminated_not_nest_eol_s_length) == F_equal_to) { + *code = F_terminated_not_nest_eol; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminated_not_nest_eos_s, length, F_status_terminated_not_nest_eos_s_length) == F_equal_to) { + *code = F_terminated_not_nest_eos; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminated_not_nest_stop_s, length, F_status_terminated_not_nest_stop_s_length) == F_equal_to) { + *code = F_terminated_not_nest_stop; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminated_not_stop_s, length, F_status_terminated_not_stop_s_length) == F_equal_to) { + *code = F_terminated_not_stop; + + return F_none; + } + #endif // _di_F_status_buffer_ + + #ifndef _di_F_status_process_ + if (fl_string_compare(string, f_status_process_s, length, F_status_process_s_length) == F_equal_to) { + *code = F_process; + + return F_none; + } + + if (fl_string_compare(string, f_status_process_not_s, length, F_status_process_not_s_length) == F_equal_to) { + *code = F_process_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_process_too_many_s, length, F_status_process_too_many_s_length) == F_equal_to) { + *code = F_process_too_many; + + return F_none; + } + #endif // _di_F_status_process_ + + #ifndef _di_F_status_file_ + if (fl_string_compare(string, f_status_file_s, length, F_status_file_s_length) == F_equal_to) { + *code = F_file; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_close_s, length, F_status_file_close_s_length) == F_equal_to) { + *code = F_file_close; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_closed_s, length, F_status_file_closed_s_length) == F_equal_to) { + *code = F_file_closed; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_descriptor_s, length, F_status_file_descriptor_s_length) == F_equal_to) { + *code = F_file_descriptor; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_descriptor_max_s, length, F_status_file_descriptor_max_s_length) == F_equal_to) { + *code = F_file_descriptor_max; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_descriptor_not_s, length, F_status_file_descriptor_not_s_length) == F_equal_to) { + *code = F_file_descriptor_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_empty_s, length, F_status_file_empty_s_length) == F_equal_to) { + *code = F_file_empty; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_flush_s, length, F_status_file_flush_s_length) == F_equal_to) { + *code = F_file_flush; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_found_s, length, F_status_file_found_s_length) == F_equal_to) { + *code = F_file_found; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_found_not_s, length, F_status_file_found_not_s_length) == F_equal_to) { + *code = F_file_found_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_not_s, length, F_status_file_not_s_length) == F_equal_to) { + *code = F_file_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_open_s, length, F_status_file_open_s_length) == F_equal_to) { + *code = F_file_open; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_open_max_s, length, F_status_file_open_max_s_length) == F_equal_to) { + *code = F_file_open_max; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_opened_s, length, F_status_file_opened_s_length) == F_equal_to) { + *code = F_file_opened; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_overflow_s, length, F_status_file_overflow_s_length) == F_equal_to) { + *code = F_file_overflow; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_purge_s, length, F_status_file_purge_s_length) == F_equal_to) { + *code = F_file_purge; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_read_s, length, F_status_file_read_s_length) == F_equal_to) { + *code = F_file_read; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_reallocation_s, length, F_status_file_reallocation_s_length) == F_equal_to) { + *code = F_file_reallocation; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_seek_s, length, F_status_file_seek_s_length) == F_equal_to) { + *code = F_file_seek; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_stat_s, length, F_status_file_stat_s_length) == F_equal_to) { + *code = F_file_stat; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_synchronize_s, length, F_status_file_synchronize_s_length) == F_equal_to) { + *code = F_file_synchronize; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_type_block_s, length, F_status_file_type_block_s_length) == F_equal_to) { + *code = F_file_type_block; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_type_character_s, length, F_status_file_type_character_s_length) == F_equal_to) { + *code = F_file_type_character; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_type_directory_s, length, F_status_file_type_directory_s_length) == F_equal_to) { + *code = F_file_type_directory; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_type_link_s, length, F_status_file_type_link_s_length) == F_equal_to) { + *code = F_file_type_link; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_type_not_block_s, length, F_status_file_type_not_block_s_length) == F_equal_to) { + *code = F_file_type_not_block; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_type_not_character_s, length, F_status_file_type_not_character_s_length) == F_equal_to) { + *code = F_file_type_not_character; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_type_not_directory_s, length, F_status_file_type_not_directory_s_length) == F_equal_to) { + *code = F_file_type_not_directory; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_type_not_fifo_s, length, F_status_file_type_not_fifo_s_length) == F_equal_to) { + *code = F_file_type_not_fifo; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_type_not_link_s, length, F_status_file_type_not_link_s_length) == F_equal_to) { + *code = F_file_type_not_link; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_type_not_pipe_s, length, F_status_file_type_not_pipe_s_length) == F_equal_to) { + *code = F_file_type_not_pipe; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_type_not_regular_s, length, F_status_file_type_not_regular_s_length) == F_equal_to) { + *code = F_file_type_not_regular; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_type_not_socket_s, length, F_status_file_type_not_socket_s_length) == F_equal_to) { + *code = F_file_type_not_socket; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_type_not_unknown_s, length, F_status_file_type_not_unknown_s_length) == F_equal_to) { + *code = F_file_type_not_unknown; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_type_pipe_s, length, F_status_file_type_pipe_s_length) == F_equal_to) { + *code = F_file_type_pipe; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_type_regular_s, length, F_status_file_type_regular_s_length) == F_equal_to) { + *code = F_file_type_regular; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_type_socket_s, length, F_status_file_type_socket_s_length) == F_equal_to) { + *code = F_file_type_socket; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_type_unknown_s, length, F_status_file_type_unknown_s_length) == F_equal_to) { + *code = F_file_type_unknown; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_underflow_s, length, F_status_file_underflow_s_length) == F_equal_to) { + *code = F_file_underflow; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_utf_s, length, F_status_file_utf_s_length) == F_equal_to) { + *code = F_file_utf; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_utf_not_s, length, F_status_file_utf_not_s_length) == F_equal_to) { + *code = F_file_utf_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_file_write_s, length, F_status_file_write_s_length) == F_equal_to) { + *code = F_file_write; + + return F_none; + } + #endif // _di_F_status_file_ + + #ifndef _di_F_status_filesystem_ + if (fl_string_compare(string, f_status_filesystem_s, length, F_status_filesystem_s_length) == F_equal_to) { + *code = F_filesystem; + + return F_none; + } + + if (fl_string_compare(string, f_status_filesystem_not_s, length, F_status_filesystem_not_s_length) == F_equal_to) { + *code = F_filesystem_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_filesystem_quota_block_s, length, F_status_filesystem_quota_block_s_length) == F_equal_to) { + *code = F_filesystem_quota_block; + + return F_none; + } + + if (fl_string_compare(string, f_status_filesystem_quota_reached_s, length, F_status_filesystem_quota_reached_s_length) == F_equal_to) { + *code = F_filesystem_quota_reached; + + return F_none; + } + #endif // _di_F_status_filesystem_ + + #ifndef _di_F_status_directory_ + if (fl_string_compare(string, f_status_directory_s, length, F_status_directory_s_length) == F_equal_to) { + *code = F_directory; + + return F_none; + } + + if (fl_string_compare(string, f_status_directory_close_s, length, F_status_directory_close_s_length) == F_equal_to) { + *code = F_directory_close; + + return F_none; + } + + if (fl_string_compare(string, f_status_directory_closed_s, length, F_status_directory_closed_s_length) == F_equal_to) { + *code = F_directory_closed; + + return F_none; + } + + if (fl_string_compare(string, f_status_directory_descriptor_s, length, F_status_directory_descriptor_s_length) == F_equal_to) { + *code = F_directory_descriptor; + + return F_none; + } + + if (fl_string_compare(string, f_status_directory_empty_s, length, F_status_directory_empty_s_length) == F_equal_to) { + *code = F_directory_empty; + + return F_none; + } + + if (fl_string_compare(string, f_status_directory_empty_not_s, length, F_status_directory_empty_not_s_length) == F_equal_to) { + *code = F_directory_empty_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_directory_found_s, length, F_status_directory_found_s_length) == F_equal_to) { + *code = F_directory_found; + + return F_none; + } + + if (fl_string_compare(string, f_status_directory_found_not_s, length, F_status_directory_found_not_s_length) == F_equal_to) { + *code = F_directory_found_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_directory_flush_s, length, F_status_directory_flush_s_length) == F_equal_to) { + *code = F_directory_flush; + + return F_none; + } + + if (fl_string_compare(string, f_status_directory_link_max_s, length, F_status_directory_link_max_s_length) == F_equal_to) { + *code = F_directory_link_max; + + return F_none; + } + + if (fl_string_compare(string, f_status_directory_not_s, length, F_status_directory_not_s_length) == F_equal_to) { + *code = F_directory_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_directory_open_s, length, F_status_directory_open_s_length) == F_equal_to) { + *code = F_directory_open; + + return F_none; + } + + if (fl_string_compare(string, f_status_directory_purge_s, length, F_status_directory_purge_s_length) == F_equal_to) { + *code = F_directory_purge; + + return F_none; + } + + if (fl_string_compare(string, f_status_directory_read_s, length, F_status_directory_read_s_length) == F_equal_to) { + *code = F_directory_read; + + return F_none; + } + + if (fl_string_compare(string, f_status_directory_stream_s, length, F_status_directory_stream_s_length) == F_equal_to) { + *code = F_directory_stream; + + return F_none; + } + + if (fl_string_compare(string, f_status_directory_supported_not_s, length, F_status_directory_supported_not_s_length) == F_equal_to) { + *code = F_directory_supported_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_directory_synchronize_s, length, F_status_directory_synchronize_s_length) == F_equal_to) { + *code = F_directory_synchronize; + + return F_none; + } + + if (fl_string_compare(string, f_status_directory_utf_s, length, F_status_directory_utf_s_length) == F_equal_to) { + *code = F_directory_utf; + + return F_none; + } + + if (fl_string_compare(string, f_status_directory_utf_not_s, length, F_status_directory_utf_not_s_length) == F_equal_to) { + *code = F_directory_utf_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_directory_write_s, length, F_status_directory_write_s_length) == F_equal_to) { + *code = F_directory_write; + + return F_none; + } + #endif // _di_F_status_directory_ + + #ifndef _di_F_status_socket_ + if (fl_string_compare(string, f_status_socket_s, length, F_status_socket_s_length) == F_equal_to) { + *code = F_socket; + + return F_none; + } + + if (fl_string_compare(string, f_status_socket_client_s, length, F_status_socket_client_s_length) == F_equal_to) { + *code = F_socket_client; + + return F_none; + } + + if (fl_string_compare(string, f_status_socket_not_s, length, F_status_socket_not_s_length) == F_equal_to) { + *code = F_socket_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_socket_receive_s, length, F_status_socket_receive_s_length) == F_equal_to) { + *code = F_socket_receive; + + return F_none; + } + + if (fl_string_compare(string, f_status_socket_send_s, length, F_status_socket_send_s_length) == F_equal_to) { + *code = F_socket_send; + + return F_none; + } + + if (fl_string_compare(string, f_status_socket_target_s, length, F_status_socket_target_s_length) == F_equal_to) { + *code = F_socket_target; + + return F_none; + } + #endif // _di_F_status_socket_ + + #ifndef _di_F_status_compare_ + if (fl_string_compare(string, f_status_equal_to_s, length, F_status_equal_to_s_length) == F_equal_to) { + *code = F_equal_to; + + return F_none; + } + + if (fl_string_compare(string, f_status_equal_to_not_s, length, F_status_equal_to_not_s_length) == F_equal_to) { + *code = F_equal_to_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_than_greater_s, length, F_status_than_greater_s_length) == F_equal_to) { + *code = F_than_greater; + + return F_none; + } + + if (fl_string_compare(string, f_status_than_less_s, length, F_status_than_less_s_length) == F_equal_to) { + *code = F_than_less; + + return F_none; + } + #endif // _di_F_status_compare_ + + #ifndef _di_F_status_access_ + if (fl_string_compare(string, f_status_access_s, length, F_status_access_s_length) == F_equal_to) { + *code = F_access; + + return F_none; + } + + if (fl_string_compare(string, f_status_access_denied_s, length, F_status_access_denied_s_length) == F_equal_to) { + *code = F_access_denied; + + return F_none; + } + + if (fl_string_compare(string, f_status_access_denied_user_s, length, F_status_access_denied_user_s_length) == F_equal_to) { + *code = F_access_denied_user; + + return F_none; + } + + if (fl_string_compare(string, f_status_access_denied_group_s, length, F_status_access_denied_group_s_length) == F_equal_to) { + *code = F_access_denied_group; + + return F_none; + } + + if (fl_string_compare(string, f_status_access_denied_world_s, length, F_status_access_denied_world_s_length) == F_equal_to) { + *code = F_access_denied_world; + + return F_none; + } + + if (fl_string_compare(string, f_status_access_denied_read_s, length, F_status_access_denied_read_s_length) == F_equal_to) { + *code = F_access_denied_read; + + return F_none; + } + + if (fl_string_compare(string, f_status_access_denied_write_s, length, F_status_access_denied_write_s_length) == F_equal_to) { + *code = F_access_denied_write; + + return F_none; + } + + if (fl_string_compare(string, f_status_access_denied_execute_s, length, F_status_access_denied_execute_s_length) == F_equal_to) { + *code = F_access_denied_execute; + + return F_none; + } + + if (fl_string_compare(string, f_status_access_denied_super_s, length, F_status_access_denied_super_s_length) == F_equal_to) { + *code = F_access_denied_super; + + return F_none; + } + + if (fl_string_compare(string, f_status_access_granted_s, length, F_status_access_granted_s_length) == F_equal_to) { + *code = F_access_granted; + + return F_none; + } + + if (fl_string_compare(string, f_status_access_granted_user_s, length, F_status_access_granted_user_s_length) == F_equal_to) { + *code = F_access_granted_user; + + return F_none; + } + + if (fl_string_compare(string, f_status_access_granted_group_s, length, F_status_access_granted_group_s_length) == F_equal_to) { + *code = F_access_granted_group; + + return F_none; + } + + if (fl_string_compare(string, f_status_access_granted_world_s, length, F_status_access_granted_world_s_length) == F_equal_to) { + *code = F_access_granted_world; + + return F_none; + } + + if (fl_string_compare(string, f_status_access_granted_read_s, length, F_status_access_granted_read_s_length) == F_equal_to) { + *code = F_access_granted_read; + + return F_none; + } + + if (fl_string_compare(string, f_status_access_granted_write_s, length, F_status_access_granted_write_s_length) == F_equal_to) { + *code = F_access_granted_write; + + return F_none; + } + + if (fl_string_compare(string, f_status_access_granted_execute_s, length, F_status_access_granted_execute_s_length) == F_equal_to) { + *code = F_access_granted_execute; + + return F_none; + } + + if (fl_string_compare(string, f_status_access_granted_super_s, length, F_status_access_granted_super_s_length) == F_equal_to) { + *code = F_access_granted_super; + + return F_none; + } + + if (fl_string_compare(string, f_status_access_group_s, length, F_status_access_group_s_length) == F_equal_to) { + *code = F_access_mode; + + return F_none; + } + + if (fl_string_compare(string, f_status_access_mode_s, length, F_status_access_mode_s_length) == F_equal_to) { + *code = F_access_group; + + return F_none; + } + + if (fl_string_compare(string, f_status_access_not_s, length, F_status_access_not_s_length) == F_equal_to) { + *code = F_access_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_access_owner_s, length, F_status_access_owner_s_length) == F_equal_to) { + *code = F_access_owner; + + return F_none; + } + #endif // _di_F_status_access_ + + #ifndef _di_F_status_terminal_ + if (fl_string_compare(string, f_status_terminal_s, length, F_status_terminal_s_length) == F_equal_to) { + *code = F_terminal; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminal_access_s, length, F_status_terminal_access_s_length) == F_equal_to) { + *code = F_terminal_access; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminal_known_s, length, F_status_terminal_known_s_length) == F_equal_to) { + *code = F_terminal_known; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminal_known_not_s, length, F_status_terminal_known_not_s_length) == F_equal_to) { + *code = F_terminal_known_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminal_not_s, length, F_status_terminal_not_s_length) == F_equal_to) { + *code = F_terminal_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminal_prohibited_s, length, F_status_terminal_prohibited_s_length) == F_equal_to) { + *code = F_terminal_prohibited; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminal_read_s, length, F_status_terminal_read_s_length) == F_equal_to) { + *code = F_terminal_read; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminal_valid_s, length, F_status_terminal_valid_s_length) == F_equal_to) { + *code = F_terminal_valid; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminal_valid_not_s, length, F_status_terminal_valid_not_s_length) == F_equal_to) { + *code = F_terminal_valid_not; + + return F_none; + } + + if (fl_string_compare(string, f_status_terminal_write_s, length, F_status_terminal_write_s_length) == F_equal_to) { + *code = F_terminal_write; + + return F_none; + } + #endif // _di_F_status_terminal_ + + if (fl_string_compare(string, f_status_status_code_last_s, length, F_status_status_code_last_s_length) == F_equal_to) { + *code = F_status_code_last; + + return F_none; + } + + return F_status_set_error(F_data); + } +#endif // _di_fll_status_string_from_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_2/fll_status/c/status.h b/level_2/fll_status_string/c/status_string.h similarity index 81% rename from level_2/fll_status/c/status.h rename to level_2/fll_status_string/c/status_string.h index de497ff..b7eba66 100644 --- a/level_2/fll_status/c/status.h +++ b/level_2/fll_status_string/c/status_string.h @@ -7,8 +7,8 @@ * * Provides status code functions, such as those that translate status codes into strings. */ -#ifndef _FLL_status_h -#define _FLL_status_h +#ifndef _FLL_status_string_h +#define _FLL_status_string_h // fll-0 includes #include @@ -17,10 +17,10 @@ #include #include #include +#include // fll-1 includes #include -#include #ifdef __cplusplus extern "C" { @@ -47,12 +47,12 @@ extern "C" { * * Errors (with error bit) from: f_conversion_character_is_decimal(). */ -#ifndef _di_fll_status_from_string_ - extern f_status_t fll_status_from_string(const f_string_t string, f_status_t *code); -#endif // _di_fll_status_to_string_ +#ifndef _di_fll_status_string_from_ + extern f_status_t fll_status_string_from(const f_string_t string, f_status_t *code); +#endif // _di_fll_status_string_to_ #ifdef __cplusplus } // extern "C" #endif -#endif // _FLL_status_h +#endif // _FLL_status_string_h diff --git a/level_2/fll_status_string/data/build/defines b/level_2/fll_status_string/data/build/defines new file mode 100644 index 0000000..c665317 --- /dev/null +++ b/level_2/fll_status_string/data/build/defines @@ -0,0 +1,2 @@ +# fss-0000 + diff --git a/level_2/fll_status/data/build/dependencies b/level_2/fll_status_string/data/build/dependencies similarity index 82% rename from level_2/fll_status/data/build/dependencies rename to level_2/fll_status_string/data/build/dependencies index 2910b21..524d951 100644 --- a/level_2/fll_status/data/build/dependencies +++ b/level_2/fll_status_string/data/build/dependencies @@ -6,5 +6,5 @@ f_memory f_string f_utf f_conversion -fl_status +f_status_string fl_string diff --git a/level_2/fll_status/data/build/settings b/level_2/fll_status_string/data/build/settings similarity index 86% rename from level_2/fll_status/data/build/settings rename to level_2/fll_status_string/data/build/settings index 818c6ce..bb05c47 100644 --- a/level_2/fll_status/data/build/settings +++ b/level_2/fll_status_string/data/build/settings @@ -1,6 +1,6 @@ # fss-0001 -project_name fll_status +project_name fll_status_string version_major 0 version_minor 5 @@ -21,16 +21,16 @@ build_indexer ar build_indexer_arguments rcs build_language c build_libraries -lc -build_libraries-individual -lfl_status -lfl_string -lf_conversion -lf_memory -lf_string -lf_utf +build_libraries-individual -lfl_string -lf_conversion -lf_memory -lf_status_string -lf_string -lf_utf build_libraries_shared build_libraries_static -build_sources_library status.c +build_sources_library status_string.c build_sources_library_shared build_sources_library_static build_sources_program build_sources_program_shared build_sources_program_static -build_sources_headers status.h +build_sources_headers status_string.h build_sources_headers_shared build_sources_headers_static build_sources_script diff --git a/level_3/byte_dump/c/byte_dump.c b/level_3/byte_dump/c/byte_dump.c index 063263a..485fc5e 100644 --- a/level_3/byte_dump/c/byte_dump.c +++ b/level_3/byte_dump/c/byte_dump.c @@ -82,7 +82,7 @@ extern "C" { // Identify priority of color parameters. { - f_console_parameter_id_t ids[3] = { byte_dump_parameter_no_color, byte_dump_parameter_light, byte_dump_parameter_dark }; + f_console_parameter_id_t ids[3] = { byte_dump_parameter_no_color_e, byte_dump_parameter_light_e, byte_dump_parameter_dark_e }; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3); status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context); @@ -118,7 +118,7 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { byte_dump_parameter_verbosity_quiet, byte_dump_parameter_verbosity_normal, byte_dump_parameter_verbosity_verbose, byte_dump_parameter_verbosity_debug }; + f_console_parameter_id_t ids[4] = { byte_dump_parameter_verbosity_quiet_e, byte_dump_parameter_verbosity_normal_e, byte_dump_parameter_verbosity_verbose_e, byte_dump_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); @@ -132,32 +132,32 @@ extern "C" { return status; } - if (choice == byte_dump_parameter_verbosity_quiet) { - main->output.verbosity = f_console_verbosity_quiet; - main->error.verbosity = f_console_verbosity_quiet; - main->warning.verbosity = f_console_verbosity_quiet; + if (choice == byte_dump_parameter_verbosity_quiet_e) { + main->output.verbosity = f_console_verbosity_quiet_e; + main->error.verbosity = f_console_verbosity_quiet_e; + main->warning.verbosity = f_console_verbosity_quiet_e; } - else if (choice == byte_dump_parameter_verbosity_normal) { - main->output.verbosity = f_console_verbosity_normal; - main->error.verbosity = f_console_verbosity_normal; - main->warning.verbosity = f_console_verbosity_normal; + else if (choice == byte_dump_parameter_verbosity_normal_e) { + main->output.verbosity = f_console_verbosity_normal_e; + main->error.verbosity = f_console_verbosity_normal_e; + main->warning.verbosity = f_console_verbosity_normal_e; } - else if (choice == byte_dump_parameter_verbosity_verbose) { - main->output.verbosity = f_console_verbosity_verbose; - main->error.verbosity = f_console_verbosity_verbose; - main->warning.verbosity = f_console_verbosity_verbose; + else if (choice == byte_dump_parameter_verbosity_verbose_e) { + main->output.verbosity = f_console_verbosity_verbose_e; + main->error.verbosity = f_console_verbosity_verbose_e; + main->warning.verbosity = f_console_verbosity_verbose_e; } - else if (choice == byte_dump_parameter_verbosity_debug) { - main->output.verbosity = f_console_verbosity_debug; - main->error.verbosity = f_console_verbosity_debug; - main->warning.verbosity = f_console_verbosity_debug; + else if (choice == byte_dump_parameter_verbosity_debug_e) { + main->output.verbosity = f_console_verbosity_debug_e; + main->error.verbosity = f_console_verbosity_debug_e; + main->warning.verbosity = f_console_verbosity_debug_e; } } // Identify priority of mode parameters. { - f_console_parameter_id_t ids[5] = { byte_dump_parameter_hexidecimal, byte_dump_parameter_duodecimal, byte_dump_parameter_octal, byte_dump_parameter_binary, byte_dump_parameter_decimal }; - f_console_parameter_id_t choice = byte_dump_parameter_hexidecimal; + f_console_parameter_id_t ids[5] = { byte_dump_parameter_hexidecimal_e, byte_dump_parameter_duodecimal_e, byte_dump_parameter_octal_e, byte_dump_parameter_binary_e, byte_dump_parameter_decimal_e }; + f_console_parameter_id_t choice = byte_dump_parameter_hexidecimal_e; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5); status = f_console_parameter_prioritize_right(parameters, choices, &choice); @@ -169,27 +169,27 @@ extern "C" { return F_status_set_error(status); } - if (choice == byte_dump_parameter_hexidecimal) { - main->mode = byte_dump_mode_hexidecimal; + if (choice == byte_dump_parameter_hexidecimal_e) { + main->mode = byte_dump_mode_hexidecimal_e; } - else if (choice == byte_dump_parameter_duodecimal) { - main->mode = byte_dump_mode_duodecimal; + else if (choice == byte_dump_parameter_duodecimal_e) { + main->mode = byte_dump_mode_duodecimal_e; } - else if (choice == byte_dump_parameter_octal) { - main->mode = byte_dump_mode_octal; + else if (choice == byte_dump_parameter_octal_e) { + main->mode = byte_dump_mode_octal_e; } - else if (choice == byte_dump_parameter_binary) { - main->mode = byte_dump_mode_binary; + else if (choice == byte_dump_parameter_binary_e) { + main->mode = byte_dump_mode_binary_e; } - else if (choice == byte_dump_parameter_decimal) { - main->mode = byte_dump_mode_decimal; + else if (choice == byte_dump_parameter_decimal_e) { + main->mode = byte_dump_mode_decimal_e; } } // Identify priority of presentation parameters. { - f_console_parameter_id_t ids[3] = { byte_dump_parameter_normal, byte_dump_parameter_simple, byte_dump_parameter_classic }; - f_console_parameter_id_t choice = byte_dump_parameter_normal; + f_console_parameter_id_t ids[3] = { byte_dump_parameter_normal_e, byte_dump_parameter_simple_e, byte_dump_parameter_classic_e }; + f_console_parameter_id_t choice = byte_dump_parameter_normal_e; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3); status = f_console_parameter_prioritize_right(parameters, choices, &choice); @@ -201,21 +201,21 @@ extern "C" { return F_status_set_error(status); } - if (choice == byte_dump_parameter_normal) { - main->presentation = byte_dump_presentation_normal; + if (choice == byte_dump_parameter_normal_e) { + main->presentation = byte_dump_presentation_normal_e; } - else if (choice == byte_dump_parameter_simple) { - main->presentation = byte_dump_presentation_simple; + else if (choice == byte_dump_parameter_simple_e) { + main->presentation = byte_dump_presentation_simple_e; } - else if (choice == byte_dump_parameter_classic) { - main->presentation = byte_dump_presentation_classic; + else if (choice == byte_dump_parameter_classic_e) { + main->presentation = byte_dump_presentation_classic_e; } } // Identify priority of narrow and wide parameters. { - f_console_parameter_id_t ids[2] = { byte_dump_parameter_narrow, byte_dump_parameter_wide }; - f_console_parameter_id_t choice = byte_dump_parameter_wide; + f_console_parameter_id_t ids[2] = { byte_dump_parameter_narrow_e, byte_dump_parameter_wide_e }; + f_console_parameter_id_t choice = byte_dump_parameter_wide_e; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 2); status = f_console_parameter_prioritize_right(parameters, choices, &choice); @@ -227,12 +227,12 @@ extern "C" { return F_status_set_error(status); } - if (choice == byte_dump_parameter_narrow) { + if (choice == byte_dump_parameter_narrow_e) { if (main->options & byte_dump_option_wide_d) { main->options -= byte_dump_option_wide_d; } } - else if (choice == byte_dump_parameter_wide) { + else if (choice == byte_dump_parameter_wide_e) { main->options |= byte_dump_option_wide_d; } } @@ -240,7 +240,7 @@ extern "C" { status = F_none; } - if (main->parameters[byte_dump_parameter_help].result == f_console_result_found) { + if (main->parameters[byte_dump_parameter_help_e].result == f_console_result_found_e) { byte_dump_print_help(main->output.to, main->context); byte_dump_main_delete(main); @@ -248,7 +248,7 @@ extern "C" { return F_none; } - if (main->parameters[byte_dump_parameter_version].result == f_console_result_found) { + if (main->parameters[byte_dump_parameter_version_e].result == f_console_result_found_e) { fll_program_print_version(main->output.to, byte_dump_version_s); byte_dump_main_delete(main); @@ -257,7 +257,7 @@ extern "C" { } if (main->remaining.used > 0 || main->process_pipe) { - if (main->parameters[byte_dump_parameter_width].result == f_console_result_found) { + if (main->parameters[byte_dump_parameter_width_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%[%SThe parameter '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error); @@ -270,8 +270,8 @@ extern "C" { return F_status_set_error(status); } - else if (main->parameters[byte_dump_parameter_width].result == f_console_result_additional) { - const f_array_length_t index = main->parameters[byte_dump_parameter_width].values.array[main->parameters[byte_dump_parameter_width].values.used - 1]; + else if (main->parameters[byte_dump_parameter_width_e].result == f_console_result_additional_e) { + const f_array_length_t index = main->parameters[byte_dump_parameter_width_e].values.array[main->parameters[byte_dump_parameter_width_e].values.used - 1]; const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[index])); f_number_unsigned_t number = 0; @@ -298,7 +298,7 @@ extern "C" { main->width = (uint8_t) number; } - if (main->parameters[byte_dump_parameter_first].result == f_console_result_found) { + if (main->parameters[byte_dump_parameter_first_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%[%SThe parameter '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error); @@ -311,8 +311,8 @@ extern "C" { return F_status_set_error(status); } - else if (main->parameters[byte_dump_parameter_first].result == f_console_result_additional) { - const f_array_length_t index = main->parameters[byte_dump_parameter_first].values.array[main->parameters[byte_dump_parameter_first].values.used - 1]; + else if (main->parameters[byte_dump_parameter_first_e].result == f_console_result_additional_e) { + const f_array_length_t index = main->parameters[byte_dump_parameter_first_e].values.array[main->parameters[byte_dump_parameter_first_e].values.used - 1]; const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[index])); f_number_unsigned_t number = 0; @@ -340,7 +340,7 @@ extern "C" { main->first = number; } - if (main->parameters[byte_dump_parameter_last].result == f_console_result_found) { + if (main->parameters[byte_dump_parameter_last_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%[%SThe parameter '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error); @@ -353,8 +353,8 @@ extern "C" { return F_status_set_error(status); } - else if (main->parameters[byte_dump_parameter_last].result == f_console_result_additional) { - const f_array_length_t index = main->parameters[byte_dump_parameter_last].values.array[main->parameters[byte_dump_parameter_last].values.used - 1]; + else if (main->parameters[byte_dump_parameter_last_e].result == f_console_result_additional_e) { + const f_array_length_t index = main->parameters[byte_dump_parameter_last_e].values.array[main->parameters[byte_dump_parameter_last_e].values.used - 1]; const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[index])); f_number_unsigned_t number = 0; @@ -382,7 +382,7 @@ extern "C" { main->last = number; } - if (main->parameters[byte_dump_parameter_first].result == f_console_result_additional && main->parameters[byte_dump_parameter_last].result == f_console_result_additional) { + if (main->parameters[byte_dump_parameter_first_e].result == f_console_result_additional_e && main->parameters[byte_dump_parameter_last_e].result == f_console_result_additional_e) { if (main->first > main->last) { flockfile(main->error.to.stream); @@ -414,19 +414,19 @@ extern "C" { f_print_terminated(f_string_eol_s, main->output.to.stream); fl_print_format("%[Piped Byte Dump: (in ", main->output.to.stream, main->context.set.title); - if (main->mode == byte_dump_mode_hexidecimal) { + if (main->mode == byte_dump_mode_hexidecimal_e) { f_print_terminated("Hexidecimal", main->output.to.stream); } - else if (main->mode == byte_dump_mode_duodecimal) { + else if (main->mode == byte_dump_mode_duodecimal_e) { f_print_terminated("Duodecimal", main->output.to.stream); } - else if (main->mode == byte_dump_mode_octal) { + else if (main->mode == byte_dump_mode_octal_e) { f_print_terminated("Octal", main->output.to.stream); } - else if (main->mode == byte_dump_mode_binary) { + else if (main->mode == byte_dump_mode_binary_e) { f_print_terminated("Binary", main->output.to.stream); } - else if (main->mode == byte_dump_mode_decimal) { + else if (main->mode == byte_dump_mode_decimal_e) { f_print_terminated("Decimal", main->output.to.stream); } @@ -462,7 +462,7 @@ extern "C" { missing_files = status; } - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_exists", F_true, arguments->argv[main->remaining.array[counter]], "open", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_exists", F_true, arguments->argv[main->remaining.array[counter]], "open", fll_error_file_type_file_e); } } // for @@ -482,7 +482,7 @@ extern "C" { status = f_file_stream_open(arguments->argv[main->remaining.array[counter]], 0, &file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, arguments->argv[main->remaining.array[counter]], "open", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, arguments->argv[main->remaining.array[counter]], "open", fll_error_file_type_file_e); byte_dump_main_delete(main); @@ -495,19 +495,19 @@ extern "C" { fl_print_format("%[Byte Dump of: %]%[", main->output.to.stream, main->context.set.title, main->context.set.title, main->context.set.notable); fl_print_format("%S%] %[(in ", main->output.to.stream, arguments->argv[main->remaining.array[counter]], main->context.set.notable, main->context.set.title); - if (main->mode == byte_dump_mode_hexidecimal) { + if (main->mode == byte_dump_mode_hexidecimal_e) { f_print_terminated("Hexidecimal", main->output.to.stream); } - else if (main->mode == byte_dump_mode_duodecimal) { + else if (main->mode == byte_dump_mode_duodecimal_e) { f_print_terminated("Duodecimal", main->output.to.stream); } - else if (main->mode == byte_dump_mode_octal) { + else if (main->mode == byte_dump_mode_octal_e) { f_print_terminated("Octal", main->output.to.stream); } - else if (main->mode == byte_dump_mode_binary) { + else if (main->mode == byte_dump_mode_binary_e) { f_print_terminated("Binary", main->output.to.stream); } - else if (main->mode == byte_dump_mode_decimal) { + else if (main->mode == byte_dump_mode_decimal_e) { f_print_terminated("Decimal", main->output.to.stream); } @@ -523,15 +523,15 @@ extern "C" { if (F_status_set_fine(status) == F_interrupt) { // Ensure a newline is always put at the end of the program execution, unless in quiet mode. - if (main->output.verbosity != f_console_verbosity_quiet) { + if (main->output.verbosity != f_console_verbosity_quiet_e) { fflush(main->output.to.stream); fll_print_terminated(f_string_eol_s, main->output.to.stream); } } else { - if (main->error.verbosity != f_console_verbosity_quiet) { - fll_error_file_print(main->error, F_status_set_fine(status), "byte_dump_file", F_true, arguments->argv[main->remaining.array[counter]], "process", fll_error_file_type_file); + if (main->error.verbosity != f_console_verbosity_quiet_e) { + fll_error_file_print(main->error, F_status_set_fine(status), "byte_dump_file", F_true, arguments->argv[main->remaining.array[counter]], "process", fll_error_file_type_file_e); } } diff --git a/level_3/byte_dump/c/byte_dump.h b/level_3/byte_dump/c/byte_dump.h index a22b372..20a3dde 100644 --- a/level_3/byte_dump/c/byte_dump.h +++ b/level_3/byte_dump/c/byte_dump.h @@ -78,19 +78,34 @@ extern "C" { #define byte_dump_default_allocation_step_d 4 #endif // _di_byte_dump_default_allocation_step_ +/** + * Byte Dump defines. + * + * byte_dump_mode_*: + * - hexidecimal: Display using hexidecimal notation (base 16). + * - duodecimal: Display using duodecimal notation (base 12). + * - octal: Display using octal notation (base 8). + * - binary: Display using binary notation (base 2). + * - decimal: Display using decimal notation (base 10). + * + * byte_dump_presentation_*: + * - normal: Normal presentation mode. + * - simple: Simple presentation mode. + * - classic: Classic presentation mode. + */ #ifndef _di_byte_dump_defines_ enum { - byte_dump_mode_hexidecimal = 1, - byte_dump_mode_duodecimal, - byte_dump_mode_octal, - byte_dump_mode_binary, - byte_dump_mode_decimal, + byte_dump_mode_hexidecimal_e = 1, + byte_dump_mode_duodecimal_e, + byte_dump_mode_octal_e, + byte_dump_mode_binary_e, + byte_dump_mode_decimal_e, }; enum { - byte_dump_presentation_normal = 1, - byte_dump_presentation_simple, - byte_dump_presentation_classic, + byte_dump_presentation_normal_e = 1, + byte_dump_presentation_simple_e, + byte_dump_presentation_classic_e, }; #define byte_dump_option_wide_d 0x1 @@ -175,64 +190,64 @@ extern "C" { #define byte_dump_long_classic_s "classic" // Use classic presentation, displaying periods for ASCII special codes instead of UTF-8 sequence codes. enum { - byte_dump_parameter_help, - byte_dump_parameter_light, - byte_dump_parameter_dark, - byte_dump_parameter_no_color, - byte_dump_parameter_verbosity_quiet, - byte_dump_parameter_verbosity_normal, - byte_dump_parameter_verbosity_verbose, - byte_dump_parameter_verbosity_debug, - byte_dump_parameter_version, - - byte_dump_parameter_binary, - byte_dump_parameter_decimal, - byte_dump_parameter_duodecimal, - byte_dump_parameter_hexidecimal, - byte_dump_parameter_octal, - byte_dump_parameter_unicode, - - byte_dump_parameter_first, - byte_dump_parameter_last, - - byte_dump_parameter_narrow, - byte_dump_parameter_placeholder, - byte_dump_parameter_text, - byte_dump_parameter_wide, - byte_dump_parameter_width, - - byte_dump_parameter_normal, - byte_dump_parameter_simple, - byte_dump_parameter_classic, + byte_dump_parameter_help_e, + byte_dump_parameter_light_e, + byte_dump_parameter_dark_e, + byte_dump_parameter_no_color_e, + byte_dump_parameter_verbosity_quiet_e, + byte_dump_parameter_verbosity_normal_e, + byte_dump_parameter_verbosity_verbose_e, + byte_dump_parameter_verbosity_debug_e, + byte_dump_parameter_version_e, + + byte_dump_parameter_binary_e, + byte_dump_parameter_decimal_e, + byte_dump_parameter_duodecimal_e, + byte_dump_parameter_hexidecimal_e, + byte_dump_parameter_octal_e, + byte_dump_parameter_unicode_e, + + byte_dump_parameter_first_e, + byte_dump_parameter_last_e, + + byte_dump_parameter_narrow_e, + byte_dump_parameter_placeholder_e, + byte_dump_parameter_text_e, + byte_dump_parameter_wide_e, + byte_dump_parameter_width_e, + + byte_dump_parameter_normal_e, + byte_dump_parameter_simple_e, + byte_dump_parameter_classic_e, }; #define byte_dump_console_parameter_t_initialize \ { \ - 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_s, byte_dump_long_binary_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(byte_dump_short_decimal_s, byte_dump_long_decimal_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(byte_dump_short_duodecimal_s, byte_dump_long_duodecimal_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(byte_dump_short_hexidecimal_s, byte_dump_long_hexidecimal_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(byte_dump_short_octal_s, byte_dump_long_octal_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(byte_dump_short_unicode_s, byte_dump_long_unicode_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(byte_dump_short_first_s, byte_dump_long_first_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(byte_dump_short_last_s, byte_dump_long_last_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(byte_dump_short_narrow_s, byte_dump_long_narrow_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(byte_dump_short_placeholder_s, byte_dump_long_placeholder_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(byte_dump_short_text_s, byte_dump_long_text_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(byte_dump_short_wide_s, byte_dump_long_wide_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(byte_dump_short_width_s, byte_dump_long_width_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(0, byte_dump_long_normal_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(0, byte_dump_long_simple_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(0, byte_dump_long_classic_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse_e), \ + 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_e), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(byte_dump_short_binary_s, byte_dump_long_binary_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(byte_dump_short_decimal_s, byte_dump_long_decimal_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(byte_dump_short_duodecimal_s, byte_dump_long_duodecimal_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(byte_dump_short_hexidecimal_s, byte_dump_long_hexidecimal_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(byte_dump_short_octal_s, byte_dump_long_octal_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(byte_dump_short_unicode_s, byte_dump_long_unicode_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(byte_dump_short_first_s, byte_dump_long_first_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(byte_dump_short_last_s, byte_dump_long_last_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(byte_dump_short_narrow_s, byte_dump_long_narrow_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(byte_dump_short_placeholder_s, byte_dump_long_placeholder_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(byte_dump_short_text_s, byte_dump_long_text_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(byte_dump_short_wide_s, byte_dump_long_wide_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(byte_dump_short_width_s, byte_dump_long_width_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(0, byte_dump_long_normal_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(0, byte_dump_long_simple_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(0, byte_dump_long_classic_s, 0, 0, f_console_type_normal_e), \ } #define byte_dump_total_parameters_d 25 @@ -274,8 +289,8 @@ extern "C" { 0, \ 8, \ byte_dump_option_wide_d, \ - byte_dump_mode_hexidecimal, \ - byte_dump_presentation_normal, \ + byte_dump_mode_hexidecimal_e, \ + byte_dump_presentation_normal_e, \ f_color_context_t_initialize, \ } #endif // _di_byte_dump_main_t_ diff --git a/level_3/byte_dump/c/private-byte_dump.c b/level_3/byte_dump/c/private-byte_dump.c index 955b25a..27db565 100644 --- a/level_3/byte_dump/c/private-byte_dump.c +++ b/level_3/byte_dump/c/private-byte_dump.c @@ -204,54 +204,54 @@ extern "C" { while (cell.column < main->width) { - if (main->parameters[byte_dump_parameter_unicode].result == f_console_result_found) { + if (main->parameters[byte_dump_parameter_unicode_e].result == f_console_result_found_e) { f_print_terminated(" ", main->output.to.stream); } - else if (main->mode == byte_dump_mode_hexidecimal) { + else if (main->mode == byte_dump_mode_hexidecimal_e) { f_print_terminated(" ", main->output.to.stream); } - else if (main->mode == byte_dump_mode_duodecimal) { + else if (main->mode == byte_dump_mode_duodecimal_e) { f_print_terminated(" ", main->output.to.stream); } - else if (main->mode == byte_dump_mode_octal) { + else if (main->mode == byte_dump_mode_octal_e) { f_print_terminated(" ", main->output.to.stream); } - else if (main->mode == byte_dump_mode_binary) { + else if (main->mode == byte_dump_mode_binary_e) { f_print_terminated(" ", main->output.to.stream); } - else if (main->mode == byte_dump_mode_decimal) { + else if (main->mode == byte_dump_mode_decimal_e) { f_print_terminated(" ", main->output.to.stream); } ++cell.column; if (cell.column < main->width) { - if (main->parameters[byte_dump_parameter_unicode].result == f_console_result_found) { + if (main->parameters[byte_dump_parameter_unicode_e].result == f_console_result_found_e) { if (!(cell.column % 4)) { f_print_character(f_string_space_s[0], main->output.to.stream); } } - else if (main->mode == byte_dump_mode_hexidecimal) { + else if (main->mode == byte_dump_mode_hexidecimal_e) { if (!(cell.column % 8)) { f_print_character(f_string_space_s[0], main->output.to.stream); } } - else if (main->mode == byte_dump_mode_duodecimal) { + else if (main->mode == byte_dump_mode_duodecimal_e) { if (!(cell.column % 6)) { f_print_character(f_string_space_s[0], main->output.to.stream); } } - else if (main->mode == byte_dump_mode_octal) { + else if (main->mode == byte_dump_mode_octal_e) { if (!(cell.column % 6)) { f_print_character(f_string_space_s[0], main->output.to.stream); } } - else if (main->mode == byte_dump_mode_binary) { + else if (main->mode == byte_dump_mode_binary_e) { if (!(cell.column % 6)) { f_print_character(f_string_space_s[0], main->output.to.stream); } } - else if (main->mode == byte_dump_mode_decimal) { + else if (main->mode == byte_dump_mode_decimal_e) { if (!(cell.column % 6)) { f_print_character(f_string_space_s[0], main->output.to.stream); } @@ -259,7 +259,7 @@ extern "C" { } } // while - if (main->parameters[byte_dump_parameter_text].result == f_console_result_found) { + if (main->parameters[byte_dump_parameter_text_e].result == f_console_result_found_e) { byte_dump_print_text(main, characters, invalid, &previous, &offset); } else { @@ -334,22 +334,22 @@ extern "C" { // Pad the buffer with spaces to hide any skipped bytes (skipped via --first). while (offset_to_print && cell->column < main->width) { - if (main->parameters[byte_dump_parameter_unicode].result == f_console_result_found) { + if (main->parameters[byte_dump_parameter_unicode_e].result == f_console_result_found_e) { f_print_terminated(" ", main->output.to.stream); } - else if (main->mode == byte_dump_mode_hexidecimal) { + else if (main->mode == byte_dump_mode_hexidecimal_e) { f_print_terminated(" ", main->output.to.stream); } - else if (main->mode == byte_dump_mode_duodecimal) { + else if (main->mode == byte_dump_mode_duodecimal_e) { f_print_terminated(" ", main->output.to.stream); } - else if (main->mode == byte_dump_mode_octal) { + else if (main->mode == byte_dump_mode_octal_e) { f_print_terminated(" ", main->output.to.stream); } - else if (main->mode == byte_dump_mode_binary) { + else if (main->mode == byte_dump_mode_binary_e) { f_print_terminated(" ", main->output.to.stream); } - else if (main->mode == byte_dump_mode_decimal) { + else if (main->mode == byte_dump_mode_decimal_e) { f_print_terminated(" ", main->output.to.stream); } @@ -357,32 +357,32 @@ extern "C" { ++cell->column; if (cell->column < main->width) { - if (main->parameters[byte_dump_parameter_unicode].result == f_console_result_found) { + if (main->parameters[byte_dump_parameter_unicode_e].result == f_console_result_found_e) { if (!(cell->column % 4)) { f_print_character(f_string_space_s[0], main->output.to.stream); } } - else if (main->mode == byte_dump_mode_hexidecimal) { + else if (main->mode == byte_dump_mode_hexidecimal_e) { if (!(cell->column % 8)) { f_print_character(f_string_space_s[0], main->output.to.stream); } } - else if (main->mode == byte_dump_mode_duodecimal) { + else if (main->mode == byte_dump_mode_duodecimal_e) { if (!(cell->column % 6)) { f_print_character(f_string_space_s[0], main->output.to.stream); } } - else if (main->mode == byte_dump_mode_octal) { + else if (main->mode == byte_dump_mode_octal_e) { if (!(cell->column % 6)) { f_print_character(f_string_space_s[0], main->output.to.stream); } } - else if (main->mode == byte_dump_mode_binary) { + else if (main->mode == byte_dump_mode_binary_e) { if (!(cell->column % 4)) { f_print_character(f_string_space_s[0], main->output.to.stream); } } - else if (main->mode == byte_dump_mode_decimal) { + else if (main->mode == byte_dump_mode_decimal_e) { if (!(cell->column % 6)) { f_print_character(f_string_space_s[0], main->output.to.stream); } @@ -393,7 +393,7 @@ extern "C" { } if (cell->column < main->width) { - if (main->parameters[byte_dump_parameter_unicode].result == f_console_result_found && !invalid[character_current]) { + if (main->parameters[byte_dump_parameter_unicode_e].result == f_console_result_found_e && !invalid[character_current]) { if (byte_current == 1) { uint32_t unicode = 0; @@ -438,8 +438,8 @@ extern "C" { } } else { - if (main->mode == byte_dump_mode_hexidecimal) { - if (main->parameters[byte_dump_parameter_unicode].result == f_console_result_found) { + if (main->mode == byte_dump_mode_hexidecimal_e) { + if (main->parameters[byte_dump_parameter_unicode_e].result == f_console_result_found_e) { f_print_terminated(" ", main->output.to.stream); } @@ -450,8 +450,8 @@ extern "C" { fl_print_format(" %02_uii", main->output.to.stream, (uint8_t) byte); } } - else if (main->mode == byte_dump_mode_duodecimal) { - if (main->parameters[byte_dump_parameter_unicode].result == f_console_result_found) { + else if (main->mode == byte_dump_mode_duodecimal_e) { + if (main->parameters[byte_dump_parameter_unicode_e].result == f_console_result_found_e) { f_print_terminated(" ", main->output.to.stream); } @@ -462,8 +462,8 @@ extern "C" { fl_print_format(" %03&uii", main->output.to.stream, (uint8_t) byte); } } - else if (main->mode == byte_dump_mode_octal) { - if (main->parameters[byte_dump_parameter_unicode].result == f_console_result_found) { + else if (main->mode == byte_dump_mode_octal_e) { + if (main->parameters[byte_dump_parameter_unicode_e].result == f_console_result_found_e) { f_print_terminated(" ", main->output.to.stream); } @@ -474,7 +474,7 @@ extern "C" { fl_print_format(" %03@uii", main->output.to.stream, (uint8_t) byte); } } - else if (main->mode == byte_dump_mode_binary) { + else if (main->mode == byte_dump_mode_binary_e) { if (invalid[character_current]) { fl_print_format(" %[%08!uii%]", main->output.to.stream, main->context.set.error, (uint8_t) byte, main->context.set.error); } @@ -482,8 +482,8 @@ extern "C" { fl_print_format(" %08!uii", main->output.to.stream, (uint8_t) byte); } } - else if (main->mode == byte_dump_mode_decimal) { - if (main->parameters[byte_dump_parameter_unicode].result == f_console_result_found) { + else if (main->mode == byte_dump_mode_decimal_e) { + if (main->parameters[byte_dump_parameter_unicode_e].result == f_console_result_found_e) { f_print_terminated(" ", main->output.to.stream); } @@ -508,7 +508,7 @@ extern "C" { reset = F_true; - if (main->parameters[byte_dump_parameter_text].result == f_console_result_found) { + if (main->parameters[byte_dump_parameter_text_e].result == f_console_result_found_e) { byte_dump_print_text(main, characters, invalid, previous, offset); } else { @@ -528,32 +528,32 @@ extern "C" { } } else { - if (main->parameters[byte_dump_parameter_unicode].result == f_console_result_found) { + if (main->parameters[byte_dump_parameter_unicode_e].result == f_console_result_found_e) { if (!(cell->column % 4)) { f_print_character(f_string_space_s[0], main->output.to.stream); } } - else if (main->mode == byte_dump_mode_hexidecimal) { + else if (main->mode == byte_dump_mode_hexidecimal_e) { if (!(cell->column % 8)) { f_print_character(f_string_space_s[0], main->output.to.stream); } } - else if (main->mode == byte_dump_mode_duodecimal) { + else if (main->mode == byte_dump_mode_duodecimal_e) { if (!(cell->column % 6)) { f_print_character(f_string_space_s[0], main->output.to.stream); } } - else if (main->mode == byte_dump_mode_octal) { + else if (main->mode == byte_dump_mode_octal_e) { if (!(cell->column % 6)) { f_print_character(f_string_space_s[0], main->output.to.stream); } } - else if (main->mode == byte_dump_mode_binary) { + else if (main->mode == byte_dump_mode_binary_e) { if (!(cell->column % 4)) { f_print_character(f_string_space_s[0], main->output.to.stream); } } - else if (main->mode == byte_dump_mode_decimal) { + else if (main->mode == byte_dump_mode_decimal_e) { if (!(cell->column % 6)) { f_print_character(f_string_space_s[0], main->output.to.stream); } @@ -577,7 +577,7 @@ extern "C" { fl_print_format(" %[%s%] ", main->output.to.stream, main->context.set.notable, byte_dump_character_wall_s, main->context.set.notable); if (*offset) { - if (main->parameters[byte_dump_parameter_classic].result == f_console_result_found) { + if (main->parameters[byte_dump_parameter_classic_e].result == f_console_result_found_e) { while (*offset && at < main->width) { f_print_character(f_string_ascii_period_s[0], main->output.to.stream); @@ -591,7 +591,7 @@ extern "C" { } // while } else { - if (main->parameters[byte_dump_parameter_placeholder].result == f_console_result_found) { + if (main->parameters[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) { for (; *offset && at < main->width; --(*offset), ++at) { fl_print_format("%[%s%]", main->output.to.stream, main->context.set.warning, byte_dump_character_placeholder_s, main->context.set.warning); @@ -623,13 +623,13 @@ extern "C" { } if (previous->bytes) { - if (main->parameters[byte_dump_parameter_placeholder].result == f_console_result_found) { + if (main->parameters[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) { for (; at < previous->bytes && at < main->width; ++at) { if (previous->invalid) { fl_print_format("%[%s%]", main->output.to.stream, main->context.set.error, byte_dump_character_placeholder_s, main->context.set.error); } - else if (main->parameters[byte_dump_parameter_classic].result == f_console_result_found) { + else if (main->parameters[byte_dump_parameter_classic_e].result == f_console_result_found_e) { f_print_character(f_string_ascii_period_s[0], main->output.to.stream); } else { @@ -675,7 +675,7 @@ extern "C" { } } else if (f_utf_character_is_control(characters.string[i]) == F_true) { - if (main->presentation == byte_dump_presentation_normal) { + if (main->presentation == byte_dump_presentation_normal_e) { fl_print_format("%[%[", main->output.to.stream, main->context.set.notable, main->context.set.warning); if (width_utf) { @@ -717,7 +717,7 @@ extern "C" { } } else { - if (main->presentation == byte_dump_presentation_simple) { + if (main->presentation == byte_dump_presentation_simple_e) { f_print_character(f_string_space_s[0], main->output.to.stream); if (width_utf > 1) { @@ -732,7 +732,7 @@ extern "C" { } } } - else if (main->presentation == byte_dump_presentation_classic) { + else if (main->presentation == byte_dump_presentation_classic_e) { f_print_character(f_string_ascii_period_s[0], main->output.to.stream); if (width_utf > 1) { @@ -754,7 +754,7 @@ extern "C" { } } else if (f_utf_character_is_whitespace(characters.string[i]) == F_true) { - if (main->parameters[byte_dump_parameter_classic].result == f_console_result_found) { + if (main->parameters[byte_dump_parameter_classic_e].result == f_console_result_found_e) { f_print_character(f_string_ascii_period_s[0], main->output.to.stream); } else { @@ -766,10 +766,10 @@ extern "C" { } } else if (f_utf_character_is_zero_width(characters.string[i]) == F_true) { - if (main->presentation == byte_dump_presentation_classic) { + if (main->presentation == byte_dump_presentation_classic_e) { f_print_character(f_string_ascii_period_s[0], main->output.to.stream); } - else if (main->parameters[byte_dump_parameter_placeholder].result == f_console_result_found) { + else if (main->parameters[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) { fl_print_format("%[%[%s%]%]", main->output.to.stream, main->context.set.notable, main->context.set.warning, byte_dump_character_placeholder_s, main->context.set.warning, main->context.set.notable); } else { @@ -877,11 +877,11 @@ extern "C" { // Print placeholders when using UTF-8 characters to simulate the spaces bytes used for the character. if (width_utf > 1 && at + 1 < main->width) { - if (main->parameters[byte_dump_parameter_placeholder].result == f_console_result_found) { + if (main->parameters[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) { if (invalid[i]) { fl_print_format("%[%s%]", main->output.to.stream, main->context.set.error, byte_dump_character_placeholder_s, main->context.set.error); } - else if (main->parameters[byte_dump_parameter_classic].result == f_console_result_found) { + else if (main->parameters[byte_dump_parameter_classic_e].result == f_console_result_found_e) { f_print_character(f_string_ascii_period_s[0], main->output.to.stream); } else { @@ -899,11 +899,11 @@ extern "C" { ++at; if (width_utf > 2 && at + 1 < main->width) { - if (main->parameters[byte_dump_parameter_placeholder].result == f_console_result_found) { + if (main->parameters[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) { if (invalid[i]) { fl_print_format("%[%s%]", main->output.to.stream, main->context.set.error, byte_dump_character_placeholder_s, main->context.set.error); } - else if (main->parameters[byte_dump_parameter_classic].result == f_console_result_found) { + else if (main->parameters[byte_dump_parameter_classic_e].result == f_console_result_found_e) { f_print_character(f_string_ascii_period_s[0], main->output.to.stream); } else { @@ -921,11 +921,11 @@ extern "C" { ++at; if (width_utf > 3 && at + 1 < main->width) { - if (main->parameters[byte_dump_parameter_placeholder].result == f_console_result_found) { + if (main->parameters[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) { if (invalid[i]) { fl_print_format("%[%s%]", main->output.to.stream, main->context.set.error, byte_dump_character_placeholder_s, main->context.set.error); } - else if (main->parameters[byte_dump_parameter_classic].result == f_console_result_found) { + else if (main->parameters[byte_dump_parameter_classic_e].result == f_console_result_found_e) { f_print_character(f_string_ascii_period_s[0], main->output.to.stream); } else { @@ -947,13 +947,13 @@ extern "C" { } // for // Print placeholder for the remaining parts of the line. - if (main->parameters[byte_dump_parameter_placeholder].result == f_console_result_found) { + if (main->parameters[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) { for (; at < main->width; ++at) { if (invalid[at]) { fl_print_format("%[%s%]", main->output.to.stream, main->context.set.error, byte_dump_character_placeholder_s, main->context.set.error); } - else if (main->parameters[byte_dump_parameter_classic].result == f_console_result_found) { + else if (main->parameters[byte_dump_parameter_classic_e].result == f_console_result_found_e) { f_print_character(f_string_ascii_period_s[0], main->output.to.stream); } else { diff --git a/level_3/byte_dump/c/private-common.c b/level_3/byte_dump/c/private-common.c index 1c2bf8a..5a2d1ac 100644 --- a/level_3/byte_dump/c/private-common.c +++ b/level_3/byte_dump/c/private-common.c @@ -8,7 +8,7 @@ extern "C" { #ifndef _di_byte_dump_print_signal_received_ void byte_dump_print_signal_received(byte_dump_main_t * const main, const f_status_t signal) { - if (main->warning.verbosity != f_console_verbosity_verbose) return; + if (main->warning.verbosity != f_console_verbosity_verbose_e) return; // Must flush and reset color because the interrupt may have interrupted the middle of a print function. fflush(main->warning.to.stream); diff --git a/level_3/control/c/control.c b/level_3/control/c/control.c index a4c18eb..d8e4a8d 100644 --- a/level_3/control/c/control.c +++ b/level_3/control/c/control.c @@ -40,7 +40,7 @@ extern "C" { const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, control_total_parameters_d); { - f_console_parameter_id_t ids[3] = { control_parameter_no_color, control_parameter_light, control_parameter_dark }; + f_console_parameter_id_t ids[3] = { control_parameter_no_color_e, control_parameter_light_e, control_parameter_dark_e }; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3); status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context); @@ -66,7 +66,7 @@ extern "C" { } if (F_status_is_error(status)) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process", F_true); fll_print_terminated(f_string_eol_s, main->error.to.stream); } @@ -79,7 +79,7 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { control_parameter_verbosity_quiet, control_parameter_verbosity_normal, control_parameter_verbosity_verbose, control_parameter_verbosity_debug }; + f_console_parameter_id_t ids[4] = { control_parameter_verbosity_quiet_e, control_parameter_verbosity_normal_e, control_parameter_verbosity_verbose_e, control_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); @@ -91,32 +91,32 @@ extern "C" { return status; } - if (choice == control_parameter_verbosity_quiet) { - main->output.verbosity = f_console_verbosity_quiet; - main->error.verbosity = f_console_verbosity_quiet; - main->warning.verbosity = f_console_verbosity_quiet; + if (choice == control_parameter_verbosity_quiet_e) { + main->output.verbosity = f_console_verbosity_quiet_e; + main->error.verbosity = f_console_verbosity_quiet_e; + main->warning.verbosity = f_console_verbosity_quiet_e; } - else if (choice == control_parameter_verbosity_normal) { - main->output.verbosity = f_console_verbosity_normal; - main->error.verbosity = f_console_verbosity_normal; - main->warning.verbosity = f_console_verbosity_normal; + else if (choice == control_parameter_verbosity_normal_e) { + main->output.verbosity = f_console_verbosity_normal_e; + main->error.verbosity = f_console_verbosity_normal_e; + main->warning.verbosity = f_console_verbosity_normal_e; } - else if (choice == control_parameter_verbosity_verbose) { - main->output.verbosity = f_console_verbosity_verbose; - main->error.verbosity = f_console_verbosity_verbose; - main->warning.verbosity = f_console_verbosity_verbose; + else if (choice == control_parameter_verbosity_verbose_e) { + main->output.verbosity = f_console_verbosity_verbose_e; + main->error.verbosity = f_console_verbosity_verbose_e; + main->warning.verbosity = f_console_verbosity_verbose_e; } - else if (choice == control_parameter_verbosity_debug) { - main->output.verbosity = f_console_verbosity_debug; - main->error.verbosity = f_console_verbosity_debug; - main->warning.verbosity = f_console_verbosity_debug; + else if (choice == control_parameter_verbosity_debug_e) { + main->output.verbosity = f_console_verbosity_debug_e; + main->error.verbosity = f_console_verbosity_debug_e; + main->warning.verbosity = f_console_verbosity_debug_e; } } status = F_none; } - if (main->parameters[control_parameter_help].result == f_console_result_found) { + if (main->parameters[control_parameter_help_e].result == f_console_result_found_e) { control_print_help(main->output.to, main->context); control_main_delete(main); @@ -124,7 +124,7 @@ extern "C" { return F_none; } - if (main->parameters[control_parameter_version].result == f_console_result_found) { + if (main->parameters[control_parameter_version_e].result == f_console_result_found_e) { fll_program_print_version(main->output.to, control_program_version_s); control_main_delete(main); @@ -135,7 +135,7 @@ extern "C" { // @todo // Ensure a newline is always put at the end of the program execution, unless in quiet mode. - if (main->output.verbosity != f_console_verbosity_quiet) { + if (main->output.verbosity != f_console_verbosity_quiet_e) { if (F_status_is_error(status)) { if (F_status_set_fine(status) == F_interrupt) { fflush(main->output.to.stream); diff --git a/level_3/control/c/control.h b/level_3/control/c/control.h index 76ab716..fa0a8c9 100644 --- a/level_3/control/c/control.h +++ b/level_3/control/c/control.h @@ -67,28 +67,28 @@ extern "C" { #ifndef _di_control_defines_ enum { - control_parameter_help, - control_parameter_light, - control_parameter_dark, - control_parameter_no_color, - control_parameter_verbosity_quiet, - control_parameter_verbosity_normal, - control_parameter_verbosity_verbose, - control_parameter_verbosity_debug, - control_parameter_version, + control_parameter_help_e, + control_parameter_light_e, + control_parameter_dark_e, + control_parameter_no_color_e, + control_parameter_verbosity_quiet_e, + control_parameter_verbosity_normal_e, + control_parameter_verbosity_verbose_e, + control_parameter_verbosity_debug_e, + control_parameter_version_e, }; #define control_console_parameter_t_initialize \ { \ - 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(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse_e), \ + 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_e), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse_e), \ } #define control_total_parameters_d 9 diff --git a/level_3/control/c/private-common.c b/level_3/control/c/private-common.c index a32fd1f..4275a00 100644 --- a/level_3/control/c/private-common.c +++ b/level_3/control/c/private-common.c @@ -8,7 +8,7 @@ extern "C" { #ifndef _di_control_print_signal_received_ void control_print_signal_received(control_main_t * const main, const f_status_t signal) { - if (main->warning.verbosity != f_console_verbosity_verbose) return; + if (main->warning.verbosity != f_console_verbosity_verbose_e) return; // Must flush and reset color because the interrupt may have interrupted the middle of a print function. fflush(main->warning.to.stream); diff --git a/level_3/controller/c/controller.c b/level_3/controller/c/controller.c index e6a389c..70d1244 100644 --- a/level_3/controller/c/controller.c +++ b/level_3/controller/c/controller.c @@ -65,7 +65,7 @@ extern "C" { const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, controller_total_parameters_d); { - f_console_parameter_id_t ids[3] = { controller_parameter_no_color, controller_parameter_light, controller_parameter_dark }; + f_console_parameter_id_t ids[3] = { controller_parameter_no_color_e, controller_parameter_light_e, controller_parameter_dark_e }; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3); status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context); @@ -91,7 +91,7 @@ extern "C" { } if (F_status_is_error(status)) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process", F_true); fll_print_terminated(f_string_eol_s, main->error.to.stream); } @@ -103,7 +103,7 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { controller_parameter_verbosity_quiet, controller_parameter_verbosity_normal, controller_parameter_verbosity_verbose, controller_parameter_verbosity_debug }; + f_console_parameter_id_t ids[4] = { controller_parameter_verbosity_quiet_e, controller_parameter_verbosity_normal_e, controller_parameter_verbosity_verbose_e, controller_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); @@ -114,39 +114,39 @@ extern "C" { return status; } - if (choice == controller_parameter_verbosity_quiet) { - main->output.verbosity = f_console_verbosity_quiet; - main->error.verbosity = f_console_verbosity_quiet; - main->warning.verbosity = f_console_verbosity_quiet; + if (choice == controller_parameter_verbosity_quiet_e) { + main->output.verbosity = f_console_verbosity_quiet_e; + main->error.verbosity = f_console_verbosity_quiet_e; + main->warning.verbosity = f_console_verbosity_quiet_e; } - else if (choice == controller_parameter_verbosity_normal) { - main->output.verbosity = f_console_verbosity_normal; - main->error.verbosity = f_console_verbosity_normal; - main->warning.verbosity = f_console_verbosity_normal; + else if (choice == controller_parameter_verbosity_normal_e) { + main->output.verbosity = f_console_verbosity_normal_e; + main->error.verbosity = f_console_verbosity_normal_e; + main->warning.verbosity = f_console_verbosity_normal_e; } - else if (choice == controller_parameter_verbosity_verbose) { - main->output.verbosity = f_console_verbosity_verbose; - main->error.verbosity = f_console_verbosity_verbose; - main->warning.verbosity = f_console_verbosity_verbose; + else if (choice == controller_parameter_verbosity_verbose_e) { + main->output.verbosity = f_console_verbosity_verbose_e; + main->error.verbosity = f_console_verbosity_verbose_e; + main->warning.verbosity = f_console_verbosity_verbose_e; } - else if (choice == controller_parameter_verbosity_debug) { - main->output.verbosity = f_console_verbosity_debug; - main->error.verbosity = f_console_verbosity_debug; - main->warning.verbosity = f_console_verbosity_debug; + else if (choice == controller_parameter_verbosity_debug_e) { + main->output.verbosity = f_console_verbosity_debug_e; + main->error.verbosity = f_console_verbosity_debug_e; + main->warning.verbosity = f_console_verbosity_debug_e; } } status = F_none; } - if (main->parameters[controller_parameter_help].result == f_console_result_found) { + if (main->parameters[controller_parameter_help_e].result == f_console_result_found_e) { controller_print_help(main); controller_main_delete(main); return F_none; } - if (main->parameters[controller_parameter_version].result == f_console_result_found) { + if (main->parameters[controller_parameter_version_e].result == f_console_result_found_e) { controller_lock_print(main->output.to, 0); fll_program_print_version(main->output.to, controller_program_version_s); @@ -182,16 +182,16 @@ extern "C" { return status; } - if (main->parameters[controller_parameter_init].result == f_console_result_found) { + if (main->parameters[controller_parameter_init_e].result == f_console_result_found_e) { main->as_init = F_true; } if (main->as_init) { - setting.mode = controller_setting_mode_service; + setting.mode = controller_setting_mode_service_e; } - if (main->parameters[controller_parameter_settings].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[controller_parameter_settings_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(main->error.to, 0); fl_print_format("%c%[%SThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix ? main->error.prefix : f_string_empty_s, main->error.context); @@ -203,8 +203,8 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters[controller_parameter_settings].locations.used) { - const f_array_length_t location = main->parameters[controller_parameter_settings].values.array[main->parameters[controller_parameter_settings].values.used - 1]; + else if (main->parameters[controller_parameter_settings_e].locations.used) { + const f_array_length_t location = main->parameters[controller_parameter_settings_e].values.array[main->parameters[controller_parameter_settings_e].values.used - 1]; status = fll_path_canonical(arguments->argv[location], &setting.path_setting); @@ -213,7 +213,7 @@ extern "C" { } } else { - if (main->parameters[controller_parameter_init].result == f_console_result_found && !main->as_init) { + if (main->parameters[controller_parameter_init_e].result == f_console_result_found_e && !main->as_init) { status = f_string_append(controller_path_settings_init_s, controller_path_settings_init_s_length, &setting.path_setting); } else if (main->setting_default.used) { @@ -229,8 +229,8 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[controller_parameter_pid].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[controller_parameter_pid_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(main->error.to, 0); fl_print_format("%c%[%SThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix ? main->error.prefix : f_string_empty_s, main->error.context); @@ -242,8 +242,8 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters[controller_parameter_pid].locations.used) { - const f_array_length_t location = main->parameters[controller_parameter_pid].values.array[main->parameters[controller_parameter_pid].values.used - 1]; + else if (main->parameters[controller_parameter_pid_e].locations.used) { + const f_array_length_t location = main->parameters[controller_parameter_pid_e].values.array[main->parameters[controller_parameter_pid_e].values.used - 1]; if (strnlen(arguments->argv[location], f_console_parameter_size)) { status = fll_path_canonical(arguments->argv[location], &setting.path_pid); @@ -258,9 +258,9 @@ extern "C" { } } - if (F_status_is_error_not(status) && !setting.path_pid.used && !main->parameters[controller_parameter_pid].locations.used) { + if (F_status_is_error_not(status) && !setting.path_pid.used && !main->parameters[controller_parameter_pid_e].locations.used) { - if (main->parameters[controller_parameter_init].result == f_console_result_found) { + if (main->parameters[controller_parameter_init_e].result == f_console_result_found_e) { status = f_string_append(controller_path_pid_init_s, controller_path_pid_init_s_length, &setting.path_pid); } else { @@ -281,8 +281,8 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[controller_parameter_control].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[controller_parameter_control_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(main->error.to, 0); fl_print_format("%c%[%SThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix ? main->error.prefix : f_string_empty_s, main->error.context); @@ -294,8 +294,8 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters[controller_parameter_control].locations.used) { - const f_array_length_t location = main->parameters[controller_parameter_control].values.array[main->parameters[controller_parameter_control].values.used - 1]; + else if (main->parameters[controller_parameter_control_e].locations.used) { + const f_array_length_t location = main->parameters[controller_parameter_control_e].values.array[main->parameters[controller_parameter_control_e].values.used - 1]; if (strnlen(arguments->argv[location], f_console_parameter_size)) { status = fll_path_canonical(arguments->argv[location], &setting.path_control); @@ -319,7 +319,7 @@ extern "C" { } } else { - if (main->warning.verbosity == f_console_verbosity_debug) { + if (main->warning.verbosity == f_console_verbosity_debug_e) { controller_lock_print(main->warning.to, 0); fl_print_format("%c%[%SThe parameter '%]", main->warning.to.stream, f_string_eol_s[0], main->warning.context, main->warning.prefix ? main->warning.prefix : f_string_empty_s, main->warning.context); @@ -332,9 +332,9 @@ extern "C" { } } - if (F_status_is_error_not(status) && main->parameters[controller_parameter_daemon].result == f_console_result_found) { - if (main->parameters[controller_parameter_validate].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (F_status_is_error_not(status) && main->parameters[controller_parameter_daemon_e].result == f_console_result_found_e) { + if (main->parameters[controller_parameter_validate_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(main->error.to, 0); fl_print_format("%c%[%SThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix ? main->error.prefix : f_string_empty_s, main->error.context); @@ -351,10 +351,10 @@ extern "C" { // Handle defaults dependent on the "as init" execution state. if (main->as_init) { - setting.entry.pid = controller_entry_pid_disable; - setting.entry.show = controller_entry_show_init; + setting.entry.pid = controller_entry_pid_disable_e; + setting.entry.show = controller_entry_show_init_e; - if (main->parameters[controller_parameter_interruptible].result == f_console_result_found) { + if (main->parameters[controller_parameter_interruptible_e].result == f_console_result_found_e) { setting.interruptible = F_true; } else { @@ -362,7 +362,7 @@ extern "C" { } } else { - if (main->parameters[controller_parameter_uninterruptible].result == f_console_result_found) { + if (main->parameters[controller_parameter_uninterruptible_e].result == f_console_result_found_e) { setting.interruptible = F_false; } else { @@ -418,7 +418,7 @@ extern "C" { } // Ensure a newline is always put at the end of the program execution, unless in quiet mode. - if (F_status_is_error(status) && main->output.verbosity != f_console_verbosity_quiet) { + if (F_status_is_error(status) && main->output.verbosity != f_console_verbosity_quiet_e) { if (F_status_set_fine(status) == F_interrupt) { fflush(main->output.to.stream); } @@ -429,7 +429,7 @@ extern "C" { if (status != F_child && setting.pid_created) { const f_status_t status_delete = controller_file_pid_delete(main->pid, setting.path_pid); - if (F_status_is_error(status_delete) && main->warning.verbosity == f_console_verbosity_debug) { + if (F_status_is_error(status_delete) && main->warning.verbosity == f_console_verbosity_debug_e) { if (F_status_set_fine(status_delete) == F_number_not) { controller_lock_print(main->warning.to, 0); @@ -442,7 +442,7 @@ extern "C" { controller_unlock_print_flush(main->warning.to, 0); } else if (F_status_set_fine(status_delete) != F_interrupt) { - fll_error_file_print(main->warning, F_status_set_fine(status_delete), "controller_file_pid_delete", F_true, setting.path_pid.string, "delete", fll_error_file_type_file); + fll_error_file_print(main->warning, F_status_set_fine(status_delete), "controller_file_pid_delete", F_true, setting.path_pid.string, "delete", fll_error_file_type_file_e); } } } diff --git a/level_3/controller/c/controller.h b/level_3/controller/c/controller.h index 2a346b0..29dba63 100644 --- a/level_3/controller/c/controller.h +++ b/level_3/controller/c/controller.h @@ -169,47 +169,47 @@ extern "C" { #define controller_long_validate_s "validate" enum { - controller_parameter_help, - controller_parameter_light, - controller_parameter_dark, - controller_parameter_no_color, - controller_parameter_verbosity_quiet, - controller_parameter_verbosity_normal, - controller_parameter_verbosity_verbose, - controller_parameter_verbosity_debug, - controller_parameter_version, - - controller_parameter_control, - controller_parameter_daemon, - controller_parameter_init, - controller_parameter_interruptible, - controller_parameter_pid, - controller_parameter_settings, - controller_parameter_simulate, - controller_parameter_uninterruptible, - controller_parameter_validate, + controller_parameter_help_e, + controller_parameter_light_e, + controller_parameter_dark_e, + controller_parameter_no_color_e, + controller_parameter_verbosity_quiet_e, + controller_parameter_verbosity_normal_e, + controller_parameter_verbosity_verbose_e, + controller_parameter_verbosity_debug_e, + controller_parameter_version_e, + + controller_parameter_control_e, + controller_parameter_daemon_e, + controller_parameter_init_e, + controller_parameter_interruptible_e, + controller_parameter_pid_e, + controller_parameter_settings_e, + controller_parameter_simulate_e, + controller_parameter_uninterruptible_e, + controller_parameter_validate_e, }; #define controller_console_parameter_t_initialize \ { \ - 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_s, controller_long_control_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(controller_short_daemon_s, controller_long_daemon_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(controller_short_init_s, controller_long_init_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(controller_short_interruptible_s, controller_long_interruptible_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(controller_short_pid_s, controller_long_pid_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(controller_short_settings_s, controller_long_settings_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(controller_short_simulate_s, controller_long_simulate_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(controller_short_uninterruptible_s, controller_long_uninterruptible_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(controller_short_validate_s, controller_long_validate_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse_e), \ + 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_e), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(controller_short_control_s, controller_long_control_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(controller_short_daemon_s, controller_long_daemon_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(controller_short_init_s, controller_long_init_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(controller_short_interruptible_s, controller_long_interruptible_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(controller_short_pid_s, controller_long_pid_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(controller_short_settings_s, controller_long_settings_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(controller_short_simulate_s, controller_long_simulate_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(controller_short_uninterruptible_s, controller_long_uninterruptible_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(controller_short_validate_s, controller_long_validate_s, 0, 0, f_console_type_normal_e), \ } #define controller_total_parameters_d 18 diff --git a/level_3/controller/c/private-common.c b/level_3/controller/c/private-common.c index 26d2d25..d91fb78 100644 --- a/level_3/controller/c/private-common.c +++ b/level_3/controller/c/private-common.c @@ -431,7 +431,7 @@ extern "C" { return status; } else { - for (f_array_length_t i = 0; i < controller_rule_action_type__enum_size; ++i) { + for (f_array_length_t i = 0; i < controller_rule_action_type__enum_size_e; ++i) { process->rule.status[i] = F_known_not; } // for } diff --git a/level_3/controller/c/private-common.h b/level_3/controller/c/private-common.h index e9af874..0d760ce 100644 --- a/level_3/controller/c/private-common.h +++ b/level_3/controller/c/private-common.h @@ -362,22 +362,22 @@ extern "C" { */ #ifndef _di_controller_resource_limit_t_ enum { - controller_resource_limit_type_as = RLIMIT_AS, - controller_resource_limit_type_core = RLIMIT_CORE, - controller_resource_limit_type_cpu = RLIMIT_CPU, - controller_resource_limit_type_data = RLIMIT_DATA, - controller_resource_limit_type_fsize = RLIMIT_FSIZE, - controller_resource_limit_type_locks = RLIMIT_LOCKS, - controller_resource_limit_type_memlock = RLIMIT_MEMLOCK, - controller_resource_limit_type_msgqueue = RLIMIT_MSGQUEUE, - controller_resource_limit_type_nice = RLIMIT_NICE, - controller_resource_limit_type_nofile = RLIMIT_NOFILE, - controller_resource_limit_type_nproc = RLIMIT_NPROC, - controller_resource_limit_type_rss = RLIMIT_RSS, - controller_resource_limit_type_rtprio = RLIMIT_RTPRIO, - controller_resource_limit_type_rttime = RLIMIT_RTTIME, - controller_resource_limit_type_sigpending = RLIMIT_SIGPENDING, - controller_resource_limit_type_stack = RLIMIT_STACK, + controller_resource_limit_type_as_e = RLIMIT_AS, + controller_resource_limit_type_core_e = RLIMIT_CORE, + controller_resource_limit_type_cpu_e = RLIMIT_CPU, + controller_resource_limit_type_data_e = RLIMIT_DATA, + controller_resource_limit_type_fsize_e = RLIMIT_FSIZE, + controller_resource_limit_type_locks_e = RLIMIT_LOCKS, + controller_resource_limit_type_memlock_e = RLIMIT_MEMLOCK, + controller_resource_limit_type_msgqueue_e = RLIMIT_MSGQUEUE, + controller_resource_limit_type_nice_e = RLIMIT_NICE, + controller_resource_limit_type_nofile_e = RLIMIT_NOFILE, + controller_resource_limit_type_nproc_e = RLIMIT_NPROC, + controller_resource_limit_type_rss_e = RLIMIT_RSS, + controller_resource_limit_type_rtprio_e = RLIMIT_RTPRIO, + controller_resource_limit_type_rttime_e = RLIMIT_RTTIME, + controller_resource_limit_type_sigpending_e = RLIMIT_SIGPENDING, + controller_resource_limit_type_stack_e = RLIMIT_STACK, }; #endif // _di_controller_resource_limit_t_ @@ -652,44 +652,44 @@ extern "C" { #define controller_rule_action_method_string_extended_list_s_length 24 enum { - controller_rule_action_method_extended = 1, - controller_rule_action_method_extended_list, + controller_rule_action_method_extended_e = 1, + controller_rule_action_method_extended_list_e, }; enum { - controller_rule_action_type_freeze = 1, - controller_rule_action_type_group, - controller_rule_action_type_kill, - controller_rule_action_type_pause, - controller_rule_action_type_pid_file, - controller_rule_action_type_reload, - controller_rule_action_type_rerun, - controller_rule_action_type_restart, - controller_rule_action_type_resume, - controller_rule_action_type_start, - controller_rule_action_type_stop, - controller_rule_action_type_thaw, - controller_rule_action_type_user, - controller_rule_action_type_with, + controller_rule_action_type_freeze_e = 1, + controller_rule_action_type_group_e, + controller_rule_action_type_kill_e, + controller_rule_action_type_pause_e, + controller_rule_action_type_pid_file_e, + controller_rule_action_type_reload_e, + controller_rule_action_type_rerun_e, + controller_rule_action_type_restart_e, + controller_rule_action_type_resume_e, + controller_rule_action_type_start_e, + controller_rule_action_type_stop_e, + controller_rule_action_type_thaw_e, + controller_rule_action_type_user_e, + controller_rule_action_type_with_e, // designate the largest value in the enum, the '__' is intended. - controller_rule_action_type__enum_size, + controller_rule_action_type__enum_size_e, }; // Execute type starts at 0 because it is intended to be used as an index within a static array. enum { - controller_rule_action_type_execute_freeze = 0, - controller_rule_action_type_execute_kill, - controller_rule_action_type_execute_pause, - controller_rule_action_type_execute_reload, - controller_rule_action_type_execute_restart, - controller_rule_action_type_execute_resume, - controller_rule_action_type_execute_start, - controller_rule_action_type_execute_stop, - controller_rule_action_type_execute_thaw, + controller_rule_action_type_execute_freeze_e = 0, + controller_rule_action_type_execute_kill_e, + controller_rule_action_type_execute_pause_e, + controller_rule_action_type_execute_reload_e, + controller_rule_action_type_execute_restart_e, + controller_rule_action_type_execute_resume_e, + controller_rule_action_type_execute_start_e, + controller_rule_action_type_execute_stop_e, + controller_rule_action_type_execute_thaw_e, // designate the largest value in the enum, the '__' is intended. - controller_rule_action_type_execute__enum_size, + controller_rule_action_type_execute__enum_size_e, }; typedef struct { @@ -748,11 +748,11 @@ extern "C" { */ #ifndef _di_controller_rule_item_t_ enum { - controller_rule_item_type_command = 1, - controller_rule_item_type_script, - controller_rule_item_type_service, - controller_rule_item_type_setting, - controller_rule_item_type_utility, + controller_rule_item_type_command_e = 1, + controller_rule_item_type_script_e, + controller_rule_item_type_service_e, + controller_rule_item_type_setting_e, + controller_rule_item_type_utility_e, }; typedef struct { @@ -761,7 +761,7 @@ extern "C" { f_array_length_t line; f_string_dynamic_t pid_file; - controller_rule_rerun_t reruns[controller_rule_action_type_execute__enum_size]; + controller_rule_rerun_t reruns[controller_rule_action_type_execute__enum_size_e]; controller_rule_actions_t actions; } controller_rule_item_t; @@ -909,22 +909,22 @@ extern "C" { */ #ifndef _di_controller_rule_t_ enum { - controller_rule_setting_type_affinity = 1, - controller_rule_setting_type_capability, - controller_rule_setting_type_control_group, - controller_rule_setting_type_define, - controller_rule_setting_type_environment, - controller_rule_setting_type_group, - controller_rule_setting_type_limit, - controller_rule_setting_type_name, - controller_rule_setting_type_nice, - controller_rule_setting_type_on, - controller_rule_setting_type_parameter, - controller_rule_setting_type_path, - controller_rule_setting_type_scheduler, - controller_rule_setting_type_script, - controller_rule_setting_type_timeout, - controller_rule_setting_type_user, + controller_rule_setting_type_affinity_e = 1, + controller_rule_setting_type_capability_e, + controller_rule_setting_type_control_group_e, + controller_rule_setting_type_define_e, + controller_rule_setting_type_environment_e, + controller_rule_setting_type_group_e, + controller_rule_setting_type_limit_e, + controller_rule_setting_type_name_e, + controller_rule_setting_type_nice_e, + controller_rule_setting_type_on_e, + controller_rule_setting_type_parameter_e, + controller_rule_setting_type_path_e, + controller_rule_setting_type_scheduler_e, + controller_rule_setting_type_script_e, + controller_rule_setting_type_timeout_e, + controller_rule_setting_type_user_e, }; // bitwise codes representing properties on controller_rule_t that have been found in the rule file. @@ -941,7 +941,7 @@ extern "C" { #define controller_rule_timeout_code_stop_d 3 typedef struct { - f_status_t status[controller_rule_action_type__enum_size]; + f_status_t status[controller_rule_action_type__enum_size_e]; f_number_unsigned_t timeout_kill; f_number_unsigned_t timeout_start; @@ -1118,16 +1118,16 @@ extern "C" { #define controller_process_option_wait_d 0x10 enum { - controller_process_state_idle = 1, - controller_process_state_busy, - controller_process_state_active, - controller_process_state_done, + controller_process_state_idle_e = 1, + controller_process_state_busy_e, + controller_process_state_active_e, + controller_process_state_done_e, }; enum { - controller_process_type_entry = 1, - controller_process_type_exit, - controller_process_type_control, + controller_process_type_entry_e = 1, + controller_process_type_exit_e, + controller_process_type_control_e, }; typedef struct { @@ -1239,21 +1239,21 @@ extern "C" { */ #ifndef _di_controller_entry_action_t_ enum { - controller_entry_action_type_consider = 1, - controller_entry_action_type_execute, - controller_entry_action_type_failsafe, - controller_entry_action_type_freeze, - controller_entry_action_type_item, - controller_entry_action_type_kill, - controller_entry_action_type_pause, - controller_entry_action_type_ready, - controller_entry_action_type_reload, - controller_entry_action_type_restart, - controller_entry_action_type_resume, - controller_entry_action_type_start, - controller_entry_action_type_stop, - controller_entry_action_type_timeout, - controller_entry_action_type_thaw, + controller_entry_action_type_consider_e = 1, + controller_entry_action_type_execute_e, + controller_entry_action_type_failsafe_e, + controller_entry_action_type_freeze_e, + controller_entry_action_type_item_e, + controller_entry_action_type_kill_e, + controller_entry_action_type_pause_e, + controller_entry_action_type_ready_e, + controller_entry_action_type_reload_e, + controller_entry_action_type_restart_e, + controller_entry_action_type_resume_e, + controller_entry_action_type_start_e, + controller_entry_action_type_stop_e, + controller_entry_action_type_timeout_e, + controller_entry_action_type_thaw_e, }; #define controller_entry_rule_code_asynchronous_d 0x1 @@ -1389,20 +1389,20 @@ extern "C" { */ #ifndef _di_controller_entry_t_ enum { - controller_entry_pid_disable = 0, - controller_entry_pid_require, - controller_entry_pid_ready, + controller_entry_pid_disable_e = 0, + controller_entry_pid_require_e, + controller_entry_pid_ready_e, }; enum { - controller_entry_show_normal = 0, - controller_entry_show_init, + controller_entry_show_normal_e = 0, + controller_entry_show_init_e, }; enum { - controller_entry_session_none = 0, - controller_entry_session_new, - controller_entry_session_same, + controller_entry_session_none_e = 0, + controller_entry_session_new_e, + controller_entry_session_same_e, }; typedef struct { @@ -1421,9 +1421,9 @@ extern "C" { #define controller_entry_t_initialize { \ F_known_not, \ - controller_entry_pid_require, \ - controller_entry_session_none, \ - controller_entry_show_normal, \ + controller_entry_pid_require_e, \ + controller_entry_session_none_e, \ + controller_entry_show_normal_e, \ 0, \ 0, \ 0, \ @@ -1458,17 +1458,17 @@ extern "C" { */ #ifndef _di_controller_setting_t enum { - controller_setting_ready_no = 0, - controller_setting_ready_wait, - controller_setting_ready_yes, - controller_setting_ready_done, - controller_setting_ready_fail, - controller_setting_ready_abort, + controller_setting_ready_no_e = 0, + controller_setting_ready_wait_e, + controller_setting_ready_yes_e, + controller_setting_ready_done_e, + controller_setting_ready_fail_e, + controller_setting_ready_abort_e, }; enum { - controller_setting_mode_service = 0, - controller_setting_mode_program, + controller_setting_mode_service_e = 0, + controller_setting_mode_program_e, }; typedef struct { @@ -1577,20 +1577,20 @@ extern "C" { * - exit_execute: Cancellation is explicitly called due to an "execute" Item Action during Exit. */ enum { - controller_thread_enabled_not = 0, - controller_thread_enabled, - controller_thread_enabled_execute, - controller_thread_enabled_exit, - controller_thread_enabled_exit_execute, - controller_thread_enabled_exit_ready, + controller_thread_enabled_not_e = 0, + controller_thread_enabled_e, + controller_thread_enabled_execute_e, + controller_thread_enabled_exit_e, + controller_thread_enabled_exit_execute_e, + controller_thread_enabled_exit_ready_e, }; enum { - controller_thread_cancel_signal = 0, - controller_thread_cancel_call, - controller_thread_cancel_execute, - controller_thread_cancel_exit, - controller_thread_cancel_exit_execute, + controller_thread_cancel_signal_e = 0, + controller_thread_cancel_call_e, + controller_thread_cancel_execute_e, + controller_thread_cancel_exit_e, + controller_thread_cancel_exit_execute_e, }; typedef struct { @@ -1610,7 +1610,7 @@ extern "C" { } controller_thread_t; #define controller_thread_t_initialize { \ - controller_thread_enabled, \ + controller_thread_enabled_e, \ 0, \ F_none, \ f_thread_id_t_initialize, \ diff --git a/level_3/controller/c/private-controller.c b/level_3/controller/c/private-controller.c index 0024100..6809aa2 100644 --- a/level_3/controller/c/private-controller.c +++ b/level_3/controller/c/private-controller.c @@ -89,7 +89,7 @@ extern "C" { } if (F_status_is_error(status)) { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { controller_print_error(global.main->error, F_status_set_fine(status), "f_string_append", F_true, global.thread); } @@ -99,7 +99,7 @@ extern "C" { status = f_string_dynamic_terminate_after(&cache->action.name_file); if (F_status_is_error(status)) { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { controller_print_error(global.main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true, global.thread); } @@ -127,16 +127,16 @@ extern "C" { return F_file_found_not; } - if (global.main->error.verbosity != f_console_verbosity_quiet) { - controller_print_error_file(global.main->error, F_status_set_fine(status), "f_file_stream_open", F_true, path, "open", fll_error_file_type_file, global.thread); + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { + controller_print_error_file(global.main->error, F_status_set_fine(status), "f_file_stream_open", F_true, path, "open", fll_error_file_type_file_e, global.thread); } } else { status = f_file_stream_read(file, &cache->buffer_file); if (F_status_is_error(status)) { - if (global.main->error.verbosity != f_console_verbosity_quiet) { - controller_print_error_file(global.main->error, F_status_set_fine(status), "f_file_stream_read", F_true, path, "read", fll_error_file_type_file, global.thread); + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { + controller_print_error_file(global.main->error, F_status_set_fine(status), "f_file_stream_read", F_true, path, "read", fll_error_file_type_file_e, global.thread); } } } @@ -149,8 +149,8 @@ extern "C" { status = f_file_stat(path, F_true, &stat_file); if (F_status_is_error(status)) { - if (global.main->error.verbosity != f_console_verbosity_quiet) { - controller_print_error_file(global.main->error, F_status_set_fine(status), "f_file_stat", F_true, path, "stat", fll_error_file_type_file, global.thread); + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { + controller_print_error_file(global.main->error, F_status_set_fine(status), "f_file_stat", F_true, path, "stat", fll_error_file_type_file_e, global.thread); } } else { @@ -399,7 +399,7 @@ extern "C" { f_status_t controller_perform_ready(const bool is_entry, controller_global_t global, controller_cache_t *cache) { // Only create pid file when not in validate mode. - if (!is_entry || global.setting->entry.pid == controller_entry_pid_disable || global.main->parameters[controller_parameter_validate].result != f_console_result_none || !global.setting->path_pid.used) { + if (!is_entry || global.setting->entry.pid == controller_entry_pid_disable_e || global.main->parameters[controller_parameter_validate_e].result != f_console_result_none_e || !global.setting->path_pid.used) { return F_none; } @@ -410,10 +410,10 @@ extern "C" { // Always return immediately on memory errors. if (F_status_set_fine(status) == F_memory_not) { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global.main->error.to, global.thread); - controller_print_error_file(global.main->error, F_status_set_fine(status), "controller_file_pid_create", F_true, global.setting->path_pid.string, "create", fll_error_file_type_file, 0); + controller_print_error_file(global.main->error, F_status_set_fine(status), "controller_file_pid_create", F_true, global.setting->path_pid.string, "create", fll_error_file_type_file_e, 0); flockfile(global.main->error.to.stream); @@ -425,7 +425,7 @@ extern "C" { return status; } - if (global.main->warning.verbosity == f_console_verbosity_debug) { + if (global.main->warning.verbosity == f_console_verbosity_debug_e) { controller_lock_print(global.main->warning.to, global.thread); if (F_status_set_fine(status) == F_read_only) { @@ -434,7 +434,7 @@ extern "C" { fl_print_format("%[' could not be written because the destination is read only.%]%c", global.main->warning.to.stream, global.main->warning.context, global.main->warning.context, f_string_eol_s[0]); } else { - controller_print_error_file(global.main->warning, F_status_set_fine(status), "controller_file_pid_create", F_true, global.setting->path_pid.string, "create", fll_error_file_type_file, 0); + controller_print_error_file(global.main->warning, F_status_set_fine(status), "controller_file_pid_create", F_true, global.setting->path_pid.string, "create", fll_error_file_type_file_e, 0); } controller_entry_print_error_cache(is_entry, global.main->warning, cache->action); diff --git a/level_3/controller/c/private-controller_print.c b/level_3/controller/c/private-controller_print.c index 2615b1e..761145f 100644 --- a/level_3/controller/c/private-controller_print.c +++ b/level_3/controller/c/private-controller_print.c @@ -10,7 +10,7 @@ extern "C" { #ifndef _di_controller_print_error_ void controller_print_error(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, controller_thread_t *thread) { - if (print.verbosity == f_console_verbosity_quiet) return; + if (print.verbosity == f_console_verbosity_quiet_e) return; if (status == F_interrupt) return; // fll_error_print() automatically locks, so manually handle only the mutex locking and flushing rather than calling controller_lock_print(). @@ -29,7 +29,7 @@ extern "C" { #ifndef _di_controller_print_error_file_ void controller_print_error_file(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_t name, const f_string_t operation, const uint8_t type, controller_thread_t *thread) { - if (print.verbosity == f_console_verbosity_quiet) return; + if (print.verbosity == f_console_verbosity_quiet_e) return; // fll_error_print() automatically locks, so manually handle only the mutex locking and flushing rather than calling controller_lock_print(). if (thread) { @@ -47,7 +47,7 @@ extern "C" { #ifndef _di_controller_print_signal_received_ void controller_print_signal_received(controller_main_t * const main, const f_status_t signal) { - if (main->warning.verbosity != f_console_verbosity_verbose) return; + if (main->warning.verbosity != f_console_verbosity_verbose_e) return; // Must flush and reset color because the interrupt may have interrupted the middle of a print function. fflush(main->warning.to.stream); diff --git a/level_3/controller/c/private-entry.c b/level_3/controller/c/private-entry.c index aa5098b..809512a 100644 --- a/level_3/controller/c/private-entry.c +++ b/level_3/controller/c/private-entry.c @@ -19,15 +19,15 @@ extern "C" { f_status_t controller_entry_action_type_is_rule(uint8_t type) { switch (type) { - case controller_entry_action_type_freeze: - case controller_entry_action_type_kill: - case controller_entry_action_type_pause: - case controller_entry_action_type_reload: - case controller_entry_action_type_restart: - case controller_entry_action_type_resume: - case controller_entry_action_type_start: - case controller_entry_action_type_stop: - case controller_entry_action_type_thaw: + case controller_entry_action_type_freeze_e: + case controller_entry_action_type_kill_e: + case controller_entry_action_type_pause_e: + case controller_entry_action_type_reload_e: + case controller_entry_action_type_restart_e: + case controller_entry_action_type_resume_e: + case controller_entry_action_type_start_e: + case controller_entry_action_type_stop_e: + case controller_entry_action_type_thaw_e: return F_true; } @@ -41,77 +41,77 @@ extern "C" { f_string_static_t buffer = f_string_static_t_initialize; switch (type) { - case controller_entry_action_type_consider: + case controller_entry_action_type_consider_e: buffer.string = controller_consider_s; buffer.used = controller_consider_s_length; break; - case controller_entry_action_type_execute: + case controller_entry_action_type_execute_e: buffer.string = controller_execute_s; buffer.used = controller_execute_s_length; break; - case controller_entry_action_type_failsafe: + case controller_entry_action_type_failsafe_e: buffer.string = controller_failsafe_s; buffer.used = controller_failsafe_s_length; break; - case controller_entry_action_type_freeze: + case controller_entry_action_type_freeze_e: buffer.string = controller_freeze_s; buffer.used = controller_freeze_s_length; break; - case controller_entry_action_type_item: + case controller_entry_action_type_item_e: buffer.string = controller_item_s; buffer.used = controller_item_s_length; break; - case controller_entry_action_type_kill: + case controller_entry_action_type_kill_e: buffer.string = controller_kill_s; buffer.used = controller_kill_s_length; break; - case controller_entry_action_type_pause: + case controller_entry_action_type_pause_e: buffer.string = controller_pause_s; buffer.used = controller_pause_s_length; break; - case controller_entry_action_type_ready: + case controller_entry_action_type_ready_e: buffer.string = controller_ready_s; buffer.used = controller_ready_s_length; break; - case controller_entry_action_type_reload: + case controller_entry_action_type_reload_e: buffer.string = controller_reload_s; buffer.used = controller_reload_s_length; break; - case controller_entry_action_type_restart: + case controller_entry_action_type_restart_e: buffer.string = controller_restart_s; buffer.used = controller_restart_s_length; break; - case controller_entry_action_type_resume: + case controller_entry_action_type_resume_e: buffer.string = controller_resume_s; buffer.used = controller_resume_s_length; break; - case controller_entry_action_type_start: + case controller_entry_action_type_start_e: buffer.string = controller_start_s; buffer.used = controller_start_s_length; break; - case controller_entry_action_type_stop: + case controller_entry_action_type_stop_e: buffer.string = controller_stop_s; buffer.used = controller_stop_s_length; break; - case controller_entry_action_type_thaw: + case controller_entry_action_type_thaw_e: buffer.string = controller_thaw_s; buffer.used = controller_thaw_s_length; break; - case controller_entry_action_type_timeout: + case controller_entry_action_type_timeout_e: buffer.string = controller_timeout_s; buffer.used = controller_timeout_s_length; break; @@ -127,32 +127,32 @@ extern "C" { uint8_t controller_entry_action_type_to_rule_action_type(uint8_t type) { switch (type) { - case controller_entry_action_type_freeze: - return controller_rule_action_type_freeze; + case controller_entry_action_type_freeze_e: + return controller_rule_action_type_freeze_e; - case controller_entry_action_type_kill: - return controller_rule_action_type_kill; + case controller_entry_action_type_kill_e: + return controller_rule_action_type_kill_e; - case controller_entry_action_type_pause: - return controller_rule_action_type_pause; + case controller_entry_action_type_pause_e: + return controller_rule_action_type_pause_e; - case controller_entry_action_type_reload: - return controller_rule_action_type_reload; + case controller_entry_action_type_reload_e: + return controller_rule_action_type_reload_e; - case controller_entry_action_type_restart: - return controller_rule_action_type_restart; + case controller_entry_action_type_restart_e: + return controller_rule_action_type_restart_e; - case controller_entry_action_type_resume: - return controller_rule_action_type_resume; + case controller_entry_action_type_resume_e: + return controller_rule_action_type_resume_e; - case controller_entry_action_type_start: - return controller_rule_action_type_start; + case controller_entry_action_type_start_e: + return controller_rule_action_type_start_e; - case controller_entry_action_type_stop: - return controller_rule_action_type_stop; + case controller_entry_action_type_stop_e: + return controller_rule_action_type_stop_e; - case controller_entry_action_type_thaw: - return controller_rule_action_type_thaw; + case controller_entry_action_type_thaw_e: + return controller_rule_action_type_thaw_e; } return 0; @@ -252,52 +252,52 @@ extern "C" { } if (fl_string_dynamic_compare_string(controller_consider_s, cache->action.name_action, controller_consider_s_length) == F_equal_to) { - actions->array[actions->used].type = controller_entry_action_type_consider; + actions->array[actions->used].type = controller_entry_action_type_consider_e; } else if (fl_string_dynamic_compare_string(controller_execute_s, cache->action.name_action, controller_execute_s_length) == F_equal_to) { - actions->array[actions->used].type = controller_entry_action_type_execute; + actions->array[actions->used].type = controller_entry_action_type_execute_e; } else if (fl_string_dynamic_compare_string(controller_failsafe_s, cache->action.name_action, controller_failsafe_s_length) == F_equal_to) { - actions->array[actions->used].type = controller_entry_action_type_failsafe; + actions->array[actions->used].type = controller_entry_action_type_failsafe_e; } else if (fl_string_dynamic_compare_string(controller_freeze_s, cache->action.name_action, controller_freeze_s_length) == F_equal_to) { - actions->array[actions->used].type = controller_entry_action_type_freeze; + actions->array[actions->used].type = controller_entry_action_type_freeze_e; } else if (fl_string_dynamic_compare_string(controller_item_s, cache->action.name_action, controller_item_s_length) == F_equal_to) { - actions->array[actions->used].type = controller_entry_action_type_item; + actions->array[actions->used].type = controller_entry_action_type_item_e; } else if (fl_string_dynamic_compare_string(controller_kill_s, cache->action.name_action, controller_kill_s_length) == F_equal_to) { - actions->array[actions->used].type = controller_entry_action_type_kill; + actions->array[actions->used].type = controller_entry_action_type_kill_e; } else if (fl_string_dynamic_compare_string(controller_pause_s, cache->action.name_action, controller_pause_s_length) == F_equal_to) { - actions->array[actions->used].type = controller_entry_action_type_pause; + actions->array[actions->used].type = controller_entry_action_type_pause_e; } else if (fl_string_dynamic_compare_string(controller_ready_s, cache->action.name_action, controller_ready_s_length) == F_equal_to) { - actions->array[actions->used].type = controller_entry_action_type_ready; + actions->array[actions->used].type = controller_entry_action_type_ready_e; } else if (fl_string_dynamic_compare_string(controller_reload_s, cache->action.name_action, controller_reload_s_length) == F_equal_to) { - actions->array[actions->used].type = controller_entry_action_type_reload; + actions->array[actions->used].type = controller_entry_action_type_reload_e; } else if (fl_string_dynamic_compare_string(controller_restart_s, cache->action.name_action, controller_restart_s_length) == F_equal_to) { - actions->array[actions->used].type = controller_entry_action_type_restart; + actions->array[actions->used].type = controller_entry_action_type_restart_e; } else if (fl_string_dynamic_compare_string(controller_resume_s, cache->action.name_action, controller_resume_s_length) == F_equal_to) { - actions->array[actions->used].type = controller_entry_action_type_resume; + actions->array[actions->used].type = controller_entry_action_type_resume_e; } else if (fl_string_dynamic_compare_string(controller_start_s, cache->action.name_action, controller_start_s_length) == F_equal_to) { - actions->array[actions->used].type = controller_entry_action_type_start; + actions->array[actions->used].type = controller_entry_action_type_start_e; } else if (fl_string_dynamic_compare_string(controller_stop_s, cache->action.name_action, controller_stop_s_length) == F_equal_to) { - actions->array[actions->used].type = controller_entry_action_type_stop; + actions->array[actions->used].type = controller_entry_action_type_stop_e; } else if (fl_string_dynamic_compare_string(controller_thaw_s, cache->action.name_action, controller_thaw_s_length) == F_equal_to) { - actions->array[actions->used].type = controller_entry_action_type_thaw; + actions->array[actions->used].type = controller_entry_action_type_thaw_e; } else if (fl_string_dynamic_compare_string(controller_timeout_s, cache->action.name_action, controller_timeout_s_length) == F_equal_to) { - actions->array[actions->used].type = controller_entry_action_type_timeout; + actions->array[actions->used].type = controller_entry_action_type_timeout_e; } else { - if (global.main->warning.verbosity == f_console_verbosity_debug) { + if (global.main->warning.verbosity == f_console_verbosity_debug_e) { controller_lock_print(global.main->warning.to, global.thread); fl_print_format("%c%[%SUnknown %s item action '%]", global.main->warning.to.stream, f_string_eol_s[0], global.main->warning.context, global.main->warning.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->warning.context); @@ -312,27 +312,27 @@ extern "C" { continue; } - if (action->type == controller_entry_action_type_consider || controller_entry_action_type_is_rule(action->type)) { + if (action->type == controller_entry_action_type_consider_e || controller_entry_action_type_is_rule(action->type)) { allocate = cache->content_actions.array[i].used; at_least = 2; at_most = allocate; } - else if (action->type == controller_entry_action_type_execute) { + else if (action->type == controller_entry_action_type_execute_e) { allocate = cache->content_actions.array[i].used; at_least = 1; at_most = allocate; } - else if (action->type == controller_entry_action_type_failsafe || action->type == controller_entry_action_type_item) { + else if (action->type == controller_entry_action_type_failsafe_e || action->type == controller_entry_action_type_item_e) { allocate = 1; at_least = 1; at_most = 1; } - else if (action->type == controller_entry_action_type_timeout) { + else if (action->type == controller_entry_action_type_timeout_e) { allocate = 2; at_least = 2; at_most = 2; } - else if (action->type == controller_entry_action_type_ready) { + else if (action->type == controller_entry_action_type_ready_e) { allocate = 1; at_least = 0; at_most = 1; @@ -341,7 +341,7 @@ extern "C" { if (cache->content_actions.array[i].used < at_least || cache->content_actions.array[i].used > at_most) { action->status = F_status_set_error(F_parameter); - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { f_thread_mutex_lock(&global.thread->lock.print); flockfile(global.main->error.to.stream); @@ -356,7 +356,7 @@ extern "C" { fl_print_format("%]%[%un%]", global.main->error.to.stream, global.main->error.context, global.main->error.notable, at_least, global.main->error.notable); - if (action->type == controller_entry_action_type_consider || controller_entry_action_type_is_rule(action->type)) { + if (action->type == controller_entry_action_type_consider_e || controller_entry_action_type_is_rule(action->type)) { fl_print_format("%[ or more parameters.%]%c", global.main->error.to.stream, global.main->error.context, global.main->error.context, f_string_eol_s[0]); } else { @@ -424,7 +424,7 @@ extern "C" { } // for if (F_status_is_error_not(action->status)) { - if (action->type == controller_entry_action_type_consider || controller_entry_action_type_is_rule(action->type)) { + if (action->type == controller_entry_action_type_consider_e || controller_entry_action_type_is_rule(action->type)) { if (action->parameters.array[0].used) { // force the path to be canonical (removing all '../' parts). @@ -452,7 +452,7 @@ extern "C" { status_action = action->status; } - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[%SThe %s item action must not have an empty string for a path (the first parameter).%]%c", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context, f_string_eol_s[0]); } } @@ -479,7 +479,7 @@ extern "C" { else { if (fl_string_dynamic_compare(action->parameters.array[1], cache->buffer_path) == F_equal_to_not) { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { status = f_string_dynamic_terminate_after(&cache->buffer_path); if (F_status_is_error(status)) { @@ -520,7 +520,7 @@ extern "C" { status_action = action->status; } - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[%SThe %s item action must not have an empty string for a rule name (the second parameter).%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context, f_string_eol_s[0]); } } @@ -545,7 +545,7 @@ extern "C" { } } - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(global.main->error.to.stream); fl_print_format("%c%[%SThe %s item action third parameter (and beyond) must be one of '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context); @@ -563,7 +563,7 @@ extern "C" { } } // for } - else if (action->type == controller_entry_action_type_failsafe || action->type == controller_entry_action_type_item) { + else if (action->type == controller_entry_action_type_failsafe_e || action->type == controller_entry_action_type_item_e) { if (fl_string_dynamic_compare_string(controller_main_s, action->parameters.array[0], controller_main_s_length) == F_equal_to) { action->status = F_status_set_error(F_supported_not); @@ -571,7 +571,7 @@ extern "C" { status_action = action->status; } - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(global.main->error.to.stream); fl_print_format("%c%[%SThe %s item action may not specify the reserved item '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context); @@ -582,7 +582,7 @@ extern "C" { } } } - else if (action->type == controller_entry_action_type_timeout) { + else if (action->type == controller_entry_action_type_timeout_e) { if (fl_string_dynamic_compare_string(controller_kill_s, action->parameters.array[0], controller_kill_s_length) == F_equal_to) { action->code = controller_entry_timeout_code_kill_d; @@ -600,7 +600,7 @@ extern "C" { status_action = action->status; } - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(global.main->error.to.stream); fl_print_format("%c%[%SThe %s item action must have one of '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context); @@ -639,7 +639,7 @@ extern "C" { break; } - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(global.main->error.to.stream); fl_print_format("%c%[%SThe %s item action parameter '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context); @@ -651,7 +651,7 @@ extern "C" { } } } - else if (action->type == controller_entry_action_type_ready) { + else if (action->type == controller_entry_action_type_ready_e) { if (action->parameters.used) { if (fl_string_dynamic_compare_string(controller_wait_s, action->parameters.array[0], controller_wait_s_length) == F_equal_to) { action->code |= controller_entry_rule_code_wait_d; @@ -659,7 +659,7 @@ extern "C" { else { action->status = F_status_set_error(F_supported_not); - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(global.main->error.to.stream); fl_print_format("%c%[%SThe %s item action may only have '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context); @@ -707,7 +707,7 @@ extern "C" { // This effectively sets the read for an entry and resets the ready for an exit. // @todo should there be a ready_exit instead? // @todo the global.setting->ready in this function may need mutex lock protection. - global.setting->ready = controller_setting_ready_no; + global.setting->ready = controller_setting_ready_no_e; cache->ats.used = 0; @@ -757,10 +757,10 @@ extern "C" { return status2; } - if (actions->array[cache->ats.array[at_j]].type == controller_entry_action_type_ready) { + if (actions->array[cache->ats.array[at_j]].type == controller_entry_action_type_ready_e) { - if (global.setting->ready == controller_setting_ready_wait) { - if (global.main->warning.verbosity == f_console_verbosity_debug) { + if (global.setting->ready == controller_setting_ready_wait_e) { + if (global.main->warning.verbosity == f_console_verbosity_debug_e) { controller_lock_print(global.main->warning.to, global.thread); fl_print_format("%c%[%SMultiple '%]", global.main->warning.to.stream, f_string_eol_s[0], global.main->warning.context, global.main->warning.prefix, global.main->warning.context); @@ -773,10 +773,10 @@ extern "C" { } } else { - global.setting->ready = controller_setting_ready_wait; + global.setting->ready = controller_setting_ready_wait_e; } } - else if (actions->array[cache->ats.array[at_j]].type == controller_entry_action_type_item) { + else if (actions->array[cache->ats.array[at_j]].type == controller_entry_action_type_item_e) { error_has = F_false; // "main" is not allowed to be used for an "item" and "setting" is not an executable "item". @@ -796,7 +796,7 @@ extern "C" { for (j = 2; j < cache->ats.used; j += 2) { if (cache->ats.array[j] == i) { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global.main->error.to, global.thread); fl_print_format("%c%[%SThe %s item named '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, is_entry ? controller_entry_s : controller_exit_s, global.main->error.prefix, global.main->error.context); @@ -858,7 +858,7 @@ extern "C" { if (error_has || i >= entry->items.used) { if (i >= entry->items.used) { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global.main->error.to, global.thread); fl_print_format("%c%[%SThe %s item named '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, is_entry ? controller_entry_s : controller_exit_s, global.main->error.prefix, global.main->error.context); @@ -914,8 +914,8 @@ extern "C" { } // if ready was never found in the entry, then default to always ready. - if (global.setting->ready == controller_setting_ready_no) { - global.setting->ready = controller_setting_ready_yes; + if (global.setting->ready == controller_setting_ready_no_e) { + global.setting->ready = controller_setting_ready_yes_e; } return status; @@ -977,8 +977,8 @@ extern "C" { return status; } - if (global->main->parameters[controller_parameter_simulate].result == f_console_result_found || global->main->error.verbosity == f_console_verbosity_verbose || global->main->error.verbosity == f_console_verbosity_debug) { - if (global->main->error.verbosity != f_console_verbosity_quiet) { + if (global->main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e) { + if (global->main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global->main->output.to, global->thread); fl_print_format("%cProcessing %s%s item '", global->main->output.to.stream, f_string_eol_s[0], failsafe ? "failsafe " : "", is_entry ? controller_entry_s : controller_exit_s); @@ -1008,8 +1008,8 @@ extern "C" { } if (F_status_is_error(entry_action->status)) { - if (global->main->parameters[controller_parameter_simulate].result == f_console_result_found) { - if (global->main->error.verbosity != f_console_verbosity_quiet) { + if (global->main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e) { + if (global->main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global->main->output.to, global->thread); fl_print_format("%cThe %s item action '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_entry_s : controller_exit_s); @@ -1031,7 +1031,7 @@ extern "C" { } } else { - if ((entry_action->code & controller_entry_rule_code_require_d) && global->main->error.verbosity != f_console_verbosity_quiet || !(entry_action->code & controller_entry_rule_code_require_d) && (global->main->warning.verbosity == f_console_verbosity_verbose || global->main->warning.verbosity == f_console_verbosity_debug)) { + if ((entry_action->code & controller_entry_rule_code_require_d) && global->main->error.verbosity != f_console_verbosity_quiet_e || !(entry_action->code & controller_entry_rule_code_require_d) && (global->main->warning.verbosity == f_console_verbosity_verbose_e || global->main->warning.verbosity == f_console_verbosity_debug_e)) { fl_print_t *output = 0; if (entry_action->code & controller_entry_rule_code_require_d) { @@ -1084,10 +1084,10 @@ extern "C" { continue; } - if (entry_action->type == controller_entry_action_type_ready) { - if ((entry_action->code & controller_entry_rule_code_wait_d) || global->setting->ready == controller_setting_ready_wait) { - if (global->main->parameters[controller_parameter_simulate].result == f_console_result_found || global->main->error.verbosity == f_console_verbosity_verbose || global->main->error.verbosity == f_console_verbosity_debug || entry->show == controller_entry_show_init) { - if (global->main->output.verbosity != f_console_verbosity_quiet) { + if (entry_action->type == controller_entry_action_type_ready_e) { + if ((entry_action->code & controller_entry_rule_code_wait_d) || global->setting->ready == controller_setting_ready_wait_e) { + if (global->main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e || entry->show == controller_entry_show_init_e) { + if (global->main->output.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global->main->output.to, global->thread); fl_print_format("%cWaiting before processing %s item action '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_entry_s : controller_exit_s); @@ -1098,15 +1098,15 @@ extern "C" { } } - if (global->main->parameters[controller_parameter_validate].result == f_console_result_none) { + if (global->main->parameters[controller_parameter_validate_e].result == f_console_result_none_e) { status = controller_rule_wait_all(is_entry, *global, F_false, process); if (F_status_is_error(status)) return status; } } - if (global->setting->ready == controller_setting_ready_yes) { - if (global->main->parameters[controller_parameter_simulate].result == f_console_result_found || global->main->error.verbosity == f_console_verbosity_verbose || global->main->error.verbosity == f_console_verbosity_debug) { - if (global->main->output.verbosity != f_console_verbosity_quiet) { + if (global->setting->ready == controller_setting_ready_yes_e) { + if (global->main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e) { + if (global->main->output.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global->main->output.to, global->thread); fl_print_format("%cIgnoring %s item action '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_entry_s : controller_exit_s); @@ -1118,7 +1118,7 @@ extern "C" { } } else { - if (!failsafe && (global->main->error.verbosity == f_console_verbosity_verbose || entry->show == controller_entry_show_init) && global->main->parameters[controller_parameter_simulate].result == f_console_result_none) { + if (!failsafe && (global->main->error.verbosity == f_console_verbosity_verbose_e || entry->show == controller_entry_show_init_e) && global->main->parameters[controller_parameter_simulate_e].result == f_console_result_none_e) { fl_print_format("%cState is now '%[%s%]'.%c", global->main->output.to.stream, f_string_eol_s[0], global->main->context.set.notable, controller_ready_s, global->main->context.set.notable, f_string_eol_s[0]); } @@ -1126,11 +1126,11 @@ extern "C" { if (F_status_is_error(status)) return status; } } - else if (entry_action->type == controller_entry_action_type_item) { + else if (entry_action->type == controller_entry_action_type_item_e) { if (entry_action->number == 0 || entry_action->number >= entry->items.used || failsafe && entry_action->number == global->setting->failsafe_item_id) { // This should not happen if the pre-process is working as intended, but in case it doesn't, return a critical error to prevent infinite recursion and similar errors. - if (global->main->error.verbosity != f_console_verbosity_quiet) { + if (global->main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global->main->error.to, global->thread); fl_print_format("%c%[Invalid %s item index '%]", global->main->error.to.stream, f_string_eol_s[0], global->main->error.context, is_entry ? controller_entry_s : controller_exit_s, global->main->error.context); @@ -1176,8 +1176,8 @@ extern "C" { return status; } - if (global->main->parameters[controller_parameter_simulate].result == f_console_result_found || global->main->error.verbosity == f_console_verbosity_verbose || global->main->error.verbosity == f_console_verbosity_debug) { - if (global->main->output.verbosity != f_console_verbosity_quiet) { + if (global->main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e) { + if (global->main->output.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global->main->output.to, global->thread); fl_print_format("%cProcessing %s item '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_entry_s : controller_exit_s); @@ -1191,7 +1191,7 @@ extern "C" { // exit inner loop to force restarting and start processing the requested item. break; } - else if (entry_action->type == controller_entry_action_type_consider || controller_entry_action_type_is_rule(entry_action->type)) { + else if (entry_action->type == controller_entry_action_type_consider_e || controller_entry_action_type_is_rule(entry_action->type)) { status_lock = controller_lock_write(is_entry, global->thread, &global->thread->lock.rule); if (F_status_is_error(status_lock)) { @@ -1230,14 +1230,14 @@ extern "C" { f_thread_unlock(&global->thread->lock.rule); - if (global->main->parameters[controller_parameter_simulate].result == f_console_result_found || global->main->error.verbosity == f_console_verbosity_verbose || global->main->error.verbosity == f_console_verbosity_debug || (entry->show == controller_entry_show_init && entry_action->type != controller_entry_action_type_consider)) { - if (global->main->output.verbosity != f_console_verbosity_quiet) { + if (global->main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e || (entry->show == controller_entry_show_init_e && entry_action->type != controller_entry_action_type_consider_e)) { + if (global->main->output.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global->main->output.to, global->thread); - fl_print_format("%c%s %s item rule ", global->main->output.to.stream, f_string_eol_s[0], entry_action->type == controller_entry_action_type_consider ? "Considering" : "Processing", is_entry ? controller_entry_s : controller_exit_s); + fl_print_format("%c%s %s item rule ", global->main->output.to.stream, f_string_eol_s[0], entry_action->type == controller_entry_action_type_consider_e ? "Considering" : "Processing", is_entry ? controller_entry_s : controller_exit_s); fl_print_format("'%[%Q%]'", global->main->output.to.stream, global->main->context.set.title, alias_rule, global->main->context.set.title); - if (entry->show == controller_entry_show_init && global->main->parameters[controller_parameter_simulate].result == f_console_result_none) { + if (entry->show == controller_entry_show_init_e && global->main->parameters[controller_parameter_simulate_e].result == f_console_result_none_e) { fl_print_format(" [%[%s%]]", global->main->output.to.stream, global->main->context.set.notable, entry_action->code == controller_entry_rule_code_asynchronous_d ? controller_asynchronous_s : controller_synchronous_s, global->main->context.set.notable); if (entry_action->code == controller_entry_rule_code_wait_d) { @@ -1310,7 +1310,7 @@ extern "C" { } if (F_status_is_error(status)) { - if (global->main->error.verbosity != f_console_verbosity_quiet) { + if (global->main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global->main->error.to, global->thread); controller_entry_print_error_cache(is_entry, global->main->error, cache->action); @@ -1321,7 +1321,7 @@ extern "C" { // Designate the action as failed. entry_action->status = F_status_set_error(F_failure); - if (global->main->parameters[controller_parameter_simulate].result == f_console_result_none) { + if (global->main->parameters[controller_parameter_simulate_e].result == f_console_result_none_e) { f_thread_unlock(&global->thread->lock.rule); if (entry_action->code & controller_entry_rule_code_require_d) { @@ -1343,7 +1343,7 @@ extern "C" { options_force = 0; options_process = 0; - if (global->main->parameters[controller_parameter_simulate].result == f_console_result_found) { + if (global->main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e) { options_process |= controller_process_option_simulate_d; } @@ -1355,32 +1355,32 @@ extern "C" { options_process |= controller_process_option_wait_d; } - if (global->main->parameters[controller_parameter_validate].result == f_console_result_found) { + if (global->main->parameters[controller_parameter_validate_e].result == f_console_result_found_e) { options_process |= controller_process_option_validate_d; } if (entry_action->code & controller_entry_rule_code_asynchronous_d) { - if (global->main->parameters[controller_parameter_validate].result == f_console_result_none) { + if (global->main->parameters[controller_parameter_validate_e].result == f_console_result_none_e) { options_force |= controller_process_option_asynchronous_d; } options_process |= controller_process_option_asynchronous_d; } - status = controller_rule_process_begin(options_force, alias_rule, controller_entry_action_type_to_rule_action_type(entry_action->type), options_process, is_entry ? controller_process_type_entry : controller_process_type_exit, stack, *global, *cache); + status = controller_rule_process_begin(options_force, alias_rule, controller_entry_action_type_to_rule_action_type(entry_action->type), options_process, is_entry ? controller_process_type_entry_e : controller_process_type_exit_e, stack, *global, *cache); if (F_status_set_fine(status) == F_memory_not || status == F_child || F_status_set_fine(status) == F_interrupt) { break; } - if (F_status_is_error(status) && global->main->parameters[controller_parameter_simulate].result == f_console_result_none && (entry_action->code & controller_entry_rule_code_require_d)) { + if (F_status_is_error(status) && global->main->parameters[controller_parameter_simulate_e].result == f_console_result_none_e && (entry_action->code & controller_entry_rule_code_require_d)) { return F_status_set_error(F_require); } } } - else if (entry_action->type == controller_entry_action_type_execute) { - if (global->main->parameters[controller_parameter_simulate].result == f_console_result_found || global->main->error.verbosity == f_console_verbosity_verbose || global->main->error.verbosity == f_console_verbosity_debug || entry->show == controller_entry_show_init) { - if (global->main->output.verbosity != f_console_verbosity_quiet) { + else if (entry_action->type == controller_entry_action_type_execute_e) { + if (global->main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e || entry->show == controller_entry_show_init_e) { + if (global->main->output.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global->main->output.to, global->thread); fl_print_format("%c%s is executing '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_entry_s : controller_exit_s); @@ -1400,16 +1400,16 @@ extern "C" { } } - if (global->main->parameters[controller_parameter_simulate].result == f_console_result_found) { + if (global->main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e) { return F_execute; } - controller_thread_process_cancel(is_entry, is_entry ? controller_thread_cancel_execute : controller_thread_cancel_exit_execute, global, process); + controller_thread_process_cancel(is_entry, is_entry ? controller_thread_cancel_execute_e : controller_thread_cancel_exit_execute_e, global, process); int result = 0; int option = FL_execute_parameter_option_path_d; - if (entry->session == controller_entry_session_new) { + if (entry->session == controller_entry_session_new_e) { option |= FL_execute_parameter_option_session_d; } @@ -1417,7 +1417,7 @@ extern "C" { if (F_status_is_error(status)) { if (F_status_set_fine(status) == F_file_found_not) { - if (global->main->error.verbosity != f_console_verbosity_quiet) { + if (global->main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global->main->error.to, global->thread); fl_print_format("%c%[%SExecution failed, unable to find program or script '%]", global->main->error.to.stream, f_string_eol_s[0], global->main->error.context, global->main->error.prefix ? global->main->error.prefix : f_string_empty_s, global->main->error.context); @@ -1436,7 +1436,7 @@ extern "C" { return F_status_set_error(F_execute); } else if (result != 0) { - if (global->main->error.verbosity != f_console_verbosity_quiet) { + if (global->main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global->main->error.to, global->thread); fl_print_format("%c%[%SExecution failed with return value of '%]", global->main->error.to.stream, f_string_eol_s[0], global->main->error.context, global->main->error.prefix ? global->main->error.prefix : f_string_empty_s, global->main->error.context); @@ -1453,7 +1453,7 @@ extern "C" { return F_execute; } - else if (entry_action->type == controller_entry_action_type_timeout) { + else if (entry_action->type == controller_entry_action_type_timeout_e) { const f_string_t suffix = " MegaTime (milliseconds)"; if (entry_action->code == controller_entry_timeout_code_kill_d) { @@ -1472,10 +1472,10 @@ extern "C" { controller_entry_preprocess_print_simulate_setting_value(is_entry, *global, controller_timeout_s, controller_stop_s, entry->items.array[global->setting->failsafe_item_id].name, suffix); } } - else if (entry_action->type == controller_entry_action_type_failsafe) { + else if (entry_action->type == controller_entry_action_type_failsafe_e) { if (failsafe) { - if (global->main->warning.verbosity == f_console_verbosity_debug) { + if (global->main->warning.verbosity == f_console_verbosity_debug_e) { controller_lock_print(global->main->warning.to, global->thread); fl_print_format("%c%[%SFailsafe may not be specified when running in failsafe, ignoring.%]%c", global->main->warning.to.stream, f_string_eol_s[0], global->main->warning.context, global->main->warning.prefix ? global->main->warning.prefix : f_string_empty_s, global->main->warning.context, f_string_eol_s[0]); @@ -1489,7 +1489,7 @@ extern "C" { if (entry_action->number == 0 || entry_action->number >= entry->items.used) { // This should not happen if the pre-process is working as designed, but in case it doesn't, return a critical error to prevent infinite recursion and similar errors. - if (global->main->error.verbosity != f_console_verbosity_quiet) { + if (global->main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global->main->error.to, global->thread); fl_print_format("%c%[%SInvalid %s item index '%]", global->main->error.to.stream, f_string_eol_s[0], global->main->error.context, global->main->error.prefix ? global->main->error.prefix : f_string_empty_s, is_entry ? controller_entry_s : controller_exit_s, global->main->error.context); @@ -1562,7 +1562,7 @@ extern "C" { } // check to see if any required processes failed, but do not do this if already operating in failsafe. - if (F_status_is_error_not(status) && !failsafe && global->main->parameters[controller_parameter_validate].result == f_console_result_none) { + if (F_status_is_error_not(status) && !failsafe && global->main->parameters[controller_parameter_validate_e].result == f_console_result_none_e) { const f_status_t status_wait = controller_rule_wait_all(is_entry, *global, F_true, 0); if (F_status_is_error(status_wait)) { @@ -1574,7 +1574,7 @@ extern "C" { } } - if ((global->main->parameters[controller_parameter_simulate].result == f_console_result_found && global->main->error.verbosity != f_console_verbosity_quiet) || global->main->error.verbosity == f_console_verbosity_verbose) { + if ((global->main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e && global->main->error.verbosity != f_console_verbosity_quiet_e) || global->main->error.verbosity == f_console_verbosity_verbose_e) { controller_lock_print(global->main->output.to, global->thread); fl_print_format("%cDone processing %s item '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_entry_s : controller_exit_s); @@ -1604,10 +1604,10 @@ extern "C" { entry->items.used = 0; if (global.main->as_init) { - entry->session = controller_entry_session_new; + entry->session = controller_entry_session_new_e; } else { - entry->session = controller_entry_session_same; + entry->session = controller_entry_session_same_e; } cache->action.line_action = 0; @@ -1676,7 +1676,7 @@ extern "C" { } } else { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global.main->error.to, global.thread); fll_print_format("%c%[%SThe %s file is empty.%]%c", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : is_entry ? controller_entry_s : controller_exit_s, global.main->error.context, f_string_eol_s[0]); @@ -1756,7 +1756,7 @@ extern "C" { for (j = (code & 0x1) ? 1 : 0; j < entry->items.used; ++j) { if (fl_string_dynamic_compare(entry->items.array[j].name, cache->action.name_item) == F_equal_to) { - if (global.main->warning.verbosity == f_console_verbosity_debug) { + if (global.main->warning.verbosity == f_console_verbosity_debug_e) { controller_lock_print(global.main->warning.to, global.thread); fl_print_format("%c%[%SIgnoring duplicate %s item '%]", global.main->warning.to.stream, f_string_eol_s[0], global.main->warning.context, global.main->warning.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->warning.context); @@ -1839,7 +1839,7 @@ extern "C" { cache->action.name_item.used = 0; if (!(code & 0x1)) { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global.main->error.to, global.thread); fl_print_format("%c%[%SThe required %s item '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context); @@ -1873,7 +1873,7 @@ extern "C" { // only process actions that don't already have an error. if (F_status_is_error(action->status)) continue; - if (action->type == controller_entry_action_type_failsafe || action->type == controller_entry_action_type_item) { + if (action->type == controller_entry_action_type_failsafe_e || action->type == controller_entry_action_type_item_e) { missing |= 0x1; for (k = 0; k < entry->items.used; ++k) { @@ -1900,7 +1900,7 @@ extern "C" { break; } - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global.main->error.to, global.thread); fl_print_format("%c%[%SThe required %s item '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context); @@ -2006,10 +2006,10 @@ extern "C" { } if (fl_string_dynamic_partial_compare_string(controller_service_s, cache->buffer_file, controller_service_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - global.setting->mode = controller_setting_mode_service; + global.setting->mode = controller_setting_mode_service_e; } else if (fl_string_dynamic_partial_compare_string(controller_program_s, cache->buffer_file, controller_program_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - global.setting->mode = controller_setting_mode_program; + global.setting->mode = controller_setting_mode_program_e; } else { controller_entry_settings_read_print_setting_unknown_action_value(is_entry, global, *cache, i); @@ -2025,13 +2025,13 @@ extern "C" { } if (fl_string_dynamic_partial_compare_string(controller_disable_s, cache->buffer_file, controller_disable_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - entry->pid = controller_entry_pid_disable; + entry->pid = controller_entry_pid_disable_e; } else if (fl_string_dynamic_partial_compare_string(controller_ready_s, cache->buffer_file, controller_ready_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - entry->pid = controller_entry_pid_ready; + entry->pid = controller_entry_pid_ready_e; } else if (fl_string_dynamic_partial_compare_string(controller_require_s, cache->buffer_file, controller_require_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - entry->pid = controller_entry_pid_require; + entry->pid = controller_entry_pid_require_e; } else { controller_entry_settings_read_print_setting_unknown_action_value(is_entry, global, *cache, i); @@ -2047,10 +2047,10 @@ extern "C" { } if (fl_string_dynamic_partial_compare_string(controller_new_s, cache->buffer_file, controller_new_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - entry->session = controller_entry_session_new; + entry->session = controller_entry_session_new_e; } else if (fl_string_dynamic_partial_compare_string(controller_same_s, cache->buffer_file, controller_same_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - entry->session = controller_entry_session_same; + entry->session = controller_entry_session_same_e; } else { controller_entry_settings_read_print_setting_unknown_action_value(is_entry, global, *cache, i); @@ -2066,10 +2066,10 @@ extern "C" { } if (fl_string_dynamic_partial_compare_string(controller_normal_s, cache->buffer_file, controller_normal_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - entry->show = controller_entry_show_normal; + entry->show = controller_entry_show_normal_e; } else if (fl_string_dynamic_partial_compare_string(controller_init_s, cache->buffer_file, controller_init_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - entry->show = controller_entry_show_init; + entry->show = controller_entry_show_init_e; } else { controller_entry_settings_read_print_setting_unknown_action_value(is_entry, global, *cache, i); @@ -2078,7 +2078,7 @@ extern "C" { } } else { - if (global.main->warning.verbosity == f_console_verbosity_debug) { + if (global.main->warning.verbosity == f_console_verbosity_debug_e) { controller_entry_settings_read_print_setting_unknown_action(is_entry, global, *cache); } diff --git a/level_3/controller/c/private-entry_print.c b/level_3/controller/c/private-entry_print.c index 7c997fe..afb3fea 100644 --- a/level_3/controller/c/private-entry_print.c +++ b/level_3/controller/c/private-entry_print.c @@ -26,7 +26,7 @@ extern "C" { #ifndef _di_controller_entry_preprocess_print_simulate_setting_value_ void controller_entry_preprocess_print_simulate_setting_value(const bool is_entry, const controller_global_t global, const f_string_t name, const f_string_t name_sub, const f_string_static_t value, const f_string_t suffix) { - if (global.main->error.verbosity != f_console_verbosity_debug && !(global.main->error.verbosity == f_console_verbosity_verbose && global.main->parameters[controller_parameter_simulate].result == f_console_result_found)) { + if (global.main->error.verbosity != f_console_verbosity_debug_e && !(global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e)) { return; } @@ -54,7 +54,7 @@ extern "C" { #ifndef _di_controller_entry_print_error_ void controller_entry_print_error(const bool is_entry, const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const f_string_t function, const bool fallback, controller_thread_t *thread) { - if (print.verbosity == f_console_verbosity_quiet) return; + if (print.verbosity == f_console_verbosity_quiet_e) return; if (status == F_interrupt) return; // fll_error_print() automatically locks, so manually handle only the mutex locking and flushing rather than calling controller_lock_print(). @@ -103,7 +103,7 @@ extern "C" { #ifndef _di_controller_entry_settings_read_print_setting_requires_exactly_ void controller_entry_settings_read_print_setting_requires_exactly(const bool is_entry, const controller_global_t global, const controller_cache_t cache, const f_number_unsigned_t total) { - if (global.main->error.verbosity == f_console_verbosity_quiet) return; + if (global.main->error.verbosity == f_console_verbosity_quiet_e) return; controller_lock_print(global.main->error.to, global.thread); @@ -122,7 +122,7 @@ extern "C" { #ifndef _di_controller_entry_settings_read_print_setting_unknown_action_ void controller_entry_settings_read_print_setting_unknown_action(const bool is_entry, const controller_global_t global, const controller_cache_t cache) { - if (global.main->warning.verbosity != f_console_verbosity_debug) return; + if (global.main->warning.verbosity != f_console_verbosity_debug_e) return; controller_lock_print(global.main->warning.to, global.thread); @@ -139,7 +139,7 @@ extern "C" { #ifndef _di_controller_entry_settings_read_print_setting_unknown_action_value_ void controller_entry_settings_read_print_setting_unknown_action_value(const bool is_entry, const controller_global_t global, const controller_cache_t cache, const f_array_length_t index) { - if (global.main->warning.verbosity != f_console_verbosity_debug) return; + if (global.main->warning.verbosity != f_console_verbosity_debug_e) return; controller_lock_print(global.main->warning.to, global.thread); diff --git a/level_3/controller/c/private-lock.c b/level_3/controller/c/private-lock.c index 8ff399d..a18fd98 100644 --- a/level_3/controller/c/private-lock.c +++ b/level_3/controller/c/private-lock.c @@ -67,7 +67,7 @@ extern "C" { #ifndef _di_controller_lock_read_process_type_ f_status_t controller_lock_read_process_type(const uint8_t type, controller_thread_t * const thread, f_thread_lock_t *lock) { - return controller_lock_read(type != controller_process_type_exit, thread, lock); + return controller_lock_read(type != controller_process_type_exit_e, thread, lock); } #endif // _di_controller_lock_read_process_type_ @@ -108,7 +108,7 @@ extern "C" { #ifndef _di_controller_lock_write_process_type_ f_status_t controller_lock_write_process_type(const uint8_t type, controller_thread_t * const thread, f_thread_lock_t *lock) { - return controller_lock_write(type != controller_process_type_exit, thread, lock); + return controller_lock_write(type != controller_process_type_exit_e, thread, lock); } #endif // _di_controller_lock_write_process_type_ diff --git a/level_3/controller/c/private-lock_print.c b/level_3/controller/c/private-lock_print.c index 4f78afd..2e1d0fa 100644 --- a/level_3/controller/c/private-lock_print.c +++ b/level_3/controller/c/private-lock_print.c @@ -12,7 +12,7 @@ extern "C" { // A signal is not an error. if (status == F_interrupt) return; - if (print.verbosity != f_console_verbosity_quiet) { + if (print.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(print.to, thread); fl_print_format("%c%[%SThe pid file '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix ? print.prefix : f_string_empty_s, print.context); diff --git a/level_3/controller/c/private-process.c b/level_3/controller/c/private-process.c index 5f9dfc9..4d1874a 100644 --- a/level_3/controller/c/private-process.c +++ b/level_3/controller/c/private-process.c @@ -100,7 +100,7 @@ extern "C" { #ifndef _di_controller_process_prepare_process_type_ f_status_t controller_process_prepare_process_type(const uint8_t type, const uint8_t action, const f_string_static_t alias, const controller_global_t global, f_array_length_t *id) { - return controller_process_prepare(type != controller_process_type_exit, action, alias, global, id); + return controller_process_prepare(type != controller_process_type_exit_e, action, alias, global, id); } #endif // _di_controller_process_prepare_process_type_ @@ -152,7 +152,7 @@ extern "C" { break; } - if (!controller_rule_status_is_available(process->action, process->rule) && !(process->state == controller_process_state_active || process->state == controller_process_state_busy)) { + if (!controller_rule_status_is_available(process->action, process->rule) && !(process->state == controller_process_state_active_e || process->state == controller_process_state_busy_e)) { f_thread_unlock(&process->lock); return F_none; diff --git a/level_3/controller/c/private-rule.c b/level_3/controller/c/private-rule.c index ad38903..870d6e6 100644 --- a/level_3/controller/c/private-rule.c +++ b/level_3/controller/c/private-rule.c @@ -21,12 +21,12 @@ extern "C" { f_string_static_t buffer = f_string_static_t_initialize; switch (type) { - case controller_rule_action_method_extended: + case controller_rule_action_method_extended_e: buffer.string = controller_rule_action_method_string_extended_s; buffer.used = controller_rule_action_method_string_extended_s_length; break; - case controller_rule_action_method_extended_list: + case controller_rule_action_method_extended_list_e: buffer.string = controller_rule_action_method_string_extended_list_s; buffer.used = controller_rule_action_method_string_extended_list_s_length; break; @@ -138,43 +138,43 @@ extern "C" { #ifndef _di_controller_rule_action_type_to_action_execute_type_ uint8_t controller_rule_action_type_to_action_execute_type(const uint8_t type) { - if (type == controller_rule_action_type_freeze) { - return controller_rule_action_type_execute_freeze; + if (type == controller_rule_action_type_freeze_e) { + return controller_rule_action_type_execute_freeze_e; } - if (type == controller_rule_action_type_kill) { - return controller_rule_action_type_execute_kill; + if (type == controller_rule_action_type_kill_e) { + return controller_rule_action_type_execute_kill_e; } - if (type == controller_rule_action_type_pause) { - return controller_rule_action_type_execute_pause; + if (type == controller_rule_action_type_pause_e) { + return controller_rule_action_type_execute_pause_e; } - if (type == controller_rule_action_type_reload) { - return controller_rule_action_type_execute_reload; + if (type == controller_rule_action_type_reload_e) { + return controller_rule_action_type_execute_reload_e; } - if (type == controller_rule_action_type_restart) { - return controller_rule_action_type_execute_restart; + if (type == controller_rule_action_type_restart_e) { + return controller_rule_action_type_execute_restart_e; } - if (type == controller_rule_action_type_resume) { - return controller_rule_action_type_execute_resume; + if (type == controller_rule_action_type_resume_e) { + return controller_rule_action_type_execute_resume_e; } - if (type == controller_rule_action_type_start) { - return controller_rule_action_type_execute_start; + if (type == controller_rule_action_type_start_e) { + return controller_rule_action_type_execute_start_e; } - if (type == controller_rule_action_type_stop) { - return controller_rule_action_type_execute_stop; + if (type == controller_rule_action_type_stop_e) { + return controller_rule_action_type_execute_stop_e; } - if (type == controller_rule_action_type_thaw) { - return controller_rule_action_type_execute_thaw; + if (type == controller_rule_action_type_thaw_e) { + return controller_rule_action_type_execute_thaw_e; } - return controller_rule_action_type_execute__enum_size; + return controller_rule_action_type_execute__enum_size_e; } #endif // _di_controller_rule_action_type_to_action_execute_type_ @@ -184,72 +184,72 @@ extern "C" { f_string_static_t buffer = f_string_static_t_initialize; switch (type) { - case controller_rule_action_type_freeze: + case controller_rule_action_type_freeze_e: buffer.string = controller_freeze_s; buffer.used = controller_freeze_s_length; break; - case controller_rule_action_type_group: + case controller_rule_action_type_group_e: buffer.string = controller_group_s; buffer.used = controller_group_s_length; break; - case controller_rule_action_type_kill: + case controller_rule_action_type_kill_e: buffer.string = controller_kill_s; buffer.used = controller_kill_s_length; break; - case controller_rule_action_type_pause: + case controller_rule_action_type_pause_e: buffer.string = controller_pause_s; buffer.used = controller_pause_s_length; break; - case controller_rule_action_type_pid_file: + case controller_rule_action_type_pid_file_e: buffer.string = controller_pid_file_s; buffer.used = controller_pid_file_s_length; break; - case controller_rule_action_type_rerun: + case controller_rule_action_type_rerun_e: buffer.string = controller_rerun_s; buffer.used = controller_rerun_s_length; break; - case controller_rule_action_type_reload: + case controller_rule_action_type_reload_e: buffer.string = controller_reload_s; buffer.used = controller_reload_s_length; break; - case controller_rule_action_type_restart: + case controller_rule_action_type_restart_e: buffer.string = controller_restart_s; buffer.used = controller_restart_s_length; break; - case controller_rule_action_type_resume: + case controller_rule_action_type_resume_e: buffer.string = controller_resume_s; buffer.used = controller_resume_s_length; break; - case controller_rule_action_type_start: + case controller_rule_action_type_start_e: buffer.string = controller_start_s; buffer.used = controller_start_s_length; break; - case controller_rule_action_type_stop: + case controller_rule_action_type_stop_e: buffer.string = controller_stop_s; buffer.used = controller_stop_s_length; break; - case controller_rule_action_type_thaw: + case controller_rule_action_type_thaw_e: buffer.string = controller_thaw_s; buffer.used = controller_thaw_s_length; break; - case controller_rule_action_type_user: + case controller_rule_action_type_user_e: buffer.string = controller_user_s; buffer.used = controller_user_s_length; break; - case controller_rule_action_type_with: + case controller_rule_action_type_with_e: buffer.string = controller_with_s; buffer.used = controller_with_s_length; break; @@ -267,47 +267,47 @@ extern "C" { f_string_static_t buffer = f_string_static_t_initialize; switch (type) { - case controller_rule_action_type_execute_freeze: + case controller_rule_action_type_execute_freeze_e: buffer.string = controller_freeze_s; buffer.used = controller_freeze_s_length; break; - case controller_rule_action_type_execute_kill: + case controller_rule_action_type_execute_kill_e: buffer.string = controller_kill_s; buffer.used = controller_kill_s_length; break; - case controller_rule_action_type_execute_pause: + case controller_rule_action_type_execute_pause_e: buffer.string = controller_pause_s; buffer.used = controller_pause_s_length; break; - case controller_rule_action_type_execute_reload: + case controller_rule_action_type_execute_reload_e: buffer.string = controller_reload_s; buffer.used = controller_reload_s_length; break; - case controller_rule_action_type_execute_restart: + case controller_rule_action_type_execute_restart_e: buffer.string = controller_restart_s; buffer.used = controller_restart_s_length; break; - case controller_rule_action_type_execute_resume: + case controller_rule_action_type_execute_resume_e: buffer.string = controller_resume_s; buffer.used = controller_resume_s_length; break; - case controller_rule_action_type_execute_start: + case controller_rule_action_type_execute_start_e: buffer.string = controller_start_s; buffer.used = controller_start_s_length; break; - case controller_rule_action_type_execute_stop: + case controller_rule_action_type_execute_stop_e: buffer.string = controller_stop_s; buffer.used = controller_stop_s_length; break; - case controller_rule_action_type_execute_thaw: + case controller_rule_action_type_execute_thaw_e: buffer.string = controller_thaw_s; buffer.used = controller_thaw_s_length; break; @@ -324,7 +324,7 @@ extern "C" { f_status_t status = F_none; - if (method == controller_rule_action_method_extended_list) { + if (method == controller_rule_action_method_extended_list_e) { cache->comments.used = 0; cache->delimits.used = 0; cache->content_action.used = 0; @@ -345,7 +345,7 @@ extern "C" { if (F_status_is_error(status)) { controller_print_error(global.main->error, F_status_set_fine(status), "fl_fss_extended_list_content_read", F_true, global.thread); } - else if (status == FL_fss_found_content) { + else if (status == F_fss_found_content) { status = fl_fss_apply_delimit(cache->delimits, &cache->buffer_item); if (F_status_is_error(status)) { @@ -354,7 +354,7 @@ extern "C" { else { // "script" and "utility" types use the entire content and can be directly passed through. - if (item->type == controller_rule_item_type_script || item->type == controller_rule_item_type_utility) { + if (item->type == controller_rule_item_type_script_e || item->type == controller_rule_item_type_utility_e) { actions->array[actions->used].parameters.used = 0; status = f_string_dynamics_increase(controller_common_allocation_small_d, &actions->array[actions->used].parameters); @@ -467,13 +467,13 @@ extern "C" { if (F_status_is_error(status)) { controller_print_error(global.main->error, F_status_set_fine(status), "fll_fss_extended_content_read", F_true, global.thread); } - else if (status == FL_fss_found_content) { + else if (status == F_fss_found_content) { status = fl_fss_apply_delimit(cache->delimits, &cache->buffer_item); if (F_status_is_error(status)) { controller_print_error(global.main->error, F_status_set_fine(status), "fl_fss_apply_delimit", F_true, global.thread); } - else if (type == controller_rule_action_type_pid_file) { + else if (type == controller_rule_action_type_pid_file_e) { item->pid_file.used = 0; status = fl_string_dynamic_rip(cache->buffer_item, cache->content_action.array[0], &item->pid_file); @@ -489,41 +489,41 @@ extern "C" { } } } - else if (type == controller_rule_action_type_rerun) { + else if (type == controller_rule_action_type_rerun_e) { uint8_t type_rerun = 0; if (cache->content_action.used) { if (fl_string_dynamic_partial_compare_string(controller_freeze_s, cache->buffer_item, controller_freeze_s_length, cache->content_action.array[0]) == F_equal_to) { - type_rerun = controller_rule_action_type_execute_freeze; + type_rerun = controller_rule_action_type_execute_freeze_e; } if (fl_string_dynamic_partial_compare_string(controller_kill_s, cache->buffer_item, controller_kill_s_length, cache->content_action.array[0]) == F_equal_to) { - type_rerun = controller_rule_action_type_execute_kill; + type_rerun = controller_rule_action_type_execute_kill_e; } else if (fl_string_dynamic_partial_compare_string(controller_pause_s, cache->buffer_item, controller_pause_s_length, cache->content_action.array[0]) == F_equal_to) { - type_rerun = controller_rule_action_type_execute_pause; + type_rerun = controller_rule_action_type_execute_pause_e; } else if (fl_string_dynamic_partial_compare_string(controller_reload_s, cache->buffer_item, controller_reload_s_length, cache->content_action.array[0]) == F_equal_to) { - type_rerun = controller_rule_action_type_execute_reload; + type_rerun = controller_rule_action_type_execute_reload_e; } else if (fl_string_dynamic_partial_compare_string(controller_restart_s, cache->buffer_item, controller_restart_s_length, cache->content_action.array[0]) == F_equal_to) { - type_rerun = controller_rule_action_type_execute_restart; + type_rerun = controller_rule_action_type_execute_restart_e; } else if (fl_string_dynamic_partial_compare_string(controller_resume_s, cache->buffer_item, controller_resume_s_length, cache->content_action.array[0]) == F_equal_to) { - type_rerun = controller_rule_action_type_execute_resume; + type_rerun = controller_rule_action_type_execute_resume_e; } else if (fl_string_dynamic_partial_compare_string(controller_start_s, cache->buffer_item, controller_start_s_length, cache->content_action.array[0]) == F_equal_to) { - type_rerun = controller_rule_action_type_execute_start; + type_rerun = controller_rule_action_type_execute_start_e; } else if (fl_string_dynamic_partial_compare_string(controller_stop_s, cache->buffer_item, controller_stop_s_length, cache->content_action.array[0]) == F_equal_to) { - type_rerun = controller_rule_action_type_execute_stop; + type_rerun = controller_rule_action_type_execute_stop_e; } else if (fl_string_dynamic_partial_compare_string(controller_thaw_s, cache->buffer_item, controller_thaw_s_length, cache->content_action.array[0]) == F_equal_to) { - type_rerun = controller_rule_action_type_execute_thaw; + type_rerun = controller_rule_action_type_execute_thaw_e; } } if (!type_rerun) { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global.main->error.to, global.thread); fl_print_format("%c%[%SRule item action '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, global.main->error.context); @@ -563,7 +563,7 @@ extern "C" { } } else { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global.main->error.to, global.thread); fl_print_format("%c%[%SRule item action '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, global.main->error.context); @@ -595,7 +595,7 @@ extern "C" { item->reruns[type_rerun].is |= rerun_item == &item->reruns[type_rerun].failure ? controller_rule_rerun_is_failure_reset_d : controller_rule_rerun_is_success_reset_d; } else { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global.main->error.to, global.thread); fl_print_format("%c%[%SRule item action '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, global.main->error.context); @@ -613,7 +613,7 @@ extern "C" { } } // for } - else if (type == controller_rule_action_type_with) { + else if (type == controller_rule_action_type_with_e) { for (f_array_length_t i = 0; i < cache->content_action.used; ++i) { @@ -637,7 +637,7 @@ extern "C" { } } else { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global.main->error.to, global.thread); fl_print_format("%c%[%SUnknown value '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, global.main->error.context); @@ -655,7 +655,7 @@ extern "C" { } } // for } - else if (item->type == controller_rule_item_type_script || item->type == controller_rule_item_type_utility) { + else if (item->type == controller_rule_item_type_script_e || item->type == controller_rule_item_type_utility_e) { status = f_string_dynamics_increase(controller_common_allocation_small_d, &actions->array[actions->used].parameters); if (F_status_is_error(status)) { @@ -721,7 +721,7 @@ extern "C" { } if (F_status_is_error_not(status) && status == F_data_not) { - if (global.main->warning.verbosity == f_console_verbosity_debug) { + if (global.main->warning.verbosity == f_console_verbosity_debug_e) { controller_lock_print(global.main->warning.to, global.thread); fl_print_format("%c%[%SAction is empty, nothing to do.%]%c", global.main->warning.to.stream, f_string_eol_s[0], global.main->warning.context, global.main->warning.prefix, global.main->warning.context, f_string_eol_s[0]); @@ -758,7 +758,7 @@ extern "C" { } if (F_status_is_error(status)) { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { status = F_status_set_fine(status); if (status != F_valid_not && status != F_number && status != F_number_decimal && status != F_number_overflow && status != F_number_underflow && status != F_number_negative) { @@ -813,7 +813,7 @@ extern "C" { macro_f_control_group_t_delete_simple(destination->control_group) f_capability_delete(&destination->capability); - for (f_array_length_t i = 0; i < controller_rule_action_type__enum_size; ++i) { + for (f_array_length_t i = 0; i < controller_rule_action_type__enum_size_e; ++i) { destination->status[i] = source.status[i]; } // for @@ -984,7 +984,7 @@ extern "C" { status = f_string_dynamic_terminate_after(&item_destination->pid_file); if (F_status_is_error(status)) return status; - for (j = 0; j < controller_rule_action_type_execute__enum_size; ++j) { + for (j = 0; j < controller_rule_action_type_execute__enum_size_e; ++j) { item_destination->reruns[j].is = item_source->reruns[j].is; item_destination->reruns[j].failure.count = item_source->reruns[j].failure.count; item_destination->reruns[j].failure.delay = item_source->reruns[j].failure.delay; @@ -1056,7 +1056,7 @@ extern "C" { status = fll_control_group_prepare(process->rule.control_group); if (F_status_is_error(status)) { - controller_print_error_file(global.main->error, F_status_set_fine(status), "fll_control_group_prepare", F_true, process->rule.control_group.path.string, "prepare control groups for", fll_error_file_type_directory, global.thread); + controller_print_error_file(global.main->error, F_status_set_fine(status), "fll_control_group_prepare", F_true, process->rule.control_group.path.string, "prepare control groups for", fll_error_file_type_directory_e, global.thread); return status; } @@ -1097,7 +1097,7 @@ extern "C" { for (i = 0; i < process->rule.items.used && controller_thread_is_enabled_process(process, global.thread); ++i) { - if (process->rule.items.array[i].type == controller_rule_item_type_setting) continue; + if (process->rule.items.array[i].type == controller_rule_item_type_setting_e) continue; for (j = 0; j < process->rule.items.array[i].actions.used; ++j) { @@ -1120,7 +1120,7 @@ extern "C" { execute_set.parameter.option |= FL_execute_parameter_option_session_d; } - if (process->rule.items.array[i].type == controller_rule_item_type_command) { + if (process->rule.items.array[i].type == controller_rule_item_type_command_e) { for (;;) { status = controller_rule_execute_foreground(process->rule.items.array[i].type, 0, process->rule.items.array[i].actions.array[j].parameters, options, &execute_set, process); @@ -1148,7 +1148,7 @@ extern "C" { success = F_true; } } - else if (process->rule.items.array[i].type == controller_rule_item_type_script) { + else if (process->rule.items.array[i].type == controller_rule_item_type_script_e) { execute_set.parameter.data = &process->rule.items.array[i].actions.array[j].parameters.array[0]; for (;;) { @@ -1178,7 +1178,7 @@ extern "C" { success = F_true; } } - else if (process->rule.items.array[i].type == controller_rule_item_type_service) { + else if (process->rule.items.array[i].type == controller_rule_item_type_service_e) { if (process->rule.items.array[i].pid_file.used) { for (;;) { @@ -1214,7 +1214,7 @@ extern "C" { controller_rule_action_print_error_missing_pid(global.main->error, process->rule.alias.string); } } - else if (process->rule.items.array[i].type == controller_rule_item_type_utility) { + else if (process->rule.items.array[i].type == controller_rule_item_type_utility_e) { if (process->rule.items.array[i].pid_file.used) { execute_set.parameter.data = &process->rule.items.array[i].actions.array[j].parameters.array[0]; @@ -1253,7 +1253,7 @@ extern "C" { } } else { - if (global.main->warning.verbosity == f_console_verbosity_debug) { + if (global.main->warning.verbosity == f_console_verbosity_debug_e) { controller_lock_print(global.main->warning.to, global.thread); fl_print_format("%c%[%SAction type is unknown, ignoring.%]%c", global.main->warning.to.stream, f_string_eol_s[0], global.main->warning.context, global.main->warning.prefix, global.main->warning.context, f_string_eol_s[0]); @@ -1348,7 +1348,7 @@ extern "C" { } if (options & controller_process_option_simulate_d) { - if (main->output.verbosity != f_console_verbosity_quiet) { + if (main->output.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(main->output.to, thread); fl_print_format("%cSimulating execution of '%[", main->output.to.stream, f_string_eol_s[0], main->context.set.title); @@ -1514,7 +1514,7 @@ extern "C" { status = F_status_set_fine(status); if ((WIFEXITED(process->result) && WEXITSTATUS(process->result)) || status == F_control_group || status == F_failure || status == F_limit || status == F_processor || status == F_schedule) { - controller_rule_item_print_error_execute(type == controller_rule_item_type_script, program ? program : arguments.used ? arguments.array[0].string : f_string_empty_s, status, process); + controller_rule_item_print_error_execute(type == controller_rule_item_type_script_e, program ? program : arguments.used ? arguments.array[0].string : f_string_empty_s, status, process); } else { controller_print_error(main->error, F_status_set_fine(status), "fll_execute_program", F_true, thread); @@ -1584,13 +1584,13 @@ extern "C" { status = f_file_exists(pid_file.string); if (F_status_is_error(status)) { - controller_print_error_file(main->error, F_status_set_fine(status), "f_file_exists", F_true, pid_file.string, "find", fll_error_file_type_file, thread); + controller_print_error_file(main->error, F_status_set_fine(status), "f_file_exists", F_true, pid_file.string, "find", fll_error_file_type_file_e, thread); return status; } if (status == F_true) { - controller_print_error_file(main->error, F_file_found, "f_file_exists", F_true, pid_file.string, "find", fll_error_file_type_file, thread); + controller_print_error_file(main->error, F_file_found, "f_file_exists", F_true, pid_file.string, "find", fll_error_file_type_file_e, thread); return F_status_set_error(F_file_found); } @@ -1604,7 +1604,7 @@ extern "C" { } if (options & controller_process_option_simulate_d) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(main->error.to, thread); fl_print_format("%cSimulating execution of '%[", main->error.to.stream, f_string_eol_s[0], main->context.set.title); @@ -1770,7 +1770,7 @@ extern "C" { status = F_status_set_fine(status); if ((WIFEXITED(process->result) && WEXITSTATUS(process->result)) || status == F_control_group || status == F_failure || status == F_limit || status == F_processor || status == F_schedule) { - controller_rule_item_print_error_execute(type == controller_rule_item_type_utility, program ? program : arguments.used ? arguments.array[0].string : f_string_empty_s, status, process); + controller_rule_item_print_error_execute(type == controller_rule_item_type_utility_e, program ? program : arguments.used ? arguments.array[0].string : f_string_empty_s, status, process); } else { controller_print_error(main->error, F_status_set_fine(status), "fll_execute_program", F_true, thread); @@ -1796,7 +1796,7 @@ extern "C" { if (!controller_thread_is_enabled_process(process, thread)) return -2; if (!rerun_item->max || rerun_item->count < rerun_item->max) { - if (main->error.verbosity == f_console_verbosity_debug) { + if (main->error.verbosity == f_console_verbosity_debug_e) { controller_lock_print(main->output.to, thread); fl_print_format("%cRe-running '", main->output.to.stream, f_string_eol_s[0]); @@ -1934,7 +1934,7 @@ extern "C" { break; } - if (status == FL_fss_found_object) { + if (status == F_fss_found_object) { multiple = F_true; } else { @@ -1953,7 +1953,7 @@ extern "C" { // Nothing of importance here, so continue onto the next line. // @todo present an error if this line is anything but whitespace. - if (status != FL_fss_found_object) continue; + if (status != F_fss_found_object) continue; } status = fl_fss_apply_delimit(cache->delimits, &cache->buffer_item); @@ -1981,49 +1981,49 @@ extern "C" { } if (fl_string_dynamic_compare_string(controller_freeze_s, cache->action.name_action, controller_freeze_s_length) == F_equal_to) { - type = controller_rule_action_type_freeze; + type = controller_rule_action_type_freeze_e; } else if (fl_string_dynamic_compare_string(controller_group_s, cache->action.name_action, controller_group_s_length) == F_equal_to) { - type = controller_rule_action_type_group; + type = controller_rule_action_type_group_e; } else if (fl_string_dynamic_compare_string(controller_kill_s, cache->action.name_action, controller_kill_s_length) == F_equal_to) { - type = controller_rule_action_type_kill; + type = controller_rule_action_type_kill_e; } else if (fl_string_dynamic_compare_string(controller_pause_s, cache->action.name_action, controller_pause_s_length) == F_equal_to) { - type = controller_rule_action_type_pause; + type = controller_rule_action_type_pause_e; } else if (fl_string_dynamic_compare_string(controller_pid_file_s, cache->action.name_action, controller_pid_file_s_length) == F_equal_to) { - type = controller_rule_action_type_pid_file; + type = controller_rule_action_type_pid_file_e; } else if (fl_string_dynamic_compare_string(controller_reload_s, cache->action.name_action, controller_reload_s_length) == F_equal_to) { - type = controller_rule_action_type_reload; + type = controller_rule_action_type_reload_e; } else if (fl_string_dynamic_compare_string(controller_rerun_s, cache->action.name_action, controller_rerun_s_length) == F_equal_to) { - type = controller_rule_action_type_rerun; + type = controller_rule_action_type_rerun_e; } else if (fl_string_dynamic_compare_string(controller_restart_s, cache->action.name_action, controller_restart_s_length) == F_equal_to) { - type = controller_rule_action_type_restart; + type = controller_rule_action_type_restart_e; } else if (fl_string_dynamic_compare_string(controller_resume_s, cache->action.name_action, controller_resume_s_length) == F_equal_to) { - type = controller_rule_action_type_resume; + type = controller_rule_action_type_resume_e; } else if (fl_string_dynamic_compare_string(controller_start_s, cache->action.name_action, controller_start_s_length) == F_equal_to) { - type = controller_rule_action_type_start; + type = controller_rule_action_type_start_e; } else if (fl_string_dynamic_compare_string(controller_stop_s, cache->action.name_action, controller_stop_s_length) == F_equal_to) { - type = controller_rule_action_type_stop; + type = controller_rule_action_type_stop_e; } else if (fl_string_dynamic_compare_string(controller_thaw_s, cache->action.name_action, controller_thaw_s_length) == F_equal_to) { - type = controller_rule_action_type_thaw; + type = controller_rule_action_type_thaw_e; } else if (fl_string_dynamic_compare_string(controller_user_s, cache->action.name_action, controller_user_s_length) == F_equal_to) { - type = controller_rule_action_type_user; + type = controller_rule_action_type_user_e; } else if (fl_string_dynamic_compare_string(controller_with_s, cache->action.name_action, controller_with_s_length) == F_equal_to) { - type = controller_rule_action_type_with; + type = controller_rule_action_type_with_e; } else { - if (global.main->warning.verbosity == f_console_verbosity_debug) { + if (global.main->warning.verbosity == f_console_verbosity_debug_e) { controller_lock_print(global.main->warning.to, global.thread); fl_print_format("%c%[%SUnknown rule item action '%]", global.main->warning.to.stream, f_string_eol_s[0], global.main->warning.context, global.main->warning.prefix, global.main->warning.context); @@ -2039,9 +2039,9 @@ extern "C" { } if (multiple) { - if (type == controller_rule_action_type_group || type == controller_rule_action_type_pid_file || type == controller_rule_action_type_user) { + if (type == controller_rule_action_type_group_e || type == controller_rule_action_type_pid_file_e || type == controller_rule_action_type_user_e) { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global.main->error.to, global.thread); fl_print_format("%c%[%SFSS Extended List is not allowed for the rule item action '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, global.main->error.context); @@ -2055,10 +2055,10 @@ extern "C" { break; } - method = controller_rule_action_method_extended_list; + method = controller_rule_action_method_extended_list_e; } else { - method = controller_rule_action_method_extended; + method = controller_rule_action_method_extended_e; } status = controller_rule_actions_increase_by(controller_common_allocation_small_d, &item->actions); @@ -2082,27 +2082,27 @@ extern "C" { f_string_static_t buffer = f_string_static_t_initialize; switch (type) { - case controller_rule_item_type_command: + case controller_rule_item_type_command_e: buffer.string = controller_command_s; buffer.used = controller_command_s_length; break; - case controller_rule_item_type_script: + case controller_rule_item_type_script_e: buffer.string = controller_script_s; buffer.used = controller_script_s_length; break; - case controller_rule_item_type_service: + case controller_rule_item_type_service_e: buffer.string = controller_service_s; buffer.used = controller_service_s_length; break; - case controller_rule_item_type_setting: + case controller_rule_item_type_setting_e: buffer.string = controller_setting_s; buffer.used = controller_setting_s_length; break; - case controller_rule_item_type_utility: + case controller_rule_item_type_utility_e: buffer.string = controller_utility_s; buffer.used = controller_utility_s_length; break; @@ -2141,82 +2141,82 @@ extern "C" { f_string_static_t buffer = f_string_static_t_initialize; switch (type) { - case controller_resource_limit_type_as: + case controller_resource_limit_type_as_e: buffer.string = controller_as_s; buffer.used = controller_as_s_length; break; - case controller_resource_limit_type_core: + case controller_resource_limit_type_core_e: buffer.string = controller_core_s; buffer.used = controller_core_s_length; break; - case controller_resource_limit_type_cpu: + case controller_resource_limit_type_cpu_e: buffer.string = controller_cpu_s; buffer.used = controller_cpu_s_length; break; - case controller_resource_limit_type_data: + case controller_resource_limit_type_data_e: buffer.string = controller_data_s; buffer.used = controller_data_s_length; break; - case controller_resource_limit_type_fsize: + case controller_resource_limit_type_fsize_e: buffer.string = controller_fsize_s; buffer.used = controller_fsize_s_length; break; - case controller_resource_limit_type_locks: + case controller_resource_limit_type_locks_e: buffer.string = controller_locks_s; buffer.used = controller_locks_s_length; break; - case controller_resource_limit_type_memlock: + case controller_resource_limit_type_memlock_e: buffer.string = controller_memlock_s; buffer.used = controller_memlock_s_length; break; - case controller_resource_limit_type_msgqueue: + case controller_resource_limit_type_msgqueue_e: buffer.string = controller_msgqueue_s; buffer.used = controller_msgqueue_s_length; break; - case controller_resource_limit_type_nice: + case controller_resource_limit_type_nice_e: buffer.string = controller_nice_s; buffer.used = controller_nice_s_length; break; - case controller_resource_limit_type_nofile: + case controller_resource_limit_type_nofile_e: buffer.string = controller_nofile_s; buffer.used = controller_nofile_s_length; break; - case controller_resource_limit_type_nproc: + case controller_resource_limit_type_nproc_e: buffer.string = controller_nproc_s; buffer.used = controller_nproc_s_length; break; - case controller_resource_limit_type_rss: + case controller_resource_limit_type_rss_e: buffer.string = controller_rss_s; buffer.used = controller_rss_s_length; break; - case controller_resource_limit_type_rtprio: + case controller_resource_limit_type_rtprio_e: buffer.string = controller_rtprio_s; buffer.used = controller_rtprio_s_length; break; - case controller_resource_limit_type_rttime: + case controller_resource_limit_type_rttime_e: buffer.string = controller_rttime_s; buffer.used = controller_rttime_s_length; break; - case controller_resource_limit_type_sigpending: + case controller_resource_limit_type_sigpending_e: buffer.string = controller_sigpending_s; buffer.used = controller_sigpending_s_length; break; - case controller_resource_limit_type_stack: + case controller_resource_limit_type_stack_e: buffer.string = controller_stack_s; buffer.used = controller_stack_s_length; break; @@ -2232,19 +2232,19 @@ extern "C" { f_status_t controller_rule_process(const controller_global_t global, controller_process_t *process) { switch (process->action) { - case controller_rule_action_type_freeze: - case controller_rule_action_type_kill: - case controller_rule_action_type_pause: - case controller_rule_action_type_reload: - case controller_rule_action_type_restart: - case controller_rule_action_type_resume: - case controller_rule_action_type_start: - case controller_rule_action_type_stop: - case controller_rule_action_type_thaw: + case controller_rule_action_type_freeze_e: + case controller_rule_action_type_kill_e: + case controller_rule_action_type_pause_e: + case controller_rule_action_type_reload_e: + case controller_rule_action_type_restart_e: + case controller_rule_action_type_resume_e: + case controller_rule_action_type_start_e: + case controller_rule_action_type_stop_e: + case controller_rule_action_type_thaw_e: break; default: - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global.main->error.to, global.thread); fl_print_format("%c%[%SUnsupported action type '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, global.main->error.context); @@ -2375,7 +2375,7 @@ extern "C" { } - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global.main->error.to, global.thread); controller_rule_item_print_error_rule_not_loaded(global.main->error, dynamics[i]->array[j].string); @@ -2449,7 +2449,7 @@ extern "C" { } } else { - if (global.main->warning.verbosity == f_console_verbosity_debug) { + if (global.main->warning.verbosity == f_console_verbosity_debug_e) { controller_lock_print(global.main->warning.to, global.thread); controller_rule_item_print_error_need_want_wish(global.main->warning, strings[i], dynamics[i]->array[j].string, "was not found"); @@ -2490,7 +2490,7 @@ extern "C" { status = status_lock; } - else if (dependency->state == controller_process_state_active || dependency->state == controller_process_state_busy) { + else if (dependency->state == controller_process_state_active_e || dependency->state == controller_process_state_busy_e) { f_thread_unlock(&dependency->lock); status = controller_process_wait(global, dependency); @@ -2515,7 +2515,7 @@ extern "C" { options_process = 0; - if (global.main->parameters[controller_parameter_simulate].result == f_console_result_found) { + if (global.main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e) { options_process |= controller_process_option_simulate_d; } @@ -2548,7 +2548,7 @@ extern "C" { } } else { - if (global.main->warning.verbosity == f_console_verbosity_debug) { + if (global.main->warning.verbosity == f_console_verbosity_debug_e) { controller_lock_print(global.main->warning.to, global.thread); controller_rule_item_print_error_need_want_wish(global.main->warning, strings[i], alias_other_buffer, "failed during execution"); @@ -2610,7 +2610,7 @@ extern "C" { } } else { - if (global.main->warning.verbosity == f_console_verbosity_debug) { + if (global.main->warning.verbosity == f_console_verbosity_debug_e) { controller_lock_print(global.main->warning.to, global.thread); controller_rule_item_print_error_need_want_wish(global.main->warning, strings[i], alias_other_buffer, "is in a failed state"); @@ -2673,7 +2673,7 @@ extern "C" { } // for if (missing) { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global.main->error.to, global.thread); if (process->rule.items.used) { @@ -2825,12 +2825,12 @@ extern "C" { { f_array_length_t at = 0; - status = controller_process_prepare(type != controller_process_type_exit, action, alias_rule, global, &at); + status = controller_process_prepare(type != controller_process_type_exit_e, action, alias_rule, global, &at); if (F_status_is_error(status)) { f_thread_unlock(&global.thread->lock.process); - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global.main->error.to, global.thread); controller_rule_item_print_error_rule_not_loaded(global.main->error, alias_rule.string); @@ -2870,7 +2870,7 @@ extern "C" { f_thread_unlock(&global.thread->lock.process); // if the process is already running, then there is nothing to do. - if (process->state == controller_process_state_active || process->state == controller_process_state_busy) { + if (process->state == controller_process_state_active_e || process->state == controller_process_state_busy_e) { f_thread_unlock(&process->lock); f_thread_unlock(&process->active); @@ -2878,7 +2878,7 @@ extern "C" { } // the thread is done, so close the thread. - if (process->state == controller_process_state_done) { + if (process->state == controller_process_state_done_e) { controller_thread_join(&process->id_thread); f_thread_mutex_lock(&process->wait_lock); @@ -2901,7 +2901,7 @@ extern "C" { return status_lock; } - process->state = controller_process_state_active; + process->state = controller_process_state_active_e; process->action = action; process->options = options; process->type = type; @@ -2970,7 +2970,7 @@ extern "C" { if (F_status_is_error_not(status)) { if (process->action && (options_force & controller_process_option_asynchronous_d)) { - if (process->type == controller_process_type_exit) { + if (process->type == controller_process_type_exit_e) { status = f_thread_create(0, &process->id_thread, controller_thread_process_other, (void *) process); } else { @@ -2992,7 +2992,7 @@ extern "C" { } } - if (!action || F_status_is_error(status) && (process->state == controller_process_state_active || process->state == controller_process_state_busy)) { + if (!action || F_status_is_error(status) && (process->state == controller_process_state_active_e || process->state == controller_process_state_busy_e)) { { status_lock = controller_lock_write_process(process, global.thread, &process->lock); @@ -3006,10 +3006,10 @@ extern "C" { } if (!action || (options_force & controller_process_option_asynchronous_d)) { - process->state = controller_process_state_done; + process->state = controller_process_state_done_e; } else { - process->state = controller_process_state_idle; + process->state = controller_process_state_idle_e; } f_thread_mutex_lock(&process->wait_lock); @@ -3136,7 +3136,7 @@ extern "C" { for (f_array_length_t i = 0; i < process->stack.used && controller_thread_is_enabled_process(process, global.thread); ++i) { if (process->stack.array[i] == id_rule) { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global.main->error.to, global.thread); fl_print_format("%c%[%SThe rule '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, global.main->error.context); @@ -3214,7 +3214,7 @@ extern "C" { status = F_status_set_error(F_found_not); - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global.main->error.to, global.thread); controller_rule_item_print_error_rule_not_loaded(global.main->error, process->rule.alias.string); @@ -3283,10 +3283,10 @@ extern "C" { } if (options_force & controller_process_option_asynchronous_d) { - process->state = controller_process_state_done; + process->state = controller_process_state_done_e; } else { - process->state = controller_process_state_idle; + process->state = controller_process_state_idle_e; } process->stack.used = used_original_stack; @@ -3317,7 +3317,7 @@ extern "C" { bool for_item = F_true; - for (f_array_length_t i = 0; i < controller_rule_action_type__enum_size; ++i) { + for (f_array_length_t i = 0; i < controller_rule_action_type__enum_size_e; ++i) { rule->status[i] = F_known_not; } // for @@ -3495,19 +3495,19 @@ extern "C" { rule->items.array[rule->items.used].type = 0; } else if (fl_string_dynamic_compare_string(controller_command_s, cache->action.name_item, controller_command_s_length) == F_equal_to) { - rule->items.array[rule->items.used].type = controller_rule_item_type_command; + rule->items.array[rule->items.used].type = controller_rule_item_type_command_e; } else if (fl_string_dynamic_compare_string(controller_script_s, cache->action.name_item, controller_script_s_length) == F_equal_to) { - rule->items.array[rule->items.used].type = controller_rule_item_type_script; + rule->items.array[rule->items.used].type = controller_rule_item_type_script_e; } else if (fl_string_dynamic_compare_string(controller_service_s, cache->action.name_item, controller_service_s_length) == F_equal_to) { - rule->items.array[rule->items.used].type = controller_rule_item_type_service; + rule->items.array[rule->items.used].type = controller_rule_item_type_service_e; } else if (fl_string_dynamic_compare_string(controller_utility_s, cache->action.name_item, controller_utility_s_length) == F_equal_to) { - rule->items.array[rule->items.used].type = controller_rule_item_type_utility; + rule->items.array[rule->items.used].type = controller_rule_item_type_utility_e; } else { - if (global.main->warning.verbosity == f_console_verbosity_debug) { + if (global.main->warning.verbosity == f_console_verbosity_debug_e) { controller_lock_print(global.main->warning.to, global.thread); fl_print_format("%c%[%SUnknown rule item '%]", global.main->warning.to.stream, f_string_eol_s[0], global.main->warning.context, global.main->warning.prefix, global.main->warning.context); @@ -3541,7 +3541,7 @@ extern "C" { // initialize the item with settings. rule->items.array[rule->items.used].with = 0; - if (entry->session == controller_entry_session_new) { + if (entry->session == controller_entry_session_new_e) { rule->items.array[rule->items.used].with |= controller_with_session_new_d; } else { @@ -3667,56 +3667,56 @@ extern "C" { empty_disallow = F_true; if (fl_string_dynamic_compare_string(controller_affinity_s, cache->action.name_item, controller_affinity_s_length) == F_equal_to) { - type = controller_rule_setting_type_affinity; + type = controller_rule_setting_type_affinity_e; } else if (fl_string_dynamic_compare_string(controller_capability_s, cache->action.name_item, controller_capability_s_length) == F_equal_to) { - type = controller_rule_setting_type_capability; + type = controller_rule_setting_type_capability_e; } else if (fl_string_dynamic_compare_string(controller_control_group_s, cache->action.name_item, controller_control_group_s_length) == F_equal_to) { - type = controller_rule_setting_type_control_group; + type = controller_rule_setting_type_control_group_e; } else if (fl_string_dynamic_compare_string(controller_define_s, cache->action.name_item, controller_define_s_length) == F_equal_to) { - type = controller_rule_setting_type_define; + type = controller_rule_setting_type_define_e; } else if (fl_string_dynamic_compare_string(controller_environment_s, cache->action.name_item, controller_environment_s_length) == F_equal_to) { - type = controller_rule_setting_type_environment; + type = controller_rule_setting_type_environment_e; empty_disallow = F_false; } else if (fl_string_dynamic_compare_string(controller_group_s, cache->action.name_item, controller_group_s_length) == F_equal_to) { - type = controller_rule_setting_type_group; + type = controller_rule_setting_type_group_e; } else if (fl_string_dynamic_compare_string(controller_limit_s, cache->action.name_item, controller_limit_s_length) == F_equal_to) { - type = controller_rule_setting_type_limit; + type = controller_rule_setting_type_limit_e; } else if (fl_string_dynamic_compare_string(controller_name_s, cache->action.name_item, controller_name_s_length) == F_equal_to) { - type = controller_rule_setting_type_name; + type = controller_rule_setting_type_name_e; } else if (fl_string_dynamic_compare_string(controller_nice_s, cache->action.name_item, controller_nice_s_length) == F_equal_to) { - type = controller_rule_setting_type_nice; + type = controller_rule_setting_type_nice_e; } else if (fl_string_dynamic_compare_string(controller_on_s, cache->action.name_item, controller_on_s_length) == F_equal_to) { - type = controller_rule_setting_type_on; + type = controller_rule_setting_type_on_e; } else if (fl_string_dynamic_compare_string(controller_parameter_s, cache->action.name_item, controller_parameter_s_length) == F_equal_to) { - type = controller_rule_setting_type_parameter; + type = controller_rule_setting_type_parameter_e; } else if (fl_string_dynamic_compare_string(controller_path_s, cache->action.name_item, controller_path_s_length) == F_equal_to) { - type = controller_rule_setting_type_path; + type = controller_rule_setting_type_path_e; } else if (fl_string_dynamic_compare_string(controller_scheduler_s, cache->action.name_item, controller_scheduler_s_length) == F_equal_to) { - type = controller_rule_setting_type_scheduler; + type = controller_rule_setting_type_scheduler_e; } else if (fl_string_dynamic_compare_string(controller_script_s, cache->action.name_item, controller_script_s_length) == F_equal_to) { - type = controller_rule_setting_type_script; + type = controller_rule_setting_type_script_e; } else if (fl_string_dynamic_compare_string(controller_timeout_s, cache->action.name_item, controller_timeout_s_length) == F_equal_to) { - type = controller_rule_setting_type_timeout; + type = controller_rule_setting_type_timeout_e; } else if (fl_string_dynamic_compare_string(controller_user_s, cache->action.name_item, controller_user_s_length) == F_equal_to) { - type = controller_rule_setting_type_user; + type = controller_rule_setting_type_user_e; } else { - if (global.main->warning.verbosity == f_console_verbosity_debug) { + if (global.main->warning.verbosity == f_console_verbosity_debug_e) { // get the current line number within the settings item. cache->action.line_item = line_item; @@ -3779,7 +3779,7 @@ extern "C" { } else { if (empty_disallow) { - if (global.main->warning.verbosity == f_console_verbosity_debug) { + if (global.main->warning.verbosity == f_console_verbosity_debug_e) { // get the current line number within the settings item. cache->action.line_item = line_item; @@ -3800,7 +3800,7 @@ extern "C" { } } - if (type == controller_rule_setting_type_affinity) { + if (type == controller_rule_setting_type_affinity_e) { // @todo use sched_getaffinity() to get the available cpus and do not add an invalid cpu to the affinity array. if (!cache->content_actions.array[i].used) { @@ -3894,7 +3894,7 @@ extern "C" { continue; } - if (type == controller_rule_setting_type_define || type == controller_rule_setting_type_parameter) { + if (type == controller_rule_setting_type_define_e || type == controller_rule_setting_type_parameter_e) { if (cache->content_actions.array[i].used != 2) { controller_rule_setting_read_print_error(global.main->error, "requires exactly two Content", i, line_item, global.thread, cache); @@ -3906,10 +3906,10 @@ extern "C" { continue; } - if (type == controller_rule_setting_type_define) { + if (type == controller_rule_setting_type_define_e) { setting_maps = &rule->define; } - else if (type == controller_rule_setting_type_parameter) { + else if (type == controller_rule_setting_type_parameter_e) { setting_maps = &rule->parameter; } @@ -4000,14 +4000,14 @@ extern "C" { continue; } - controller_rule_setting_read_print_value(global, type == controller_rule_setting_type_define ? controller_define_s : controller_parameter_s, 0, setting_maps->array[setting_maps->used].name, 0); + controller_rule_setting_read_print_value(global, type == controller_rule_setting_type_define_e ? controller_define_s : controller_parameter_s, 0, setting_maps->array[setting_maps->used].name, 0); ++setting_maps->used; continue; } - if (type == controller_rule_setting_type_control_group) { + if (type == controller_rule_setting_type_control_group_e) { if (cache->content_actions.array[i].used < 2 || rule->has & controller_rule_has_control_group_d) { controller_rule_setting_read_print_error(global.main->error, "requires two or more Content", i, line_item, global.thread, cache); @@ -4096,7 +4096,7 @@ extern "C" { continue; } - if (type == controller_rule_setting_type_limit) { + if (type == controller_rule_setting_type_limit_e) { if (cache->content_actions.array[i].used != 3) { controller_rule_setting_read_print_error(global.main->error, "requires three Content", i, line_item, global.thread, cache); @@ -4108,55 +4108,55 @@ extern "C" { } if (fl_string_dynamic_partial_compare_string(controller_as_s, cache->buffer_item, controller_as_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - type = controller_resource_limit_type_as; + type = controller_resource_limit_type_as_e; } else if (fl_string_dynamic_partial_compare_string(controller_core_s, cache->buffer_item, controller_core_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - type = controller_resource_limit_type_core; + type = controller_resource_limit_type_core_e; } else if (fl_string_dynamic_partial_compare_string(controller_cpu_s, cache->buffer_item, controller_cpu_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - type = controller_resource_limit_type_cpu; + type = controller_resource_limit_type_cpu_e; } else if (fl_string_dynamic_partial_compare_string(controller_data_s, cache->buffer_item, controller_data_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - type = controller_resource_limit_type_data; + type = controller_resource_limit_type_data_e; } else if (fl_string_dynamic_partial_compare_string(controller_fsize_s, cache->buffer_item, controller_fsize_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - type = controller_resource_limit_type_fsize; + type = controller_resource_limit_type_fsize_e; } else if (fl_string_dynamic_partial_compare_string(controller_locks_s, cache->buffer_item, controller_locks_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - type = controller_resource_limit_type_locks; + type = controller_resource_limit_type_locks_e; } else if (fl_string_dynamic_partial_compare_string(controller_memlock_s, cache->buffer_item, controller_memlock_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - type = controller_resource_limit_type_memlock; + type = controller_resource_limit_type_memlock_e; } else if (fl_string_dynamic_partial_compare_string(controller_msgqueue_s, cache->buffer_item, controller_msgqueue_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - type = controller_resource_limit_type_msgqueue; + type = controller_resource_limit_type_msgqueue_e; } else if (fl_string_dynamic_partial_compare_string(controller_nice_s, cache->buffer_item, controller_nice_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - type = controller_resource_limit_type_nice; + type = controller_resource_limit_type_nice_e; } else if (fl_string_dynamic_partial_compare_string(controller_nofile_s, cache->buffer_item, controller_nofile_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - type = controller_resource_limit_type_nofile; + type = controller_resource_limit_type_nofile_e; } else if (fl_string_dynamic_partial_compare_string(controller_nproc_s, cache->buffer_item, controller_nproc_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - type = controller_resource_limit_type_nproc; + type = controller_resource_limit_type_nproc_e; } else if (fl_string_dynamic_partial_compare_string(controller_rss_s, cache->buffer_item, controller_rss_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - type = controller_resource_limit_type_rss; + type = controller_resource_limit_type_rss_e; } else if (fl_string_dynamic_partial_compare_string(controller_rtprio_s, cache->buffer_item, controller_rtprio_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - type = controller_resource_limit_type_rtprio; + type = controller_resource_limit_type_rtprio_e; } else if (fl_string_dynamic_partial_compare_string(controller_rttime_s, cache->buffer_item, controller_rttime_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - type = controller_resource_limit_type_rttime; + type = controller_resource_limit_type_rttime_e; } else if (fl_string_dynamic_partial_compare_string(controller_sigpending_s, cache->buffer_item, controller_sigpending_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - type = controller_resource_limit_type_sigpending; + type = controller_resource_limit_type_sigpending_e; } else if (fl_string_dynamic_partial_compare_string(controller_stack_s, cache->buffer_item, controller_stack_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - type = controller_resource_limit_type_stack; + type = controller_resource_limit_type_stack_e; } else { - if (global.main->error.verbosity == f_console_verbosity_debug) { + if (global.main->error.verbosity == f_console_verbosity_debug_e) { // get the current line number within the settings item. cache->action.line_item = line_item; @@ -4185,7 +4185,7 @@ extern "C" { for (j = 0; j < rule->limits.used; ++j) { if (type == rule->limits.array[j].type) { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { // get the current line number within the settings item. cache->action.line_item = line_item; @@ -4302,15 +4302,15 @@ extern "C" { continue; } - if (type == controller_rule_setting_type_name || type == controller_rule_setting_type_path || type == controller_rule_setting_type_script) { + if (type == controller_rule_setting_type_name_e || type == controller_rule_setting_type_path_e || type == controller_rule_setting_type_script_e) { - if (type == controller_rule_setting_type_name) { + if (type == controller_rule_setting_type_name_e) { setting_value = &rule->name; } - else if (type == controller_rule_setting_type_path) { + else if (type == controller_rule_setting_type_path_e) { setting_value = &rule->path; } - else if (type == controller_rule_setting_type_script) { + else if (type == controller_rule_setting_type_script_e) { setting_value = &rule->script; } @@ -4324,7 +4324,7 @@ extern "C" { continue; } - if (type == controller_rule_setting_type_name || type == controller_rule_setting_type_script) { + if (type == controller_rule_setting_type_name_e || type == controller_rule_setting_type_script_e) { status = controller_dynamic_rip_nulless_terminated(cache->buffer_item, cache->content_actions.array[i].array[0], setting_value); if (F_status_is_error(status)) { @@ -4353,7 +4353,7 @@ extern "C" { status = controller_validate_has_graph(*setting_value); if (status == F_false || F_status_set_fine(status) == F_complete_not_utf) { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { // get the current line number within the settings item. cache->action.line_item = line_item; @@ -4363,7 +4363,7 @@ extern "C" { } if (status == F_false) { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global.main->error.to, global.thread); fl_print_format("%c%[%SRule setting has an invalid name '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, global.main->error.context); @@ -4396,9 +4396,9 @@ extern "C" { continue; } - controller_rule_setting_read_print_value(global, type == controller_rule_setting_type_name ? controller_name_s : controller_script_s, 0, *setting_value, 0); + controller_rule_setting_read_print_value(global, type == controller_rule_setting_type_name_e ? controller_name_s : controller_script_s, 0, *setting_value, 0); } - else if (type == controller_rule_setting_type_path) { + else if (type == controller_rule_setting_type_path_e) { status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], setting_value); if (F_status_is_error(status)) { @@ -4441,7 +4441,7 @@ extern "C" { continue; } - if (type == controller_rule_setting_type_scheduler) { + if (type == controller_rule_setting_type_scheduler_e) { if (cache->content_actions.array[i].used < 1 || cache->content_actions.array[i].used > 2 || rule->has & controller_rule_has_scheduler_d) { controller_rule_setting_read_print_error(global.main->error, "requires either one or two Content", i, line_item, global.thread, cache); @@ -4507,7 +4507,7 @@ extern "C" { status = F_status_set_fine(status); if ((zero_only && number) || (!zero_only && (number < 1 || number > 99)) || status == F_data_not || status == F_number || status == F_number_overflow || status == F_number_negative || status == F_number_positive) { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { // get the current line number within the settings item. cache->action.line_item = line_item; @@ -4563,7 +4563,7 @@ extern "C" { continue; } - if (type == controller_rule_setting_type_timeout) { + if (type == controller_rule_setting_type_timeout_e) { if (cache->content_actions.array[i].used != 2) { controller_rule_setting_read_print_error(global.main->error, "requires exactly two Content", i, line_item, global.thread, cache); @@ -4586,7 +4586,7 @@ extern "C" { timeout_code = controller_rule_timeout_code_stop_d; } else { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { // get the current line number within the settings item. cache->action.line_item = line_item; @@ -4660,7 +4660,7 @@ extern "C" { rule->timeout_stop = number; } - if (global.main->error.verbosity == f_console_verbosity_debug || (global.main->error.verbosity == f_console_verbosity_verbose && global.main->parameters[controller_parameter_simulate].result == f_console_result_found)) { + if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e)) { f_string_t name_sub = controller_stop_s; if (timeout_code == controller_rule_timeout_code_kill_d) { @@ -4686,8 +4686,8 @@ extern "C" { continue; } - if (type == controller_rule_setting_type_capability || type == controller_rule_setting_type_nice || type == controller_rule_setting_type_user) { - if (cache->content_actions.array[i].used != 1 || type == controller_rule_setting_type_capability && rule->capability || type == controller_rule_setting_type_group && (rule->has & controller_rule_has_group_d) || type == controller_rule_setting_type_nice && (rule->has & controller_rule_has_nice_d) || type == controller_rule_setting_type_user && (rule->has & controller_rule_has_user_d)) { + if (type == controller_rule_setting_type_capability_e || type == controller_rule_setting_type_nice_e || type == controller_rule_setting_type_user_e) { + if (cache->content_actions.array[i].used != 1 || type == controller_rule_setting_type_capability_e && rule->capability || type == controller_rule_setting_type_group_e && (rule->has & controller_rule_has_group_d) || type == controller_rule_setting_type_nice_e && (rule->has & controller_rule_has_nice_d) || type == controller_rule_setting_type_user_e && (rule->has & controller_rule_has_user_d)) { controller_rule_setting_read_print_error(global.main->error, "requires exactly one Content", i, line_item, global.thread, cache); if (F_status_is_error_not(status_return)) { @@ -4697,7 +4697,7 @@ extern "C" { continue; } - if (type == controller_rule_setting_type_capability) { + if (type == controller_rule_setting_type_capability_e) { cache->action.generic.used = 0; status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], &cache->action.generic); @@ -4790,7 +4790,7 @@ extern "C" { controller_rule_setting_read_print_value(global, controller_capability_s, 0, cache->action.generic, 0); } - else if (type == controller_rule_setting_type_nice) { + else if (type == controller_rule_setting_type_nice_e) { f_number_signed_t number = 0; status = fl_conversion_string_to_number_signed(cache->buffer_item.string, cache->content_actions.array[i].array[0], &number); @@ -4808,7 +4808,7 @@ extern "C" { status = F_status_set_fine(status); if (number < -20 || number > 19 || status == F_data_not || status == F_number || status == F_number_overflow || status == F_number_underflow || status == F_number_decimal) { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { // get the current line number within the settings item. cache->action.line_item = line_item; @@ -4848,7 +4848,7 @@ extern "C" { rule->nice = number; rule->has |= controller_rule_has_nice_d; - if (global.main->parameters[controller_parameter_simulate].result == f_console_result_found || global.main->error.verbosity == f_console_verbosity_verbose) { + if (global.main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e || global.main->error.verbosity == f_console_verbosity_verbose_e) { cache->action.generic.used = 0; status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], &cache->action.generic); @@ -4889,7 +4889,7 @@ extern "C" { } } } - else if (type == controller_rule_setting_type_user) { + else if (type == controller_rule_setting_type_user_e) { uid_t number = 0; status = controller_get_id_user(cache->buffer_item, cache->content_actions.array[i].array[0], cache, &number); @@ -4927,7 +4927,7 @@ extern "C" { rule->user = number; rule->has |= controller_rule_has_user_d; - if (global.main->error.verbosity == f_console_verbosity_debug || (global.main->error.verbosity == f_console_verbosity_verbose && global.main->parameters[controller_parameter_simulate].result == f_console_result_found)) { + if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e)) { cache->action.generic.used = 0; status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], &cache->action.generic); @@ -4944,7 +4944,7 @@ extern "C" { continue; } - if (type == controller_rule_setting_type_group) { + if (type == controller_rule_setting_type_group_e) { if (!cache->content_actions.array[i].used) { controller_rule_setting_read_print_error(global.main->error, "requires one or more Content", i, line_item, global.thread, cache); @@ -5033,7 +5033,7 @@ extern "C" { continue; } - if (type == controller_rule_setting_type_environment) { + if (type == controller_rule_setting_type_environment_e) { setting_values = &rule->environment; for (j = 0; j < cache->content_actions.array[i].used; ++j) { @@ -5112,7 +5112,7 @@ extern "C" { cache->action.line_action = ++cache->action.line_item; if (status == F_false) { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global.main->error.to, global.thread); fl_print_format("%c%[%SRule setting has an invalid environment variable name '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, global.main->error.context); @@ -5154,7 +5154,7 @@ extern "C" { controller_rule_setting_read_print_values(global, controller_environment_s, i, cache); } else { - if (global.main->error.verbosity == f_console_verbosity_debug || (global.main->error.verbosity == f_console_verbosity_verbose && global.main->parameters[controller_parameter_simulate].result == f_console_result_found)) { + if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e)) { controller_lock_print(global.main->output.to, global.thread); fl_print_format("%cProcessing rule item action '%[%s%]' setting value to an empty set.%c", global.main->output.to.stream, f_string_eol_s[0], global.main->context.set.title, controller_environment_s, global.main->context.set.title, f_string_eol_s[0]); @@ -5178,34 +5178,34 @@ extern "C" { } if (fl_string_dynamic_partial_compare_string(controller_freeze_s, cache->buffer_item, controller_freeze_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - action = controller_rule_action_type_freeze; + action = controller_rule_action_type_freeze_e; } else if (fl_string_dynamic_partial_compare_string(controller_kill_s, cache->buffer_item, controller_kill_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - action = controller_rule_action_type_kill; + action = controller_rule_action_type_kill_e; } else if (fl_string_dynamic_partial_compare_string(controller_pause_s, cache->buffer_item, controller_pause_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - action = controller_rule_action_type_pause; + action = controller_rule_action_type_pause_e; } else if (fl_string_dynamic_partial_compare_string(controller_reload_s, cache->buffer_item, controller_reload_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - action = controller_rule_action_type_reload; + action = controller_rule_action_type_reload_e; } else if (fl_string_dynamic_partial_compare_string(controller_restart_s, cache->buffer_item, controller_restart_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - action = controller_rule_action_type_restart; + action = controller_rule_action_type_restart_e; } else if (fl_string_dynamic_partial_compare_string(controller_resume_s, cache->buffer_item, controller_resume_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - action = controller_rule_action_type_resume; + action = controller_rule_action_type_resume_e; } else if (fl_string_dynamic_partial_compare_string(controller_start_s, cache->buffer_item, controller_start_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - action = controller_rule_action_type_start; + action = controller_rule_action_type_start_e; } else if (fl_string_dynamic_partial_compare_string(controller_stop_s, cache->buffer_item, controller_stop_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - action = controller_rule_action_type_stop; + action = controller_rule_action_type_stop_e; } else if (fl_string_dynamic_partial_compare_string(controller_thaw_s, cache->buffer_item, controller_thaw_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - action = controller_rule_action_type_thaw; + action = controller_rule_action_type_thaw_e; } else { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { // get the current line number within the settings item. cache->action.line_item = line_item; @@ -5256,7 +5256,7 @@ extern "C" { setting_values = &rule->ons.array[j].wish; } else { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { // get the current line number within the settings item. cache->action.line_item = line_item; @@ -5358,7 +5358,7 @@ extern "C" { if (fl_string_dynamic_partial_compare_string(cache->buffer_item.string, cache->buffer_path, cache->buffer_item.used, cache->content_actions.array[i].array[1]) == F_equal_to_not) { - if (global.main->error.verbosity != f_console_verbosity_quiet) { + if (global.main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global.main->error.to, global.thread); fl_print_format("%c%[%SThe rule item action third parameter '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, global.main->error.context); @@ -5383,7 +5383,7 @@ extern "C" { ++rule->ons.used; } - if (global.main->error.verbosity == f_console_verbosity_debug || (global.main->error.verbosity == f_console_verbosity_verbose && global.main->parameters[controller_parameter_simulate].result == f_console_result_found)) { + if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e)) { controller_lock_print(global.main->output.to, global.thread); fl_print_format("%cProcessing rule item action '%[%S%]', adding ", global.main->output.to.stream, f_string_eol_s[0], global.main->context.set.title, controller_on_s, global.main->context.set.title); @@ -5413,19 +5413,19 @@ extern "C" { const controller_main_t *main = global.main; switch (action) { - case controller_rule_action_type_freeze: - case controller_rule_action_type_kill: - case controller_rule_action_type_pause: - case controller_rule_action_type_reload: - case controller_rule_action_type_restart: - case controller_rule_action_type_resume: - case controller_rule_action_type_start: - case controller_rule_action_type_stop: - case controller_rule_action_type_thaw: + case controller_rule_action_type_freeze_e: + case controller_rule_action_type_kill_e: + case controller_rule_action_type_pause_e: + case controller_rule_action_type_reload_e: + case controller_rule_action_type_restart_e: + case controller_rule_action_type_resume_e: + case controller_rule_action_type_start_e: + case controller_rule_action_type_stop_e: + case controller_rule_action_type_thaw_e: break; default: - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(main->error.to, global.thread); fl_print_format("%c%[%SUnsupported action type '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix ? main->error.prefix : f_string_empty_s, main->error.context); @@ -5647,31 +5647,31 @@ extern "C" { { f_string_t action = ""; - if (rule.ons.array[i].action == controller_rule_action_type_freeze) { + if (rule.ons.array[i].action == controller_rule_action_type_freeze_e) { action = controller_freeze_s; } - else if (rule.ons.array[i].action == controller_rule_action_type_kill) { + else if (rule.ons.array[i].action == controller_rule_action_type_kill_e) { action = controller_kill_s; } - else if (rule.ons.array[i].action == controller_rule_action_type_pause) { + else if (rule.ons.array[i].action == controller_rule_action_type_pause_e) { action = controller_pause_s; } - else if (rule.ons.array[i].action == controller_rule_action_type_reload) { + else if (rule.ons.array[i].action == controller_rule_action_type_reload_e) { action = controller_reload_s; } - else if (rule.ons.array[i].action == controller_rule_action_type_restart) { + else if (rule.ons.array[i].action == controller_rule_action_type_restart_e) { action = controller_restart_s; } - else if (rule.ons.array[i].action == controller_rule_action_type_resume) { + else if (rule.ons.array[i].action == controller_rule_action_type_resume_e) { action = controller_resume_s; } - else if (rule.ons.array[i].action == controller_rule_action_type_start) { + else if (rule.ons.array[i].action == controller_rule_action_type_start_e) { action = controller_start_s; } - else if (rule.ons.array[i].action == controller_rule_action_type_stop) { + else if (rule.ons.array[i].action == controller_rule_action_type_stop_e) { action = controller_stop_s; } - else if (rule.ons.array[i].action == controller_rule_action_type_thaw) { + else if (rule.ons.array[i].action == controller_rule_action_type_thaw_e) { action = controller_thaw_s; } @@ -5757,7 +5757,7 @@ extern "C" { fl_print_format(" %[%s%] {%c", main->output.to.stream, main->context.set.important, controller_action_s, main->context.set.important, f_string_eol_s[0]); fl_print_format(" %[%s%] %q%c", main->output.to.stream, main->context.set.important, controller_type_s, main->context.set.important, controller_rule_action_type_name(action->type), f_string_eol_s[0]); - if (item->type == controller_rule_item_type_script || item->type == controller_rule_item_type_utility) { + if (item->type == controller_rule_item_type_script_e || item->type == controller_rule_item_type_utility_e) { fl_print_format(" %[%s%] {%c", main->output.to.stream, main->context.set.important, controller_parameter_s, main->context.set.important, f_string_eol_s[0]); parameter = &action->parameters.array[0]; @@ -5795,7 +5795,7 @@ extern "C" { // rerun. fl_print_format(" %[%s%] {%c", main->output.to.stream, main->context.set.important, controller_rerun_s, main->context.set.important, f_string_eol_s[0]); - for (j = 0; j < controller_rule_action_type_execute__enum_size; ++j) { + for (j = 0; j < controller_rule_action_type_execute__enum_size_e; ++j) { for (k = 0; k < 2; ++k) { if (!k && (item->reruns[j].is & controller_rule_rerun_is_failure_d)) { @@ -5811,39 +5811,39 @@ extern "C" { fl_print_format(" %[", main->output.to.stream, main->context.set.important); switch (j) { - case controller_rule_action_type_execute_freeze: + case controller_rule_action_type_execute_freeze_e: f_print_terminated(controller_freeze_s, main->output.to.stream); break; - case controller_rule_action_type_execute_kill: + case controller_rule_action_type_execute_kill_e: f_print_terminated(controller_kill_s, main->output.to.stream); break; - case controller_rule_action_type_execute_pause: + case controller_rule_action_type_execute_pause_e: f_print_terminated(controller_pause_s, main->output.to.stream); break; - case controller_rule_action_type_execute_reload: + case controller_rule_action_type_execute_reload_e: f_print_terminated(controller_reload_s, main->output.to.stream); break; - case controller_rule_action_type_execute_restart: + case controller_rule_action_type_execute_restart_e: f_print_terminated(controller_restart_s, main->output.to.stream); break; - case controller_rule_action_type_execute_resume: + case controller_rule_action_type_execute_resume_e: f_print_terminated(controller_resume_s, main->output.to.stream); break; - case controller_rule_action_type_execute_start: + case controller_rule_action_type_execute_start_e: f_print_terminated(controller_start_s, main->output.to.stream); break; - case controller_rule_action_type_execute_stop: + case controller_rule_action_type_execute_stop_e: f_print_terminated(controller_stop_s, main->output.to.stream); break; - case controller_rule_action_type_execute_thaw: + case controller_rule_action_type_execute_thaw_e: f_print_terminated(controller_thaw_s, main->output.to.stream); break; @@ -6026,9 +6026,9 @@ extern "C" { } } - if (!process_list[i]->state || process_list[i]->state == controller_process_state_idle || process_list[i]->state == controller_process_state_done) { + if (!process_list[i]->state || process_list[i]->state == controller_process_state_idle_e || process_list[i]->state == controller_process_state_done_e) { - if (process_list[i]->state == controller_process_state_done) { + if (process_list[i]->state == controller_process_state_done_e) { f_thread_unlock(&process_list[i]->lock); if (caller) { @@ -6046,14 +6046,14 @@ extern "C" { return status_lock; } - if (process_list[i]->state == controller_process_state_done) { + if (process_list[i]->state == controller_process_state_done_e) { f_thread_unlock(&process_list[i]->active); if (f_thread_lock_write_try(&process_list[i]->active) == F_none) { controller_thread_join(&process_list[i]->id_thread); - process_list[i]->state = controller_process_state_idle; + process_list[i]->state = controller_process_state_idle_e; f_thread_unlock(&process_list[i]->active); @@ -6110,7 +6110,7 @@ extern "C" { continue; } - if (!controller_rule_status_is_error(process_list[i]->action, process_list[i]->rule) && (process_list[i]->state == controller_process_state_active || process_list[i]->state == controller_process_state_busy)) { + if (!controller_rule_status_is_error(process_list[i]->action, process_list[i]->rule) && (process_list[i]->state == controller_process_state_active_e || process_list[i]->state == controller_process_state_busy_e)) { f_thread_unlock(&process_list[i]->lock); status = controller_process_wait(global, process_list[i]); @@ -6189,7 +6189,7 @@ extern "C" { #ifndef _di_controller_rule_wait_all_process_type_ f_status_t controller_rule_wait_all_process_type(const uint8_t type, const controller_global_t global, const bool required, controller_process_t *caller) { - return controller_rule_wait_all(type != controller_process_type_exit, global, required, caller); + return controller_rule_wait_all(type != controller_process_type_exit_e, global, required, caller); } #endif // _di_controller_rule_wait_all_process_type_ diff --git a/level_3/controller/c/private-rule.h b/level_3/controller/c/private-rule.h index bed2681..eb37c49 100644 --- a/level_3/controller/c/private-rule.h +++ b/level_3/controller/c/private-rule.h @@ -88,7 +88,7 @@ extern "C" { * @return * The converted action type, converted into an action execute type. * - * The code controller_rule_action_type_execute__enum_size is returned for unknown types. + * The code controller_rule_action_type_execute__enum_size_e is returned for unknown types. * */ #ifndef _di_controller_rule_action_type_to_action_execute_type_ @@ -204,13 +204,13 @@ extern "C" { * The action to perform based on the action type codes. * * Only subset of the action type codes are supported: - * - controller_rule_action_type_kill - * - controller_rule_action_type_pause - * - controller_rule_action_type_reload - * - controller_rule_action_type_restart - * - controller_rule_action_type_resume - * - controller_rule_action_type_start - * - controller_rule_action_type_stop + * - controller_rule_action_type_kill_e + * - controller_rule_action_type_pause_e + * - controller_rule_action_type_reload_e + * - controller_rule_action_type_restart_e + * - controller_rule_action_type_resume_e + * - controller_rule_action_type_start_e + * - controller_rule_action_type_stop_e * @param options * Process options to consider when executing. * If bit controller_process_option_simulate_d, then the rule execution is in simulation mode (printing a message that the rule would be executed but does not execute the rule). @@ -528,7 +528,7 @@ extern "C" { * @param options * The process options to pass to the process. * @param type - * The process type, such as controller_process_type_entry. + * The process type, such as controller_process_type_entry_e. * @param stack * A stack representing the processes already running in this rule process dependency tree. * This is used to prevent circular dependencies. diff --git a/level_3/controller/c/private-rule_print.c b/level_3/controller/c/private-rule_print.c index b9912dc..52cd620 100644 --- a/level_3/controller/c/private-rule_print.c +++ b/level_3/controller/c/private-rule_print.c @@ -10,7 +10,7 @@ extern "C" { #ifndef _di_controller_rule_print_error_ void controller_rule_print_error(const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const f_string_t function, const bool fallback, const bool item, controller_thread_t *thread) { - if (print.verbosity == f_console_verbosity_quiet) return; + if (print.verbosity == f_console_verbosity_quiet_e) return; if (status == F_interrupt) return; // fll_error_print() automatically locks, so manually handle only the mutex locking and flushing rather than calling controller_lock_print(). @@ -29,7 +29,7 @@ extern "C" { #ifndef _di_controller_rule_print_error_cache_ void controller_rule_print_error_cache(const fl_print_t print, const controller_cache_action_t cache, const bool item) { - if (print.verbosity == f_console_verbosity_quiet) return; + if (print.verbosity == f_console_verbosity_quiet_e) return; fl_print_format("%c%[%SWhile processing ", print.to.stream, f_string_eol_s[0], print.context, print.prefix); @@ -60,7 +60,7 @@ extern "C" { #ifndef _di_controller_rule_item_print_error_ void controller_rule_item_print_error(const fl_print_t print, const controller_cache_action_t cache, const bool item, const f_status_t status, controller_thread_t *thread) { - if (print.verbosity == f_console_verbosity_quiet) return; + if (print.verbosity == f_console_verbosity_quiet_e) return; if (status == F_interrupt) return; // fll_error_print() automatically locks, so manually handle only the mutex locking and flushing rather than calling controller_lock_print(). @@ -77,7 +77,7 @@ extern "C" { #ifndef _di_controller_rule_item_print_error_execute_ void controller_rule_item_print_error_execute(const bool script_is, const f_string_t name, const f_status_t status, controller_process_t * const process) { - if (((controller_main_t *) process->main_data)->error.verbosity != f_console_verbosity_quiet) { + if (((controller_main_t *) process->main_data)->error.verbosity != f_console_verbosity_quiet_e) { fl_print_t * const print = &((controller_main_t *) process->main_data)->error; controller_lock_print(print->to, (controller_thread_t *) process->main_thread); @@ -226,7 +226,7 @@ extern "C" { #ifndef _di_controller_rule_action_print_error_missing_pid_ void controller_rule_action_print_error_missing_pid(const fl_print_t print, const f_string_t alias) { - if (print.verbosity == f_console_verbosity_quiet) return; + if (print.verbosity == f_console_verbosity_quiet_e) return; fl_print_format("%c%[%SThe rule '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, print.context); fl_print_format("%[%S%]", print.to.stream, print.notable, alias, print.notable); @@ -237,7 +237,7 @@ extern "C" { #ifndef _di_controller_rule_item_print_error_need_want_wish_ void controller_rule_item_print_error_need_want_wish(const fl_print_t print, const f_string_t need_want_wish, const f_string_t value, const f_string_t why) { - if (print.verbosity == f_console_verbosity_quiet) return; + if (print.verbosity == f_console_verbosity_quiet_e) return; fl_print_format("%c%[%SThe %s rule '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, need_want_wish, print.context); fl_print_format("%[%S%]", print.to.stream, print.notable, value, print.notable); @@ -248,7 +248,7 @@ extern "C" { #ifndef _di_controller_rule_item_print_error_rule_not_loaded_ void controller_rule_item_print_error_rule_not_loaded(const fl_print_t print, const f_string_t alias) { - if (print.verbosity == f_console_verbosity_quiet) return; + if (print.verbosity == f_console_verbosity_quiet_e) return; fl_print_format("%c%[%SThe rule '%]", print.to.stream, f_string_eol_s[0], print.context, print.prefix, print.context); fl_print_format("%[%S%]", print.to.stream, print.notable, alias, print.notable); @@ -259,7 +259,7 @@ extern "C" { #ifndef _di_controller_rule_setting_read_print_error_ void controller_rule_setting_read_print_error(const fl_print_t print, const f_string_t message, const f_array_length_t index, const f_array_length_t line_item, controller_thread_t *thread, controller_cache_t *cache) { - if (print.verbosity == f_console_verbosity_quiet) return; + if (print.verbosity == f_console_verbosity_quiet_e) return; // get the current line number within the settings item. cache->action.line_item = line_item; @@ -280,7 +280,7 @@ extern "C" { #ifndef _di_controller_rule_setting_read_print_error_with_range_ void controller_rule_setting_read_print_error_with_range(const fl_print_t print, const f_string_t before, const f_string_range_t range, const f_string_t after, const f_array_length_t index, const f_array_length_t line_item, controller_thread_t *thread, controller_cache_t *cache) { - if (print.verbosity == f_console_verbosity_quiet) return; + if (print.verbosity == f_console_verbosity_quiet_e) return; // get the current line number within the settings item. cache->action.line_item = line_item; @@ -303,7 +303,7 @@ extern "C" { #ifndef _di_controller_rule_setting_read_print_value_ void controller_rule_setting_read_print_value(const controller_global_t global, const f_string_t name, const f_string_t name_sub, const f_string_static_t value, const f_string_t suffix) { - if (global.main->error.verbosity != f_console_verbosity_debug && !(global.main->error.verbosity == f_console_verbosity_verbose && global.main->parameters[controller_parameter_simulate].result == f_console_result_found)) { + if (global.main->error.verbosity != f_console_verbosity_debug_e && !(global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e)) { return; } @@ -328,7 +328,7 @@ extern "C" { #ifndef _di_controller_rule_setting_read_print_values_ void controller_rule_setting_read_print_values(const controller_global_t global, const f_string_t name, const f_array_length_t index, controller_cache_t *cache) { - if (global.main->error.verbosity != f_console_verbosity_debug && !(global.main->error.verbosity == f_console_verbosity_verbose && global.main->parameters[controller_parameter_simulate].result == f_console_result_found)) { + if (global.main->error.verbosity != f_console_verbosity_debug_e && !(global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e)) { return; } diff --git a/level_3/controller/c/private-thread.c b/level_3/controller/c/private-thread.c index f0df2a8..217d9d3 100644 --- a/level_3/controller/c/private-thread.c +++ b/level_3/controller/c/private-thread.c @@ -23,24 +23,24 @@ extern "C" { const controller_global_t *global = (controller_global_t *) arguments; - if (global->thread->enabled != controller_thread_enabled) return 0; + if (global->thread->enabled != controller_thread_enabled_e) return 0; - const struct timespec delay = controller_time_seconds(global->main->parameters[controller_parameter_simulate].result == f_console_result_found ? controller_thread_cleanup_interval_short_d : controller_thread_cleanup_interval_long_d); + const struct timespec delay = controller_time_seconds(global->main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e ? controller_thread_cleanup_interval_short_d : controller_thread_cleanup_interval_long_d); f_status_t status = F_none; - while (global->thread->enabled == controller_thread_enabled) { + while (global->thread->enabled == controller_thread_enabled_e) { controller_time_sleep_nanoseconds(global->main, global->setting, delay); - if (global->thread->enabled != controller_thread_enabled) break; + if (global->thread->enabled != controller_thread_enabled_e) break; if (f_thread_lock_write_try(&global->thread->lock.process) == F_none) { controller_process_t *process = 0; f_array_length_t i = 0; - for (; i < global->thread->processs.size && global->thread->enabled == controller_thread_enabled; ++i) { + for (; i < global->thread->processs.size && global->thread->enabled == controller_thread_enabled_e; ++i) { if (!global->thread->processs.array[i]) continue; @@ -59,7 +59,7 @@ extern "C" { } // if process is active or busy, then do not attempt to clean it. - if (process->state == controller_process_state_active || process->state == controller_process_state_busy) { + if (process->state == controller_process_state_active_e || process->state == controller_process_state_busy_e) { f_thread_unlock(&process->active); f_thread_unlock(&process->lock); @@ -101,7 +101,7 @@ extern "C" { continue; } - process->state = controller_process_state_idle; + process->state = controller_process_state_idle_e; process->id_thread = 0; f_thread_mutex_lock(&process->wait_lock); @@ -158,7 +158,7 @@ extern "C" { f_status_t controller_thread_is_enabled(const bool is_normal, controller_thread_t *thread) { if (is_normal) { - return thread->enabled == controller_thread_enabled; + return thread->enabled == controller_thread_enabled_e; } return thread->enabled; @@ -175,7 +175,7 @@ extern "C" { #ifndef _di_controller_thread_is_enabled_process_type_ f_status_t controller_thread_is_enabled_process_type(const uint8_t type, controller_thread_t *thread) { - return controller_thread_is_enabled(type != controller_process_type_exit, thread); + return controller_thread_is_enabled(type != controller_process_type_exit_e, thread); } #endif // _di_controller_thread_is_enabled_process_type_ @@ -191,7 +191,7 @@ extern "C" { status = controller_lock_create(&thread.lock); if (F_status_is_error(status)) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { fll_error_print(main->error, status, "controller_lock_create", F_true); } } @@ -210,16 +210,16 @@ extern "C" { if (F_status_is_error(status)) { thread.id_signal = 0; - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { controller_print_error(main->error, F_status_set_fine(status), "f_thread_create", F_true, &thread); } } else { - if (main->parameters[controller_parameter_daemon].result == f_console_result_found) { - setting->ready = controller_setting_ready_done; + if (main->parameters[controller_parameter_daemon_e].result == f_console_result_found_e) { + setting->ready = controller_setting_ready_done_e; if (f_file_exists(setting->path_pid.string) == F_true) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(main->error.to, &thread); fl_print_format("%c%[%SThe pid file '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix ? main->error.prefix : f_string_empty_s, main->error.context); @@ -229,7 +229,7 @@ extern "C" { controller_unlock_print_flush(main->error.to, &thread); } - setting->ready = controller_setting_ready_abort; + setting->ready = controller_setting_ready_abort_e; status = F_status_set_error(F_available_not); } } @@ -239,7 +239,7 @@ extern "C" { status = f_thread_create(0, &thread.id_entry, &controller_thread_entry, (void *) &entry); if (F_status_is_error(status)) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { controller_print_error(main->error, F_status_set_fine(status), "f_thread_create", F_true, &thread); } } @@ -253,13 +253,13 @@ extern "C" { } // only make the rule and control threads available once any/all pre-processing and are completed. - if (F_status_is_error_not(status) && status != F_failure && status != F_child && thread.enabled == controller_thread_enabled) { - if (main->parameters[controller_parameter_validate].result == f_console_result_none) { + if (F_status_is_error_not(status) && status != F_failure && status != F_child && thread.enabled == controller_thread_enabled_e) { + if (main->parameters[controller_parameter_validate_e].result == f_console_result_none_e) { // wait for the entry thread to complete before starting the rule thread. controller_thread_join(&thread.id_rule); - if (thread.enabled && setting->mode == controller_setting_mode_service) { + if (thread.enabled && setting->mode == controller_setting_mode_service_e) { status = f_thread_create(0, &thread.id_rule, &controller_thread_rule, (void *) &global); if (F_status_is_error(status)) { @@ -279,7 +279,7 @@ extern "C" { if (F_status_is_error(status)) { thread.id_cleanup = 0; - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { controller_print_error(main->error, F_status_set_fine(status), "f_thread_create", F_true, &thread); } } @@ -293,17 +293,17 @@ extern "C" { return F_child; } - if (F_status_is_error_not(status) && status != F_failure && main->parameters[controller_parameter_validate].result == f_console_result_none && controller_thread_is_enabled(F_true, &thread)) { + if (F_status_is_error_not(status) && status != F_failure && main->parameters[controller_parameter_validate_e].result == f_console_result_none_e && controller_thread_is_enabled(F_true, &thread)) { - if (setting->mode == controller_setting_mode_service) { + if (setting->mode == controller_setting_mode_service_e) { controller_thread_join(&thread.id_signal); } - else if (setting->mode == controller_setting_mode_program) { + else if (setting->mode == controller_setting_mode_program_e) { status = controller_rule_wait_all(F_true, global, F_false, 0); } } - controller_thread_process_cancel(F_true, controller_thread_cancel_call, &global, 0); + controller_thread_process_cancel(F_true, controller_thread_cancel_call_e, &global, 0); controller_thread_process_exit(&global); @@ -327,7 +327,7 @@ extern "C" { if (F_status_set_fine(status) == F_interrupt) { controller_print_signal_received(main, thread.signal); - if (main->output.verbosity != f_console_verbosity_quiet) { + if (main->output.verbosity != f_console_verbosity_quiet_e) { fll_print_terminated(f_string_eol_s, main->output.to.stream); } diff --git a/level_3/controller/c/private-thread_control.c b/level_3/controller/c/private-thread_control.c index 46d88d2..a22cbc1 100644 --- a/level_3/controller/c/private-thread_control.c +++ b/level_3/controller/c/private-thread_control.c @@ -14,7 +14,7 @@ extern "C" { controller_global_t *global = (controller_global_t *) arguments; - if (global->thread->enabled != controller_thread_enabled) return 0; + if (global->thread->enabled != controller_thread_enabled_e) return 0; return 0; } diff --git a/level_3/controller/c/private-thread_entry.c b/level_3/controller/c/private-thread_entry.c index e196952..b441951 100644 --- a/level_3/controller/c/private-thread_entry.c +++ b/level_3/controller/c/private-thread_entry.c @@ -27,20 +27,20 @@ extern "C" { if (F_status_set_fine(*status) == F_interrupt) { - entry->setting->ready = controller_setting_ready_abort; + entry->setting->ready = controller_setting_ready_abort_e; } else if (F_status_is_error(*status)) { - entry->setting->ready = controller_setting_ready_fail; + entry->setting->ready = controller_setting_ready_fail_e; } else if (*status != F_child) { *status = controller_entry_preprocess(F_true, *entry->global, cache); } if (F_status_is_error_not(*status) && *status != F_child) { - if (main->parameters[controller_parameter_validate].result == f_console_result_none || main->parameters[controller_parameter_simulate].result == f_console_result_found) { + if (main->parameters[controller_parameter_validate_e].result == f_console_result_none_e || main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e) { - if (entry->setting->entry.pid == controller_entry_pid_require && f_file_exists(entry->setting->path_pid.string) == F_true) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (entry->setting->entry.pid == controller_entry_pid_require_e && f_file_exists(entry->setting->path_pid.string) == F_true) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(main->error.to, entry->global->thread); fl_print_format("%c%[%SThe pid file '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix ? main->error.prefix : f_string_empty_s, main->error.context); @@ -50,14 +50,14 @@ extern "C" { controller_unlock_print_flush(main->error.to, entry->global->thread); } - entry->setting->ready = controller_setting_ready_fail; + entry->setting->ready = controller_setting_ready_fail_e; *status = F_status_set_error(F_available_not); } else { *status = controller_entry_process(F_false, F_true, entry->global, cache); if (F_status_is_error(*status)) { - entry->setting->ready = controller_setting_ready_fail; + entry->setting->ready = controller_setting_ready_fail_e; if ((F_status_set_fine(*status) == F_execute || F_status_set_fine(*status) == F_require) && entry->global->setting->failsafe_enabled) { const uint8_t original_enabled = entry->global->thread->enabled; @@ -66,7 +66,7 @@ extern "C" { *status = f_thread_mutex_lock(&entry->global->thread->lock.alert); if (F_status_is_error_not(*status)) { - entry->global->thread->enabled = controller_thread_enabled; + entry->global->thread->enabled = controller_thread_enabled_e; f_thread_mutex_unlock(&entry->global->thread->lock.alert); } @@ -79,7 +79,7 @@ extern "C" { const f_status_t status_failsafe = controller_entry_process(F_true, F_true, entry->global, cache); if (F_status_is_error(status_failsafe)) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(main->error.to, entry->global->thread); fl_print_format("%c%[%SFailed while processing requested failsafe item '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix ? main->error.prefix : f_string_empty_s, main->error.context); @@ -107,10 +107,10 @@ extern "C" { } } else if (F_status_set_fine(*status) == F_interrupt) { - entry->setting->ready = controller_setting_ready_abort; + entry->setting->ready = controller_setting_ready_abort_e; } else if (*status != F_child) { - entry->setting->ready = controller_setting_ready_done; + entry->setting->ready = controller_setting_ready_done_e; } } } @@ -151,25 +151,25 @@ extern "C" { *status = controller_entry_read(F_false, *entry->global, cache); if (F_status_set_fine(*status) == F_interrupt) { - entry->setting->ready = controller_setting_ready_abort; + entry->setting->ready = controller_setting_ready_abort_e; } else if (F_status_is_error(*status)) { - entry->setting->ready = controller_setting_ready_fail; + entry->setting->ready = controller_setting_ready_fail_e; } else if (*status == F_file_found_not) { - entry->setting->ready = controller_setting_ready_done; + entry->setting->ready = controller_setting_ready_done_e; } else if (*status != F_child) { *status = controller_entry_preprocess(F_false, *entry->global, cache); } if (F_status_is_error_not(*status) && *status != F_child && *status != F_file_found_not) { - if (main->parameters[controller_parameter_validate].result == f_console_result_none || main->parameters[controller_parameter_simulate].result == f_console_result_found) { + if (main->parameters[controller_parameter_validate_e].result == f_console_result_none_e || main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e) { *status = controller_entry_process(F_false, F_false, entry->global, cache); if (F_status_is_error(*status)) { - entry->setting->ready = controller_setting_ready_fail; + entry->setting->ready = controller_setting_ready_fail_e; if ((F_status_set_fine(*status) == F_execute || F_status_set_fine(*status) == F_require) && entry->global->setting->failsafe_enabled) { @@ -180,7 +180,7 @@ extern "C" { *status = f_thread_mutex_lock(&entry->global->thread->lock.alert); if (F_status_is_error_not(*status)) { - entry->global->thread->enabled = controller_thread_enabled_exit; + entry->global->thread->enabled = controller_thread_enabled_exit_e; f_thread_mutex_unlock(&entry->global->thread->lock.alert); } @@ -194,7 +194,7 @@ extern "C" { const f_status_t status_failsafe = controller_entry_process(F_true, F_false, entry->global, cache); if (F_status_is_error(status_failsafe)) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(main->error.to, entry->global->thread); fl_print_format("%c%[%SFailed while processing requested failsafe item '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix ? main->error.prefix : f_string_empty_s, main->error.context); @@ -222,10 +222,10 @@ extern "C" { } } else if (F_status_set_fine(*status) == F_interrupt) { - entry->setting->ready = controller_setting_ready_abort; + entry->setting->ready = controller_setting_ready_abort_e; } else if (*status != F_child) { - entry->setting->ready = controller_setting_ready_done; + entry->setting->ready = controller_setting_ready_done_e; } } } @@ -244,7 +244,7 @@ extern "C" { } if (F_status_is_error_not(f_thread_mutex_lock(&entry->global->thread->lock.alert))) { - entry->global->thread->enabled = controller_thread_enabled_not; + entry->global->thread->enabled = controller_thread_enabled_not_e; f_thread_mutex_unlock(&entry->global->thread->lock.alert); } diff --git a/level_3/controller/c/private-thread_process.c b/level_3/controller/c/private-thread_process.c index 2c0dcdd..428e84e 100644 --- a/level_3/controller/c/private-thread_process.c +++ b/level_3/controller/c/private-thread_process.c @@ -54,20 +54,20 @@ extern "C" { f_status_t status = f_thread_mutex_lock(&global->thread->lock.alert); if (F_status_is_error(status)) { - global->thread->enabled = controller_thread_enabled_not; + global->thread->enabled = controller_thread_enabled_not_e; } else { - if (by == controller_thread_cancel_execute) { - global->thread->enabled = controller_thread_enabled_execute; + if (by == controller_thread_cancel_execute_e) { + global->thread->enabled = controller_thread_enabled_execute_e; } - else if (by == controller_thread_cancel_exit) { - global->thread->enabled = controller_thread_enabled_not; + else if (by == controller_thread_cancel_exit_e) { + global->thread->enabled = controller_thread_enabled_not_e; } - else if (by == controller_thread_cancel_exit_execute) { - global->thread->enabled = controller_thread_enabled_exit_execute; + else if (by == controller_thread_cancel_exit_execute_e) { + global->thread->enabled = controller_thread_enabled_exit_execute_e; } else { - global->thread->enabled = controller_thread_enabled_exit; + global->thread->enabled = controller_thread_enabled_exit_e; } f_thread_mutex_unlock(&global->thread->lock.alert); @@ -91,7 +91,7 @@ extern "C" { } // the sigtimedwait() function that is run inside of signal must be interrupted via the f_thread_cancel(). - if (by != controller_thread_cancel_signal && global->thread->id_signal) { + if (by != controller_thread_cancel_signal_e && global->thread->id_signal) { f_thread_cancel(global->thread->id_signal); f_thread_join(global->thread->id_signal, 0); @@ -106,7 +106,7 @@ extern "C" { process = global->thread->processs.array[i]; // do not cancel exit processes, when not performing "execute" during exit. - if (process->type == controller_process_type_exit && global->thread->enabled != controller_thread_enabled_exit_execute) { + if (process->type == controller_process_type_exit_e && global->thread->enabled != controller_thread_enabled_exit_execute_e) { continue; } @@ -137,7 +137,7 @@ extern "C" { process = global->thread->processs.array[i]; // do not cancel exit processes, when not performing "execute" during exit. - if (process->type == controller_process_type_exit && global->thread->enabled != controller_thread_enabled_exit_execute) continue; + if (process->type == controller_process_type_exit_e && global->thread->enabled != controller_thread_enabled_exit_execute_e) continue; do { if (!process->id_thread) break; @@ -200,7 +200,7 @@ extern "C" { process = global->thread->processs.array[i]; // do not kill exit processes, when not performing "execute" during exit. - if (process->type == controller_process_type_exit && global->thread->enabled != controller_thread_enabled_exit_execute) continue; + if (process->type == controller_process_type_exit_e && global->thread->enabled != controller_thread_enabled_exit_execute_e) continue; if (process->id_thread) { if (process->childs.used) { @@ -252,11 +252,11 @@ extern "C" { #ifndef _di_controller_thread_process_exit_ void controller_thread_process_exit(controller_global_t *global) { - if (global->thread->enabled != controller_thread_enabled_exit) { + if (global->thread->enabled != controller_thread_enabled_exit_e) { return; } - if (global->setting->ready == controller_setting_ready_done) { + if (global->setting->ready == controller_setting_ready_done_e) { // the exit processing runs using the entry thread. if (global->thread->id_entry) { @@ -276,17 +276,17 @@ extern "C" { f_status_t status = f_thread_create(0, &global->thread->id_entry, &controller_thread_exit, (void *) &entry); if (F_status_is_error(status)) { - if (global->main->error.verbosity != f_console_verbosity_quiet) { + if (global->main->error.verbosity != f_console_verbosity_quiet_e) { controller_print_error(global->main->error, F_status_set_fine(status), "f_thread_create", F_true, global->thread); } if (F_status_is_error_not(f_thread_mutex_lock(&global->thread->lock.alert))) { - global->thread->enabled = controller_thread_enabled_not; + global->thread->enabled = controller_thread_enabled_not_e; f_thread_mutex_unlock(&global->thread->lock.alert); } else { - global->thread->enabled = controller_thread_enabled_not; + global->thread->enabled = controller_thread_enabled_not_e; } } else { @@ -296,7 +296,7 @@ extern "C" { status = f_thread_mutex_lock(&global->thread->lock.alert); if (F_status_is_error(status)) { - global->thread->enabled = controller_thread_enabled_not; + global->thread->enabled = controller_thread_enabled_not_e; break; } @@ -307,16 +307,16 @@ extern "C" { f_thread_mutex_unlock(&global->thread->lock.alert); - } while (F_status_is_error_not(status) && global->thread->enabled == controller_thread_enabled_exit); + } while (F_status_is_error_not(status) && global->thread->enabled == controller_thread_enabled_exit_e); if (F_status_is_error(status)) { if (F_status_is_error_not(f_thread_mutex_lock(&global->thread->lock.alert))) { - global->thread->enabled = controller_thread_enabled_not; + global->thread->enabled = controller_thread_enabled_not_e; f_thread_mutex_unlock(&global->thread->lock.alert); } else { - global->thread->enabled = controller_thread_enabled_not; + global->thread->enabled = controller_thread_enabled_not_e; } } } @@ -329,16 +329,16 @@ extern "C" { global->thread->id_signal = 0; } - controller_thread_process_cancel(F_false, controller_thread_cancel_exit, global, 0); + controller_thread_process_cancel(F_false, controller_thread_cancel_exit_e, global, 0); } else { if (F_status_is_error_not(f_thread_mutex_lock(&global->thread->lock.alert))) { - global->thread->enabled = controller_thread_enabled_not; + global->thread->enabled = controller_thread_enabled_not_e; f_thread_mutex_unlock(&global->thread->lock.alert); } else { - global->thread->enabled = controller_thread_enabled_not; + global->thread->enabled = controller_thread_enabled_not_e; } } } diff --git a/level_3/controller/c/private-thread_process.h b/level_3/controller/c/private-thread_process.h index 252bb57..75e7826 100644 --- a/level_3/controller/c/private-thread_process.h +++ b/level_3/controller/c/private-thread_process.h @@ -36,9 +36,9 @@ extern "C" { * @param by * Designate the way in which the cancellation should operate. * - * If controller_thread_cancel_signal, then this was called from within the signal handling thread, so do not cancel the signal thread. - * If controller_thread_cancel_call, then this was not called from within the signal handling thread, so cancel the signal thread. - * If controller_thread_cancel_execute, then this was called from within the Entry/Exit for executing a process, so cancel the signal thread but not the Entry thread. + * If controller_thread_cancel_signal_e, then this was called from within the signal handling thread, so do not cancel the signal thread. + * If controller_thread_cancel_call_e, then this was not called from within the signal handling thread, so cancel the signal thread. + * If controller_thread_cancel_execute_e, then this was called from within the Entry/Exit for executing a process, so cancel the signal thread but not the Entry thread. * @param global * The global thread data. * @param caller diff --git a/level_3/controller/c/private-thread_signal.c b/level_3/controller/c/private-thread_signal.c index 3b68d62..910e3f1 100644 --- a/level_3/controller/c/private-thread_signal.c +++ b/level_3/controller/c/private-thread_signal.c @@ -33,7 +33,7 @@ extern "C" { if (information.si_signo == F_signal_interrupt || information.si_signo == F_signal_abort || information.si_signo == F_signal_quit || information.si_signo == F_signal_termination) { global->thread->signal = information.si_signo; - controller_thread_process_cancel(is_normal, controller_thread_cancel_signal, global, 0); + controller_thread_process_cancel(is_normal, controller_thread_cancel_signal_e, global, 0); break; } diff --git a/level_3/controller/data/build/settings b/level_3/controller/data/build/settings index 1a0582e..b141270 100644 --- a/level_3/controller/data/build/settings +++ b/level_3/controller/data/build/settings @@ -23,8 +23,8 @@ build_language c build_libraries -lc -lcap build_libraries-individual -lfll_control_group -lfll_error -lfll_execute -lfll_fss -lfll_path -lfll_print -lfll_program -build_libraries-individual -lfl_console -lfl_control_group -lfl_conversion -lfl_directory -lfl_environment -lfl_fss -lfl_iki -lfl_print -lfl_status -lfl_string -build_libraries-individual -lf_account -lf_capability -lf_color -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_execute -lf_file -lf_fss -lf_iki -lf_limit -lf_memory -lf_path -lf_pipe -lf_print -lf_signal -lf_string -lf_thread -lf_type_array -lf_utf +build_libraries-individual -lfl_console -lfl_control_group -lfl_conversion -lfl_directory -lfl_environment -lfl_fss -lfl_iki -lfl_print -lfl_string +build_libraries-individual -lf_account -lf_capability -lf_color -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_execute -lf_file -lf_fss -lf_iki -lf_limit -lf_memory -lf_path -lf_pipe -lf_print -lf_signal -lf_status_string -lf_string -lf_thread -lf_type_array -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll diff --git a/level_3/fake/c/fake.c b/level_3/fake/c/fake.c index b94958d..fb15612 100644 --- a/level_3/fake/c/fake.c +++ b/level_3/fake/c/fake.c @@ -93,7 +93,7 @@ extern "C" { // Load all parameters and identify priority of color parameters. { - f_console_parameter_id_t ids[3] = { fake_parameter_no_color, fake_parameter_light, fake_parameter_dark }; + f_console_parameter_id_t ids[3] = { fake_parameter_no_color_e, fake_parameter_light_e, fake_parameter_dark_e }; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3); status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context); @@ -128,7 +128,7 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fake_parameter_verbosity_quiet, fake_parameter_verbosity_normal, fake_parameter_verbosity_verbose, fake_parameter_verbosity_debug }; + f_console_parameter_id_t ids[4] = { fake_parameter_verbosity_quiet_e, fake_parameter_verbosity_normal_e, fake_parameter_verbosity_verbose_e, fake_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); @@ -141,36 +141,36 @@ extern "C" { return status; } - if (choice == fake_parameter_verbosity_quiet) { - main->output.verbosity = f_console_verbosity_quiet; - main->error.verbosity = f_console_verbosity_quiet; - main->warning.verbosity = f_console_verbosity_quiet; + if (choice == fake_parameter_verbosity_quiet_e) { + main->output.verbosity = f_console_verbosity_quiet_e; + main->error.verbosity = f_console_verbosity_quiet_e; + main->warning.verbosity = f_console_verbosity_quiet_e; } - else if (choice == fake_parameter_verbosity_normal) { - main->output.verbosity = f_console_verbosity_normal; - main->error.verbosity = f_console_verbosity_normal; - main->warning.verbosity = f_console_verbosity_normal; + else if (choice == fake_parameter_verbosity_normal_e) { + main->output.verbosity = f_console_verbosity_normal_e; + main->error.verbosity = f_console_verbosity_normal_e; + main->warning.verbosity = f_console_verbosity_normal_e; } - else if (choice == fake_parameter_verbosity_verbose) { - main->output.verbosity = f_console_verbosity_verbose; - main->error.verbosity = f_console_verbosity_verbose; - main->warning.verbosity = f_console_verbosity_verbose; + else if (choice == fake_parameter_verbosity_verbose_e) { + main->output.verbosity = f_console_verbosity_verbose_e; + main->error.verbosity = f_console_verbosity_verbose_e; + main->warning.verbosity = f_console_verbosity_verbose_e; } - else if (choice == fake_parameter_verbosity_debug) { - main->output.verbosity = f_console_verbosity_debug; - main->error.verbosity = f_console_verbosity_debug; - main->warning.verbosity = f_console_verbosity_debug; + else if (choice == fake_parameter_verbosity_debug_e) { + main->output.verbosity = f_console_verbosity_debug_e; + main->error.verbosity = f_console_verbosity_debug_e; + main->warning.verbosity = f_console_verbosity_debug_e; } } status = F_none; } - f_array_length_t operations_length = main->parameters[fake_parameter_operation_build].locations.used; + f_array_length_t operations_length = main->parameters[fake_parameter_operation_build_e].locations.used; - operations_length += main->parameters[fake_parameter_operation_clean].locations.used; - operations_length += main->parameters[fake_parameter_operation_make].locations.used; - operations_length += main->parameters[fake_parameter_operation_skeleton].locations.used; + operations_length += main->parameters[fake_parameter_operation_clean_e].locations.used; + operations_length += main->parameters[fake_parameter_operation_make_e].locations.used; + operations_length += main->parameters[fake_parameter_operation_skeleton_e].locations.used; uint8_t operations[operations_length]; f_string_t operations_name = 0; @@ -182,17 +182,17 @@ extern "C" { f_array_length_t j = 0; f_array_length_t k = 0; - for (; i < main->parameters[fake_parameter_operation_build].locations.used; ++i, ++locations_length) { + for (; i < main->parameters[fake_parameter_operation_build_e].locations.used; ++i, ++locations_length) { - operations[locations_length] = fake_operation_build; - locations[locations_length] = main->parameters[fake_parameter_operation_build].locations.array[i]; + operations[locations_length] = fake_operation_build_e; + locations[locations_length] = main->parameters[fake_parameter_operation_build_e].locations.array[i]; } // for - for (i = 0; i < main->parameters[fake_parameter_operation_clean].locations.used; ++i) { + for (i = 0; i < main->parameters[fake_parameter_operation_clean_e].locations.used; ++i) { for (j = 0; j < locations_length; ++j) { - if (main->parameters[fake_parameter_operation_clean].locations.array[i] < locations[j]) { + if (main->parameters[fake_parameter_operation_clean_e].locations.array[i] < locations[j]) { for (k = locations_length; k > j; --k) { locations[k] = locations[k - 1]; operations[k] = operations[k - 1]; @@ -202,16 +202,16 @@ extern "C" { } } // for - locations[j] = main->parameters[fake_parameter_operation_clean].locations.array[i]; - operations[j] = fake_operation_clean; + locations[j] = main->parameters[fake_parameter_operation_clean_e].locations.array[i]; + operations[j] = fake_operation_clean_e; ++locations_length; } // for - for (i = 0; i < main->parameters[fake_parameter_operation_make].locations.used; ++i) { + for (i = 0; i < main->parameters[fake_parameter_operation_make_e].locations.used; ++i) { for (j = 0; j < locations_length; ++j) { - if (main->parameters[fake_parameter_operation_make].locations.array[i] < locations[j]) { + if (main->parameters[fake_parameter_operation_make_e].locations.array[i] < locations[j]) { for (k = locations_length; k > j; --k) { locations[k] = locations[k - 1]; operations[k] = operations[k - 1]; @@ -221,16 +221,16 @@ extern "C" { } } // for - locations[j] = main->parameters[fake_parameter_operation_make].locations.array[i]; - operations[j] = fake_operation_make; + locations[j] = main->parameters[fake_parameter_operation_make_e].locations.array[i]; + operations[j] = fake_operation_make_e; ++locations_length; } // for - for (i = 0; i < main->parameters[fake_parameter_operation_skeleton].locations.used; ++i) { + for (i = 0; i < main->parameters[fake_parameter_operation_skeleton_e].locations.used; ++i) { for (j = 0; j < locations_length; ++j) { - if (main->parameters[fake_parameter_operation_skeleton].locations.array[i] < locations[j]) { + if (main->parameters[fake_parameter_operation_skeleton_e].locations.array[i] < locations[j]) { for (k = locations_length; k > j; --k) { locations[k] = locations[k - 1]; @@ -241,15 +241,15 @@ extern "C" { } } // for - locations[j] = main->parameters[fake_parameter_operation_skeleton].locations.array[i]; - operations[j] = fake_operation_skeleton; + locations[j] = main->parameters[fake_parameter_operation_skeleton_e].locations.array[i]; + operations[j] = fake_operation_skeleton_e; ++locations_length; } // for } status = F_none; - if (main->parameters[fake_parameter_help].result == f_console_result_found) { + if (main->parameters[fake_parameter_help_e].result == f_console_result_found_e) { fake_print_help(main->output.to, main->context); fake_main_delete(main); @@ -257,7 +257,7 @@ extern "C" { return F_none; } - if (main->parameters[fake_parameter_version].result == f_console_result_found) { + if (main->parameters[fake_parameter_version_e].result == f_console_result_found_e) { fll_program_print_version(main->output.to, fake_program_version_s); fake_main_delete(main); @@ -284,20 +284,20 @@ extern "C" { main->operation = operations[i]; - if (main->operation == fake_operation_build) { + if (main->operation == fake_operation_build_e) { operations_name = fake_other_operation_build_s; } - else if (main->operation == fake_operation_clean) { + else if (main->operation == fake_operation_clean_e) { operations_name = fake_other_operation_clean_s; } - else if (main->operation == fake_operation_make) { + else if (main->operation == fake_operation_make_e) { operations_name = fake_other_operation_make_s; } - else if (main->operation == fake_operation_skeleton) { + else if (main->operation == fake_operation_skeleton_e) { operations_name = fake_other_operation_skeleton_s; } - if (main->operation == fake_operation_build) { + if (main->operation == fake_operation_build_e) { if (validate_parameter_directories) { status = fake_validate_parameter_directories(arguments, main); validate_parameter_directories = F_false; @@ -309,7 +309,7 @@ extern "C" { status = fake_build_operate(stub, main); } } - else if (main->operation == fake_operation_clean) { + else if (main->operation == fake_operation_clean_e) { if (validate_parameter_directories) { status = fake_validate_parameter_directories(arguments, main); validate_parameter_directories = F_false; @@ -319,7 +319,7 @@ extern "C" { status = fake_clean_operate(main); } } - else if (main->operation == fake_operation_make) { + else if (main->operation == fake_operation_make_e) { if (validate_parameter_directories) { status = fake_validate_parameter_directories(arguments, main); validate_parameter_directories = F_false; @@ -333,7 +333,7 @@ extern "C" { } } } - else if (main->operation == fake_operation_skeleton) { + else if (main->operation == fake_operation_skeleton_e) { status = fake_skeleton_operate(main); } @@ -345,7 +345,7 @@ extern "C" { break; } else if (F_status_is_error(status)) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SThe operation '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -359,7 +359,7 @@ extern "C" { } } // for - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { if (F_status_is_error(status)) { if (F_status_set_fine(status) == F_interrupt) { fflush(main->output.to.stream); @@ -373,7 +373,7 @@ extern "C" { } } else { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[%SYou failed to specify an operation.%]%c%c", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context, f_string_eol_s[0], f_string_eol_s[0]); } diff --git a/level_3/fake/c/fake.h b/level_3/fake/c/fake.h index e59ed48..efaf4ec 100644 --- a/level_3/fake/c/fake.h +++ b/level_3/fake/c/fake.h @@ -200,9 +200,9 @@ extern "C" { #ifndef _di_fake_build_language_ enum { - fake_build_language_type_bash = 1, - fake_build_language_type_c, - fake_build_language_type_cpp, + fake_build_language_type_bash_e = 1, + fake_build_language_type_c_e, + fake_build_language_type_cpp_e, }; #define fake_build_language_bash_s "bash" @@ -216,10 +216,10 @@ extern "C" { #ifndef _di_fake_build_version_ enum { - fake_build_version_type_major = 1, - fake_build_version_type_minor, - fake_build_version_type_micro, - fake_build_version_type_nano, + fake_build_version_type_major_e = 1, + fake_build_version_type_minor_e, + fake_build_version_type_micro_e, + fake_build_version_type_nano_e, }; #define fake_build_version_major_s "major" @@ -235,13 +235,13 @@ extern "C" { #ifndef _di_fake_defines_ enum { - fake_operation_build = 1, - fake_operation_clean, - fake_operation_make, - fake_operation_skeleton, + fake_operation_build_e = 1, + fake_operation_clean_e, + fake_operation_make_e, + fake_operation_skeleton_e, }; - #define fake_signal_check_d 10000 + #define fake_signal_check_d 10000 #define fake_signal_check_tiny_d 4 #define fake_signal_check_short_d 16 @@ -318,70 +318,70 @@ extern "C" { #define fake_other_operation_skeleton_s_length 8 enum { - fake_parameter_help, - fake_parameter_light, - fake_parameter_dark, - fake_parameter_no_color, - fake_parameter_verbosity_quiet, - fake_parameter_verbosity_normal, - fake_parameter_verbosity_verbose, - fake_parameter_verbosity_debug, - fake_parameter_version, - - fake_parameter_define, - fake_parameter_fakefile, - fake_parameter_mode, - fake_parameter_process, - fake_parameter_settings, - - fake_parameter_path_build, - fake_parameter_path_data, - fake_parameter_path_sources, - fake_parameter_path_work, - - fake_parameter_documents_disabled, - fake_parameter_documents_enabled, - fake_parameter_shared_disabled, - fake_parameter_shared_enabled, - fake_parameter_static_disabled, - fake_parameter_static_enabled, - - fake_parameter_operation_build, - fake_parameter_operation_clean, - fake_parameter_operation_make, - fake_parameter_operation_skeleton, + fake_parameter_help_e, + fake_parameter_light_e, + fake_parameter_dark_e, + fake_parameter_no_color_e, + fake_parameter_verbosity_quiet_e, + fake_parameter_verbosity_normal_e, + fake_parameter_verbosity_verbose_e, + fake_parameter_verbosity_debug_e, + fake_parameter_version_e, + + fake_parameter_define_e, + fake_parameter_fakefile_e, + fake_parameter_mode_e, + fake_parameter_process_e, + fake_parameter_settings_e, + + fake_parameter_path_build_e, + fake_parameter_path_data_e, + fake_parameter_path_sources_e, + fake_parameter_path_work_e, + + fake_parameter_documents_disabled_e, + fake_parameter_documents_enabled_e, + fake_parameter_shared_disabled_e, + fake_parameter_shared_enabled_e, + fake_parameter_static_disabled_e, + fake_parameter_static_enabled_e, + + fake_parameter_operation_build_e, + fake_parameter_operation_clean_e, + fake_parameter_operation_make_e, + fake_parameter_operation_skeleton_e, }; #define fake_console_parameter_t_initialize \ { \ - 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_s, fake_long_define_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fake_short_fakefile_s, fake_long_fakefile_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fake_short_mode_s, fake_long_mode_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fake_short_process_s, fake_long_process_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fake_short_settings_s, fake_long_settings_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fake_short_path_build_s, fake_long_path_build_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fake_short_path_data_s, fake_long_path_data_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fake_short_path_sources_s, fake_long_path_sources_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fake_short_path_work_s, fake_long_path_work_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(0, fake_long_documents_disabled_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(0, fake_long_documents_enabled_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(0, fake_long_shared_disabled_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(0, fake_long_shared_enabled_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(0, fake_long_static_disabled_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(0, fake_long_static_enabled_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(0, 0, fake_other_operation_build_s, 0, f_console_type_other), \ - f_console_parameter_t_initialize(0, 0, fake_other_operation_clean_s, 0, f_console_type_other), \ - f_console_parameter_t_initialize(0, 0, fake_other_operation_make_s, 0, f_console_type_other), \ - f_console_parameter_t_initialize(0, 0, fake_other_operation_skeleton_s, 0, f_console_type_other), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse_e), \ + 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_e), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(fake_short_define_s, fake_long_define_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fake_short_fakefile_s, fake_long_fakefile_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fake_short_mode_s, fake_long_mode_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fake_short_process_s, fake_long_process_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fake_short_settings_s, fake_long_settings_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fake_short_path_build_s, fake_long_path_build_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fake_short_path_data_s, fake_long_path_data_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fake_short_path_sources_s, fake_long_path_sources_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fake_short_path_work_s, fake_long_path_work_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(0, fake_long_documents_disabled_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(0, fake_long_documents_enabled_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(0, fake_long_shared_disabled_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(0, fake_long_shared_enabled_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(0, fake_long_static_disabled_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(0, fake_long_static_enabled_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(0, 0, fake_other_operation_build_s, 0, f_console_type_other_e), \ + f_console_parameter_t_initialize(0, 0, fake_other_operation_clean_s, 0, f_console_type_other_e), \ + f_console_parameter_t_initialize(0, 0, fake_other_operation_make_s, 0, f_console_type_other_e), \ + f_console_parameter_t_initialize(0, 0, fake_other_operation_skeleton_s, 0, f_console_type_other_e), \ } #define fake_total_parameters_d 28 diff --git a/level_3/fake/c/private-build-library.c b/level_3/fake/c/private-build-library.c index e488eff..9612e34 100644 --- a/level_3/fake/c/private-build-library.c +++ b/level_3/fake/c/private-build-library.c @@ -27,7 +27,7 @@ extern "C" { if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true || *status == F_child) return main->child; if (!data_build.setting.build_sources_library.used) return 0; - if (main->output.verbosity != f_console_verbosity_quiet) { + if (main->output.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[Compiling shared library.%]%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, main->context.set.important, f_string_eol_s[0]); } @@ -39,11 +39,11 @@ extern "C" { if (data_build.setting.path_standard) { path_sources = &main->path_sources_c; - if (data_build.setting.build_language == fake_build_language_type_cpp) { + if (data_build.setting.build_language == fake_build_language_type_cpp_e) { path_sources = &main->path_sources_cpp; } } - else if (main->parameters[fake_parameter_path_sources].result != f_console_result_additional) { + else if (main->parameters[fake_parameter_path_sources_e].result != f_console_result_additional_e) { path_sources = &data_build.setting.path_sources; } @@ -258,29 +258,29 @@ extern "C" { f_array_length_t parameter_linker_length = fake_build_parameter_library_shared_prefix_s_length; f_array_length_t parameter_file_path_length = main->path_build_libraries_shared.used; - if (data_build.setting.version_file == fake_build_version_type_major) { + if (data_build.setting.version_file == fake_build_version_type_major_e) { parameter_file_path_length += parameter_file_name_major_length; } - else if (data_build.setting.version_file == fake_build_version_type_minor) { + else if (data_build.setting.version_file == fake_build_version_type_minor_e) { parameter_file_path_length += parameter_file_name_minor_length; } - else if (data_build.setting.version_file == fake_build_version_type_micro) { + else if (data_build.setting.version_file == fake_build_version_type_micro_e) { parameter_file_path_length += parameter_file_name_micro_length; } - else if (data_build.setting.version_file == fake_build_version_type_nano) { + else if (data_build.setting.version_file == fake_build_version_type_nano_e) { parameter_file_path_length += parameter_file_name_nano_length; } - if (data_build.setting.version_target == fake_build_version_type_major) { + if (data_build.setting.version_target == fake_build_version_type_major_e) { parameter_linker_length += parameter_file_name_major_length; } - else if (data_build.setting.version_target == fake_build_version_type_minor) { + else if (data_build.setting.version_target == fake_build_version_type_minor_e) { parameter_linker_length += parameter_file_name_minor_length; } - else if (data_build.setting.version_target == fake_build_version_type_micro) { + else if (data_build.setting.version_target == fake_build_version_type_micro_e) { parameter_linker_length += parameter_file_name_micro_length; } - else if (data_build.setting.version_target == fake_build_version_type_nano) { + else if (data_build.setting.version_target == fake_build_version_type_nano_e) { parameter_linker_length += parameter_file_name_nano_length; } @@ -290,29 +290,29 @@ extern "C" { memcpy(parameter_linker, fake_build_parameter_library_shared_prefix_s, fake_build_parameter_library_shared_prefix_s_length); memcpy(parameter_file_path, main->path_build_libraries_shared.string, main->path_build_libraries_shared.used); - if (data_build.setting.version_file == fake_build_version_type_major) { + if (data_build.setting.version_file == fake_build_version_type_major_e) { memcpy(parameter_file_path + main->path_build_libraries_shared.used, parameter_file_name_major, parameter_file_name_major_length); } - else if (data_build.setting.version_file == fake_build_version_type_minor) { + else if (data_build.setting.version_file == fake_build_version_type_minor_e) { memcpy(parameter_file_path + main->path_build_libraries_shared.used, parameter_file_name_minor, parameter_file_name_minor_length); } - else if (data_build.setting.version_file == fake_build_version_type_micro) { + else if (data_build.setting.version_file == fake_build_version_type_micro_e) { memcpy(parameter_file_path + main->path_build_libraries_shared.used, parameter_file_name_micro, parameter_file_name_micro_length); } - else if (data_build.setting.version_file == fake_build_version_type_nano) { + else if (data_build.setting.version_file == fake_build_version_type_nano_e) { memcpy(parameter_file_path + main->path_build_libraries_shared.used, parameter_file_name_nano, parameter_file_name_nano_length); } - if (data_build.setting.version_target == fake_build_version_type_major) { + if (data_build.setting.version_target == fake_build_version_type_major_e) { memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_s_length, parameter_file_name_major, parameter_file_name_major_length); } - else if (data_build.setting.version_target == fake_build_version_type_minor) { + else if (data_build.setting.version_target == fake_build_version_type_minor_e) { memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_s_length, parameter_file_name_minor, parameter_file_name_minor_length); } - else if (data_build.setting.version_target == fake_build_version_type_micro) { + else if (data_build.setting.version_target == fake_build_version_type_micro_e) { memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_s_length, parameter_file_name_micro, parameter_file_name_micro_length); } - else if (data_build.setting.version_target == fake_build_version_type_nano) { + else if (data_build.setting.version_target == fake_build_version_type_nano_e) { memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_s_length, parameter_file_name_nano, parameter_file_name_nano_length); } @@ -373,23 +373,23 @@ extern "C" { *status = f_file_link(parameter_file_name_major, parameter_file_path); - if (F_status_is_error_not(*status) && main->error.verbosity == f_console_verbosity_verbose) { + if (F_status_is_error_not(*status) && main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("Linked file '%S' to '%S'.%c", main->output.to.stream, parameter_file_path, parameter_file_name_major, f_string_eol_s[0]); } else if (F_status_is_error(*status)) { if (F_status_set_fine(*status) == F_file_found) { - fll_error_file_print(main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_path, "link", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_path, "link", fll_error_file_type_file_e); return 0; } - fll_error_file_print(main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_major, "link", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_major, "link", fll_error_file_type_file_e); return 0; } } - if (data_build.setting.version_file != fake_build_version_type_major && parameter_file_name_major_length) { + if (data_build.setting.version_file != fake_build_version_type_major_e && parameter_file_name_major_length) { f_array_length_t parameter_file_path_length = main->path_build_libraries_shared.used + parameter_file_name_major_length; @@ -402,22 +402,22 @@ extern "C" { *status = f_file_link(parameter_file_name_minor, parameter_file_path); - if (F_status_is_error_not(*status) && main->error.verbosity == f_console_verbosity_verbose) { + if (F_status_is_error_not(*status) && main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("Linked file '%S' to '%S'.%c", main->output.to.stream, parameter_file_path, parameter_file_name_minor, f_string_eol_s[0]); } else if (F_status_is_error(*status)) { if (F_status_set_fine(*status) == F_file_found) { - fll_error_file_print(main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_path, "link", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_path, "link", fll_error_file_type_file_e); return 0; } - fll_error_file_print(main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_minor, "link", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_minor, "link", fll_error_file_type_file_e); return 0; } - if (data_build.setting.version_file != fake_build_version_type_minor && parameter_file_name_minor_length) { + if (data_build.setting.version_file != fake_build_version_type_minor_e && parameter_file_name_minor_length) { f_array_length_t parameter_file_path_length = main->path_build_libraries_shared.used + parameter_file_name_minor_length; @@ -430,22 +430,22 @@ extern "C" { *status = f_file_link(parameter_file_name_micro, parameter_file_path); - if (F_status_is_error_not(*status) && main->error.verbosity == f_console_verbosity_verbose) { + if (F_status_is_error_not(*status) && main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("Linked file '%S' to '%S'.%c", main->output.to.stream, parameter_file_path, parameter_file_name_micro, f_string_eol_s[0]); } else if (F_status_is_error(*status)) { if (F_status_set_fine(*status) == F_file_found) { - fll_error_file_print(main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_path, "link", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_path, "link", fll_error_file_type_file_e); return 0; } - fll_error_file_print(main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_micro, "link", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_micro, "link", fll_error_file_type_file_e); return 0; } - if (data_build.setting.version_file != fake_build_version_type_micro && parameter_file_name_micro_length) { + if (data_build.setting.version_file != fake_build_version_type_micro_e && parameter_file_name_micro_length) { f_array_length_t parameter_file_path_length = main->path_build_libraries_shared.used + parameter_file_name_micro_length; @@ -458,17 +458,17 @@ extern "C" { *status = f_file_link(parameter_file_name_nano, parameter_file_path); - if (F_status_is_error_not(*status) && main->error.verbosity == f_console_verbosity_verbose) { + if (F_status_is_error_not(*status) && main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("Linked file '%S' to '%S'.%c", main->output.to.stream, parameter_file_path, parameter_file_name_nano, f_string_eol_s[0]); } else if (F_status_is_error(*status)) { if (F_status_set_fine(*status) == F_file_found) { - fll_error_file_print(main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_path, "link", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_path, "link", fll_error_file_type_file_e); return 0; } - fll_error_file_print(main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_nano, "link", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_nano, "link", fll_error_file_type_file_e); return 0; } @@ -488,7 +488,7 @@ extern "C" { if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true || *status == F_child) return main->child; if (!data_build.setting.build_sources_library.used) return 0; - if (main->output.verbosity != f_console_verbosity_quiet) { + if (main->output.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[Compiling static library.%]%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, main->context.set.important, f_string_eol_s[0]); } diff --git a/level_3/fake/c/private-build-load.c b/level_3/fake/c/private-build-load.c index c251133..677844f 100644 --- a/level_3/fake/c/private-build-load.c +++ b/level_3/fake/c/private-build-load.c @@ -52,7 +52,7 @@ extern "C" { if (environment->used + data_build.setting.environment.used > environment->size) { if (environment->used + data_build.setting.environment.used > f_environment_max_length) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SThe values for the setting '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -552,7 +552,7 @@ extern "C" { } // for if (found == F_false) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SThe specified mode '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -637,7 +637,7 @@ extern "C" { if (F_status_is_error(*status)) { if (*status == F_status_set_error(F_string_too_large)) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { funlockfile(main->error.to.stream); fl_print_format("%c%[%SA setting in the file '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -851,7 +851,7 @@ extern "C" { 0, // search_exclusive 0, // search_shared 0, // search_static - fake_build_version_type_micro, // version_file + fake_build_version_type_micro_e, // version_file 0, // version_major 0, // version_major_prefix 0, // version_micro @@ -860,7 +860,7 @@ extern "C" { 0, // version_minor_prefix 0, // version_nano 0, // version_nano_prefix - fake_build_version_type_major, // version_target + fake_build_version_type_major_e, // version_target }; const char *settings_single_version_default_name[] = { @@ -941,7 +941,7 @@ extern "C" { if (!settings_single_source[i]->used) continue; if (settings_single_source[i]->used > 1) { - if (main->warning.verbosity == f_console_verbosity_verbose) { + if (main->warning.verbosity == f_console_verbosity_verbose_e) { flockfile(main->warning.to.stream); fl_print_format("%c%[%SThe setting '%]", main->warning.to.stream, f_string_eol_s[0], main->warning.context, main->warning.prefix, main->warning.context); @@ -966,7 +966,7 @@ extern "C" { else { *settings_single_bool[i] = F_true; - if (main->warning.verbosity == f_console_verbosity_verbose) { + if (main->warning.verbosity == f_console_verbosity_verbose_e) { flockfile(main->warning.to.stream); fl_print_format("%c%[%SThe setting '%]", main->warning.to.stream, f_string_eol_s[0], main->warning.context, main->warning.prefix, main->warning.context); @@ -987,18 +987,18 @@ extern "C" { } else if (settings_single_type[i] == 4) { if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_language_bash_s, settings_single_source[i]->array[0].used, fake_build_language_bash_s_length) == F_equal_to) { - *settings_single_language[i] = fake_build_language_type_bash; + *settings_single_language[i] = fake_build_language_type_bash_e; } else if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_language_c_s, settings_single_source[i]->array[0].used, fake_build_language_c_s_length) == F_equal_to) { - *settings_single_language[i] = fake_build_language_type_c; + *settings_single_language[i] = fake_build_language_type_c_e; } else if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_language_cpp_s, settings_single_source[i]->array[0].used, fake_build_language_cpp_s_length) == F_equal_to) { - *settings_single_language[i] = fake_build_language_type_cpp; + *settings_single_language[i] = fake_build_language_type_cpp_e; } else { - *settings_single_language[i] = fake_build_language_type_c; + *settings_single_language[i] = fake_build_language_type_c_e; - if (main->warning.verbosity == f_console_verbosity_verbose) { + if (main->warning.verbosity == f_console_verbosity_verbose_e) { flockfile(main->warning.to.stream); fl_print_format("%c%[%SThe setting '%]", main->warning.to.stream, f_string_eol_s[0], main->warning.context, main->warning.prefix, main->warning.context); @@ -1021,21 +1021,21 @@ extern "C" { } else if (settings_single_type[i] == 5) { if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_version_major_s, settings_single_source[i]->array[0].used, fake_build_version_major_s_length) == F_equal_to) { - *settings_single_version[i] = fake_build_version_type_major; + *settings_single_version[i] = fake_build_version_type_major_e; } else if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_version_minor_s, settings_single_source[i]->array[0].used, fake_build_version_minor_s_length) == F_equal_to) { - *settings_single_version[i] = fake_build_version_type_minor; + *settings_single_version[i] = fake_build_version_type_minor_e; } else if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_version_micro_s, settings_single_source[i]->array[0].used, fake_build_version_micro_s_length) == F_equal_to) { - *settings_single_version[i] = fake_build_version_type_micro; + *settings_single_version[i] = fake_build_version_type_micro_e; } else if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_version_nano_s, settings_single_source[i]->array[0].used, fake_build_version_nano_s_length) == F_equal_to) { - *settings_single_version[i] = fake_build_version_type_nano; + *settings_single_version[i] = fake_build_version_type_nano_e; } else { *settings_single_version[i] = settings_single_version_default[i]; - if (main->warning.verbosity == f_console_verbosity_verbose) { + if (main->warning.verbosity == f_console_verbosity_verbose_e) { flockfile(main->warning.to.stream); fl_print_format("%c%[%SThe setting '%]", main->warning.to.stream, f_string_eol_s[0], main->warning.context, main->warning.prefix, main->warning.context); @@ -1092,9 +1092,9 @@ extern "C" { if (F_status_is_error_not(*status)) { if (checks && !setting->version_file) { - setting->version_file = fake_build_version_type_micro; + setting->version_file = fake_build_version_type_micro_e; - if (main->warning.verbosity == f_console_verbosity_verbose) { + if (main->warning.verbosity == f_console_verbosity_verbose_e) { flockfile(main->warning.to.stream); fl_print_format("%c%[%SThe setting '%]", main->warning.to.stream, f_string_eol_s[0], main->warning.context, main->warning.prefix, main->warning.context); @@ -1110,9 +1110,9 @@ extern "C" { } if (checks && !setting->version_target) { - setting->version_target = fake_build_version_type_major; + setting->version_target = fake_build_version_type_major_e; - if (main->warning.verbosity == f_console_verbosity_verbose) { + if (main->warning.verbosity == f_console_verbosity_verbose_e) { flockfile(main->warning.to.stream); fl_print_format("%c%[%SThe setting '%]", main->warning.to.stream, f_string_eol_s[0], main->warning.context, main->warning.prefix, main->warning.context); @@ -1199,7 +1199,7 @@ extern "C" { for (j = 0; j < 2; ++j) { if (setting_target[j] && i + 1 <= setting_target[j]) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SWhen the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -1313,9 +1313,9 @@ extern "C" { if (F_status_is_error(*status)) return; // Override setting file when any of these are specified in the command line. - if (main->parameters[fake_parameter_shared_disabled].result == f_console_result_found) { - if (main->parameters[fake_parameter_shared_enabled].result == f_console_result_found) { - if (main->parameters[fake_parameter_shared_enabled].location > main->parameters[fake_parameter_shared_disabled].location) { + if (main->parameters[fake_parameter_shared_disabled_e].result == f_console_result_found_e) { + if (main->parameters[fake_parameter_shared_enabled_e].result == f_console_result_found_e) { + if (main->parameters[fake_parameter_shared_enabled_e].location > main->parameters[fake_parameter_shared_disabled_e].location) { setting->build_shared = F_true; setting->search_shared = F_true; } @@ -1324,7 +1324,7 @@ extern "C" { setting->search_shared = F_false; } - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SThe parameters '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -1343,14 +1343,14 @@ extern "C" { setting->search_shared = F_false; } } - else if (main->parameters[fake_parameter_shared_enabled].result == f_console_result_found) { + else if (main->parameters[fake_parameter_shared_enabled_e].result == f_console_result_found_e) { setting->build_shared = F_true; setting->search_shared = F_true; } - if (main->parameters[fake_parameter_static_disabled].result == f_console_result_found) { - if (main->parameters[fake_parameter_static_enabled].result == f_console_result_found) { - if (main->parameters[fake_parameter_static_enabled].location > main->parameters[fake_parameter_static_disabled].location) { + if (main->parameters[fake_parameter_static_disabled_e].result == f_console_result_found_e) { + if (main->parameters[fake_parameter_static_enabled_e].result == f_console_result_found_e) { + if (main->parameters[fake_parameter_static_enabled_e].location > main->parameters[fake_parameter_static_disabled_e].location) { setting->build_static = F_true; setting->search_static = F_true; } @@ -1359,7 +1359,7 @@ extern "C" { setting->search_static = F_false; } - if (main->error.verbosity == f_console_verbosity_verbose) { + if (main->error.verbosity == f_console_verbosity_verbose_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SThe parameters '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -1378,14 +1378,14 @@ extern "C" { setting->search_static = F_false; } } - else if (main->parameters[fake_parameter_static_enabled].result == f_console_result_found) { + else if (main->parameters[fake_parameter_static_enabled_e].result == f_console_result_found_e) { setting->build_static = F_true; setting->search_static = F_true; } - if (setting->build_language == fake_build_language_type_c || setting->build_language == fake_build_language_type_cpp) { + if (setting->build_language == fake_build_language_type_c_e || setting->build_language == fake_build_language_type_cpp_e) { if (setting->build_shared == F_false && setting->build_static == F_false) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SThe build settings '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -1393,7 +1393,7 @@ extern "C" { fl_print_format("%[' and '%]", main->error.to.stream, main->error.context, main->error.context); fl_print_format("%[%s%]", main->error.to.stream, main->error.notable, fake_build_setting_name_build_static_s, main->error.notable); fl_print_format("%[' cannot both be false when using the language '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, setting->build_language == fake_build_language_type_c ? fake_build_language_c_s : fake_build_language_cpp_s, main->error.notable); + fl_print_format("%[%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, setting->build_language == fake_build_language_type_c_e ? fake_build_language_c_s : fake_build_language_cpp_s, main->error.notable); fl_print_format("%['.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); diff --git a/level_3/fake/c/private-build-objects.c b/level_3/fake/c/private-build-objects.c index 9e643eb..b75bd2a 100644 --- a/level_3/fake/c/private-build-objects.c +++ b/level_3/fake/c/private-build-objects.c @@ -16,7 +16,7 @@ extern "C" { if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true || *status == F_child) return main->child; if (!data_build.setting.build_sources_library.used) return 0; - if (main->output.verbosity != f_console_verbosity_quiet) { + if (main->output.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[Compiling static objects.%]%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, main->context.set.important, f_string_eol_s[0]); } @@ -33,11 +33,11 @@ extern "C" { if (data_build.setting.path_standard) { path_sources = &main->path_sources_c; - if (data_build.setting.build_language == fake_build_language_type_cpp) { + if (data_build.setting.build_language == fake_build_language_type_cpp_e) { path_sources = &main->path_sources_cpp; } } - else if (main->parameters[fake_parameter_path_sources].result != f_console_result_additional) { + else if (main->parameters[fake_parameter_path_sources_e].result != f_console_result_additional_e) { path_sources = &data_build.setting.path_sources; } @@ -108,7 +108,7 @@ extern "C" { *status = f_directory_exists(destination_path.string); if (*status == F_false) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SThe path '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -136,18 +136,18 @@ extern "C" { funlockfile(main->error.to.stream); } else { - fll_error_file_print(main->error, F_status_set_fine(*status), "f_directory_create", F_true, destination_path.string, "create", fll_error_file_type_directory); + fll_error_file_print(main->error, F_status_set_fine(*status), "f_directory_create", F_true, destination_path.string, "create", fll_error_file_type_directory_e); } break; } - if (main->error.verbosity == f_console_verbosity_verbose) { + if (main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("Directory '%Q' created.%c", main->output.to.stream, destination_path, f_string_eol_s[0]); } } else if (F_status_is_error(*status)) { - fll_error_file_print(main->error, F_status_set_fine(*status), "f_directory_exists", F_true, destination_path.string, "create", fll_error_file_type_directory); + fll_error_file_print(main->error, F_status_set_fine(*status), "f_directory_exists", F_true, destination_path.string, "create", fll_error_file_type_directory_e); break; } diff --git a/level_3/fake/c/private-build-program.c b/level_3/fake/c/private-build-program.c index aea1158..aa8ae1a 100644 --- a/level_3/fake/c/private-build-program.c +++ b/level_3/fake/c/private-build-program.c @@ -27,7 +27,7 @@ extern "C" { if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true || *status == F_child) return main->child; if (!data_build.setting.build_sources_program.used) return 0; - if (main->output.verbosity != f_console_verbosity_quiet) { + if (main->output.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[Compiling shared program.%]%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, main->context.set.important, f_string_eol_s[0]); } @@ -39,11 +39,11 @@ extern "C" { if (data_build.setting.path_standard) { path_sources = &main->path_sources_c; - if (data_build.setting.build_language == fake_build_language_type_cpp) { + if (data_build.setting.build_language == fake_build_language_type_cpp_e) { path_sources = &main->path_sources_cpp; } } - else if (main->parameters[fake_parameter_path_sources].result != f_console_result_additional) { + else if (main->parameters[fake_parameter_path_sources_e].result != f_console_result_additional_e) { path_sources = &data_build.setting.path_sources; } @@ -145,7 +145,7 @@ extern "C" { if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true || *status == F_child) return main->child; if (!data_build.setting.build_sources_program.used) return 0; - if (main->output.verbosity != f_console_verbosity_quiet) { + if (main->output.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[Compiling static program.%]%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, main->context.set.important, f_string_eol_s[0]); } @@ -157,11 +157,11 @@ extern "C" { if (data_build.setting.path_standard) { path_sources = &main->path_sources_c; - if (data_build.setting.build_language == fake_build_language_type_cpp) { + if (data_build.setting.build_language == fake_build_language_type_cpp_e) { path_sources = &main->path_sources_cpp; } } - else if (main->parameters[fake_parameter_path_sources].result != f_console_result_additional) { + else if (main->parameters[fake_parameter_path_sources_e].result != f_console_result_additional_e) { path_sources = &data_build.setting.path_sources; } diff --git a/level_3/fake/c/private-build-skeleton.c b/level_3/fake/c/private-build-skeleton.c index caf5815..9dba183 100644 --- a/level_3/fake/c/private-build-skeleton.c +++ b/level_3/fake/c/private-build-skeleton.c @@ -56,7 +56,7 @@ extern "C" { &path_headers, }; - if (main->output.verbosity != f_console_verbosity_quiet) { + if (main->output.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[Creating base build directories.%]%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, main->context.set.important, f_string_eol_s[0]); } @@ -98,11 +98,11 @@ extern "C" { continue; } - fll_error_file_print(main->error, F_status_set_fine(*status), "f_directory_create", F_true, directorys[i]->string, "create", fll_error_file_type_directory); + fll_error_file_print(main->error, F_status_set_fine(*status), "f_directory_create", F_true, directorys[i]->string, "create", fll_error_file_type_directory_e); return; } - if (main->error.verbosity == f_console_verbosity_verbose) { + if (main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("Created directory '%Q'.%c", main->output.to.stream, directorys[i], f_string_eol_s[0]); } } // for diff --git a/level_3/fake/c/private-build.c b/level_3/fake/c/private-build.c index a67aae1..5afdddb 100644 --- a/level_3/fake/c/private-build.c +++ b/level_3/fake/c/private-build.c @@ -303,7 +303,7 @@ extern "C" { f_string_dynamic_t destination_file = f_string_dynamic_t_initialize; f_string_dynamic_t destination_directory = f_string_dynamic_t_initialize; - if (main->output.verbosity != f_console_verbosity_quiet) { + if (main->output.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[Copying %S.%]%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, label, main->context.set.important, f_string_eol_s[0]); } @@ -320,7 +320,7 @@ extern "C" { fl_directory_recurse_t recurse = fl_directory_recurse_t_initialize; - if (main->error.verbosity == f_console_verbosity_verbose) { + if (main->error.verbosity == f_console_verbosity_verbose_e) { recurse.output.stream = main->output.to.stream; recurse.output.id = main->output.to.id; recurse.output.flag = main->output.to.flag; @@ -385,7 +385,7 @@ extern "C" { *status = fl_directory_copy(path_source.string, destination_directory.string, path_source.used, destination_directory.used, mode, recurse); if (F_status_is_error(*status)) { - if (main->error.verbosity == f_console_verbosity_verbose) { + if (main->error.verbosity == f_console_verbosity_verbose_e) { for (f_array_length_t j = 0; j < failures.used; ++j) { fake_print_error_build_operation_file(main, F_status_set_fine(*status), "fl_directory_copy", "copy directory", "to", path_source.string, destination_directory.string, F_true); } // for @@ -396,7 +396,7 @@ extern "C" { break; } - else if (main->error.verbosity != f_console_verbosity_quiet) { + else if (main->error.verbosity != f_console_verbosity_quiet_e) { fake_print_error_build_operation_file(main, F_status_set_fine(*status), "fl_directory_copy", "copy directory", "to", path_source.string, destination_directory.string, F_true); } @@ -439,7 +439,7 @@ extern "C" { *status = fl_directory_create(destination_directory.string, destination_directory.used, F_file_mode_all_rwx_d); if (F_status_is_error(*status)) { - fll_error_file_print(main->error, F_status_set_fine(*status), "fl_directory_create", F_true, destination_directory.string, "create", fll_error_file_type_directory); + fll_error_file_print(main->error, F_status_set_fine(*status), "fl_directory_create", F_true, destination_directory.string, "create", fll_error_file_type_directory_e); break; } @@ -473,12 +473,12 @@ extern "C" { break; } - if (main->error.verbosity == f_console_verbosity_verbose) { + if (main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("Copied file '%Q' to '%Q'.%c", main->output.to.stream, path_source, destination_file, f_string_eol_s[0]); } } else if (F_status_is_error(*status)) { - fll_error_file_print(main->error, F_status_set_fine(*status), "f_directory_is", F_true, path_source.string, "create", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(*status), "f_directory_is", F_true, path_source.string, "create", fll_error_file_type_file_e); break; } @@ -524,16 +524,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) && main->error.verbosity != f_console_verbosity_normal) { + if (F_status_is_error_not(*status) && main->error.verbosity != f_console_verbosity_normal_e) { char argument[3] = { f_console_symbol_short_disable_s[0], 0, 0 }; - if (main->error.verbosity == f_console_verbosity_quiet) { + if (main->error.verbosity == f_console_verbosity_quiet_e) { argument[1] = f_console_standard_short_quiet_s[0]; } - else if (main->error.verbosity == f_console_verbosity_verbose) { + else if (main->error.verbosity == f_console_verbosity_verbose_e) { argument[1] = f_console_standard_short_verbose_s[0]; } - else if (main->error.verbosity == f_console_verbosity_debug) { + else if (main->error.verbosity == f_console_verbosity_debug_e) { argument[1] = f_console_standard_short_debug_s[0]; } @@ -698,7 +698,7 @@ extern "C" { else if (*status != F_child) { if (F_status_is_error(*status)) { if (F_status_set_fine(*status) == F_failure) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SFailed to execute script: '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -778,7 +778,7 @@ extern "C" { fake_build_load_setting(main, setting_file, &data_build.setting, &status); if (F_status_is_fine(status)) { - if (main->output.verbosity != f_console_verbosity_quiet) { + if (main->output.verbosity != f_console_verbosity_quiet_e) { flockfile(main->output.to.stream); fl_print_format("%c%[Building project%] ", main->output.to.stream, f_string_eol_s[0], main->context.set.important, main->context.set.important); @@ -799,7 +799,7 @@ extern "C" { fake_build_copy(main, mode, "setting files", main->path_data_settings, main->path_build_settings, data_build.setting.build_sources_setting, stage.file_sources_settings, 0, &status); - if (data_build.setting.build_language == fake_build_language_type_bash) { + if (data_build.setting.build_language == fake_build_language_type_bash_e) { fake_build_library_script(main, data_build, mode, stage.file_libraries_script, &status); fake_build_program_script(main, data_build, mode, stage.file_programs_script, &status); @@ -815,11 +815,11 @@ extern "C" { if (data_build.setting.path_standard) { path_sources = main->path_sources_c; - if (data_build.setting.build_language == fake_build_language_type_cpp) { + if (data_build.setting.build_language == fake_build_language_type_cpp_e) { path_sources = main->path_sources_cpp; } } - else if (main->parameters[fake_parameter_path_sources].result != f_console_result_additional) { + else if (main->parameters[fake_parameter_path_sources_e].result != f_console_result_additional_e) { path_sources = data_build.setting.path_sources; } @@ -898,7 +898,7 @@ extern "C" { *status = f_file_touch(file.string, mode.regular, F_false); if (F_status_is_error(*status)) { - fll_error_file_print(main->error, F_status_set_fine(*status), "f_file_touch", F_true, file.string, "touch", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(*status), "f_file_touch", F_true, file.string, "touch", fll_error_file_type_file_e); } } #endif // _di_fake_build_touch_ diff --git a/level_3/fake/c/private-clean.c b/level_3/fake/c/private-clean.c index 294856a..a5c743f 100644 --- a/level_3/fake/c/private-clean.c +++ b/level_3/fake/c/private-clean.c @@ -15,7 +15,7 @@ extern "C" { f_status_t status = F_none; - if (main->output.verbosity != f_console_verbosity_quiet) { + if (main->output.verbosity != f_console_verbosity_quiet_e) { flockfile(main->output.to.stream); fl_print_format("%c%[Deleting all files within build directory '%]", main->output.to.stream, f_string_eol_s[0], main->context.set.important, main->context.set.important); @@ -29,7 +29,7 @@ extern "C" { return F_status_set_error(F_interrupt); } - if (main->error.verbosity == f_console_verbosity_verbose) { + if (main->error.verbosity == f_console_verbosity_verbose_e) { status = f_directory_remove_custom(main->path_build.string, F_directory_descriptors_max_d, F_true, fake_clean_remove_recursively_verbosely); } else { @@ -37,7 +37,7 @@ extern "C" { } if (F_status_set_fine(status) == F_file_found_not) { - if (main->error.verbosity == f_console_verbosity_verbose) { + if (main->error.verbosity == f_console_verbosity_verbose_e) { flockfile(main->output.to.stream); f_print_terminated("The build directory '", main->output.to.stream); @@ -51,7 +51,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_directory_remove", F_true, main->path_build.string, "remove", fll_error_file_type_directory); + fll_error_file_print(main->error, F_status_set_fine(status), "f_directory_remove", F_true, main->path_build.string, "remove", fll_error_file_type_directory_e); return status; } diff --git a/level_3/fake/c/private-common.h b/level_3/fake/c/private-common.h index 24a5a17..e45d32c 100644 --- a/level_3/fake/c/private-common.h +++ b/level_3/fake/c/private-common.h @@ -813,40 +813,40 @@ extern "C" { extern const f_string_t fake_make_operation_touch_s; enum { - fake_make_operation_type_and = 1, - fake_make_operation_type_break, - fake_make_operation_type_build, - fake_make_operation_type_clean, - fake_make_operation_type_clone, - fake_make_operation_type_compile, - fake_make_operation_type_copy, - fake_make_operation_type_define, - fake_make_operation_type_delete, - fake_make_operation_type_deletes, - fake_make_operation_type_else, - fake_make_operation_type_exit, - fake_make_operation_type_fail, - fake_make_operation_type_group, - fake_make_operation_type_groups, - fake_make_operation_type_if, - fake_make_operation_type_index, - fake_make_operation_type_link, - fake_make_operation_type_mode, - fake_make_operation_type_modes, - fake_make_operation_type_move, - fake_make_operation_type_operate, - fake_make_operation_type_or, - fake_make_operation_type_owner, - fake_make_operation_type_owners, - fake_make_operation_type_parameter, - fake_make_operation_type_pop, - fake_make_operation_type_print, - fake_make_operation_type_run, - fake_make_operation_type_shell, - fake_make_operation_type_skeleton, - fake_make_operation_type_to, - fake_make_operation_type_top, - fake_make_operation_type_touch, + fake_make_operation_type_and_e = 1, + fake_make_operation_type_break_e, + fake_make_operation_type_build_e, + fake_make_operation_type_clean_e, + fake_make_operation_type_clone_e, + fake_make_operation_type_compile_e, + fake_make_operation_type_copy_e, + fake_make_operation_type_define_e, + fake_make_operation_type_delete_e, + fake_make_operation_type_deletes_e, + fake_make_operation_type_else_e, + fake_make_operation_type_exit_e, + fake_make_operation_type_fail_e, + fake_make_operation_type_group_e, + fake_make_operation_type_groups_e, + fake_make_operation_type_if_e, + fake_make_operation_type_index_e, + fake_make_operation_type_link_e, + fake_make_operation_type_mode_e, + fake_make_operation_type_modes_e, + fake_make_operation_type_move_e, + fake_make_operation_type_operate_e, + fake_make_operation_type_or_e, + fake_make_operation_type_owner_e, + fake_make_operation_type_owners_e, + fake_make_operation_type_parameter_e, + fake_make_operation_type_pop_e, + fake_make_operation_type_print_e, + fake_make_operation_type_run_e, + fake_make_operation_type_shell_e, + fake_make_operation_type_skeleton_e, + fake_make_operation_type_to_e, + fake_make_operation_type_top_e, + fake_make_operation_type_touch_e, }; #define fake_make_operation_total_d 34 @@ -951,36 +951,36 @@ extern "C" { extern const f_string_t fake_make_operation_argument_if_success_s; enum { - fake_make_operation_if_type_done = 1, - fake_make_operation_if_type_else, - fake_make_operation_if_type_if, - fake_make_operation_if_type_if_defined, - fake_make_operation_if_type_if_equal, - fake_make_operation_if_type_if_equal_not, - fake_make_operation_if_type_if_exists, - fake_make_operation_if_type_if_failure, - fake_make_operation_if_type_if_greater, - fake_make_operation_if_type_if_greater_equal, - fake_make_operation_if_type_if_group, - fake_make_operation_if_type_if_is, - fake_make_operation_if_type_if_less, - fake_make_operation_if_type_if_less_equal, - fake_make_operation_if_type_if_mode, - fake_make_operation_if_type_if_not, - fake_make_operation_if_type_if_not_defined, - fake_make_operation_if_type_if_not_exists, - fake_make_operation_if_type_if_not_group, - fake_make_operation_if_type_if_not_is, - fake_make_operation_if_type_if_not_mode, - fake_make_operation_if_type_if_not_owner, - fake_make_operation_if_type_if_owner, - fake_make_operation_if_type_if_success, + fake_make_operation_if_type_done_e = 1, + fake_make_operation_if_type_else_e, + fake_make_operation_if_type_if_e, + fake_make_operation_if_type_if_defined_e, + fake_make_operation_if_type_if_equal_e, + fake_make_operation_if_type_if_equal_not_e, + fake_make_operation_if_type_if_exists_e, + fake_make_operation_if_type_if_failure_e, + fake_make_operation_if_type_if_greater_e, + fake_make_operation_if_type_if_greater_equal_e, + fake_make_operation_if_type_if_group_e, + fake_make_operation_if_type_if_is_e, + fake_make_operation_if_type_if_less_e, + fake_make_operation_if_type_if_less_equal_e, + fake_make_operation_if_type_if_mode_e, + fake_make_operation_if_type_if_not_e, + fake_make_operation_if_type_if_not_defined_e, + fake_make_operation_if_type_if_not_exists_e, + fake_make_operation_if_type_if_not_group_e, + fake_make_operation_if_type_if_not_is_e, + fake_make_operation_if_type_if_not_mode_e, + fake_make_operation_if_type_if_not_owner_e, + fake_make_operation_if_type_if_owner_e, + fake_make_operation_if_type_if_success_e, }; enum { - fake_make_operation_fail_type_exit = 1, - fake_make_operation_fail_type_warn, - fake_make_operation_fail_type_ignore, + fake_make_operation_fail_type_exit_e = 1, + fake_make_operation_fail_type_warn_e, + fake_make_operation_fail_type_ignore_e, }; #define fake_make_operation_recursion_depth_max_d 65535 @@ -1210,10 +1210,10 @@ extern "C" { */ #ifndef _di_fake_condition_result_ enum { - fake_condition_result_none = 0, - fake_condition_result_false, - fake_condition_result_true, - fake_condition_result_done, + fake_condition_result_none_e = 0, + fake_condition_result_false_e, + fake_condition_result_true_e, + fake_condition_result_done_e, }; #endif // _di_fake_condition_result_ diff --git a/level_3/fake/c/private-fake.c b/level_3/fake/c/private-fake.c index d9b5f3a..527928b 100644 --- a/level_3/fake/c/private-fake.c +++ b/level_3/fake/c/private-fake.c @@ -15,7 +15,7 @@ extern "C" { if (F_status_is_error(*status)) return 1; - if (main->error.verbosity == f_console_verbosity_verbose) { + if (main->error.verbosity == f_console_verbosity_verbose_e) { flockfile(main->output.to.stream); f_print_dynamic(program, main->output.to.stream); @@ -69,7 +69,7 @@ extern "C" { return_code = 1; if (F_status_set_fine(*status) == F_file_found_not) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SFailed to find program '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -116,7 +116,7 @@ extern "C" { macro_f_string_dynamic_t_resize((status), (*buffer), size_file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), name_function, F_true, path_file, "allocate buffer size for", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), name_function, F_true, path_file, "allocate buffer size for", fll_error_file_type_file_e); macro_f_string_dynamic_t_delete_simple((*buffer)); @@ -142,7 +142,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), name_function, F_true, path_file, "read", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), name_function, F_true, path_file, "read", fll_error_file_type_file_e); macro_f_string_dynamic_t_delete_simple((*buffer)); } @@ -160,9 +160,9 @@ extern "C" { { const uint8_t parameters_id[] = { - fake_parameter_fakefile, - fake_parameter_process, - fake_parameter_settings, + fake_parameter_fakefile_e, + fake_parameter_process_e, + fake_parameter_settings_e, }; const f_string_t parameters_name[] = { @@ -197,12 +197,12 @@ extern "C" { for (uint8_t i = 0; i < 3; ++i) { - if (main->parameters[parameters_id[i]].result == f_console_result_found) { + if (main->parameters[parameters_id[i]].result == f_console_result_found_e) { fake_print_error_parameter_missing_value(main, parameters_name[i]); return F_status_set_error(F_parameter); } - else if (main->parameters[parameters_id[i]].result == f_console_result_additional) { + else if (main->parameters[parameters_id[i]].result == f_console_result_additional_e) { if (main->parameters[parameters_id[i]].locations.used > 1) { fake_print_error_parameter_too_many(main, parameters_name[i]); @@ -224,7 +224,7 @@ extern "C" { status = f_utf_is_word_dash_plus(arguments->argv[location] + j, width_max, F_false); if (F_status_is_error(status)) { - if (fll_error_print(main->error, F_status_set_fine(status), "f_utf_is_word_dash_plus", F_false) == F_known_not && main->error.verbosity != f_console_verbosity_quiet) { + if (fll_error_print(main->error, F_status_set_fine(status), "f_utf_is_word_dash_plus", F_false) == F_known_not && main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SFailed to process the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -238,7 +238,7 @@ extern "C" { } if (status == F_false) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -259,7 +259,7 @@ extern "C" { if (F_status_is_error(status)) { if (status == F_status_set_error(F_string_too_large)) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -281,7 +281,7 @@ extern "C" { } if (length == 0 || status == F_data_not) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -307,7 +307,7 @@ extern "C" { } // for } - if (main->parameters[fake_parameter_define].result == f_console_result_found) { + if (main->parameters[fake_parameter_define_e].result == f_console_result_found_e) { fake_print_error_parameter_missing_value(main, fake_long_define_s); return F_status_set_error(F_parameter); @@ -315,10 +315,10 @@ extern "C" { { const uint8_t parameters_id[] = { - fake_parameter_path_build, - fake_parameter_path_data, - fake_parameter_path_sources, - fake_parameter_path_work, + fake_parameter_path_build_e, + fake_parameter_path_data_e, + fake_parameter_path_sources_e, + fake_parameter_path_work_e, }; const f_string_t parameters_name[] = { @@ -351,12 +351,12 @@ extern "C" { for (uint8_t i = 0; i < 4; ++i) { - if (main->parameters[parameters_id[i]].result == f_console_result_found) { + if (main->parameters[parameters_id[i]].result == f_console_result_found_e) { fake_print_error_parameter_missing_value(main, parameters_name[i]); return F_status_set_error(F_parameter); } - else if (main->parameters[parameters_id[i]].result == f_console_result_additional) { + else if (main->parameters[parameters_id[i]].result == f_console_result_additional_e) { if (main->parameters[parameters_id[i]].values.used > 1) { fake_print_error_parameter_too_many(main, parameters_name[i]); @@ -366,7 +366,7 @@ extern "C" { status = fl_console_parameter_to_string_dynamic_directory(arguments->argv[main->parameters[parameters_id[i]].values.array[0]], parameters_value[i]); if (F_status_is_error(status)) { - if (fll_error_print(main->error, F_status_set_fine(status), "fl_console_parameter_to_string_dynamic_directory", F_false) == F_known_not && main->error.verbosity != f_console_verbosity_quiet) { + if (fll_error_print(main->error, F_status_set_fine(status), "fl_console_parameter_to_string_dynamic_directory", F_false) == F_known_not && main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SFailed to process parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -383,7 +383,7 @@ extern "C" { macro_f_string_dynamic_t_resize(status, (*parameters_value[i]), parameter_default_lengths[i]); if (F_status_is_error(status)) { - if (fll_error_print(main->error, F_status_set_fine(status), " macro_f_string_dynamic_t_resize", F_false) == F_known_not && main->error.verbosity != f_console_verbosity_quiet) { + if (fll_error_print(main->error, F_status_set_fine(status), " macro_f_string_dynamic_t_resize", F_false) == F_known_not && main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SFailed to load default for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -402,11 +402,11 @@ extern "C" { } // for } - if (main->parameters[fake_parameter_define].result == f_console_result_additional) { - status = fll_program_parameter_additional_rip(arguments->argv, main->parameters[fake_parameter_define].values, &main->define); + if (main->parameters[fake_parameter_define_e].result == f_console_result_additional_e) { + status = fll_program_parameter_additional_rip(arguments->argv, main->parameters[fake_parameter_define_e].values, &main->define); if (F_status_is_error(status)) { - if (fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_additional_rip", F_false) == F_known_not && main->error.verbosity != f_console_verbosity_quiet) { + if (fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_additional_rip", F_false) == F_known_not && main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SFailed to process the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -420,15 +420,15 @@ extern "C" { } } - if (main->parameters[fake_parameter_mode].result == f_console_result_found) { + if (main->parameters[fake_parameter_mode_e].result == f_console_result_found_e) { fake_print_error_parameter_missing_value(main, fake_long_mode_s); return F_status_set_error(F_parameter); } - else if (main->parameters[fake_parameter_mode].result == f_console_result_additional) { - status = fll_program_parameter_additional_rip(arguments->argv, main->parameters[fake_parameter_mode].values, &main->mode); + else if (main->parameters[fake_parameter_mode_e].result == f_console_result_additional_e) { + status = fll_program_parameter_additional_rip(arguments->argv, main->parameters[fake_parameter_mode_e].values, &main->mode); if (F_status_is_error(status)) { - if (fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_additional_rip", F_false) == F_known_not && main->error.verbosity != f_console_verbosity_quiet) { + if (fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_additional_rip", F_false) == F_known_not && main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SFailed to process the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -454,7 +454,7 @@ extern "C" { status = f_utf_is_word_dash_plus(main->mode.array[i].string + j, width_max, F_false); if (F_status_is_error(status)) { - if (fll_error_print(main->error, F_status_set_fine(status), "f_utf_is_word_dash_plus", F_false) == F_known_not && main->error.verbosity != f_console_verbosity_quiet) { + if (fll_error_print(main->error, F_status_set_fine(status), "f_utf_is_word_dash_plus", F_false) == F_known_not && main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SFailed to process the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -468,7 +468,7 @@ extern "C" { } if (status == F_false) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -595,7 +595,7 @@ extern "C" { if (F_status_is_error(status)) { if (F_status_set_fine(status) != F_directory_found_not || parameters_required[i]) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stat", F_true, parameters_value[i]->string, "access", fll_error_file_type_directory); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stat", F_true, parameters_value[i]->string, "access", fll_error_file_type_directory_e); return status; } diff --git a/level_3/fake/c/private-make-load_fakefile.c b/level_3/fake/c/private-make-load_fakefile.c index 5a561ac..73f6416 100644 --- a/level_3/fake/c/private-make-load_fakefile.c +++ b/level_3/fake/c/private-make-load_fakefile.c @@ -31,7 +31,7 @@ extern "C" { if (F_status_is_error(*status)) return; if (!data_make->buffer.used) { - if (data_make->main->error.verbosity == f_console_verbosity_verbose) { + if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { flockfile(data_make->main->warning.to.stream); fl_print_format("%c%[%SThe fakefile '%]", data_make->main->warning.to.stream, f_string_eol_s[0], data_make->main->warning.context, data_make->main->warning.prefix, data_make->main->warning.context); @@ -198,7 +198,7 @@ extern "C" { } if (missing_main) { - if (data_make->main->error.verbosity != f_console_verbosity_quiet) { + if (data_make->main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(data_make->main->error.to.stream); fl_print_format("%c%[%SThe fakefile '%]", data_make->main->error.to.stream, f_string_eol_s[0], data_make->main->error.context, data_make->main->error.prefix, data_make->main->error.context); @@ -259,7 +259,7 @@ extern "C" { data_make->setting_make.parameter.array[0].value.used = 1; data_make->setting_make.load_build = F_true; - data_make->setting_make.fail = fake_make_operation_fail_type_exit; + data_make->setting_make.fail = fake_make_operation_fail_type_exit_e; if (settings.objects.used) { bool unmatched_fail = F_true; @@ -476,7 +476,7 @@ extern "C" { } } else { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SInvalid characters in the define setting name '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -560,7 +560,7 @@ extern "C" { // Set the terminating NULL to not being normally included. --data_make->setting_build.environment.array[data_make->setting_build.environment.used++].used; } - else if (data_make->main->warning.verbosity == f_console_verbosity_verbose) { + else if (data_make->main->warning.verbosity == f_console_verbosity_verbose_e) { flockfile(data_make->main->warning.to.stream); fl_print_format("%c%[%SThe environment name '%]", data_make->main->warning.to.stream, f_string_eol_s[0], data_make->main->warning.context, data_make->main->warning.prefix, data_make->main->warning.context); @@ -570,7 +570,7 @@ extern "C" { funlockfile(data_make->main->warning.to.stream); } } - else if (data_make->main->warning.verbosity == f_console_verbosity_verbose) { + else if (data_make->main->warning.verbosity == f_console_verbosity_verbose_e) { flockfile(data_make->main->warning.to.stream); fl_print_format("%c%[%SThe environment name '%]", data_make->main->warning.to.stream, f_string_eol_s[0], data_make->main->warning.context, data_make->main->warning.prefix, data_make->main->warning.context); @@ -597,13 +597,13 @@ extern "C" { if (*unmatched_fail) { if (content->used) { if (fl_string_dynamic_partial_compare_string(fake_make_operation_argument_exit_s, data_make->buffer, fake_make_operation_argument_exit_s_length, content->array[0]) == F_equal_to) { - data_make->setting_make.fail = fake_make_operation_fail_type_exit; + data_make->setting_make.fail = fake_make_operation_fail_type_exit_e; } else if (fl_string_dynamic_partial_compare_string(fake_make_operation_argument_warn_s, data_make->buffer, fake_make_operation_argument_warn_s_length, content->array[0]) == F_equal_to) { - data_make->setting_make.fail = fake_make_operation_fail_type_warn; + data_make->setting_make.fail = fake_make_operation_fail_type_warn_e; } else if (fl_string_dynamic_partial_compare_string(fake_make_operation_argument_ignore_s, data_make->buffer, fake_make_operation_argument_ignore_s_length, content->array[0]) == F_equal_to) { - data_make->setting_make.fail = fake_make_operation_fail_type_ignore; + data_make->setting_make.fail = fake_make_operation_fail_type_ignore_e; } else { fake_print_warning_settings_content_invalid(data_make->main, data_make->main->file_data_build_fakefile.string, data_make->buffer, *object, content->array[0], fake_make_section_settings_s); diff --git a/level_3/fake/c/private-make-load_parameters.c b/level_3/fake/c/private-make-load_parameters.c index ae11755..5b2927c 100644 --- a/level_3/fake/c/private-make-load_parameters.c +++ b/level_3/fake/c/private-make-load_parameters.c @@ -31,10 +31,10 @@ extern "C" { } if (data_make->main->context.mode == F_color_mode_no_color_d) { - if (data_make->main->parameters[fake_parameter_no_color].type == f_console_type_normal) { + if (data_make->main->parameters[fake_parameter_no_color_e].type == f_console_type_normal_e) { *status = f_string_append(f_console_symbol_short_enable_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); } - else if (data_make->main->parameters[fake_parameter_no_color].type == f_console_type_inverse) { + else if (data_make->main->parameters[fake_parameter_no_color_e].type == f_console_type_inverse_e) { *status = f_string_append(f_console_symbol_short_disable_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); } @@ -43,10 +43,10 @@ extern "C" { } } else if (data_make->main->context.mode == F_color_mode_dark_d) { - if (data_make->main->parameters[fake_parameter_dark].type == f_console_type_normal) { + if (data_make->main->parameters[fake_parameter_dark_e].type == f_console_type_normal_e) { *status = f_string_append(f_console_symbol_short_enable_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); } - else if (data_make->main->parameters[fake_parameter_dark].type == f_console_type_inverse) { + else if (data_make->main->parameters[fake_parameter_dark_e].type == f_console_type_inverse_e) { *status = f_string_append(f_console_symbol_short_disable_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); } @@ -55,10 +55,10 @@ extern "C" { } } else { - if (data_make->main->parameters[fake_parameter_light].type == f_console_type_normal) { + if (data_make->main->parameters[fake_parameter_light_e].type == f_console_type_normal_e) { *status = f_string_append(f_console_symbol_short_enable_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); } - else if (data_make->main->parameters[fake_parameter_light].type == f_console_type_inverse) { + else if (data_make->main->parameters[fake_parameter_light_e].type == f_console_type_inverse_e) { *status = f_string_append(f_console_symbol_short_disable_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); } @@ -85,7 +85,7 @@ extern "C" { ++data_make->parameter_option.color.used; } - if (data_make->main->error.verbosity != f_console_verbosity_normal) { + if (data_make->main->error.verbosity != f_console_verbosity_normal_e) { *status = f_string_dynamics_increase_by(fake_default_allocation_small_d, &data_make->parameter.verbosity); if (F_status_is_error_not(*status)) { @@ -98,11 +98,11 @@ extern "C" { return; } - if (data_make->main->error.verbosity == f_console_verbosity_quiet) { - if (data_make->main->parameters[fake_parameter_verbosity_quiet].type == f_console_type_normal) { + if (data_make->main->error.verbosity == f_console_verbosity_quiet_e) { + if (data_make->main->parameters[fake_parameter_verbosity_quiet_e].type == f_console_type_normal_e) { *status = f_string_append(f_console_symbol_short_enable_s, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } - else if (data_make->main->parameters[fake_parameter_verbosity_quiet].type == f_console_type_inverse) { + else if (data_make->main->parameters[fake_parameter_verbosity_quiet_e].type == f_console_type_inverse_e) { *status = f_string_append(f_console_symbol_short_disable_s, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } @@ -110,11 +110,11 @@ extern "C" { *status = f_string_append(f_console_standard_short_quiet_s, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } } - else if (data_make->main->error.verbosity == f_console_verbosity_verbose) { - if (data_make->main->parameters[fake_parameter_verbosity_verbose].type == f_console_type_normal) { + else if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { + if (data_make->main->parameters[fake_parameter_verbosity_verbose_e].type == f_console_type_normal_e) { *status = f_string_append(f_console_symbol_short_enable_s, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } - else if (data_make->main->parameters[fake_parameter_verbosity_verbose].type == f_console_type_inverse) { + else if (data_make->main->parameters[fake_parameter_verbosity_verbose_e].type == f_console_type_inverse_e) { *status = f_string_append(f_console_symbol_short_disable_s, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } @@ -123,10 +123,10 @@ extern "C" { } } else { - if (data_make->main->parameters[fake_parameter_verbosity_debug].type == f_console_type_normal) { + if (data_make->main->parameters[fake_parameter_verbosity_debug_e].type == f_console_type_normal_e) { *status = f_string_append(f_console_symbol_short_enable_s, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } - else if (data_make->main->parameters[fake_parameter_verbosity_debug].type == f_console_type_inverse) { + else if (data_make->main->parameters[fake_parameter_verbosity_debug_e].type == f_console_type_inverse_e) { *status = f_string_append(f_console_symbol_short_disable_s, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } @@ -160,8 +160,8 @@ extern "C" { }; const f_console_parameter_t *console[] = { - &data_make->main->parameters[fake_parameter_define], - &data_make->main->parameters[fake_parameter_mode], + &data_make->main->parameters[fake_parameter_define_e], + &data_make->main->parameters[fake_parameter_mode_e], }; const f_string_dynamics_t *source[] = { @@ -189,7 +189,7 @@ extern "C" { for (; i < 2; ++i) { - if (console[i]->result == f_console_result_none) { + if (console[i]->result == f_console_result_none_e) { continue; } @@ -217,10 +217,10 @@ extern "C" { return; } - if (console[i]->type == f_console_type_normal) { + if (console[i]->type == f_console_type_normal_e) { *status = f_string_append(f_console_symbol_short_enable_s, 1, &destination[i]->array[destination[i]->used]); } - else if (console[i]->type == f_console_type_inverse) { + else if (console[i]->type == f_console_type_inverse_e) { *status = f_string_append(f_console_symbol_short_disable_s, 1, &destination[i]->array[destination[i]->used]); } @@ -283,13 +283,13 @@ extern "C" { }; const f_console_parameter_t *console[] = { - &data_make->main->parameters[fake_parameter_fakefile], - &data_make->main->parameters[fake_parameter_path_build], - &data_make->main->parameters[fake_parameter_path_data], - &data_make->main->parameters[fake_parameter_path_sources], - &data_make->main->parameters[fake_parameter_path_work], - &data_make->main->parameters[fake_parameter_process], - &data_make->main->parameters[fake_parameter_settings], + &data_make->main->parameters[fake_parameter_fakefile_e], + &data_make->main->parameters[fake_parameter_path_build_e], + &data_make->main->parameters[fake_parameter_path_data_e], + &data_make->main->parameters[fake_parameter_path_sources_e], + &data_make->main->parameters[fake_parameter_path_work_e], + &data_make->main->parameters[fake_parameter_process_e], + &data_make->main->parameters[fake_parameter_settings_e], }; const f_string_dynamic_t *source[] = { @@ -334,7 +334,7 @@ extern "C" { for (uint8_t i = 0; i < 7; ++i) { - if (console[i]->result == f_console_result_none) { + if (console[i]->result == f_console_result_none_e) { continue; } @@ -360,10 +360,10 @@ extern "C" { return; } - if (console[i]->type == f_console_type_normal) { + if (console[i]->type == f_console_type_normal_e) { *status = f_string_append(f_console_symbol_short_enable_s, 1, &destination[i]->array[destination[i]->used]); } - else if (console[i]->type == f_console_type_inverse) { + else if (console[i]->type == f_console_type_inverse_e) { *status = f_string_append(f_console_symbol_short_disable_s, 1, &destination[i]->array[destination[i]->used]); } diff --git a/level_3/fake/c/private-make-operate.c b/level_3/fake/c/private-make-operate.c index 2ae52f6..1351a9b 100644 --- a/level_3/fake/c/private-make-operate.c +++ b/level_3/fake/c/private-make-operate.c @@ -24,7 +24,7 @@ extern "C" { return F_status_set_error(F_interrupt); } - if (main->output.verbosity != f_console_verbosity_quiet) { + if (main->output.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[Making project.%]%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, main->context.set.important, f_string_eol_s[0]); } @@ -78,7 +78,7 @@ extern "C" { return status; } - if (data_make.setting_make.fail == fake_make_operation_fail_type_exit) { + if (data_make.setting_make.fail == fake_make_operation_fail_type_exit_e) { data_make.error.prefix = fl_print_error_s; data_make.error.suffix = 0; data_make.error.context = main->context.set.error; @@ -87,7 +87,7 @@ extern "C" { data_make.error.to.id = F_type_descriptor_error_d; data_make.error.set = &main->context.set; } - else if (data_make.setting_make.fail == fake_make_operation_fail_type_warn) { + else if (data_make.setting_make.fail == fake_make_operation_fail_type_warn_e) { data_make.error.prefix = fl_print_warning_s; data_make.error.suffix = 0; data_make.error.context = main->context.set.warning; @@ -115,7 +115,7 @@ extern "C" { if (status != F_child) { f_status_t status_path = f_path_change_at(data_make.path.top.id); - if (F_status_is_error(status_path) && main->warning.verbosity == f_console_verbosity_verbose) { + if (F_status_is_error(status_path) && main->warning.verbosity == f_console_verbosity_verbose_e) { flockfile(main->warning.to.stream); fl_print_format("%c%[%SFailed change back to orignal path '%]", main->warning.to.stream, f_string_eol_s[0], main->warning.context, main->warning.prefix, main->warning.context); @@ -1053,7 +1053,7 @@ extern "C" { const f_fss_named_t *section = &data_make->fakefile.array[id_section]; - if (data_make->main->output.verbosity != f_console_verbosity_quiet) { + if (data_make->main->output.verbosity != f_console_verbosity_quiet_e) { flockfile(data_make->main->output.to.stream); fl_print_format("%c%[Processing Section '%]", data_make->main->output.to.stream, f_string_eol_s[0], data_make->main->context.set.important, data_make->main->context.set.important); @@ -1144,40 +1144,40 @@ extern "C" { }; const uint8_t operations_type[] = { - fake_make_operation_type_and, - fake_make_operation_type_break, - fake_make_operation_type_build, - fake_make_operation_type_clean, - fake_make_operation_type_clone, - fake_make_operation_type_compile, - fake_make_operation_type_copy, - fake_make_operation_type_define, - fake_make_operation_type_delete, - fake_make_operation_type_deletes, - fake_make_operation_type_else, - fake_make_operation_type_exit, - fake_make_operation_type_fail, - fake_make_operation_type_group, - fake_make_operation_type_groups, - fake_make_operation_type_if, - fake_make_operation_type_index, - fake_make_operation_type_link, - fake_make_operation_type_mode, - fake_make_operation_type_modes, - fake_make_operation_type_move, - fake_make_operation_type_operate, - fake_make_operation_type_or, - fake_make_operation_type_owner, - fake_make_operation_type_owners, - fake_make_operation_type_parameter, - fake_make_operation_type_pop, - fake_make_operation_type_print, - fake_make_operation_type_run, - fake_make_operation_type_shell, - fake_make_operation_type_skeleton, - fake_make_operation_type_to, - fake_make_operation_type_top, - fake_make_operation_type_touch, + fake_make_operation_type_and_e, + fake_make_operation_type_break_e, + fake_make_operation_type_build_e, + fake_make_operation_type_clean_e, + fake_make_operation_type_clone_e, + fake_make_operation_type_compile_e, + fake_make_operation_type_copy_e, + fake_make_operation_type_define_e, + fake_make_operation_type_delete_e, + fake_make_operation_type_deletes_e, + fake_make_operation_type_else_e, + fake_make_operation_type_exit_e, + fake_make_operation_type_fail_e, + fake_make_operation_type_group_e, + fake_make_operation_type_groups_e, + fake_make_operation_type_if_e, + fake_make_operation_type_index_e, + fake_make_operation_type_link_e, + fake_make_operation_type_mode_e, + fake_make_operation_type_modes_e, + fake_make_operation_type_move_e, + fake_make_operation_type_operate_e, + fake_make_operation_type_or_e, + fake_make_operation_type_owner_e, + fake_make_operation_type_owners_e, + fake_make_operation_type_parameter_e, + fake_make_operation_type_pop_e, + fake_make_operation_type_print_e, + fake_make_operation_type_run_e, + fake_make_operation_type_shell_e, + fake_make_operation_type_skeleton_e, + fake_make_operation_type_to_e, + fake_make_operation_type_top_e, + fake_make_operation_type_touch_e, }; fake_state_process_t state_process = fake_state_process_t_initialize; @@ -1221,7 +1221,7 @@ extern "C" { *status = F_status_set_error(F_valid_not); } - else if (state_process.operation == fake_make_operation_type_operate) { + else if (state_process.operation == fake_make_operation_type_operate_e) { if (section_stack->used == fake_make_section_stack_max_d) { fake_print_message_section_operation_stack_max(data_make->main, data_make->error, data_make->buffer, section->name, section->objects.array[i], fake_make_section_stack_max_d); @@ -1239,8 +1239,8 @@ extern "C" { // Block is set to the synthetic done type when an if-condition completes in order to inform any subsequent else condition. // If there is no follow-up else condition, then reset the block (there is no condition block at this point). - if (state_process.block == fake_make_operation_if_type_done) { - if (state_process.operation != fake_make_operation_type_else) { + if (state_process.block == fake_make_operation_if_type_done_e) { + if (state_process.operation != fake_make_operation_type_else_e) { state_process.block = 0; state_process.block_result = 0; } @@ -1250,24 +1250,24 @@ extern "C" { if (state_process.block) { // Reset the block information for a completely processed block. - if (state_process.block == fake_make_operation_if_type_done && state_process.operation != fake_make_operation_type_else) { + if (state_process.block == fake_make_operation_if_type_done_e && state_process.operation != fake_make_operation_type_else_e) { state_process.block = 0; state_process.block_result = 0; } // Always set the condition result to done on error for unfinished blocks as there is no way to determine truth at this point. else { - state_process.block_result = fake_condition_result_done; + state_process.block_result = fake_condition_result_done_e; } } } else { - if (!(state_process.operation == fake_make_operation_type_if || state_process.operation == fake_make_operation_type_else || state_process.operation == fake_make_operation_type_and || state_process.operation == fake_make_operation_type_or)) { + if (!(state_process.operation == fake_make_operation_type_if_e || state_process.operation == fake_make_operation_type_else_e || state_process.operation == fake_make_operation_type_and_e || state_process.operation == fake_make_operation_type_or_e)) { // Only process a non-if-condition operation following an if condition, if the block result is true. - if (state_process.block == fake_make_operation_if_type_if) { - if (state_process.block_result != fake_condition_result_true) { - state_process.block = fake_make_operation_if_type_done; + if (state_process.block == fake_make_operation_if_type_if_e) { + if (state_process.block_result != fake_condition_result_true_e) { + state_process.block = fake_make_operation_if_type_done_e; success = F_true; @@ -1276,8 +1276,8 @@ extern "C" { } // Only process a non-if-condition operation following an else condition, if the block result is false. - else if (state_process.block == fake_make_operation_if_type_else) { - if (state_process.block_result != fake_condition_result_false) { + else if (state_process.block == fake_make_operation_if_type_else_e) { + if (state_process.block_result != fake_condition_result_false_e) { state_process.block = 0; state_process.block_result = 0; @@ -1297,11 +1297,11 @@ extern "C" { } // When done processing an operation within a block, continue onto next block stage or exit the block. - if (!(state_process.operation == fake_make_operation_type_if || state_process.operation == fake_make_operation_type_else || state_process.operation == fake_make_operation_type_and || state_process.operation == fake_make_operation_type_or)) { - if (state_process.block == fake_make_operation_if_type_if) { - state_process.block = fake_make_operation_if_type_done; + if (!(state_process.operation == fake_make_operation_type_if_e || state_process.operation == fake_make_operation_type_else_e || state_process.operation == fake_make_operation_type_and_e || state_process.operation == fake_make_operation_type_or_e)) { + if (state_process.block == fake_make_operation_if_type_if_e) { + state_process.block = fake_make_operation_if_type_done_e; } - else if (state_process.block == fake_make_operation_if_type_else) { + else if (state_process.block == fake_make_operation_if_type_else_e) { state_process.block = 0; state_process.block_result = 0; } @@ -1315,7 +1315,7 @@ extern "C" { // Break acts identical to fail when at the top of the stack. if (F_status_set_fine(*status) == F_signal_abort && !section_stack->used) { - data_make->setting_make.fail = fake_make_operation_fail_type_exit; + data_make->setting_make.fail = fake_make_operation_fail_type_exit_e; data_make->error.prefix = fl_print_error_s; data_make->error.suffix = 0; data_make->error.context = data_make->main->context.set.error; @@ -1339,7 +1339,7 @@ extern "C" { break; } - if (data_make->setting_make.fail == fake_make_operation_fail_type_exit) { + if (data_make->setting_make.fail == fake_make_operation_fail_type_exit_e) { break; } } @@ -1371,18 +1371,18 @@ extern "C" { } if (i == section->objects.used && F_status_is_error_not(*status) && state_process.condition) { - if (data_make->main->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->main->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SIncomplete '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); - if (state_process.condition == fake_make_operation_type_if) { + if (state_process.condition == fake_make_operation_type_if_e) { fl_print_format("%[%s%]", data_make->error.to.stream, data_make->error.notable, fake_make_operation_if_s, data_make->error.notable); } - else if (state_process.condition == fake_make_operation_type_and) { + else if (state_process.condition == fake_make_operation_type_and_e) { fl_print_format("%[%s%]", data_make->error.to.stream, data_make->error.notable, fake_make_operation_and_s, data_make->error.notable); } - else if (state_process.condition == fake_make_operation_type_or) { + else if (state_process.condition == fake_make_operation_type_or_e) { fl_print_format("%[%s%]", data_make->error.to.stream, data_make->error.notable, fake_make_operation_or_s, data_make->error.notable); } else { diff --git a/level_3/fake/c/private-make-operate_process.c b/level_3/fake/c/private-make-operate_process.c index 1a95539..443ce2e 100644 --- a/level_3/fake/c/private-make-operate_process.c +++ b/level_3/fake/c/private-make-operate_process.c @@ -19,7 +19,7 @@ extern "C" { if (*status == F_child) return data_make->main->child; - if (state_process->operation == fake_make_operation_type_index) { + if (state_process->operation == fake_make_operation_type_index_e) { const f_status_t result = fake_execute(data_make->main, data_make->environment, data_make->setting_build.build_indexer, arguments, status); if (F_status_is_error(*status)) { @@ -35,7 +35,7 @@ extern "C" { return 0; } - if (state_process->operation == fake_make_operation_type_break) { + if (state_process->operation == fake_make_operation_type_break_e) { if (!arguments.used || fl_string_dynamic_compare_string(fake_make_operation_argument_success_s, arguments.array[0], fake_make_operation_argument_success_s_length) == F_equal_to) { *status = F_signal_abort; } @@ -46,7 +46,7 @@ extern "C" { return 0; } - if (data_make->main->error.verbosity == f_console_verbosity_verbose) { + if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { flockfile(data_make->main->output.to.stream); fl_print_format("%cBreaking as '", data_make->main->output.to.stream, f_string_eol_s[0]); @@ -59,7 +59,7 @@ extern "C" { return 0; } - if (state_process->operation == fake_make_operation_type_build) { + if (state_process->operation == fake_make_operation_type_build_e) { f_string_static_t stub = f_string_static_t_initialize; *status = fake_build_operate(arguments.used ? arguments.array[0] : stub, data_make->main); @@ -73,7 +73,7 @@ extern "C" { return 0; } - if (state_process->operation == fake_make_operation_type_clean) { + if (state_process->operation == fake_make_operation_type_clean_e) { *status = fake_clean_operate(data_make->main); if (F_status_set_fine(*status) == F_interrupt) { @@ -85,13 +85,13 @@ extern "C" { return 0; } - if (state_process->operation == fake_make_operation_type_clone) { + if (state_process->operation == fake_make_operation_type_clone_e) { *status = fake_make_operate_process_type_copy(data_make, arguments, F_true); return 0; } - if (state_process->operation == fake_make_operation_type_compile) { + if (state_process->operation == fake_make_operation_type_compile_e) { const int result = fake_execute(data_make->main, data_make->environment, data_make->setting_build.build_compiler, arguments, status); if (F_status_is_error(*status)) { @@ -107,13 +107,13 @@ extern "C" { return 0; } - if (state_process->operation == fake_make_operation_type_copy) { + if (state_process->operation == fake_make_operation_type_copy_e) { *status = fake_make_operate_process_type_copy(data_make, arguments, F_false); return 0; } - if (state_process->operation == fake_make_operation_type_define) { + if (state_process->operation == fake_make_operation_type_define_e) { if (arguments.used > 1) { *status = f_environment_set(arguments.array[0].string, arguments.array[1].string, F_true); @@ -125,34 +125,34 @@ extern "C" { if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "f_environment_set", F_true); } - else if (data_make->main->error.verbosity == f_console_verbosity_verbose) { + else if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("%cDefined environment variable '%[%Q%]'.%c", data_make->main->output.to.stream, f_string_eol_s[0], data_make->main->context.set.notable, arguments.array[0], data_make->main->context.set.notable, f_string_eol_s[0]); } return 0; } - if (state_process->operation == fake_make_operation_type_delete) { + if (state_process->operation == fake_make_operation_type_delete_e) { *status = fake_make_operate_process_type_deletes(data_make, arguments, F_false); return 0; } - if (state_process->operation == fake_make_operation_type_deletes) { + if (state_process->operation == fake_make_operation_type_deletes_e) { *status = fake_make_operate_process_type_deletes(data_make, arguments, F_true); return 0; } - if (state_process->operation == fake_make_operation_type_else) { + if (state_process->operation == fake_make_operation_type_else_e) { // Setup the block so that subsequent operations can know the current block and the result (which is preserved across to the else condition). - state_process->block = fake_make_operation_if_type_else; + state_process->block = fake_make_operation_if_type_else_e; return 0; } - if (state_process->operation == fake_make_operation_type_exit) { + if (state_process->operation == fake_make_operation_type_exit_e) { if (!arguments.used || fl_string_dynamic_compare_string(fake_make_operation_argument_success_s, arguments.array[0], fake_make_operation_argument_success_s_length) == F_equal_to) { *status = F_signal_quit; } @@ -160,7 +160,7 @@ extern "C" { *status = F_status_set_error(F_signal_quit); // Forcing exit forces fail mode. - data_make->setting_make.fail = fake_make_operation_fail_type_exit; + data_make->setting_make.fail = fake_make_operation_fail_type_exit_e; data_make->error.prefix = fl_print_error_s; data_make->error.suffix = 0; data_make->error.context = data_make->main->context.set.error; @@ -173,80 +173,80 @@ extern "C" { return 0; } - if (data_make->main->error.verbosity == f_console_verbosity_verbose) { + if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("%cExiting as '%[%S%]'.%c", data_make->main->output.to.stream, f_string_eol_s[0], data_make->main->context.set.notable, arguments.used ? arguments.array[0].string : fake_make_operation_argument_success_s, data_make->main->context.set.notable, f_string_eol_s[0]); } return 0; } - if (state_process->operation == fake_make_operation_type_fail) { + if (state_process->operation == fake_make_operation_type_fail_e) { fake_make_operate_process_type_fail(data_make, arguments); return 0; } - if (state_process->operation == fake_make_operation_type_group) { + if (state_process->operation == fake_make_operation_type_group_e) { *status = fake_make_operate_process_type_groups(data_make, arguments, F_false); return 0; } - if (state_process->operation == fake_make_operation_type_groups) { + if (state_process->operation == fake_make_operation_type_groups_e) { *status = fake_make_operate_process_type_groups(data_make, arguments, F_true); return 0; } - if (state_process->operation == fake_make_operation_type_if || state_process->operation == fake_make_operation_type_and || state_process->operation == fake_make_operation_type_or) { - if (state_process->condition == fake_make_operation_if_type_if_success) { + if (state_process->operation == fake_make_operation_type_if_e || state_process->operation == fake_make_operation_type_and_e || state_process->operation == fake_make_operation_type_or_e) { + if (state_process->condition == fake_make_operation_if_type_if_success_e) { if (success) { - state_process->condition_result = fake_condition_result_true; + state_process->condition_result = fake_condition_result_true_e; } else { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; } } - else if (state_process->condition == fake_make_operation_if_type_if_defined) { + else if (state_process->condition == fake_make_operation_if_type_if_defined_e) { fake_make_operate_process_type_if_defined(data_make, arguments, F_false, state_process); } - else if (state_process->condition == fake_make_operation_if_type_if_exists) { + else if (state_process->condition == fake_make_operation_if_type_if_exists_e) { *status = fake_make_operate_process_type_if_exists(data_make, arguments, F_false, state_process); } - else if (state_process->condition == fake_make_operation_if_type_if_failure) { + else if (state_process->condition == fake_make_operation_if_type_if_failure_e) { if (success) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; } else { - state_process->condition_result = fake_condition_result_true; + state_process->condition_result = fake_condition_result_true_e; } } - else if (state_process->condition == fake_make_operation_if_type_if_group) { + else if (state_process->condition == fake_make_operation_if_type_if_group_e) { *status = fake_make_operate_process_type_if_group(data_make, arguments, F_false, state_process); } - else if (state_process->condition == fake_make_operation_if_type_if_is) { + else if (state_process->condition == fake_make_operation_if_type_if_is_e) { *status = fake_make_operate_process_type_if_is(data_make, arguments, F_false, state_process); } - else if (state_process->condition == fake_make_operation_if_type_if_mode) { + else if (state_process->condition == fake_make_operation_if_type_if_mode_e) { *status = fake_make_operate_process_type_if_mode(data_make, arguments, F_false, state_process); } - else if (state_process->condition == fake_make_operation_if_type_if_not_defined) { + else if (state_process->condition == fake_make_operation_if_type_if_not_defined_e) { fake_make_operate_process_type_if_defined(data_make, arguments, F_true, state_process); } - else if (state_process->condition == fake_make_operation_if_type_if_equal) { - state_process->condition_result = fake_condition_result_true; + else if (state_process->condition == fake_make_operation_if_type_if_equal_e) { + state_process->condition_result = fake_condition_result_true_e; for (f_array_length_t i = 2; i < arguments.used; ++i) { if (fl_string_dynamic_compare(arguments.array[1], arguments.array[i]) == F_equal_to_not) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; break; } } // for } - else if (state_process->condition == fake_make_operation_if_type_if_equal_not) { - state_process->condition_result = fake_condition_result_true; + else if (state_process->condition == fake_make_operation_if_type_if_equal_not_e) { + state_process->condition_result = fake_condition_result_true_e; f_array_length_t i = 1; f_array_length_t j = 0; @@ -256,7 +256,7 @@ extern "C" { for (j = i + 1; j < arguments.used; ++j) { if (fl_string_dynamic_compare(arguments.array[i], arguments.array[j]) == F_equal_to) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; i = arguments.used; break; @@ -264,61 +264,61 @@ extern "C" { } // for } // for } - else if (state_process->condition == fake_make_operation_if_type_if_greater || state_process->condition == fake_make_operation_if_type_if_greater_equal || state_process->condition == fake_make_operation_if_type_if_less || state_process->condition == fake_make_operation_if_type_if_less_equal) { + else if (state_process->condition == fake_make_operation_if_type_if_greater_e || state_process->condition == fake_make_operation_if_type_if_greater_equal_e || state_process->condition == fake_make_operation_if_type_if_less_e || state_process->condition == fake_make_operation_if_type_if_less_equal_e) { *status = fake_make_operate_process_type_if_greater_if_lesser(data_make, arguments, state_process); } - else if (state_process->condition == fake_make_operation_if_type_if_not_exists) { + else if (state_process->condition == fake_make_operation_if_type_if_not_exists_e) { *status = fake_make_operate_process_type_if_exists(data_make, arguments, F_true, state_process); } - else if (state_process->condition == fake_make_operation_if_type_if_not_group) { + else if (state_process->condition == fake_make_operation_if_type_if_not_group_e) { *status = fake_make_operate_process_type_if_group(data_make, arguments, F_true, state_process); } - else if (state_process->condition == fake_make_operation_if_type_if_not_is) { + else if (state_process->condition == fake_make_operation_if_type_if_not_is_e) { *status = fake_make_operate_process_type_if_is(data_make, arguments, F_true, state_process); } - else if (state_process->condition == fake_make_operation_if_type_if_not_mode) { + else if (state_process->condition == fake_make_operation_if_type_if_not_mode_e) { *status = fake_make_operate_process_type_if_mode(data_make, arguments, F_true, state_process); } - else if (state_process->condition == fake_make_operation_if_type_if_not_owner) { + else if (state_process->condition == fake_make_operation_if_type_if_not_owner_e) { *status = fake_make_operate_process_type_if_owner(data_make, arguments, F_true, state_process); } - else if (state_process->condition == fake_make_operation_if_type_if_owner) { + else if (state_process->condition == fake_make_operation_if_type_if_owner_e) { *status = fake_make_operate_process_type_if_owner(data_make, arguments, F_false, state_process); } // Setup the block for subsequent operations. - state_process->block = fake_make_operation_if_type_if; + state_process->block = fake_make_operation_if_type_if_e; - if (state_process->condition_result == fake_condition_result_done || state_process->operation == fake_make_operation_type_if) { + if (state_process->condition_result == fake_condition_result_done_e || state_process->operation == fake_make_operation_type_if_e) { state_process->block_result = state_process->condition_result; } - else if (state_process->operation == fake_make_operation_type_or) { - if (state_process->block_result == fake_condition_result_true || state_process->condition_result == fake_condition_result_true) { - state_process->block_result = fake_condition_result_true; + else if (state_process->operation == fake_make_operation_type_or_e) { + if (state_process->block_result == fake_condition_result_true_e || state_process->condition_result == fake_condition_result_true_e) { + state_process->block_result = fake_condition_result_true_e; } else { - state_process->block_result = fake_condition_result_false; + state_process->block_result = fake_condition_result_false_e; } } else { - if (state_process->block_result == fake_condition_result_true && state_process->condition_result == fake_condition_result_true) { - state_process->block_result = fake_condition_result_true; + if (state_process->block_result == fake_condition_result_true_e && state_process->condition_result == fake_condition_result_true_e) { + state_process->block_result = fake_condition_result_true_e; } else { - state_process->block_result = fake_condition_result_false; + state_process->block_result = fake_condition_result_false_e; } } return 0; } - if (state_process->operation == fake_make_operation_type_link) { + if (state_process->operation == fake_make_operation_type_link_e) { *status = f_file_link(arguments.array[0].string, arguments.array[1].string); if (F_status_is_error(*status)) { - fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_link", F_true, arguments.array[1].string, "create link", fll_error_file_type_file); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_link", F_true, arguments.array[1].string, "create link", fll_error_file_type_file_e); } - else if (data_make->main->error.verbosity == f_console_verbosity_verbose) { + else if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { flockfile(data_make->main->output.to.stream); fl_print_format("Created symbolic link from '%[%Q%]", data_make->main->output.to.stream, data_make->main->context.set.notable, arguments.array[1], data_make->main->context.set.notable); @@ -330,25 +330,25 @@ extern "C" { return 0; } - if (state_process->operation == fake_make_operation_type_mode) { + if (state_process->operation == fake_make_operation_type_mode_e) { *status = fake_make_operate_process_type_modes(data_make, arguments, F_false); return 0; } - if (state_process->operation == fake_make_operation_type_modes) { + if (state_process->operation == fake_make_operation_type_modes_e) { *status = fake_make_operate_process_type_modes(data_make, arguments, F_true); return 0; } - if (state_process->operation == fake_make_operation_type_move) { + if (state_process->operation == fake_make_operation_type_move_e) { *status = fake_make_operate_process_type_move(data_make, arguments); return 0; } - if (state_process->operation == fake_make_operation_type_operate) { + if (state_process->operation == fake_make_operation_type_operate_e) { f_array_length_t id_section = 0; for (; id_section < data_make->fakefile.used; ++id_section) { @@ -375,31 +375,31 @@ extern "C" { return result; } - if (state_process->operation == fake_make_operation_type_owner) { + if (state_process->operation == fake_make_operation_type_owner_e) { *status = fake_make_operate_process_type_owners(data_make, arguments, F_false); return 0; } - if (state_process->operation == fake_make_operation_type_owners) { + if (state_process->operation == fake_make_operation_type_owners_e) { *status = fake_make_operate_process_type_owners(data_make, arguments, F_true); return 0; } - if (state_process->operation == fake_make_operation_type_parameter) { + if (state_process->operation == fake_make_operation_type_parameter_e) { *status = fake_make_operate_process_type_parameter(data_make, arguments); return 0; } - if (state_process->operation == fake_make_operation_type_pop) { + if (state_process->operation == fake_make_operation_type_pop_e) { *status = fake_make_operate_process_type_pop(data_make, arguments); return 0; } - if (state_process->operation == fake_make_operation_type_print) { + if (state_process->operation == fake_make_operation_type_print_e) { flockfile(data_make->main->output.to.stream); for (f_array_length_t i = 0; i < arguments.used; ++i) { @@ -419,19 +419,19 @@ extern "C" { return 0; } - if (state_process->operation == fake_make_operation_type_run) { + if (state_process->operation == fake_make_operation_type_run_e) { *status = fake_make_operate_process_run(data_make, arguments, F_false); return 0; } - if (state_process->operation == fake_make_operation_type_shell) { + if (state_process->operation == fake_make_operation_type_shell_e) { *status = fake_make_operate_process_run(data_make, arguments, F_true); return 0; } - if (state_process->operation == fake_make_operation_type_skeleton) { + if (state_process->operation == fake_make_operation_type_skeleton_e) { *status = fake_skeleton_operate(data_make->main); if (F_status_set_fine(*status) == F_interrupt) { @@ -443,19 +443,19 @@ extern "C" { return 0; } - if (state_process->operation == fake_make_operation_type_to) { + if (state_process->operation == fake_make_operation_type_to_e) { *status = fake_make_operate_process_type_to(data_make, arguments); return 0; } - if (state_process->operation == fake_make_operation_type_top) { + if (state_process->operation == fake_make_operation_type_top_e) { *status = fake_make_operate_process_type_top(data_make, arguments); return 0; } - if (state_process->operation == fake_make_operation_type_touch) { + if (state_process->operation == fake_make_operation_type_touch_e) { *status = fake_make_operate_process_type_touch(data_make, arguments); } @@ -489,7 +489,7 @@ extern "C" { return status; } - if (data_make->main->error.verbosity == f_console_verbosity_verbose) { + if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { flockfile(data_make->main->output.to.stream); f_print_dynamic_safely(program, data_make->main->output.to.stream); @@ -530,7 +530,7 @@ extern "C" { } if (F_status_set_fine(status) == F_file_found_not) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SFailed to find program '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -606,7 +606,7 @@ extern "C" { return status; } - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SFailed with return code %]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -616,7 +616,7 @@ extern "C" { funlockfile(data_make->error.to.stream); } - if (data_make->setting_make.fail == fake_make_operation_fail_type_exit) { + if (data_make->setting_make.fail == fake_make_operation_fail_type_exit_e) { return F_status_set_error(F_failure); } diff --git a/level_3/fake/c/private-make-operate_process.h b/level_3/fake/c/private-make-operate_process.h index 2d5d99d..6cc6dce 100644 --- a/level_3/fake/c/private-make-operate_process.h +++ b/level_3/fake/c/private-make-operate_process.h @@ -78,7 +78,7 @@ extern "C" { * * @return * F_none on success. - * F_failure (with error bit) on identifying the return code as an error code and fail mode is set to fake_make_operation_fail_type_exit. + * F_failure (with error bit) on identifying the return code as an error code and fail mode is set to fake_make_operation_fail_type_exit_e. * * Errors (with error bit) from: f_conversion_number_signed_to_string(). * Errors (with error bit) from: f_string_append(). diff --git a/level_3/fake/c/private-make-operate_process_type.c b/level_3/fake/c/private-make-operate_process_type.c index 62f32b2..179cceb 100644 --- a/level_3/fake/c/private-make-operate_process_type.c +++ b/level_3/fake/c/private-make-operate_process_type.c @@ -26,7 +26,7 @@ extern "C" { f_mode_t mode = f_mode_t_initialize; if (clone) { - if (data_make->main->error.verbosity == f_console_verbosity_verbose) { + if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { recurse.output = data_make->main->output.to; recurse.verbose = fake_verbose_print_clone; } @@ -34,7 +34,7 @@ extern "C" { else { macro_f_mode_t_set_default_umask(mode, data_make->main->umask); - if (data_make->main->error.verbosity == f_console_verbosity_verbose) { + if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { recurse.output = data_make->main->output.to; recurse.verbose = fake_verbose_print_copy; } @@ -47,7 +47,7 @@ extern "C" { status = f_directory_is(arguments.array[1].string); if (F_status_is_error(status)) { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_is", F_true, arguments.array[1].string, "identify", fll_error_file_type_directory); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_is", F_true, arguments.array[1].string, "identify", fll_error_file_type_directory_e); return F_status_set_error(F_failure); } @@ -87,7 +87,7 @@ extern "C" { } if (F_status_is_error(status_file)) { - fll_error_file_print(data_make->error, F_status_set_fine(status_file), clone ? "fl_directory_clone" : "fl_directory_copy", F_true, arguments.array[i].string, clone ? "clone" : "copy", fll_error_file_type_directory); + fll_error_file_print(data_make->error, F_status_set_fine(status_file), clone ? "fl_directory_clone" : "fl_directory_copy", F_true, arguments.array[i].string, clone ? "clone" : "copy", fll_error_file_type_directory_e); status = F_status_set_error(F_failure); } @@ -101,11 +101,11 @@ extern "C" { } if (F_status_is_error(status_file)) { - fll_error_file_print(data_make->error, F_status_set_fine(status_file), clone ? "f_file_clone" : "f_file_copy", F_true, arguments.array[i].string, clone ? "clone" : "copy", fll_error_file_type_file); + fll_error_file_print(data_make->error, F_status_set_fine(status_file), clone ? "f_file_clone" : "f_file_copy", F_true, arguments.array[i].string, clone ? "clone" : "copy", fll_error_file_type_file_e); status = F_status_set_error(F_failure); } - else if (data_make->main->error.verbosity == f_console_verbosity_verbose) { + else if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { flockfile(data_make->main->output.to.stream); fl_print_format("%c%s '%[%Q%]' to '", data_make->main->output.to.stream, f_string_eol_s[0], clone ? "Cloned" : "Copied", data_make->main->context.set.notable, arguments.array[i], data_make->main->context.set.notable); @@ -115,7 +115,7 @@ extern "C" { } } else if (F_status_is_error(status_file)) { - fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_directory_is", F_true, arguments.array[i].string, "identify", fll_error_file_type_directory); + fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_directory_is", F_true, arguments.array[i].string, "identify", fll_error_file_type_directory_e); return F_status_set_error(F_failure); } @@ -143,7 +143,7 @@ extern "C" { if (F_status_is_error(status)) { if (F_status_set_fine(status) == F_file_found_not) { - if (data_make->main->warning.verbosity == f_console_verbosity_verbose) { + if (data_make->main->warning.verbosity == f_console_verbosity_verbose_e) { flockfile(data_make->main->warning.to.stream); fl_print_format("%c%[%SThe file '%]", data_make->main->warning.to.stream, data_make->main->warning.prefix, f_string_eol_s[0]); @@ -156,13 +156,13 @@ extern "C" { status = F_none; } else { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_stat", F_true, arguments.array[i].string, "delete", fll_error_file_type_file); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_stat", F_true, arguments.array[i].string, "delete", fll_error_file_type_file_e); return status; } } else if (macro_f_file_type_is_directory(file_stat.st_mode)) { - if (data_make->main->error.verbosity == f_console_verbosity_verbose) { + if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { status = f_directory_remove_custom(arguments.array[i].string, recursion_max, F_false, fake_clean_remove_recursively_verbosely); } else { @@ -170,7 +170,7 @@ extern "C" { } if (F_status_set_fine(status) == F_file_found_not) { - if (data_make->main->error.verbosity == f_console_verbosity_verbose) { + if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("%cThe directory '%[%Q%]' does not exist.%c", data_make->main->output.to.stream, f_string_eol_s[0], data_make->main->context.set.notable, arguments.array[i], data_make->main->context.set.notable, f_string_eol_s[0]); } @@ -178,11 +178,11 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_remove", F_true, arguments.array[i].string, "delete", fll_error_file_type_directory); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_remove", F_true, arguments.array[i].string, "delete", fll_error_file_type_directory_e); return status; } - else if (data_make->main->error.verbosity == f_console_verbosity_verbose) { + else if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("%cRemoved '%[%Q%]'.%c", data_make->main->output.to.stream, f_string_eol_s[0], data_make->main->context.set.notable, arguments.array[i], data_make->main->context.set.notable, f_string_eol_s[0]); } } @@ -190,7 +190,7 @@ extern "C" { status = f_file_remove(arguments.array[i].string); if (F_status_set_fine(status) == F_file_found_not) { - if (data_make->main->error.verbosity == f_console_verbosity_verbose) { + if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("%cThe file '%[%Q%]' does not exist.%c", data_make->main->output.to.stream, f_string_eol_s[0], data_make->main->context.set.notable, arguments.array[i], data_make->main->context.set.notable, f_string_eol_s[0]); } @@ -198,12 +198,12 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_remove", F_true, arguments.array[i].string, "delete", fll_error_file_type_file); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_remove", F_true, arguments.array[i].string, "delete", fll_error_file_type_file_e); return status; } - if (data_make->main->error.verbosity == f_console_verbosity_verbose) { + if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("%cRemoved '%[%Q%]'.%c", data_make->main->output.to.stream, f_string_eol_s[0], data_make->main->context.set.notable, arguments.array[i], data_make->main->context.set.notable, f_string_eol_s[0]); } } @@ -217,7 +217,7 @@ extern "C" { void fake_make_operate_process_type_fail(fake_make_data_t * const data_make, const f_string_dynamics_t arguments) { if (fl_string_dynamic_compare_string(fake_make_operation_argument_exit_s, arguments.array[0], fake_make_operation_argument_exit_s_length) == F_equal_to) { - data_make->setting_make.fail = fake_make_operation_fail_type_exit; + data_make->setting_make.fail = fake_make_operation_fail_type_exit_e; data_make->error.prefix = fl_print_error_s; data_make->error.suffix = 0; data_make->error.context = data_make->main->context.set.error; @@ -227,7 +227,7 @@ extern "C" { data_make->error.set = &data_make->main->context.set; } else if (fl_string_dynamic_compare_string(fake_make_operation_argument_warn_s, arguments.array[0], fake_make_operation_argument_warn_s_length) == F_equal_to) { - data_make->setting_make.fail = fake_make_operation_fail_type_warn; + data_make->setting_make.fail = fake_make_operation_fail_type_warn_e; data_make->error.prefix = fl_print_warning_s; data_make->error.suffix = 0; data_make->error.context = data_make->main->context.set.warning; @@ -237,20 +237,20 @@ extern "C" { data_make->error.set = &data_make->main->context.set; } else { - data_make->setting_make.fail = fake_make_operation_fail_type_ignore; + data_make->setting_make.fail = fake_make_operation_fail_type_ignore_e; data_make->error.to.stream = 0; data_make->error.to.id = -1; } - if (data_make->main->error.verbosity == f_console_verbosity_verbose) { + if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { flockfile(data_make->main->output.to.stream); f_print_terminated("Set failure state to '", data_make->main->output.to.stream); - if (data_make->setting_make.fail == fake_make_operation_fail_type_exit) { + if (data_make->setting_make.fail == fake_make_operation_fail_type_exit_e) { fl_print_format("%[%s%]", data_make->main->output.to.stream, data_make->main->context.set.notable, fake_make_operation_argument_exit_s, data_make->main->context.set.notable); } - else if (data_make->setting_make.fail == fake_make_operation_fail_type_warn) { + else if (data_make->setting_make.fail == fake_make_operation_fail_type_warn_e) { fl_print_format("%[%s%]", data_make->main->output.to.stream, data_make->main->context.set.notable, fake_make_operation_argument_warn_s, data_make->main->context.set.notable); } else { @@ -297,9 +297,9 @@ extern "C" { if (F_status_is_error(status_file)) { status = status_file; - fll_error_file_print(data_make->error, F_status_set_fine(status), all ? "fll_file_role_change_all" : "f_file_role_change", F_true, arguments.array[i].string, "change group of", fll_error_file_type_file); + fll_error_file_print(data_make->error, F_status_set_fine(status), all ? "fll_file_role_change_all" : "f_file_role_change", F_true, arguments.array[i].string, "change group of", fll_error_file_type_file_e); } - else if (data_make->main->error.verbosity == f_console_verbosity_verbose) { + else if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { flockfile(data_make->main->output.to.stream); fl_print_format("%s group of '%[%s%]", data_make->main->output.to.stream, all ? "Recursively changed" : "Changed", data_make->main->context.set.notable, arguments.array[i], data_make->main->context.set.notable); @@ -402,17 +402,17 @@ extern "C" { data_make->main->path_sources.used, F_true, data_make->main->path_work.used, - data_make->main->parameters[fake_parameter_path_build].result == f_console_result_additional, - data_make->main->parameters[fake_parameter_light].result == f_console_result_found || data_make->main->parameters[fake_parameter_dark].result == f_console_result_found || data_make->main->parameters[fake_parameter_no_color].result == f_console_result_found, - data_make->main->parameters[fake_parameter_path_data].result == f_console_result_additional, - data_make->main->parameters[fake_parameter_define].result == f_console_result_additional, - data_make->main->parameters[fake_parameter_fakefile].result == f_console_result_additional, - data_make->main->parameters[fake_parameter_mode].result == f_console_result_additional, - data_make->main->parameters[fake_parameter_process].result == f_console_result_additional, - data_make->main->parameters[fake_parameter_settings].result == f_console_result_additional, - data_make->main->parameters[fake_parameter_path_sources].result == f_console_result_additional, - data_make->main->parameters[fake_parameter_verbosity_quiet].result == f_console_result_found || data_make->main->parameters[fake_parameter_verbosity_normal].result == f_console_result_found || data_make->main->parameters[fake_parameter_verbosity_verbose].result == f_console_result_found || data_make->main->parameters[fake_parameter_verbosity_debug].result == f_console_result_found, - data_make->main->parameters[fake_parameter_path_work].result == f_console_result_additional, + data_make->main->parameters[fake_parameter_path_build_e].result == f_console_result_additional_e, + data_make->main->parameters[fake_parameter_light_e].result == f_console_result_found_e || data_make->main->parameters[fake_parameter_dark_e].result == f_console_result_found_e || data_make->main->parameters[fake_parameter_no_color_e].result == f_console_result_found_e, + data_make->main->parameters[fake_parameter_path_data_e].result == f_console_result_additional_e, + data_make->main->parameters[fake_parameter_define_e].result == f_console_result_additional_e, + data_make->main->parameters[fake_parameter_fakefile_e].result == f_console_result_additional_e, + data_make->main->parameters[fake_parameter_mode_e].result == f_console_result_additional_e, + data_make->main->parameters[fake_parameter_process_e].result == f_console_result_additional_e, + data_make->main->parameters[fake_parameter_settings_e].result == f_console_result_additional_e, + data_make->main->parameters[fake_parameter_path_sources_e].result == f_console_result_additional_e, + data_make->main->parameters[fake_parameter_verbosity_quiet_e].result == f_console_result_found_e || data_make->main->parameters[fake_parameter_verbosity_normal_e].result == f_console_result_found_e || data_make->main->parameters[fake_parameter_verbosity_verbose_e].result == f_console_result_found_e || data_make->main->parameters[fake_parameter_verbosity_debug_e].result == f_console_result_found_e, + data_make->main->parameters[fake_parameter_path_work_e].result == f_console_result_additional_e, data_make->parameter_value.build.used, data_make->parameter_value.color.used, data_make->parameter_value.data.used, @@ -427,13 +427,13 @@ extern "C" { }; if (fl_string_dynamic_compare_string(fake_make_operation_argument_environment_s, argument, fake_make_operation_argument_environment_s_length) == F_equal_to) { - state_process->condition_result = fake_condition_result_true; + state_process->condition_result = fake_condition_result_true_e; if (if_not) { for (f_array_length_t i = 3; i < arguments.used; ++i) { if (f_environment_exists(arguments.array[i].string) == F_true) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; break; } @@ -443,7 +443,7 @@ extern "C" { for (f_array_length_t i = 2; i < arguments.used; ++i) { if (f_environment_exists(arguments.array[i].string) != F_true) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; break; } @@ -459,7 +459,7 @@ extern "C" { // 0 = unknown, 1 = fail, 2 = pass. uint8_t result = 0; - state_process->condition_result = fake_condition_result_true; + state_process->condition_result = fake_condition_result_true_e; // Multiple properties may pass and so if any of them fail, then they all fail. for (; i < arguments.used; ++i) { @@ -497,14 +497,14 @@ extern "C" { if (if_not) { if (result < 2) { - state_process->condition_result = fake_condition_result_true; + state_process->condition_result = fake_condition_result_true_e; } else { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; } } else if (result < 2) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; } } #endif // _di_fake_make_operate_process_type_if_defined_ @@ -514,30 +514,30 @@ extern "C" { f_status_t status = F_none; - state_process->condition_result = fake_condition_result_true; + state_process->condition_result = fake_condition_result_true_e; for (f_array_length_t i = if_not ? 2 : 1; i < arguments.used; ++i) { status = f_file_exists(arguments.array[i].string); if (F_status_is_error(status)) { - state_process->condition_result = fake_condition_result_done; + state_process->condition_result = fake_condition_result_done_e; - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_exists", F_true, arguments.array[i].string, "find", fll_error_file_type_file); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_exists", F_true, arguments.array[i].string, "find", fll_error_file_type_file_e); break; } if (if_not) { if (status == F_true) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; break; } } else { if (status == F_false) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; break; } @@ -599,16 +599,16 @@ extern "C" { uint8_t type_file = 0; mode_t mode_file = 0; - state_process->condition_result = fake_condition_result_true; + state_process->condition_result = fake_condition_result_true_e; for (; i < arguments.used; ++i, mode_file = 0) { status = f_file_mode_read(arguments.array[i].string, &mode_file); if (F_status_is_error(status)) { - state_process->condition_result = fake_condition_result_done; + state_process->condition_result = fake_condition_result_done_e; - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_mode_read", F_true, arguments.array[i].string, "get mode of", fll_error_file_type_file); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_mode_read", F_true, arguments.array[i].string, "get mode of", fll_error_file_type_file_e); break; } @@ -637,14 +637,14 @@ extern "C" { if (if_not) { if (type & type_file) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; break; } } else { if (!(type & type_file)) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; break; } @@ -671,7 +671,7 @@ extern "C" { f_array_length_t i = 1; - state_process->condition_result = fake_condition_result_true; + state_process->condition_result = fake_condition_result_true_e; // @fixme This needs to handle converting numbers with decimals (like 1.01), perhaps operate on them as strings or provide a special processor. range.start = 0; @@ -722,62 +722,62 @@ extern "C" { if (F_status_is_error(status)) break; - if (state_process->condition == fake_make_operation_if_type_if_greater) { + if (state_process->condition == fake_make_operation_if_type_if_greater_e) { if (is_negative_left == is_negative_right) { if (!(number_left > number_right)) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; break; } } else if (!is_negative_left && is_negative_right) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; break; } } - else if (state_process->condition == fake_make_operation_if_type_if_greater_equal) { + else if (state_process->condition == fake_make_operation_if_type_if_greater_equal_e) { if (is_negative_left == is_negative_right) { if (!(number_left >= number_right)) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; break; } } else if (!is_negative_left && is_negative_right) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; break; } } - else if (state_process->condition == fake_make_operation_if_type_if_less) { + else if (state_process->condition == fake_make_operation_if_type_if_less_e) { if (is_negative_left == is_negative_right) { if (!(number_left < number_right)) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; break; } } else if (is_negative_left && !is_negative_right) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; break; } } - else if (state_process->condition == fake_make_operation_if_type_if_less_equal) { + else if (state_process->condition == fake_make_operation_if_type_if_less_equal_e) { if (is_negative_left == is_negative_right) { if (!(number_left <= number_right)) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; break; } } else if (is_negative_left && !is_negative_right) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; break; } @@ -786,9 +786,9 @@ extern "C" { } if (F_status_is_error(status)) { - state_process->condition_result = fake_condition_result_done; + state_process->condition_result = fake_condition_result_done_e; - if (data_make->main->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->main->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); if ((i == 1 && number_left > F_number_t_size_unsigned_d) || (i > 1 && number_right > F_number_t_size_unsigned_d)) { @@ -823,30 +823,30 @@ extern "C" { uid_t id_file = 0; - state_process->condition_result = fake_condition_result_true; + state_process->condition_result = fake_condition_result_true_e; for (f_array_length_t i = if_not ? 3 : 2; i < arguments.used; ++i, id_file = 0) { status = f_file_group_read(arguments.array[i].string, &id_file); if (F_status_is_error(status)) { - state_process->condition_result = fake_condition_result_done; + state_process->condition_result = fake_condition_result_done_e; - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_group_read", F_true, arguments.array[i].string, "get group of", fll_error_file_type_file); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_group_read", F_true, arguments.array[i].string, "get group of", fll_error_file_type_file_e); break; } if (if_not) { if (id == id_file) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; break; } } else { if (id != id_file) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; break; } @@ -877,7 +877,7 @@ extern "C" { status = fake_make_get_id_mode(data_make->main, data_make->error, arguments.array[if_not ? 3 : 2], &mode_rule, &mode_replace); if (F_status_is_error(status)) { - state_process->condition_result = fake_condition_result_done; + state_process->condition_result = fake_condition_result_done_e; return status; } @@ -885,7 +885,7 @@ extern "C" { status = f_file_mode_to_mode(mode_rule, &mode_match); if (F_status_is_error(status)) { - state_process->condition_result = fake_condition_result_done; + state_process->condition_result = fake_condition_result_done_e; fll_error_print(data_make->error, F_status_set_fine(status), "f_file_mode_to_mode", F_true); @@ -895,16 +895,16 @@ extern "C" { mode_t mode_file = 0; - state_process->condition_result = fake_condition_result_true; + state_process->condition_result = fake_condition_result_true_e; for (f_array_length_t i = if_not ? 4 : 3; i < arguments.used; ++i, mode_file = 0) { status = f_file_mode_read(arguments.array[i].string, &mode_file); if (F_status_is_error(status)) { - state_process->condition_result = fake_condition_result_done; + state_process->condition_result = fake_condition_result_done_e; - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_mode_read", F_true, arguments.array[i].string, "get mode of", fll_error_file_type_file); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_mode_read", F_true, arguments.array[i].string, "get mode of", fll_error_file_type_file_e); break; } @@ -912,14 +912,14 @@ extern "C" { if (if_not) { if (is) { if (mode_match == (mode_file & F_file_mode_all_d)) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; break; } } else { if (mode_match & mode_file) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; break; } @@ -928,14 +928,14 @@ extern "C" { else { if (is) { if (mode_match != (mode_file & F_file_mode_all_d)) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; break; } } else { if (!(mode_match & mode_file)) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; break; } @@ -958,30 +958,30 @@ extern "C" { uid_t id_file = 0; - state_process->condition_result = fake_condition_result_true; + state_process->condition_result = fake_condition_result_true_e; for (f_array_length_t i = if_not ? 3 : 2; i < arguments.used; ++i, id_file = 0) { status = f_file_owner_read(arguments.array[i].string, &id_file); if (F_status_is_error(status)) { - state_process->condition_result = fake_condition_result_done; + state_process->condition_result = fake_condition_result_done_e; - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_owner_read", F_true, arguments.array[i].string, "get owner of", fll_error_file_type_file); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_owner_read", F_true, arguments.array[i].string, "get owner of", fll_error_file_type_file_e); break; } if (if_not) { if (id == id_file) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; break; } } else { if (id != id_file) { - state_process->condition_result = fake_condition_result_false; + state_process->condition_result = fake_condition_result_false_e; break; } @@ -1013,7 +1013,7 @@ extern "C" { status = f_file_mode_read(arguments.array[i].string, &mode_file); if (F_status_is_error(status)) { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_mode_read", F_true, arguments.array[i].string, "change mode of", fll_error_file_type_file); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_mode_read", F_true, arguments.array[i].string, "change mode of", fll_error_file_type_file_e); break; } @@ -1021,7 +1021,7 @@ extern "C" { status = f_file_mode_determine(mode_file, mode_rule, replace, macro_f_file_type_is_directory(mode_file), &mode); if (F_status_is_error(status)) { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_mode_determine", F_true, arguments.array[i].string, "change mode of", fll_error_file_type_file); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_mode_determine", F_true, arguments.array[i].string, "change mode of", fll_error_file_type_file_e); break; } @@ -1034,12 +1034,12 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_file_print(data_make->error, F_status_set_fine(status), all ? "fll_file_mode_set_all" : "f_file_mode_set", F_true, arguments.array[i].string, "change mode of", fll_error_file_type_file); + fll_error_file_print(data_make->error, F_status_set_fine(status), all ? "fll_file_mode_set_all" : "f_file_mode_set", F_true, arguments.array[i].string, "change mode of", fll_error_file_type_file_e); break; } - if (data_make->main->error.verbosity == f_console_verbosity_verbose) { + if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("Changed mode of '%Q' to %#@u.%c", data_make->main->output.to.stream, arguments.array[i], mode, f_string_eol_s[0]); } } // for @@ -1062,7 +1062,7 @@ extern "C" { f_array_length_t destination_length = 0; - if (data_make->main->error.verbosity == f_console_verbosity_verbose) { + if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { recurse.output = data_make->main->output.to; recurse.verbose = fake_verbose_print_move; } @@ -1074,7 +1074,7 @@ extern "C" { status_file = f_directory_is(arguments.array[1].string); if (F_status_is_error(status_file)) { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_is", F_true, arguments.array[1].string, "identify", fll_error_file_type_directory); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_is", F_true, arguments.array[1].string, "identify", fll_error_file_type_directory_e); return F_status_set_error(F_failure); } @@ -1106,7 +1106,7 @@ extern "C" { status_file = fll_file_move(arguments.array[i].string, destination, arguments.array[i].used, destination_length, recurse); if (F_status_is_error(status_file)) { - fll_error_file_print(data_make->error, F_status_set_fine(status), "fll_file_move", F_true, arguments.array[i].string, "move", fll_error_file_type_directory); + fll_error_file_print(data_make->error, F_status_set_fine(status), "fll_file_move", F_true, arguments.array[i].string, "move", fll_error_file_type_directory_e); status = F_status_set_error(F_failure); } @@ -1151,9 +1151,9 @@ extern "C" { if (F_status_is_error(status_file)) { status = status_file; - fll_error_file_print(data_make->error, F_status_set_fine(status), all ? "fll_file_role_change_all" : "f_file_role_change", F_true, arguments.array[i].string, "change owner of", fll_error_file_type_file); + fll_error_file_print(data_make->error, F_status_set_fine(status), all ? "fll_file_role_change_all" : "f_file_role_change", F_true, arguments.array[i].string, "change owner of", fll_error_file_type_file_e); } - else if (data_make->main->error.verbosity == f_console_verbosity_verbose) { + else if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("%s owner of '%Q' to %u.%c", data_make->main->output.to.stream, all ? "Recursively changed" : "Changed", arguments.array[i], id, f_string_eol_s[0]); } } // for @@ -1277,7 +1277,7 @@ extern "C" { return 0; } - if (data_make->main->error.verbosity == f_console_verbosity_verbose) { + if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { status = fake_make_path_relative(data_make, data_make->path.stack.array[data_make->path.stack.used - 1]); // The created relative path is for verbosity purposes and as such its failure to be processed should not be treated as a failure of the function. @@ -1342,7 +1342,7 @@ extern "C" { return status; } - if (data_make->main->error.verbosity == f_console_verbosity_verbose) { + if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { status = fake_make_path_relative(data_make, data_make->path.stack.array[data_make->path.stack.used]); // The created relative path is for verbosity purposes and as such its failure to be processed should not be treated as a failure of the function. @@ -1377,7 +1377,7 @@ extern "C" { } } - if (data_make->main->error.verbosity == f_console_verbosity_verbose) { + if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("Changed to project path ''.%c", data_make->main->output.to.stream, f_string_eol_s[0]); } @@ -1407,10 +1407,10 @@ extern "C" { if (F_status_is_error(status)) { if (F_status_is_error_not(fll_path_canonical(arguments.array[i].string, &data_make->path_cache))) { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_touch", F_true, data_make->path_cache.string, "touch", fll_error_file_type_file); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_touch", F_true, data_make->path_cache.string, "touch", fll_error_file_type_file_e); } else { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_touch", F_true, arguments.array[i].string, "touch", fll_error_file_type_file); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_touch", F_true, arguments.array[i].string, "touch", fll_error_file_type_file_e); } break; @@ -1421,17 +1421,17 @@ extern "C" { if (F_status_is_error(status)) { if (F_status_is_error_not(fll_path_canonical(arguments.array[i].string, &data_make->path_cache))) { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_touch", F_true, data_make->path_cache.string, "touch", fll_error_file_type_directory); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_touch", F_true, data_make->path_cache.string, "touch", fll_error_file_type_directory_e); } else { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_touch", F_true, arguments.array[i].string, "touch", fll_error_file_type_directory); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_touch", F_true, arguments.array[i].string, "touch", fll_error_file_type_directory_e); } break; } } - if (data_make->main->error.verbosity == f_console_verbosity_verbose) { + if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("Touched '%[%Q%]'.%c", data_make->main->output.to.stream, data_make->main->context.set.notable, arguments.array[i], data_make->main->context.set.notable, f_string_eol_s[0]); } } // for diff --git a/level_3/fake/c/private-make-operate_validate.c b/level_3/fake/c/private-make-operate_validate.c index a5b2105..2d7d902 100644 --- a/level_3/fake/c/private-make-operate_validate.c +++ b/level_3/fake/c/private-make-operate_validate.c @@ -18,15 +18,15 @@ extern "C" { if (F_status_is_error(*status)) return; - if (state_process->operation == fake_make_operation_type_index || state_process->operation == fake_make_operation_type_run || state_process->operation == fake_make_operation_type_shell) { + if (state_process->operation == fake_make_operation_type_index_e || state_process->operation == fake_make_operation_type_run_e || state_process->operation == fake_make_operation_type_shell_e) { if (!arguments.used) { fake_print_error_requires_more_arguments(data_make); *status = F_status_set_error(F_failure); } - else if (state_process->operation == fake_make_operation_type_index) { + else if (state_process->operation == fake_make_operation_type_index_e) { if (!data_make->setting_build.build_indexer.used) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SNo indexer has been specified, cannot perform '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -43,7 +43,7 @@ extern "C" { return; } - if (state_process->operation == fake_make_operation_type_break) { + if (state_process->operation == fake_make_operation_type_break_e) { if (arguments.used > 1) { fake_print_error_too_many_arguments(data_make); @@ -53,7 +53,7 @@ extern "C" { if (fl_string_dynamic_compare_string(fake_make_operation_argument_success_s, arguments.array[0], fake_make_operation_argument_success_s_length) == F_equal_to_not) { if (fl_string_dynamic_compare_string(fake_make_operation_argument_failure_s, arguments.array[0], fake_make_operation_argument_failure_s_length) == F_equal_to_not) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SUnsupported break type '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -71,7 +71,7 @@ extern "C" { return; } - if (state_process->operation == fake_make_operation_type_build) { + if (state_process->operation == fake_make_operation_type_build_e) { if (arguments.used > 1) { fake_print_error_too_many_arguments(data_make); @@ -89,7 +89,7 @@ extern "C" { f_status_t status_file = f_file_is(path_file, F_file_type_regular_d, F_false); if (status_file == F_file_found_not) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SFailed to find file '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -102,11 +102,11 @@ extern "C" { *status = F_status_set_error(status_file); } else if (F_status_is_error(status_file)) { - fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_file_is", F_true, path_file, "find", fll_error_file_type_file); + fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_file_is", F_true, path_file, "find", fll_error_file_type_file_e); *status = status_file; } else if (!status_file) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SThe file '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -120,7 +120,7 @@ extern "C" { } } else { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { fll_print_format("%c%[%SFilename argument must not be an empty string.%]%c", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context, f_string_eol_s[0]); } @@ -131,16 +131,16 @@ extern "C" { return; } - if (state_process->operation == fake_make_operation_type_clean || state_process->operation == fake_make_operation_type_pop || state_process->operation == fake_make_operation_type_top || state_process->operation == fake_make_operation_type_skeleton) { + if (state_process->operation == fake_make_operation_type_clean_e || state_process->operation == fake_make_operation_type_pop_e || state_process->operation == fake_make_operation_type_top_e || state_process->operation == fake_make_operation_type_skeleton_e) { if (arguments.used) { fake_print_error_too_many_arguments(data_make); *status = F_status_set_error(F_failure); } - else if (state_process->operation == fake_make_operation_type_pop) { + else if (state_process->operation == fake_make_operation_type_pop_e) { if (data_make->path.stack.used == 1) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { fll_print_format("%c%[%SMust not attempt to pop project root off of path stack.%]%c", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context, f_string_eol_s[0]); } @@ -151,7 +151,7 @@ extern "C" { return; } - if (state_process->operation == fake_make_operation_type_clone) { + if (state_process->operation == fake_make_operation_type_clone_e) { if (arguments.used > 1) { for (f_array_length_t i = 0; i < arguments.used; ++i) { @@ -169,7 +169,7 @@ extern "C" { for (f_array_length_t i = 0; i < arguments.used - 1; ++i) { if (f_file_exists(arguments.array[i].string) != F_true) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SFailed to find file '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -189,7 +189,7 @@ extern "C" { f_status_t status_file = f_directory_is(arguments.array[arguments.used - 1].string); if (status_file == F_false || status_file == F_file_found_not) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SThe last file '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -202,7 +202,7 @@ extern "C" { *status = F_status_set_error(F_failure); } else if (F_status_is_error(status_file)) { - fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_directory_is", F_true, arguments.array[arguments.used - 1].string, "find", fll_error_file_type_directory); + fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_directory_is", F_true, arguments.array[arguments.used - 1].string, "find", fll_error_file_type_directory_e); *status = F_status_set_error(F_failure); } } @@ -215,7 +215,7 @@ extern "C" { status_file = f_directory_is(arguments.array[1].string); if (status_file == F_false) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SThe last file '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -239,14 +239,14 @@ extern "C" { return; } - if (state_process->operation == fake_make_operation_type_compile) { + if (state_process->operation == fake_make_operation_type_compile_e) { if (!arguments.used) { fake_print_error_requires_more_arguments(data_make); *status = F_status_set_error(F_failure); } else if (data_make->setting_build.build_compiler.used) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SNo compiler has been specified, cannot perform '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -262,7 +262,7 @@ extern "C" { return; } - if (state_process->operation == fake_make_operation_type_copy) { + if (state_process->operation == fake_make_operation_type_copy_e) { if (arguments.used > 1) { for (f_array_length_t i = 0; i < arguments.used; ++i) { @@ -280,7 +280,7 @@ extern "C" { for (f_array_length_t i = 0; i < arguments.used - 1; ++i) { if (f_file_exists(arguments.array[i].string) != F_true) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SFailed to find file '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -300,7 +300,7 @@ extern "C" { f_status_t status_file = f_directory_is(arguments.array[arguments.used - 1].string); if (status_file == F_false || status_file == F_file_found_not) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SThe last file '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -313,7 +313,7 @@ extern "C" { *status = F_status_set_error(F_failure); } else if (F_status_is_error(status_file)) { - fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_directory_is", F_true, arguments.array[arguments.used - 1].string, "identify", fll_error_file_type_directory); + fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_directory_is", F_true, arguments.array[arguments.used - 1].string, "identify", fll_error_file_type_directory_e); *status = F_status_set_error(F_failure); } } @@ -326,7 +326,7 @@ extern "C" { status_file = f_directory_is(arguments.array[1].string); if (status_file == F_false) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SThe last file '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -350,19 +350,19 @@ extern "C" { return; } - if (state_process->operation == fake_make_operation_type_define) { + if (state_process->operation == fake_make_operation_type_define_e) { if (arguments.used) { *status = fake_make_operate_validate_define_name(arguments.array[0]); if (*status == F_none) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { fll_print_format("%c%[%SDefine name must not be an empty string.%]%c", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context, f_string_eol_s[0]); } *status = F_status_set_error(F_failure); } else if (*status == F_false) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SInvalid characters in the define setting name '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -384,7 +384,7 @@ extern "C" { return; } - if (state_process->operation == fake_make_operation_type_delete || state_process->operation == fake_make_operation_type_deletes) { + if (state_process->operation == fake_make_operation_type_delete_e || state_process->operation == fake_make_operation_type_deletes_e) { if (arguments.used) { for (f_array_length_t i = 0; i < arguments.used; ++i) { @@ -408,9 +408,9 @@ extern "C" { return; } - if (state_process->operation == fake_make_operation_type_else) { - if (state_process->block == fake_make_operation_if_type_else) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (state_process->operation == fake_make_operation_type_else_e) { + if (state_process->block == fake_make_operation_if_type_else_e) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SMust not be used immediately after another '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -425,8 +425,8 @@ extern "C" { return; } - if (state_process->operation_previous == fake_make_operation_type_if || state_process->operation_previous == fake_make_operation_type_and || state_process->operation_previous == fake_make_operation_type_or) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (state_process->operation_previous == fake_make_operation_type_if_e || state_process->operation_previous == fake_make_operation_type_and_e || state_process->operation_previous == fake_make_operation_type_or_e) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SMust not be used immediately after an '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -445,8 +445,8 @@ extern "C" { return; } - if (state_process->block != fake_make_operation_if_type_done) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (state_process->block != fake_make_operation_if_type_done_e) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { fl_print_format("%c%[%SHas no preceding '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); fl_print_format("%[%s%]", data_make->error.to.stream, data_make->error.notable, fake_make_operation_if_s, data_make->error.notable); fl_print_format("%[', '%]", data_make->error.to.stream, data_make->error.context, data_make->error.context); @@ -470,7 +470,7 @@ extern "C" { return; } - if (state_process->operation == fake_make_operation_type_exit) { + if (state_process->operation == fake_make_operation_type_exit_e) { if (arguments.used > 1) { fake_print_error_too_many_arguments(data_make); @@ -479,7 +479,7 @@ extern "C" { else if (arguments.used) { if (fl_string_dynamic_compare_string(fake_make_operation_argument_success_s, arguments.array[0], fake_make_operation_argument_success_s_length) == F_equal_to_not) { if (fl_string_dynamic_compare_string(fake_make_operation_argument_failure_s, arguments.array[0], fake_make_operation_argument_failure_s_length) == F_equal_to_not) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SUnsupported exit type '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -497,12 +497,12 @@ extern "C" { return; } - if (state_process->operation == fake_make_operation_type_fail) { + if (state_process->operation == fake_make_operation_type_fail_e) { if (arguments.used) { if (fl_string_dynamic_compare_string(fake_make_operation_argument_exit_s, arguments.array[0], fake_make_operation_argument_exit_s_length) == F_equal_to_not) { if (fl_string_dynamic_compare_string(fake_make_operation_argument_warn_s, arguments.array[0], fake_make_operation_argument_warn_s_length) == F_equal_to_not) { if (fl_string_dynamic_compare_string(fake_make_operation_argument_ignore_s, arguments.array[0], fake_make_operation_argument_ignore_s_length) == F_equal_to_not) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SUnsupported fail type '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -526,7 +526,7 @@ extern "C" { return; } - if (state_process->operation == fake_make_operation_type_group || state_process->operation == fake_make_operation_type_groups || state_process->operation == fake_make_operation_type_mode || state_process->operation == fake_make_operation_type_modes || state_process->operation == fake_make_operation_type_owner || state_process->operation == fake_make_operation_type_owners) { + if (state_process->operation == fake_make_operation_type_group_e || state_process->operation == fake_make_operation_type_groups_e || state_process->operation == fake_make_operation_type_mode_e || state_process->operation == fake_make_operation_type_modes_e || state_process->operation == fake_make_operation_type_owner_e || state_process->operation == fake_make_operation_type_owners_e) { if (arguments.used > 1) { f_status_t status_file = F_none; @@ -535,7 +535,7 @@ extern "C" { status_file = f_file_is(arguments.array[i].string, F_file_type_regular_d, F_false); if (status_file == F_file_found_not) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SFailed to find file '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -548,8 +548,8 @@ extern "C" { *status = F_status_set_error(status_file); } else if (F_status_is_error(status_file)) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_is", F_true, arguments.array[i].string, "find", fll_error_file_type_directory); + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_is", F_true, arguments.array[i].string, "find", fll_error_file_type_directory_e); } *status = status_file; @@ -566,10 +566,10 @@ extern "C" { return; } - if (state_process->operation == fake_make_operation_type_if || state_process->operation == fake_make_operation_type_and || state_process->operation == fake_make_operation_type_or) { - if (state_process->operation == fake_make_operation_type_if) { - if (state_process->block == fake_make_operation_type_if) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (state_process->operation == fake_make_operation_type_if_e || state_process->operation == fake_make_operation_type_and_e || state_process->operation == fake_make_operation_type_or_e) { + if (state_process->operation == fake_make_operation_type_if_e) { + if (state_process->block == fake_make_operation_type_if_e) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SMust not be used immediately after another '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -589,8 +589,8 @@ extern "C" { } } else { - if (!(state_process->operation_previous == fake_make_operation_type_if || state_process->operation_previous == fake_make_operation_type_and || state_process->operation_previous == fake_make_operation_type_or)) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (!(state_process->operation_previous == fake_make_operation_type_if_e || state_process->operation_previous == fake_make_operation_type_and_e || state_process->operation_previous == fake_make_operation_type_or_e)) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SMay only be used immediately after another '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -660,27 +660,27 @@ extern "C" { }; const uint8_t if_type_codes[] = { - fake_make_operation_if_type_if_defined, - fake_make_operation_if_type_if_equal, - fake_make_operation_if_type_if_equal_not, - fake_make_operation_if_type_if_exists, - fake_make_operation_if_type_if_failure, - fake_make_operation_if_type_if_greater, - fake_make_operation_if_type_if_greater_equal, - fake_make_operation_if_type_if_group, - fake_make_operation_if_type_if_is, - fake_make_operation_if_type_if_less, - fake_make_operation_if_type_if_less_equal, - fake_make_operation_if_type_if_mode, - fake_make_operation_if_type_if_not, - fake_make_operation_if_type_if_not_defined, - fake_make_operation_if_type_if_not_exists, - fake_make_operation_if_type_if_not_group, - fake_make_operation_if_type_if_not_is, - fake_make_operation_if_type_if_not_mode, - fake_make_operation_if_type_if_not_owner, - fake_make_operation_if_type_if_owner, - fake_make_operation_if_type_if_success, + fake_make_operation_if_type_if_defined_e, + fake_make_operation_if_type_if_equal_e, + fake_make_operation_if_type_if_equal_not_e, + fake_make_operation_if_type_if_exists_e, + fake_make_operation_if_type_if_failure_e, + fake_make_operation_if_type_if_greater_e, + fake_make_operation_if_type_if_greater_equal_e, + fake_make_operation_if_type_if_group_e, + fake_make_operation_if_type_if_is_e, + fake_make_operation_if_type_if_less_e, + fake_make_operation_if_type_if_less_equal_e, + fake_make_operation_if_type_if_mode_e, + fake_make_operation_if_type_if_not_e, + fake_make_operation_if_type_if_not_defined_e, + fake_make_operation_if_type_if_not_exists_e, + fake_make_operation_if_type_if_not_group_e, + fake_make_operation_if_type_if_not_is_e, + fake_make_operation_if_type_if_not_mode_e, + fake_make_operation_if_type_if_not_owner_e, + fake_make_operation_if_type_if_owner_e, + fake_make_operation_if_type_if_success_e, }; const uint8_t if_type_minimum[] = { @@ -726,12 +726,12 @@ extern "C" { }; const uint8_t if_not_type_codes[] = { - fake_make_operation_if_type_if_not_defined, - fake_make_operation_if_type_if_not_exists, - fake_make_operation_if_type_if_not_group, - fake_make_operation_if_type_if_not_is, - fake_make_operation_if_type_if_not_mode, - fake_make_operation_if_type_if_not_owner, + fake_make_operation_if_type_if_not_defined_e, + fake_make_operation_if_type_if_not_exists_e, + fake_make_operation_if_type_if_not_group_e, + fake_make_operation_if_type_if_not_is_e, + fake_make_operation_if_type_if_not_mode_e, + fake_make_operation_if_type_if_not_owner_e, }; const uint8_t if_not_type_minimum[] = { @@ -747,10 +747,10 @@ extern "C" { f_array_length_t j = 0; f_string_t if_and_or; - if (state_process->operation == fake_make_operation_type_and) { + if (state_process->operation == fake_make_operation_type_and_e) { if_and_or = fake_make_operation_and_s; } - else if (state_process->operation == fake_make_operation_type_or) { + else if (state_process->operation == fake_make_operation_type_or_e) { if_and_or = fake_make_operation_or_s; } else { @@ -770,7 +770,7 @@ extern "C" { } // for if (i == 21) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SUnsupported '%s' type '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, if_and_or, data_make->error.context); @@ -786,7 +786,7 @@ extern "C" { } // Identify and convert to the appropriate if not condition. - if (state_process->condition == fake_make_operation_if_type_if_not) { + if (state_process->condition == fake_make_operation_if_type_if_not_e) { if (arguments.used < 2) { fake_print_error_requires_more_arguments(data_make); @@ -805,7 +805,7 @@ extern "C" { } // for if (j == 6) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SUnsupported '%s' not type '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, if_and_or, data_make->error.context); @@ -825,7 +825,7 @@ extern "C" { } if (j == 6 && arguments.used >= if_type_minimum[i] || arguments.used >= if_not_type_minimum[j]) { - if (state_process->condition == fake_make_operation_if_type_if_success || state_process->condition == fake_make_operation_if_type_if_failure) { + if (state_process->condition == fake_make_operation_if_type_if_success_e || state_process->condition == fake_make_operation_if_type_if_failure_e) { // The success and failure operations minimum is also the maximum. if (arguments.used > if_type_minimum[i]) { @@ -837,10 +837,10 @@ extern "C" { return; } - if (state_process->condition == fake_make_operation_if_type_if_defined || state_process->condition == fake_make_operation_if_type_if_not_defined) { + if (state_process->condition == fake_make_operation_if_type_if_defined_e || state_process->condition == fake_make_operation_if_type_if_not_defined_e) { if (fl_string_dynamic_compare_string(fake_make_operation_argument_environment_s, arguments.array[1], fake_make_operation_argument_environment_s_length) == F_equal_to_not) { if (fl_string_dynamic_compare_string(fake_make_operation_argument_parameter_s, arguments.array[1], fake_make_operation_argument_parameter_s_length) == F_equal_to_not) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SUnsupported define type '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -856,7 +856,7 @@ extern "C" { return; } - else if (state_process->condition == fake_make_operation_if_type_if_equal || state_process->condition == fake_make_operation_if_type_if_equal_not) { + else if (state_process->condition == fake_make_operation_if_type_if_equal_e || state_process->condition == fake_make_operation_if_type_if_equal_not_e) { if (arguments.used < 3) { fake_print_error_requires_more_arguments(data_make); @@ -865,15 +865,15 @@ extern "C" { return; } - else if (state_process->condition == fake_make_operation_if_type_if_exists || state_process->condition == fake_make_operation_if_type_if_not_exists) { + else if (state_process->condition == fake_make_operation_if_type_if_exists_e || state_process->condition == fake_make_operation_if_type_if_not_exists_e) { return; } - else if (state_process->condition == fake_make_operation_if_type_if_group || state_process->condition == fake_make_operation_if_type_if_is || state_process->condition == fake_make_operation_if_type_if_mode || state_process->condition > fake_make_operation_if_type_if_not_exists && state_process->condition < fake_make_operation_if_type_if_success) { + else if (state_process->condition == fake_make_operation_if_type_if_group_e || state_process->condition == fake_make_operation_if_type_if_is_e || state_process->condition == fake_make_operation_if_type_if_mode_e || state_process->condition > fake_make_operation_if_type_if_not_exists_e && state_process->condition < fake_make_operation_if_type_if_success_e) { - if (state_process->condition == fake_make_operation_if_type_if_mode || state_process->condition == fake_make_operation_if_type_if_not_mode) { + if (state_process->condition == fake_make_operation_if_type_if_mode_e || state_process->condition == fake_make_operation_if_type_if_not_mode_e) { if (fl_string_dynamic_compare_string(fake_make_operation_argument_is_s, arguments.array[1], fake_make_operation_argument_is_s_length) == F_equal_to_not) { if (fl_string_dynamic_compare_string(fake_make_operation_argument_has_s, arguments.array[1], fake_make_operation_argument_has_s_length) == F_equal_to_not) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SUnsupported %smode type '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, j == 6 ? "" : "not ", data_make->error.context); @@ -897,7 +897,7 @@ extern "C" { i = j == 6 ? 3 : 4; } - else if (state_process->condition == fake_make_operation_if_type_if_group || state_process->condition == fake_make_operation_if_type_if_not_group) { + else if (state_process->condition == fake_make_operation_if_type_if_group_e || state_process->condition == fake_make_operation_if_type_if_not_group_e) { gid_t id = 0; *status = fake_make_get_id_group(data_make->main, data_make->error, j == 6 ? arguments.array[1] : arguments.array[2], &id); @@ -905,7 +905,7 @@ extern "C" { i = j == 6 ? 2 : 3; } - else if (state_process->condition == fake_make_operation_if_type_if_is || state_process->condition == fake_make_operation_if_type_if_not_is) { + else if (state_process->condition == fake_make_operation_if_type_if_is_e || state_process->condition == fake_make_operation_if_type_if_not_is_e) { // block = 0x1 (0000 0001) link = 0x10 (0001 0000) // character = 0x2 (0000 0010) regular = 0x20 (0010 0000) @@ -943,7 +943,7 @@ extern "C" { type_file |= 0x40; } else { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SUnsupported file type '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -963,7 +963,7 @@ extern "C" { return; } } - else if (state_process->condition == fake_make_operation_if_type_if_owner || state_process->condition == fake_make_operation_if_type_if_not_owner) { + else if (state_process->condition == fake_make_operation_if_type_if_owner_e || state_process->condition == fake_make_operation_if_type_if_not_owner_e) { uid_t id = 0; *status = fake_make_get_id_owner(data_make->main, data_make->error, arguments.array[1], &id); @@ -989,7 +989,7 @@ extern "C" { } } } - else if (state_process->condition != fake_make_operation_if_type_if_exists && state_process->condition != fake_make_operation_if_type_if_is) { + else if (state_process->condition != fake_make_operation_if_type_if_exists_e && state_process->condition != fake_make_operation_if_type_if_is_e) { // The existence tests do not need to happen here for *_if_exists and *_if_is as those two types will handle performing them during the process stage. status_file = f_file_exists(arguments.array[i].string); @@ -999,7 +999,7 @@ extern "C" { } if (F_status_is_error(status_file)) { - fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_file_exists", F_true, arguments.array[i].string, "find", fll_error_file_type_file); + fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_file_exists", F_true, arguments.array[i].string, "find", fll_error_file_type_file_e); if (F_status_is_error_not(*status)) { *status = F_status_set_error(status_file); @@ -1009,7 +1009,7 @@ extern "C" { } // for } } - else if (state_process->condition == fake_make_operation_if_type_if_greater || state_process->condition == fake_make_operation_if_type_if_greater_equal || state_process->condition == fake_make_operation_if_type_if_less || state_process->condition == fake_make_operation_if_type_if_less_equal) { + else if (state_process->condition == fake_make_operation_if_type_if_greater_e || state_process->condition == fake_make_operation_if_type_if_greater_equal_e || state_process->condition == fake_make_operation_if_type_if_less_e || state_process->condition == fake_make_operation_if_type_if_less_equal_e) { if (arguments.used < 3) { fake_print_error_requires_more_arguments(data_make); @@ -1052,7 +1052,7 @@ extern "C" { if (F_status_is_error(status_number)) { *status = F_status_set_error(F_failure); - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); if (number > F_number_t_size_unsigned_d) { @@ -1083,7 +1083,7 @@ extern "C" { return; } - if (state_process->operation == fake_make_operation_type_link) { + if (state_process->operation == fake_make_operation_type_link_e) { if (arguments.used > 2) { fake_print_error_too_many_arguments(data_make); @@ -1119,7 +1119,7 @@ extern "C" { return; } - if (state_process->operation == fake_make_operation_type_move) { + if (state_process->operation == fake_make_operation_type_move_e) { if (arguments.used > 1) { for (f_array_length_t i = 0; i < arguments.used; ++i) { @@ -1137,7 +1137,7 @@ extern "C" { for (f_array_length_t i = 0; i < arguments.used - 1; ++i) { if (f_file_exists(arguments.array[i].string) != F_true) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SFailed to find file '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -1157,7 +1157,7 @@ extern "C" { f_status_t status_file = f_directory_is(arguments.array[arguments.used - 1].string); if (status_file == F_false || status_file == F_file_found_not) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SThe last file '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -1170,7 +1170,7 @@ extern "C" { *status = F_status_set_error(F_failure); } else if (F_status_is_error(status_file)) { - fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_directory_is", F_true, arguments.array[arguments.used - 1].string, "identify", fll_error_file_type_directory); + fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_directory_is", F_true, arguments.array[arguments.used - 1].string, "identify", fll_error_file_type_directory_e); *status = F_status_set_error(F_failure); } } @@ -1183,7 +1183,7 @@ extern "C" { status_file = f_directory_is(arguments.array[1].string); if (status_file == F_false) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SThe last file '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -1207,7 +1207,7 @@ extern "C" { return; } - if (state_process->operation == fake_make_operation_type_operate) { + if (state_process->operation == fake_make_operation_type_operate_e) { if (arguments.used > 1) { fake_print_error_too_many_arguments(data_make); @@ -1236,7 +1236,7 @@ extern "C" { for (f_array_length_t i = 0; i < section_stack->used; ++i) { if (section_stack->array[i] == id_section) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SThe section operation '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -1261,7 +1261,7 @@ extern "C" { return; } - if (state_process->operation == fake_make_operation_type_parameter) { + if (state_process->operation == fake_make_operation_type_parameter_e) { if (arguments.used) { const f_string_t reserved_name[] = { fake_make_parameter_variable_build_s, @@ -1355,7 +1355,7 @@ extern "C" { return; } - if (state_process->operation == fake_make_operation_type_to) { + if (state_process->operation == fake_make_operation_type_to_e) { if (arguments.used > 1) { fake_print_error_too_many_arguments(data_make); @@ -1366,7 +1366,7 @@ extern "C" { f_status_t status_file = f_file_is(arguments.array[0].string, F_file_type_directory_d, F_false); if (status_file == F_file_found_not) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SFailed to find file '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -1379,14 +1379,14 @@ extern "C" { *status = F_status_set_error(status_file); } else if (F_status_is_error(status_file)) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { - fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_is", F_true, data_make->main->file_data_build_fakefile.string, "find", fll_error_file_type_file); + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_is", F_true, data_make->main->file_data_build_fakefile.string, "find", fll_error_file_type_file_e); } *status = status_file; } else if (!status_file) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SThe file '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -1400,7 +1400,7 @@ extern "C" { } } else { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { fll_print_format("%c%[%SFilename argument must not be an empty string.%]%c", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context, f_string_eol_s[0]); } } @@ -1414,12 +1414,12 @@ extern "C" { return; } - if (state_process->operation == fake_make_operation_type_touch) { + if (state_process->operation == fake_make_operation_type_touch_e) { if (arguments.used > 1) { if (fl_string_dynamic_compare_string(fake_make_operation_argument_file_s, arguments.array[0], fake_make_operation_argument_file_s_length) == F_equal_to_not) { if (fl_string_dynamic_compare_string(fake_make_operation_argument_directory_s, arguments.array[0], fake_make_operation_argument_directory_s_length) == F_equal_to_not) { - if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SUnsupported file type '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -1455,7 +1455,7 @@ extern "C" { return; } - // Note: there is nothing to validate for fake_make_operation_type_print. + // Note: there is nothing to validate for fake_make_operation_type_print_e. return; } #endif // _di_fake_make_operate_validate_ diff --git a/level_3/fake/c/private-make.c b/level_3/fake/c/private-make.c index 337a3f0..c661393 100644 --- a/level_3/fake/c/private-make.c +++ b/level_3/fake/c/private-make.c @@ -68,7 +68,7 @@ extern "C" { return F_status_set_error(status); } else if (status == F_exist_not) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SThe group name '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -88,7 +88,7 @@ extern "C" { return F_status_set_error(status); } else if (number > F_type_size_32_unsigned_d) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SThe number '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -116,7 +116,7 @@ extern "C" { f_status_t status = f_file_mode_from_string(buffer.string, main->umask, mode, replace); if (F_status_is_error(status)) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { if (F_status_set_fine(status) == F_syntax) { flockfile(main->error.to.stream); @@ -159,7 +159,7 @@ extern "C" { return F_status_set_error(status); } else if (status == F_exist_not) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SThe user '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -179,7 +179,7 @@ extern "C" { return F_status_set_error(status); } else if (number > F_type_size_32_unsigned_d) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SThe number '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); diff --git a/level_3/fake/c/private-print.c b/level_3/fake/c/private-print.c index a35ca2d..9acf588 100644 --- a/level_3/fake/c/private-print.c +++ b/level_3/fake/c/private-print.c @@ -14,7 +14,7 @@ extern "C" { bool fake_print_error_build_operation_file(fake_main_t * const main, const f_status_t status, const f_string_t function, const f_string_t operation, const f_string_t how, const f_string_t source, const f_string_t destination, const bool fallback) { if (status == F_file_found_not) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SFailed to find '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -36,7 +36,7 @@ extern "C" { } if (status == F_parameter) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SInvalid parameter when calling '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -58,7 +58,7 @@ extern "C" { } if (status == F_name) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SInvalid name for '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -78,7 +78,7 @@ extern "C" { } if (status == F_memory_not) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SUnable to allocate memory, while trying to %S '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, operation, main->error.context); @@ -98,7 +98,7 @@ extern "C" { } if (status == F_number_overflow) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SOverflow while trying to %S '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, operation, main->error.context); @@ -118,7 +118,7 @@ extern "C" { } if (status == F_directory) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SInvalid directory while trying to %S '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, operation, main->error.context); @@ -138,7 +138,7 @@ extern "C" { } if (status == F_access_denied) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SAccess denied while trying to %S '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, operation, main->error.context); @@ -158,7 +158,7 @@ extern "C" { } if (status == F_loop) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SLoop while trying to %S '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, operation, main->error.context); @@ -178,7 +178,7 @@ extern "C" { } if (status == F_prohibited) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SProhibited by system while trying to %S '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, operation, main->error.context); @@ -198,7 +198,7 @@ extern "C" { } if (status == F_directory_found_not) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SFailed to %S '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, operation, main->error.context); @@ -218,7 +218,7 @@ extern "C" { } if (status == F_failure) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SFailed to %S '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, operation, main->error.context); @@ -237,7 +237,7 @@ extern "C" { return F_false; } - if (fll_error_print(main->error, status, function, F_false) == F_known_not && fallback && main->error.verbosity != f_console_verbosity_quiet) { + if (fll_error_print(main->error, status, function, F_false) == F_known_not && fallback && main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[UNKNOWN %s(%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, operation, main->error.context); @@ -263,7 +263,7 @@ extern "C" { bool fake_print_error_fss(fake_main_t * const main, const f_status_t status, const f_string_t function, const f_string_t path_file, const f_string_range_t range, const bool fallback) { if (status == F_file_found_not) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SOccurred on invalid UTF-8 character at stop position (at '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -279,7 +279,7 @@ extern "C" { } if (status == F_complete_not_utf || status == F_complete_not_utf_eos || status == F_complete_not_utf_stop) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SOccurred on invalid UTF-8 character at %s (at '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, status == F_complete_not_utf_eos ? "end of string" : "stop point of string", main->error.context); @@ -295,7 +295,7 @@ extern "C" { } if (status == F_complete_not_utf_stop) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SOccurred on invalid UTF-8 character at stop point of string (at '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -310,7 +310,7 @@ extern "C" { return F_false; } - if (fll_error_print(main->error, status, function, F_false) == F_known_not && fallback && main->error.verbosity != f_console_verbosity_quiet) { + if (fll_error_print(main->error, status, function, F_false) == F_known_not && fallback && main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[UNKNOWN %s(%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -329,7 +329,7 @@ extern "C" { #ifndef _di_fake_print_error_parameter_missing_value_ void fake_print_error_parameter_missing_value(fake_main_t * const main, const f_string_t parameter) { - if (main->error.verbosity == f_console_verbosity_quiet) return; + if (main->error.verbosity == f_console_verbosity_quiet_e) return; flockfile(main->error.to.stream); @@ -344,7 +344,7 @@ extern "C" { #ifndef _di_fake_print_error_parameter_too_many_ void fake_print_error_parameter_too_many(fake_main_t * const main, const f_string_t parameter) { - if (main->error.verbosity == f_console_verbosity_quiet) return; + if (main->error.verbosity == f_console_verbosity_quiet_e) return; flockfile(main->error.to.stream); @@ -359,7 +359,7 @@ extern "C" { #ifndef _di_fake_print_error_requires_more_arguments_ void fake_print_error_requires_more_arguments(fake_make_data_t * const data_make) { - if (data_make->error.verbosity == f_console_verbosity_quiet) return; + if (data_make->error.verbosity == f_console_verbosity_quiet_e) return; if (!data_make->error.to.stream) return; fll_print_format("%c%[%SRequires more arguments.%]%c", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context, f_string_eol_s[0]); @@ -369,7 +369,7 @@ extern "C" { #ifndef _di_fake_print_error_too_many_arguments_ void fake_print_error_too_many_arguments(fake_make_data_t * const data_make) { - if (data_make->error.verbosity == f_console_verbosity_quiet) return; + if (data_make->error.verbosity == f_console_verbosity_quiet_e) return; if (!data_make->error.to.stream) return; fll_print_format("%c%[%SHas too many arguments.%]%c", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context, f_string_eol_s[0]); @@ -379,7 +379,7 @@ extern "C" { #ifndef _di_fake_print_message_section_operation_failed_ void fake_print_message_section_operation_failed(fake_main_t * const main, const fl_print_t print, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name) { - if (main->error.verbosity == f_console_verbosity_quiet || !print.to.stream) return; + if (main->error.verbosity == f_console_verbosity_quiet_e || !print.to.stream) return; f_array_length_t line = 1; @@ -402,7 +402,7 @@ extern "C" { #ifndef _di_fake_print_message_section_operation_path_outside_ void fake_print_message_section_operation_path_outside(fake_main_t * const main, const fl_print_t print, const f_status_t status, const f_string_t function, const f_string_t path) { - if (main->error.verbosity == f_console_verbosity_quiet || !print.to.stream) return; + if (main->error.verbosity == f_console_verbosity_quiet_e || !print.to.stream) return; flockfile(main->error.to.stream); @@ -412,7 +412,7 @@ extern "C" { fl_print_format("%[' is outside the project root.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); } else { - fll_error_file_print(main->error, F_status_set_fine(status), function, F_true, path, "determine real path of", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), function, F_true, path, "determine real path of", fll_error_file_type_file_e); } funlockfile(main->error.to.stream); @@ -422,7 +422,7 @@ extern "C" { #ifndef _di_fake_print_message_section_operation_path_stack_max_ void fake_print_message_section_operation_path_stack_max(fake_main_t * const main, fl_print_t print, const f_status_t status, const f_string_t function, const f_string_t path) { - if (main->error.verbosity == f_console_verbosity_quiet || !print.to.stream) return; + if (main->error.verbosity == f_console_verbosity_quiet_e || !print.to.stream) return; if (status == F_array_too_large) { flockfile(main->error.to.stream); @@ -441,7 +441,7 @@ extern "C" { funlockfile(main->error.to.stream); } else { - fll_error_file_print(print, status, function, F_true, path, "change path to", fll_error_file_type_directory); + fll_error_file_print(print, status, function, F_true, path, "change path to", fll_error_file_type_directory_e); } } #endif // _di_fake_print_message_section_operation_path_stack_max_ @@ -449,7 +449,7 @@ extern "C" { #ifndef _di_fake_print_message_section_operation_stack_max_ void fake_print_message_section_operation_stack_max(fake_main_t * const main, fl_print_t print, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name, const f_array_length_t stack_max) { - if (main->error.verbosity == f_console_verbosity_quiet || !print.to.stream) return; + if (main->error.verbosity == f_console_verbosity_quiet_e || !print.to.stream) return; f_array_length_t line = 1; @@ -474,7 +474,7 @@ extern "C" { #ifndef _di_fake_print_message_section_operation_unknown_ void fake_print_message_section_operation_unknown(fake_main_t * const main, const fl_print_t print, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name) { - if (main->error.verbosity == f_console_verbosity_quiet || !print.to.stream) return; + if (main->error.verbosity == f_console_verbosity_quiet_e || !print.to.stream) return; f_array_length_t line = 1; @@ -497,7 +497,7 @@ extern "C" { #ifndef _di_fake_print_signal_received_ void fake_print_signal_received(fake_main_t * const main, const f_status_t signal) { - if (main->warning.verbosity != f_console_verbosity_verbose) return; + if (main->warning.verbosity != f_console_verbosity_verbose_e) return; // Must flush and reset color because the interrupt may have interrupted the middle of a print function. fflush(main->warning.to.stream); @@ -515,7 +515,7 @@ extern "C" { #ifndef _di_fake_print_warning_settings_content_empty_ void fake_print_warning_settings_content_empty(fake_main_t * const main, const f_string_t path_file, const f_string_dynamic_t buffer, const f_string_range_t range_object, const f_string_t settings_name) { - if (main->warning.verbosity == f_console_verbosity_quiet) return; + if (main->warning.verbosity == f_console_verbosity_quiet_e) return; flockfile(main->warning.to.stream); @@ -534,7 +534,7 @@ extern "C" { #ifndef _di_fake_print_warning_settings_content_invalid_ void fake_print_warning_settings_content_invalid(fake_main_t * const main, const f_string_t path_file, const f_string_dynamic_t buffer, const f_string_range_t range_object, const f_string_range_t range_content, const f_string_t settings_name) { - if (main->warning.verbosity == f_console_verbosity_quiet) return; + if (main->warning.verbosity == f_console_verbosity_quiet_e) return; flockfile(main->warning.to.stream); @@ -555,7 +555,7 @@ extern "C" { #ifndef _di_fake_print_warning_settings_content_multiple_ void fake_print_warning_settings_content_multiple(fake_main_t * const main, const f_string_t path_file, const f_string_t name_object) { - if (main->warning.verbosity == f_console_verbosity_quiet) return; + if (main->warning.verbosity == f_console_verbosity_quiet_e) return; flockfile(main->warning.to.stream); @@ -572,7 +572,7 @@ extern "C" { #ifndef _di_fake_print_warning_settings_object_multiple_ void fake_print_warning_settings_object_multiple(fake_main_t * const main, const f_string_t path_file, const f_string_t label, const f_string_t name_object) { - if (main->warning.verbosity == f_console_verbosity_quiet) return; + if (main->warning.verbosity == f_console_verbosity_quiet_e) return; flockfile(main->warning.to.stream); diff --git a/level_3/fake/c/private-skeleton.c b/level_3/fake/c/private-skeleton.c index bddc0ff..ff9be63 100644 --- a/level_3/fake/c/private-skeleton.c +++ b/level_3/fake/c/private-skeleton.c @@ -15,7 +15,7 @@ extern "C" { f_status_t status = F_none; - if (main->output.verbosity != f_console_verbosity_quiet) { + if (main->output.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%cGenerating skeleton structure.%c", main->output.to.stream, f_string_eol_s[0], f_string_eol_s[0]); } @@ -132,7 +132,7 @@ extern "C" { status = f_directory_exists(path.string); if (status == F_true) { - if (main->error.verbosity == f_console_verbosity_verbose) { + if (main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("Directory '%Q' already exists.%c", main->output.to.stream, path, f_string_eol_s[0]); } @@ -140,7 +140,7 @@ extern "C" { } if (status == F_false) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%SThe path '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -166,18 +166,18 @@ extern "C" { funlockfile(main->error.to.stream); } else { - fll_error_file_print(main->error, F_status_set_fine(status), "f_directory_create", F_true, path.string, "create", fll_error_file_type_directory); + fll_error_file_print(main->error, F_status_set_fine(status), "f_directory_create", F_true, path.string, "create", fll_error_file_type_directory_e); } return status; } - if (main->error.verbosity == f_console_verbosity_verbose) { + if (main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("Directory '%Q' created.%c", main->output.to.stream, path, f_string_eol_s[0]); } } else if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_directory_exists", F_true, path.string, "create", fll_error_file_type_directory); + fll_error_file_print(main->error, F_status_set_fine(status), "f_directory_exists", F_true, path.string, "create", fll_error_file_type_directory_e); return status; } @@ -196,7 +196,7 @@ extern "C" { status = f_file_is(path.string, F_file_type_regular_d, F_false); if (status == F_true) { - if (main->error.verbosity == f_console_verbosity_verbose) { + if (main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("File '%Q' already exists.%c", main->output.to.stream, path, f_string_eol_s[0]); } @@ -208,7 +208,7 @@ extern "C" { status = f_file_is(path.string, F_file_type_link_d, F_false); if (status == F_true) { - if (main->error.verbosity == f_console_verbosity_verbose) { + if (main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("File '%Q' already exists (as a symbolic link).%c", main->output.to.stream, path, f_string_eol_s[0]); } @@ -217,7 +217,7 @@ extern "C" { } if (status == F_false) { - if (main->error.verbosity == f_console_verbosity_verbose) { + if (main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("File '%Q' already exists but is not a regular file (or symbolic link).%c", main->output.to.stream, path, f_string_eol_s[0]); } @@ -243,13 +243,13 @@ extern "C" { funlockfile(main->error.to.stream); } else { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_create", F_true, path.string, "create", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_create", F_true, path.string, "create", fll_error_file_type_file_e); } return status; } - if (main->error.verbosity == f_console_verbosity_verbose) { + if (main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("File '%Q' created.%c", main->output.to.stream, path, f_string_eol_s[0]); } @@ -262,7 +262,7 @@ extern "C" { status = f_file_open(path.string, 0, &file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, path.string, "pre-populate", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, path.string, "pre-populate", fll_error_file_type_file_e); return status; } @@ -270,13 +270,13 @@ extern "C" { status = f_file_write(file, content, 0); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_write", F_true, path.string, "pre-populate", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_write", F_true, path.string, "pre-populate", fll_error_file_type_file_e); f_file_stream_close(F_true, &file); return status; } - if (main->error.verbosity == f_console_verbosity_verbose) { + if (main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_format("File '%Q' pre-populated.%c", main->output.to.stream, path, f_string_eol_s[0]); } @@ -284,7 +284,7 @@ extern "C" { } } else if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_is", F_true, path.string, "create", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_is", F_true, path.string, "create", fll_error_file_type_file_e); return status; } diff --git a/level_3/fake/data/build/dependencies b/level_3/fake/data/build/dependencies index 97025c1..a588aea 100644 --- a/level_3/fake/data/build/dependencies +++ b/level_3/fake/data/build/dependencies @@ -28,7 +28,6 @@ fl_environment fl_fss fl_iki fl_print -fl_status fl_string fll_error fll_execute diff --git a/level_3/fake/data/build/settings b/level_3/fake/data/build/settings index dcf25b1..aadcd6f 100644 --- a/level_3/fake/data/build/settings +++ b/level_3/fake/data/build/settings @@ -21,7 +21,7 @@ build_indexer ar build_indexer_arguments rcs build_language c build_libraries -lc -lcap -build_libraries-individual -lfll_error -lfll_execute -lfll_file -lfll_fss -lfll_path -lfll_print -lfll_program -lfl_console -lfl_control_group -lfl_conversion -lfl_directory -lfl_environment -lfl_fss -lfl_iki -lfl_print -lfl_status -lfl_string -lf_account -lf_capability -lf_color -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_execute -lf_file -lf_fss -lf_iki -lf_limit -lf_memory -lf_path -lf_print -lf_signal -lf_string -lf_thread -lf_type_array -lf_utf +build_libraries-individual -lfll_error -lfll_execute -lfll_file -lfll_fss -lfll_path -lfll_print -lfll_program -lfl_console -lfl_control_group -lfl_conversion -lfl_directory -lfl_environment -lfl_fss -lfl_iki -lfl_print -lfl_string -lf_account -lf_capability -lf_color -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_execute -lf_file -lf_fss -lf_iki -lf_limit -lf_memory -lf_path -lf_print -lf_signal -lf_status_string -lf_string -lf_thread -lf_type_array -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared diff --git a/level_3/firewall/c/firewall.c b/level_3/firewall/c/firewall.c index cbaf560..fb49aea 100644 --- a/level_3/firewall/c/firewall.c +++ b/level_3/firewall/c/firewall.c @@ -53,7 +53,7 @@ extern "C" { const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, firewall_total_parameters_d); { - f_console_parameter_id_t ids[3] = { firewall_parameter_no_color, firewall_parameter_light, firewall_parameter_dark }; + f_console_parameter_id_t ids[3] = { firewall_parameter_no_color_e, firewall_parameter_light_e, firewall_parameter_dark_e }; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3); status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context); @@ -87,7 +87,7 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { firewall_parameter_verbosity_quiet, firewall_parameter_verbosity_normal, firewall_parameter_verbosity_verbose, firewall_parameter_verbosity_debug }; + f_console_parameter_id_t ids[4] = { firewall_parameter_verbosity_quiet_e, firewall_parameter_verbosity_normal_e, firewall_parameter_verbosity_verbose_e, firewall_parameter_verbosity_debug_e }; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); f_console_parameter_id_t choice = 0; @@ -99,32 +99,32 @@ extern "C" { return status; } - if (choice == firewall_parameter_verbosity_quiet) { - main->output.verbosity = f_console_verbosity_quiet; - main->error.verbosity = f_console_verbosity_quiet; - main->warning.verbosity = f_console_verbosity_quiet; + if (choice == firewall_parameter_verbosity_quiet_e) { + main->output.verbosity = f_console_verbosity_quiet_e; + main->error.verbosity = f_console_verbosity_quiet_e; + main->warning.verbosity = f_console_verbosity_quiet_e; } - else if (choice == firewall_parameter_verbosity_normal) { - main->output.verbosity = f_console_verbosity_normal; - main->error.verbosity = f_console_verbosity_normal; - main->warning.verbosity = f_console_verbosity_normal; + else if (choice == firewall_parameter_verbosity_normal_e) { + main->output.verbosity = f_console_verbosity_normal_e; + main->error.verbosity = f_console_verbosity_normal_e; + main->warning.verbosity = f_console_verbosity_normal_e; } - else if (choice == firewall_parameter_verbosity_verbose) { - main->output.verbosity = f_console_verbosity_verbose; - main->error.verbosity = f_console_verbosity_verbose; - main->warning.verbosity = f_console_verbosity_verbose; + else if (choice == firewall_parameter_verbosity_verbose_e) { + main->output.verbosity = f_console_verbosity_verbose_e; + main->error.verbosity = f_console_verbosity_verbose_e; + main->warning.verbosity = f_console_verbosity_verbose_e; } - else if (choice == firewall_parameter_verbosity_debug) { - main->output.verbosity = f_console_verbosity_debug; - main->error.verbosity = f_console_verbosity_debug; - main->warning.verbosity = f_console_verbosity_debug; + else if (choice == firewall_parameter_verbosity_debug_e) { + main->output.verbosity = f_console_verbosity_debug_e; + main->error.verbosity = f_console_verbosity_debug_e; + main->warning.verbosity = f_console_verbosity_debug_e; } } status = F_none; } - if (main->parameters[firewall_parameter_help].result == f_console_result_found) { + if (main->parameters[firewall_parameter_help_e].result == f_console_result_found_e) { firewall_print_help(main->output.to, main->context); firewall_main_delete(main); @@ -132,7 +132,7 @@ extern "C" { return F_none; } - if (main->parameters[firewall_parameter_version].result == f_console_result_found) { + if (main->parameters[firewall_parameter_version_e].result == f_console_result_found_e) { fll_program_print_version(main->output.to, firewall_version_s); firewall_main_delete(main); @@ -144,55 +144,55 @@ extern "C" { bool found_command = F_false; unsigned int command = 0; - if (main->parameters[firewall_parameter_command_start].result == f_console_result_found) { - command = firewall_parameter_command_start; + if (main->parameters[firewall_parameter_command_start_e].result == f_console_result_found_e) { + command = firewall_parameter_command_start_e; found_command = F_true; } - if (main->parameters[firewall_parameter_command_stop].result == f_console_result_found) { + if (main->parameters[firewall_parameter_command_stop_e].result == f_console_result_found_e) { if (found_command) { - if (main->parameters[command].values.array[0] > main->parameters[firewall_parameter_command_stop].values.array[0]) { - command = firewall_parameter_command_stop; + if (main->parameters[command].values.array[0] > main->parameters[firewall_parameter_command_stop_e].values.array[0]) { + command = firewall_parameter_command_stop_e; } } else { - command = firewall_parameter_command_stop; + command = firewall_parameter_command_stop_e; found_command = F_true; } } - if (main->parameters[firewall_parameter_command_restart].result == f_console_result_found) { + if (main->parameters[firewall_parameter_command_restart_e].result == f_console_result_found_e) { if (found_command) { - if (main->parameters[command].values.array[0] > main->parameters[firewall_parameter_command_restart].values.array[0]) { - command = firewall_parameter_command_restart; + if (main->parameters[command].values.array[0] > main->parameters[firewall_parameter_command_restart_e].values.array[0]) { + command = firewall_parameter_command_restart_e; } } else { - command = firewall_parameter_command_restart; + command = firewall_parameter_command_restart_e; found_command = F_true; } } - if (main->parameters[firewall_parameter_command_lock].result == f_console_result_found) { + if (main->parameters[firewall_parameter_command_lock_e].result == f_console_result_found_e) { if (found_command) { - if (main->parameters[command].values.array[0] > main->parameters[firewall_parameter_command_lock].values.array[0]) { - command = firewall_parameter_command_lock; + if (main->parameters[command].values.array[0] > main->parameters[firewall_parameter_command_lock_e].values.array[0]) { + command = firewall_parameter_command_lock_e; } } else { - command = firewall_parameter_command_lock; + command = firewall_parameter_command_lock_e; found_command = F_true; } } - if (main->parameters[firewall_parameter_command_show].result == f_console_result_found) { + if (main->parameters[firewall_parameter_command_show_e].result == f_console_result_found_e) { if (found_command) { - if (main->parameters[command].values.array[0] > main->parameters[firewall_parameter_command_show].values.array[0]) { - command = firewall_parameter_command_show; + if (main->parameters[command].values.array[0] > main->parameters[firewall_parameter_command_show_e].values.array[0]) { + command = firewall_parameter_command_show_e; } } else { - command = firewall_parameter_command_show; + command = firewall_parameter_command_show_e; found_command = F_true; } } @@ -202,7 +202,7 @@ extern "C" { firewall_reserved_chains_t reserved = firewall_reserved_chains_t_initialize; f_string_range_t input = f_string_range_t_initialize; - if (command == firewall_parameter_command_show) { + if (command == firewall_parameter_command_show_e) { // Warning: these are hardcoded print commands (I am not certain how I am going to implement external 'show' rules as the default-firewall setting file is the wrong place to put this) bool show_nat = F_true; @@ -388,7 +388,7 @@ extern "C" { if (F_status_is_error(status)) { status = F_status_set_fine(status); - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { if (status == F_memory_not) { firewall_print_error_on_allocation_failure(main->error); } @@ -426,7 +426,7 @@ extern "C" { } // for } - if (command == firewall_parameter_command_stop || command == firewall_parameter_command_restart || command == firewall_parameter_command_lock) { + if (command == firewall_parameter_command_stop_e || command == firewall_parameter_command_restart_e || command == firewall_parameter_command_lock_e) { status = firewall_buffer_rules(main, network_path_s firewall_file_other_s, F_false, &local); if (F_status_is_error(status)) { @@ -454,7 +454,7 @@ extern "C" { } // for } - if (command == firewall_parameter_command_lock) { + if (command == firewall_parameter_command_lock_e) { if (reserved.has_lock) { status = firewall_delete_chains(main); @@ -485,7 +485,7 @@ extern "C" { return status; } else { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[%sFailed to perform lock request because the lock instructions are missing from: %s.%]%c", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, network_path_s firewall_file_other_s, main->error.context, f_string_eol_s[0]); } @@ -496,7 +496,7 @@ extern "C" { } } - if (command == firewall_parameter_command_stop || command == firewall_parameter_command_restart) { + if (command == firewall_parameter_command_stop_e || command == firewall_parameter_command_restart_e) { if (reserved.has_stop) { status = firewall_delete_chains(main); @@ -522,7 +522,7 @@ extern "C" { status = firewall_process_rules(main, &input, &local); - if (F_status_is_error(status) || command == firewall_parameter_command_stop) { + if (F_status_is_error(status) || command == firewall_parameter_command_stop_e) { firewall_delete_local_data(&local); firewall_main_delete(main); @@ -530,7 +530,7 @@ extern "C" { } } else { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[%sFailed to perform stop request because the lock instructions are missing from: %s.%]%c", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, network_path_s firewall_file_other_s, main->error.context, f_string_eol_s[0]); } @@ -544,7 +544,7 @@ extern "C" { firewall_delete_local_data(&local); } - if (command == firewall_parameter_command_start || command == firewall_parameter_command_restart) { + if (command == firewall_parameter_command_start_e || command == firewall_parameter_command_restart_e) { status = firewall_buffer_rules(main, network_path_s firewall_file_first_s, F_false, &local); if (F_status_is_error(status)) { @@ -554,7 +554,7 @@ extern "C" { return status; } - if (command == firewall_parameter_command_start) { + if (command == firewall_parameter_command_start_e) { status = firewall_delete_chains(main); if (F_status_is_error_not(status)) { @@ -594,7 +594,7 @@ extern "C" { status = firewall_process_rules(main, &input, &local); - if (F_status_is_error(status) || command == firewall_parameter_command_stop) { + if (F_status_is_error(status) || command == firewall_parameter_command_stop_e) { firewall_delete_local_data(&local); firewall_main_delete(main); @@ -640,7 +640,7 @@ extern "C" { firewall_delete_local_data(&local); - if (status == F_file_found_not || status == F_file_open || status == F_file_descriptor || status == FL_fss_found_object_content_not) { + if (status == F_file_found_not || status == F_file_open || status == F_file_descriptor || status == F_fss_found_object_content_not) { status = F_status_set_error(status); continue; } @@ -675,7 +675,7 @@ extern "C" { status = firewall_process_rules(main, &input, &local); - if (F_status_is_error(status) || command == firewall_parameter_command_stop) { + if (F_status_is_error(status) || command == firewall_parameter_command_stop_e) { firewall_delete_local_data(&local); firewall_main_delete(main); @@ -722,7 +722,7 @@ extern "C" { status = firewall_process_rules(main, &input, &local); - if (F_status_is_error(status) || command == firewall_parameter_command_stop) { + if (F_status_is_error(status) || command == firewall_parameter_command_stop_e) { firewall_delete_local_data(&local); firewall_main_delete(main); @@ -737,14 +737,14 @@ extern "C" { firewall_delete_local_data(&local); } else { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[%sYou did not pass a command.%]%c", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context, f_string_eol_s[0]); } status = F_status_set_error(F_parameter); } - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { if (F_status_set_fine(status) == F_interrupt) { fflush(main->output.to.stream); diff --git a/level_3/firewall/c/firewall.h b/level_3/firewall/c/firewall.h index 0d6eaa4..78e9ad9 100644 --- a/level_3/firewall/c/firewall.h +++ b/level_3/firewall/c/firewall.h @@ -220,64 +220,64 @@ extern "C" { #define firewall_chain_delete_command_s_length 2 enum { - firewall_program_none = 1, - firewall_program_iptables, - firewall_program_ip6tables, - firewall_program_ip46tables, - firewall_program_ipset, + firewall_program_none_e = 1, + firewall_program_iptables_e, + firewall_program_ip6tables_e, + firewall_program_ip46tables_e, + firewall_program_ipset_e, }; enum { - firewall_parameter_help, - firewall_parameter_light, - firewall_parameter_dark, - firewall_parameter_no_color, - firewall_parameter_verbosity_quiet, - firewall_parameter_verbosity_normal, - firewall_parameter_verbosity_verbose, - firewall_parameter_verbosity_debug, - firewall_parameter_version, - - firewall_parameter_command_start, - firewall_parameter_command_stop, - firewall_parameter_command_restart, - firewall_parameter_command_lock, - firewall_parameter_command_show, - - firewall_direction_input_id, - firewall_direction_output_id, - firewall_direction_none_id, - - firewall_chain_forward_id, - firewall_chain_custom_id, - firewall_chain_input_id, - firewall_chain_none_id, - firewall_chain_output_id, - firewall_chain_postrouting_id, - firewall_chain_prerouting_id, - - firewall_action_append_id, - firewall_action_insert_id, - firewall_action_policy_id, - firewall_action_none_id, + firewall_parameter_help_e, + firewall_parameter_light_e, + firewall_parameter_dark_e, + firewall_parameter_no_color_e, + firewall_parameter_verbosity_quiet_e, + firewall_parameter_verbosity_normal_e, + firewall_parameter_verbosity_verbose_e, + firewall_parameter_verbosity_debug_e, + firewall_parameter_version_e, + + firewall_parameter_command_start_e, + firewall_parameter_command_stop_e, + firewall_parameter_command_restart_e, + firewall_parameter_command_lock_e, + firewall_parameter_command_show_e, + + firewall_direction_input_id_e, + firewall_direction_output_id_e, + firewall_direction_none_id_e, + + firewall_chain_forward_id_e, + firewall_chain_custom_id_e, + firewall_chain_input_id_e, + firewall_chain_none_id_e, + firewall_chain_output_id_e, + firewall_chain_postrouting_id_e, + firewall_chain_prerouting_id_e, + + firewall_action_append_id_e, + firewall_action_insert_id_e, + firewall_action_policy_id_e, + firewall_action_none_id_e, }; #define firewall_console_parameter_t_initialize \ { \ - 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(0, 0, firewall_command_start_s, F_false, f_console_type_other), \ - f_console_parameter_t_initialize(0, 0, firewall_command_stop_s, F_false, f_console_type_other), \ - f_console_parameter_t_initialize(0, 0, firewall_command_restart_s, F_false, f_console_type_other), \ - f_console_parameter_t_initialize(0, 0, firewall_command_lock_s, F_false, f_console_type_other), \ - f_console_parameter_t_initialize(0, 0, firewall_command_show_s, F_false, f_console_type_other), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse_e), \ + 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_e), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(0, 0, firewall_command_start_s, F_false, f_console_type_other_e), \ + f_console_parameter_t_initialize(0, 0, firewall_command_stop_s, F_false, f_console_type_other_e), \ + f_console_parameter_t_initialize(0, 0, firewall_command_restart_s, F_false, f_console_type_other_e), \ + f_console_parameter_t_initialize(0, 0, firewall_command_lock_s, F_false, f_console_type_other_e), \ + f_console_parameter_t_initialize(0, 0, firewall_command_show_s, F_false, f_console_type_other_e), \ } #define firewall_total_parameters_d 14 diff --git a/level_3/firewall/c/private-common.c b/level_3/firewall/c/private-common.c index ee858fd..47f2582 100644 --- a/level_3/firewall/c/private-common.c +++ b/level_3/firewall/c/private-common.c @@ -7,7 +7,7 @@ extern "C" { void firewall_print_debug_tool(const fl_print_t output, const f_string_t tool, const f_string_dynamics_t arguments) { - if (output.verbosity != f_console_verbosity_debug) return; + if (output.verbosity != f_console_verbosity_debug_e) return; flockfile(output.to.stream); @@ -24,28 +24,28 @@ void firewall_print_debug_tool(const fl_print_t output, const f_string_t tool, c void firewall_print_error_on_allocation_failure(const fl_print_t output) { - if (output.verbosity == f_console_verbosity_quiet) return; + if (output.verbosity == f_console_verbosity_quiet_e) return; fll_print_format("%c%[%sUnable to allocate memory.%]%c", output.to.stream, f_string_eol_s[0], output.context, output.prefix, output.context, f_string_eol_s[0]); } void firewall_print_error_on_invalid_parameter(const fl_print_t output, const f_string_t function) { - if (output.verbosity == f_console_verbosity_quiet) return; + if (output.verbosity == f_console_verbosity_quiet_e) return; fll_print_format("%c%[%sInvalid parameter when calling %S().%]%c", output.to.stream, f_string_eol_s[0], output.context, output.prefix, function, output.context, f_string_eol_s[0]); } void firewall_print_error_on_invalid_parameter_for_file(const fl_print_t output, const f_string_t function, const f_string_t filename) { - if (output.verbosity == f_console_verbosity_quiet) return; + if (output.verbosity == f_console_verbosity_quiet_e) return; fll_print_format("%c%[%sInvalid parameter when calling %S() for the file '%S'.%]%c", output.to.stream, f_string_eol_s[0], output.context, output.prefix, function, filename, output.context, f_string_eol_s[0]); } void firewall_print_error_on_operation(const fl_print_t output, const f_string_t tool, const f_string_dynamics_t arguments) { - if (output.verbosity == f_console_verbosity_quiet) return; + if (output.verbosity == f_console_verbosity_quiet_e) return; flockfile(output.to.stream); @@ -63,14 +63,14 @@ void firewall_print_error_on_operation(const fl_print_t output, const f_string_t void firewall_print_error_on_unhandled(const fl_print_t output, const f_string_t function, const f_status_t status) { - if (output.verbosity == f_console_verbosity_quiet) return; + if (output.verbosity == f_console_verbosity_quiet_e) return; fll_print_format("%c%[%sAn unhandled error (%ui) has occurred while calling %S().%]%c", output.to.stream, f_string_eol_s[0], output.context, output.prefix, status, function, output.context, f_string_eol_s[0]); } void firewall_print_error_on_unhandled_for_file(const fl_print_t output, const f_string_t function, const f_status_t status, const f_string_t filename) { - if (output.verbosity == f_console_verbosity_quiet) return; + if (output.verbosity == f_console_verbosity_quiet_e) return; fll_print_format("%c%[%sAn unhandled error (%ui) has occurred while calling %S() for the file '%S'.%]%c", output.to.stream, f_string_eol_s[0], output.context, output.prefix, status, function, filename, output.context, f_string_eol_s[0]); } @@ -78,7 +78,7 @@ void firewall_print_error_on_unhandled_for_file(const fl_print_t output, const f #ifndef _di_firewall_print_signal_received_ void firewall_print_signal_received(firewall_main_t * const main, const f_status_t signal) { - if (main->warning.verbosity != f_console_verbosity_verbose) return; + if (main->warning.verbosity != f_console_verbosity_verbose_e) return; // Must flush and reset color because the interrupt may have interrupted the middle of a print function. fflush(main->warning.to.stream); diff --git a/level_3/firewall/c/private-firewall.c b/level_3/firewall/c/private-firewall.c index 49f0a44..2708bb6 100644 --- a/level_3/firewall/c/private-firewall.c +++ b/level_3/firewall/c/private-firewall.c @@ -24,8 +24,8 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal bool device_all = F_false; bool ip_list_direction = F_false; // false = source, true = destination bool use_protocol = F_false; - uint8_t tool = firewall_program_ip46tables; - uint8_t chain = firewall_chain_none_id; + uint8_t tool = firewall_program_ip46tables_e; + uint8_t chain = firewall_chain_none_id_e; f_array_length_t repeat = 2; f_array_length_t r = 0; @@ -33,9 +33,9 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal f_string_t current_tool = firewall_tool_iptables_s; f_array_length_t current_tool_length = firewall_tool_iptables_s_length; - f_array_length_t direction = firewall_direction_none_id; + f_array_length_t direction = firewall_direction_none_id_e; f_string_dynamic_t device = f_string_dynamic_t_initialize; - f_array_length_t action = firewall_action_append_id; + f_array_length_t action = firewall_action_append_id_e; f_string_dynamic_t protocol = f_string_dynamic_t_initialize; if (local.is_global) { @@ -58,7 +58,7 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal // for custom chains, the chain command may not be specified. if (!(local.is_main || local.is_stop || local.is_lock)) { - chain = firewall_chain_custom_id; + chain = firewall_chain_custom_id_e; } for (uint16_t signal_check = 0; i < local.rule_objects.used; ++i) { @@ -87,7 +87,7 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal // process chain rule if (length >= firewall_chain_length_s && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_chain_s, length, firewall_chain_length_s) == F_equal_to) { - if (chain == firewall_chain_custom_id) { + if (chain == firewall_chain_custom_id_e) { // custom chains can only apply to themselves, so silently ignore chain commands specified within a custom chain. fll_print_format("%c%[%sAt line %ul, the chain option is meaningless inside of a custom chain.%]%c", main->warning.to.stream, f_string_eol_s[0], main->warning.context, main->warning.prefix, i, main->warning.context, f_string_eol_s[0]); @@ -100,22 +100,22 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal invalid = F_true; } else if (length >= firewall_chain_input_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_input_s, length, firewall_chain_input_s_length) == F_equal_to) { - chain = firewall_chain_input_id; + chain = firewall_chain_input_id_e; } else if (length >= firewall_chain_output_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_output_s, length, firewall_chain_output_s_length) == F_equal_to) { - chain = firewall_chain_output_id; + chain = firewall_chain_output_id_e; } else if (length >= firewall_chain_forward_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_forward_s, length, firewall_chain_forward_s_length) == F_equal_to) { - chain = firewall_chain_forward_id; + chain = firewall_chain_forward_id_e; } else if (length >= firewall_chain_postrouting_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_postrouting_s, length, firewall_chain_postrouting_s_length) == F_equal_to) { - chain = firewall_chain_postrouting_id; + chain = firewall_chain_postrouting_id_e; } else if (length >= firewall_chain_prerouting_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_prerouting_s, length, firewall_chain_prerouting_s_length) == F_equal_to) { - chain = firewall_chain_prerouting_id; + chain = firewall_chain_prerouting_id_e; } else if (length >= firewall_chain_none_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_none_s, length, firewall_chain_none_s_length) == F_equal_to) { - chain = firewall_chain_none_id; + chain = firewall_chain_none_id_e; } else { invalid = F_true; @@ -131,13 +131,13 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal invalid = F_true; } else if (length >= firewall_direction_input_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_direction_input_s, length, firewall_direction_input_s_length) == F_equal_to) { - direction = firewall_direction_input_id; + direction = firewall_direction_input_id_e; } else if (length >= firewall_direction_output_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_direction_output_s, length, firewall_direction_output_s_length) == F_equal_to) { - direction = firewall_direction_output_id; + direction = firewall_direction_output_id_e; } else if (length >= firewall_direction_none_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_direction_none_s, length, firewall_direction_none_s_length) == F_equal_to) { - direction = firewall_direction_none_id; + direction = firewall_direction_none_id_e; } else { // direction must be specified, and no custom directions are allowed. @@ -205,16 +205,16 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal invalid = F_true; } else if (length >= firewall_action_append_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_action_append_s, length, firewall_action_append_s_length) == F_equal_to) { - action = firewall_action_append_id; + action = firewall_action_append_id_e; } else if (length >= firewall_action_insert_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_action_insert_s, length, firewall_action_insert_s_length) == F_equal_to) { - action = firewall_action_insert_id; + action = firewall_action_insert_id_e; } else if (length >= firewall_action_policy_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_action_policy_s, length, firewall_action_policy_s_length) == F_equal_to) { - action = firewall_action_policy_id; + action = firewall_action_policy_id_e; } else if (length >= firewall_action_none_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_action_none_s, length, firewall_action_none_s_length) == F_equal_to) { - action = firewall_action_none_id; + action = firewall_action_none_id_e; } else { invalid = F_true; @@ -273,19 +273,19 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal } else { if (fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_tool_iptables_s, length, firewall_tool_iptables_s_length) == F_equal_to) { - tool = firewall_program_iptables; + tool = firewall_program_iptables_e; current_tool = firewall_tool_iptables_s; current_tool_length = firewall_tool_iptables_s_length; repeat = 1; } else if (fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_tool_ip6tables_s, length, firewall_tool_ip6tables_s_length) == F_equal_to) { - tool = firewall_program_ip6tables; + tool = firewall_program_ip6tables_e; current_tool = firewall_tool_ip6tables_s; current_tool_length = firewall_tool_ip6tables_s_length; repeat = 1; } else if (fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_tool_ip46tables_s, length, firewall_tool_ip46tables_s_length) == F_equal_to) { - tool = firewall_program_ip46tables; + tool = firewall_program_ip46tables_e; current_tool = firewall_tool_iptables_s; current_tool_length = firewall_tool_iptables_s_length; repeat = 2; @@ -344,7 +344,7 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal status = f_string_dynamics_increase(F_memory_default_allocation_small_d, &arguments); if (F_status_is_error(status)) break; - if (tool == firewall_program_ip46tables) { + if (tool == firewall_program_ip46tables_e) { if (r == 2) { current_tool = firewall_tool_iptables_s; current_tool_length = firewall_tool_iptables_s_length; @@ -360,8 +360,8 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal if (F_status_is_error(status)) break; // process the action when a non-none chain is specified. - if (chain != firewall_chain_none_id && action != firewall_action_none_id) { - if (action == firewall_action_append_id) { + if (chain != firewall_chain_none_id_e && action != firewall_action_none_id_e) { + if (action == firewall_action_append_id_e) { macro_f_string_dynamic_t_resize(status, argument, firewall_action_append_command_s_length); if (F_status_is_error(status)) break; @@ -369,7 +369,7 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal macro_firewall_concat_string(argument.string, firewall_action_append_command_s, firewall_action_append_command_s_length); argument.used = firewall_action_append_command_s_length; } - else if (action == firewall_action_insert_id) { + else if (action == firewall_action_insert_id_e) { macro_f_string_dynamic_t_resize(status, argument, firewall_action_insert_command_s_length); if (F_status_is_error(status)) break; @@ -377,7 +377,7 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal macro_firewall_concat_string(argument.string, firewall_action_insert_command_s, firewall_action_insert_command_s_length); argument.used = firewall_action_insert_command_s_length; } - else if (action == firewall_action_policy_id) { + else if (action == firewall_action_policy_id_e) { macro_f_string_dynamic_t_resize(status, argument, firewall_action_policy_command_s_length); if (F_status_is_error(status)) break; @@ -394,7 +394,7 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal } // process the chain, which is required by the action. - if (chain == firewall_chain_custom_id) { + if (chain == firewall_chain_custom_id_e) { if (main->chains.array[local.chain_ids.array[local.chain]].used > 0) { macro_f_string_dynamic_t_resize(status, argument, main->chains.array[local.chain_ids.array[local.chain]].used); @@ -404,7 +404,7 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal argument.used = main->chains.array[local.chain_ids.array[local.chain]].used; } } - else if (chain == firewall_chain_forward_id) { + else if (chain == firewall_chain_forward_id_e) { macro_f_string_dynamic_t_resize(status, argument, firewall_chain_forward_s_length); if (F_status_is_error(status)) break; @@ -412,7 +412,7 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal macro_firewall_concat_string(argument.string, firewall_chain_forward_s, firewall_chain_forward_s_length); argument.used = firewall_chain_forward_s_length; } - else if (chain == firewall_chain_postrouting_id) { + else if (chain == firewall_chain_postrouting_id_e) { macro_f_string_dynamic_t_resize(status, argument, firewall_chain_postrouting_s_length); if (F_status_is_error(status)) break; @@ -420,7 +420,7 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal macro_firewall_concat_string(argument.string, firewall_chain_postrouting_s, firewall_chain_postrouting_s_length); argument.used += firewall_chain_postrouting_s_length; } - else if (chain == firewall_chain_prerouting_id) { + else if (chain == firewall_chain_prerouting_id_e) { macro_f_string_dynamic_t_resize(status, argument, firewall_chain_prerouting_s_length); if (F_status_is_error(status)) break; @@ -428,7 +428,7 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal macro_firewall_concat_string(argument.string, firewall_chain_prerouting_s, firewall_chain_prerouting_s_length); argument.used = firewall_chain_prerouting_s_length; } - else if (chain == firewall_chain_input_id) { + else if (chain == firewall_chain_input_id_e) { macro_f_string_dynamic_t_resize(status, argument, firewall_chain_input_s_length); if (F_status_is_error(status)) break; @@ -436,7 +436,7 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal macro_firewall_concat_string(argument.string, firewall_chain_input_s, firewall_chain_input_s_length); argument.used = firewall_chain_input_s_length; } - else if (chain == firewall_chain_output_id) { + else if (chain == firewall_chain_output_id_e) { macro_f_string_dynamic_t_resize(status, argument, firewall_chain_output_s_length); if (F_status_is_error(status)) break; @@ -455,16 +455,16 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal } // add the device if and only if a non-none direction is specified. - if (device.used > 0 && (direction == firewall_direction_input_id || direction == firewall_direction_output_id)) { + if (device.used > 0 && (direction == firewall_direction_input_id_e || direction == firewall_direction_output_id_e)) { if (length < firewall_device_all_s_length || fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_device_all_s, length, firewall_device_all_s_length) == F_equal_to_not) { - if (direction == firewall_direction_input_id) { + if (direction == firewall_direction_input_id_e) { macro_f_string_dynamic_t_resize(status, argument, firewall_device_input_command_length_s); if (F_status_is_error(status)) break; macro_firewall_concat_string(argument.string, firewall_device_input_command_s, firewall_device_input_command_length_s); argument.used = firewall_device_input_command_length_s; } - else if (direction == firewall_direction_output_id) { + else if (direction == firewall_direction_output_id_e) { macro_f_string_dynamic_t_resize(status, argument, firewall_device_output_command_length_s); if (F_status_is_error(status)) break; @@ -609,26 +609,26 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal status = F_status_set_fine(status); if (status == F_parameter) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { firewall_print_error_on_invalid_parameter(main->error, "f_file_open"); } } else if (status == F_file_found_not) { // the file does not have to exist - if (main->error.verbosity != f_console_verbosity_verbose || main->error.verbosity == f_console_verbosity_debug) { + if (main->error.verbosity != f_console_verbosity_verbose_e || main->error.verbosity == f_console_verbosity_debug_e) { fll_print_format("%c%[%sCannot find the file '%Q'.%]%c", main->warning.to.stream, f_string_eol_s[0], main->warning.context, main->warning.prefix, file_path, main->warning.context, f_string_eol_s[0]); } status = F_none; } else if (status == F_file_open) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[%sUnable to open the file '%Q'.%]%c", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, file_path, main->error.context, f_string_eol_s[0]); } } else if (status == F_file_descriptor) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[%sFile descriptor error while trying to open the file '%Q'.%]%c", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, file_path, main->error.context, f_string_eol_s[0]); } } @@ -653,7 +653,7 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal if (F_status_is_error(status)) { status = F_status_set_fine(status); - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { if (status == F_parameter) { firewall_print_error_on_invalid_parameter(main->error, "f_file_read"); } @@ -877,7 +877,7 @@ f_status_t firewall_create_custom_chains(firewall_main_t * const main, firewall_ f_status_t status = F_none; - uint8_t tool = firewall_program_iptables; + uint8_t tool = firewall_program_iptables_e; bool new_chain = F_false; bool create_chain = F_false; int return_code = 0; @@ -1075,7 +1075,7 @@ f_status_t firewall_create_custom_chains(firewall_main_t * const main, firewall_ if (create_chain) { firewall_print_debug_tool(main->warning, firewall_tool_iptables_s, arguments); - tool = firewall_program_iptables; + tool = firewall_program_iptables_e; status = fll_execute_program((f_string_t) firewall_tool_iptables_s, arguments, 0, 0, (void *) &return_code); // immediately exit child process, @todo this may require additional memory deallocation and relating changes. @@ -1096,7 +1096,7 @@ f_status_t firewall_create_custom_chains(firewall_main_t * const main, firewall_ firewall_print_debug_tool(main->warning, firewall_tool_ip6tables_s, arguments); - tool = firewall_program_ip6tables; + tool = firewall_program_ip6tables_e; status = fll_execute_program((f_string_t) firewall_tool_ip6tables_s, arguments, 0, 0, (void *) &return_code); // immediately exit child process, @todo this may require additional memory deallocation and relating changes. @@ -1111,7 +1111,7 @@ f_status_t firewall_create_custom_chains(firewall_main_t * const main, firewall_ status = F_status_set_fine(status); if (status == F_failure) { - firewall_print_error_on_operation(main->error, tool == firewall_program_iptables ? firewall_tool_iptables_s : firewall_tool_ip6tables_s, arguments); + firewall_print_error_on_operation(main->error, tool == firewall_program_iptables_e ? firewall_tool_iptables_s : firewall_tool_ip6tables_s, arguments); } else if (status == F_parameter) { firewall_print_error_on_invalid_parameter(main->error, "fll_execute_program"); @@ -1311,7 +1311,7 @@ f_status_t firewall_buffer_rules(firewall_main_t * const main, const f_string_t if (F_status_is_error(status)) { status = F_status_set_fine(status); - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { if (optional) { if (status == F_parameter) { firewall_print_error_on_invalid_parameter(main->error, "f_file_open"); @@ -1348,7 +1348,7 @@ f_status_t firewall_buffer_rules(firewall_main_t * const main, const f_string_t if (F_status_is_error(status)) { status = F_status_set_fine(status); - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { if (status == F_parameter) { firewall_print_error_on_invalid_parameter(main->error, "f_file_read"); } @@ -1388,7 +1388,7 @@ f_status_t firewall_buffer_rules(firewall_main_t * const main, const f_string_t if (F_status_is_error(status)) { status = F_status_set_fine(status); - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { if (status == F_parameter) { firewall_print_error_on_invalid_parameter_for_file(main->error, "fll_fss_basic_list_read", filename); } diff --git a/level_3/firewall/data/build/dependencies b/level_3/firewall/data/build/dependencies index c5cb46b..e52d035 100644 --- a/level_3/firewall/data/build/dependencies +++ b/level_3/firewall/data/build/dependencies @@ -26,7 +26,6 @@ fl_conversion fl_environment fl_fss fl_print -fl_status fl_string fll_error fll_execute diff --git a/level_3/firewall/data/build/settings b/level_3/firewall/data/build/settings index 035cfaa..6311412 100644 --- a/level_3/firewall/data/build/settings +++ b/level_3/firewall/data/build/settings @@ -21,7 +21,7 @@ build_indexer ar build_indexer_arguments rcs build_language c build_libraries -lc -lcap -build_libraries-individual -lfll_error -lfll_execute -lfll_fss -lfll_print -lfll_program -lfl_console -lfl_control_group -lfl_conversion -lfl_environment -lfl_fss -lfl_print -lfl_status -lfl_string -lf_account -lf_capability -lf_color -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_execute -lf_file -lf_fss -lf_limit -lf_memory -lf_path -lf_pipe -lf_print -lf_signal -lf_string -lf_thread -lf_type_array -lf_utf +build_libraries-individual -lfll_error -lfll_execute -lfll_fss -lfll_print -lfll_program -lfl_console -lfl_control_group -lfl_conversion -lfl_environment -lfl_fss -lfl_print -lfl_string -lf_account -lf_capability -lf_color -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_execute -lf_file -lf_fss -lf_limit -lf_memory -lf_path -lf_pipe -lf_print -lf_signal -lf_status_string -lf_string -lf_thread -lf_type_array -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared 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 eee0d8f..b4c8f92 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 @@ -125,7 +125,7 @@ extern "C" { const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_basic_list_total_parameters_d); { - f_console_parameter_id_t ids[3] = { fss_basic_list_read_parameter_no_color, fss_basic_list_read_parameter_light, fss_basic_list_read_parameter_dark }; + f_console_parameter_id_t ids[3] = { fss_basic_list_read_parameter_no_color_e, fss_basic_list_read_parameter_light_e, fss_basic_list_read_parameter_dark_e }; const f_console_parameter_ids_t choices = { ids, 3 }; status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context); @@ -159,7 +159,7 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_basic_list_read_parameter_verbosity_quiet, fss_basic_list_read_parameter_verbosity_normal, fss_basic_list_read_parameter_verbosity_verbose, fss_basic_list_read_parameter_verbosity_debug }; + f_console_parameter_id_t ids[4] = { fss_basic_list_read_parameter_verbosity_quiet_e, fss_basic_list_read_parameter_verbosity_normal_e, fss_basic_list_read_parameter_verbosity_verbose_e, fss_basic_list_read_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); @@ -171,39 +171,39 @@ extern "C" { return status; } - if (choice == fss_basic_list_read_parameter_verbosity_quiet) { - main->output.verbosity = f_console_verbosity_quiet; - main->error.verbosity = f_console_verbosity_quiet; - main->warning.verbosity = f_console_verbosity_quiet; + if (choice == fss_basic_list_read_parameter_verbosity_quiet_e) { + main->output.verbosity = f_console_verbosity_quiet_e; + main->error.verbosity = f_console_verbosity_quiet_e; + main->warning.verbosity = f_console_verbosity_quiet_e; } - else if (choice == fss_basic_list_read_parameter_verbosity_normal) { - main->output.verbosity = f_console_verbosity_normal; - main->error.verbosity = f_console_verbosity_normal; - main->warning.verbosity = f_console_verbosity_normal; + else if (choice == fss_basic_list_read_parameter_verbosity_normal_e) { + main->output.verbosity = f_console_verbosity_normal_e; + main->error.verbosity = f_console_verbosity_normal_e; + main->warning.verbosity = f_console_verbosity_normal_e; } - else if (choice == fss_basic_list_read_parameter_verbosity_verbose) { - main->output.verbosity = f_console_verbosity_verbose; - main->error.verbosity = f_console_verbosity_verbose; - main->warning.verbosity = f_console_verbosity_verbose; + else if (choice == fss_basic_list_read_parameter_verbosity_verbose_e) { + main->output.verbosity = f_console_verbosity_verbose_e; + main->error.verbosity = f_console_verbosity_verbose_e; + main->warning.verbosity = f_console_verbosity_verbose_e; } - else if (choice == fss_basic_list_read_parameter_verbosity_debug) { - main->output.verbosity = f_console_verbosity_debug; - main->error.verbosity = f_console_verbosity_debug; - main->warning.verbosity = f_console_verbosity_debug; + else if (choice == fss_basic_list_read_parameter_verbosity_debug_e) { + main->output.verbosity = f_console_verbosity_debug_e; + main->error.verbosity = f_console_verbosity_debug_e; + main->warning.verbosity = f_console_verbosity_debug_e; } } status = F_none; } - if (main->parameters[fss_basic_list_read_parameter_help].result == f_console_result_found) { + if (main->parameters[fss_basic_list_read_parameter_help_e].result == f_console_result_found_e) { fss_basic_list_read_print_help(main->output.to, main->context); fss_basic_list_read_main_delete(main); return status; } - if (main->parameters[fss_basic_list_read_parameter_version].result == f_console_result_found) { + if (main->parameters[fss_basic_list_read_parameter_version_e].result == f_console_result_found_e) { fll_program_print_version(main->output.to, fss_basic_list_program_version_s); fss_basic_list_read_main_delete(main); @@ -221,12 +221,12 @@ extern "C" { if (main->remaining.used || main->process_pipe) { { const f_array_length_t parameter_code[] = { - fss_basic_list_read_parameter_at, - fss_basic_list_read_parameter_depth, - fss_basic_list_read_parameter_line, - fss_basic_list_read_parameter_select, - fss_basic_list_read_parameter_name, - fss_basic_list_read_parameter_delimit, + fss_basic_list_read_parameter_at_e, + fss_basic_list_read_parameter_depth_e, + fss_basic_list_read_parameter_line_e, + fss_basic_list_read_parameter_select_e, + fss_basic_list_read_parameter_name_e, + fss_basic_list_read_parameter_delimit_e, }; const f_string_t parameter_name[] = { @@ -253,7 +253,7 @@ extern "C" { for (f_array_length_t i = 0; i < 6; ++i) { - if (main->parameters[parameter_code[i]].result == f_console_result_found) { + if (main->parameters[parameter_code[i]].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -268,13 +268,13 @@ extern "C" { } // for } - if (F_status_is_error_not(status) && main->parameters[fss_basic_list_read_parameter_columns].result == f_console_result_found) { + if (F_status_is_error_not(status) && main->parameters[fss_basic_list_read_parameter_columns_e].result == f_console_result_found_e) { const f_array_length_t parameter_code[] = { - fss_basic_list_read_parameter_depth, - fss_basic_list_read_parameter_line, - fss_basic_list_read_parameter_pipe, - fss_basic_list_read_parameter_select, - fss_basic_list_read_parameter_total, + fss_basic_list_read_parameter_depth_e, + fss_basic_list_read_parameter_line_e, + fss_basic_list_read_parameter_pipe_e, + fss_basic_list_read_parameter_select_e, + fss_basic_list_read_parameter_total_e, }; const f_string_t parameter_name[] = { @@ -286,11 +286,11 @@ extern "C" { }; const uint8_t parameter_match[] = { - f_console_result_additional, - f_console_result_additional, - f_console_result_found, - f_console_result_additional, - f_console_result_found, + f_console_result_additional_e, + f_console_result_additional_e, + f_console_result_found_e, + f_console_result_additional_e, + f_console_result_found_e, }; for (f_array_length_t i = 0; i < 5; ++i) { @@ -312,8 +312,8 @@ extern "C" { } // for } - if (F_status_is_error_not(status) && main->parameters[fss_basic_list_read_parameter_pipe].result == f_console_result_found) { - if (main->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) { + if (F_status_is_error_not(status) && main->parameters[fss_basic_list_read_parameter_pipe_e].result == f_console_result_found_e) { + if (main->parameters[fss_basic_list_read_parameter_total_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -326,7 +326,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_basic_list_read_parameter_line].result == f_console_result_additional) { + else if (main->parameters[fss_basic_list_read_parameter_line_e].result == f_console_result_additional_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -341,7 +341,7 @@ extern "C" { } } - if (F_status_is_error_not(status) && main->parameters[fss_basic_list_read_parameter_delimit].result == f_console_result_additional) { + if (F_status_is_error_not(status) && main->parameters[fss_basic_list_read_parameter_delimit_e].result == f_console_result_additional_e) { f_array_length_t location = 0; f_array_length_t length = 0; uint16_t signal_check = 0; @@ -349,7 +349,7 @@ extern "C" { // Set the value to 0 to allow for detecting mode based on what is provided. data.delimit_mode = 0; - for (f_array_length_t i = 0; i < main->parameters[fss_basic_list_read_parameter_delimit].values.used; ++i) { + for (f_array_length_t i = 0; i < main->parameters[fss_basic_list_read_parameter_delimit_e].values.used; ++i) { if (!((++signal_check) % fss_basic_list_read_signal_check_d)) { if (fss_basic_list_read_signal_received(main)) { @@ -360,7 +360,7 @@ extern "C" { signal_check = 0; } - location = main->parameters[fss_basic_list_read_parameter_delimit].values.array[i]; + location = main->parameters[fss_basic_list_read_parameter_delimit_e].values.array[i]; length = strnlen(arguments->argv[location], f_console_parameter_size); if (!length) { @@ -376,34 +376,34 @@ extern "C" { break; } else if (fl_string_compare(arguments->argv[location], fss_basic_list_read_delimit_mode_name_none_s, length, fss_basic_list_read_delimit_mode_name_none_s_length) == F_equal_to) { - data.delimit_mode = fss_basic_list_read_delimit_mode_none; + data.delimit_mode = fss_basic_list_read_delimit_mode_none_e; } else if (fl_string_compare(arguments->argv[location], fss_basic_list_read_delimit_mode_name_all_s, length, fss_basic_list_read_delimit_mode_name_all_s_length) == F_equal_to) { - data.delimit_mode = fss_basic_list_read_delimit_mode_all; + data.delimit_mode = fss_basic_list_read_delimit_mode_all_e; } else if (fl_string_compare(arguments->argv[location], fss_basic_list_read_delimit_mode_name_object_s, length, fss_basic_list_read_delimit_mode_name_object_s_length) == F_equal_to) { switch (data.delimit_mode) { case 0: - data.delimit_mode = fss_basic_list_read_delimit_mode_object; + data.delimit_mode = fss_basic_list_read_delimit_mode_object_e; break; - case fss_basic_list_read_delimit_mode_none: - case fss_basic_list_read_delimit_mode_all: - case fss_basic_list_read_delimit_mode_content_greater_object: - case fss_basic_list_read_delimit_mode_content_lesser_object: - case fss_basic_list_read_delimit_mode_object: + case fss_basic_list_read_delimit_mode_none_e: + case fss_basic_list_read_delimit_mode_all_e: + case fss_basic_list_read_delimit_mode_content_greater_object_e: + case fss_basic_list_read_delimit_mode_content_lesser_object_e: + case fss_basic_list_read_delimit_mode_object_e: break; - case fss_basic_list_read_delimit_mode_content: - data.delimit_mode = fss_basic_list_read_delimit_mode_content_object; + case fss_basic_list_read_delimit_mode_content_e: + data.delimit_mode = fss_basic_list_read_delimit_mode_content_object_e; break; - case fss_basic_list_read_delimit_mode_content_greater: - data.delimit_mode = fss_basic_list_read_delimit_mode_content_greater_object; + case fss_basic_list_read_delimit_mode_content_greater_e: + data.delimit_mode = fss_basic_list_read_delimit_mode_content_greater_object_e; break; - case fss_basic_list_read_delimit_mode_content_lesser: - data.delimit_mode = fss_basic_list_read_delimit_mode_content_lesser_object; + case fss_basic_list_read_delimit_mode_content_lesser_e: + data.delimit_mode = fss_basic_list_read_delimit_mode_content_lesser_object_e; break; default: @@ -412,19 +412,19 @@ extern "C" { } else { if (!data.delimit_mode) { - data.delimit_mode = fss_basic_list_read_delimit_mode_content; + data.delimit_mode = fss_basic_list_read_delimit_mode_content_e; } - else if (data.delimit_mode == fss_basic_list_read_delimit_mode_object) { - data.delimit_mode = fss_basic_list_read_delimit_mode_content_object; + else if (data.delimit_mode == fss_basic_list_read_delimit_mode_object_e) { + data.delimit_mode = fss_basic_list_read_delimit_mode_content_object_e; } if (arguments->argv[location][length - 1] == fss_basic_list_read_delimit_mode_name_greater_s[0]) { - if (!(data.delimit_mode == fss_basic_list_read_delimit_mode_none || data.delimit_mode == fss_basic_list_read_delimit_mode_all)) { - if (data.delimit_mode == fss_basic_list_read_delimit_mode_content_object) { - data.delimit_mode = fss_basic_list_read_delimit_mode_content_greater_object; + if (!(data.delimit_mode == fss_basic_list_read_delimit_mode_none_e || data.delimit_mode == fss_basic_list_read_delimit_mode_all_e)) { + if (data.delimit_mode == fss_basic_list_read_delimit_mode_content_object_e) { + data.delimit_mode = fss_basic_list_read_delimit_mode_content_greater_object_e; } else { - data.delimit_mode = fss_basic_list_read_delimit_mode_content_greater; + data.delimit_mode = fss_basic_list_read_delimit_mode_content_greater_e; } } @@ -432,12 +432,12 @@ extern "C" { --length; } else if (arguments->argv[location][length - 1] == fss_basic_list_read_delimit_mode_name_lesser_s[0]) { - if (!(data.delimit_mode == fss_basic_list_read_delimit_mode_none || data.delimit_mode == fss_basic_list_read_delimit_mode_all)) { - if (data.delimit_mode == fss_basic_list_read_delimit_mode_content_object) { - data.delimit_mode = fss_basic_list_read_delimit_mode_content_lesser_object; + if (!(data.delimit_mode == fss_basic_list_read_delimit_mode_none_e || data.delimit_mode == fss_basic_list_read_delimit_mode_all_e)) { + if (data.delimit_mode == fss_basic_list_read_delimit_mode_content_object_e) { + data.delimit_mode = fss_basic_list_read_delimit_mode_content_lesser_object_e; } else { - data.delimit_mode = fss_basic_list_read_delimit_mode_content_lesser; + data.delimit_mode = fss_basic_list_read_delimit_mode_content_lesser_e; } } @@ -461,13 +461,13 @@ extern "C" { } // There can be nothing smaller than 0, so replace '0-' logic with just '0' logic. - if (data.delimit_mode == fss_basic_list_read_delimit_mode_content_lesser || data.delimit_mode == fss_basic_list_read_delimit_mode_content_lesser_object) { + if (data.delimit_mode == fss_basic_list_read_delimit_mode_content_lesser_e || data.delimit_mode == fss_basic_list_read_delimit_mode_content_lesser_object_e) { if (!data.delimit_depth) { - if (data.delimit_mode == fss_basic_list_read_delimit_mode_content_lesser) { - data.delimit_mode = fss_basic_list_read_delimit_mode_content; + if (data.delimit_mode == fss_basic_list_read_delimit_mode_content_lesser_e) { + data.delimit_mode = fss_basic_list_read_delimit_mode_content_e; } else { - data.delimit_mode = fss_basic_list_read_delimit_mode_content_object; + data.delimit_mode = fss_basic_list_read_delimit_mode_content_object_e; } } } @@ -476,7 +476,7 @@ extern "C" { // Guarantee the default value is "all". if (F_status_is_error_not(status) && !data.delimit_mode) { - data.delimit_mode = fss_basic_list_read_delimit_mode_all; + data.delimit_mode = fss_basic_list_read_delimit_mode_all_e; } } @@ -486,7 +486,7 @@ extern "C" { // This standard does not support nesting, so any depth greater than 0 can be predicted without processing the file. if (F_status_is_error_not(status) && data.depths.array[0].depth > 0) { - if (main->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) { + if (main->parameters[fss_basic_list_read_parameter_total_e].result == f_console_result_found_e) { fss_basic_list_read_print_zero(main); } @@ -496,7 +496,7 @@ extern "C" { return F_none; } - if (F_status_is_error_not(status) && main->parameters[fss_basic_list_read_parameter_select].result == f_console_result_found) { + if (F_status_is_error_not(status) && main->parameters[fss_basic_list_read_parameter_select_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -528,7 +528,7 @@ extern "C" { status = f_file_stream_read(file, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, "-", "read", fll_error_file_type_pipe); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, "-", "read", fll_error_file_type_pipe_e); } else if (data.buffer.used) { data.files.array[0].range.stop = data.buffer.used - 1; @@ -538,7 +538,7 @@ extern "C" { status = f_string_append_assure(f_string_eol_s, 1, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, "-", "read", fll_error_file_type_pipe); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, "-", "read", fll_error_file_type_pipe_e); } } else { @@ -569,7 +569,7 @@ extern "C" { status = f_file_stream_open(arguments->argv[main->remaining.array[i]], 0, &file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], "open", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], "open", fll_error_file_type_file_e); break; } @@ -578,7 +578,7 @@ extern "C" { status = f_file_size_by_id(file.id, &size_file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file_e); break; } @@ -587,7 +587,7 @@ extern "C" { status = f_string_dynamic_resize(data.buffer.size + size_file, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file_e); break; } @@ -595,7 +595,7 @@ extern "C" { status = f_file_stream_read(file, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file_e); break; } @@ -608,7 +608,7 @@ extern "C" { status = f_string_append_assure(f_string_eol_s, 1, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, "-", "read", fll_error_file_type_pipe); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, "-", "read", fll_error_file_type_pipe_e); } } } @@ -633,7 +633,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { if (F_status_set_fine(status) == F_interrupt) { fflush(main->output.to.stream); 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 b6085b0..37cc9ac 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 @@ -110,57 +110,57 @@ extern "C" { #define fss_basic_list_long_trim_s "trim" enum { - fss_basic_list_read_parameter_help, - fss_basic_list_read_parameter_light, - fss_basic_list_read_parameter_dark, - fss_basic_list_read_parameter_no_color, - fss_basic_list_read_parameter_verbosity_quiet, - fss_basic_list_read_parameter_verbosity_normal, - fss_basic_list_read_parameter_verbosity_verbose, - fss_basic_list_read_parameter_verbosity_debug, - fss_basic_list_read_parameter_version, - - fss_basic_list_read_parameter_at, - fss_basic_list_read_parameter_content, - fss_basic_list_read_parameter_columns, - fss_basic_list_read_parameter_delimit, - fss_basic_list_read_parameter_depth, - fss_basic_list_read_parameter_empty, - fss_basic_list_read_parameter_line, - fss_basic_list_read_parameter_name, - fss_basic_list_read_parameter_object, - fss_basic_list_read_parameter_pipe, - fss_basic_list_read_parameter_raw, - fss_basic_list_read_parameter_select, - fss_basic_list_read_parameter_total, - fss_basic_list_read_parameter_trim, + fss_basic_list_read_parameter_help_e, + fss_basic_list_read_parameter_light_e, + fss_basic_list_read_parameter_dark_e, + fss_basic_list_read_parameter_no_color_e, + fss_basic_list_read_parameter_verbosity_quiet_e, + fss_basic_list_read_parameter_verbosity_normal_e, + fss_basic_list_read_parameter_verbosity_verbose_e, + fss_basic_list_read_parameter_verbosity_debug_e, + fss_basic_list_read_parameter_version_e, + + fss_basic_list_read_parameter_at_e, + fss_basic_list_read_parameter_content_e, + fss_basic_list_read_parameter_columns_e, + fss_basic_list_read_parameter_delimit_e, + fss_basic_list_read_parameter_depth_e, + fss_basic_list_read_parameter_empty_e, + fss_basic_list_read_parameter_line_e, + fss_basic_list_read_parameter_name_e, + fss_basic_list_read_parameter_object_e, + fss_basic_list_read_parameter_pipe_e, + fss_basic_list_read_parameter_raw_e, + fss_basic_list_read_parameter_select_e, + fss_basic_list_read_parameter_total_e, + fss_basic_list_read_parameter_trim_e, }; #define fss_basic_list_read_console_parameter_t_initialize \ { \ - 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_short_at_s, fss_basic_list_long_at_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_short_content_s, fss_basic_list_long_content_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_short_columns_s, fss_basic_list_long_columns_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_short_delimit_s, fss_basic_list_long_delimit_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_short_depth_s, fss_basic_list_long_depth_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_short_empty_s, fss_basic_list_long_empty_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_short_line_s, fss_basic_list_long_line_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_short_name_s, fss_basic_list_long_name_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_short_object_s, fss_basic_list_long_object_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_short_pipe_s, fss_basic_list_long_pipe_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_short_raw_s, fss_basic_list_long_raw_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_short_select_s, fss_basic_list_long_select_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_short_total_s, fss_basic_list_long_total_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_short_trim_s, fss_basic_list_long_trim_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse_e), \ + 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_e), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(fss_basic_list_short_at_s, fss_basic_list_long_at_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_list_short_content_s, fss_basic_list_long_content_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_list_short_columns_s, fss_basic_list_long_columns_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_list_short_delimit_s, fss_basic_list_long_delimit_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_list_short_depth_s, fss_basic_list_long_depth_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_list_short_empty_s, fss_basic_list_long_empty_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_list_short_line_s, fss_basic_list_long_line_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_list_short_name_s, fss_basic_list_long_name_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_list_short_object_s, fss_basic_list_long_object_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_list_short_pipe_s, fss_basic_list_long_pipe_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_list_short_raw_s, fss_basic_list_long_raw_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_list_short_select_s, fss_basic_list_long_select_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_list_short_total_s, fss_basic_list_long_total_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_list_short_trim_s, fss_basic_list_long_trim_s, 0, 0, f_console_type_normal_e), \ } #define fss_basic_list_total_parameters_d 23 @@ -193,15 +193,15 @@ extern "C" { #define fss_basic_list_read_delimit_mode_name_lesser_s_length 1 enum { - fss_basic_list_read_delimit_mode_none = 1, - fss_basic_list_read_delimit_mode_all, - fss_basic_list_read_delimit_mode_content, - fss_basic_list_read_delimit_mode_content_greater, - fss_basic_list_read_delimit_mode_content_greater_object, - fss_basic_list_read_delimit_mode_content_lesser, - fss_basic_list_read_delimit_mode_content_lesser_object, - fss_basic_list_read_delimit_mode_content_object, - fss_basic_list_read_delimit_mode_object, + fss_basic_list_read_delimit_mode_none_e = 1, + fss_basic_list_read_delimit_mode_all_e, + fss_basic_list_read_delimit_mode_content_e, + fss_basic_list_read_delimit_mode_content_greater_e, + fss_basic_list_read_delimit_mode_content_greater_object_e, + fss_basic_list_read_delimit_mode_content_lesser_e, + fss_basic_list_read_delimit_mode_content_lesser_object_e, + fss_basic_list_read_delimit_mode_content_object_e, + fss_basic_list_read_delimit_mode_object_e, }; #endif // _di_fss_basic_list_read_delimit_modes_ diff --git a/level_3/fss_basic_list_read/c/private-common.c b/level_3/fss_basic_list_read/c/private-common.c index 14ddedd..3574e47 100644 --- a/level_3/fss_basic_list_read/c/private-common.c +++ b/level_3/fss_basic_list_read/c/private-common.c @@ -60,7 +60,7 @@ extern "C" { #ifndef _di_fss_basic_list_read_print_signal_received_ void fss_basic_list_read_print_signal_received(fss_basic_list_read_main_t * const main, const f_status_t signal) { - if (main->warning.verbosity != f_console_verbosity_verbose) return; + if (main->warning.verbosity != f_console_verbosity_verbose_e) return; // Must flush and reset color because the interrupt may have interrupted the middle of a print function. fflush(main->warning.to.stream); diff --git a/level_3/fss_basic_list_read/c/private-common.h b/level_3/fss_basic_list_read/c/private-common.h index 44a24ac..6513007 100644 --- a/level_3/fss_basic_list_read/c/private-common.h +++ b/level_3/fss_basic_list_read/c/private-common.h @@ -188,7 +188,7 @@ extern "C" { #define fss_basic_list_read_data_t_initialize \ { \ 0, \ - fss_basic_list_read_delimit_mode_all, \ + fss_basic_list_read_delimit_mode_all_e, \ 0, \ 0, \ 0, \ 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 be29ee8..c80f5a5 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 @@ -9,23 +9,23 @@ extern "C" { #ifndef _di_fss_basic_list_read_delimit_content_is_ f_status_t fss_basic_list_read_delimit_content_is(const f_array_length_t depth, fss_basic_list_read_data_t * const data) { - if (data->delimit_mode == fss_basic_list_read_delimit_mode_none) { + if (data->delimit_mode == fss_basic_list_read_delimit_mode_none_e) { return F_false; } - if (data->delimit_mode == fss_basic_list_read_delimit_mode_all) { + if (data->delimit_mode == fss_basic_list_read_delimit_mode_all_e) { return F_true; } if (depth < data->delimit_depth) { - return data->delimit_mode == fss_basic_list_read_delimit_mode_content_lesser; + return data->delimit_mode == fss_basic_list_read_delimit_mode_content_lesser_e; } if (depth == data->delimit_depth) { return F_true; } - return data->delimit_mode == fss_basic_list_read_delimit_mode_content_greater; + return data->delimit_mode == fss_basic_list_read_delimit_mode_content_greater_e; } #endif // _di_fss_basic_list_read_delimit_content_is_ @@ -33,24 +33,24 @@ extern "C" { f_status_t fss_basic_list_read_delimit_object_is(const f_array_length_t depth, fss_basic_list_read_data_t * const data) { switch (data->delimit_mode) { - case fss_basic_list_read_delimit_mode_none: - case fss_basic_list_read_delimit_mode_content: - case fss_basic_list_read_delimit_mode_content_greater: - case fss_basic_list_read_delimit_mode_content_lesser: + case fss_basic_list_read_delimit_mode_none_e: + case fss_basic_list_read_delimit_mode_content_e: + case fss_basic_list_read_delimit_mode_content_greater_e: + case fss_basic_list_read_delimit_mode_content_lesser_e: return F_false; - case fss_basic_list_read_delimit_mode_all: - case fss_basic_list_read_delimit_mode_content_object: - case fss_basic_list_read_delimit_mode_content_greater_object: - case fss_basic_list_read_delimit_mode_content_lesser_object: - case fss_basic_list_read_delimit_mode_object: + case fss_basic_list_read_delimit_mode_all_e: + case fss_basic_list_read_delimit_mode_content_object_e: + case fss_basic_list_read_delimit_mode_content_greater_object_e: + case fss_basic_list_read_delimit_mode_content_lesser_object_e: + case fss_basic_list_read_delimit_mode_object_e: return F_true; default: break; } - return depth == data->delimit_depth || data->delimit_mode == fss_basic_list_read_delimit_mode_content_lesser; + return depth == data->delimit_depth || data->delimit_mode == fss_basic_list_read_delimit_mode_content_lesser_e; } #endif // _di_fss_basic_list_read_delimit_object_is_ @@ -62,8 +62,8 @@ extern "C" { { f_array_length_t depth_size = 1; - if (main->parameters[fss_basic_list_read_parameter_depth].result == f_console_result_additional) { - depth_size = main->parameters[fss_basic_list_read_parameter_depth].values.used; + if (main->parameters[fss_basic_list_read_parameter_depth_e].result == f_console_result_additional_e) { + depth_size = main->parameters[fss_basic_list_read_parameter_depth_e].values.used; } if (depth_size > data->depths.size) { @@ -101,11 +101,11 @@ extern "C" { macro_f_string_dynamic_t_clear(data->depths.array[i].value_name); - if (!main->parameters[fss_basic_list_read_parameter_depth].values.used) { + if (!main->parameters[fss_basic_list_read_parameter_depth_e].values.used) { position_depth = 0; } else { - position_depth = main->parameters[fss_basic_list_read_parameter_depth].values.array[i]; + position_depth = main->parameters[fss_basic_list_read_parameter_depth_e].values.array[i]; const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[position_depth])); @@ -118,18 +118,18 @@ extern "C" { } } - if (main->parameters[fss_basic_list_read_parameter_at].result == f_console_result_additional) { - for (; position_at < main->parameters[fss_basic_list_read_parameter_at].values.used; ++position_at) { + if (main->parameters[fss_basic_list_read_parameter_at_e].result == f_console_result_additional_e) { + for (; position_at < main->parameters[fss_basic_list_read_parameter_at_e].values.used; ++position_at) { - if (main->parameters[fss_basic_list_read_parameter_at].values.array[position_at] < position_depth) { + if (main->parameters[fss_basic_list_read_parameter_at_e].values.array[position_at] < position_depth) { continue; } - if (i + 1 < data->depths.used && main->parameters[fss_basic_list_read_parameter_at].values.array[position_at] > main->parameters[fss_basic_list_read_parameter_depth].values.array[i + 1]) { + if (i + 1 < data->depths.used && main->parameters[fss_basic_list_read_parameter_at_e].values.array[position_at] > main->parameters[fss_basic_list_read_parameter_depth_e].values.array[i + 1]) { break; } - data->depths.array[i].index_at = main->parameters[fss_basic_list_read_parameter_at].values.array[position_at]; + data->depths.array[i].index_at = main->parameters[fss_basic_list_read_parameter_at_e].values.array[position_at]; const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[data->depths.array[i].index_at])); @@ -143,20 +143,20 @@ extern "C" { } // for } - if (main->parameters[fss_basic_list_read_parameter_name].result == f_console_result_additional) { - for (; position_name < main->parameters[fss_basic_list_read_parameter_name].values.used; ++position_name) { + if (main->parameters[fss_basic_list_read_parameter_name_e].result == f_console_result_additional_e) { + for (; position_name < main->parameters[fss_basic_list_read_parameter_name_e].values.used; ++position_name) { - if (main->parameters[fss_basic_list_read_parameter_name].values.array[position_name] < position_depth) { + if (main->parameters[fss_basic_list_read_parameter_name_e].values.array[position_name] < position_depth) { continue; } - if (i + 1 < data->depths.used && main->parameters[fss_basic_list_read_parameter_name].values.array[position_name] > main->parameters[fss_basic_list_read_parameter_depth].values.array[i + 1]) { + if (i + 1 < data->depths.used && main->parameters[fss_basic_list_read_parameter_name_e].values.array[position_name] > main->parameters[fss_basic_list_read_parameter_depth_e].values.array[i + 1]) { break; } - data->depths.array[i].index_name = main->parameters[fss_basic_list_read_parameter_name].values.array[position_name]; + data->depths.array[i].index_name = main->parameters[fss_basic_list_read_parameter_name_e].values.array[position_name]; - if (main->parameters[fss_basic_list_read_parameter_trim].result == f_console_result_found) { + if (main->parameters[fss_basic_list_read_parameter_trim_e].result == f_console_result_found_e) { status = fl_string_rip(arguments->argv[data->depths.array[i].index_name], strlen(arguments->argv[data->depths.array[i].index_name]), &data->depths.array[i].value_name); } else { @@ -164,7 +164,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), main->parameters[fss_basic_list_read_parameter_trim].result == f_console_result_found ? "fl_string_rip" : "f_string_append", F_true); + fll_error_print(main->error, F_status_set_fine(status), main->parameters[fss_basic_list_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_rip" : "f_string_append", F_true); return status; } @@ -185,7 +185,7 @@ extern "C" { } if (data->depths.array[i].depth == data->depths.array[j].depth) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -200,7 +200,7 @@ extern "C" { return F_status_set_error(F_parameter); } else if (data->depths.array[i].depth > data->depths.array[j].depth) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -251,7 +251,7 @@ extern "C" { if (F_status_is_error(status)) { const f_string_t file_name = fss_basic_list_read_file_identify(input.start, data->files); - fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_basic_list_read", F_true, file_name ? file_name : "-", "process", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_basic_list_read", F_true, file_name ? file_name : "-", "process", fll_error_file_type_file_e); return status; } @@ -276,7 +276,7 @@ extern "C" { #ifndef _di_fss_basic_list_read_load_number_ f_status_t fss_basic_list_read_load_number(fss_basic_list_read_main_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) { - if (main->parameters[parameter].result == f_console_result_additional) { + if (main->parameters[parameter].result == f_console_result_additional_e) { const f_array_length_t index = main->parameters[parameter].values.array[main->parameters[parameter].values.used - 1]; const f_string_range_t range = macro_f_string_range_t_initialize(strnlen(arguments->argv[index], f_console_parameter_size)); @@ -354,7 +354,7 @@ extern "C" { #ifndef _di_fss_basic_list_read_print_content_ignore_ void fss_basic_list_read_print_content_ignore(fss_basic_list_read_main_t * const main) { - if (main->parameters[fss_basic_list_read_parameter_pipe].result == f_console_result_found) { + if (main->parameters[fss_basic_list_read_parameter_pipe_e].result == f_console_result_found_e) { f_print_character(fss_basic_list_pipe_content_ignore_s, main->output.to.stream); } } @@ -363,11 +363,11 @@ extern "C" { #ifndef _di_fss_basic_list_read_print_object_end_ void fss_basic_list_read_print_object_end(fss_basic_list_read_main_t * const main) { - if (main->parameters[fss_basic_list_read_parameter_pipe].result == f_console_result_found) { + if (main->parameters[fss_basic_list_read_parameter_pipe_e].result == f_console_result_found_e) { f_print_character(fss_basic_list_pipe_content_start_s, main->output.to.stream); } else { - if (main->parameters[fss_basic_list_read_parameter_content].result == f_console_result_found) { + if (main->parameters[fss_basic_list_read_parameter_content_e].result == f_console_result_found_e) { f_print_character(f_fss_basic_list_open_s[0], main->output.to.stream); f_print_character(f_fss_basic_list_open_end_s[0], main->output.to.stream); } @@ -381,7 +381,7 @@ extern "C" { #ifndef _di_fss_basic_list_read_print_set_end_ void fss_basic_list_read_print_set_end(fss_basic_list_read_main_t * const main) { - if (main->parameters[fss_basic_list_read_parameter_pipe].result == f_console_result_found) { + if (main->parameters[fss_basic_list_read_parameter_pipe_e].result == f_console_result_found_e) { f_print_character(fss_basic_list_pipe_content_end_s, main->output.to.stream); } } @@ -409,7 +409,7 @@ extern "C" { // This standard does not support multiple content groups. if ((data->option & fss_basic_list_read_data_option_select_d) && data->select) { - if (main->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) { + if (main->parameters[fss_basic_list_read_parameter_total_e].result == f_console_result_found_e) { flockfile(main->output.to.stream); fss_basic_list_read_print_zero(main); @@ -767,53 +767,53 @@ extern "C" { f_status_t status = F_none; - if (main->parameters[fss_basic_list_read_parameter_at].result == f_console_result_additional) { + if (main->parameters[fss_basic_list_read_parameter_at_e].result == f_console_result_additional_e) { data->option |= fss_basic_list_read_data_option_at_d; } - if (main->parameters[fss_basic_list_read_parameter_columns].result == f_console_result_found) { + if (main->parameters[fss_basic_list_read_parameter_columns_e].result == f_console_result_found_e) { data->option |= fss_basic_list_read_data_option_columns_d; } - if (main->parameters[fss_basic_list_read_parameter_content].result == f_console_result_found) { + if (main->parameters[fss_basic_list_read_parameter_content_e].result == f_console_result_found_e) { data->option |= fss_basic_list_read_data_option_content_d; } - if (main->parameters[fss_basic_list_read_parameter_empty].result == f_console_result_found) { + if (main->parameters[fss_basic_list_read_parameter_empty_e].result == f_console_result_found_e) { data->option |= fss_basic_list_read_data_option_empty_d; } - if (main->parameters[fss_basic_list_read_parameter_line].result == f_console_result_additional) { + if (main->parameters[fss_basic_list_read_parameter_line_e].result == f_console_result_additional_e) { data->option |= fss_basic_list_read_data_option_line_d; - status = fss_basic_list_read_load_number(main, fss_basic_list_read_parameter_line, fss_basic_list_long_line_s, arguments, &data->line); + status = fss_basic_list_read_load_number(main, fss_basic_list_read_parameter_line_e, fss_basic_list_long_line_s, arguments, &data->line); if (F_status_is_error(status)) return status; } - if (main->parameters[fss_basic_list_read_parameter_name].result == f_console_result_additional) { + if (main->parameters[fss_basic_list_read_parameter_name_e].result == f_console_result_additional_e) { data->option |= fss_basic_list_read_data_option_name_d; } - if (main->parameters[fss_basic_list_read_parameter_object].result == f_console_result_found) { + if (main->parameters[fss_basic_list_read_parameter_object_e].result == f_console_result_found_e) { data->option |= fss_basic_list_read_data_option_object_d; } - if (main->parameters[fss_basic_list_read_parameter_raw].result == f_console_result_found) { + if (main->parameters[fss_basic_list_read_parameter_raw_e].result == f_console_result_found_e) { data->option |= fss_basic_list_read_data_option_raw_d; } - if (main->parameters[fss_basic_list_read_parameter_select].result == f_console_result_additional) { + if (main->parameters[fss_basic_list_read_parameter_select_e].result == f_console_result_additional_e) { data->option |= fss_basic_list_read_data_option_select_d; - status = fss_basic_list_read_load_number(main, fss_basic_list_read_parameter_select, fss_basic_list_long_select_s, arguments, &data->select); + status = fss_basic_list_read_load_number(main, fss_basic_list_read_parameter_select_e, fss_basic_list_long_select_s, arguments, &data->select); if (F_status_is_error(status)) return status; } - if (main->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) { + if (main->parameters[fss_basic_list_read_parameter_total_e].result == f_console_result_found_e) { data->option |= fss_basic_list_read_data_option_total_d; } - if (main->parameters[fss_basic_list_read_parameter_trim].result == f_console_result_found) { + if (main->parameters[fss_basic_list_read_parameter_trim_e].result == f_console_result_found_e) { data->option |= fss_basic_list_read_data_option_trim_d; } diff --git a/level_3/fss_basic_list_read/data/build/dependencies b/level_3/fss_basic_list_read/data/build/dependencies index 25e27eb..b944420 100644 --- a/level_3/fss_basic_list_read/data/build/dependencies +++ b/level_3/fss_basic_list_read/data/build/dependencies @@ -19,7 +19,6 @@ fl_console fl_conversion fl_fss fl_print -fl_status fl_string fll_error fll_file diff --git a/level_3/fss_basic_list_read/data/build/settings b/level_3/fss_basic_list_read/data/build/settings index abd671d..db88413 100644 --- a/level_3/fss_basic_list_read/data/build/settings +++ b/level_3/fss_basic_list_read/data/build/settings @@ -21,7 +21,7 @@ build_indexer ar build_indexer_arguments rcs build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -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_signal -lf_string -lf_type_array -lf_utf +build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -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_signal -lf_status_string -lf_string -lf_type_array -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared 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 41f1a24..429d37c 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 @@ -65,7 +65,7 @@ extern "C" { const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_basic_list_write_total_parameters_d); { - f_console_parameter_id_t ids[3] = { fss_basic_list_write_parameter_no_color, fss_basic_list_write_parameter_light, fss_basic_list_write_parameter_dark }; + f_console_parameter_id_t ids[3] = { fss_basic_list_write_parameter_no_color_e, fss_basic_list_write_parameter_light_e, fss_basic_list_write_parameter_dark_e }; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3); status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context); @@ -98,7 +98,7 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_basic_list_write_parameter_verbosity_quiet, fss_basic_list_write_parameter_verbosity_normal, fss_basic_list_write_parameter_verbosity_verbose, fss_basic_list_write_parameter_verbosity_debug }; + f_console_parameter_id_t ids[4] = { fss_basic_list_write_parameter_verbosity_quiet_e, fss_basic_list_write_parameter_verbosity_normal_e, fss_basic_list_write_parameter_verbosity_verbose_e, fss_basic_list_write_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); @@ -109,39 +109,39 @@ extern "C" { return status; } - if (choice == fss_basic_list_write_parameter_verbosity_quiet) { - main->output.verbosity = f_console_verbosity_quiet; - main->error.verbosity = f_console_verbosity_quiet; - main->warning.verbosity = f_console_verbosity_quiet; + if (choice == fss_basic_list_write_parameter_verbosity_quiet_e) { + main->output.verbosity = f_console_verbosity_quiet_e; + main->error.verbosity = f_console_verbosity_quiet_e; + main->warning.verbosity = f_console_verbosity_quiet_e; } - else if (choice == fss_basic_list_write_parameter_verbosity_normal) { - main->output.verbosity = f_console_verbosity_normal; - main->error.verbosity = f_console_verbosity_normal; - main->warning.verbosity = f_console_verbosity_normal; + else if (choice == fss_basic_list_write_parameter_verbosity_normal_e) { + main->output.verbosity = f_console_verbosity_normal_e; + main->error.verbosity = f_console_verbosity_normal_e; + main->warning.verbosity = f_console_verbosity_normal_e; } - else if (choice == fss_basic_list_write_parameter_verbosity_verbose) { - main->output.verbosity = f_console_verbosity_verbose; - main->error.verbosity = f_console_verbosity_verbose; - main->warning.verbosity = f_console_verbosity_verbose; + else if (choice == fss_basic_list_write_parameter_verbosity_verbose_e) { + main->output.verbosity = f_console_verbosity_verbose_e; + main->error.verbosity = f_console_verbosity_verbose_e; + main->warning.verbosity = f_console_verbosity_verbose_e; } - else if (choice == fss_basic_list_write_parameter_verbosity_debug) { - main->output.verbosity = f_console_verbosity_debug; - main->error.verbosity = f_console_verbosity_debug; - main->warning.verbosity = f_console_verbosity_debug; + else if (choice == fss_basic_list_write_parameter_verbosity_debug_e) { + main->output.verbosity = f_console_verbosity_debug_e; + main->error.verbosity = f_console_verbosity_debug_e; + main->warning.verbosity = f_console_verbosity_debug_e; } } status = F_none; } - if (main->parameters[fss_basic_list_write_parameter_help].result == f_console_result_found) { + if (main->parameters[fss_basic_list_write_parameter_help_e].result == f_console_result_found_e) { fss_basic_list_write_print_help(main->output.to, main->context); fss_basic_list_write_main_delete(main); return status; } - if (main->parameters[fss_basic_list_write_parameter_version].result == f_console_result_found) { + if (main->parameters[fss_basic_list_write_parameter_version_e].result == f_console_result_found_e) { fll_program_print_version(main->output.to, fss_basic_list_write_program_version_s); fss_basic_list_write_main_delete(main); @@ -157,9 +157,9 @@ extern "C" { output.size_write = main->output.to.size_write; if (F_status_is_error_not(status)) { - if (main->parameters[fss_basic_list_write_parameter_file].result == f_console_result_additional) { - if (main->parameters[fss_basic_list_write_parameter_file].values.used > 1) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[fss_basic_list_write_parameter_file_e].result == f_console_result_additional_e) { + if (main->parameters[fss_basic_list_write_parameter_file_e].values.used > 1) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -172,41 +172,41 @@ extern "C" { status = F_status_set_error(F_parameter); } else { - const f_array_length_t location = main->parameters[fss_basic_list_write_parameter_file].values.array[0]; + const f_array_length_t location = main->parameters[fss_basic_list_write_parameter_file_e].values.array[0]; output.id = -1; output.stream = 0; status = f_file_stream_open(arguments->argv[location], 0, &output); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], "open", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], "open", fll_error_file_type_file_e); } } } - else if (main->parameters[fss_basic_list_write_parameter_file].result == f_console_result_found) { + else if (main->parameters[fss_basic_list_write_parameter_file_e].result == f_console_result_found_e) { fss_basic_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_basic_list_write_long_file_s); status = F_status_set_error(F_parameter); } } if (F_status_is_error_not(status)) { - if (main->parameters[fss_basic_list_write_parameter_object].locations.used || main->parameters[fss_basic_list_write_parameter_content].locations.used) { - if (main->parameters[fss_basic_list_write_parameter_object].locations.used) { - if (main->parameters[fss_basic_list_write_parameter_object].locations.used != main->parameters[fss_basic_list_write_parameter_object].values.used) { + if (main->parameters[fss_basic_list_write_parameter_object_e].locations.used || main->parameters[fss_basic_list_write_parameter_content_e].locations.used) { + if (main->parameters[fss_basic_list_write_parameter_object_e].locations.used) { + if (main->parameters[fss_basic_list_write_parameter_object_e].locations.used != main->parameters[fss_basic_list_write_parameter_object_e].values.used) { fss_basic_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_basic_list_write_long_object_s); status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_basic_list_write_parameter_content].locations.used != main->parameters[fss_basic_list_write_parameter_content].values.used) { + else if (main->parameters[fss_basic_list_write_parameter_content_e].locations.used != main->parameters[fss_basic_list_write_parameter_content_e].values.used) { fss_basic_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_basic_list_write_long_content_s); status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_basic_list_write_parameter_object].locations.used != main->parameters[fss_basic_list_write_parameter_content].locations.used && main->parameters[fss_basic_list_write_parameter_partial].result == f_console_result_none) { + else if (main->parameters[fss_basic_list_write_parameter_object_e].locations.used != main->parameters[fss_basic_list_write_parameter_content_e].locations.used && main->parameters[fss_basic_list_write_parameter_partial_e].result == f_console_result_none_e) { fss_basic_list_write_error_parameter_same_times_print(main); status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_basic_list_write_parameter_content].locations.used && main->parameters[fss_basic_list_write_parameter_partial].locations.used) { - if (main->parameters[fss_basic_list_write_parameter_content].result == f_console_result_additional) { - if (main->error.verbosity != f_console_verbosity_quiet) { + else if (main->parameters[fss_basic_list_write_parameter_content_e].locations.used && main->parameters[fss_basic_list_write_parameter_partial_e].locations.used) { + if (main->parameters[fss_basic_list_write_parameter_content_e].result == f_console_result_additional_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -225,20 +225,20 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[fss_basic_list_write_parameter_content].result == f_console_result_additional) { + if (main->parameters[fss_basic_list_write_parameter_content_e].result == f_console_result_additional_e) { f_array_length_t location_object = 0; f_array_length_t location_content = 0; f_array_length_t location_sub_object = 0; f_array_length_t location_sub_content = 0; - for (f_array_length_t i = 0; i < main->parameters[fss_basic_list_write_parameter_object].locations.used; ++i) { - location_object = main->parameters[fss_basic_list_write_parameter_object].locations.array[i]; - location_content = main->parameters[fss_basic_list_write_parameter_content].locations.array[i]; - location_sub_object = main->parameters[fss_basic_list_write_parameter_object].locations_sub.array[i]; - location_sub_content = main->parameters[fss_basic_list_write_parameter_content].locations_sub.array[i]; + for (f_array_length_t i = 0; i < main->parameters[fss_basic_list_write_parameter_object_e].locations.used; ++i) { + location_object = main->parameters[fss_basic_list_write_parameter_object_e].locations.array[i]; + location_content = main->parameters[fss_basic_list_write_parameter_content_e].locations.array[i]; + location_sub_object = main->parameters[fss_basic_list_write_parameter_object_e].locations_sub.array[i]; + location_sub_content = main->parameters[fss_basic_list_write_parameter_content_e].locations_sub.array[i]; if (location_object > location_content || location_object == location_content && location_sub_object > location_sub_content) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sEach '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -257,19 +257,19 @@ extern "C" { } } } - else if (main->parameters[fss_basic_list_write_parameter_content].locations.used) { - if (main->parameters[fss_basic_list_write_parameter_content].locations.used != main->parameters[fss_basic_list_write_parameter_content].values.used) { + else if (main->parameters[fss_basic_list_write_parameter_content_e].locations.used) { + if (main->parameters[fss_basic_list_write_parameter_content_e].locations.used != main->parameters[fss_basic_list_write_parameter_content_e].values.used) { fss_basic_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_basic_list_write_long_content_s); status = F_status_set_error(F_parameter); } - else if (!main->parameters[fss_basic_list_write_parameter_partial].locations.used) { + else if (!main->parameters[fss_basic_list_write_parameter_partial_e].locations.used) { fss_basic_list_write_error_parameter_same_times_print(main); status = F_status_set_error(F_parameter); } } } else if (!main->process_pipe) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThis requires either piped data or the use of the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -285,8 +285,8 @@ extern "C" { } if (F_status_is_error_not(status) && main->process_pipe) { - if (main->parameters[fss_basic_list_write_parameter_partial].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[fss_basic_list_write_parameter_partial_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThis '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -302,8 +302,8 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[fss_basic_list_write_parameter_prepend].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[fss_basic_list_write_parameter_prepend_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -315,8 +315,8 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_basic_list_write_parameter_prepend].result == f_console_result_additional) { - const f_array_length_t index = main->parameters[fss_basic_list_write_parameter_prepend].values.array[main->parameters[fss_basic_list_write_parameter_prepend].values.used - 1]; + else if (main->parameters[fss_basic_list_write_parameter_prepend_e].result == f_console_result_additional_e) { + const f_array_length_t index = main->parameters[fss_basic_list_write_parameter_prepend_e].values.array[main->parameters[fss_basic_list_write_parameter_prepend_e].values.used - 1]; const f_array_length_t length = strnlen(arguments->argv[index], f_console_parameter_size); if (length) { @@ -332,7 +332,7 @@ extern "C" { if (F_status_is_error(status)) break; if (status == F_false) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -348,7 +348,7 @@ extern "C" { } // for } else { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -364,8 +364,8 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[fss_basic_list_write_parameter_ignore].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[fss_basic_list_write_parameter_ignore_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -377,9 +377,9 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_basic_list_write_parameter_ignore].result == f_console_result_additional) { - const f_array_length_t total_locations = main->parameters[fss_basic_list_write_parameter_ignore].locations.used; - const f_array_length_t total_arguments = main->parameters[fss_basic_list_write_parameter_ignore].values.used; + else if (main->parameters[fss_basic_list_write_parameter_ignore_e].result == f_console_result_additional_e) { + const f_array_length_t total_locations = main->parameters[fss_basic_list_write_parameter_ignore_e].locations.used; + const f_array_length_t total_arguments = main->parameters[fss_basic_list_write_parameter_ignore_e].values.used; if (total_locations * 2 > total_arguments) { flockfile(main->error.to.stream); @@ -398,14 +398,14 @@ extern "C" { f_fss_quote_t quote = F_fss_delimit_quote_double_s; if (F_status_is_error_not(status)) { - if (main->parameters[fss_basic_list_write_parameter_double].result == f_console_result_found) { - if (main->parameters[fss_basic_list_write_parameter_single].result == f_console_result_found) { - if (main->parameters[fss_basic_list_write_parameter_double].location < main->parameters[fss_basic_list_write_parameter_single].location) { + if (main->parameters[fss_basic_list_write_parameter_double_e].result == f_console_result_found_e) { + if (main->parameters[fss_basic_list_write_parameter_single_e].result == f_console_result_found_e) { + if (main->parameters[fss_basic_list_write_parameter_double_e].location < main->parameters[fss_basic_list_write_parameter_single_e].location) { quote = F_fss_delimit_quote_single_s; } } } - else if (main->parameters[fss_basic_list_write_parameter_single].result == f_console_result_found) { + else if (main->parameters[fss_basic_list_write_parameter_single_e].result == f_console_result_found_e) { quote = F_fss_delimit_quote_single_s; } } @@ -421,7 +421,7 @@ extern "C" { status = fss_basic_list_write_process_pipe(main, output, quote, &buffer); if (F_status_is_error(status)) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sWhile processing the '%]%[input pipe%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context, main->error.notable, main->error.notable); @@ -433,17 +433,17 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[fss_basic_list_write_parameter_partial].result == f_console_result_found) { + if (main->parameters[fss_basic_list_write_parameter_partial_e].result == f_console_result_found_e) { - if (main->parameters[fss_basic_list_write_parameter_object].result == f_console_result_additional) { - for (f_array_length_t i = 0; i < main->parameters[fss_basic_list_write_parameter_object].values.used; ++i) { + if (main->parameters[fss_basic_list_write_parameter_object_e].result == f_console_result_additional_e) { + for (f_array_length_t i = 0; i < main->parameters[fss_basic_list_write_parameter_object_e].values.used; ++i) { if (fss_basic_list_write_signal_received(main)) { status = F_status_set_error(F_interrupt); break; } - object.string = arguments->argv[main->parameters[fss_basic_list_write_parameter_object].values.array[i]]; + object.string = arguments->argv[main->parameters[fss_basic_list_write_parameter_object_e].values.array[i]]; object.used = strnlen(object.string, f_console_parameter_size); object.size = object.used; @@ -452,14 +452,14 @@ extern "C" { } // for } else { - for (f_array_length_t i = 0; i < main->parameters[fss_basic_list_write_parameter_content].values.used; ++i) { + for (f_array_length_t i = 0; i < main->parameters[fss_basic_list_write_parameter_content_e].values.used; ++i) { if (fss_basic_list_write_signal_received(main)) { status = F_status_set_error(F_interrupt); break; } - content.string = arguments->argv[main->parameters[fss_basic_list_write_parameter_content].values.array[i]]; + content.string = arguments->argv[main->parameters[fss_basic_list_write_parameter_content_e].values.array[i]]; content.used = strnlen(content.string, f_console_parameter_size); content.size = content.used; @@ -469,18 +469,18 @@ extern "C" { } } else { - for (f_array_length_t i = 0; i < main->parameters[fss_basic_list_write_parameter_object].values.used; ++i) { + for (f_array_length_t i = 0; i < main->parameters[fss_basic_list_write_parameter_object_e].values.used; ++i) { if (fss_basic_list_write_signal_received(main)) { status = F_status_set_error(F_interrupt); break; } - object.string = arguments->argv[main->parameters[fss_basic_list_write_parameter_object].values.array[i]]; + object.string = arguments->argv[main->parameters[fss_basic_list_write_parameter_object_e].values.array[i]]; object.used = strnlen(object.string, f_console_parameter_size); object.size = object.used; - content.string = arguments->argv[main->parameters[fss_basic_list_write_parameter_content].values.array[i]]; + content.string = arguments->argv[main->parameters[fss_basic_list_write_parameter_content_e].values.array[i]]; content.used = strnlen(content.string, f_console_parameter_size); content.size = content.used; @@ -490,7 +490,7 @@ extern "C" { } if (F_status_is_error(status)) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sWhile processing the '%]%[input arguments%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context, main->error.notable, main->error.notable); @@ -499,7 +499,7 @@ extern "C" { funlockfile(main->error.to.stream); } } - else if (main->error.verbosity != f_console_verbosity_quiet && main->parameters[fss_basic_list_write_parameter_file].result == f_console_result_none) { + else if (main->error.verbosity != f_console_verbosity_quiet_e && main->parameters[fss_basic_list_write_parameter_file_e].result == f_console_result_none_e) { // ensure there is always a newline at the end, unless in quiet mode. fll_print_character(f_string_eol_s[0], main->error.to.stream); @@ -518,14 +518,14 @@ extern "C" { content.size = 0; } - if (main->parameters[fss_basic_list_write_parameter_file].result == f_console_result_additional) { + if (main->parameters[fss_basic_list_write_parameter_file_e].result == f_console_result_additional_e) { if (output.id != -1) { f_file_stream_close(F_true, &output); } } // ensure a newline is always put at the end of the program execution, unless in quiet mode. - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { if (F_status_is_error(status)) { fll_print_character(f_string_eol_s[0], main->error.to.stream); } 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 bde9c24..04a33ba 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 @@ -32,12 +32,10 @@ #include #include #include -#include #include // fll-2 includes #include -#include #include #include @@ -94,47 +92,47 @@ extern "C" { #define fss_basic_list_write_long_trim_s "trim" enum { - fss_basic_list_write_parameter_help, - fss_basic_list_write_parameter_light, - fss_basic_list_write_parameter_dark, - fss_basic_list_write_parameter_no_color, - fss_basic_list_write_parameter_verbosity_quiet, - fss_basic_list_write_parameter_verbosity_normal, - fss_basic_list_write_parameter_verbosity_verbose, - fss_basic_list_write_parameter_verbosity_debug, - fss_basic_list_write_parameter_version, - - fss_basic_list_write_parameter_file, - fss_basic_list_write_parameter_content, - fss_basic_list_write_parameter_double, - fss_basic_list_write_parameter_ignore, - fss_basic_list_write_parameter_object, - fss_basic_list_write_parameter_partial, - fss_basic_list_write_parameter_prepend, - fss_basic_list_write_parameter_single, - fss_basic_list_write_parameter_trim, + fss_basic_list_write_parameter_help_e, + fss_basic_list_write_parameter_light_e, + fss_basic_list_write_parameter_dark_e, + fss_basic_list_write_parameter_no_color_e, + fss_basic_list_write_parameter_verbosity_quiet_e, + fss_basic_list_write_parameter_verbosity_normal_e, + fss_basic_list_write_parameter_verbosity_verbose_e, + fss_basic_list_write_parameter_verbosity_debug_e, + fss_basic_list_write_parameter_version_e, + + fss_basic_list_write_parameter_file_e, + fss_basic_list_write_parameter_content_e, + fss_basic_list_write_parameter_double_e, + fss_basic_list_write_parameter_ignore_e, + fss_basic_list_write_parameter_object_e, + fss_basic_list_write_parameter_partial_e, + fss_basic_list_write_parameter_prepend_e, + fss_basic_list_write_parameter_single_e, + fss_basic_list_write_parameter_trim_e, }; #define fss_basic_list_write_console_parameter_t_initialize \ { \ - 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_s, fss_basic_list_write_long_file_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_write_short_content_s, fss_basic_list_write_long_content_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_write_short_double_s, fss_basic_list_write_long_double_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_write_short_ignore_s, fss_basic_list_write_long_ignore_s, 0, 2, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_write_short_object_s, fss_basic_list_write_long_object_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_write_short_partial_s, fss_basic_list_write_long_partial_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_write_short_prepend_s, fss_basic_list_write_long_prepend_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_write_short_single_s, fss_basic_list_write_long_single_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_write_short_trim_s, fss_basic_list_write_long_trim_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse_e), \ + 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_e), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(fss_basic_list_write_short_file_s, fss_basic_list_write_long_file_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_list_write_short_content_s, fss_basic_list_write_long_content_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_list_write_short_double_s, fss_basic_list_write_long_double_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_list_write_short_ignore_s, fss_basic_list_write_long_ignore_s, 0, 2, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_list_write_short_object_s, fss_basic_list_write_long_object_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_list_write_short_partial_s, fss_basic_list_write_long_partial_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_list_write_short_prepend_s, fss_basic_list_write_long_prepend_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_list_write_short_single_s, fss_basic_list_write_long_single_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_list_write_short_trim_s, fss_basic_list_write_long_trim_s, 0, 0, f_console_type_normal_e), \ } #define fss_basic_list_write_total_parameters_d 18 diff --git a/level_3/fss_basic_list_write/c/private-common.c b/level_3/fss_basic_list_write/c/private-common.c index bf46868..3922a7b 100644 --- a/level_3/fss_basic_list_write/c/private-common.c +++ b/level_3/fss_basic_list_write/c/private-common.c @@ -8,7 +8,7 @@ extern "C" { #ifndef _di_fss_basic_list_write_print_signal_received_ void fss_basic_list_write_print_signal_received(fss_basic_list_write_main_t * const main, const f_status_t signal) { - if (main->warning.verbosity != f_console_verbosity_verbose) return; + if (main->warning.verbosity != f_console_verbosity_verbose_e) return; // Must flush and reset color because the interrupt may have interrupted the middle of a print function. fflush(main->warning.to.stream); 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 a27c265..f381382 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 @@ -9,7 +9,7 @@ extern "C" { #ifndef _di_fss_basic_list_write_error_parameter_same_times_print_ void fss_basic_list_write_error_parameter_same_times_print(fss_basic_list_write_main_t * const main) { - if (main->error.verbosity == f_console_verbosity_quiet) { + if (main->error.verbosity == f_console_verbosity_quiet_e) { return; } @@ -30,7 +30,7 @@ extern "C" { #ifndef _di_fss_basic_list_write_error_parameter_unsupported_eol_print_ void fss_basic_list_write_error_parameter_unsupported_eol_print(fss_basic_list_write_main_t * const main) { - if (main->error.verbosity == f_console_verbosity_quiet) { + if (main->error.verbosity == f_console_verbosity_quiet_e) { return; } @@ -47,7 +47,7 @@ extern "C" { #ifndef _di_fss_basic_list_write_error_parameter_value_missing_print_ void fss_basic_list_write_error_parameter_value_missing_print(fss_basic_list_write_main_t * const main, const f_string_t symbol, const f_string_t parameter) { - if (main->error.verbosity == f_console_verbosity_quiet) { + if (main->error.verbosity == f_console_verbosity_quiet_e) { return; } @@ -69,7 +69,7 @@ extern "C" { f_string_range_t range = f_string_range_t_initialize; if (object) { - uint8_t complete = f_fss_complete_none; + uint8_t complete = f_fss_complete_none_e; if (object->used) { range.start = 0; @@ -81,11 +81,11 @@ extern "C" { } if (content) { - if (main->parameters[fss_basic_list_write_parameter_trim].result == f_console_result_found) { - complete = f_fss_complete_full_trim; + if (main->parameters[fss_basic_list_write_parameter_trim_e].result == f_console_result_found_e) { + complete = f_fss_complete_full_trim_e; } else { - complete = f_fss_complete_full; + complete = f_fss_complete_full_e; } } @@ -108,7 +108,7 @@ extern "C" { range.start = 0; range.stop = content->used - 1; - status = fl_fss_basic_list_content_write(*content, object ? f_fss_complete_full : f_fss_complete_none, &main->prepend, state, &range, buffer); + status = fl_fss_basic_list_content_write(*content, object ? f_fss_complete_full_e : f_fss_complete_none_e, &main->prepend, state, &range, buffer); if (F_status_is_error(status)) { fll_error_print(main->error, F_status_set_fine(status), "fl_fss_basic_list_content_write", F_true); @@ -253,7 +253,7 @@ extern "C" { for (; range.start <= range.stop; ++range.start) { if (block.string[range.start] == fss_basic_list_write_pipe_content_start_s) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[%sThis standard only supports one content per object.%]%c", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context, f_string_eol_s[0]); } diff --git a/level_3/fss_basic_list_write/data/build/dependencies b/level_3/fss_basic_list_write/data/build/dependencies index 25e27eb..b944420 100644 --- a/level_3/fss_basic_list_write/data/build/dependencies +++ b/level_3/fss_basic_list_write/data/build/dependencies @@ -19,7 +19,6 @@ fl_console fl_conversion fl_fss fl_print -fl_status fl_string fll_error fll_file diff --git a/level_3/fss_basic_list_write/data/build/settings b/level_3/fss_basic_list_write/data/build/settings index 679ec49..6129d72 100644 --- a/level_3/fss_basic_list_write/data/build/settings +++ b/level_3/fss_basic_list_write/data/build/settings @@ -21,7 +21,7 @@ build_indexer ar build_indexer_arguments rcs build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -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_signal -lf_string -lf_type_array -lf_utf +build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -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_signal -lf_status_string -lf_string -lf_type_array -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared 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 ca8ac6d..077a751 100644 --- a/level_3/fss_basic_read/c/fss_basic_read.c +++ b/level_3/fss_basic_read/c/fss_basic_read.c @@ -125,7 +125,7 @@ extern "C" { const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_basic_read_total_parameters_d); { - f_console_parameter_id_t ids[3] = { fss_basic_read_parameter_no_color, fss_basic_read_parameter_light, fss_basic_read_parameter_dark }; + f_console_parameter_id_t ids[3] = { fss_basic_read_parameter_no_color_e, fss_basic_read_parameter_light_e, fss_basic_read_parameter_dark_e }; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3); status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context); @@ -159,7 +159,7 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_basic_read_parameter_verbosity_quiet, fss_basic_read_parameter_verbosity_normal, fss_basic_read_parameter_verbosity_verbose, fss_basic_read_parameter_verbosity_debug }; + f_console_parameter_id_t ids[4] = { fss_basic_read_parameter_verbosity_quiet_e, fss_basic_read_parameter_verbosity_normal_e, fss_basic_read_parameter_verbosity_verbose_e, fss_basic_read_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); @@ -171,39 +171,39 @@ extern "C" { return status; } - if (choice == fss_basic_read_parameter_verbosity_quiet) { - main->output.verbosity = f_console_verbosity_quiet; - main->error.verbosity = f_console_verbosity_quiet; - main->warning.verbosity = f_console_verbosity_quiet; + if (choice == fss_basic_read_parameter_verbosity_quiet_e) { + main->output.verbosity = f_console_verbosity_quiet_e; + main->error.verbosity = f_console_verbosity_quiet_e; + main->warning.verbosity = f_console_verbosity_quiet_e; } - else if (choice == fss_basic_read_parameter_verbosity_normal) { - main->output.verbosity = f_console_verbosity_normal; - main->error.verbosity = f_console_verbosity_normal; - main->warning.verbosity = f_console_verbosity_normal; + else if (choice == fss_basic_read_parameter_verbosity_normal_e) { + main->output.verbosity = f_console_verbosity_normal_e; + main->error.verbosity = f_console_verbosity_normal_e; + main->warning.verbosity = f_console_verbosity_normal_e; } - else if (choice == fss_basic_read_parameter_verbosity_verbose) { - main->output.verbosity = f_console_verbosity_verbose; - main->error.verbosity = f_console_verbosity_verbose; - main->warning.verbosity = f_console_verbosity_verbose; + else if (choice == fss_basic_read_parameter_verbosity_verbose_e) { + main->output.verbosity = f_console_verbosity_verbose_e; + main->error.verbosity = f_console_verbosity_verbose_e; + main->warning.verbosity = f_console_verbosity_verbose_e; } - else if (choice == fss_basic_read_parameter_verbosity_debug) { - main->output.verbosity = f_console_verbosity_debug; - main->error.verbosity = f_console_verbosity_debug; - main->warning.verbosity = f_console_verbosity_debug; + else if (choice == fss_basic_read_parameter_verbosity_debug_e) { + main->output.verbosity = f_console_verbosity_debug_e; + main->error.verbosity = f_console_verbosity_debug_e; + main->warning.verbosity = f_console_verbosity_debug_e; } } status = F_none; } - if (main->parameters[fss_basic_read_parameter_help].result == f_console_result_found) { + if (main->parameters[fss_basic_read_parameter_help_e].result == f_console_result_found_e) { fss_basic_read_print_help(main->output.to, main->context); fss_basic_read_main_delete(main); return status; } - if (main->parameters[fss_basic_read_parameter_version].result == f_console_result_found) { + if (main->parameters[fss_basic_read_parameter_version_e].result == f_console_result_found_e) { fll_program_print_version(main->output.to, fss_basic_read_program_version_s); fss_basic_read_main_delete(main); @@ -221,12 +221,12 @@ extern "C" { if (main->remaining.used || main->process_pipe) { { const f_array_length_t parameter_code[] = { - fss_basic_read_parameter_at, - fss_basic_read_parameter_depth, - fss_basic_read_parameter_line, - fss_basic_read_parameter_select, - fss_basic_read_parameter_name, - fss_basic_read_parameter_delimit, + fss_basic_read_parameter_at_e, + fss_basic_read_parameter_depth_e, + fss_basic_read_parameter_line_e, + fss_basic_read_parameter_select_e, + fss_basic_read_parameter_name_e, + fss_basic_read_parameter_delimit_e, }; const f_string_t parameter_name[] = { @@ -253,7 +253,7 @@ extern "C" { for (f_array_length_t i = 0; i < 6; ++i) { - if (main->parameters[parameter_code[i]].result == f_console_result_found) { + if (main->parameters[parameter_code[i]].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -268,13 +268,13 @@ extern "C" { } // for } - if (F_status_is_error_not(status) && main->parameters[fss_basic_read_parameter_columns].result == f_console_result_found) { + if (F_status_is_error_not(status) && main->parameters[fss_basic_read_parameter_columns_e].result == f_console_result_found_e) { const f_array_length_t parameter_code[] = { - fss_basic_read_parameter_depth, - fss_basic_read_parameter_line, - fss_basic_read_parameter_pipe, - fss_basic_read_parameter_select, - fss_basic_read_parameter_total, + fss_basic_read_parameter_depth_e, + fss_basic_read_parameter_line_e, + fss_basic_read_parameter_pipe_e, + fss_basic_read_parameter_select_e, + fss_basic_read_parameter_total_e, }; const f_string_t parameter_name[] = { @@ -286,11 +286,11 @@ extern "C" { }; const uint8_t parameter_match[] = { - f_console_result_additional, - f_console_result_additional, - f_console_result_found, - f_console_result_additional, - f_console_result_found, + f_console_result_additional_e, + f_console_result_additional_e, + f_console_result_found_e, + f_console_result_additional_e, + f_console_result_found_e, }; for (f_array_length_t i = 0; i < 5; ++i) { @@ -312,8 +312,8 @@ extern "C" { } // for } - if (F_status_is_error_not(status) && main->parameters[fss_basic_read_parameter_pipe].result == f_console_result_found) { - if (main->parameters[fss_basic_read_parameter_total].result == f_console_result_found) { + if (F_status_is_error_not(status) && main->parameters[fss_basic_read_parameter_pipe_e].result == f_console_result_found_e) { + if (main->parameters[fss_basic_read_parameter_total_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -326,7 +326,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_basic_read_parameter_line].result == f_console_result_additional) { + else if (main->parameters[fss_basic_read_parameter_line_e].result == f_console_result_additional_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -341,21 +341,21 @@ extern "C" { } } - if (F_status_is_error_not(status) && main->parameters[fss_basic_read_parameter_delimit].result == f_console_result_additional) { + if (F_status_is_error_not(status) && main->parameters[fss_basic_read_parameter_delimit_e].result == f_console_result_additional_e) { f_array_length_t location = 0; f_array_length_t length = 0; // Set the value to 0 to allow for detecting mode based on what is provided. data.delimit_mode = 0; - for (f_array_length_t i = 0; i < main->parameters[fss_basic_read_parameter_delimit].values.used; ++i) { + for (f_array_length_t i = 0; i < main->parameters[fss_basic_read_parameter_delimit_e].values.used; ++i) { if (fss_basic_read_signal_received(main)) { status = F_status_set_error(F_interrupt); break; } - location = main->parameters[fss_basic_read_parameter_delimit].values.array[i]; + location = main->parameters[fss_basic_read_parameter_delimit_e].values.array[i]; length = strnlen(arguments->argv[location], f_console_parameter_size); if (!length) { @@ -371,34 +371,34 @@ extern "C" { break; } else if (fl_string_compare(arguments->argv[location], fss_basic_read_delimit_mode_name_none_s, length, fss_basic_read_delimit_mode_name_none_s_length) == F_equal_to) { - data.delimit_mode = fss_basic_read_delimit_mode_none; + data.delimit_mode = fss_basic_read_delimit_mode_none_e; } else if (fl_string_compare(arguments->argv[location], fss_basic_read_delimit_mode_name_all_s, length, fss_basic_read_delimit_mode_name_all_s_length) == F_equal_to) { - data.delimit_mode = fss_basic_read_delimit_mode_all; + data.delimit_mode = fss_basic_read_delimit_mode_all_e; } else if (fl_string_compare(arguments->argv[location], fss_basic_read_delimit_mode_name_object_s, length, fss_basic_read_delimit_mode_name_object_s_length) == F_equal_to) { switch (data.delimit_mode) { case 0: - data.delimit_mode = fss_basic_read_delimit_mode_object; + data.delimit_mode = fss_basic_read_delimit_mode_object_e; break; - case fss_basic_read_delimit_mode_none: - case fss_basic_read_delimit_mode_all: - case fss_basic_read_delimit_mode_content_greater_object: - case fss_basic_read_delimit_mode_content_lesser_object: - case fss_basic_read_delimit_mode_object: + case fss_basic_read_delimit_mode_none_e: + case fss_basic_read_delimit_mode_all_e: + case fss_basic_read_delimit_mode_content_greater_object_e: + case fss_basic_read_delimit_mode_content_lesser_object_e: + case fss_basic_read_delimit_mode_object_e: break; - case fss_basic_read_delimit_mode_content: - data.delimit_mode = fss_basic_read_delimit_mode_content_object; + case fss_basic_read_delimit_mode_content_e: + data.delimit_mode = fss_basic_read_delimit_mode_content_object_e; break; - case fss_basic_read_delimit_mode_content_greater: - data.delimit_mode = fss_basic_read_delimit_mode_content_greater_object; + case fss_basic_read_delimit_mode_content_greater_e: + data.delimit_mode = fss_basic_read_delimit_mode_content_greater_object_e; break; - case fss_basic_read_delimit_mode_content_lesser: - data.delimit_mode = fss_basic_read_delimit_mode_content_lesser_object; + case fss_basic_read_delimit_mode_content_lesser_e: + data.delimit_mode = fss_basic_read_delimit_mode_content_lesser_object_e; break; default: @@ -407,19 +407,19 @@ extern "C" { } else { if (!data.delimit_mode) { - data.delimit_mode = fss_basic_read_delimit_mode_content; + data.delimit_mode = fss_basic_read_delimit_mode_content_e; } - else if (data.delimit_mode == fss_basic_read_delimit_mode_object) { - data.delimit_mode = fss_basic_read_delimit_mode_content_object; + else if (data.delimit_mode == fss_basic_read_delimit_mode_object_e) { + data.delimit_mode = fss_basic_read_delimit_mode_content_object_e; } if (arguments->argv[location][length - 1] == fss_basic_read_delimit_mode_name_greater_s[0]) { - if (!(data.delimit_mode == fss_basic_read_delimit_mode_none || data.delimit_mode == fss_basic_read_delimit_mode_all)) { - if (data.delimit_mode == fss_basic_read_delimit_mode_content_object) { - data.delimit_mode = fss_basic_read_delimit_mode_content_greater_object; + if (!(data.delimit_mode == fss_basic_read_delimit_mode_none_e || data.delimit_mode == fss_basic_read_delimit_mode_all_e)) { + if (data.delimit_mode == fss_basic_read_delimit_mode_content_object_e) { + data.delimit_mode = fss_basic_read_delimit_mode_content_greater_object_e; } else { - data.delimit_mode = fss_basic_read_delimit_mode_content_greater; + data.delimit_mode = fss_basic_read_delimit_mode_content_greater_e; } } @@ -427,12 +427,12 @@ extern "C" { --length; } else if (arguments->argv[location][length - 1] == fss_basic_read_delimit_mode_name_lesser_s[0]) { - if (!(data.delimit_mode == fss_basic_read_delimit_mode_none || data.delimit_mode == fss_basic_read_delimit_mode_all)) { - if (data.delimit_mode == fss_basic_read_delimit_mode_content_object) { - data.delimit_mode = fss_basic_read_delimit_mode_content_lesser_object; + if (!(data.delimit_mode == fss_basic_read_delimit_mode_none_e || data.delimit_mode == fss_basic_read_delimit_mode_all_e)) { + if (data.delimit_mode == fss_basic_read_delimit_mode_content_object_e) { + data.delimit_mode = fss_basic_read_delimit_mode_content_lesser_object_e; } else { - data.delimit_mode = fss_basic_read_delimit_mode_content_lesser; + data.delimit_mode = fss_basic_read_delimit_mode_content_lesser_e; } } @@ -456,13 +456,13 @@ extern "C" { } // There can be nothing smaller than 0, so replace '0-' logic with just '0' logic. - if (data.delimit_mode == fss_basic_read_delimit_mode_content_lesser || data.delimit_mode == fss_basic_read_delimit_mode_content_lesser_object) { + if (data.delimit_mode == fss_basic_read_delimit_mode_content_lesser_e || data.delimit_mode == fss_basic_read_delimit_mode_content_lesser_object_e) { if (!data.delimit_depth) { - if (data.delimit_mode == fss_basic_read_delimit_mode_content_lesser) { - data.delimit_mode = fss_basic_read_delimit_mode_content; + if (data.delimit_mode == fss_basic_read_delimit_mode_content_lesser_e) { + data.delimit_mode = fss_basic_read_delimit_mode_content_e; } else { - data.delimit_mode = fss_basic_read_delimit_mode_content_object; + data.delimit_mode = fss_basic_read_delimit_mode_content_object_e; } } } @@ -471,7 +471,7 @@ extern "C" { // Guarantee the default value is "all". if (!data.delimit_mode) { - data.delimit_mode = fss_basic_read_delimit_mode_all; + data.delimit_mode = fss_basic_read_delimit_mode_all_e; } } @@ -481,7 +481,7 @@ extern "C" { // This standard does not support nesting, so any depth greater than 0 can be predicted without processing the file. if (F_status_is_error_not(status) && data.depths.array[0].depth > 0) { - if (main->parameters[fss_basic_read_parameter_total].result == f_console_result_found) { + if (main->parameters[fss_basic_read_parameter_total_e].result == f_console_result_found_e) { fss_basic_read_print_zero(main); } @@ -491,7 +491,7 @@ extern "C" { return F_none; } - if (F_status_is_error_not(status) && main->parameters[fss_basic_read_parameter_select].result == f_console_result_found) { + if (F_status_is_error_not(status) && main->parameters[fss_basic_read_parameter_select_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -523,7 +523,7 @@ extern "C" { status = f_file_stream_read(file, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, "-", "read", fll_error_file_type_pipe); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, "-", "read", fll_error_file_type_pipe_e); } else if (data.buffer.used) { data.files.array[0].range.stop = data.buffer.used - 1; @@ -533,7 +533,7 @@ extern "C" { status = f_string_append_assure(f_string_eol_s, 1, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, "-", "read", fll_error_file_type_pipe); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, "-", "read", fll_error_file_type_pipe_e); } } else { @@ -559,7 +559,7 @@ extern "C" { status = f_file_stream_open(arguments->argv[main->remaining.array[i]], 0, &file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], "open", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], "open", fll_error_file_type_file_e); break; } @@ -568,7 +568,7 @@ extern "C" { status = f_file_size_by_id(file.id, &size_file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file_e); break; } @@ -577,7 +577,7 @@ extern "C" { status = f_string_dynamic_resize(data.buffer.size + size_file, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file_e); break; } @@ -585,7 +585,7 @@ extern "C" { status = f_file_stream_read(file, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file_e); break; } @@ -598,7 +598,7 @@ extern "C" { status = f_string_append_assure(f_string_eol_s, 1, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, "-", "read", fll_error_file_type_pipe); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, "-", "read", fll_error_file_type_pipe_e); } } } @@ -623,7 +623,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { if (F_status_set_fine(status) == F_interrupt) { fflush(main->output.to.stream); 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 0177668..c4f20c2 100644 --- a/level_3/fss_basic_read/c/fss_basic_read.h +++ b/level_3/fss_basic_read/c/fss_basic_read.h @@ -110,57 +110,57 @@ extern "C" { #define fss_basic_read_long_trim_s "trim" enum { - fss_basic_read_parameter_help, - fss_basic_read_parameter_light, - fss_basic_read_parameter_dark, - fss_basic_read_parameter_no_color, - fss_basic_read_parameter_verbosity_quiet, - fss_basic_read_parameter_verbosity_normal, - fss_basic_read_parameter_verbosity_verbose, - fss_basic_read_parameter_verbosity_debug, - fss_basic_read_parameter_version, - - fss_basic_read_parameter_at, - fss_basic_read_parameter_content, - fss_basic_read_parameter_columns, - fss_basic_read_parameter_delimit, - fss_basic_read_parameter_depth, - fss_basic_read_parameter_empty, - fss_basic_read_parameter_line, - fss_basic_read_parameter_name, - fss_basic_read_parameter_object, - fss_basic_read_parameter_pipe, - fss_basic_read_parameter_raw, - fss_basic_read_parameter_select, - fss_basic_read_parameter_total, - fss_basic_read_parameter_trim, + fss_basic_read_parameter_help_e, + fss_basic_read_parameter_light_e, + fss_basic_read_parameter_dark_e, + fss_basic_read_parameter_no_color_e, + fss_basic_read_parameter_verbosity_quiet_e, + fss_basic_read_parameter_verbosity_normal_e, + fss_basic_read_parameter_verbosity_verbose_e, + fss_basic_read_parameter_verbosity_debug_e, + fss_basic_read_parameter_version_e, + + fss_basic_read_parameter_at_e, + fss_basic_read_parameter_content_e, + fss_basic_read_parameter_columns_e, + fss_basic_read_parameter_delimit_e, + fss_basic_read_parameter_depth_e, + fss_basic_read_parameter_empty_e, + fss_basic_read_parameter_line_e, + fss_basic_read_parameter_name_e, + fss_basic_read_parameter_object_e, + fss_basic_read_parameter_pipe_e, + fss_basic_read_parameter_raw_e, + fss_basic_read_parameter_select_e, + fss_basic_read_parameter_total_e, + fss_basic_read_parameter_trim_e, }; #define fss_basic_read_console_parameter_t_initialize \ { \ - 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_read_short_at_s, fss_basic_read_long_at_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_content_s, fss_basic_read_long_content_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_columns_s, fss_basic_read_long_columns_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_delimit_s, fss_basic_read_long_delimit_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_depth_s, fss_basic_read_long_depth_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_empty_s, fss_basic_read_long_empty_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_line_s, fss_basic_read_long_line_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_name_s, fss_basic_read_long_name_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_object_s, fss_basic_read_long_object_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_pipe_s, fss_basic_read_long_pipe_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_raw_s, fss_basic_read_long_raw_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_select_s, fss_basic_read_long_select_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_total_s, fss_basic_read_long_total_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_trim_s, fss_basic_read_long_trim_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse_e), \ + 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_e), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(fss_basic_read_short_at_s, fss_basic_read_long_at_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_read_short_content_s, fss_basic_read_long_content_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_read_short_columns_s, fss_basic_read_long_columns_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_read_short_delimit_s, fss_basic_read_long_delimit_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_read_short_depth_s, fss_basic_read_long_depth_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_read_short_empty_s, fss_basic_read_long_empty_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_read_short_line_s, fss_basic_read_long_line_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_read_short_name_s, fss_basic_read_long_name_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_read_short_object_s, fss_basic_read_long_object_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_read_short_pipe_s, fss_basic_read_long_pipe_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_read_short_raw_s, fss_basic_read_long_raw_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_read_short_select_s, fss_basic_read_long_select_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_read_short_total_s, fss_basic_read_long_total_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_read_short_trim_s, fss_basic_read_long_trim_s, 0, 0, f_console_type_normal_e), \ } #define fss_basic_read_total_parameters_d 23 @@ -193,15 +193,15 @@ extern "C" { #define fss_basic_read_delimit_mode_name_lesser_s_length 1 enum { - fss_basic_read_delimit_mode_none = 1, - fss_basic_read_delimit_mode_all, - fss_basic_read_delimit_mode_content, - fss_basic_read_delimit_mode_content_greater, - fss_basic_read_delimit_mode_content_greater_object, - fss_basic_read_delimit_mode_content_lesser, - fss_basic_read_delimit_mode_content_lesser_object, - fss_basic_read_delimit_mode_content_object, - fss_basic_read_delimit_mode_object, + fss_basic_read_delimit_mode_none_e = 1, + fss_basic_read_delimit_mode_all_e, + fss_basic_read_delimit_mode_content_e, + fss_basic_read_delimit_mode_content_greater_e, + fss_basic_read_delimit_mode_content_greater_object_e, + fss_basic_read_delimit_mode_content_lesser_e, + fss_basic_read_delimit_mode_content_lesser_object_e, + fss_basic_read_delimit_mode_content_object_e, + fss_basic_read_delimit_mode_object_e, }; #endif // _di_fss_basic_read_delimit_modes_ diff --git a/level_3/fss_basic_read/c/private-common.c b/level_3/fss_basic_read/c/private-common.c index 276e786..54fe016 100644 --- a/level_3/fss_basic_read/c/private-common.c +++ b/level_3/fss_basic_read/c/private-common.c @@ -59,7 +59,7 @@ extern "C" { #ifndef _di_fss_basic_read_print_signal_received_ void fss_basic_read_print_signal_received(fss_basic_read_main_t * const main, const f_status_t signal) { - if (main->warning.verbosity != f_console_verbosity_verbose) return; + if (main->warning.verbosity != f_console_verbosity_verbose_e) return; // Must flush and reset color because the interrupt may have interrupted the middle of a print function. fflush(main->warning.to.stream); diff --git a/level_3/fss_basic_read/c/private-common.h b/level_3/fss_basic_read/c/private-common.h index 41c195c..0bcd710 100644 --- a/level_3/fss_basic_read/c/private-common.h +++ b/level_3/fss_basic_read/c/private-common.h @@ -185,7 +185,7 @@ extern "C" { #define fss_basic_read_data_t_initialize \ { \ 0, \ - fss_basic_read_delimit_mode_all, \ + fss_basic_read_delimit_mode_all_e, \ 0, \ 0, \ 0, \ 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 0e8ec27..911b232 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 @@ -10,24 +10,24 @@ extern "C" { f_status_t fss_basic_read_delimit_object_is(const f_array_length_t depth, fss_basic_read_data_t * const data) { switch (data->delimit_mode) { - case fss_basic_read_delimit_mode_none: - case fss_basic_read_delimit_mode_content: - case fss_basic_read_delimit_mode_content_greater: - case fss_basic_read_delimit_mode_content_lesser: + case fss_basic_read_delimit_mode_none_e: + case fss_basic_read_delimit_mode_content_e: + case fss_basic_read_delimit_mode_content_greater_e: + case fss_basic_read_delimit_mode_content_lesser_e: return F_false; - case fss_basic_read_delimit_mode_all: - case fss_basic_read_delimit_mode_content_object: - case fss_basic_read_delimit_mode_content_greater_object: - case fss_basic_read_delimit_mode_content_lesser_object: - case fss_basic_read_delimit_mode_object: + case fss_basic_read_delimit_mode_all_e: + case fss_basic_read_delimit_mode_content_object_e: + case fss_basic_read_delimit_mode_content_greater_object_e: + case fss_basic_read_delimit_mode_content_lesser_object_e: + case fss_basic_read_delimit_mode_object_e: return F_true; default: break; } - return depth == data->delimit_depth || data->delimit_mode == fss_basic_read_delimit_mode_content_lesser; + return depth == data->delimit_depth || data->delimit_mode == fss_basic_read_delimit_mode_content_lesser_e; } #endif // _di_fss_basic_read_delimit_object_is_ @@ -39,8 +39,8 @@ extern "C" { { f_array_length_t depth_size = 1; - if (main->parameters[fss_basic_read_parameter_depth].result == f_console_result_additional) { - depth_size = main->parameters[fss_basic_read_parameter_depth].values.used; + if (main->parameters[fss_basic_read_parameter_depth_e].result == f_console_result_additional_e) { + depth_size = main->parameters[fss_basic_read_parameter_depth_e].values.used; } if (depth_size > data->depths.size) { @@ -73,11 +73,11 @@ extern "C" { macro_f_string_dynamic_t_clear(data->depths.array[i].value_name); - if (!main->parameters[fss_basic_read_parameter_depth].values.used) { + if (!main->parameters[fss_basic_read_parameter_depth_e].values.used) { position_depth = 0; } else { - position_depth = main->parameters[fss_basic_read_parameter_depth].values.array[i]; + position_depth = main->parameters[fss_basic_read_parameter_depth_e].values.array[i]; const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[position_depth])); @@ -90,18 +90,18 @@ extern "C" { } } - if (main->parameters[fss_basic_read_parameter_at].result == f_console_result_additional) { - for (; position_at < main->parameters[fss_basic_read_parameter_at].values.used; ++position_at) { + if (main->parameters[fss_basic_read_parameter_at_e].result == f_console_result_additional_e) { + for (; position_at < main->parameters[fss_basic_read_parameter_at_e].values.used; ++position_at) { - if (main->parameters[fss_basic_read_parameter_at].values.array[position_at] < position_depth) { + if (main->parameters[fss_basic_read_parameter_at_e].values.array[position_at] < position_depth) { continue; } - if (i + 1 < data->depths.used && main->parameters[fss_basic_read_parameter_at].values.array[position_at] > main->parameters[fss_basic_read_parameter_depth].values.array[i + 1]) { + if (i + 1 < data->depths.used && main->parameters[fss_basic_read_parameter_at_e].values.array[position_at] > main->parameters[fss_basic_read_parameter_depth_e].values.array[i + 1]) { break; } - data->depths.array[i].index_at = main->parameters[fss_basic_read_parameter_at].values.array[position_at]; + data->depths.array[i].index_at = main->parameters[fss_basic_read_parameter_at_e].values.array[position_at]; const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[data->depths.array[i].index_at])); @@ -115,20 +115,20 @@ extern "C" { } // for } - if (main->parameters[fss_basic_read_parameter_name].result == f_console_result_additional) { - for (; position_name < main->parameters[fss_basic_read_parameter_name].values.used; position_name++) { + if (main->parameters[fss_basic_read_parameter_name_e].result == f_console_result_additional_e) { + for (; position_name < main->parameters[fss_basic_read_parameter_name_e].values.used; position_name++) { - if (main->parameters[fss_basic_read_parameter_name].values.array[position_name] < position_depth) { + if (main->parameters[fss_basic_read_parameter_name_e].values.array[position_name] < position_depth) { continue; } - if (i + 1 < data->depths.used && main->parameters[fss_basic_read_parameter_name].values.array[position_name] > main->parameters[fss_basic_read_parameter_depth].values.array[i + 1]) { + if (i + 1 < data->depths.used && main->parameters[fss_basic_read_parameter_name_e].values.array[position_name] > main->parameters[fss_basic_read_parameter_depth_e].values.array[i + 1]) { break; } - data->depths.array[i].index_name = main->parameters[fss_basic_read_parameter_name].values.array[position_name]; + data->depths.array[i].index_name = main->parameters[fss_basic_read_parameter_name_e].values.array[position_name]; - if (main->parameters[fss_basic_read_parameter_trim].result == f_console_result_found) { + if (main->parameters[fss_basic_read_parameter_trim_e].result == f_console_result_found_e) { status = fl_string_rip(arguments->argv[data->depths.array[i].index_name], strlen(arguments->argv[data->depths.array[i].index_name]), &data->depths.array[i].value_name); } else { @@ -136,7 +136,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), main->parameters[fss_basic_read_parameter_trim].result == f_console_result_found ? "fl_string_rip" : "f_string_append", F_true); + fll_error_print(main->error, F_status_set_fine(status), main->parameters[fss_basic_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_rip" : "f_string_append", F_true); return status; } @@ -153,7 +153,7 @@ extern "C" { } if (data->depths.array[i].depth == data->depths.array[j].depth) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -168,7 +168,7 @@ extern "C" { return F_status_set_error(F_parameter); } else if (data->depths.array[i].depth > data->depths.array[j].depth) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -219,7 +219,7 @@ extern "C" { if (F_status_is_error(status)) { const f_string_t file_name = fss_basic_read_file_identify(input.start, data->files); - fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_basic_read", F_true, file_name ? file_name : "-", "process", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_basic_read", F_true, file_name ? file_name : "-", "process", fll_error_file_type_file_e); return status; } @@ -240,7 +240,7 @@ extern "C" { #ifndef _di_fss_basic_read_load_number_ f_status_t fss_basic_read_load_number(fss_basic_read_main_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) { - if (main->parameters[parameter].result == f_console_result_additional) { + if (main->parameters[parameter].result == f_console_result_additional_e) { const f_array_length_t index = main->parameters[parameter].values.array[main->parameters[parameter].values.used - 1]; const f_string_range_t range = macro_f_string_range_t_initialize(strnlen(arguments->argv[index], f_console_parameter_size)); @@ -273,13 +273,13 @@ extern "C" { if (data->option & fss_basic_read_data_option_trim) { if (data->option & fss_basic_read_data_option_raw) { if (data->quotes.array[at]) { - f_print_character_safely(data->quotes.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); + f_print_character_safely(data->quotes.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); } fl_print_trim_dynamic_partial(data->buffer, data->objects.array[at], main->output.to.stream); if (data->quotes.array[at]) { - f_print_character_safely(data->quotes.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); + f_print_character_safely(data->quotes.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); } } else { @@ -289,13 +289,13 @@ extern "C" { else { if (data->option & fss_basic_read_data_option_raw) { if (data->quotes.array[at]) { - f_print_character_safely(data->quotes.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); + f_print_character_safely(data->quotes.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); } f_print_dynamic_partial(data->buffer, data->objects.array[at], main->output.to.stream); if (data->quotes.array[at]) { - f_print_character_safely(data->quotes.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); + f_print_character_safely(data->quotes.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); } } else { @@ -327,7 +327,7 @@ extern "C" { #ifndef _di_fss_basic_read_print_object_end_ void fss_basic_read_print_object_end(fss_basic_read_main_t * const main) { - if (main->parameters[fss_basic_read_parameter_pipe].result == f_console_result_found) { + if (main->parameters[fss_basic_read_parameter_pipe_e].result == f_console_result_found_e) { f_print_character(fss_basic_read_pipe_content_start_s, main->output.to.stream); } else { @@ -346,7 +346,7 @@ extern "C" { #ifndef _di_fss_basic_read_print_set_end_ void fss_basic_read_print_set_end(fss_basic_read_main_t * const main) { - if (main->parameters[fss_basic_read_parameter_pipe].result == f_console_result_found) { + if (main->parameters[fss_basic_read_parameter_pipe_e].result == f_console_result_found_e) { f_print_character(fss_basic_read_pipe_content_end_s, main->output.to.stream); } else { @@ -370,7 +370,7 @@ extern "C" { // This standard does not support multiple content groups. if ((data->option & fss_basic_read_data_option_select) && data->select) { - if (main->parameters[fss_basic_read_parameter_total].result == f_console_result_found) { + if (main->parameters[fss_basic_read_parameter_total_e].result == f_console_result_found_e) { flockfile(main->output.to.stream); fss_basic_read_print_zero(main); @@ -639,53 +639,53 @@ extern "C" { f_status_t status = F_none; - if (main->parameters[fss_basic_read_parameter_at].result == f_console_result_additional) { + if (main->parameters[fss_basic_read_parameter_at_e].result == f_console_result_additional_e) { data->option |= fss_basic_read_data_option_at; } - if (main->parameters[fss_basic_read_parameter_columns].result == f_console_result_found) { + if (main->parameters[fss_basic_read_parameter_columns_e].result == f_console_result_found_e) { data->option |= fss_basic_read_data_option_columns; } - if (main->parameters[fss_basic_read_parameter_content].result == f_console_result_found) { + if (main->parameters[fss_basic_read_parameter_content_e].result == f_console_result_found_e) { data->option |= fss_basic_read_data_option_content; } - if (main->parameters[fss_basic_read_parameter_empty].result == f_console_result_found) { + if (main->parameters[fss_basic_read_parameter_empty_e].result == f_console_result_found_e) { data->option |= fss_basic_read_data_option_empty; } - if (main->parameters[fss_basic_read_parameter_line].result == f_console_result_additional) { + if (main->parameters[fss_basic_read_parameter_line_e].result == f_console_result_additional_e) { data->option |= fss_basic_read_data_option_line; - status = fss_basic_read_load_number(main, fss_basic_read_parameter_line, fss_basic_read_long_line_s, arguments, &data->line); + status = fss_basic_read_load_number(main, fss_basic_read_parameter_line_e, fss_basic_read_long_line_s, arguments, &data->line); if (F_status_is_error(status)) return status; } - if (main->parameters[fss_basic_read_parameter_name].result == f_console_result_additional) { + if (main->parameters[fss_basic_read_parameter_name_e].result == f_console_result_additional_e) { data->option |= fss_basic_read_data_option_name; } - if (main->parameters[fss_basic_read_parameter_object].result == f_console_result_found) { + if (main->parameters[fss_basic_read_parameter_object_e].result == f_console_result_found_e) { data->option |= fss_basic_read_data_option_object; } - if (main->parameters[fss_basic_read_parameter_raw].result == f_console_result_found) { + if (main->parameters[fss_basic_read_parameter_raw_e].result == f_console_result_found_e) { data->option |= fss_basic_read_data_option_raw; } - if (main->parameters[fss_basic_read_parameter_select].result == f_console_result_additional) { + if (main->parameters[fss_basic_read_parameter_select_e].result == f_console_result_additional_e) { data->option |= fss_basic_read_data_option_select; - status = fss_basic_read_load_number(main, fss_basic_read_parameter_select, fss_basic_read_long_select_s, arguments, &data->select); + status = fss_basic_read_load_number(main, fss_basic_read_parameter_select_e, fss_basic_read_long_select_s, arguments, &data->select); if (F_status_is_error(status)) return status; } - if (main->parameters[fss_basic_read_parameter_total].result == f_console_result_found) { + if (main->parameters[fss_basic_read_parameter_total_e].result == f_console_result_found_e) { data->option |= fss_basic_read_data_option_total; } - if (main->parameters[fss_basic_read_parameter_trim].result == f_console_result_found) { + if (main->parameters[fss_basic_read_parameter_trim_e].result == f_console_result_found_e) { data->option |= fss_basic_read_data_option_trim; } diff --git a/level_3/fss_basic_read/data/build/dependencies b/level_3/fss_basic_read/data/build/dependencies index 25e27eb..b944420 100644 --- a/level_3/fss_basic_read/data/build/dependencies +++ b/level_3/fss_basic_read/data/build/dependencies @@ -19,7 +19,6 @@ fl_console fl_conversion fl_fss fl_print -fl_status fl_string fll_error fll_file diff --git a/level_3/fss_basic_read/data/build/settings b/level_3/fss_basic_read/data/build/settings index 8afe05f..25d847b 100644 --- a/level_3/fss_basic_read/data/build/settings +++ b/level_3/fss_basic_read/data/build/settings @@ -21,7 +21,7 @@ build_indexer ar build_indexer_arguments rcs build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -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_signal -lf_string -lf_type_array -lf_utf +build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -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_signal -lf_status_string -lf_string -lf_type_array -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared 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 da080b8..2e027a6 100644 --- a/level_3/fss_basic_write/c/fss_basic_write.c +++ b/level_3/fss_basic_write/c/fss_basic_write.c @@ -65,7 +65,7 @@ extern "C" { const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_basic_write_total_parameters_d); { - f_console_parameter_id_t ids[3] = { fss_basic_write_parameter_no_color, fss_basic_write_parameter_light, fss_basic_write_parameter_dark }; + f_console_parameter_id_t ids[3] = { fss_basic_write_parameter_no_color_e, fss_basic_write_parameter_light_e, fss_basic_write_parameter_dark_e }; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3); status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context); @@ -98,7 +98,7 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_basic_write_parameter_verbosity_quiet, fss_basic_write_parameter_verbosity_normal, fss_basic_write_parameter_verbosity_verbose, fss_basic_write_parameter_verbosity_debug }; + f_console_parameter_id_t ids[4] = { fss_basic_write_parameter_verbosity_quiet_e, fss_basic_write_parameter_verbosity_normal_e, fss_basic_write_parameter_verbosity_verbose_e, fss_basic_write_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); @@ -109,39 +109,39 @@ extern "C" { return status; } - if (choice == fss_basic_write_parameter_verbosity_quiet) { - main->output.verbosity = f_console_verbosity_quiet; - main->error.verbosity = f_console_verbosity_quiet; - main->warning.verbosity = f_console_verbosity_quiet; + if (choice == fss_basic_write_parameter_verbosity_quiet_e) { + main->output.verbosity = f_console_verbosity_quiet_e; + main->error.verbosity = f_console_verbosity_quiet_e; + main->warning.verbosity = f_console_verbosity_quiet_e; } - else if (choice == fss_basic_write_parameter_verbosity_normal) { - main->output.verbosity = f_console_verbosity_normal; - main->error.verbosity = f_console_verbosity_normal; - main->warning.verbosity = f_console_verbosity_normal; + else if (choice == fss_basic_write_parameter_verbosity_normal_e) { + main->output.verbosity = f_console_verbosity_normal_e; + main->error.verbosity = f_console_verbosity_normal_e; + main->warning.verbosity = f_console_verbosity_normal_e; } - else if (choice == fss_basic_write_parameter_verbosity_verbose) { - main->output.verbosity = f_console_verbosity_verbose; - main->error.verbosity = f_console_verbosity_verbose; - main->warning.verbosity = f_console_verbosity_verbose; + else if (choice == fss_basic_write_parameter_verbosity_verbose_e) { + main->output.verbosity = f_console_verbosity_verbose_e; + main->error.verbosity = f_console_verbosity_verbose_e; + main->warning.verbosity = f_console_verbosity_verbose_e; } - else if (choice == fss_basic_write_parameter_verbosity_debug) { - main->output.verbosity = f_console_verbosity_debug; - main->error.verbosity = f_console_verbosity_debug; - main->warning.verbosity = f_console_verbosity_debug; + else if (choice == fss_basic_write_parameter_verbosity_debug_e) { + main->output.verbosity = f_console_verbosity_debug_e; + main->error.verbosity = f_console_verbosity_debug_e; + main->warning.verbosity = f_console_verbosity_debug_e; } } status = F_none; } - if (main->parameters[fss_basic_write_parameter_help].result == f_console_result_found) { + if (main->parameters[fss_basic_write_parameter_help_e].result == f_console_result_found_e) { fss_basic_write_print_help(main->output.to, main->context); fss_basic_write_main_delete(main); return status; } - if (main->parameters[fss_basic_write_parameter_version].result == f_console_result_found) { + if (main->parameters[fss_basic_write_parameter_version_e].result == f_console_result_found_e) { fll_program_print_version(main->output.to, fss_basic_write_program_version_s); fss_basic_write_main_delete(main); @@ -155,9 +155,9 @@ extern "C" { output.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d; if (F_status_is_error_not(status)) { - if (main->parameters[fss_basic_write_parameter_file].result == f_console_result_additional) { - if (main->parameters[fss_basic_write_parameter_file].values.used > 1) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[fss_basic_write_parameter_file_e].result == f_console_result_additional_e) { + if (main->parameters[fss_basic_write_parameter_file_e].values.used > 1) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -170,41 +170,41 @@ extern "C" { status = F_status_set_error(F_parameter); } else { - const f_array_length_t location = main->parameters[fss_basic_write_parameter_file].values.array[0]; + const f_array_length_t location = main->parameters[fss_basic_write_parameter_file_e].values.array[0]; output.id = -1; output.stream = 0; status = f_file_stream_open(arguments->argv[location], 0, &output); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], "open", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], "open", fll_error_file_type_file_e); } } } - else if (main->parameters[fss_basic_write_parameter_file].result == f_console_result_found) { + else if (main->parameters[fss_basic_write_parameter_file_e].result == f_console_result_found_e) { fss_basic_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_basic_write_long_file_s); status = F_status_set_error(F_parameter); } } if (F_status_is_error_not(status)) { - if (main->parameters[fss_basic_write_parameter_object].locations.used || main->parameters[fss_basic_write_parameter_content].locations.used) { - if (main->parameters[fss_basic_write_parameter_object].locations.used) { - if (main->parameters[fss_basic_write_parameter_object].locations.used != main->parameters[fss_basic_write_parameter_object].values.used) { + if (main->parameters[fss_basic_write_parameter_object_e].locations.used || main->parameters[fss_basic_write_parameter_content_e].locations.used) { + if (main->parameters[fss_basic_write_parameter_object_e].locations.used) { + if (main->parameters[fss_basic_write_parameter_object_e].locations.used != main->parameters[fss_basic_write_parameter_object_e].values.used) { fss_basic_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_basic_write_long_object_s); status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_basic_write_parameter_content].locations.used != main->parameters[fss_basic_write_parameter_content].values.used) { + else if (main->parameters[fss_basic_write_parameter_content_e].locations.used != main->parameters[fss_basic_write_parameter_content_e].values.used) { fss_basic_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_basic_write_long_content_s); status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_basic_write_parameter_object].locations.used != main->parameters[fss_basic_write_parameter_content].locations.used && main->parameters[fss_basic_write_parameter_partial].result == f_console_result_none) { + else if (main->parameters[fss_basic_write_parameter_object_e].locations.used != main->parameters[fss_basic_write_parameter_content_e].locations.used && main->parameters[fss_basic_write_parameter_partial_e].result == f_console_result_none_e) { fss_basic_write_error_parameter_same_times_print(main); status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_basic_write_parameter_content].locations.used && main->parameters[fss_basic_write_parameter_partial].locations.used) { - if (main->parameters[fss_basic_write_parameter_content].result == f_console_result_additional) { - if (main->error.verbosity != f_console_verbosity_quiet) { + else if (main->parameters[fss_basic_write_parameter_content_e].locations.used && main->parameters[fss_basic_write_parameter_partial_e].locations.used) { + if (main->parameters[fss_basic_write_parameter_content_e].result == f_console_result_additional_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -223,20 +223,20 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[fss_basic_write_parameter_content].result == f_console_result_additional) { + if (main->parameters[fss_basic_write_parameter_content_e].result == f_console_result_additional_e) { f_array_length_t location_object = 0; f_array_length_t location_content = 0; f_array_length_t location_sub_object = 0; f_array_length_t location_sub_content = 0; - for (f_array_length_t i = 0; i < main->parameters[fss_basic_write_parameter_object].locations.used; ++i) { - location_object = main->parameters[fss_basic_write_parameter_object].locations.array[i]; - location_content = main->parameters[fss_basic_write_parameter_content].locations.array[i]; - location_sub_object = main->parameters[fss_basic_write_parameter_object].locations_sub.array[i]; - location_sub_content = main->parameters[fss_basic_write_parameter_content].locations_sub.array[i]; + for (f_array_length_t i = 0; i < main->parameters[fss_basic_write_parameter_object_e].locations.used; ++i) { + location_object = main->parameters[fss_basic_write_parameter_object_e].locations.array[i]; + location_content = main->parameters[fss_basic_write_parameter_content_e].locations.array[i]; + location_sub_object = main->parameters[fss_basic_write_parameter_object_e].locations_sub.array[i]; + location_sub_content = main->parameters[fss_basic_write_parameter_content_e].locations_sub.array[i]; if (location_object > location_content || location_object == location_content && location_sub_object > location_sub_content) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sEach '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -255,19 +255,19 @@ extern "C" { } } } - else if (main->parameters[fss_basic_write_parameter_content].locations.used) { - if (main->parameters[fss_basic_write_parameter_content].locations.used != main->parameters[fss_basic_write_parameter_content].values.used) { + else if (main->parameters[fss_basic_write_parameter_content_e].locations.used) { + if (main->parameters[fss_basic_write_parameter_content_e].locations.used != main->parameters[fss_basic_write_parameter_content_e].values.used) { fss_basic_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_basic_write_long_content_s); status = F_status_set_error(F_parameter); } - else if (!main->parameters[fss_basic_write_parameter_partial].locations.used) { + else if (!main->parameters[fss_basic_write_parameter_partial_e].locations.used) { fss_basic_write_error_parameter_same_times_print(main); status = F_status_set_error(F_parameter); } } } else if (!main->process_pipe) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThis requires either piped data or the use of the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -283,8 +283,8 @@ extern "C" { } if (F_status_is_error_not(status) && main->process_pipe) { - if (main->parameters[fss_basic_write_parameter_partial].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[fss_basic_write_parameter_partial_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThis '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -300,8 +300,8 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[fss_basic_write_parameter_prepend].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[fss_basic_write_parameter_prepend_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -313,8 +313,8 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_basic_write_parameter_prepend].result == f_console_result_additional) { - const f_array_length_t index = main->parameters[fss_basic_write_parameter_prepend].values.array[main->parameters[fss_basic_write_parameter_prepend].values.used - 1]; + else if (main->parameters[fss_basic_write_parameter_prepend_e].result == f_console_result_additional_e) { + const f_array_length_t index = main->parameters[fss_basic_write_parameter_prepend_e].values.array[main->parameters[fss_basic_write_parameter_prepend_e].values.used - 1]; const f_array_length_t length = strnlen(arguments->argv[index], f_console_parameter_size); // Even though this standard does not utilize this parameter, provide the validation for consistency. @@ -328,7 +328,7 @@ extern "C" { if (F_status_is_error(status)) break; if (status == F_false) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -344,7 +344,7 @@ extern "C" { } // for } else { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -360,8 +360,8 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[fss_basic_write_parameter_ignore].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[fss_basic_write_parameter_ignore_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -373,9 +373,9 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_basic_write_parameter_ignore].result == f_console_result_additional) { - const f_array_length_t total_locations = main->parameters[fss_basic_write_parameter_ignore].locations.used; - const f_array_length_t total_arguments = main->parameters[fss_basic_write_parameter_ignore].values.used; + else if (main->parameters[fss_basic_write_parameter_ignore_e].result == f_console_result_additional_e) { + const f_array_length_t total_locations = main->parameters[fss_basic_write_parameter_ignore_e].locations.used; + const f_array_length_t total_arguments = main->parameters[fss_basic_write_parameter_ignore_e].values.used; if (total_locations * 2 > total_arguments) { flockfile(main->error.to.stream); @@ -394,14 +394,14 @@ extern "C" { f_fss_quote_t quote = F_fss_delimit_quote_double_s; if (F_status_is_error_not(status)) { - if (main->parameters[fss_basic_write_parameter_double].result == f_console_result_found) { - if (main->parameters[fss_basic_write_parameter_single].result == f_console_result_found) { - if (main->parameters[fss_basic_write_parameter_double].location < main->parameters[fss_basic_write_parameter_single].location) { + if (main->parameters[fss_basic_write_parameter_double_e].result == f_console_result_found_e) { + if (main->parameters[fss_basic_write_parameter_single_e].result == f_console_result_found_e) { + if (main->parameters[fss_basic_write_parameter_double_e].location < main->parameters[fss_basic_write_parameter_single_e].location) { quote = F_fss_delimit_quote_single_s; } } } - else if (main->parameters[fss_basic_write_parameter_single].result == f_console_result_found) { + else if (main->parameters[fss_basic_write_parameter_single_e].result == f_console_result_found_e) { quote = F_fss_delimit_quote_single_s; } } @@ -417,7 +417,7 @@ extern "C" { status = fss_basic_write_process_pipe(main, output, quote, &buffer); if (F_status_is_error(status)) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sWhile processing the '%]%[input pipe%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context, main->error.notable, main->error.notable); @@ -429,18 +429,18 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[fss_basic_write_parameter_partial].result == f_console_result_found) { - if (main->parameters[fss_basic_write_parameter_object].result == f_console_result_additional) { + if (main->parameters[fss_basic_write_parameter_partial_e].result == f_console_result_found_e) { + if (main->parameters[fss_basic_write_parameter_object_e].result == f_console_result_additional_e) { content.used = 0; - for (f_array_length_t i = 0; i < main->parameters[fss_basic_write_parameter_object].values.used; ++i) { + for (f_array_length_t i = 0; i < main->parameters[fss_basic_write_parameter_object_e].values.used; ++i) { if (fss_basic_write_signal_received(main)) { status = F_status_set_error(F_interrupt); break; } - object.string = arguments->argv[main->parameters[fss_basic_write_parameter_object].values.array[i]]; + object.string = arguments->argv[main->parameters[fss_basic_write_parameter_object_e].values.array[i]]; object.used = strnlen(object.string, f_console_parameter_size); object.size = object.used; @@ -451,14 +451,14 @@ extern "C" { else { object.used = 0; - for (f_array_length_t i = 0; i < main->parameters[fss_basic_write_parameter_content].values.used; ++i) { + for (f_array_length_t i = 0; i < main->parameters[fss_basic_write_parameter_content_e].values.used; ++i) { if (fss_basic_write_signal_received(main)) { status = F_status_set_error(F_interrupt); break; } - content.string = arguments->argv[main->parameters[fss_basic_write_parameter_content].values.array[i]]; + content.string = arguments->argv[main->parameters[fss_basic_write_parameter_content_e].values.array[i]]; content.used = strnlen(content.string, f_console_parameter_size); content.size = content.used; @@ -468,18 +468,18 @@ extern "C" { } } else { - for (f_array_length_t i = 0; i < main->parameters[fss_basic_write_parameter_object].values.used; ++i) { + for (f_array_length_t i = 0; i < main->parameters[fss_basic_write_parameter_object_e].values.used; ++i) { if (fss_basic_write_signal_received(main)) { status = F_status_set_error(F_interrupt); break; } - object.string = arguments->argv[main->parameters[fss_basic_write_parameter_object].values.array[i]]; + object.string = arguments->argv[main->parameters[fss_basic_write_parameter_object_e].values.array[i]]; object.used = strnlen(object.string, f_console_parameter_size); object.size = object.used; - content.string = arguments->argv[main->parameters[fss_basic_write_parameter_content].values.array[i]]; + content.string = arguments->argv[main->parameters[fss_basic_write_parameter_content_e].values.array[i]]; content.used = strnlen(content.string, f_console_parameter_size); content.size = content.used; @@ -489,7 +489,7 @@ extern "C" { } if (F_status_is_error(status)) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sWhile processing the '%]%[input arguments%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context, main->error.notable, main->error.notable); @@ -498,7 +498,7 @@ extern "C" { funlockfile(main->error.to.stream); } } - else if (main->error.verbosity != f_console_verbosity_quiet && main->parameters[fss_basic_write_parameter_file].result == f_console_result_none) { + else if (main->error.verbosity != f_console_verbosity_quiet_e && main->parameters[fss_basic_write_parameter_file_e].result == f_console_result_none_e) { // ensure there is always a newline at the end, unless in quiet mode. fll_print_character(f_string_eol_s[0], main->error.to.stream); @@ -517,14 +517,14 @@ extern "C" { content.size = 0; } - if (main->parameters[fss_basic_write_parameter_file].result == f_console_result_additional) { + if (main->parameters[fss_basic_write_parameter_file_e].result == f_console_result_additional_e) { if (output.id != -1) { f_file_stream_close(F_true, &output); } } // ensure a newline is always put at the end of the program execution, unless in quiet mode. - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { if (F_status_is_error(status)) { fll_print_character(f_string_eol_s[0], main->error.to.stream); } 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 6b3f81b..a52a865 100644 --- a/level_3/fss_basic_write/c/fss_basic_write.h +++ b/level_3/fss_basic_write/c/fss_basic_write.h @@ -32,13 +32,11 @@ #include #include #include -#include #include // fll-2 includes #include #include -#include #include #include @@ -95,47 +93,47 @@ extern "C" { #define fss_basic_write_long_trim_s "trim" enum { - fss_basic_write_parameter_help, - fss_basic_write_parameter_light, - fss_basic_write_parameter_dark, - fss_basic_write_parameter_no_color, - fss_basic_write_parameter_verbosity_quiet, - fss_basic_write_parameter_verbosity_normal, - fss_basic_write_parameter_verbosity_verbose, - fss_basic_write_parameter_verbosity_debug, - fss_basic_write_parameter_version, - - fss_basic_write_parameter_file, - fss_basic_write_parameter_content, - fss_basic_write_parameter_double, - fss_basic_write_parameter_ignore, - fss_basic_write_parameter_object, - fss_basic_write_parameter_partial, - fss_basic_write_parameter_prepend, - fss_basic_write_parameter_single, - fss_basic_write_parameter_trim, + fss_basic_write_parameter_help_e, + fss_basic_write_parameter_light_e, + fss_basic_write_parameter_dark_e, + fss_basic_write_parameter_no_color_e, + fss_basic_write_parameter_verbosity_quiet_e, + fss_basic_write_parameter_verbosity_normal_e, + fss_basic_write_parameter_verbosity_verbose_e, + fss_basic_write_parameter_verbosity_debug_e, + fss_basic_write_parameter_version_e, + + fss_basic_write_parameter_file_e, + fss_basic_write_parameter_content_e, + fss_basic_write_parameter_double_e, + fss_basic_write_parameter_ignore_e, + fss_basic_write_parameter_object_e, + fss_basic_write_parameter_partial_e, + fss_basic_write_parameter_prepend_e, + fss_basic_write_parameter_single_e, + fss_basic_write_parameter_trim_e, }; #define fss_basic_write_console_parameter_t_initialize \ { \ - 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_s, fss_basic_write_long_file_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_write_short_content_s, fss_basic_write_long_content_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_write_short_double_s, fss_basic_write_long_double_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_write_short_ignore_s, fss_basic_write_long_ignore_s, 0, 2, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_write_short_object_s, fss_basic_write_long_object_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_write_short_partial_s, fss_basic_write_long_partial_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_write_short_prepend_s, fss_basic_write_long_prepend_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_write_short_single_s, fss_basic_write_long_single_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_write_short_trim_s, fss_basic_write_long_trim_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse_e), \ + 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_e), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(fss_basic_write_short_file_s, fss_basic_write_long_file_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_write_short_content_s, fss_basic_write_long_content_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_write_short_double_s, fss_basic_write_long_double_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_write_short_ignore_s, fss_basic_write_long_ignore_s, 0, 2, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_write_short_object_s, fss_basic_write_long_object_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_write_short_partial_s, fss_basic_write_long_partial_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_write_short_prepend_s, fss_basic_write_long_prepend_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_write_short_single_s, fss_basic_write_long_single_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_basic_write_short_trim_s, fss_basic_write_long_trim_s, 0, 0, f_console_type_normal_e), \ } #define fss_basic_write_total_parameters_d 18 diff --git a/level_3/fss_basic_write/c/private-common.c b/level_3/fss_basic_write/c/private-common.c index c253bdc..421d460 100644 --- a/level_3/fss_basic_write/c/private-common.c +++ b/level_3/fss_basic_write/c/private-common.c @@ -8,7 +8,7 @@ extern "C" { #ifndef _di_fss_basic_write_print_signal_received_ void fss_basic_write_print_signal_received(fss_basic_write_main_t * const main, const f_status_t signal) { - if (main->warning.verbosity != f_console_verbosity_verbose) return; + if (main->warning.verbosity != f_console_verbosity_verbose_e) return; // Must flush and reset color because the interrupt may have interrupted the middle of a print function. fflush(main->warning.to.stream); 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 33b2f87..37c2062 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 @@ -9,7 +9,7 @@ extern "C" { #ifndef _di_fss_basic_write_error_parameter_same_times_print_ void fss_basic_write_error_parameter_same_times_print(fss_basic_write_main_t * const main) { - if (main->error.verbosity == f_console_verbosity_quiet) { + if (main->error.verbosity == f_console_verbosity_quiet_e) { return; } @@ -30,7 +30,7 @@ extern "C" { #ifndef _di_fss_basic_write_error_parameter_value_missing_print_ void fss_basic_write_error_parameter_value_missing_print(fss_basic_write_main_t * const main, const f_string_t symbol, const f_string_t parameter) { - if (main->error.verbosity == f_console_verbosity_quiet) { + if (main->error.verbosity == f_console_verbosity_quiet_e) { return; } @@ -47,7 +47,7 @@ extern "C" { #ifndef _di_fss_basic_write_error_parameter_unsupported_eol_print_ void fss_basic_write_error_parameter_unsupported_eol_print(fss_basic_write_main_t * const main) { - if (main->error.verbosity == f_console_verbosity_quiet) { + if (main->error.verbosity == f_console_verbosity_quiet_e) { return; } @@ -69,7 +69,7 @@ extern "C" { f_string_range_t range = f_string_range_t_initialize; if (object) { - uint8_t complete = f_fss_complete_none; + uint8_t complete = f_fss_complete_none_e; if (object->used) { range.start = 0; @@ -81,11 +81,11 @@ extern "C" { } if (content) { - if (main->parameters[fss_basic_write_parameter_trim].result == f_console_result_found) { - complete = f_fss_complete_full_trim; + if (main->parameters[fss_basic_write_parameter_trim_e].result == f_console_result_found_e) { + complete = f_fss_complete_full_trim_e; } else { - complete = f_fss_complete_full; + complete = f_fss_complete_full_e; } } @@ -114,7 +114,7 @@ extern "C" { range.stop = 0; } - status = fl_fss_basic_content_write(*content, object ? f_fss_complete_full : f_fss_complete_none, state, &range, buffer); + status = fl_fss_basic_content_write(*content, object ? f_fss_complete_full_e : f_fss_complete_none_e, state, &range, buffer); if (F_status_set_fine(status) == F_none_eol) { fss_basic_write_error_parameter_unsupported_eol_print(main); @@ -264,7 +264,7 @@ extern "C" { for (; range.start <= range.stop; ++range.start) { if (block.string[range.start] == fss_basic_write_pipe_content_start_s) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[%sThis standard only supports one content per object.%]%c", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context, f_string_eol_s[0]); } diff --git a/level_3/fss_basic_write/data/build/dependencies b/level_3/fss_basic_write/data/build/dependencies index 25e27eb..b944420 100644 --- a/level_3/fss_basic_write/data/build/dependencies +++ b/level_3/fss_basic_write/data/build/dependencies @@ -19,7 +19,6 @@ fl_console fl_conversion fl_fss fl_print -fl_status fl_string fll_error fll_file diff --git a/level_3/fss_basic_write/data/build/settings b/level_3/fss_basic_write/data/build/settings index 8ed0368..2eb73b6 100644 --- a/level_3/fss_basic_write/data/build/settings +++ b/level_3/fss_basic_write/data/build/settings @@ -21,7 +21,7 @@ build_indexer ar build_indexer_arguments rcs build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -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_signal -lf_string -lf_type_array -lf_utf +build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -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_signal -lf_status_string -lf_string -lf_type_array -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared 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 1021763..1b05c31 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 @@ -125,7 +125,7 @@ extern "C" { const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_embedded_list_read_total_parameters_d); { - f_console_parameter_id_t ids[3] = { fss_embedded_list_read_parameter_no_color, fss_embedded_list_read_parameter_light, fss_embedded_list_read_parameter_dark }; + f_console_parameter_id_t ids[3] = { fss_embedded_list_read_parameter_no_color_e, fss_embedded_list_read_parameter_light_e, fss_embedded_list_read_parameter_dark_e }; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3); status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context); @@ -158,7 +158,7 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_embedded_list_read_parameter_verbosity_quiet, fss_embedded_list_read_parameter_verbosity_normal, fss_embedded_list_read_parameter_verbosity_verbose, fss_embedded_list_read_parameter_verbosity_debug }; + f_console_parameter_id_t ids[4] = { fss_embedded_list_read_parameter_verbosity_quiet_e, fss_embedded_list_read_parameter_verbosity_normal_e, fss_embedded_list_read_parameter_verbosity_verbose_e, fss_embedded_list_read_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); @@ -169,47 +169,47 @@ extern "C" { return status; } - if (choice == fss_embedded_list_read_parameter_verbosity_quiet) { - main->output.verbosity = f_console_verbosity_quiet; - main->error.verbosity = f_console_verbosity_quiet; - main->warning.verbosity = f_console_verbosity_quiet; + if (choice == fss_embedded_list_read_parameter_verbosity_quiet_e) { + main->output.verbosity = f_console_verbosity_quiet_e; + main->error.verbosity = f_console_verbosity_quiet_e; + main->warning.verbosity = f_console_verbosity_quiet_e; } - else if (choice == fss_embedded_list_read_parameter_verbosity_normal) { - main->output.verbosity = f_console_verbosity_normal; - main->error.verbosity = f_console_verbosity_normal; - main->warning.verbosity = f_console_verbosity_normal; + else if (choice == fss_embedded_list_read_parameter_verbosity_normal_e) { + main->output.verbosity = f_console_verbosity_normal_e; + main->error.verbosity = f_console_verbosity_normal_e; + main->warning.verbosity = f_console_verbosity_normal_e; } - else if (choice == fss_embedded_list_read_parameter_verbosity_verbose) { - main->output.verbosity = f_console_verbosity_verbose; - main->error.verbosity = f_console_verbosity_verbose; - main->warning.verbosity = f_console_verbosity_verbose; + else if (choice == fss_embedded_list_read_parameter_verbosity_verbose_e) { + main->output.verbosity = f_console_verbosity_verbose_e; + main->error.verbosity = f_console_verbosity_verbose_e; + main->warning.verbosity = f_console_verbosity_verbose_e; } - else if (choice == fss_embedded_list_read_parameter_verbosity_debug) { - main->output.verbosity = f_console_verbosity_debug; - main->error.verbosity = f_console_verbosity_debug; - main->warning.verbosity = f_console_verbosity_debug; + else if (choice == fss_embedded_list_read_parameter_verbosity_debug_e) { + main->output.verbosity = f_console_verbosity_debug_e; + main->error.verbosity = f_console_verbosity_debug_e; + main->warning.verbosity = f_console_verbosity_debug_e; } } status = F_none; } - if (main->parameters[fss_embedded_list_read_parameter_help].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_help_e].result == f_console_result_found_e) { fss_embedded_list_read_print_help(main->output.to, main->context); fss_embedded_list_read_main_delete(main); return F_none; } - if (main->parameters[fss_embedded_list_read_parameter_version].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_version_e].result == f_console_result_found_e) { fll_program_print_version(main->output.to, fss_embedded_list_read_program_version_s); fss_embedded_list_read_main_delete(main); return F_none; } - if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_total].result == f_console_result_found) { - if (main->parameters[fss_embedded_list_read_parameter_columns].result == f_console_result_found) { + if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) { + if (main->parameters[fss_embedded_list_read_parameter_columns_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -225,7 +225,7 @@ extern "C" { } if (main->remaining.used > 0 || main->process_pipe) { - if (main->parameters[fss_embedded_list_read_parameter_at].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_at_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -237,7 +237,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_depth].result == f_console_result_found) { + if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_depth_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -249,7 +249,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_line].result == f_console_result_additional) { + if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_line_e].result == f_console_result_additional_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -261,7 +261,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_name].result == f_console_result_found) { + if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_name_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -273,7 +273,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_select].result == f_console_result_found) { + if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_select_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -285,8 +285,8 @@ extern "C" { status = F_status_set_error(F_parameter); } - if (main->parameters[fss_embedded_list_read_parameter_line].result == f_console_result_additional) { - if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_total].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_line_e].result == f_console_result_additional_e) { + if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -301,8 +301,8 @@ extern "C" { } } - if (main->parameters[fss_embedded_list_read_parameter_pipe].result == f_console_result_found) { - if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_total].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_pipe_e].result == f_console_result_found_e) { + if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -318,7 +318,7 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[fss_embedded_list_read_parameter_delimit].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_delimit_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -329,8 +329,8 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_embedded_list_read_parameter_delimit].result == f_console_result_additional) { - const f_array_length_t location = main->parameters[fss_embedded_list_read_parameter_delimit].values.array[0]; + else if (main->parameters[fss_embedded_list_read_parameter_delimit_e].result == f_console_result_additional_e) { + const f_array_length_t location = main->parameters[fss_embedded_list_read_parameter_delimit_e].values.array[0]; f_array_length_t length = strnlen(arguments->argv[location], f_console_parameter_size); if (length == 0) { @@ -345,22 +345,22 @@ extern "C" { status = F_status_set_error(F_parameter); } else if (fl_string_compare(arguments->argv[location], fss_embedded_list_read_delimit_mode_name_none_s, length, fss_embedded_list_read_delimit_mode_name_none_s_length) == F_equal_to) { - main->delimit_mode = fss_embedded_list_read_delimit_mode_none; + main->delimit_mode = fss_embedded_list_read_delimit_mode_none_e; } else if (fl_string_compare(arguments->argv[location], fss_embedded_list_read_delimit_mode_name_all_s, length, fss_embedded_list_read_delimit_mode_name_all_s_length) == F_equal_to) { - main->delimit_mode = fss_embedded_list_read_delimit_mode_all; + main->delimit_mode = fss_embedded_list_read_delimit_mode_all_e; } else { - main->delimit_mode = fss_embedded_list_read_delimit_mode_depth; + main->delimit_mode = fss_embedded_list_read_delimit_mode_depth_e; if (arguments->argv[location][length - 1] == fss_embedded_list_read_delimit_mode_name_greater_s[0]) { - main->delimit_mode = fss_embedded_list_read_delimit_mode_depth_greater; + main->delimit_mode = fss_embedded_list_read_delimit_mode_depth_greater_e; // shorten the length to better convert the remainder to a number. --length; } else if (arguments->argv[location][length - 1] == fss_embedded_list_read_delimit_mode_name_lesser_s[0]) { - main->delimit_mode = fss_embedded_list_read_delimit_mode_depth_lesser; + main->delimit_mode = fss_embedded_list_read_delimit_mode_depth_lesser_e; // shorten the length to better convert the remainder to a number. --length; @@ -398,7 +398,7 @@ extern "C" { } } - if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_select].result == f_console_result_found) { + if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_select_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -418,13 +418,13 @@ extern "C" { status = f_file_read(file, &main->buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read", F_true, "-", "read", fll_error_file_type_pipe); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read", F_true, "-", "read", fll_error_file_type_pipe_e); } else { status = fss_embedded_list_read_main_process_file(main, arguments, "-", depths, &objects_delimits, &contents_delimits, &comments); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "fss_embedded_list_read_main_process_file", F_true, "-", "read", fll_error_file_type_pipe); + fll_error_file_print(main->error, F_status_set_fine(status), "fss_embedded_list_read_main_process_file", F_true, "-", "read", fll_error_file_type_pipe_e); } } @@ -448,14 +448,14 @@ extern "C" { main->quantity.total = original_size; if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, arguments->argv[main->remaining.array[i]], "open", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, arguments->argv[main->remaining.array[i]], "open", fll_error_file_type_file_e); break; } if (!main->quantity.total) { status = f_file_size_by_id(file.id, &main->quantity.total); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file_e); f_file_stream_close(F_true, &file); break; @@ -463,7 +463,7 @@ extern "C" { // Skip past empty files. if (!main->quantity.total) { - if (main->parameters[fss_embedded_list_read_parameter_total].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) { fll_print_format("0%c", main->output.to.stream, f_string_eol_s[0]); } @@ -477,14 +477,14 @@ extern "C" { f_file_stream_close(F_true, &file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read_until", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read_until", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file_e); break; } status = fss_embedded_list_read_main_process_file(main, arguments, arguments->argv[main->remaining.array[i]], depths, &objects_delimits, &contents_delimits, &comments); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "fss_embedded_list_read_main_process_file", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "fss_embedded_list_read_main_process_file", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file_e); break; } @@ -509,7 +509,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { if (F_status_set_fine(status) == F_interrupt) { fflush(main->output.to.stream); 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 c698046..7a031a5 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 @@ -110,57 +110,57 @@ extern "C" { #define fss_embedded_list_read_long_trim_s "trim" enum { - fss_embedded_list_read_parameter_help, - fss_embedded_list_read_parameter_light, - fss_embedded_list_read_parameter_dark, - fss_embedded_list_read_parameter_no_color, - fss_embedded_list_read_parameter_verbosity_quiet, - fss_embedded_list_read_parameter_verbosity_normal, - fss_embedded_list_read_parameter_verbosity_verbose, - fss_embedded_list_read_parameter_verbosity_debug, - fss_embedded_list_read_parameter_version, - - fss_embedded_list_read_parameter_at, - fss_embedded_list_read_parameter_content, - fss_embedded_list_read_parameter_columns, - fss_embedded_list_read_parameter_delimit, - fss_embedded_list_read_parameter_depth, - fss_embedded_list_read_parameter_empty, - fss_embedded_list_read_parameter_line, - fss_embedded_list_read_parameter_name, - fss_embedded_list_read_parameter_object, - fss_embedded_list_read_parameter_pipe, - fss_embedded_list_read_parameter_raw, - fss_embedded_list_read_parameter_select, - fss_embedded_list_read_parameter_total, - fss_embedded_list_read_parameter_trim, + fss_embedded_list_read_parameter_help_e, + fss_embedded_list_read_parameter_light_e, + fss_embedded_list_read_parameter_dark_e, + fss_embedded_list_read_parameter_no_color_e, + fss_embedded_list_read_parameter_verbosity_quiet_e, + fss_embedded_list_read_parameter_verbosity_normal_e, + fss_embedded_list_read_parameter_verbosity_verbose_e, + fss_embedded_list_read_parameter_verbosity_debug_e, + fss_embedded_list_read_parameter_version_e, + + fss_embedded_list_read_parameter_at_e, + fss_embedded_list_read_parameter_content_e, + fss_embedded_list_read_parameter_columns_e, + fss_embedded_list_read_parameter_delimit_e, + fss_embedded_list_read_parameter_depth_e, + fss_embedded_list_read_parameter_empty_e, + fss_embedded_list_read_parameter_line_e, + fss_embedded_list_read_parameter_name_e, + fss_embedded_list_read_parameter_object_e, + fss_embedded_list_read_parameter_pipe_e, + fss_embedded_list_read_parameter_raw_e, + fss_embedded_list_read_parameter_select_e, + fss_embedded_list_read_parameter_total_e, + fss_embedded_list_read_parameter_trim_e, }; #define fss_embedded_list_read_console_parameter_t_initialize \ { \ - 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_s, fss_embedded_list_read_long_at_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_content_s, fss_embedded_list_read_long_content_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_columns_s, fss_embedded_list_read_long_columns_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_delimit_s, fss_embedded_list_read_long_delimit_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_depth_s, fss_embedded_list_read_long_depth_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_empty_s, fss_embedded_list_read_long_empty_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_line_s, fss_embedded_list_read_long_line_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_name_s, fss_embedded_list_read_long_name_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_object_s, fss_embedded_list_read_long_object_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_pipe_s, fss_embedded_list_read_long_pipe_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_raw_s, fss_embedded_list_read_long_raw_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_select_s, fss_embedded_list_read_long_select_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_total_s, fss_embedded_list_read_long_total_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_trim_s, fss_embedded_list_read_long_trim_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse_e), \ + 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_e), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_at_s, fss_embedded_list_read_long_at_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_content_s, fss_embedded_list_read_long_content_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_columns_s, fss_embedded_list_read_long_columns_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_delimit_s, fss_embedded_list_read_long_delimit_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_depth_s, fss_embedded_list_read_long_depth_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_empty_s, fss_embedded_list_read_long_empty_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_line_s, fss_embedded_list_read_long_line_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_name_s, fss_embedded_list_read_long_name_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_object_s, fss_embedded_list_read_long_object_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_pipe_s, fss_embedded_list_read_long_pipe_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_raw_s, fss_embedded_list_read_long_raw_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_select_s, fss_embedded_list_read_long_select_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_total_s, fss_embedded_list_read_long_total_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_trim_s, fss_embedded_list_read_long_trim_s, 0, 0, f_console_type_normal_e), \ } #define fss_embedded_list_read_total_parameters_d 23 @@ -178,11 +178,11 @@ extern "C" { #define fss_embedded_list_read_delimit_mode_name_lesser_s_length 1 enum { - fss_embedded_list_read_delimit_mode_none = 1, - fss_embedded_list_read_delimit_mode_all, - fss_embedded_list_read_delimit_mode_depth, - fss_embedded_list_read_delimit_mode_depth_greater, - fss_embedded_list_read_delimit_mode_depth_lesser, + fss_embedded_list_read_delimit_mode_none_e = 1, + fss_embedded_list_read_delimit_mode_all_e, + fss_embedded_list_read_delimit_mode_depth_e, + fss_embedded_list_read_delimit_mode_depth_greater_e, + fss_embedded_list_read_delimit_mode_depth_lesser_e, }; #endif // _di_fss_embedded_list_read_delimit_modes_ @@ -221,7 +221,7 @@ extern "C" { f_string_dynamic_t_initialize, \ f_fss_nest_t_initialize, \ f_string_quantity_t_initialize, \ - fss_embedded_list_read_delimit_mode_all, \ + fss_embedded_list_read_delimit_mode_all_e, \ 0, \ f_color_context_t_initialize, \ } diff --git a/level_3/fss_embedded_list_read/c/private-common.c b/level_3/fss_embedded_list_read/c/private-common.c index 3f211cd..42bb9c4 100644 --- a/level_3/fss_embedded_list_read/c/private-common.c +++ b/level_3/fss_embedded_list_read/c/private-common.c @@ -8,7 +8,7 @@ extern "C" { #ifndef _di_fss_embedded_list_read_print_signal_received_ void fss_embedded_list_read_print_signal_received(fss_embedded_list_read_main_t * const main, const f_status_t signal) { - if (main->warning.verbosity != f_console_verbosity_verbose) return; + if (main->warning.verbosity != f_console_verbosity_verbose_e) return; // Must flush and reset color because the interrupt may have interrupted the middle of a print function. fflush(main->warning.to.stream); 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 b79a1af..84145fd 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 @@ -11,7 +11,7 @@ extern "C" { f_status_t status = F_none; - const f_array_length_t values_total = main->parameters[fss_embedded_list_read_parameter_depth].values.used + main->parameters[fss_embedded_list_read_parameter_at].values.used + main->parameters[fss_embedded_list_read_parameter_name].values.used; + const f_array_length_t values_total = main->parameters[fss_embedded_list_read_parameter_depth_e].values.used + main->parameters[fss_embedded_list_read_parameter_at_e].values.used + main->parameters[fss_embedded_list_read_parameter_name_e].values.used; f_array_length_t values_order[values_total]; f_array_length_t values_type[values_total]; @@ -26,73 +26,73 @@ extern "C" { f_array_length_t k = 0; f_array_length_t l = 0; - for (; j < main->parameters[fss_embedded_list_read_parameter_depth].values.used; ++j) { + for (; j < main->parameters[fss_embedded_list_read_parameter_depth_e].values.used; ++j) { - values_order[i] = main->parameters[fss_embedded_list_read_parameter_depth].values.array[j]; - values_type[i++] = fss_embedded_list_read_parameter_depth; + values_order[i] = main->parameters[fss_embedded_list_read_parameter_depth_e].values.array[j]; + values_type[i++] = fss_embedded_list_read_parameter_depth_e; } // for if (i) { - for (j = 0; j < main->parameters[fss_embedded_list_read_parameter_at].values.used; ++j) { + for (j = 0; j < main->parameters[fss_embedded_list_read_parameter_at_e].values.used; ++j) { for (k = 0; k < i; ++k) { - if (values_order[k] > main->parameters[fss_embedded_list_read_parameter_at].values.array[j]) { + if (values_order[k] > main->parameters[fss_embedded_list_read_parameter_at_e].values.array[j]) { for (l = i; l > k; --l) { values_order[l] = values_order[l - 1]; values_type[l] = values_type[l - 1]; } // for - values_order[k] = main->parameters[fss_embedded_list_read_parameter_at].values.array[j]; - values_type[k] = fss_embedded_list_read_parameter_at; + values_order[k] = main->parameters[fss_embedded_list_read_parameter_at_e].values.array[j]; + values_type[k] = fss_embedded_list_read_parameter_at_e; i++; break; } } // for if (k == i) { - values_order[i] = main->parameters[fss_embedded_list_read_parameter_at].values.array[j]; - values_type[i++] = fss_embedded_list_read_parameter_at; + values_order[i] = main->parameters[fss_embedded_list_read_parameter_at_e].values.array[j]; + values_type[i++] = fss_embedded_list_read_parameter_at_e; } } // for } else { - for (; j < main->parameters[fss_embedded_list_read_parameter_at].values.used; ++j) { + for (; j < main->parameters[fss_embedded_list_read_parameter_at_e].values.used; ++j) { - values_order[i] = main->parameters[fss_embedded_list_read_parameter_at].values.array[j]; - values_type[i++] = fss_embedded_list_read_parameter_at; + values_order[i] = main->parameters[fss_embedded_list_read_parameter_at_e].values.array[j]; + values_type[i++] = fss_embedded_list_read_parameter_at_e; } // for } if (i) { - for (j = 0; j < main->parameters[fss_embedded_list_read_parameter_name].values.used; ++j) { + for (j = 0; j < main->parameters[fss_embedded_list_read_parameter_name_e].values.used; ++j) { for (k = 0; k < i; ++k) { - if (values_order[k] > main->parameters[fss_embedded_list_read_parameter_name].values.array[j]) { + if (values_order[k] > main->parameters[fss_embedded_list_read_parameter_name_e].values.array[j]) { for (l = i; l > k; --l) { values_order[l] = values_order[l - 1]; values_type[l] = values_type[l - 1]; } // for - values_order[k] = main->parameters[fss_embedded_list_read_parameter_name].values.array[j]; - values_type[k] = fss_embedded_list_read_parameter_name; + values_order[k] = main->parameters[fss_embedded_list_read_parameter_name_e].values.array[j]; + values_type[k] = fss_embedded_list_read_parameter_name_e; i++; break; } } // for if (k == i) { - values_order[i] = main->parameters[fss_embedded_list_read_parameter_name].values.array[j]; - values_type[i++] = fss_embedded_list_read_parameter_name; + values_order[i] = main->parameters[fss_embedded_list_read_parameter_name_e].values.array[j]; + values_type[i++] = fss_embedded_list_read_parameter_name_e; } } // for } else { - for (; j < main->parameters[fss_embedded_list_read_parameter_name].values.used; ++j) { + for (; j < main->parameters[fss_embedded_list_read_parameter_name_e].values.used; ++j) { - values_order[i] = main->parameters[fss_embedded_list_read_parameter_name].values.array[j]; - values_type[i++] = fss_embedded_list_read_parameter_name; + values_order[i] = main->parameters[fss_embedded_list_read_parameter_name_e].values.array[j]; + values_type[i++] = fss_embedded_list_read_parameter_name_e; } // for } } @@ -100,8 +100,8 @@ extern "C" { { i = 1; - if (main->parameters[fss_embedded_list_read_parameter_depth].result == f_console_result_additional) { - i = main->parameters[fss_embedded_list_read_parameter_depth].values.used + 1; + if (main->parameters[fss_embedded_list_read_parameter_depth_e].result == f_console_result_additional_e) { + i = main->parameters[fss_embedded_list_read_parameter_depth_e].values.used + 1; } macro_fss_embedded_list_read_depths_t_resize(status, (*depths), i); @@ -129,7 +129,7 @@ extern "C" { return F_status_set_error(F_interrupt); } - if (values_type[i] == fss_embedded_list_read_parameter_depth || values_type[i] == fss_embedded_list_read_parameter_at) { + if (values_type[i] == fss_embedded_list_read_parameter_depth_e || values_type[i] == fss_embedded_list_read_parameter_at_e) { const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[values_order[i]])); status = fl_conversion_string_to_number_unsigned(arguments->argv[values_order[i]], range, &number); @@ -141,7 +141,7 @@ extern "C" { } } - if (values_type[i] == fss_embedded_list_read_parameter_depth) { + if (values_type[i] == fss_embedded_list_read_parameter_depth_e) { if (first_depth) { if (i && number) { @@ -160,15 +160,15 @@ extern "C" { depths->array[depths->used].value_at = 0; } } - else if (values_type[i] == fss_embedded_list_read_parameter_at) { + else if (values_type[i] == fss_embedded_list_read_parameter_at_e) { depths->array[depths->used].index_at = values_order[i]; depths->array[depths->used].value_at = number; } - else if (values_type[i] == fss_embedded_list_read_parameter_name) { + else if (values_type[i] == fss_embedded_list_read_parameter_name_e) { depths->array[depths->used].index_name = values_order[i]; depths->array[depths->used].value_name.used = 0; - if (main->parameters[fss_embedded_list_read_parameter_trim].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_trim_e].result == f_console_result_found_e) { status = fl_string_rip(arguments->argv[values_order[i]], strnlen(arguments->argv[values_order[i]], f_console_parameter_size), &depths->array[depths->used].value_name); if (F_status_is_error(status)) { @@ -247,14 +247,14 @@ extern "C" { status = fll_fss_embedded_list_read(main->buffer, state, &input, &main->nest, objects_delimits, contents_delimits, comments); if (F_status_is_error(status)) { - // @todo detect and replace fll_error_file_type_file with fll_error_file_type_pipe as appropriate. - fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_embedded_list_read", F_true, filename, "process", fll_error_file_type_file); + // @todo detect and replace fll_error_file_type_file_e with fll_error_file_type_pipe_e as appropriate. + fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_embedded_list_read", F_true, filename, "process", fll_error_file_type_file_e); } else if (status == F_data_not_stop || status == F_data_not_eos) { macro_f_fss_nest_t_delete_simple(main->nest); macro_f_string_dynamic_t_delete_simple(main->buffer); - if (main->parameters[fss_embedded_list_read_parameter_total].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) { fll_print_format("0%c", main->output.to.stream, f_string_eol_s[0]); return F_none; @@ -283,7 +283,7 @@ extern "C" { // Requested depths cannot be greater than contents depth. if (depths.used > main->nest.used) { - if (main->parameters[fss_embedded_list_read_parameter_total].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) { fll_print_format("0%c", main->output.to.stream, f_string_eol_s[0]); return F_none; @@ -295,8 +295,8 @@ extern "C" { { f_number_unsigned_t select = 0; - if (main->parameters[fss_embedded_list_read_parameter_select].result == f_console_result_additional) { - const f_array_length_t index = main->parameters[fss_embedded_list_read_parameter_select].values.array[main->parameters[fss_embedded_list_read_parameter_select].values.used - 1]; + if (main->parameters[fss_embedded_list_read_parameter_select_e].result == f_console_result_additional_e) { + const f_array_length_t index = main->parameters[fss_embedded_list_read_parameter_select_e].values.array[main->parameters[fss_embedded_list_read_parameter_select_e].values.used - 1]; const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[index])); status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, &select); @@ -316,8 +316,8 @@ extern "C" { f_array_length_t line = 0; - if (main->parameters[fss_embedded_list_read_parameter_line].result == f_console_result_additional) { - const f_array_length_t index = main->parameters[fss_embedded_list_read_parameter_line].values.array[main->parameters[fss_embedded_list_read_parameter_line].values.used - 1]; + if (main->parameters[fss_embedded_list_read_parameter_line_e].result == f_console_result_additional_e) { + const f_array_length_t index = main->parameters[fss_embedded_list_read_parameter_line_e].values.array[main->parameters[fss_embedded_list_read_parameter_line_e].values.used - 1]; const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[index])); status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, &line); @@ -334,7 +334,7 @@ extern "C" { const fss_embedded_list_read_skip_t parents = fss_embedded_list_read_skip_t_initialize; - if (main->parameters[fss_embedded_list_read_parameter_raw].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_raw_e].result == f_console_result_found_e) { f_fss_delimits_t except_none = f_fss_delimits_t_initialize; return fss_embedded_list_read_main_process_for_depth(main, arguments, filename, depths, 0, line, parents, &except_none, &except_none); @@ -386,7 +386,7 @@ extern "C" { if (depths.array[depths_index].value_at < items->used && !skip[depths.array[depths_index].value_at]) { if (depths.array[depths_index].index_name) { - if (main->parameters[fss_embedded_list_read_parameter_trim].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_trim_e].result == f_console_result_found_e) { if (fl_string_dynamic_partial_compare_except_trim_dynamic(depths.array[depths_index].value_name, main->buffer, items->array[depths.array[depths_index].value_at].object, except_none, *objects_delimits) != F_equal_to) { skip[depths.array[depths_index].value_at] = F_true; @@ -401,7 +401,7 @@ extern "C" { } } else { - if (main->parameters[fss_embedded_list_read_parameter_trim].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_trim_e].result == f_console_result_found_e) { for (i = 0; i < items->used; ++i) { if (skip[i]) continue; @@ -494,8 +494,8 @@ extern "C" { f_array_length_t i = 0; f_array_length_t j = 0; - if (main->parameters[fss_embedded_list_read_parameter_object].result == f_console_result_found) { - if (main->parameters[fss_embedded_list_read_parameter_total].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_object_e].result == f_console_result_found_e) { + if (main->parameters[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) { f_array_length_t total = 0; for (i = 0; i < items->used; ++i) { @@ -511,7 +511,7 @@ extern "C" { f_status_t (*print_object)(const f_string_static_t, const f_string_range_t, const f_array_lengths_t, FILE *) = &f_print_except_dynamic_partial; - if (main->parameters[fss_embedded_list_read_parameter_trim].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_trim_e].result == f_console_result_found_e) { print_object = &fl_print_trim_except_dynamic_partial; } @@ -523,7 +523,7 @@ extern "C" { print_object(main->buffer, items->array[i].object, *objects_delimits, main->output.to.stream); - if (main->parameters[fss_embedded_list_read_parameter_content].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_content_e].result == f_console_result_found_e) { fss_embedded_list_read_print_object_end(main); if (items->array[i].content.used) { @@ -542,11 +542,11 @@ extern "C" { // process contents. bool include_empty = 0; - if (main->parameters[fss_embedded_list_read_parameter_empty].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_empty_e].result == f_console_result_found_e) { include_empty = 1; } - if (main->parameters[fss_embedded_list_read_parameter_total].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) { f_array_length_t total = 0; for (i = 0; i < items->used; ++i) { @@ -580,7 +580,7 @@ extern "C" { return F_none; } - if (main->parameters[fss_embedded_list_read_parameter_line].result == f_console_result_additional) { + if (main->parameters[fss_embedded_list_read_parameter_line_e].result == f_console_result_additional_e) { f_array_length_t line_current = 0; flockfile(main->output.to.stream); @@ -658,7 +658,7 @@ extern "C" { f_print_except_dynamic_partial(main->buffer, items->array[i].content.array[0], *contents_delimits, main->output.to.stream); - if (main->parameters[fss_embedded_list_read_parameter_pipe].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_pipe_e].result == f_console_result_found_e) { f_print_character(fss_embedded_list_read_pipe_content_end_s, main->output.to.stream); } } // for @@ -672,11 +672,11 @@ extern "C" { #ifndef _di_fss_embedded_list_read_print_object_end_ void fss_embedded_list_read_print_object_end(fss_embedded_list_read_main_t * const main) { - if (main->parameters[fss_embedded_list_read_parameter_pipe].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_pipe_e].result == f_console_result_found_e) { f_print_character(fss_embedded_list_read_pipe_content_start_s, main->output.to.stream); } else { - if (main->parameters[fss_embedded_list_read_parameter_object].result == f_console_result_found && main->parameters[fss_embedded_list_read_parameter_content].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_object_e].result == f_console_result_found_e && main->parameters[fss_embedded_list_read_parameter_content_e].result == f_console_result_found_e) { f_print_character(f_fss_embedded_list_open_s[0], main->output.to.stream); f_print_character(f_fss_embedded_list_open_end_s[0], main->output.to.stream); } @@ -690,7 +690,7 @@ extern "C" { #ifndef _di_fss_embedded_list_read_print_content_ignore_ void fss_embedded_list_read_print_content_ignore(fss_embedded_list_read_main_t * const main) { - if (main->parameters[fss_embedded_list_read_parameter_pipe].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_pipe_e].result == f_console_result_found_e) { f_print_character(fss_embedded_list_read_pipe_content_ignore_s, main->output.to.stream); } } @@ -699,11 +699,11 @@ extern "C" { #ifndef _di_fss_embedded_list_read_print_set_end_ void fss_embedded_list_read_print_set_end(fss_embedded_list_read_main_t * const main) { - if (main->parameters[fss_embedded_list_read_parameter_pipe].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_pipe_e].result == f_console_result_found_e) { f_print_character(fss_embedded_list_read_pipe_content_end_s, main->output.to.stream); } else { - if (main->parameters[fss_embedded_list_read_parameter_object].result == f_console_result_found && main->parameters[fss_embedded_list_read_parameter_content].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_read_parameter_object_e].result == f_console_result_found_e && main->parameters[fss_embedded_list_read_parameter_content_e].result == f_console_result_found_e) { f_print_character(f_fss_embedded_list_close_s[0], main->output.to.stream); f_print_character(f_fss_embedded_list_close_end_s[0], main->output.to.stream); } @@ -719,18 +719,18 @@ extern "C" { if (!main->nest.used) return; - if ((!objects_delimits->used && !contents_delimits->used) || main->delimit_mode == fss_embedded_list_read_delimit_mode_all) return; + if ((!objects_delimits->used && !contents_delimits->used) || main->delimit_mode == fss_embedded_list_read_delimit_mode_all_e) return; - if (main->delimit_mode == fss_embedded_list_read_delimit_mode_depth_lesser && main->nest.used < main->delimit_depth) return; - if (main->delimit_mode == fss_embedded_list_read_delimit_mode_depth_greater && main->delimit_depth == 0) return; + if (main->delimit_mode == fss_embedded_list_read_delimit_mode_depth_lesser_e && main->nest.used < main->delimit_depth) return; + if (main->delimit_mode == fss_embedded_list_read_delimit_mode_depth_greater_e && main->delimit_depth == 0) return; - if (main->delimit_mode == fss_embedded_list_read_delimit_mode_none) { + if (main->delimit_mode == fss_embedded_list_read_delimit_mode_none_e) { objects_delimits->used = 0; contents_delimits->used = 0; return; } - if (main->delimit_mode == fss_embedded_list_read_delimit_mode_depth || main->delimit_mode == fss_embedded_list_read_delimit_mode_depth_greater) { + if (main->delimit_mode == fss_embedded_list_read_delimit_mode_depth_e || main->delimit_mode == fss_embedded_list_read_delimit_mode_depth_greater_e) { if (main->delimit_depth >= main->nest.used) { objects_delimits->used = 0; contents_delimits->used = 0; @@ -750,7 +750,7 @@ extern "C" { objects_delimits->used = 0; contents_delimits->used = 0; - if (main->delimit_mode == fss_embedded_list_read_delimit_mode_depth) { + if (main->delimit_mode == fss_embedded_list_read_delimit_mode_depth_e) { // only depth 0 objects are stored in objects_delimits. if (main->delimit_depth) { @@ -764,7 +764,7 @@ extern "C" { } else { - if (main->delimit_mode == fss_embedded_list_read_delimit_mode_depth_lesser) { + if (main->delimit_mode == fss_embedded_list_read_delimit_mode_depth_lesser_e) { // only depth 0 objects are stored in objects_delimits. fss_embedded_list_read_process_delimits_objects(main, 0, original_objects_delimits, original_objects_used, objects_delimits); @@ -776,7 +776,7 @@ extern "C" { fss_embedded_list_read_process_delimits_contents(main, i, original_contents_delimits, original_contents_used, contents_delimits); } // for } - else if (main->delimit_mode == fss_embedded_list_read_delimit_mode_depth_greater) { + else if (main->delimit_mode == fss_embedded_list_read_delimit_mode_depth_greater_e) { for (f_array_length_t i = main->delimit_depth; i < main->nest.used; ++i) { fss_embedded_list_read_process_delimits_objects(main, i, original_contents_delimits, original_contents_used, contents_delimits); diff --git a/level_3/fss_embedded_list_read/data/build/dependencies b/level_3/fss_embedded_list_read/data/build/dependencies index 25e27eb..b944420 100644 --- a/level_3/fss_embedded_list_read/data/build/dependencies +++ b/level_3/fss_embedded_list_read/data/build/dependencies @@ -19,7 +19,6 @@ fl_console fl_conversion fl_fss fl_print -fl_status fl_string fll_error fll_file diff --git a/level_3/fss_embedded_list_read/data/build/settings b/level_3/fss_embedded_list_read/data/build/settings index 99b237d..68798d6 100644 --- a/level_3/fss_embedded_list_read/data/build/settings +++ b/level_3/fss_embedded_list_read/data/build/settings @@ -21,7 +21,7 @@ build_indexer ar build_indexer_arguments rcs build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -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_signal -lf_string -lf_type_array -lf_utf +build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -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_signal -lf_status_string -lf_string -lf_type_array -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared 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 f0cfcf8..ab80cd8 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 @@ -67,7 +67,7 @@ extern "C" { const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_embedded_list_write_total_parameters_d); { - f_console_parameter_id_t ids[3] = { fss_embedded_list_write_parameter_no_color, fss_embedded_list_write_parameter_light, fss_embedded_list_write_parameter_dark }; + f_console_parameter_id_t ids[3] = { fss_embedded_list_write_parameter_no_color_e, fss_embedded_list_write_parameter_light_e, fss_embedded_list_write_parameter_dark_e }; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3); status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context); @@ -100,7 +100,7 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_embedded_list_write_parameter_verbosity_quiet, fss_embedded_list_write_parameter_verbosity_normal, fss_embedded_list_write_parameter_verbosity_verbose, fss_embedded_list_write_parameter_verbosity_debug }; + f_console_parameter_id_t ids[4] = { fss_embedded_list_write_parameter_verbosity_quiet_e, fss_embedded_list_write_parameter_verbosity_normal_e, fss_embedded_list_write_parameter_verbosity_verbose_e, fss_embedded_list_write_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); @@ -111,39 +111,39 @@ extern "C" { return status; } - if (choice == fss_embedded_list_write_parameter_verbosity_quiet) { - main->output.verbosity = f_console_verbosity_quiet; - main->error.verbosity = f_console_verbosity_quiet; - main->warning.verbosity = f_console_verbosity_quiet; + if (choice == fss_embedded_list_write_parameter_verbosity_quiet_e) { + main->output.verbosity = f_console_verbosity_quiet_e; + main->error.verbosity = f_console_verbosity_quiet_e; + main->warning.verbosity = f_console_verbosity_quiet_e; } - else if (choice == fss_embedded_list_write_parameter_verbosity_normal) { - main->output.verbosity = f_console_verbosity_normal; - main->error.verbosity = f_console_verbosity_normal; - main->warning.verbosity = f_console_verbosity_normal; + else if (choice == fss_embedded_list_write_parameter_verbosity_normal_e) { + main->output.verbosity = f_console_verbosity_normal_e; + main->error.verbosity = f_console_verbosity_normal_e; + main->warning.verbosity = f_console_verbosity_normal_e; } - else if (choice == fss_embedded_list_write_parameter_verbosity_verbose) { - main->output.verbosity = f_console_verbosity_verbose; - main->error.verbosity = f_console_verbosity_verbose; - main->warning.verbosity = f_console_verbosity_verbose; + else if (choice == fss_embedded_list_write_parameter_verbosity_verbose_e) { + main->output.verbosity = f_console_verbosity_verbose_e; + main->error.verbosity = f_console_verbosity_verbose_e; + main->warning.verbosity = f_console_verbosity_verbose_e; } - else if (choice == fss_embedded_list_write_parameter_verbosity_debug) { - main->output.verbosity = f_console_verbosity_debug; - main->error.verbosity = f_console_verbosity_debug; - main->warning.verbosity = f_console_verbosity_debug; + else if (choice == fss_embedded_list_write_parameter_verbosity_debug_e) { + main->output.verbosity = f_console_verbosity_debug_e; + main->error.verbosity = f_console_verbosity_debug_e; + main->warning.verbosity = f_console_verbosity_debug_e; } } status = F_none; } - if (main->parameters[fss_embedded_list_write_parameter_help].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_write_parameter_help_e].result == f_console_result_found_e) { fss_embedded_list_write_print_help(main->output.to, main->context); fss_embedded_list_write_main_delete(main); return status; } - if (main->parameters[fss_embedded_list_write_parameter_version].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_write_parameter_version_e].result == f_console_result_found_e) { fll_program_print_version(main->output.to, fss_embedded_list_write_program_version_s); fss_embedded_list_write_main_delete(main); @@ -157,9 +157,9 @@ extern "C" { output.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d; if (F_status_is_error_not(status)) { - if (main->parameters[fss_embedded_list_write_parameter_file].result == f_console_result_additional) { - if (main->parameters[fss_embedded_list_write_parameter_file].values.used > 1) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[fss_embedded_list_write_parameter_file_e].result == f_console_result_additional_e) { + if (main->parameters[fss_embedded_list_write_parameter_file_e].values.used > 1) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -172,41 +172,41 @@ extern "C" { status = F_status_set_error(F_parameter); } else { - const f_array_length_t location = main->parameters[fss_embedded_list_write_parameter_file].values.array[0]; + const f_array_length_t location = main->parameters[fss_embedded_list_write_parameter_file_e].values.array[0]; output.id = -1; output.stream = 0; status = f_file_stream_open(arguments->argv[location], 0, &output); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], "open", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], "open", fll_error_file_type_file_e); } } } - else if (main->parameters[fss_embedded_list_write_parameter_file].result == f_console_result_found) { + else if (main->parameters[fss_embedded_list_write_parameter_file_e].result == f_console_result_found_e) { fss_embedded_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_embedded_list_write_long_file_s); status = F_status_set_error(F_parameter); } } if (F_status_is_error_not(status)) { - if (main->parameters[fss_embedded_list_write_parameter_object].locations.used || main->parameters[fss_embedded_list_write_parameter_content].locations.used) { - if (main->parameters[fss_embedded_list_write_parameter_object].locations.used) { - if (main->parameters[fss_embedded_list_write_parameter_object].locations.used != main->parameters[fss_embedded_list_write_parameter_object].values.used) { + if (main->parameters[fss_embedded_list_write_parameter_object_e].locations.used || main->parameters[fss_embedded_list_write_parameter_content_e].locations.used) { + if (main->parameters[fss_embedded_list_write_parameter_object_e].locations.used) { + if (main->parameters[fss_embedded_list_write_parameter_object_e].locations.used != main->parameters[fss_embedded_list_write_parameter_object_e].values.used) { fss_embedded_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_embedded_list_write_long_object_s); status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_embedded_list_write_parameter_content].locations.used != main->parameters[fss_embedded_list_write_parameter_content].values.used) { + else if (main->parameters[fss_embedded_list_write_parameter_content_e].locations.used != main->parameters[fss_embedded_list_write_parameter_content_e].values.used) { fss_embedded_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content_s); status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_embedded_list_write_parameter_object].locations.used != main->parameters[fss_embedded_list_write_parameter_content].locations.used && main->parameters[fss_embedded_list_write_parameter_partial].result == f_console_result_none) { + else if (main->parameters[fss_embedded_list_write_parameter_object_e].locations.used != main->parameters[fss_embedded_list_write_parameter_content_e].locations.used && main->parameters[fss_embedded_list_write_parameter_partial_e].result == f_console_result_none_e) { fss_embedded_list_write_error_parameter_same_times_print(main); status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_embedded_list_write_parameter_content].locations.used && main->parameters[fss_embedded_list_write_parameter_partial].locations.used) { - if (main->parameters[fss_embedded_list_write_parameter_content].result == f_console_result_additional) { - if (main->error.verbosity != f_console_verbosity_quiet) { + else if (main->parameters[fss_embedded_list_write_parameter_content_e].locations.used && main->parameters[fss_embedded_list_write_parameter_partial_e].locations.used) { + if (main->parameters[fss_embedded_list_write_parameter_content_e].result == f_console_result_additional_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -225,20 +225,20 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[fss_embedded_list_write_parameter_content].result == f_console_result_additional) { + if (main->parameters[fss_embedded_list_write_parameter_content_e].result == f_console_result_additional_e) { f_array_length_t location_object = 0; f_array_length_t location_content = 0; f_array_length_t location_sub_object = 0; f_array_length_t location_sub_content = 0; - for (f_array_length_t i = 0; i < main->parameters[fss_embedded_list_write_parameter_object].locations.used; ++i) { - location_object = main->parameters[fss_embedded_list_write_parameter_object].locations.array[i]; - location_content = main->parameters[fss_embedded_list_write_parameter_content].locations.array[i]; - location_sub_object = main->parameters[fss_embedded_list_write_parameter_object].locations_sub.array[i]; - location_sub_content = main->parameters[fss_embedded_list_write_parameter_content].locations_sub.array[i]; + for (f_array_length_t i = 0; i < main->parameters[fss_embedded_list_write_parameter_object_e].locations.used; ++i) { + location_object = main->parameters[fss_embedded_list_write_parameter_object_e].locations.array[i]; + location_content = main->parameters[fss_embedded_list_write_parameter_content_e].locations.array[i]; + location_sub_object = main->parameters[fss_embedded_list_write_parameter_object_e].locations_sub.array[i]; + location_sub_content = main->parameters[fss_embedded_list_write_parameter_content_e].locations_sub.array[i]; if (location_object > location_content || location_object == location_content && location_sub_object > location_sub_content) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sEach '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -257,19 +257,19 @@ extern "C" { } } } - else if (main->parameters[fss_embedded_list_write_parameter_content].locations.used) { - if (main->parameters[fss_embedded_list_write_parameter_content].locations.used != main->parameters[fss_embedded_list_write_parameter_content].values.used) { + else if (main->parameters[fss_embedded_list_write_parameter_content_e].locations.used) { + if (main->parameters[fss_embedded_list_write_parameter_content_e].locations.used != main->parameters[fss_embedded_list_write_parameter_content_e].values.used) { fss_embedded_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content_s); status = F_status_set_error(F_parameter); } - else if (!main->parameters[fss_embedded_list_write_parameter_partial].locations.used) { + else if (!main->parameters[fss_embedded_list_write_parameter_partial_e].locations.used) { fss_embedded_list_write_error_parameter_same_times_print(main); status = F_status_set_error(F_parameter); } } } else if (!main->process_pipe) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThis requires either piped data or the use of the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -285,8 +285,8 @@ extern "C" { } if (F_status_is_error_not(status) && main->process_pipe) { - if (main->parameters[fss_embedded_list_write_parameter_partial].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[fss_embedded_list_write_parameter_partial_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThis '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -302,8 +302,8 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[fss_embedded_list_write_parameter_prepend].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[fss_embedded_list_write_parameter_prepend_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -315,8 +315,8 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_embedded_list_write_parameter_prepend].result == f_console_result_additional) { - const f_array_length_t index = main->parameters[fss_embedded_list_write_parameter_prepend].values.array[main->parameters[fss_embedded_list_write_parameter_prepend].values.used - 1]; + else if (main->parameters[fss_embedded_list_write_parameter_prepend_e].result == f_console_result_additional_e) { + const f_array_length_t index = main->parameters[fss_embedded_list_write_parameter_prepend_e].values.array[main->parameters[fss_embedded_list_write_parameter_prepend_e].values.used - 1]; const f_array_length_t length = strnlen(arguments->argv[index], f_console_parameter_size); if (length) { @@ -332,7 +332,7 @@ extern "C" { if (F_status_is_error(status)) break; if (status == F_false) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -348,7 +348,7 @@ extern "C" { } // for } else { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -364,8 +364,8 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[fss_embedded_list_write_parameter_ignore].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[fss_embedded_list_write_parameter_ignore_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -377,9 +377,9 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_embedded_list_write_parameter_ignore].result == f_console_result_additional) { - const f_array_length_t total_locations = main->parameters[fss_embedded_list_write_parameter_ignore].locations.used; - const f_array_length_t total_arguments = main->parameters[fss_embedded_list_write_parameter_ignore].values.used; + else if (main->parameters[fss_embedded_list_write_parameter_ignore_e].result == f_console_result_additional_e) { + const f_array_length_t total_locations = main->parameters[fss_embedded_list_write_parameter_ignore_e].locations.used; + const f_array_length_t total_arguments = main->parameters[fss_embedded_list_write_parameter_ignore_e].values.used; if (total_locations * 2 > total_arguments) { flockfile(main->error.to.stream); @@ -398,14 +398,14 @@ extern "C" { f_fss_quote_t quote = F_fss_delimit_quote_double_s; if (F_status_is_error_not(status)) { - if (main->parameters[fss_embedded_list_write_parameter_double].result == f_console_result_found) { - if (main->parameters[fss_embedded_list_write_parameter_single].result == f_console_result_found) { - if (main->parameters[fss_embedded_list_write_parameter_double].location < main->parameters[fss_embedded_list_write_parameter_single].location) { + if (main->parameters[fss_embedded_list_write_parameter_double_e].result == f_console_result_found_e) { + if (main->parameters[fss_embedded_list_write_parameter_single_e].result == f_console_result_found_e) { + if (main->parameters[fss_embedded_list_write_parameter_double_e].location < main->parameters[fss_embedded_list_write_parameter_single_e].location) { quote = F_fss_delimit_quote_single_s; } } } - else if (main->parameters[fss_embedded_list_write_parameter_single].result == f_console_result_found) { + else if (main->parameters[fss_embedded_list_write_parameter_single_e].result == f_console_result_found_e) { quote = F_fss_delimit_quote_single_s; } } @@ -422,7 +422,7 @@ extern "C" { status = fss_embedded_list_write_process_pipe(main, output, quote, &buffer, &ignore); if (F_status_is_error(status) && F_status_set_fine(status) != F_interrupt) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sWhile processing the '%]%[input pipe%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context, main->error.notable, main->error.notable); @@ -436,17 +436,17 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[fss_embedded_list_write_parameter_partial].result == f_console_result_found) { + if (main->parameters[fss_embedded_list_write_parameter_partial_e].result == f_console_result_found_e) { - if (main->parameters[fss_embedded_list_write_parameter_object].result == f_console_result_additional) { - for (f_array_length_t i = 0; i < main->parameters[fss_embedded_list_write_parameter_object].values.used; ++i) { + if (main->parameters[fss_embedded_list_write_parameter_object_e].result == f_console_result_additional_e) { + for (f_array_length_t i = 0; i < main->parameters[fss_embedded_list_write_parameter_object_e].values.used; ++i) { if (fss_embedded_list_write_signal_received(main)) { status = F_status_set_error(F_interrupt); break; } - object.string = arguments->argv[main->parameters[fss_embedded_list_write_parameter_object].values.array[i]]; + object.string = arguments->argv[main->parameters[fss_embedded_list_write_parameter_object_e].values.array[i]]; object.used = strnlen(object.string, f_console_parameter_size); object.size = object.used; @@ -455,17 +455,17 @@ extern "C" { } // for } else { - for (f_array_length_t i = 0; i < main->parameters[fss_embedded_list_write_parameter_content].values.used; ++i) { + for (f_array_length_t i = 0; i < main->parameters[fss_embedded_list_write_parameter_content_e].values.used; ++i) { if (fss_embedded_list_write_signal_received(main)) { status = F_status_set_error(F_interrupt); break; } - status = fss_embedded_list_write_process_parameter_ignore(main, arguments, main->parameters[fss_embedded_list_write_parameter_content].locations, i, &ignore); + status = fss_embedded_list_write_process_parameter_ignore(main, arguments, main->parameters[fss_embedded_list_write_parameter_content_e].locations, i, &ignore); if (F_status_is_error(status)) break; - content.string = arguments->argv[main->parameters[fss_embedded_list_write_parameter_content].values.array[i]]; + content.string = arguments->argv[main->parameters[fss_embedded_list_write_parameter_content_e].values.array[i]]; content.used = strnlen(content.string, f_console_parameter_size); content.size = content.used; @@ -475,21 +475,21 @@ extern "C" { } } else { - for (f_array_length_t i = 0; i < main->parameters[fss_embedded_list_write_parameter_object].values.used; ++i) { + for (f_array_length_t i = 0; i < main->parameters[fss_embedded_list_write_parameter_object_e].values.used; ++i) { if (fss_embedded_list_write_signal_received(main)) { status = F_status_set_error(F_interrupt); break; } - status = fss_embedded_list_write_process_parameter_ignore(main, arguments, main->parameters[fss_embedded_list_write_parameter_content].locations, i, &ignore); + status = fss_embedded_list_write_process_parameter_ignore(main, arguments, main->parameters[fss_embedded_list_write_parameter_content_e].locations, i, &ignore); if (F_status_is_error(status)) break; - object.string = arguments->argv[main->parameters[fss_embedded_list_write_parameter_object].values.array[i]]; + object.string = arguments->argv[main->parameters[fss_embedded_list_write_parameter_object_e].values.array[i]]; object.used = strnlen(object.string, f_console_parameter_size); object.size = object.used; - content.string = arguments->argv[main->parameters[fss_embedded_list_write_parameter_content].values.array[i]]; + content.string = arguments->argv[main->parameters[fss_embedded_list_write_parameter_content_e].values.array[i]]; content.used = strnlen(content.string, f_console_parameter_size); content.size = content.used; @@ -499,7 +499,7 @@ extern "C" { } if (F_status_is_error(status)) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sWhile processing the '%]%[input arguments%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context, main->error.notable, main->error.notable); @@ -508,7 +508,7 @@ extern "C" { funlockfile(main->error.to.stream); } } - else if (main->error.verbosity != f_console_verbosity_quiet && main->parameters[fss_embedded_list_write_parameter_file].result == f_console_result_none) { + else if (main->error.verbosity != f_console_verbosity_quiet_e && main->parameters[fss_embedded_list_write_parameter_file_e].result == f_console_result_none_e) { // ensure there is always a newline at the end, unless in quiet mode. fll_print_character(f_string_eol_s[0], main->error.to.stream); @@ -528,14 +528,14 @@ extern "C" { content.size = 0; } - if (main->parameters[fss_embedded_list_write_parameter_file].result == f_console_result_additional) { + if (main->parameters[fss_embedded_list_write_parameter_file_e].result == f_console_result_additional_e) { if (output.id != -1) { f_file_stream_close(F_true, &output); } } // ensure a newline is always put at the end of the program execution, unless in quiet mode. - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { if (F_status_is_error(status)) { fll_print_character(f_string_eol_s[0], main->error.to.stream); } 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 8dd1015..408e049 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 @@ -33,12 +33,10 @@ #include #include #include -#include #include // fll-2 includes #include -#include #include #include @@ -95,47 +93,47 @@ extern "C" { #define fss_embedded_list_write_long_trim_s "trim" enum { - fss_embedded_list_write_parameter_help, - fss_embedded_list_write_parameter_light, - fss_embedded_list_write_parameter_dark, - fss_embedded_list_write_parameter_no_color, - fss_embedded_list_write_parameter_verbosity_quiet, - fss_embedded_list_write_parameter_verbosity_normal, - fss_embedded_list_write_parameter_verbosity_verbose, - fss_embedded_list_write_parameter_verbosity_debug, - fss_embedded_list_write_parameter_version, - - fss_embedded_list_write_parameter_file, - fss_embedded_list_write_parameter_content, - fss_embedded_list_write_parameter_double, - fss_embedded_list_write_parameter_ignore, - fss_embedded_list_write_parameter_object, - fss_embedded_list_write_parameter_partial, - fss_embedded_list_write_parameter_prepend, - fss_embedded_list_write_parameter_single, - fss_embedded_list_write_parameter_trim, + fss_embedded_list_write_parameter_help_e, + fss_embedded_list_write_parameter_light_e, + fss_embedded_list_write_parameter_dark_e, + fss_embedded_list_write_parameter_no_color_e, + fss_embedded_list_write_parameter_verbosity_quiet_e, + fss_embedded_list_write_parameter_verbosity_normal_e, + fss_embedded_list_write_parameter_verbosity_verbose_e, + fss_embedded_list_write_parameter_verbosity_debug_e, + fss_embedded_list_write_parameter_version_e, + + fss_embedded_list_write_parameter_file_e, + fss_embedded_list_write_parameter_content_e, + fss_embedded_list_write_parameter_double_e, + fss_embedded_list_write_parameter_ignore_e, + fss_embedded_list_write_parameter_object_e, + fss_embedded_list_write_parameter_partial_e, + fss_embedded_list_write_parameter_prepend_e, + fss_embedded_list_write_parameter_single_e, + fss_embedded_list_write_parameter_trim_e, }; #define fss_embedded_list_write_console_parameter_t_initialize \ { \ - 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_s, fss_embedded_list_write_long_file_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_write_short_content_s, fss_embedded_list_write_long_content_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_write_short_double_s, fss_embedded_list_write_long_double_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_write_short_ignore_s, fss_embedded_list_write_long_ignore_s, 0, 2, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_write_short_object_s, fss_embedded_list_write_long_object_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_write_short_partial_s, fss_embedded_list_write_long_partial_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_write_short_prepend_s, fss_embedded_list_write_long_prepend_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_write_short_single_s, fss_embedded_list_write_long_single_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_write_short_trim_s, fss_embedded_list_write_long_trim_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse_e), \ + 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_e), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(fss_embedded_list_write_short_file_s, fss_embedded_list_write_long_file_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_embedded_list_write_short_content_s, fss_embedded_list_write_long_content_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_embedded_list_write_short_double_s, fss_embedded_list_write_long_double_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_embedded_list_write_short_ignore_s, fss_embedded_list_write_long_ignore_s, 0, 2, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_embedded_list_write_short_object_s, fss_embedded_list_write_long_object_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_embedded_list_write_short_partial_s, fss_embedded_list_write_long_partial_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_embedded_list_write_short_prepend_s, fss_embedded_list_write_long_prepend_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_embedded_list_write_short_single_s, fss_embedded_list_write_long_single_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_embedded_list_write_short_trim_s, fss_embedded_list_write_long_trim_s, 0, 0, f_console_type_normal_e), \ } #define fss_embedded_list_write_total_parameters_d 18 diff --git a/level_3/fss_embedded_list_write/c/private-common.c b/level_3/fss_embedded_list_write/c/private-common.c index edbc4bb..5ae756a 100644 --- a/level_3/fss_embedded_list_write/c/private-common.c +++ b/level_3/fss_embedded_list_write/c/private-common.c @@ -8,7 +8,7 @@ extern "C" { #ifndef _di_fss_embedded_list_write_print_signal_received_ void fss_embedded_list_write_print_signal_received(fss_embedded_list_write_main_t * const main, const f_status_t signal) { - if (main->warning.verbosity != f_console_verbosity_verbose) return; + if (main->warning.verbosity != f_console_verbosity_verbose_e) return; // Must flush and reset color because the interrupt may have interrupted the middle of a print function. fflush(main->warning.to.stream); 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 1384aee..222b83e 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 @@ -9,7 +9,7 @@ extern "C" { #ifndef _di_fss_embedded_list_write_error_parameter_same_times_print_ void fss_embedded_list_write_error_parameter_same_times_print(fss_embedded_list_write_main_t * const main) { - if (main->error.verbosity == f_console_verbosity_quiet) { + if (main->error.verbosity == f_console_verbosity_quiet_e) { return; } @@ -30,7 +30,7 @@ extern "C" { #ifndef _di_fss_embedded_list_write_error_parameter_unsupported_eol_print_ void fss_embedded_list_write_error_parameter_unsupported_eol_print(fss_embedded_list_write_main_t * const main) { - if (main->error.verbosity == f_console_verbosity_quiet) { + if (main->error.verbosity == f_console_verbosity_quiet_e) { return; } @@ -47,7 +47,7 @@ extern "C" { #ifndef _di_fss_embedded_list_write_error_parameter_value_missing_print_ void fss_embedded_list_write_error_parameter_value_missing_print(fss_embedded_list_write_main_t * const main, const f_string_t symbol, const f_string_t parameter) { - if (main->error.verbosity == f_console_verbosity_quiet) { + if (main->error.verbosity == f_console_verbosity_quiet_e) { return; } @@ -69,7 +69,7 @@ extern "C" { f_string_range_t range = f_string_range_t_initialize; if (object) { - uint8_t complete = f_fss_complete_none; + uint8_t complete = f_fss_complete_none_e; if (object->used) { range.start = 0; @@ -81,11 +81,11 @@ extern "C" { } if (content) { - if (main->parameters[fss_embedded_list_write_parameter_trim].result == f_console_result_found) { - complete = f_fss_complete_full_trim; + if (main->parameters[fss_embedded_list_write_parameter_trim_e].result == f_console_result_found_e) { + complete = f_fss_complete_full_trim_e; } else { - complete = f_fss_complete_full; + complete = f_fss_complete_full_e; } } @@ -108,7 +108,7 @@ extern "C" { range.start = 0; range.stop = content->used - 1; - status = fl_fss_embedded_list_content_write(*content, object ? f_fss_complete_full : f_fss_complete_none, &main->prepend, ignore, state, &range, buffer); + status = fl_fss_embedded_list_content_write(*content, object ? f_fss_complete_full_e : f_fss_complete_none_e, &main->prepend, ignore, state, &range, buffer); if (F_status_is_error(status)) { fll_error_print(main->error, F_status_set_fine(status), "fl_fss_embedded_list_content_write", F_true); @@ -260,7 +260,7 @@ extern "C" { for (; range.start <= range.stop; ++range.start) { if (block.string[range.start] == fss_embedded_list_write_pipe_content_start_s) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[%sThis standard only supports one content per object.%]%c", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context, f_string_eol_s[0]); } @@ -358,13 +358,13 @@ extern "C" { range.start = 0; - for (; i < main->parameters[fss_embedded_list_write_parameter_ignore].locations.used; ++i) { + for (; i < main->parameters[fss_embedded_list_write_parameter_ignore_e].locations.used; ++i) { if (fss_embedded_list_write_signal_received(main)) { return F_status_set_error(F_interrupt); } - l = main->parameters[fss_embedded_list_write_parameter_ignore].locations.array[i]; + l = main->parameters[fss_embedded_list_write_parameter_ignore_e].locations.array[i]; if (l < contents.array[location]) continue; if (location + 1 < contents.used && l > contents.array[location + 1]) continue; @@ -389,7 +389,7 @@ extern "C" { } } - index = main->parameters[fss_embedded_list_write_parameter_ignore].values.array[i * 2]; + index = main->parameters[fss_embedded_list_write_parameter_ignore_e].values.array[i * 2]; range.start = 0; range.stop = strnlen(arguments->argv[index], f_console_parameter_size) - 1; @@ -409,7 +409,7 @@ extern "C" { ignore->array[ignore->used].start = number; - index = main->parameters[fss_embedded_list_write_parameter_ignore].values.array[(i * 2) + 1]; + index = main->parameters[fss_embedded_list_write_parameter_ignore_e].values.array[(i * 2) + 1]; range.start = 0; range.stop = strnlen(arguments->argv[index], f_console_parameter_size) - 1; diff --git a/level_3/fss_embedded_list_write/data/build/dependencies b/level_3/fss_embedded_list_write/data/build/dependencies index 25e27eb..b944420 100644 --- a/level_3/fss_embedded_list_write/data/build/dependencies +++ b/level_3/fss_embedded_list_write/data/build/dependencies @@ -19,7 +19,6 @@ fl_console fl_conversion fl_fss fl_print -fl_status fl_string fll_error fll_file diff --git a/level_3/fss_embedded_list_write/data/build/settings b/level_3/fss_embedded_list_write/data/build/settings index 36bf537..acd33bb 100644 --- a/level_3/fss_embedded_list_write/data/build/settings +++ b/level_3/fss_embedded_list_write/data/build/settings @@ -21,7 +21,7 @@ build_indexer ar build_indexer_arguments rcs build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -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_signal -lf_string -lf_type_array -lf_utf +build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -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_signal -lf_status_string -lf_string -lf_type_array -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared 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 f1ba259..9752d08 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 @@ -125,7 +125,7 @@ extern "C" { const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_extended_list_read_total_parameters_d); { - f_console_parameter_id_t ids[3] = { fss_extended_list_read_parameter_no_color, fss_extended_list_read_parameter_light, fss_extended_list_read_parameter_dark }; + f_console_parameter_id_t ids[3] = { fss_extended_list_read_parameter_no_color_e, fss_extended_list_read_parameter_light_e, fss_extended_list_read_parameter_dark_e }; const f_console_parameter_ids_t choices = { ids, 3 }; status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context); @@ -158,7 +158,7 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_extended_list_read_parameter_verbosity_quiet, fss_extended_list_read_parameter_verbosity_normal, fss_extended_list_read_parameter_verbosity_verbose, fss_extended_list_read_parameter_verbosity_debug }; + f_console_parameter_id_t ids[4] = { fss_extended_list_read_parameter_verbosity_quiet_e, fss_extended_list_read_parameter_verbosity_normal_e, fss_extended_list_read_parameter_verbosity_verbose_e, fss_extended_list_read_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); @@ -169,39 +169,39 @@ extern "C" { return status; } - if (choice == fss_extended_list_read_parameter_verbosity_quiet) { - main->output.verbosity = f_console_verbosity_quiet; - main->error.verbosity = f_console_verbosity_quiet; - main->warning.verbosity = f_console_verbosity_quiet; + if (choice == fss_extended_list_read_parameter_verbosity_quiet_e) { + main->output.verbosity = f_console_verbosity_quiet_e; + main->error.verbosity = f_console_verbosity_quiet_e; + main->warning.verbosity = f_console_verbosity_quiet_e; } - else if (choice == fss_extended_list_read_parameter_verbosity_normal) { - main->output.verbosity = f_console_verbosity_normal; - main->error.verbosity = f_console_verbosity_normal; - main->warning.verbosity = f_console_verbosity_normal; + else if (choice == fss_extended_list_read_parameter_verbosity_normal_e) { + main->output.verbosity = f_console_verbosity_normal_e; + main->error.verbosity = f_console_verbosity_normal_e; + main->warning.verbosity = f_console_verbosity_normal_e; } - else if (choice == fss_extended_list_read_parameter_verbosity_verbose) { - main->output.verbosity = f_console_verbosity_verbose; - main->error.verbosity = f_console_verbosity_verbose; - main->warning.verbosity = f_console_verbosity_verbose; + else if (choice == fss_extended_list_read_parameter_verbosity_verbose_e) { + main->output.verbosity = f_console_verbosity_verbose_e; + main->error.verbosity = f_console_verbosity_verbose_e; + main->warning.verbosity = f_console_verbosity_verbose_e; } - else if (choice == fss_extended_list_read_parameter_verbosity_debug) { - main->output.verbosity = f_console_verbosity_debug; - main->error.verbosity = f_console_verbosity_debug; - main->warning.verbosity = f_console_verbosity_debug; + else if (choice == fss_extended_list_read_parameter_verbosity_debug_e) { + main->output.verbosity = f_console_verbosity_debug_e; + main->error.verbosity = f_console_verbosity_debug_e; + main->warning.verbosity = f_console_verbosity_debug_e; } } status = F_none; } - if (main->parameters[fss_extended_list_read_parameter_help].result == f_console_result_found) { + if (main->parameters[fss_extended_list_read_parameter_help_e].result == f_console_result_found_e) { fss_extended_list_read_print_help(main->output.to, main->context); fss_extended_list_read_main_delete(main); return status; } - if (main->parameters[fss_extended_list_read_parameter_version].result == f_console_result_found) { + if (main->parameters[fss_extended_list_read_parameter_version_e].result == f_console_result_found_e) { fll_program_print_version(main->output.to, fss_extended_list_read_program_version_s); fss_extended_list_read_main_delete(main); @@ -219,12 +219,12 @@ extern "C" { if (main->remaining.used || main->process_pipe) { { const f_array_length_t parameter_code[] = { - fss_extended_list_read_parameter_at, - fss_extended_list_read_parameter_depth, - fss_extended_list_read_parameter_line, - fss_extended_list_read_parameter_select, - fss_extended_list_read_parameter_name, - fss_extended_list_read_parameter_delimit, + fss_extended_list_read_parameter_at_e, + fss_extended_list_read_parameter_depth_e, + fss_extended_list_read_parameter_line_e, + fss_extended_list_read_parameter_select_e, + fss_extended_list_read_parameter_name_e, + fss_extended_list_read_parameter_delimit_e, }; const f_string_t parameter_name[] = { @@ -251,7 +251,7 @@ extern "C" { for (f_array_length_t i = 0; i < 6; ++i) { - if (main->parameters[parameter_code[i]].result == f_console_result_found) { + if (main->parameters[parameter_code[i]].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -266,13 +266,13 @@ extern "C" { } // for } - if (F_status_is_error_not(status) && main->parameters[fss_extended_list_read_parameter_columns].result == f_console_result_found) { + if (F_status_is_error_not(status) && main->parameters[fss_extended_list_read_parameter_columns_e].result == f_console_result_found_e) { const f_array_length_t parameter_code[] = { - fss_extended_list_read_parameter_depth, - fss_extended_list_read_parameter_line, - fss_extended_list_read_parameter_pipe, - fss_extended_list_read_parameter_select, - fss_extended_list_read_parameter_total, + fss_extended_list_read_parameter_depth_e, + fss_extended_list_read_parameter_line_e, + fss_extended_list_read_parameter_pipe_e, + fss_extended_list_read_parameter_select_e, + fss_extended_list_read_parameter_total_e, }; const f_string_t parameter_name[] = { @@ -284,11 +284,11 @@ extern "C" { }; const uint8_t parameter_match[] = { - f_console_result_additional, - f_console_result_additional, - f_console_result_found, - f_console_result_additional, - f_console_result_found, + f_console_result_additional_e, + f_console_result_additional_e, + f_console_result_found_e, + f_console_result_additional_e, + f_console_result_found_e, }; for (f_array_length_t i = 0; i < 5; ++i) { @@ -310,8 +310,8 @@ extern "C" { } // for } - if (F_status_is_error_not(status) && main->parameters[fss_extended_list_read_parameter_pipe].result == f_console_result_found) { - if (main->parameters[fss_extended_list_read_parameter_total].result == f_console_result_found) { + if (F_status_is_error_not(status) && main->parameters[fss_extended_list_read_parameter_pipe_e].result == f_console_result_found_e) { + if (main->parameters[fss_extended_list_read_parameter_total_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -324,7 +324,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_extended_list_read_parameter_line].result == f_console_result_additional) { + else if (main->parameters[fss_extended_list_read_parameter_line_e].result == f_console_result_additional_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -339,21 +339,21 @@ extern "C" { } } - if (F_status_is_error_not(status) && main->parameters[fss_extended_list_read_parameter_delimit].result == f_console_result_additional) { + if (F_status_is_error_not(status) && main->parameters[fss_extended_list_read_parameter_delimit_e].result == f_console_result_additional_e) { f_array_length_t location = 0; f_array_length_t length = 0; // Set the value to 0 to allow for detecting mode based on what is provided. data.delimit_mode = 0; - for (f_array_length_t i = 0; i < main->parameters[fss_extended_list_read_parameter_delimit].values.used; ++i) { + for (f_array_length_t i = 0; i < main->parameters[fss_extended_list_read_parameter_delimit_e].values.used; ++i) { if (fss_extended_list_read_signal_received(main)) { status = F_status_set_error(F_interrupt); break; } - location = main->parameters[fss_extended_list_read_parameter_delimit].values.array[i]; + location = main->parameters[fss_extended_list_read_parameter_delimit_e].values.array[i]; length = strnlen(arguments->argv[location], f_console_parameter_size); if (!length) { @@ -369,34 +369,34 @@ extern "C" { break; } else if (fl_string_compare(arguments->argv[location], fss_extended_list_read_delimit_mode_name_none_s, length, fss_extended_list_read_delimit_mode_name_none_s_length) == F_equal_to) { - data.delimit_mode = fss_extended_list_read_delimit_mode_none; + data.delimit_mode = fss_extended_list_read_delimit_mode_none_e; } else if (fl_string_compare(arguments->argv[location], fss_extended_list_read_delimit_mode_name_all_s, length, fss_extended_list_read_delimit_mode_name_all_s_length) == F_equal_to) { - data.delimit_mode = fss_extended_list_read_delimit_mode_all; + data.delimit_mode = fss_extended_list_read_delimit_mode_all_e; } else if (fl_string_compare(arguments->argv[location], fss_extended_list_read_delimit_mode_name_object_s, length, fss_extended_list_read_delimit_mode_name_object_s_length) == F_equal_to) { switch (data.delimit_mode) { case 0: - data.delimit_mode = fss_extended_list_read_delimit_mode_object; + data.delimit_mode = fss_extended_list_read_delimit_mode_object_e; break; - case fss_extended_list_read_delimit_mode_none: - case fss_extended_list_read_delimit_mode_all: - case fss_extended_list_read_delimit_mode_content_greater_object: - case fss_extended_list_read_delimit_mode_content_lesser_object: - case fss_extended_list_read_delimit_mode_object: + case fss_extended_list_read_delimit_mode_none_e: + case fss_extended_list_read_delimit_mode_all_e: + case fss_extended_list_read_delimit_mode_content_greater_object_e: + case fss_extended_list_read_delimit_mode_content_lesser_object_e: + case fss_extended_list_read_delimit_mode_object_e: break; - case fss_extended_list_read_delimit_mode_content: - data.delimit_mode = fss_extended_list_read_delimit_mode_content_object; + case fss_extended_list_read_delimit_mode_content_e: + data.delimit_mode = fss_extended_list_read_delimit_mode_content_object_e; break; - case fss_extended_list_read_delimit_mode_content_greater: - data.delimit_mode = fss_extended_list_read_delimit_mode_content_greater_object; + case fss_extended_list_read_delimit_mode_content_greater_e: + data.delimit_mode = fss_extended_list_read_delimit_mode_content_greater_object_e; break; - case fss_extended_list_read_delimit_mode_content_lesser: - data.delimit_mode = fss_extended_list_read_delimit_mode_content_lesser_object; + case fss_extended_list_read_delimit_mode_content_lesser_e: + data.delimit_mode = fss_extended_list_read_delimit_mode_content_lesser_object_e; break; default: @@ -405,19 +405,19 @@ extern "C" { } else { if (!data.delimit_mode) { - data.delimit_mode = fss_extended_list_read_delimit_mode_content; + data.delimit_mode = fss_extended_list_read_delimit_mode_content_e; } - else if (data.delimit_mode == fss_extended_list_read_delimit_mode_object) { - data.delimit_mode = fss_extended_list_read_delimit_mode_content_object; + else if (data.delimit_mode == fss_extended_list_read_delimit_mode_object_e) { + data.delimit_mode = fss_extended_list_read_delimit_mode_content_object_e; } if (arguments->argv[location][length - 1] == fss_extended_list_read_delimit_mode_name_greater_s[0]) { - if (!(data.delimit_mode == fss_extended_list_read_delimit_mode_none || data.delimit_mode == fss_extended_list_read_delimit_mode_all)) { - if (data.delimit_mode == fss_extended_list_read_delimit_mode_content_object) { - data.delimit_mode = fss_extended_list_read_delimit_mode_content_greater_object; + if (!(data.delimit_mode == fss_extended_list_read_delimit_mode_none_e || data.delimit_mode == fss_extended_list_read_delimit_mode_all_e)) { + if (data.delimit_mode == fss_extended_list_read_delimit_mode_content_object_e) { + data.delimit_mode = fss_extended_list_read_delimit_mode_content_greater_object_e; } else { - data.delimit_mode = fss_extended_list_read_delimit_mode_content_greater; + data.delimit_mode = fss_extended_list_read_delimit_mode_content_greater_e; } } @@ -425,12 +425,12 @@ extern "C" { --length; } else if (arguments->argv[location][length - 1] == fss_extended_list_read_delimit_mode_name_lesser_s[0]) { - if (!(data.delimit_mode == fss_extended_list_read_delimit_mode_none || data.delimit_mode == fss_extended_list_read_delimit_mode_all)) { - if (data.delimit_mode == fss_extended_list_read_delimit_mode_content_object) { - data.delimit_mode = fss_extended_list_read_delimit_mode_content_lesser_object; + if (!(data.delimit_mode == fss_extended_list_read_delimit_mode_none_e || data.delimit_mode == fss_extended_list_read_delimit_mode_all_e)) { + if (data.delimit_mode == fss_extended_list_read_delimit_mode_content_object_e) { + data.delimit_mode = fss_extended_list_read_delimit_mode_content_lesser_object_e; } else { - data.delimit_mode = fss_extended_list_read_delimit_mode_content_lesser; + data.delimit_mode = fss_extended_list_read_delimit_mode_content_lesser_e; } } @@ -454,13 +454,13 @@ extern "C" { } // There can be nothing smaller than 0, so replace '0-' logic with just '0' logic. - if (data.delimit_mode == fss_extended_list_read_delimit_mode_content_lesser || data.delimit_mode == fss_extended_list_read_delimit_mode_content_lesser_object) { + if (data.delimit_mode == fss_extended_list_read_delimit_mode_content_lesser_e || data.delimit_mode == fss_extended_list_read_delimit_mode_content_lesser_object_e) { if (!data.delimit_depth) { - if (data.delimit_mode == fss_extended_list_read_delimit_mode_content_lesser) { - data.delimit_mode = fss_extended_list_read_delimit_mode_content; + if (data.delimit_mode == fss_extended_list_read_delimit_mode_content_lesser_e) { + data.delimit_mode = fss_extended_list_read_delimit_mode_content_e; } else { - data.delimit_mode = fss_extended_list_read_delimit_mode_content_object; + data.delimit_mode = fss_extended_list_read_delimit_mode_content_object_e; } } } @@ -469,7 +469,7 @@ extern "C" { // Guarantee the default value is "all". if (!data.delimit_mode) { - data.delimit_mode = fss_extended_list_read_delimit_mode_all; + data.delimit_mode = fss_extended_list_read_delimit_mode_all_e; } } @@ -479,7 +479,7 @@ extern "C" { // This standard does not support nesting, so any depth greater than 0 can be predicted without processing the file. if (F_status_is_error_not(status) && data.depths.array[0].depth > 0) { - if (main->parameters[fss_extended_list_read_parameter_total].result == f_console_result_found) { + if (main->parameters[fss_extended_list_read_parameter_total_e].result == f_console_result_found_e) { fss_extended_list_read_print_zero(main); } @@ -489,7 +489,7 @@ extern "C" { return F_none; } - if (F_status_is_error_not(status) && main->parameters[fss_extended_list_read_parameter_select].result == f_console_result_found) { + if (F_status_is_error_not(status) && main->parameters[fss_extended_list_read_parameter_select_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -521,7 +521,7 @@ extern "C" { status = f_file_stream_read(file, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, "-", "read", fll_error_file_type_pipe); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, "-", "read", fll_error_file_type_pipe_e); } else if (data.buffer.used) { data.files.array[0].range.stop = data.buffer.used - 1; @@ -531,7 +531,7 @@ extern "C" { status = f_string_append_assure(f_string_eol_s, 1, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, "-", "read", fll_error_file_type_pipe); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, "-", "read", fll_error_file_type_pipe_e); } } else { @@ -557,7 +557,7 @@ extern "C" { status = f_file_stream_open(arguments->argv[main->remaining.array[i]], 0, &file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], "open", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], "open", fll_error_file_type_file_e); break; } @@ -566,7 +566,7 @@ extern "C" { status = f_file_size_by_id(file.id, &size_file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file_e); break; } @@ -575,7 +575,7 @@ extern "C" { status = f_string_dynamic_resize(data.buffer.size + size_file, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file_e); break; } @@ -583,7 +583,7 @@ extern "C" { status = f_file_stream_read(file, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file_e); break; } @@ -596,7 +596,7 @@ extern "C" { status = f_string_append_assure(f_string_eol_s, 1, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, "-", "read", fll_error_file_type_pipe); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, "-", "read", fll_error_file_type_pipe_e); } } } @@ -621,7 +621,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { if (F_status_set_fine(status) == F_interrupt) { fflush(main->output.to.stream); 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 20503c3..9c1e05b 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 @@ -110,57 +110,57 @@ extern "C" { #define fss_extended_list_read_long_trim_s "trim" enum { - fss_extended_list_read_parameter_help, - fss_extended_list_read_parameter_light, - fss_extended_list_read_parameter_dark, - fss_extended_list_read_parameter_no_color, - fss_extended_list_read_parameter_verbosity_quiet, - fss_extended_list_read_parameter_verbosity_normal, - fss_extended_list_read_parameter_verbosity_verbose, - fss_extended_list_read_parameter_verbosity_debug, - fss_extended_list_read_parameter_version, - - fss_extended_list_read_parameter_at, - fss_extended_list_read_parameter_content, - fss_extended_list_read_parameter_columns, - fss_extended_list_read_parameter_delimit, - fss_extended_list_read_parameter_depth, - fss_extended_list_read_parameter_empty, - fss_extended_list_read_parameter_line, - fss_extended_list_read_parameter_name, - fss_extended_list_read_parameter_object, - fss_extended_list_read_parameter_pipe, - fss_extended_list_read_parameter_raw, - fss_extended_list_read_parameter_select, - fss_extended_list_read_parameter_total, - fss_extended_list_read_parameter_trim, + fss_extended_list_read_parameter_help_e, + fss_extended_list_read_parameter_light_e, + fss_extended_list_read_parameter_dark_e, + fss_extended_list_read_parameter_no_color_e, + fss_extended_list_read_parameter_verbosity_quiet_e, + fss_extended_list_read_parameter_verbosity_normal_e, + fss_extended_list_read_parameter_verbosity_verbose_e, + fss_extended_list_read_parameter_verbosity_debug_e, + fss_extended_list_read_parameter_version_e, + + fss_extended_list_read_parameter_at_e, + fss_extended_list_read_parameter_content_e, + fss_extended_list_read_parameter_columns_e, + fss_extended_list_read_parameter_delimit_e, + fss_extended_list_read_parameter_depth_e, + fss_extended_list_read_parameter_empty_e, + fss_extended_list_read_parameter_line_e, + fss_extended_list_read_parameter_name_e, + fss_extended_list_read_parameter_object_e, + fss_extended_list_read_parameter_pipe_e, + fss_extended_list_read_parameter_raw_e, + fss_extended_list_read_parameter_select_e, + fss_extended_list_read_parameter_total_e, + fss_extended_list_read_parameter_trim_e, }; #define fss_extended_list_read_console_parameter_t_initialize \ { \ - 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_s, fss_extended_list_read_long_at_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_content_s, fss_extended_list_read_long_content_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_columns_s, fss_extended_list_read_long_columns_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_delimit_s, fss_extended_list_read_long_delimit_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_depth_s, fss_extended_list_read_long_depth_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_empty_s, fss_extended_list_read_long_empty_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_line_s, fss_extended_list_read_long_line_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_name_s, fss_extended_list_read_long_name_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_object_s, fss_extended_list_read_long_object_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_pipe_s, fss_extended_list_read_long_pipe_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_raw_s, fss_extended_list_read_long_raw_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_select_s, fss_extended_list_read_long_select_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_total_s, fss_extended_list_read_long_total_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_trim_s, fss_extended_list_read_long_trim_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse_e), \ + 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_e), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_at_s, fss_extended_list_read_long_at_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_content_s, fss_extended_list_read_long_content_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_columns_s, fss_extended_list_read_long_columns_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_delimit_s, fss_extended_list_read_long_delimit_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_depth_s, fss_extended_list_read_long_depth_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_empty_s, fss_extended_list_read_long_empty_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_line_s, fss_extended_list_read_long_line_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_name_s, fss_extended_list_read_long_name_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_object_s, fss_extended_list_read_long_object_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_pipe_s, fss_extended_list_read_long_pipe_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_raw_s, fss_extended_list_read_long_raw_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_select_s, fss_extended_list_read_long_select_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_total_s, fss_extended_list_read_long_total_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_trim_s, fss_extended_list_read_long_trim_s, 0, 0, f_console_type_normal_e), \ } #define fss_extended_list_read_total_parameters_d 23 @@ -193,15 +193,15 @@ extern "C" { #define fss_extended_list_read_delimit_mode_name_lesser_s_length 1 enum { - fss_extended_list_read_delimit_mode_none = 1, - fss_extended_list_read_delimit_mode_all, - fss_extended_list_read_delimit_mode_content, - fss_extended_list_read_delimit_mode_content_greater, - fss_extended_list_read_delimit_mode_content_greater_object, - fss_extended_list_read_delimit_mode_content_lesser, - fss_extended_list_read_delimit_mode_content_lesser_object, - fss_extended_list_read_delimit_mode_content_object, - fss_extended_list_read_delimit_mode_object, + fss_extended_list_read_delimit_mode_none_e = 1, + fss_extended_list_read_delimit_mode_all_e, + fss_extended_list_read_delimit_mode_content_e, + fss_extended_list_read_delimit_mode_content_greater_e, + fss_extended_list_read_delimit_mode_content_greater_object_e, + fss_extended_list_read_delimit_mode_content_lesser_e, + fss_extended_list_read_delimit_mode_content_lesser_object_e, + fss_extended_list_read_delimit_mode_content_object_e, + fss_extended_list_read_delimit_mode_object_e, }; #endif // _di_fss_extended_list_read_delimit_modes_ diff --git a/level_3/fss_extended_list_read/c/private-common.c b/level_3/fss_extended_list_read/c/private-common.c index 49ff1b5..ba608b1 100644 --- a/level_3/fss_extended_list_read/c/private-common.c +++ b/level_3/fss_extended_list_read/c/private-common.c @@ -60,7 +60,7 @@ extern "C" { #ifndef _di_fss_extended_list_read_print_signal_received_ void fss_extended_list_read_print_signal_received(fss_extended_list_read_main_t * const main, const f_status_t signal) { - if (main->warning.verbosity != f_console_verbosity_verbose) return; + if (main->warning.verbosity != f_console_verbosity_verbose_e) return; // Must flush and reset color because the interrupt may have interrupted the middle of a print function. fflush(main->warning.to.stream); diff --git a/level_3/fss_extended_list_read/c/private-common.h b/level_3/fss_extended_list_read/c/private-common.h index 2634c37..8d4bc8c 100644 --- a/level_3/fss_extended_list_read/c/private-common.h +++ b/level_3/fss_extended_list_read/c/private-common.h @@ -189,7 +189,7 @@ extern "C" { #define fss_extended_list_read_data_t_initialize \ { \ 0, \ - fss_extended_list_read_delimit_mode_all, \ + fss_extended_list_read_delimit_mode_all_e, \ 0, \ 0, \ 0, \ 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 8aef13b..32bc4e0 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 @@ -9,23 +9,23 @@ extern "C" { #ifndef _di_fss_extended_list_read_delimit_content_is_ f_status_t fss_extended_list_read_delimit_content_is(const f_array_length_t depth, fss_extended_list_read_data_t * const data) { - if (data->delimit_mode == fss_extended_list_read_delimit_mode_none) { + if (data->delimit_mode == fss_extended_list_read_delimit_mode_none_e) { return F_false; } - if (data->delimit_mode == fss_extended_list_read_delimit_mode_all) { + if (data->delimit_mode == fss_extended_list_read_delimit_mode_all_e) { return F_true; } if (depth < data->delimit_depth) { - return data->delimit_mode == fss_extended_list_read_delimit_mode_content_lesser; + return data->delimit_mode == fss_extended_list_read_delimit_mode_content_lesser_e; } if (depth == data->delimit_depth) { return F_true; } - return data->delimit_mode == fss_extended_list_read_delimit_mode_content_greater; + return data->delimit_mode == fss_extended_list_read_delimit_mode_content_greater_e; } #endif // _di_fss_extended_list_read_delimit_content_is_ @@ -33,24 +33,24 @@ extern "C" { f_status_t fss_extended_list_read_delimit_object_is(const f_array_length_t depth, fss_extended_list_read_data_t * const data) { switch (data->delimit_mode) { - case fss_extended_list_read_delimit_mode_none: - case fss_extended_list_read_delimit_mode_content: - case fss_extended_list_read_delimit_mode_content_greater: - case fss_extended_list_read_delimit_mode_content_lesser: + case fss_extended_list_read_delimit_mode_none_e: + case fss_extended_list_read_delimit_mode_content_e: + case fss_extended_list_read_delimit_mode_content_greater_e: + case fss_extended_list_read_delimit_mode_content_lesser_e: return F_false; - case fss_extended_list_read_delimit_mode_all: - case fss_extended_list_read_delimit_mode_content_object: - case fss_extended_list_read_delimit_mode_content_greater_object: - case fss_extended_list_read_delimit_mode_content_lesser_object: - case fss_extended_list_read_delimit_mode_object: + case fss_extended_list_read_delimit_mode_all_e: + case fss_extended_list_read_delimit_mode_content_object_e: + case fss_extended_list_read_delimit_mode_content_greater_object_e: + case fss_extended_list_read_delimit_mode_content_lesser_object_e: + case fss_extended_list_read_delimit_mode_object_e: return F_true; default: break; } - return depth == data->delimit_depth || data->delimit_mode == fss_extended_list_read_delimit_mode_content_lesser; + return depth == data->delimit_depth || data->delimit_mode == fss_extended_list_read_delimit_mode_content_lesser_e; } #endif // _di_fss_extended_list_read_delimit_object_is_ @@ -62,8 +62,8 @@ extern "C" { { f_array_length_t depth_size = 1; - if (main->parameters[fss_extended_list_read_parameter_depth].result == f_console_result_additional) { - depth_size = main->parameters[fss_extended_list_read_parameter_depth].values.used; + if (main->parameters[fss_extended_list_read_parameter_depth_e].result == f_console_result_additional_e) { + depth_size = main->parameters[fss_extended_list_read_parameter_depth_e].values.used; } if (depth_size > data->depths.size) { @@ -96,11 +96,11 @@ extern "C" { macro_f_string_dynamic_t_clear(data->depths.array[i].value_name); - if (!main->parameters[fss_extended_list_read_parameter_depth].values.used) { + if (!main->parameters[fss_extended_list_read_parameter_depth_e].values.used) { position_depth = 0; } else { - position_depth = main->parameters[fss_extended_list_read_parameter_depth].values.array[i]; + position_depth = main->parameters[fss_extended_list_read_parameter_depth_e].values.array[i]; const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[position_depth])); @@ -113,18 +113,18 @@ extern "C" { } } - if (main->parameters[fss_extended_list_read_parameter_at].result == f_console_result_additional) { - for (; position_at < main->parameters[fss_extended_list_read_parameter_at].values.used; ++position_at) { + if (main->parameters[fss_extended_list_read_parameter_at_e].result == f_console_result_additional_e) { + for (; position_at < main->parameters[fss_extended_list_read_parameter_at_e].values.used; ++position_at) { - if (main->parameters[fss_extended_list_read_parameter_at].values.array[position_at] < position_depth) { + if (main->parameters[fss_extended_list_read_parameter_at_e].values.array[position_at] < position_depth) { continue; } - if (i + 1 < data->depths.used && main->parameters[fss_extended_list_read_parameter_at].values.array[position_at] > main->parameters[fss_extended_list_read_parameter_depth].values.array[i + 1]) { + if (i + 1 < data->depths.used && main->parameters[fss_extended_list_read_parameter_at_e].values.array[position_at] > main->parameters[fss_extended_list_read_parameter_depth_e].values.array[i + 1]) { break; } - data->depths.array[i].index_at = main->parameters[fss_extended_list_read_parameter_at].values.array[position_at]; + data->depths.array[i].index_at = main->parameters[fss_extended_list_read_parameter_at_e].values.array[position_at]; const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[data->depths.array[i].index_at])); @@ -138,20 +138,20 @@ extern "C" { } // for } - if (main->parameters[fss_extended_list_read_parameter_name].result == f_console_result_additional) { - for (; position_name < main->parameters[fss_extended_list_read_parameter_name].values.used; ++position_name) { + if (main->parameters[fss_extended_list_read_parameter_name_e].result == f_console_result_additional_e) { + for (; position_name < main->parameters[fss_extended_list_read_parameter_name_e].values.used; ++position_name) { - if (main->parameters[fss_extended_list_read_parameter_name].values.array[position_name] < position_depth) { + if (main->parameters[fss_extended_list_read_parameter_name_e].values.array[position_name] < position_depth) { continue; } - if (i + 1 < data->depths.used && main->parameters[fss_extended_list_read_parameter_name].values.array[position_name] > main->parameters[fss_extended_list_read_parameter_depth].values.array[i + 1]) { + if (i + 1 < data->depths.used && main->parameters[fss_extended_list_read_parameter_name_e].values.array[position_name] > main->parameters[fss_extended_list_read_parameter_depth_e].values.array[i + 1]) { break; } - data->depths.array[i].index_name = main->parameters[fss_extended_list_read_parameter_name].values.array[position_name]; + data->depths.array[i].index_name = main->parameters[fss_extended_list_read_parameter_name_e].values.array[position_name]; - if (main->parameters[fss_extended_list_read_parameter_trim].result == f_console_result_found) { + if (main->parameters[fss_extended_list_read_parameter_trim_e].result == f_console_result_found_e) { status = fl_string_rip(arguments->argv[data->depths.array[i].index_name], strlen(arguments->argv[data->depths.array[i].index_name]), &data->depths.array[i].value_name); } else { @@ -159,7 +159,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), main->parameters[fss_extended_list_read_parameter_trim].result == f_console_result_found ? "fl_string_rip" : "f_string_append", F_true); + fll_error_print(main->error, F_status_set_fine(status), main->parameters[fss_extended_list_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_rip" : "f_string_append", F_true); return status; } @@ -176,7 +176,7 @@ extern "C" { } if (data->depths.array[i].depth == data->depths.array[j].depth) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -191,7 +191,7 @@ extern "C" { return F_status_set_error(F_parameter); } else if (data->depths.array[i].depth > data->depths.array[j].depth) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -242,7 +242,7 @@ extern "C" { if (F_status_is_error(status)) { const f_string_t file_name = fss_extended_list_read_file_identify(input.start, data->files); - fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_extended_list_read", F_true, file_name ? file_name : "-", "process", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_extended_list_read", F_true, file_name ? file_name : "-", "process", fll_error_file_type_file_e); return status; } @@ -263,7 +263,7 @@ extern "C" { #ifndef _di_fss_extended_list_read_load_number_ f_status_t fss_extended_list_read_load_number(fss_extended_list_read_main_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) { - if (main->parameters[parameter].result == f_console_result_additional) { + if (main->parameters[parameter].result == f_console_result_additional_e) { const f_array_length_t index = main->parameters[parameter].values.array[main->parameters[parameter].values.used - 1]; const f_string_range_t range = macro_f_string_range_t_initialize(strnlen(arguments->argv[index], f_console_parameter_size)); @@ -343,7 +343,7 @@ extern "C" { #ifndef _di_fss_extended_list_read_print_content_ignore_ void fss_extended_list_read_print_content_ignore(fss_extended_list_read_main_t * const main) { - if (main->parameters[fss_extended_list_read_parameter_pipe].result == f_console_result_found) { + if (main->parameters[fss_extended_list_read_parameter_pipe_e].result == f_console_result_found_e) { f_print_character(fss_extended_list_read_pipe_content_ignore, main->output.to.stream); } } @@ -352,7 +352,7 @@ extern "C" { #ifndef _di_fss_extended_list_read_print_object_end_ void fss_extended_list_read_print_object_end(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t * const data) { - if (main->parameters[fss_extended_list_read_parameter_pipe].result == f_console_result_found) { + if (main->parameters[fss_extended_list_read_parameter_pipe_e].result == f_console_result_found_e) { f_print_character(fss_extended_list_read_pipe_content_start, main->output.to.stream); } else { @@ -367,7 +367,7 @@ extern "C" { #ifndef _di_fss_extended_list_read_print_set_end_ void fss_extended_list_read_print_set_end(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t * const data) { - if (main->parameters[fss_extended_list_read_parameter_pipe].result == f_console_result_found) { + if (main->parameters[fss_extended_list_read_parameter_pipe_e].result == f_console_result_found_e) { f_print_character(fss_extended_list_read_pipe_content_end, main->output.to.stream); } else { @@ -406,7 +406,7 @@ extern "C" { // This standard does not support multiple content groups. if ((data->option & fss_extended_list_read_data_option_select) && data->select) { - if (main->parameters[fss_extended_list_read_parameter_total].result == f_console_result_found) { + if (main->parameters[fss_extended_list_read_parameter_total_e].result == f_console_result_found_e) { fss_extended_list_read_print_zero(main); } @@ -760,53 +760,53 @@ extern "C" { f_status_t status = F_none; - if (main->parameters[fss_extended_list_read_parameter_at].result == f_console_result_additional) { + if (main->parameters[fss_extended_list_read_parameter_at_e].result == f_console_result_additional_e) { data->option |= fss_extended_list_read_data_option_at; } - if (main->parameters[fss_extended_list_read_parameter_columns].result == f_console_result_found) { + if (main->parameters[fss_extended_list_read_parameter_columns_e].result == f_console_result_found_e) { data->option |= fss_extended_list_read_data_option_columns; } - if (main->parameters[fss_extended_list_read_parameter_content].result == f_console_result_found) { + if (main->parameters[fss_extended_list_read_parameter_content_e].result == f_console_result_found_e) { data->option |= fss_extended_list_read_data_option_content; } - if (main->parameters[fss_extended_list_read_parameter_empty].result == f_console_result_found) { + if (main->parameters[fss_extended_list_read_parameter_empty_e].result == f_console_result_found_e) { data->option |= fss_extended_list_read_data_option_empty; } - if (main->parameters[fss_extended_list_read_parameter_line].result == f_console_result_additional) { + if (main->parameters[fss_extended_list_read_parameter_line_e].result == f_console_result_additional_e) { data->option |= fss_extended_list_read_data_option_line; - status = fss_extended_list_read_load_number(main, fss_extended_list_read_parameter_line, fss_extended_list_read_long_line_s, arguments, &data->line); + status = fss_extended_list_read_load_number(main, fss_extended_list_read_parameter_line_e, fss_extended_list_read_long_line_s, arguments, &data->line); if (F_status_is_error(status)) return status; } - if (main->parameters[fss_extended_list_read_parameter_name].result == f_console_result_additional) { + if (main->parameters[fss_extended_list_read_parameter_name_e].result == f_console_result_additional_e) { data->option |= fss_extended_list_read_data_option_name; } - if (main->parameters[fss_extended_list_read_parameter_object].result == f_console_result_found) { + if (main->parameters[fss_extended_list_read_parameter_object_e].result == f_console_result_found_e) { data->option |= fss_extended_list_read_data_option_object; } - if (main->parameters[fss_extended_list_read_parameter_raw].result == f_console_result_found) { + if (main->parameters[fss_extended_list_read_parameter_raw_e].result == f_console_result_found_e) { data->option |= fss_extended_list_read_data_option_raw; } - if (main->parameters[fss_extended_list_read_parameter_select].result == f_console_result_additional) { + if (main->parameters[fss_extended_list_read_parameter_select_e].result == f_console_result_additional_e) { data->option |= fss_extended_list_read_data_option_select; - status = fss_extended_list_read_load_number(main, fss_extended_list_read_parameter_select, fss_extended_list_read_long_select_s, arguments, &data->select); + status = fss_extended_list_read_load_number(main, fss_extended_list_read_parameter_select_e, fss_extended_list_read_long_select_s, arguments, &data->select); if (F_status_is_error(status)) return status; } - if (main->parameters[fss_extended_list_read_parameter_total].result == f_console_result_found) { + if (main->parameters[fss_extended_list_read_parameter_total_e].result == f_console_result_found_e) { data->option |= fss_extended_list_read_data_option_total; } - if (main->parameters[fss_extended_list_read_parameter_trim].result == f_console_result_found) { + if (main->parameters[fss_extended_list_read_parameter_trim_e].result == f_console_result_found_e) { data->option |= fss_extended_list_read_data_option_trim; } diff --git a/level_3/fss_extended_list_read/data/build/dependencies b/level_3/fss_extended_list_read/data/build/dependencies index 25e27eb..b944420 100644 --- a/level_3/fss_extended_list_read/data/build/dependencies +++ b/level_3/fss_extended_list_read/data/build/dependencies @@ -19,7 +19,6 @@ fl_console fl_conversion fl_fss fl_print -fl_status fl_string fll_error fll_file diff --git a/level_3/fss_extended_list_read/data/build/settings b/level_3/fss_extended_list_read/data/build/settings index 8c8c80c..db14ac9 100644 --- a/level_3/fss_extended_list_read/data/build/settings +++ b/level_3/fss_extended_list_read/data/build/settings @@ -21,7 +21,7 @@ build_indexer ar build_indexer_arguments rcs build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -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_signal -lf_string -lf_type_array -lf_utf +build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -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_signal -lf_status_string -lf_string -lf_type_array -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared 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 ee13042..3323f54 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 @@ -68,7 +68,7 @@ extern "C" { const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_extended_list_write_total_parameters_d); { - f_console_parameter_id_t ids[3] = { fss_extended_list_write_parameter_no_color, fss_extended_list_write_parameter_light, fss_extended_list_write_parameter_dark }; + f_console_parameter_id_t ids[3] = { fss_extended_list_write_parameter_no_color_e, fss_extended_list_write_parameter_light_e, fss_extended_list_write_parameter_dark_e }; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3); status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context); @@ -101,7 +101,7 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_extended_list_write_parameter_verbosity_quiet, fss_extended_list_write_parameter_verbosity_normal, fss_extended_list_write_parameter_verbosity_verbose, fss_extended_list_write_parameter_verbosity_debug }; + f_console_parameter_id_t ids[4] = { fss_extended_list_write_parameter_verbosity_quiet_e, fss_extended_list_write_parameter_verbosity_normal_e, fss_extended_list_write_parameter_verbosity_verbose_e, fss_extended_list_write_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); @@ -112,39 +112,39 @@ extern "C" { return status; } - if (choice == fss_extended_list_write_parameter_verbosity_quiet) { - main->output.verbosity = f_console_verbosity_quiet; - main->error.verbosity = f_console_verbosity_quiet; - main->warning.verbosity = f_console_verbosity_quiet; + if (choice == fss_extended_list_write_parameter_verbosity_quiet_e) { + main->output.verbosity = f_console_verbosity_quiet_e; + main->error.verbosity = f_console_verbosity_quiet_e; + main->warning.verbosity = f_console_verbosity_quiet_e; } - else if (choice == fss_extended_list_write_parameter_verbosity_normal) { - main->output.verbosity = f_console_verbosity_normal; - main->error.verbosity = f_console_verbosity_normal; - main->warning.verbosity = f_console_verbosity_normal; + else if (choice == fss_extended_list_write_parameter_verbosity_normal_e) { + main->output.verbosity = f_console_verbosity_normal_e; + main->error.verbosity = f_console_verbosity_normal_e; + main->warning.verbosity = f_console_verbosity_normal_e; } - else if (choice == fss_extended_list_write_parameter_verbosity_verbose) { - main->output.verbosity = f_console_verbosity_verbose; - main->error.verbosity = f_console_verbosity_verbose; - main->warning.verbosity = f_console_verbosity_verbose; + else if (choice == fss_extended_list_write_parameter_verbosity_verbose_e) { + main->output.verbosity = f_console_verbosity_verbose_e; + main->error.verbosity = f_console_verbosity_verbose_e; + main->warning.verbosity = f_console_verbosity_verbose_e; } - else if (choice == fss_extended_list_write_parameter_verbosity_debug) { - main->output.verbosity = f_console_verbosity_debug; - main->error.verbosity = f_console_verbosity_debug; - main->warning.verbosity = f_console_verbosity_debug; + else if (choice == fss_extended_list_write_parameter_verbosity_debug_e) { + main->output.verbosity = f_console_verbosity_debug_e; + main->error.verbosity = f_console_verbosity_debug_e; + main->warning.verbosity = f_console_verbosity_debug_e; } } status = F_none; } - if (main->parameters[fss_extended_list_write_parameter_help].result == f_console_result_found) { + if (main->parameters[fss_extended_list_write_parameter_help_e].result == f_console_result_found_e) { fss_extended_list_write_print_help(main->output.to, main->context); fss_extended_list_write_main_delete(main); return status; } - if (main->parameters[fss_extended_list_write_parameter_version].result == f_console_result_found) { + if (main->parameters[fss_extended_list_write_parameter_version_e].result == f_console_result_found_e) { fll_program_print_version(main->output.to, fss_extended_list_write_program_version_s); fss_extended_list_write_main_delete(main); @@ -158,9 +158,9 @@ extern "C" { output.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d; if (F_status_is_error_not(status)) { - if (main->parameters[fss_extended_list_write_parameter_file].result == f_console_result_additional) { - if (main->parameters[fss_extended_list_write_parameter_file].values.used > 1) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[fss_extended_list_write_parameter_file_e].result == f_console_result_additional_e) { + if (main->parameters[fss_extended_list_write_parameter_file_e].values.used > 1) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -173,41 +173,41 @@ extern "C" { status = F_status_set_error(F_parameter); } else { - const f_array_length_t location = main->parameters[fss_extended_list_write_parameter_file].values.array[0]; + const f_array_length_t location = main->parameters[fss_extended_list_write_parameter_file_e].values.array[0]; output.id = -1; output.stream = 0; status = f_file_stream_open(arguments->argv[location], 0, &output); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], "open", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], "open", fll_error_file_type_file_e); } } } - else if (main->parameters[fss_extended_list_write_parameter_file].result == f_console_result_found) { + else if (main->parameters[fss_extended_list_write_parameter_file_e].result == f_console_result_found_e) { fss_extended_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_extended_list_write_long_file_s); status = F_status_set_error(F_parameter); } } if (F_status_is_error_not(status)) { - if (main->parameters[fss_extended_list_write_parameter_object].locations.used || main->parameters[fss_extended_list_write_parameter_content].locations.used) { - if (main->parameters[fss_extended_list_write_parameter_object].locations.used) { - if (main->parameters[fss_extended_list_write_parameter_object].locations.used != main->parameters[fss_extended_list_write_parameter_object].values.used) { + if (main->parameters[fss_extended_list_write_parameter_object_e].locations.used || main->parameters[fss_extended_list_write_parameter_content_e].locations.used) { + if (main->parameters[fss_extended_list_write_parameter_object_e].locations.used) { + if (main->parameters[fss_extended_list_write_parameter_object_e].locations.used != main->parameters[fss_extended_list_write_parameter_object_e].values.used) { fss_extended_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_extended_list_write_long_object_s); status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_extended_list_write_parameter_content].locations.used != main->parameters[fss_extended_list_write_parameter_content].values.used) { + else if (main->parameters[fss_extended_list_write_parameter_content_e].locations.used != main->parameters[fss_extended_list_write_parameter_content_e].values.used) { fss_extended_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_extended_list_write_long_content_s); status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_extended_list_write_parameter_object].locations.used != main->parameters[fss_extended_list_write_parameter_content].locations.used && main->parameters[fss_extended_list_write_parameter_partial].result == f_console_result_none) { + else if (main->parameters[fss_extended_list_write_parameter_object_e].locations.used != main->parameters[fss_extended_list_write_parameter_content_e].locations.used && main->parameters[fss_extended_list_write_parameter_partial_e].result == f_console_result_none_e) { fss_extended_list_write_error_parameter_same_times_print(main); status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_extended_list_write_parameter_content].locations.used && main->parameters[fss_extended_list_write_parameter_partial].locations.used) { - if (main->parameters[fss_extended_list_write_parameter_content].result == f_console_result_additional) { - if (main->error.verbosity != f_console_verbosity_quiet) { + else if (main->parameters[fss_extended_list_write_parameter_content_e].locations.used && main->parameters[fss_extended_list_write_parameter_partial_e].locations.used) { + if (main->parameters[fss_extended_list_write_parameter_content_e].result == f_console_result_additional_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -226,20 +226,20 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[fss_extended_list_write_parameter_content].result == f_console_result_additional) { + if (main->parameters[fss_extended_list_write_parameter_content_e].result == f_console_result_additional_e) { f_array_length_t location_object = 0; f_array_length_t location_content = 0; f_array_length_t location_sub_object = 0; f_array_length_t location_sub_content = 0; - for (f_array_length_t i = 0; i < main->parameters[fss_extended_list_write_parameter_object].locations.used; ++i) { - location_object = main->parameters[fss_extended_list_write_parameter_object].locations.array[i]; - location_content = main->parameters[fss_extended_list_write_parameter_content].locations.array[i]; - location_sub_object = main->parameters[fss_extended_list_write_parameter_object].locations_sub.array[i]; - location_sub_content = main->parameters[fss_extended_list_write_parameter_content].locations_sub.array[i]; + for (f_array_length_t i = 0; i < main->parameters[fss_extended_list_write_parameter_object_e].locations.used; ++i) { + location_object = main->parameters[fss_extended_list_write_parameter_object_e].locations.array[i]; + location_content = main->parameters[fss_extended_list_write_parameter_content_e].locations.array[i]; + location_sub_object = main->parameters[fss_extended_list_write_parameter_object_e].locations_sub.array[i]; + location_sub_content = main->parameters[fss_extended_list_write_parameter_content_e].locations_sub.array[i]; if (location_object > location_content || location_object == location_content && location_sub_object > location_sub_content) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sEach '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -258,19 +258,19 @@ extern "C" { } } } - else if (main->parameters[fss_extended_list_write_parameter_content].locations.used) { - if (main->parameters[fss_extended_list_write_parameter_content].locations.used != main->parameters[fss_extended_list_write_parameter_content].values.used) { + else if (main->parameters[fss_extended_list_write_parameter_content_e].locations.used) { + if (main->parameters[fss_extended_list_write_parameter_content_e].locations.used != main->parameters[fss_extended_list_write_parameter_content_e].values.used) { fss_extended_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_extended_list_write_long_content_s); status = F_status_set_error(F_parameter); } - else if (!main->parameters[fss_extended_list_write_parameter_partial].locations.used) { + else if (!main->parameters[fss_extended_list_write_parameter_partial_e].locations.used) { fss_extended_list_write_error_parameter_same_times_print(main); status = F_status_set_error(F_parameter); } } } else if (!main->process_pipe) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThis requires either piped data or the use of the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -286,8 +286,8 @@ extern "C" { } if (F_status_is_error_not(status) && main->process_pipe) { - if (main->parameters[fss_extended_list_write_parameter_partial].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[fss_extended_list_write_parameter_partial_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThis '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -303,8 +303,8 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[fss_extended_list_write_parameter_prepend].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[fss_extended_list_write_parameter_prepend_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -316,8 +316,8 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_extended_list_write_parameter_prepend].result == f_console_result_additional) { - const f_array_length_t index = main->parameters[fss_extended_list_write_parameter_prepend].values.array[main->parameters[fss_extended_list_write_parameter_prepend].values.used - 1]; + else if (main->parameters[fss_extended_list_write_parameter_prepend_e].result == f_console_result_additional_e) { + const f_array_length_t index = main->parameters[fss_extended_list_write_parameter_prepend_e].values.array[main->parameters[fss_extended_list_write_parameter_prepend_e].values.used - 1]; const f_array_length_t length = strnlen(arguments->argv[index], f_console_parameter_size); if (length) { @@ -333,7 +333,7 @@ extern "C" { if (F_status_is_error(status)) break; if (status == F_false) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -349,7 +349,7 @@ extern "C" { } // for } else { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -365,8 +365,8 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[fss_extended_list_write_parameter_ignore].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[fss_extended_list_write_parameter_ignore_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -378,9 +378,9 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_extended_list_write_parameter_ignore].result == f_console_result_additional) { - const f_array_length_t total_locations = main->parameters[fss_extended_list_write_parameter_ignore].locations.used; - const f_array_length_t total_arguments = main->parameters[fss_extended_list_write_parameter_ignore].values.used; + else if (main->parameters[fss_extended_list_write_parameter_ignore_e].result == f_console_result_additional_e) { + const f_array_length_t total_locations = main->parameters[fss_extended_list_write_parameter_ignore_e].locations.used; + const f_array_length_t total_arguments = main->parameters[fss_extended_list_write_parameter_ignore_e].values.used; if (total_locations * 2 > total_arguments) { flockfile(main->error.to.stream); @@ -399,14 +399,14 @@ extern "C" { f_fss_quote_t quote = F_fss_delimit_quote_double_s; if (F_status_is_error_not(status)) { - if (main->parameters[fss_extended_list_write_parameter_double].result == f_console_result_found) { - if (main->parameters[fss_extended_list_write_parameter_single].result == f_console_result_found) { - if (main->parameters[fss_extended_list_write_parameter_double].location < main->parameters[fss_extended_list_write_parameter_single].location) { + if (main->parameters[fss_extended_list_write_parameter_double_e].result == f_console_result_found_e) { + if (main->parameters[fss_extended_list_write_parameter_single_e].result == f_console_result_found_e) { + if (main->parameters[fss_extended_list_write_parameter_double_e].location < main->parameters[fss_extended_list_write_parameter_single_e].location) { quote = F_fss_delimit_quote_single_s; } } } - else if (main->parameters[fss_extended_list_write_parameter_single].result == f_console_result_found) { + else if (main->parameters[fss_extended_list_write_parameter_single_e].result == f_console_result_found_e) { quote = F_fss_delimit_quote_single_s; } } @@ -423,7 +423,7 @@ extern "C" { status = fss_extended_list_write_process_pipe(main, output, quote, &buffer, &ignore); if (F_status_is_error(status)) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sWhile processing the '%]%[input pipe%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context, main->error.notable, main->error.notable); @@ -437,17 +437,17 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[fss_extended_list_write_parameter_partial].result == f_console_result_found) { + if (main->parameters[fss_extended_list_write_parameter_partial_e].result == f_console_result_found_e) { - if (main->parameters[fss_extended_list_write_parameter_object].result == f_console_result_additional) { - for (f_array_length_t i = 0; i < main->parameters[fss_extended_list_write_parameter_object].values.used; ++i) { + if (main->parameters[fss_extended_list_write_parameter_object_e].result == f_console_result_additional_e) { + for (f_array_length_t i = 0; i < main->parameters[fss_extended_list_write_parameter_object_e].values.used; ++i) { if (fss_extended_list_write_signal_received(main)) { status = F_status_set_error(F_interrupt); break; } - object.string = arguments->argv[main->parameters[fss_extended_list_write_parameter_object].values.array[i]]; + object.string = arguments->argv[main->parameters[fss_extended_list_write_parameter_object_e].values.array[i]]; object.used = strnlen(object.string, f_console_parameter_size); object.size = object.used; @@ -456,17 +456,17 @@ extern "C" { } // for } else { - for (f_array_length_t i = 0; i < main->parameters[fss_extended_list_write_parameter_content].values.used; ++i) { + for (f_array_length_t i = 0; i < main->parameters[fss_extended_list_write_parameter_content_e].values.used; ++i) { if (fss_extended_list_write_signal_received(main)) { status = F_status_set_error(F_interrupt); break; } - status = fss_extended_list_write_process_parameter_ignore(main, arguments, main->parameters[fss_extended_list_write_parameter_content].locations, i, &ignore); + status = fss_extended_list_write_process_parameter_ignore(main, arguments, main->parameters[fss_extended_list_write_parameter_content_e].locations, i, &ignore); if (F_status_is_error(status)) break; - content.string = arguments->argv[main->parameters[fss_extended_list_write_parameter_content].values.array[i]]; + content.string = arguments->argv[main->parameters[fss_extended_list_write_parameter_content_e].values.array[i]]; content.used = strnlen(content.string, f_console_parameter_size); content.size = content.used; @@ -476,21 +476,21 @@ extern "C" { } } else { - for (f_array_length_t i = 0; i < main->parameters[fss_extended_list_write_parameter_object].values.used; ++i) { + for (f_array_length_t i = 0; i < main->parameters[fss_extended_list_write_parameter_object_e].values.used; ++i) { if (fss_extended_list_write_signal_received(main)) { status = F_status_set_error(F_interrupt); break; } - status = fss_extended_list_write_process_parameter_ignore(main, arguments, main->parameters[fss_extended_list_write_parameter_content].locations, i, &ignore); + status = fss_extended_list_write_process_parameter_ignore(main, arguments, main->parameters[fss_extended_list_write_parameter_content_e].locations, i, &ignore); if (F_status_is_error(status)) break; - object.string = arguments->argv[main->parameters[fss_extended_list_write_parameter_object].values.array[i]]; + object.string = arguments->argv[main->parameters[fss_extended_list_write_parameter_object_e].values.array[i]]; object.used = strnlen(object.string, f_console_parameter_size); object.size = object.used; - content.string = arguments->argv[main->parameters[fss_extended_list_write_parameter_content].values.array[i]]; + content.string = arguments->argv[main->parameters[fss_extended_list_write_parameter_content_e].values.array[i]]; content.used = strnlen(content.string, f_console_parameter_size); content.size = content.used; @@ -500,7 +500,7 @@ extern "C" { } if (F_status_is_error(status)) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sWhile processing the '%]%[input arguments%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context, main->error.notable, main->error.notable); @@ -509,7 +509,7 @@ extern "C" { funlockfile(main->error.to.stream); } } - else if (main->error.verbosity != f_console_verbosity_quiet && main->parameters[fss_extended_list_write_parameter_file].result == f_console_result_none) { + else if (main->error.verbosity != f_console_verbosity_quiet_e && main->parameters[fss_extended_list_write_parameter_file_e].result == f_console_result_none_e) { // ensure there is always a newline at the end, unless in quiet mode. fll_print_character(f_string_eol_s[0], main->error.to.stream); @@ -529,14 +529,14 @@ extern "C" { content.size = 0; } - if (main->parameters[fss_extended_list_write_parameter_file].result == f_console_result_additional) { + if (main->parameters[fss_extended_list_write_parameter_file_e].result == f_console_result_additional_e) { if (output.id != -1) { f_file_stream_close(F_true, &output); } } // ensure a newline is always put at the end of the program execution, unless in quiet mode. - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { if (F_status_is_error(status)) { fll_print_character(f_string_eol_s[0], main->error.to.stream); } 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 f6d243d..a9e65d5 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 @@ -33,12 +33,10 @@ #include #include #include -#include #include // fll-2 includes #include -#include #include #include @@ -95,47 +93,47 @@ extern "C" { #define fss_extended_list_write_long_trim_s "trim" enum { - fss_extended_list_write_parameter_help, - fss_extended_list_write_parameter_light, - fss_extended_list_write_parameter_dark, - fss_extended_list_write_parameter_no_color, - fss_extended_list_write_parameter_verbosity_quiet, - fss_extended_list_write_parameter_verbosity_normal, - fss_extended_list_write_parameter_verbosity_verbose, - fss_extended_list_write_parameter_verbosity_debug, - fss_extended_list_write_parameter_version, - - fss_extended_list_write_parameter_file, - fss_extended_list_write_parameter_content, - fss_extended_list_write_parameter_double, - fss_extended_list_write_parameter_ignore, - fss_extended_list_write_parameter_object, - fss_extended_list_write_parameter_partial, - fss_extended_list_write_parameter_prepend, - fss_extended_list_write_parameter_single, - fss_extended_list_write_parameter_trim, + fss_extended_list_write_parameter_help_e, + fss_extended_list_write_parameter_light_e, + fss_extended_list_write_parameter_dark_e, + fss_extended_list_write_parameter_no_color_e, + fss_extended_list_write_parameter_verbosity_quiet_e, + fss_extended_list_write_parameter_verbosity_normal_e, + fss_extended_list_write_parameter_verbosity_verbose_e, + fss_extended_list_write_parameter_verbosity_debug_e, + fss_extended_list_write_parameter_version_e, + + fss_extended_list_write_parameter_file_e, + fss_extended_list_write_parameter_content_e, + fss_extended_list_write_parameter_double_e, + fss_extended_list_write_parameter_ignore_e, + fss_extended_list_write_parameter_object_e, + fss_extended_list_write_parameter_partial_e, + fss_extended_list_write_parameter_prepend_e, + fss_extended_list_write_parameter_single_e, + fss_extended_list_write_parameter_trim_e, }; #define fss_extended_list_write_console_parameter_t_initialize \ { \ - 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_s, fss_extended_list_write_long_file_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_write_short_content_s, fss_extended_list_write_long_content_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_write_short_double_s, fss_extended_list_write_long_double_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_write_short_ignore_s, fss_extended_list_write_long_ignore_s, 0, 2, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_write_short_object_s, fss_extended_list_write_long_object_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_write_short_partial_s, fss_extended_list_write_long_partial_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_write_short_prepend_s, fss_extended_list_write_long_prepend_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_write_short_single_s, fss_extended_list_write_long_single_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_write_short_trim_s, fss_extended_list_write_long_trim_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse_e), \ + 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_e), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(fss_extended_list_write_short_file_s, fss_extended_list_write_long_file_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_list_write_short_content_s, fss_extended_list_write_long_content_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_list_write_short_double_s, fss_extended_list_write_long_double_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_list_write_short_ignore_s, fss_extended_list_write_long_ignore_s, 0, 2, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_list_write_short_object_s, fss_extended_list_write_long_object_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_list_write_short_partial_s, fss_extended_list_write_long_partial_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_list_write_short_prepend_s, fss_extended_list_write_long_prepend_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_list_write_short_single_s, fss_extended_list_write_long_single_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_list_write_short_trim_s, fss_extended_list_write_long_trim_s, 0, 0, f_console_type_normal_e), \ } #define fss_extended_list_write_total_parameters_d 18 diff --git a/level_3/fss_extended_list_write/c/private-common.c b/level_3/fss_extended_list_write/c/private-common.c index b588c36..2aeb205 100644 --- a/level_3/fss_extended_list_write/c/private-common.c +++ b/level_3/fss_extended_list_write/c/private-common.c @@ -8,7 +8,7 @@ extern "C" { #ifndef _di_fss_extended_list_write_print_signal_received_ void fss_extended_list_write_print_signal_received(fss_extended_list_write_main_t * const main, const f_status_t signal) { - if (main->warning.verbosity != f_console_verbosity_verbose) return; + if (main->warning.verbosity != f_console_verbosity_verbose_e) return; // Must flush and reset color because the interrupt may have interrupted the middle of a print function. fflush(main->warning.to.stream); 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 c7339e9..c894026 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 @@ -9,7 +9,7 @@ extern "C" { #ifndef _di_fss_extended_list_write_error_parameter_same_times_print_ void fss_extended_list_write_error_parameter_same_times_print(fss_extended_list_write_main_t * const main) { - if (main->error.verbosity == f_console_verbosity_quiet) { + if (main->error.verbosity == f_console_verbosity_quiet_e) { return; } @@ -30,7 +30,7 @@ extern "C" { #ifndef _di_fss_extended_list_write_error_parameter_unsupported_eol_print_ void fss_extended_list_write_error_parameter_unsupported_eol_print(fss_extended_list_write_main_t * const main) { - if (main->error.verbosity == f_console_verbosity_quiet) { + if (main->error.verbosity == f_console_verbosity_quiet_e) { return; } @@ -47,7 +47,7 @@ extern "C" { #ifndef _di_fss_extended_list_write_error_parameter_value_missing_print_ void fss_extended_list_write_error_parameter_value_missing_print(fss_extended_list_write_main_t * const main, const f_string_t symbol, const f_string_t parameter) { - if (main->error.verbosity == f_console_verbosity_quiet) { + if (main->error.verbosity == f_console_verbosity_quiet_e) { return; } @@ -69,7 +69,7 @@ extern "C" { f_string_range_t range = f_string_range_t_initialize; if (object) { - uint8_t complete = f_fss_complete_none; + uint8_t complete = f_fss_complete_none_e; if (object->used) { range.start = 0; @@ -81,11 +81,11 @@ extern "C" { } if (content) { - if (main->parameters[fss_extended_list_write_parameter_trim].result == f_console_result_found) { - complete = f_fss_complete_full_trim; + if (main->parameters[fss_extended_list_write_parameter_trim_e].result == f_console_result_found_e) { + complete = f_fss_complete_full_trim_e; } else { - complete = f_fss_complete_full; + complete = f_fss_complete_full_e; } } @@ -108,7 +108,7 @@ extern "C" { range.start = 0; range.stop = content->used - 1; - status = fl_fss_extended_list_content_write(*content, object ? f_fss_complete_full : f_fss_complete_none, &main->prepend, ignore, state, &range, buffer); + status = fl_fss_extended_list_content_write(*content, object ? f_fss_complete_full_e : f_fss_complete_none_e, &main->prepend, ignore, state, &range, buffer); if (F_status_is_error(status)) { fll_error_print(main->error, F_status_set_fine(status), "fl_fss_extended_list_content_write", F_true); @@ -256,7 +256,7 @@ extern "C" { for (; range.start <= range.stop; ++range.start) { if (block.string[range.start] == fss_extended_list_write_pipe_content_start_s) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[%sThis standard only supports one content per object.%]%c", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context, f_string_eol_s[0]); } @@ -354,13 +354,13 @@ extern "C" { range.start = 0; - for (; i < main->parameters[fss_extended_list_write_parameter_ignore].locations.used; ++i) { + for (; i < main->parameters[fss_extended_list_write_parameter_ignore_e].locations.used; ++i) { if (fss_extended_list_write_signal_received(main)) { return F_status_set_error(F_interrupt); } - l = main->parameters[fss_extended_list_write_parameter_ignore].locations.array[i]; + l = main->parameters[fss_extended_list_write_parameter_ignore_e].locations.array[i]; if (l < contents.array[location]) continue; if (location + 1 < contents.used && l > contents.array[location + 1]) continue; @@ -386,7 +386,7 @@ extern "C" { } } - index = main->parameters[fss_extended_list_write_parameter_ignore].values.array[i * 2]; + index = main->parameters[fss_extended_list_write_parameter_ignore_e].values.array[i * 2]; range.start = 0; range.stop = strnlen(arguments->argv[index], f_console_parameter_size) - 1; @@ -406,7 +406,7 @@ extern "C" { ignore->array[ignore->used].start = number; - index = main->parameters[fss_extended_list_write_parameter_ignore].values.array[(i * 2) + 1]; + index = main->parameters[fss_extended_list_write_parameter_ignore_e].values.array[(i * 2) + 1]; range.start = 0; range.stop = strnlen(arguments->argv[index], f_console_parameter_size) - 1; diff --git a/level_3/fss_extended_list_write/data/build/dependencies b/level_3/fss_extended_list_write/data/build/dependencies index 25e27eb..b944420 100644 --- a/level_3/fss_extended_list_write/data/build/dependencies +++ b/level_3/fss_extended_list_write/data/build/dependencies @@ -19,7 +19,6 @@ fl_console fl_conversion fl_fss fl_print -fl_status fl_string fll_error fll_file diff --git a/level_3/fss_extended_list_write/data/build/settings b/level_3/fss_extended_list_write/data/build/settings index db5d018..7c1ee6b 100644 --- a/level_3/fss_extended_list_write/data/build/settings +++ b/level_3/fss_extended_list_write/data/build/settings @@ -21,7 +21,7 @@ build_indexer ar build_indexer_arguments rcs build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -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_signal -lf_string -lf_type_array -lf_utf +build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -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_signal -lf_status_string -lf_string -lf_type_array -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared 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 d5ccd59..5961a15 100644 --- a/level_3/fss_extended_read/c/fss_extended_read.c +++ b/level_3/fss_extended_read/c/fss_extended_read.c @@ -125,7 +125,7 @@ extern "C" { const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_extended_read_total_parameters_d); { - f_console_parameter_id_t ids[3] = { fss_extended_read_parameter_no_color, fss_extended_read_parameter_light, fss_extended_read_parameter_dark }; + f_console_parameter_id_t ids[3] = { fss_extended_read_parameter_no_color_e, fss_extended_read_parameter_light_e, fss_extended_read_parameter_dark_e }; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3); status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context); @@ -159,7 +159,7 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_extended_read_parameter_verbosity_quiet, fss_extended_read_parameter_verbosity_normal, fss_extended_read_parameter_verbosity_verbose, fss_extended_read_parameter_verbosity_debug }; + f_console_parameter_id_t ids[4] = { fss_extended_read_parameter_verbosity_quiet_e, fss_extended_read_parameter_verbosity_normal_e, fss_extended_read_parameter_verbosity_verbose_e, fss_extended_read_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); @@ -171,32 +171,32 @@ extern "C" { return status; } - if (choice == fss_extended_read_parameter_verbosity_quiet) { - main->output.verbosity = f_console_verbosity_quiet; - main->error.verbosity = f_console_verbosity_quiet; - main->warning.verbosity = f_console_verbosity_quiet; + if (choice == fss_extended_read_parameter_verbosity_quiet_e) { + main->output.verbosity = f_console_verbosity_quiet_e; + main->error.verbosity = f_console_verbosity_quiet_e; + main->warning.verbosity = f_console_verbosity_quiet_e; } - else if (choice == fss_extended_read_parameter_verbosity_normal) { - main->output.verbosity = f_console_verbosity_normal; - main->error.verbosity = f_console_verbosity_normal; - main->warning.verbosity = f_console_verbosity_normal; + else if (choice == fss_extended_read_parameter_verbosity_normal_e) { + main->output.verbosity = f_console_verbosity_normal_e; + main->error.verbosity = f_console_verbosity_normal_e; + main->warning.verbosity = f_console_verbosity_normal_e; } - else if (choice == fss_extended_read_parameter_verbosity_verbose) { - main->output.verbosity = f_console_verbosity_verbose; - main->error.verbosity = f_console_verbosity_verbose; - main->warning.verbosity = f_console_verbosity_verbose; + else if (choice == fss_extended_read_parameter_verbosity_verbose_e) { + main->output.verbosity = f_console_verbosity_verbose_e; + main->error.verbosity = f_console_verbosity_verbose_e; + main->warning.verbosity = f_console_verbosity_verbose_e; } - else if (choice == fss_extended_read_parameter_verbosity_debug) { - main->output.verbosity = f_console_verbosity_debug; - main->error.verbosity = f_console_verbosity_debug; - main->warning.verbosity = f_console_verbosity_debug; + else if (choice == fss_extended_read_parameter_verbosity_debug_e) { + main->output.verbosity = f_console_verbosity_debug_e; + main->error.verbosity = f_console_verbosity_debug_e; + main->warning.verbosity = f_console_verbosity_debug_e; } } status = F_none; } - if (main->parameters[fss_extended_read_parameter_help].result == f_console_result_found) { + if (main->parameters[fss_extended_read_parameter_help_e].result == f_console_result_found_e) { fss_extended_read_print_help(main->output.to, main->context); fss_extended_read_main_delete(main); @@ -204,7 +204,7 @@ extern "C" { return status; } - if (main->parameters[fss_extended_read_parameter_version].result == f_console_result_found) { + if (main->parameters[fss_extended_read_parameter_version_e].result == f_console_result_found_e) { fll_program_print_version(main->output.to, fss_extended_read_program_version_s); fss_extended_read_main_delete(main); @@ -223,12 +223,12 @@ extern "C" { if (main->remaining.used || main->process_pipe) { { const f_array_length_t parameter_code[] = { - fss_extended_read_parameter_at, - fss_extended_read_parameter_depth, - fss_extended_read_parameter_line, - fss_extended_read_parameter_select, - fss_extended_read_parameter_name, - fss_extended_read_parameter_delimit, + fss_extended_read_parameter_at_e, + fss_extended_read_parameter_depth_e, + fss_extended_read_parameter_line_e, + fss_extended_read_parameter_select_e, + fss_extended_read_parameter_name_e, + fss_extended_read_parameter_delimit_e, }; const f_string_t parameter_name[] = { @@ -255,7 +255,7 @@ extern "C" { for (f_array_length_t i = 0; i < 6; ++i) { - if (main->parameters[parameter_code[i]].result == f_console_result_found) { + if (main->parameters[parameter_code[i]].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -270,13 +270,13 @@ extern "C" { } // for } - if (F_status_is_error_not(status) && main->parameters[fss_extended_read_parameter_columns].result == f_console_result_found) { + if (F_status_is_error_not(status) && main->parameters[fss_extended_read_parameter_columns_e].result == f_console_result_found_e) { const f_array_length_t parameter_code[] = { - fss_extended_read_parameter_depth, - fss_extended_read_parameter_line, - fss_extended_read_parameter_pipe, - fss_extended_read_parameter_select, - fss_extended_read_parameter_total, + fss_extended_read_parameter_depth_e, + fss_extended_read_parameter_line_e, + fss_extended_read_parameter_pipe_e, + fss_extended_read_parameter_select_e, + fss_extended_read_parameter_total_e, }; const f_string_t parameter_name[] = { @@ -288,11 +288,11 @@ extern "C" { }; const uint8_t parameter_match[] = { - f_console_result_additional, - f_console_result_additional, - f_console_result_found, - f_console_result_additional, - f_console_result_found, + f_console_result_additional_e, + f_console_result_additional_e, + f_console_result_found_e, + f_console_result_additional_e, + f_console_result_found_e, }; for (f_array_length_t i = 0; i < 5; ++i) { @@ -314,8 +314,8 @@ extern "C" { } // for } - if (F_status_is_error_not(status) && main->parameters[fss_extended_read_parameter_pipe].result == f_console_result_found) { - if (main->parameters[fss_extended_read_parameter_total].result == f_console_result_found) { + if (F_status_is_error_not(status) && main->parameters[fss_extended_read_parameter_pipe_e].result == f_console_result_found_e) { + if (main->parameters[fss_extended_read_parameter_total_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -328,7 +328,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_extended_read_parameter_line].result == f_console_result_additional) { + else if (main->parameters[fss_extended_read_parameter_line_e].result == f_console_result_additional_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -343,7 +343,7 @@ extern "C" { } } - if (F_status_is_error_not(status) && main->parameters[fss_extended_read_parameter_delimit].result == f_console_result_additional) { + if (F_status_is_error_not(status) && main->parameters[fss_extended_read_parameter_delimit_e].result == f_console_result_additional_e) { f_array_length_t location = 0; f_array_length_t length = 0; uint16_t signal_check = 0; @@ -351,7 +351,7 @@ extern "C" { // Set the value to 0 to allow for detecting mode based on what is provided. data.delimit_mode = 0; - for (f_array_length_t i = 0; i < main->parameters[fss_extended_read_parameter_delimit].values.used; ++i) { + for (f_array_length_t i = 0; i < main->parameters[fss_extended_read_parameter_delimit_e].values.used; ++i) { if (!((++signal_check) % fss_extended_read_signal_check_d)) { if (fss_extended_read_signal_received(main)) { @@ -362,7 +362,7 @@ extern "C" { signal_check = 0; } - location = main->parameters[fss_extended_read_parameter_delimit].values.array[i]; + location = main->parameters[fss_extended_read_parameter_delimit_e].values.array[i]; length = strnlen(arguments->argv[location], f_console_parameter_size); if (!length) { @@ -378,34 +378,34 @@ extern "C" { break; } else if (fl_string_compare(arguments->argv[location], fss_extended_read_delimit_mode_name_none, length, fss_extended_read_delimit_mode_name_none_length) == F_equal_to) { - data.delimit_mode = fss_extended_read_delimit_mode_none; + data.delimit_mode = fss_extended_read_delimit_mode_none_e; } else if (fl_string_compare(arguments->argv[location], fss_extended_read_delimit_mode_name_all, length, fss_extended_read_delimit_mode_name_all_length) == F_equal_to) { - data.delimit_mode = fss_extended_read_delimit_mode_all; + data.delimit_mode = fss_extended_read_delimit_mode_all_e; } else if (fl_string_compare(arguments->argv[location], fss_extended_read_delimit_mode_name_object, length, fss_extended_read_delimit_mode_name_object_length) == F_equal_to) { switch (data.delimit_mode) { case 0: - data.delimit_mode = fss_extended_read_delimit_mode_object; + data.delimit_mode = fss_extended_read_delimit_mode_object_e; break; - case fss_extended_read_delimit_mode_none: - case fss_extended_read_delimit_mode_all: - case fss_extended_read_delimit_mode_content_greater_object: - case fss_extended_read_delimit_mode_content_lesser_object: - case fss_extended_read_delimit_mode_object: + case fss_extended_read_delimit_mode_none_e: + case fss_extended_read_delimit_mode_all_e: + case fss_extended_read_delimit_mode_content_greater_object_e: + case fss_extended_read_delimit_mode_content_lesser_object_e: + case fss_extended_read_delimit_mode_object_e: break; - case fss_extended_read_delimit_mode_content: - data.delimit_mode = fss_extended_read_delimit_mode_content_object; + case fss_extended_read_delimit_mode_content_e: + data.delimit_mode = fss_extended_read_delimit_mode_content_object_e; break; - case fss_extended_read_delimit_mode_content_greater: - data.delimit_mode = fss_extended_read_delimit_mode_content_greater_object; + case fss_extended_read_delimit_mode_content_greater_e: + data.delimit_mode = fss_extended_read_delimit_mode_content_greater_object_e; break; - case fss_extended_read_delimit_mode_content_lesser: - data.delimit_mode = fss_extended_read_delimit_mode_content_lesser_object; + case fss_extended_read_delimit_mode_content_lesser_e: + data.delimit_mode = fss_extended_read_delimit_mode_content_lesser_object_e; break; default: @@ -414,19 +414,19 @@ extern "C" { } else { if (!data.delimit_mode) { - data.delimit_mode = fss_extended_read_delimit_mode_content; + data.delimit_mode = fss_extended_read_delimit_mode_content_e; } - else if (data.delimit_mode == fss_extended_read_delimit_mode_object) { - data.delimit_mode = fss_extended_read_delimit_mode_content_object; + else if (data.delimit_mode == fss_extended_read_delimit_mode_object_e) { + data.delimit_mode = fss_extended_read_delimit_mode_content_object_e; } if (arguments->argv[location][length - 1] == fss_extended_read_delimit_mode_name_greater[0]) { - if (!(data.delimit_mode == fss_extended_read_delimit_mode_none || data.delimit_mode == fss_extended_read_delimit_mode_all)) { - if (data.delimit_mode == fss_extended_read_delimit_mode_content_object) { - data.delimit_mode = fss_extended_read_delimit_mode_content_greater_object; + if (!(data.delimit_mode == fss_extended_read_delimit_mode_none_e || data.delimit_mode == fss_extended_read_delimit_mode_all_e)) { + if (data.delimit_mode == fss_extended_read_delimit_mode_content_object_e) { + data.delimit_mode = fss_extended_read_delimit_mode_content_greater_object_e; } else { - data.delimit_mode = fss_extended_read_delimit_mode_content_greater; + data.delimit_mode = fss_extended_read_delimit_mode_content_greater_e; } } @@ -434,12 +434,12 @@ extern "C" { --length; } else if (arguments->argv[location][length - 1] == fss_extended_read_delimit_mode_name_lesser[0]) { - if (!(data.delimit_mode == fss_extended_read_delimit_mode_none || data.delimit_mode == fss_extended_read_delimit_mode_all)) { - if (data.delimit_mode == fss_extended_read_delimit_mode_content_object) { - data.delimit_mode = fss_extended_read_delimit_mode_content_lesser_object; + if (!(data.delimit_mode == fss_extended_read_delimit_mode_none_e || data.delimit_mode == fss_extended_read_delimit_mode_all_e)) { + if (data.delimit_mode == fss_extended_read_delimit_mode_content_object_e) { + data.delimit_mode = fss_extended_read_delimit_mode_content_lesser_object_e; } else { - data.delimit_mode = fss_extended_read_delimit_mode_content_lesser; + data.delimit_mode = fss_extended_read_delimit_mode_content_lesser_e; } } @@ -462,13 +462,13 @@ extern "C" { } // There can be nothing smaller than 0, so replace '0-' logic with just '0' logic. - if (data.delimit_mode == fss_extended_read_delimit_mode_content_lesser || data.delimit_mode == fss_extended_read_delimit_mode_content_lesser_object) { + if (data.delimit_mode == fss_extended_read_delimit_mode_content_lesser_e || data.delimit_mode == fss_extended_read_delimit_mode_content_lesser_object_e) { if (!data.delimit_depth) { - if (data.delimit_mode == fss_extended_read_delimit_mode_content_lesser) { - data.delimit_mode = fss_extended_read_delimit_mode_content; + if (data.delimit_mode == fss_extended_read_delimit_mode_content_lesser_e) { + data.delimit_mode = fss_extended_read_delimit_mode_content_e; } else { - data.delimit_mode = fss_extended_read_delimit_mode_content_object; + data.delimit_mode = fss_extended_read_delimit_mode_content_object_e; } } } @@ -477,7 +477,7 @@ extern "C" { // Guarantee the default value is "all". if (!data.delimit_mode) { - data.delimit_mode = fss_extended_read_delimit_mode_all; + data.delimit_mode = fss_extended_read_delimit_mode_all_e; } } @@ -487,7 +487,7 @@ extern "C" { // This standard does not support nesting, so any depth greater than 0 can be predicted without processing the file. if (F_status_is_error_not(status) && data.depths.array[0].depth > 0) { - if (main->parameters[fss_extended_read_parameter_total].result == f_console_result_found) { + if (main->parameters[fss_extended_read_parameter_total_e].result == f_console_result_found_e) { fss_extended_read_print_zero(main); } @@ -497,7 +497,7 @@ extern "C" { return F_none; } - if (F_status_is_error_not(status) && main->parameters[fss_extended_read_parameter_select].result == f_console_result_found) { + if (F_status_is_error_not(status) && main->parameters[fss_extended_read_parameter_select_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -529,7 +529,7 @@ extern "C" { status = f_file_stream_read(file, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, "-", "read", fll_error_file_type_pipe); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, "-", "read", fll_error_file_type_pipe_e); } else if (data.buffer.used) { data.files.array[0].range.stop = data.buffer.used - 1; @@ -539,7 +539,7 @@ extern "C" { status = f_string_append_assure(f_string_eol_s, 1, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, "-", "read", fll_error_file_type_pipe); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, "-", "read", fll_error_file_type_pipe_e); } } else { @@ -570,7 +570,7 @@ extern "C" { status = f_file_stream_open(arguments->argv[main->remaining.array[i]], 0, &file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], "open", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], "open", fll_error_file_type_file_e); break; } @@ -579,7 +579,7 @@ extern "C" { status = f_file_size_by_id(file.id, &size_file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file_e); break; } @@ -588,7 +588,7 @@ extern "C" { status = f_string_dynamic_resize(data.buffer.size + size_file, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file_e); break; } @@ -596,7 +596,7 @@ extern "C" { status = f_file_stream_read(file, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, arguments->argv[main->remaining.array[i]], "read", fll_error_file_type_file_e); break; } @@ -609,7 +609,7 @@ extern "C" { status = f_string_append_assure(f_string_eol_s, 1, &data.buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, "-", "read", fll_error_file_type_pipe); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, "-", "read", fll_error_file_type_pipe_e); } } } @@ -634,7 +634,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { if (F_status_set_fine(status) == F_interrupt) { fflush(main->output.to.stream); 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 5e24b55..67c1ac8 100644 --- a/level_3/fss_extended_read/c/fss_extended_read.h +++ b/level_3/fss_extended_read/c/fss_extended_read.h @@ -110,57 +110,57 @@ extern "C" { #define fss_extended_read_long_trim_s "trim" enum { - fss_extended_read_parameter_help, - fss_extended_read_parameter_light, - fss_extended_read_parameter_dark, - fss_extended_read_parameter_no_color, - fss_extended_read_parameter_verbosity_quiet, - fss_extended_read_parameter_verbosity_normal, - fss_extended_read_parameter_verbosity_verbose, - fss_extended_read_parameter_verbosity_debug, - fss_extended_read_parameter_version, - - fss_extended_read_parameter_at, - fss_extended_read_parameter_content, - fss_extended_read_parameter_columns, - fss_extended_read_parameter_delimit, - fss_extended_read_parameter_depth, - fss_extended_read_parameter_empty, - fss_extended_read_parameter_line, - fss_extended_read_parameter_name, - fss_extended_read_parameter_object, - fss_extended_read_parameter_pipe, - fss_extended_read_parameter_raw, - fss_extended_read_parameter_select, - fss_extended_read_parameter_total, - fss_extended_read_parameter_trim, + fss_extended_read_parameter_help_e, + fss_extended_read_parameter_light_e, + fss_extended_read_parameter_dark_e, + fss_extended_read_parameter_no_color_e, + fss_extended_read_parameter_verbosity_quiet_e, + fss_extended_read_parameter_verbosity_normal_e, + fss_extended_read_parameter_verbosity_verbose_e, + fss_extended_read_parameter_verbosity_debug_e, + fss_extended_read_parameter_version_e, + + fss_extended_read_parameter_at_e, + fss_extended_read_parameter_content_e, + fss_extended_read_parameter_columns_e, + fss_extended_read_parameter_delimit_e, + fss_extended_read_parameter_depth_e, + fss_extended_read_parameter_empty_e, + fss_extended_read_parameter_line_e, + fss_extended_read_parameter_name_e, + fss_extended_read_parameter_object_e, + fss_extended_read_parameter_pipe_e, + fss_extended_read_parameter_raw_e, + fss_extended_read_parameter_select_e, + fss_extended_read_parameter_total_e, + fss_extended_read_parameter_trim_e, }; #define fss_extended_read_console_parameter_t_initialize \ { \ - 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_s, fss_extended_read_long_at_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_content_s, fss_extended_read_long_content_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_columns_s, fss_extended_read_long_columns_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_delimit_s, fss_extended_read_long_delimit_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_depth_s, fss_extended_read_long_depth_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_empty_s, fss_extended_read_long_empty_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_line_s, fss_extended_read_long_line_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_name_s, fss_extended_read_long_name_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_object_s, fss_extended_read_long_object_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_pipe_s, fss_extended_read_long_pipe_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_raw_s, fss_extended_read_long_raw_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_select_s, fss_extended_read_long_select_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_total_s, fss_extended_read_long_total_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_trim_s, fss_extended_read_long_trim_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse_e), \ + 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_e), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(fss_extended_read_short_at_s, fss_extended_read_long_at_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_read_short_content_s, fss_extended_read_long_content_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_read_short_columns_s, fss_extended_read_long_columns_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_read_short_delimit_s, fss_extended_read_long_delimit_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_read_short_depth_s, fss_extended_read_long_depth_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_read_short_empty_s, fss_extended_read_long_empty_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_read_short_line_s, fss_extended_read_long_line_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_read_short_name_s, fss_extended_read_long_name_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_read_short_object_s, fss_extended_read_long_object_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_read_short_pipe_s, fss_extended_read_long_pipe_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_read_short_raw_s, fss_extended_read_long_raw_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_read_short_select_s, fss_extended_read_long_select_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_read_short_total_s, fss_extended_read_long_total_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_read_short_trim_s, fss_extended_read_long_trim_s, 0, 0, f_console_type_normal_e), \ } #define fss_extended_read_total_parameters_d 23 @@ -193,15 +193,15 @@ extern "C" { #define fss_extended_read_delimit_mode_name_lesser_length 1 enum { - fss_extended_read_delimit_mode_none = 1, - fss_extended_read_delimit_mode_all, - fss_extended_read_delimit_mode_content, - fss_extended_read_delimit_mode_content_greater, - fss_extended_read_delimit_mode_content_greater_object, - fss_extended_read_delimit_mode_content_lesser, - fss_extended_read_delimit_mode_content_lesser_object, - fss_extended_read_delimit_mode_content_object, - fss_extended_read_delimit_mode_object, + fss_extended_read_delimit_mode_none_e = 1, + fss_extended_read_delimit_mode_all_e, + fss_extended_read_delimit_mode_content_e, + fss_extended_read_delimit_mode_content_greater_e, + fss_extended_read_delimit_mode_content_greater_object_e, + fss_extended_read_delimit_mode_content_lesser_e, + fss_extended_read_delimit_mode_content_lesser_object_e, + fss_extended_read_delimit_mode_content_object_e, + fss_extended_read_delimit_mode_object_e, }; #endif // _di_fss_extended_read_delimit_modes_ diff --git a/level_3/fss_extended_read/c/private-common.c b/level_3/fss_extended_read/c/private-common.c index 2ca7672..387b3a6 100644 --- a/level_3/fss_extended_read/c/private-common.c +++ b/level_3/fss_extended_read/c/private-common.c @@ -61,7 +61,7 @@ extern "C" { #ifndef _di_fss_extended_read_print_signal_received_ void fss_extended_read_print_signal_received(fss_extended_read_main_t * const main, const f_status_t signal) { - if (main->warning.verbosity != f_console_verbosity_verbose) return; + if (main->warning.verbosity != f_console_verbosity_verbose_e) return; // Must flush and reset color because the interrupt may have interrupted the middle of a print function. fflush(main->warning.to.stream); diff --git a/level_3/fss_extended_read/c/private-common.h b/level_3/fss_extended_read/c/private-common.h index 72fcbd5..5f4f15b 100644 --- a/level_3/fss_extended_read/c/private-common.h +++ b/level_3/fss_extended_read/c/private-common.h @@ -188,7 +188,7 @@ extern "C" { #define fss_extended_read_data_t_initialize \ { \ 0, \ - fss_extended_read_delimit_mode_all, \ + fss_extended_read_delimit_mode_all_e, \ 0, \ 0, \ 0, \ 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 1cca898..363bfaf 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 @@ -10,24 +10,24 @@ extern "C" { f_status_t fss_extended_read_delimit_object_is(const f_array_length_t depth, fss_extended_read_data_t * const data) { switch (data->delimit_mode) { - case fss_extended_read_delimit_mode_none: - case fss_extended_read_delimit_mode_content: - case fss_extended_read_delimit_mode_content_greater: - case fss_extended_read_delimit_mode_content_lesser: + case fss_extended_read_delimit_mode_none_e: + case fss_extended_read_delimit_mode_content_e: + case fss_extended_read_delimit_mode_content_greater_e: + case fss_extended_read_delimit_mode_content_lesser_e: return F_false; - case fss_extended_read_delimit_mode_all: - case fss_extended_read_delimit_mode_content_object: - case fss_extended_read_delimit_mode_content_greater_object: - case fss_extended_read_delimit_mode_content_lesser_object: - case fss_extended_read_delimit_mode_object: + case fss_extended_read_delimit_mode_all_e: + case fss_extended_read_delimit_mode_content_object_e: + case fss_extended_read_delimit_mode_content_greater_object_e: + case fss_extended_read_delimit_mode_content_lesser_object_e: + case fss_extended_read_delimit_mode_object_e: return F_true; default: break; } - return depth == data->delimit_depth || data->delimit_mode == fss_extended_read_delimit_mode_content_lesser; + return depth == data->delimit_depth || data->delimit_mode == fss_extended_read_delimit_mode_content_lesser_e; } #endif // _di_fss_extended_read_delimit_object_is_ @@ -35,11 +35,11 @@ extern "C" { f_status_t fss_extended_read_delimit_content_is(const f_array_length_t depth, fss_extended_read_data_t * const data) { switch (data->delimit_mode) { - case fss_extended_read_delimit_mode_none: - case fss_extended_read_delimit_mode_object: + case fss_extended_read_delimit_mode_none_e: + case fss_extended_read_delimit_mode_object_e: return F_false; - case fss_extended_read_delimit_mode_all: + case fss_extended_read_delimit_mode_all_e: return F_true; default: @@ -47,11 +47,11 @@ extern "C" { } if (depth < data->delimit_depth) { - return data->delimit_mode == fss_extended_read_delimit_mode_content_lesser || data->delimit_mode == fss_extended_read_delimit_mode_content_lesser_object; + return data->delimit_mode == fss_extended_read_delimit_mode_content_lesser_e || data->delimit_mode == fss_extended_read_delimit_mode_content_lesser_object_e; } if (depth > data->delimit_depth) { - return data->delimit_mode == fss_extended_read_delimit_mode_content_greater || data->delimit_mode == fss_extended_read_delimit_mode_content_greater_object; + return data->delimit_mode == fss_extended_read_delimit_mode_content_greater_e || data->delimit_mode == fss_extended_read_delimit_mode_content_greater_object_e; } return depth == data->delimit_depth; @@ -66,8 +66,8 @@ extern "C" { { f_array_length_t depth_size = 1; - if (main->parameters[fss_extended_read_parameter_depth].result == f_console_result_additional) { - depth_size = main->parameters[fss_extended_read_parameter_depth].values.used; + if (main->parameters[fss_extended_read_parameter_depth_e].result == f_console_result_additional_e) { + depth_size = main->parameters[fss_extended_read_parameter_depth_e].values.used; } if (depth_size > data->depths.size) { @@ -105,11 +105,11 @@ extern "C" { macro_f_string_dynamic_t_clear(data->depths.array[i].value_name); - if (!main->parameters[fss_extended_read_parameter_depth].values.used) { + if (!main->parameters[fss_extended_read_parameter_depth_e].values.used) { position_depth = 0; } else { - position_depth = main->parameters[fss_extended_read_parameter_depth].values.array[i]; + position_depth = main->parameters[fss_extended_read_parameter_depth_e].values.array[i]; const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[position_depth])); @@ -122,18 +122,18 @@ extern "C" { } } - if (main->parameters[fss_extended_read_parameter_at].result == f_console_result_additional) { - for (; position_at < main->parameters[fss_extended_read_parameter_at].values.used; ++position_at) { + if (main->parameters[fss_extended_read_parameter_at_e].result == f_console_result_additional_e) { + for (; position_at < main->parameters[fss_extended_read_parameter_at_e].values.used; ++position_at) { - if (main->parameters[fss_extended_read_parameter_at].values.array[position_at] < position_depth) { + if (main->parameters[fss_extended_read_parameter_at_e].values.array[position_at] < position_depth) { continue; } - if (i + 1 < data->depths.used && main->parameters[fss_extended_read_parameter_at].values.array[position_at] > main->parameters[fss_extended_read_parameter_depth].values.array[i + 1]) { + if (i + 1 < data->depths.used && main->parameters[fss_extended_read_parameter_at_e].values.array[position_at] > main->parameters[fss_extended_read_parameter_depth_e].values.array[i + 1]) { break; } - data->depths.array[i].index_at = main->parameters[fss_extended_read_parameter_at].values.array[position_at]; + data->depths.array[i].index_at = main->parameters[fss_extended_read_parameter_at_e].values.array[position_at]; const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[data->depths.array[i].index_at])); @@ -147,20 +147,20 @@ extern "C" { } // for } - if (main->parameters[fss_extended_read_parameter_name].result == f_console_result_additional) { - for (; position_name < main->parameters[fss_extended_read_parameter_name].values.used; position_name++) { + if (main->parameters[fss_extended_read_parameter_name_e].result == f_console_result_additional_e) { + for (; position_name < main->parameters[fss_extended_read_parameter_name_e].values.used; position_name++) { - if (main->parameters[fss_extended_read_parameter_name].values.array[position_name] < position_depth) { + if (main->parameters[fss_extended_read_parameter_name_e].values.array[position_name] < position_depth) { continue; } - if (i + 1 < data->depths.used && main->parameters[fss_extended_read_parameter_name].values.array[position_name] > main->parameters[fss_extended_read_parameter_depth].values.array[i + 1]) { + if (i + 1 < data->depths.used && main->parameters[fss_extended_read_parameter_name_e].values.array[position_name] > main->parameters[fss_extended_read_parameter_depth_e].values.array[i + 1]) { break; } - data->depths.array[i].index_name = main->parameters[fss_extended_read_parameter_name].values.array[position_name]; + data->depths.array[i].index_name = main->parameters[fss_extended_read_parameter_name_e].values.array[position_name]; - if (main->parameters[fss_extended_read_parameter_trim].result == f_console_result_found) { + if (main->parameters[fss_extended_read_parameter_trim_e].result == f_console_result_found_e) { status = fl_string_rip(arguments->argv[data->depths.array[i].index_name], strlen(arguments->argv[data->depths.array[i].index_name]), &data->depths.array[i].value_name); } else { @@ -168,7 +168,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), main->parameters[fss_extended_read_parameter_trim].result == f_console_result_found ? "fl_string_rip" : "f_string_append", F_true); + fll_error_print(main->error, F_status_set_fine(status), main->parameters[fss_extended_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_rip" : "f_string_append", F_true); return status; } @@ -189,7 +189,7 @@ extern "C" { } if (data->depths.array[i].depth == data->depths.array[j].depth) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -204,7 +204,7 @@ extern "C" { return F_status_set_error(F_parameter); } else if (data->depths.array[i].depth > data->depths.array[j].depth) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -257,7 +257,7 @@ extern "C" { if (F_status_is_error(status)) { const f_string_t file_name = fss_extended_read_file_identify(input.start, data->files); - fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_extended_read", F_true, file_name ? file_name : "-", "process", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_extended_read", F_true, file_name ? file_name : "-", "process", fll_error_file_type_file_e); return status; } @@ -278,7 +278,7 @@ extern "C" { #ifndef _di_fss_extended_read_load_number_ f_status_t fss_extended_read_load_number(fss_extended_read_main_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) { - if (main->parameters[parameter].result == f_console_result_additional) { + if (main->parameters[parameter].result == f_console_result_additional_e) { const f_array_length_t index = main->parameters[parameter].values.array[main->parameters[parameter].values.used - 1]; const f_string_range_t range = macro_f_string_range_t_initialize(strnlen(arguments->argv[index], f_console_parameter_size)); @@ -310,24 +310,24 @@ extern "C" { if (data->option & fss_extended_read_data_option_object) { if (data->option & fss_extended_read_data_option_trim) { if ((data->option & fss_extended_read_data_option_raw) && data->quotes_object.array[at]) { - f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); + f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); } fl_print_trim_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.to.stream); if ((data->option & fss_extended_read_data_option_raw) && data->quotes_object.array[at]) { - f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); + f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); } } else { if ((data->option & fss_extended_read_data_option_raw) && data->quotes_object.array[at]) { - f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); + f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); } f_print_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.to.stream); if ((data->option & fss_extended_read_data_option_raw) && data->quotes_object.array[at]) { - f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); + f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); } } @@ -344,13 +344,13 @@ extern "C" { content_printed = F_true; if ((data->option & fss_extended_read_data_option_raw) && data->quotes_content.array[at].array[data->select]) { - f_print_character_safely(data->quotes_content.array[at].array[data->select] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); + f_print_character_safely(data->quotes_content.array[at].array[data->select] == f_fss_quote_type_single_e ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); } f_print_except_dynamic_partial(data->buffer, data->contents.array[at].array[data->select], delimits_content, main->output.to.stream); if ((data->option & fss_extended_read_data_option_raw) && data->quotes_content.array[at].array[data->select]) { - f_print_character_safely(data->quotes_content.array[at].array[data->select] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); + f_print_character_safely(data->quotes_content.array[at].array[data->select] == f_fss_quote_type_single_e ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); } } } @@ -364,13 +364,13 @@ extern "C" { content_printed = F_true; if ((data->option & fss_extended_read_data_option_raw) && data->quotes_content.array[at].array[i]) { - f_print_character_safely(data->quotes_content.array[at].array[i] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); + f_print_character_safely(data->quotes_content.array[at].array[i] == f_fss_quote_type_single_e ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); } f_print_except_dynamic_partial(data->buffer, data->contents.array[at].array[i], delimits_content, main->output.to.stream); if ((data->option & fss_extended_read_data_option_raw) && data->quotes_content.array[at].array[i]) { - f_print_character_safely(data->quotes_content.array[at].array[i] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); + f_print_character_safely(data->quotes_content.array[at].array[i] == f_fss_quote_type_single_e ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); } if (i + 1 < data->contents.array[at].used && data->contents.array[at].array[i + 1].start <= data->contents.array[at].array[i + 1].stop) { @@ -446,7 +446,7 @@ extern "C" { #ifndef _di_fss_extended_read_print_content_end_ void fss_extended_read_print_content_end(fss_extended_read_main_t * const main) { - if (main->parameters[fss_extended_read_parameter_pipe].result == f_console_result_found) { + if (main->parameters[fss_extended_read_parameter_pipe_e].result == f_console_result_found_e) { f_print_character(fss_extended_read_pipe_content_start_s, main->output.to.stream); } else { @@ -458,7 +458,7 @@ extern "C" { #ifndef _di_fss_extended_read_print_object_end_ void fss_extended_read_print_object_end(fss_extended_read_main_t * const main) { - if (main->parameters[fss_extended_read_parameter_pipe].result == f_console_result_found) { + if (main->parameters[fss_extended_read_parameter_pipe_e].result == f_console_result_found_e) { f_print_character(fss_extended_read_pipe_content_end_s, main->output.to.stream); } else { @@ -478,7 +478,7 @@ extern "C" { #ifndef _di_fss_extended_read_print_set_end_ void fss_extended_read_print_set_end(fss_extended_read_main_t * const main) { - if (main->parameters[fss_extended_read_parameter_pipe].result == f_console_result_found) { + if (main->parameters[fss_extended_read_parameter_pipe_e].result == f_console_result_found_e) { f_print_character(fss_extended_read_pipe_content_end_s, main->output.to.stream); } else { @@ -602,13 +602,13 @@ extern "C" { } else { if ((data->option & fss_extended_read_data_option_raw) && data->quotes_object.array[at]) { - f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); + f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); } fss_extended_read_print_at(main, i, *delimits_object, *delimits_content, data); if ((data->option & fss_extended_read_data_option_raw) && data->quotes_object.array[at]) { - f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); + f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); } } } @@ -622,13 +622,13 @@ extern "C" { } else { if ((data->option & fss_extended_read_data_option_raw) && data->quotes_content.array[at].array[i]) { - f_print_character_safely(data->quotes_content.array[at].array[i] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); + f_print_character_safely(data->quotes_content.array[at].array[i] == f_fss_quote_type_single_e ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); } fss_extended_read_print_at(main, i, *delimits_object, *delimits_content, data); if ((data->option & fss_extended_read_data_option_raw) && data->quotes_content.array[at].array[i]) { - f_print_character_safely(data->quotes_content.array[at].array[i] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); + f_print_character_safely(data->quotes_content.array[at].array[i] == f_fss_quote_type_single_e ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream); } } @@ -771,53 +771,53 @@ extern "C" { f_status_t status = F_none; - if (main->parameters[fss_extended_read_parameter_at].result == f_console_result_additional) { + if (main->parameters[fss_extended_read_parameter_at_e].result == f_console_result_additional_e) { data->option |= fss_extended_read_data_option_at; } - if (main->parameters[fss_extended_read_parameter_columns].result == f_console_result_found) { + if (main->parameters[fss_extended_read_parameter_columns_e].result == f_console_result_found_e) { data->option |= fss_extended_read_data_option_columns; } - if (main->parameters[fss_extended_read_parameter_content].result == f_console_result_found) { + if (main->parameters[fss_extended_read_parameter_content_e].result == f_console_result_found_e) { data->option |= fss_extended_read_data_option_content; } - if (main->parameters[fss_extended_read_parameter_empty].result == f_console_result_found) { + if (main->parameters[fss_extended_read_parameter_empty_e].result == f_console_result_found_e) { data->option |= fss_extended_read_data_option_empty; } - if (main->parameters[fss_extended_read_parameter_line].result == f_console_result_additional) { + if (main->parameters[fss_extended_read_parameter_line_e].result == f_console_result_additional_e) { data->option |= fss_extended_read_data_option_line; - status = fss_extended_read_load_number(main, fss_extended_read_parameter_line, fss_extended_read_long_line_s, arguments, &data->line); + status = fss_extended_read_load_number(main, fss_extended_read_parameter_line_e, fss_extended_read_long_line_s, arguments, &data->line); if (F_status_is_error(status)) return status; } - if (main->parameters[fss_extended_read_parameter_name].result == f_console_result_additional) { + if (main->parameters[fss_extended_read_parameter_name_e].result == f_console_result_additional_e) { data->option |= fss_extended_read_data_option_name; } - if (main->parameters[fss_extended_read_parameter_object].result == f_console_result_found) { + if (main->parameters[fss_extended_read_parameter_object_e].result == f_console_result_found_e) { data->option |= fss_extended_read_data_option_object; } - if (main->parameters[fss_extended_read_parameter_raw].result == f_console_result_found) { + if (main->parameters[fss_extended_read_parameter_raw_e].result == f_console_result_found_e) { data->option |= fss_extended_read_data_option_raw; } - if (main->parameters[fss_extended_read_parameter_select].result == f_console_result_additional) { + if (main->parameters[fss_extended_read_parameter_select_e].result == f_console_result_additional_e) { data->option |= fss_extended_read_data_option_select; - status = fss_extended_read_load_number(main, fss_extended_read_parameter_select, fss_extended_read_long_select_s, arguments, &data->select); + status = fss_extended_read_load_number(main, fss_extended_read_parameter_select_e, fss_extended_read_long_select_s, arguments, &data->select); if (F_status_is_error(status)) return status; } - if (main->parameters[fss_extended_read_parameter_total].result == f_console_result_found) { + if (main->parameters[fss_extended_read_parameter_total_e].result == f_console_result_found_e) { data->option |= fss_extended_read_data_option_total; } - if (main->parameters[fss_extended_read_parameter_trim].result == f_console_result_found) { + if (main->parameters[fss_extended_read_parameter_trim_e].result == f_console_result_found_e) { data->option |= fss_extended_read_data_option_trim; } diff --git a/level_3/fss_extended_read/data/build/dependencies b/level_3/fss_extended_read/data/build/dependencies index 25e27eb..b944420 100644 --- a/level_3/fss_extended_read/data/build/dependencies +++ b/level_3/fss_extended_read/data/build/dependencies @@ -19,7 +19,6 @@ fl_console fl_conversion fl_fss fl_print -fl_status fl_string fll_error fll_file diff --git a/level_3/fss_extended_read/data/build/settings b/level_3/fss_extended_read/data/build/settings index 9fbb2d9..bf3cda0 100644 --- a/level_3/fss_extended_read/data/build/settings +++ b/level_3/fss_extended_read/data/build/settings @@ -21,7 +21,7 @@ build_indexer ar build_indexer_arguments rcs build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -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_signal -lf_string -lf_type_array -lf_utf +build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -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_signal -lf_status_string -lf_string -lf_type_array -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared 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 dbc6a1e..85b3e2d 100644 --- a/level_3/fss_extended_write/c/fss_extended_write.c +++ b/level_3/fss_extended_write/c/fss_extended_write.c @@ -65,7 +65,7 @@ extern "C" { const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_extended_write_total_parameters_d); { - f_console_parameter_id_t ids[3] = { fss_extended_write_parameter_no_color, fss_extended_write_parameter_light, fss_extended_write_parameter_dark }; + f_console_parameter_id_t ids[3] = { fss_extended_write_parameter_no_color_e, fss_extended_write_parameter_light_e, fss_extended_write_parameter_dark_e }; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3); status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context); @@ -98,7 +98,7 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_extended_write_parameter_verbosity_quiet, fss_extended_write_parameter_verbosity_normal, fss_extended_write_parameter_verbosity_verbose, fss_extended_write_parameter_verbosity_debug }; + f_console_parameter_id_t ids[4] = { fss_extended_write_parameter_verbosity_quiet_e, fss_extended_write_parameter_verbosity_normal_e, fss_extended_write_parameter_verbosity_verbose_e, fss_extended_write_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); @@ -109,39 +109,39 @@ extern "C" { return status; } - if (choice == fss_extended_write_parameter_verbosity_quiet) { - main->output.verbosity = f_console_verbosity_quiet; - main->error.verbosity = f_console_verbosity_quiet; - main->warning.verbosity = f_console_verbosity_quiet; + if (choice == fss_extended_write_parameter_verbosity_quiet_e) { + main->output.verbosity = f_console_verbosity_quiet_e; + main->error.verbosity = f_console_verbosity_quiet_e; + main->warning.verbosity = f_console_verbosity_quiet_e; } - else if (choice == fss_extended_write_parameter_verbosity_normal) { - main->output.verbosity = f_console_verbosity_normal; - main->error.verbosity = f_console_verbosity_normal; - main->warning.verbosity = f_console_verbosity_normal; + else if (choice == fss_extended_write_parameter_verbosity_normal_e) { + main->output.verbosity = f_console_verbosity_normal_e; + main->error.verbosity = f_console_verbosity_normal_e; + main->warning.verbosity = f_console_verbosity_normal_e; } - else if (choice == fss_extended_write_parameter_verbosity_verbose) { - main->output.verbosity = f_console_verbosity_verbose; - main->error.verbosity = f_console_verbosity_verbose; - main->warning.verbosity = f_console_verbosity_verbose; + else if (choice == fss_extended_write_parameter_verbosity_verbose_e) { + main->output.verbosity = f_console_verbosity_verbose_e; + main->error.verbosity = f_console_verbosity_verbose_e; + main->warning.verbosity = f_console_verbosity_verbose_e; } - else if (choice == fss_extended_write_parameter_verbosity_debug) { - main->output.verbosity = f_console_verbosity_debug; - main->error.verbosity = f_console_verbosity_debug; - main->warning.verbosity = f_console_verbosity_debug; + else if (choice == fss_extended_write_parameter_verbosity_debug_e) { + main->output.verbosity = f_console_verbosity_debug_e; + main->error.verbosity = f_console_verbosity_debug_e; + main->warning.verbosity = f_console_verbosity_debug_e; } } status = F_none; } - if (main->parameters[fss_extended_write_parameter_help].result == f_console_result_found) { + if (main->parameters[fss_extended_write_parameter_help_e].result == f_console_result_found_e) { fss_extended_write_print_help(main->output.to, main->context); fss_extended_write_main_delete(main); return status; } - if (main->parameters[fss_extended_write_parameter_version].result == f_console_result_found) { + if (main->parameters[fss_extended_write_parameter_version_e].result == f_console_result_found_e) { fll_program_print_version(main->output.to, fss_extended_write_program_version_s); fss_extended_write_main_delete(main); @@ -155,9 +155,9 @@ extern "C" { output.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d; if (F_status_is_error_not(status)) { - if (main->parameters[fss_extended_write_parameter_file].result == f_console_result_additional) { - if (main->parameters[fss_extended_write_parameter_file].values.used > 1) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[fss_extended_write_parameter_file_e].result == f_console_result_additional_e) { + if (main->parameters[fss_extended_write_parameter_file_e].values.used > 1) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -170,41 +170,41 @@ extern "C" { status = F_status_set_error(F_parameter); } else { - const f_array_length_t location = main->parameters[fss_extended_write_parameter_file].values.array[0]; + const f_array_length_t location = main->parameters[fss_extended_write_parameter_file_e].values.array[0]; output.id = -1; output.stream = 0; status = f_file_stream_open(arguments->argv[location], 0, &output); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], "open", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], "open", fll_error_file_type_file_e); } } } - else if (main->parameters[fss_extended_write_parameter_file].result == f_console_result_found) { + else if (main->parameters[fss_extended_write_parameter_file_e].result == f_console_result_found_e) { fss_extended_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_extended_write_long_file_s); status = F_status_set_error(F_parameter); } } if (F_status_is_error_not(status)) { - if (main->parameters[fss_extended_write_parameter_object].locations.used || main->parameters[fss_extended_write_parameter_content].locations.used) { - if (main->parameters[fss_extended_write_parameter_object].locations.used) { - if (main->parameters[fss_extended_write_parameter_object].locations.used != main->parameters[fss_extended_write_parameter_object].values.used) { + if (main->parameters[fss_extended_write_parameter_object_e].locations.used || main->parameters[fss_extended_write_parameter_content_e].locations.used) { + if (main->parameters[fss_extended_write_parameter_object_e].locations.used) { + if (main->parameters[fss_extended_write_parameter_object_e].locations.used != main->parameters[fss_extended_write_parameter_object_e].values.used) { fss_extended_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_extended_write_long_object_s); status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_extended_write_parameter_content].locations.used != main->parameters[fss_extended_write_parameter_content].values.used) { + else if (main->parameters[fss_extended_write_parameter_content_e].locations.used != main->parameters[fss_extended_write_parameter_content_e].values.used) { fss_extended_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_extended_write_long_content_s); status = F_status_set_error(F_parameter); } - else if (!main->parameters[fss_extended_write_parameter_content].locations.used && main->parameters[fss_extended_write_parameter_partial].result == f_console_result_none) { + else if (!main->parameters[fss_extended_write_parameter_content_e].locations.used && main->parameters[fss_extended_write_parameter_partial_e].result == f_console_result_none_e) { fss_extended_write_error_parameter_at_least_once(main); status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_extended_write_parameter_content].locations.used && main->parameters[fss_extended_write_parameter_partial].locations.used) { - if (main->parameters[fss_extended_write_parameter_content].result == f_console_result_additional) { - if (main->error.verbosity != f_console_verbosity_quiet) { + else if (main->parameters[fss_extended_write_parameter_content_e].locations.used && main->parameters[fss_extended_write_parameter_partial_e].locations.used) { + if (main->parameters[fss_extended_write_parameter_content_e].result == f_console_result_additional_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -223,14 +223,14 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[fss_extended_write_parameter_content].result == f_console_result_additional) { - f_array_length_t location_object = main->parameters[fss_extended_write_parameter_object].locations.array[0]; - f_array_length_t location_content = main->parameters[fss_extended_write_parameter_content].locations.array[0]; - f_array_length_t location_sub_object = main->parameters[fss_extended_write_parameter_object].locations_sub.array[0]; - f_array_length_t location_sub_content = main->parameters[fss_extended_write_parameter_content].locations_sub.array[0]; + if (main->parameters[fss_extended_write_parameter_content_e].result == f_console_result_additional_e) { + f_array_length_t location_object = main->parameters[fss_extended_write_parameter_object_e].locations.array[0]; + f_array_length_t location_content = main->parameters[fss_extended_write_parameter_content_e].locations.array[0]; + f_array_length_t location_sub_object = main->parameters[fss_extended_write_parameter_object_e].locations_sub.array[0]; + f_array_length_t location_sub_content = main->parameters[fss_extended_write_parameter_content_e].locations_sub.array[0]; if (location_object > location_content || location_object == location_content && location_sub_object > location_sub_content) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sEach '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -245,13 +245,13 @@ extern "C" { status = F_status_set_error(F_parameter); } else { - location_object = main->parameters[fss_extended_write_parameter_object].locations.array[main->parameters[fss_extended_write_parameter_object].locations.used - 1]; - location_content = main->parameters[fss_extended_write_parameter_content].locations.array[main->parameters[fss_extended_write_parameter_content].locations.used - 1]; - location_sub_object = main->parameters[fss_extended_write_parameter_object].locations_sub.array[main->parameters[fss_extended_write_parameter_object].locations_sub.used - 1]; - location_sub_content = main->parameters[fss_extended_write_parameter_content].locations_sub.array[main->parameters[fss_extended_write_parameter_content].locations_sub.used - 1]; + location_object = main->parameters[fss_extended_write_parameter_object_e].locations.array[main->parameters[fss_extended_write_parameter_object_e].locations.used - 1]; + location_content = main->parameters[fss_extended_write_parameter_content_e].locations.array[main->parameters[fss_extended_write_parameter_content_e].locations.used - 1]; + location_sub_object = main->parameters[fss_extended_write_parameter_object_e].locations_sub.array[main->parameters[fss_extended_write_parameter_object_e].locations_sub.used - 1]; + location_sub_content = main->parameters[fss_extended_write_parameter_content_e].locations_sub.array[main->parameters[fss_extended_write_parameter_content_e].locations_sub.used - 1]; if (location_object > location_content || location_object == location_content && location_sub_object > location_sub_content) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sEach '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -269,19 +269,19 @@ extern "C" { } } } - else if (main->parameters[fss_extended_write_parameter_content].locations.used) { - if (main->parameters[fss_extended_write_parameter_content].locations.used != main->parameters[fss_extended_write_parameter_content].values.used) { + else if (main->parameters[fss_extended_write_parameter_content_e].locations.used) { + if (main->parameters[fss_extended_write_parameter_content_e].locations.used != main->parameters[fss_extended_write_parameter_content_e].values.used) { fss_extended_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_extended_write_long_content_s); status = F_status_set_error(F_parameter); } - else if (!main->parameters[fss_extended_write_parameter_partial].locations.used) { + else if (!main->parameters[fss_extended_write_parameter_partial_e].locations.used) { fss_extended_write_error_parameter_at_least_once(main); status = F_status_set_error(F_parameter); } } } else if (!main->process_pipe) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThis requires either piped data or the use of the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -297,8 +297,8 @@ extern "C" { } if (F_status_is_error_not(status) && main->process_pipe) { - if (main->parameters[fss_extended_write_parameter_partial].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[fss_extended_write_parameter_partial_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThis '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -314,8 +314,8 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[fss_extended_write_parameter_prepend].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[fss_extended_write_parameter_prepend_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -327,8 +327,8 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_extended_write_parameter_prepend].result == f_console_result_additional) { - const f_array_length_t index = main->parameters[fss_extended_write_parameter_prepend].values.array[main->parameters[fss_extended_write_parameter_prepend].values.used - 1]; + else if (main->parameters[fss_extended_write_parameter_prepend_e].result == f_console_result_additional_e) { + const f_array_length_t index = main->parameters[fss_extended_write_parameter_prepend_e].values.array[main->parameters[fss_extended_write_parameter_prepend_e].values.used - 1]; const f_array_length_t length = strnlen(arguments->argv[index], f_console_parameter_size); // Even though this standard does not utilize this parameter, provide the validation for consistency. @@ -342,7 +342,7 @@ extern "C" { if (F_status_is_error(status)) break; if (status == F_false) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -358,7 +358,7 @@ extern "C" { } // for } else { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -374,8 +374,8 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[fss_extended_write_parameter_ignore].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[fss_extended_write_parameter_ignore_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -387,9 +387,9 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_extended_write_parameter_ignore].result == f_console_result_additional) { - const f_array_length_t total_locations = main->parameters[fss_extended_write_parameter_ignore].locations.used; - const f_array_length_t total_arguments = main->parameters[fss_extended_write_parameter_ignore].values.used; + else if (main->parameters[fss_extended_write_parameter_ignore_e].result == f_console_result_additional_e) { + const f_array_length_t total_locations = main->parameters[fss_extended_write_parameter_ignore_e].locations.used; + const f_array_length_t total_arguments = main->parameters[fss_extended_write_parameter_ignore_e].values.used; if (total_locations * 2 > total_arguments) { flockfile(main->error.to.stream); @@ -408,14 +408,14 @@ extern "C" { f_fss_quote_t quote = F_fss_delimit_quote_double_s; if (F_status_is_error_not(status)) { - if (main->parameters[fss_extended_write_parameter_double].result == f_console_result_found) { - if (main->parameters[fss_extended_write_parameter_single].result == f_console_result_found) { - if (main->parameters[fss_extended_write_parameter_double].location < main->parameters[fss_extended_write_parameter_single].location) { + if (main->parameters[fss_extended_write_parameter_double_e].result == f_console_result_found_e) { + if (main->parameters[fss_extended_write_parameter_single_e].result == f_console_result_found_e) { + if (main->parameters[fss_extended_write_parameter_double_e].location < main->parameters[fss_extended_write_parameter_single_e].location) { quote = F_fss_delimit_quote_single_s; } } } - else if (main->parameters[fss_extended_write_parameter_single].result == f_console_result_found) { + else if (main->parameters[fss_extended_write_parameter_single_e].result == f_console_result_found_e) { quote = F_fss_delimit_quote_single_s; } } @@ -431,7 +431,7 @@ extern "C" { status = fss_extended_write_process_pipe(main, output, quote, &buffer); if (F_status_is_error(status)) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sWhile processing the '%]%[input pipe%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context, main->error.notable, main->error.notable); @@ -443,12 +443,12 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[fss_extended_write_parameter_partial].result == f_console_result_found) { - if (main->parameters[fss_extended_write_parameter_object].result == f_console_result_additional) { + if (main->parameters[fss_extended_write_parameter_partial_e].result == f_console_result_found_e) { + if (main->parameters[fss_extended_write_parameter_object_e].result == f_console_result_additional_e) { contents.used = 0; uint16_t signal_check = 0; - for (f_array_length_t i = 0; i < main->parameters[fss_extended_write_parameter_object].values.used; ++i) { + for (f_array_length_t i = 0; i < main->parameters[fss_extended_write_parameter_object_e].values.used; ++i) { if (!((++signal_check) % fss_extended_write_signal_check_d)) { if (fss_extended_write_signal_received(main)) { @@ -459,7 +459,7 @@ extern "C" { signal_check = 0; } - object.string = arguments->argv[main->parameters[fss_extended_write_parameter_object].values.array[i]]; + object.string = arguments->argv[main->parameters[fss_extended_write_parameter_object_e].values.array[i]]; object.used = strnlen(object.string, f_console_parameter_size); object.size = object.used; @@ -470,7 +470,7 @@ extern "C" { else { object.used = 0; - status = f_string_dynamics_increase_by(main->parameters[fss_extended_write_parameter_content].values.used, &contents); + status = f_string_dynamics_increase_by(main->parameters[fss_extended_write_parameter_content_e].values.used, &contents); if (status == F_array_too_large) { status = F_status_set_error(status); @@ -482,9 +482,9 @@ extern "C" { else { f_array_length_t i = 0; - for (; i < main->parameters[fss_extended_write_parameter_content].values.used; ++i) { + for (; i < main->parameters[fss_extended_write_parameter_content_e].values.used; ++i) { - contents.array[contents.used].string = arguments->argv[main->parameters[fss_extended_write_parameter_content].values.array[i]]; + contents.array[contents.used].string = arguments->argv[main->parameters[fss_extended_write_parameter_content_e].values.array[i]]; contents.array[contents.used].used = strnlen(contents.array[contents.used].string, f_console_parameter_size); contents.array[contents.used].size = contents.array[contents.used].used; ++contents.used; @@ -493,7 +493,7 @@ extern "C" { status = fss_extended_write_process(main, output, quote, 0, &contents, &buffer); // clear the contents array of the static strings to avoid deallocation attempts on static variables. - for (; i < main->parameters[fss_extended_write_parameter_content].values.used; ++i) { + for (; i < main->parameters[fss_extended_write_parameter_content_e].values.used; ++i) { contents.array[contents.used].string = 0; contents.array[contents.used].used = 0; contents.array[contents.used].size = 0; @@ -511,7 +511,7 @@ extern "C" { f_array_length_t object_next = 0; f_array_length_t content_current = 0; - for (uint16_t signal_check = 0; i < main->parameters[fss_extended_write_parameter_object].values.used; ++i) { + for (uint16_t signal_check = 0; i < main->parameters[fss_extended_write_parameter_object_e].values.used; ++i) { if (!((++signal_check) % fss_extended_write_signal_check_d)) { if (fss_extended_write_signal_received(main)) { @@ -522,23 +522,23 @@ extern "C" { signal_check = 0; } - object_current = main->parameters[fss_extended_write_parameter_object].locations.array[i]; + object_current = main->parameters[fss_extended_write_parameter_object_e].locations.array[i]; - if (i + 1 < main->parameters[fss_extended_write_parameter_object].values.used) { - object_next = main->parameters[fss_extended_write_parameter_object].locations.array[i + 1]; + if (i + 1 < main->parameters[fss_extended_write_parameter_object_e].values.used) { + object_next = main->parameters[fss_extended_write_parameter_object_e].locations.array[i + 1]; } - object.string = arguments->argv[main->parameters[fss_extended_write_parameter_object].values.array[i]]; + object.string = arguments->argv[main->parameters[fss_extended_write_parameter_object_e].values.array[i]]; object.used = strnlen(object.string, f_console_parameter_size); object.size = object.used; contents.used = 0; - for (; j < main->parameters[fss_extended_write_parameter_content].values.used; ++j) { + for (; j < main->parameters[fss_extended_write_parameter_content_e].values.used; ++j) { - content_current = main->parameters[fss_extended_write_parameter_content].locations.array[j]; + content_current = main->parameters[fss_extended_write_parameter_content_e].locations.array[j]; - if (i + 1 < main->parameters[fss_extended_write_parameter_object].values.used) { + if (i + 1 < main->parameters[fss_extended_write_parameter_object_e].values.used) { if (content_current < object_current || content_current > object_next) break; } @@ -553,7 +553,7 @@ extern "C" { contents.array[contents.used].used = 0; } - status = f_string_append(arguments->argv[main->parameters[fss_extended_write_parameter_content].values.array[j]], strnlen(arguments->argv[main->parameters[fss_extended_write_parameter_content].values.array[j]], f_console_parameter_size), &contents.array[contents.used]); + status = f_string_append(arguments->argv[main->parameters[fss_extended_write_parameter_content_e].values.array[j]], strnlen(arguments->argv[main->parameters[fss_extended_write_parameter_content_e].values.array[j]], f_console_parameter_size), &contents.array[contents.used]); if (F_status_is_error(status)) { fll_error_print(main->error, F_status_set_fine(status), "f_string_append", F_true); @@ -571,7 +571,7 @@ extern "C" { } if (F_status_is_error(status)) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sWhile processing the '%]%[input arguments%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context, main->error.notable, main->error.notable); @@ -580,7 +580,7 @@ extern "C" { funlockfile(main->error.to.stream); } } - else if (main->error.verbosity != f_console_verbosity_quiet && main->parameters[fss_extended_write_parameter_file].result == f_console_result_none) { + else if (main->error.verbosity != f_console_verbosity_quiet_e && main->parameters[fss_extended_write_parameter_file_e].result == f_console_result_none_e) { // ensure there is always a newline at the end, unless in quiet mode. fll_print_character(f_string_eol_s[0], main->error.to.stream); @@ -598,14 +598,14 @@ extern "C" { contents.used = 0; } - if (main->parameters[fss_extended_write_parameter_file].result == f_console_result_additional) { + if (main->parameters[fss_extended_write_parameter_file_e].result == f_console_result_additional_e) { if (output.id != -1) { f_file_stream_close(F_true, &output); } } // Ensure a newline is always put at the end of the program execution, unless in quiet mode. - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { if (F_status_is_error(status)) { if (F_status_set_fine(status) == F_interrupt) { fflush(main->output.to.stream); 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 3a711fc..3697283 100644 --- a/level_3/fss_extended_write/c/fss_extended_write.h +++ b/level_3/fss_extended_write/c/fss_extended_write.h @@ -29,7 +29,6 @@ #include // fll-1 includes -#include #include #include #include @@ -37,7 +36,6 @@ // fll-2 includes #include #include -#include #include #include @@ -94,47 +92,47 @@ extern "C" { #define fss_extended_write_long_trim_s "trim" enum { - fss_extended_write_parameter_help, - fss_extended_write_parameter_light, - fss_extended_write_parameter_dark, - fss_extended_write_parameter_no_color, - fss_extended_write_parameter_verbosity_quiet, - fss_extended_write_parameter_verbosity_normal, - fss_extended_write_parameter_verbosity_verbose, - fss_extended_write_parameter_verbosity_debug, - fss_extended_write_parameter_version, - - fss_extended_write_parameter_file, - fss_extended_write_parameter_content, - fss_extended_write_parameter_double, - fss_extended_write_parameter_ignore, - fss_extended_write_parameter_object, - fss_extended_write_parameter_partial, - fss_extended_write_parameter_prepend, - fss_extended_write_parameter_single, - fss_extended_write_parameter_trim, + fss_extended_write_parameter_help_e, + fss_extended_write_parameter_light_e, + fss_extended_write_parameter_dark_e, + fss_extended_write_parameter_no_color_e, + fss_extended_write_parameter_verbosity_quiet_e, + fss_extended_write_parameter_verbosity_normal_e, + fss_extended_write_parameter_verbosity_verbose_e, + fss_extended_write_parameter_verbosity_debug_e, + fss_extended_write_parameter_version_e, + + fss_extended_write_parameter_file_e, + fss_extended_write_parameter_content_e, + fss_extended_write_parameter_double_e, + fss_extended_write_parameter_ignore_e, + fss_extended_write_parameter_object_e, + fss_extended_write_parameter_partial_e, + fss_extended_write_parameter_prepend_e, + fss_extended_write_parameter_single_e, + fss_extended_write_parameter_trim_e, }; #define fss_extended_write_console_parameter_t_initialize \ { \ - 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_s, fss_extended_write_long_file_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_write_short_content_s, fss_extended_write_long_content_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_write_short_double_s, fss_extended_write_long_double_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_write_short_ignore_s, fss_extended_write_long_ignore_s, 0, 2, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_write_short_object_s, fss_extended_write_long_object_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_write_short_partial_s, fss_extended_write_long_partial_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_write_short_prepend_s, fss_extended_write_long_prepend_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_write_short_single_s, fss_extended_write_long_single_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_write_short_trim_s, fss_extended_write_long_trim_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse_e), \ + 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_e), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, F_false, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(fss_extended_write_short_file_s, fss_extended_write_long_file_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_write_short_content_s, fss_extended_write_long_content_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_write_short_double_s, fss_extended_write_long_double_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_write_short_ignore_s, fss_extended_write_long_ignore_s, 0, 2, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_write_short_object_s, fss_extended_write_long_object_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_write_short_partial_s, fss_extended_write_long_partial_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_write_short_prepend_s, fss_extended_write_long_prepend_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_write_short_single_s, fss_extended_write_long_single_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_extended_write_short_trim_s, fss_extended_write_long_trim_s, 0, 0, f_console_type_normal_e), \ } #define fss_extended_write_total_parameters_d 18 diff --git a/level_3/fss_extended_write/c/private-common.c b/level_3/fss_extended_write/c/private-common.c index da04e4a..8d67039 100644 --- a/level_3/fss_extended_write/c/private-common.c +++ b/level_3/fss_extended_write/c/private-common.c @@ -8,7 +8,7 @@ extern "C" { #ifndef _di_fss_extended_write_print_signal_received_ void fss_extended_write_print_signal_received(fss_extended_write_main_t * const main, const f_status_t signal) { - if (main->warning.verbosity != f_console_verbosity_verbose) return; + if (main->warning.verbosity != f_console_verbosity_verbose_e) return; // Must flush and reset color because the interrupt may have interrupted the middle of a print function. fflush(main->warning.to.stream); 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 ce55948..0996677 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 @@ -9,7 +9,7 @@ extern "C" { #ifndef _di_fss_extended_write_error_parameter_at_least_once_print_ void fss_extended_write_error_parameter_at_least_once(fss_extended_write_main_t * const main) { - if (main->error.verbosity == f_console_verbosity_quiet) { + if (main->error.verbosity == f_console_verbosity_quiet_e) { return; } @@ -30,7 +30,7 @@ extern "C" { #ifndef _di_fss_extended_write_error_parameter_value_missing_print_ void fss_extended_write_error_parameter_value_missing_print(fss_extended_write_main_t * const main, const f_string_t symbol, const f_string_t parameter) { - if (main->error.verbosity == f_console_verbosity_quiet) { + if (main->error.verbosity == f_console_verbosity_quiet_e) { return; } @@ -47,7 +47,7 @@ extern "C" { #ifndef _di_fss_extended_write_error_parameter_unsupported_eol_print_ void fss_extended_write_error_parameter_unsupported_eol_print(fss_extended_write_main_t * const main) { - if (main->error.verbosity == f_console_verbosity_quiet) { + if (main->error.verbosity == f_console_verbosity_quiet_e) { return; } @@ -69,7 +69,7 @@ extern "C" { f_string_range_t range = f_string_range_t_initialize; if (object) { - uint8_t complete = f_fss_complete_none; + uint8_t complete = f_fss_complete_none_e; if (object->used) { range.start = 0; @@ -81,11 +81,11 @@ extern "C" { } if (contents && contents->used) { - if (main->parameters[fss_extended_write_parameter_trim].result == f_console_result_found) { - complete = f_fss_complete_full_trim; + if (main->parameters[fss_extended_write_parameter_trim_e].result == f_console_result_found_e) { + complete = f_fss_complete_full_trim_e; } else { - complete = f_fss_complete_full; + complete = f_fss_complete_full_e; } } @@ -117,7 +117,7 @@ extern "C" { range.stop = 0; } - status = fl_fss_extended_content_write(contents->array[i], quote, i + 1 < contents->used ? f_fss_complete_next : f_fss_complete_end, state, &range, buffer); + status = fl_fss_extended_content_write(contents->array[i], quote, i + 1 < contents->used ? f_fss_complete_next_e : f_fss_complete_end_e, state, &range, buffer); if (F_status_set_fine(status) == F_none_eol) { fss_extended_write_error_parameter_unsupported_eol_print(main); diff --git a/level_3/fss_extended_write/data/build/dependencies b/level_3/fss_extended_write/data/build/dependencies index 64034db..f853089 100644 --- a/level_3/fss_extended_write/data/build/dependencies +++ b/level_3/fss_extended_write/data/build/dependencies @@ -18,7 +18,6 @@ f_signal fl_conversion fl_fss fl_print -fl_status fl_string fll_error fll_file diff --git a/level_3/fss_extended_write/data/build/settings b/level_3/fss_extended_write/data/build/settings index 4661eb3..a29f212 100644 --- a/level_3/fss_extended_write/data/build/settings +++ b/level_3/fss_extended_write/data/build/settings @@ -21,7 +21,7 @@ build_indexer ar build_indexer_arguments rcs build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -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_signal -lf_string -lf_type_array -lf_utf +build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -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_signal -lf_status_string -lf_string -lf_type_array -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared diff --git a/level_3/fss_identify/c/fss_identify.c b/level_3/fss_identify/c/fss_identify.c index 3e28097..91d73cb 100644 --- a/level_3/fss_identify/c/fss_identify.c +++ b/level_3/fss_identify/c/fss_identify.c @@ -66,7 +66,7 @@ extern "C" { const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_identify_total_parameters_d); { - f_console_parameter_id_t ids[3] = { fss_identify_parameter_no_color, fss_identify_parameter_light, fss_identify_parameter_dark }; + f_console_parameter_id_t ids[3] = { fss_identify_parameter_no_color_e, fss_identify_parameter_light_e, fss_identify_parameter_dark_e }; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3); status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context); @@ -92,7 +92,7 @@ extern "C" { } if (F_status_is_error(status)) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process", F_true); fll_print_character(f_string_eol_s[0], main->error.to.stream); } @@ -105,7 +105,7 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_identify_parameter_verbosity_quiet, fss_identify_parameter_verbosity_normal, fss_identify_parameter_verbosity_verbose, fss_identify_parameter_verbosity_debug }; + f_console_parameter_id_t ids[4] = { fss_identify_parameter_verbosity_quiet_e, fss_identify_parameter_verbosity_normal_e, fss_identify_parameter_verbosity_verbose_e, fss_identify_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); @@ -117,32 +117,32 @@ extern "C" { return status; } - if (choice == fss_identify_parameter_verbosity_quiet) { - main->output.verbosity = f_console_verbosity_quiet; - main->error.verbosity = f_console_verbosity_quiet; - main->warning.verbosity = f_console_verbosity_quiet; + if (choice == fss_identify_parameter_verbosity_quiet_e) { + main->output.verbosity = f_console_verbosity_quiet_e; + main->error.verbosity = f_console_verbosity_quiet_e; + main->warning.verbosity = f_console_verbosity_quiet_e; } - else if (choice == fss_identify_parameter_verbosity_normal) { - main->output.verbosity = f_console_verbosity_normal; - main->error.verbosity = f_console_verbosity_normal; - main->warning.verbosity = f_console_verbosity_normal; + else if (choice == fss_identify_parameter_verbosity_normal_e) { + main->output.verbosity = f_console_verbosity_normal_e; + main->error.verbosity = f_console_verbosity_normal_e; + main->warning.verbosity = f_console_verbosity_normal_e; } - else if (choice == fss_identify_parameter_verbosity_verbose) { - main->output.verbosity = f_console_verbosity_verbose; - main->error.verbosity = f_console_verbosity_verbose; - main->warning.verbosity = f_console_verbosity_verbose; + else if (choice == fss_identify_parameter_verbosity_verbose_e) { + main->output.verbosity = f_console_verbosity_verbose_e; + main->error.verbosity = f_console_verbosity_verbose_e; + main->warning.verbosity = f_console_verbosity_verbose_e; } - else if (choice == fss_identify_parameter_verbosity_debug) { - main->output.verbosity = f_console_verbosity_debug; - main->error.verbosity = f_console_verbosity_debug; - main->warning.verbosity = f_console_verbosity_debug; + else if (choice == fss_identify_parameter_verbosity_debug_e) { + main->output.verbosity = f_console_verbosity_debug_e; + main->error.verbosity = f_console_verbosity_debug_e; + main->warning.verbosity = f_console_verbosity_debug_e; } } status = F_none; } - if (main->parameters[fss_identify_parameter_help].result == f_console_result_found) { + if (main->parameters[fss_identify_parameter_help_e].result == f_console_result_found_e) { fss_identify_print_help(main->output.to, main->context); fss_identify_main_delete(main); @@ -150,7 +150,7 @@ extern "C" { return F_none; } - if (main->parameters[fss_identify_parameter_version].result == f_console_result_found) { + if (main->parameters[fss_identify_parameter_version_e].result == f_console_result_found_e) { fll_program_print_version(main->output.to, fss_identify_program_version); fss_identify_main_delete(main); @@ -161,7 +161,7 @@ extern "C" { fss_identify_data_t data = fss_identify_data_t_initialize; if (F_status_is_error_not(status)) { - if (main->parameters[fss_identify_parameter_line].result == f_console_result_found) { + if (main->parameters[fss_identify_parameter_line_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -172,8 +172,8 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_identify_parameter_line].result == f_console_result_additional) { - const f_array_length_t index = main->parameters[fss_identify_parameter_line].values.array[main->parameters[fss_identify_parameter_line].values.used - 1]; + else if (main->parameters[fss_identify_parameter_line_e].result == f_console_result_additional_e) { + const f_array_length_t index = main->parameters[fss_identify_parameter_line_e].values.array[main->parameters[fss_identify_parameter_line_e].values.used - 1]; const f_string_range_t range = macro_f_string_range_t_initialize(strnlen(arguments->argv[index], f_console_parameter_size)); status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, &data.line); @@ -184,8 +184,8 @@ extern "C" { } } - if (F_status_is_error_not(status) && main->parameters[fss_identify_parameter_total].result == f_console_result_found) { - if (main->parameters[fss_identify_parameter_object].result == f_console_result_found) { + if (F_status_is_error_not(status) && main->parameters[fss_identify_parameter_total_e].result == f_console_result_found_e) { + if (main->parameters[fss_identify_parameter_object_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -198,7 +198,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_identify_parameter_content].result == f_console_result_found) { + else if (main->parameters[fss_identify_parameter_content_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -214,7 +214,7 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[fss_identify_parameter_name].result == f_console_result_found) { + if (main->parameters[fss_identify_parameter_name_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -225,8 +225,8 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters[fss_identify_parameter_name].result == f_console_result_additional) { - const f_array_length_t index = main->parameters[fss_identify_parameter_name].values.array[main->parameters[fss_identify_parameter_name].values.used - 1]; + else if (main->parameters[fss_identify_parameter_name_e].result == f_console_result_additional_e) { + const f_array_length_t index = main->parameters[fss_identify_parameter_name_e].values.array[main->parameters[fss_identify_parameter_name_e].values.used - 1]; const f_array_length_t length = strnlen(arguments->argv[index], f_console_parameter_size); const f_string_range_t range = macro_f_string_range_t_initialize(length); @@ -312,7 +312,7 @@ extern "C" { signal_check = 0; } - if (main->parameters[fss_identify_parameter_line].result == f_console_result_additional) { + if (main->parameters[fss_identify_parameter_line_e].result == f_console_result_additional_e) { if (data.current > data.line) break; } @@ -323,7 +323,7 @@ extern "C" { status = f_file_stream_open(arguments->argv[main->remaining.array[i]], 0, &file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], "open", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], "open", fll_error_file_type_file_e); } else { status = fss_identify_load_line(main, file, arguments->argv[main->remaining.array[i]], &buffer, &range); @@ -342,13 +342,13 @@ extern "C" { f_string_dynamic_resize(0, &buffer); if (F_status_is_error_not(status)) { - if (main->parameters[fss_identify_parameter_total].result == f_console_result_found) { + if (main->parameters[fss_identify_parameter_total_e].result == f_console_result_found_e) { fll_print_format("%ul%c", main->output.to.stream, data.total, f_string_eol_s[0]); } } // Ensure a newline is always put at the end of the program execution, unless in quiet mode. - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { if (F_status_is_error(status)) { if (F_status_set_fine(status) == F_interrupt) { fflush(main->output.to.stream); diff --git a/level_3/fss_identify/c/fss_identify.h b/level_3/fss_identify/c/fss_identify.h index 7c62085..7a0b766 100644 --- a/level_3/fss_identify/c/fss_identify.h +++ b/level_3/fss_identify/c/fss_identify.h @@ -86,39 +86,39 @@ extern "C" { #define fss_identify_long_total_s "total" enum { - fss_identify_parameter_help, - fss_identify_parameter_light, - fss_identify_parameter_dark, - fss_identify_parameter_no_color, - fss_identify_parameter_verbosity_quiet, - fss_identify_parameter_verbosity_normal, - fss_identify_parameter_verbosity_verbose, - fss_identify_parameter_verbosity_debug, - fss_identify_parameter_version, - - fss_identify_parameter_content, - fss_identify_parameter_line, - fss_identify_parameter_name, - fss_identify_parameter_object, - fss_identify_parameter_total, + fss_identify_parameter_help_e, + fss_identify_parameter_light_e, + fss_identify_parameter_dark_e, + fss_identify_parameter_no_color_e, + fss_identify_parameter_verbosity_quiet_e, + fss_identify_parameter_verbosity_normal_e, + fss_identify_parameter_verbosity_verbose_e, + fss_identify_parameter_verbosity_debug_e, + fss_identify_parameter_version_e, + + fss_identify_parameter_content_e, + fss_identify_parameter_line_e, + fss_identify_parameter_name_e, + fss_identify_parameter_object_e, + fss_identify_parameter_total_e, }; #define fss_identify_console_parameter_t_initialize \ { \ - 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_identify_short_content_s, fss_identify_long_content_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_identify_short_line_s, fss_identify_long_line_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_identify_short_name_s, fss_identify_long_name_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_identify_short_object_s, fss_identify_long_object_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_identify_short_total_s, fss_identify_long_total_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse_e), \ + 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_e), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(fss_identify_short_content_s, fss_identify_long_content_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_identify_short_line_s, fss_identify_long_line_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_identify_short_name_s, fss_identify_long_name_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_identify_short_object_s, fss_identify_long_object_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_identify_short_total_s, fss_identify_long_total_s, 0, 0, f_console_type_normal_e), \ } #define fss_identify_total_parameters_d 14 diff --git a/level_3/fss_identify/c/private-common.c b/level_3/fss_identify/c/private-common.c index 81a8d30..def7f17 100644 --- a/level_3/fss_identify/c/private-common.c +++ b/level_3/fss_identify/c/private-common.c @@ -17,7 +17,7 @@ extern "C" { #ifndef _di_fss_identify_print_signal_received_ void fss_identify_print_signal_received(fss_identify_main_t * const main, const f_status_t signal) { - if (main->warning.verbosity != f_console_verbosity_verbose) return; + if (main->warning.verbosity != f_console_verbosity_verbose_e) return; // Must flush and reset color because the interrupt may have interrupted the middle of a print function. fflush(main->warning.to.stream); diff --git a/level_3/fss_identify/c/private-fss_identify.c b/level_3/fss_identify/c/private-fss_identify.c index 9ab8393..23fb245 100644 --- a/level_3/fss_identify/c/private-fss_identify.c +++ b/level_3/fss_identify/c/private-fss_identify.c @@ -31,7 +31,7 @@ extern "C" { status = f_string_dynamic_resize(buffer->size + file.size_read, buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, name ? name : "-", "read", name ? fll_error_file_type_file : fll_error_file_type_pipe); + fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, name ? name : "-", "read", name ? fll_error_file_type_file_e : fll_error_file_type_pipe_e); return status; } @@ -40,7 +40,7 @@ extern "C" { status = f_file_stream_read_block(file, buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read_block", F_true, name ? name : "-", "read", name ? fll_error_file_type_file : fll_error_file_type_pipe); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read_block", F_true, name ? name : "-", "read", name ? fll_error_file_type_file_e : fll_error_file_type_pipe_e); return status; } @@ -67,15 +67,15 @@ extern "C" { flockfile(main->output.to.stream); - if (main->parameters[fss_identify_parameter_object].result == f_console_result_found || main->parameters[fss_identify_parameter_content].result != f_console_result_found) { + if (main->parameters[fss_identify_parameter_object_e].result == f_console_result_found_e || main->parameters[fss_identify_parameter_content_e].result != f_console_result_found_e) { f_print(id.name, id.used, main->output.to.stream); - if (main->parameters[fss_identify_parameter_object].result != f_console_result_found || main->parameters[fss_identify_parameter_content].result == f_console_result_found) { + if (main->parameters[fss_identify_parameter_object_e].result != f_console_result_found_e || main->parameters[fss_identify_parameter_content_e].result == f_console_result_found_e) { f_print_terminated(f_fss_type_header_part5_s, main->output.to.stream); } } - if (main->parameters[fss_identify_parameter_object].result != f_console_result_found || main->parameters[fss_identify_parameter_content].result == f_console_result_found) { + if (main->parameters[fss_identify_parameter_object_e].result != f_console_result_found_e || main->parameters[fss_identify_parameter_content_e].result == f_console_result_found_e) { fl_print_format("%04_ui", main->output.to.stream, id.type); } @@ -94,14 +94,14 @@ extern "C" { status = fll_fss_identify(buffer.string, range, &ids); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_identify", F_true, name ? name : "-", "read", name ? fll_error_file_type_file : fll_error_file_type_pipe); + fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_identify", F_true, name ? name : "-", "read", name ? fll_error_file_type_file_e : fll_error_file_type_pipe_e); f_type_fll_ids_resize(0, &ids); return status; } - if (main->parameters[fss_identify_parameter_line].result == f_console_result_additional) { + if (main->parameters[fss_identify_parameter_line_e].result == f_console_result_additional_e) { for (f_array_length_t i = 0; i < ids.used; ++i, ++data->current) { @@ -112,7 +112,7 @@ extern "C" { } } - if (main->parameters[fss_identify_parameter_total].result == f_console_result_found) { + if (main->parameters[fss_identify_parameter_total_e].result == f_console_result_found_e) { ++data->total; } else { @@ -125,7 +125,7 @@ extern "C" { } } // for } - else if (main->parameters[fss_identify_parameter_total].result == f_console_result_found) { + else if (main->parameters[fss_identify_parameter_total_e].result == f_console_result_found_e) { if (data->name.used) { for (f_array_length_t i = 0; i < ids.used; ++i, ++data->current) { diff --git a/level_3/fss_identify/data/build/settings b/level_3/fss_identify/data/build/settings index 72902d2..42105ad 100644 --- a/level_3/fss_identify/data/build/settings +++ b/level_3/fss_identify/data/build/settings @@ -21,7 +21,7 @@ build_indexer ar build_indexer_arguments rcs build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_fss -lfll_print -lfll_program -lfl_console -lfl_conversion -lfl_fss -lfl_print -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_signal -lf_string -lf_type_array -lf_utf +build_libraries-individual -lfll_error -lfll_fss -lfll_print -lfll_program -lfl_console -lfl_conversion -lfl_fss -lfl_print -lfl_string -lf_color -lf_console -lf_conversion -lf_file -lf_fss -lf_memory -lf_path -lf_pipe -lf_print -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared 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 5f710d6..0eaca1f 100644 --- a/level_3/fss_status_code/c/fss_status_code.c +++ b/level_3/fss_status_code/c/fss_status_code.c @@ -47,7 +47,7 @@ extern "C" { const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_status_code_total_parameters_d); { - f_console_parameter_id_t ids[3] = { fss_status_code_parameter_no_color, fss_status_code_parameter_light, fss_status_code_parameter_dark }; + f_console_parameter_id_t ids[3] = { fss_status_code_parameter_no_color_e, fss_status_code_parameter_light_e, fss_status_code_parameter_dark_e }; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3); status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context); @@ -80,7 +80,7 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { fss_status_code_parameter_verbosity_quiet, fss_status_code_parameter_verbosity_normal, fss_status_code_parameter_verbosity_verbose, fss_status_code_parameter_verbosity_debug }; + f_console_parameter_id_t ids[4] = { fss_status_code_parameter_verbosity_quiet_e, fss_status_code_parameter_verbosity_normal_e, fss_status_code_parameter_verbosity_verbose_e, fss_status_code_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); @@ -91,47 +91,47 @@ extern "C" { return status; } - if (choice == fss_status_code_parameter_verbosity_quiet) { - main->output.verbosity = f_console_verbosity_quiet; - main->error.verbosity = f_console_verbosity_quiet; - main->warning.verbosity = f_console_verbosity_quiet; + if (choice == fss_status_code_parameter_verbosity_quiet_e) { + main->output.verbosity = f_console_verbosity_quiet_e; + main->error.verbosity = f_console_verbosity_quiet_e; + main->warning.verbosity = f_console_verbosity_quiet_e; } - else if (choice == fss_status_code_parameter_verbosity_normal) { - main->output.verbosity = f_console_verbosity_normal; - main->error.verbosity = f_console_verbosity_normal; - main->warning.verbosity = f_console_verbosity_normal; + else if (choice == fss_status_code_parameter_verbosity_normal_e) { + main->output.verbosity = f_console_verbosity_normal_e; + main->error.verbosity = f_console_verbosity_normal_e; + main->warning.verbosity = f_console_verbosity_normal_e; } - else if (choice == fss_status_code_parameter_verbosity_verbose) { - main->output.verbosity = f_console_verbosity_verbose; - main->error.verbosity = f_console_verbosity_verbose; - main->warning.verbosity = f_console_verbosity_verbose; + else if (choice == fss_status_code_parameter_verbosity_verbose_e) { + main->output.verbosity = f_console_verbosity_verbose_e; + main->error.verbosity = f_console_verbosity_verbose_e; + main->warning.verbosity = f_console_verbosity_verbose_e; } - else if (choice == fss_status_code_parameter_verbosity_debug) { - main->output.verbosity = f_console_verbosity_debug; - main->error.verbosity = f_console_verbosity_debug; - main->warning.verbosity = f_console_verbosity_debug; + else if (choice == fss_status_code_parameter_verbosity_debug_e) { + main->output.verbosity = f_console_verbosity_debug_e; + main->error.verbosity = f_console_verbosity_debug_e; + main->warning.verbosity = f_console_verbosity_debug_e; } } status = F_none; } - if (main->parameters[fss_status_code_parameter_help].result == f_console_result_found) { + if (main->parameters[fss_status_code_parameter_help_e].result == f_console_result_found_e) { fss_status_code_print_help(main->output.to, main->context); fss_status_code_main_delete(main); return F_none; } - if (main->parameters[fss_status_code_parameter_version].result == f_console_result_found) { + if (main->parameters[fss_status_code_parameter_version_e].result == f_console_result_found_e) { fll_program_print_version(main->output.to, fss_status_code_program_version_s); fss_status_code_main_delete(main); return F_none; } - if (main->parameters[fss_status_code_parameter_is_error].result == f_console_result_found) { - if (main->parameters[fss_status_code_parameter_is_warning].result == f_console_result_found) { + if (main->parameters[fss_status_code_parameter_is_error_e].result == f_console_result_found_e) { + if (main->parameters[fss_status_code_parameter_is_warning_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -145,7 +145,7 @@ extern "C" { fss_status_code_main_delete(main); return F_status_set_error(status); } - else if (main->parameters[fss_status_code_parameter_is_fine].result == f_console_result_found) { + else if (main->parameters[fss_status_code_parameter_is_fine_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -160,7 +160,7 @@ extern "C" { return F_status_set_error(status); } } - else if (main->parameters[fss_status_code_parameter_is_warning].result == f_console_result_found && main->parameters[fss_status_code_parameter_is_fine].result == f_console_result_found) { + else if (main->parameters[fss_status_code_parameter_is_warning_e].result == f_console_result_found_e && main->parameters[fss_status_code_parameter_is_fine_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -184,7 +184,7 @@ extern "C" { f_status_t status2 = F_none; - if (main->parameters[fss_status_code_parameter_is_error].result == f_console_result_found || main->parameters[fss_status_code_parameter_is_warning].result == f_console_result_found || main->parameters[fss_status_code_parameter_is_fine].result == f_console_result_found) { + if (main->parameters[fss_status_code_parameter_is_error_e].result == f_console_result_found_e || main->parameters[fss_status_code_parameter_is_warning_e].result == f_console_result_found_e || main->parameters[fss_status_code_parameter_is_fine_e].result == f_console_result_found_e) { if (main->process_pipe) { // @todo call fss_status_code_process_check() here for all main from pipe that is space separated. } @@ -215,7 +215,7 @@ extern "C" { funlockfile(main->output.to.stream); } } - else if (main->parameters[fss_status_code_parameter_number].result == f_console_result_found) { + else if (main->parameters[fss_status_code_parameter_number_e].result == f_console_result_found_e) { if (main->process_pipe) { // @todo call fss_status_code_process_number() here for all main from pipe that is space separated. } @@ -278,7 +278,7 @@ extern "C" { } } - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { if (F_status_set_fine(status) == F_interrupt) { fflush(main->output.to.stream); 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 9cce55d..a2c82b6 100644 --- a/level_3/fss_status_code/c/fss_status_code.h +++ b/level_3/fss_status_code/c/fss_status_code.h @@ -27,20 +27,20 @@ #include #include #include +#include // fll-1 includes #include #include #include -#include #include // fll-2 includes #include -#include +#include #include #include -#include +#include #ifdef __cplusplus extern "C" { @@ -81,37 +81,37 @@ extern "C" { #define fss_status_code_long_number_s "number" enum { - fss_status_code_parameter_help, - fss_status_code_parameter_light, - fss_status_code_parameter_dark, - fss_status_code_parameter_no_color, - fss_status_code_parameter_verbosity_quiet, - fss_status_code_parameter_verbosity_normal, - fss_status_code_parameter_verbosity_verbose, - fss_status_code_parameter_verbosity_debug, - fss_status_code_parameter_version, - - fss_status_code_parameter_is_fine, - fss_status_code_parameter_is_warning, - fss_status_code_parameter_is_error, - fss_status_code_parameter_number, + fss_status_code_parameter_help_e, + fss_status_code_parameter_light_e, + fss_status_code_parameter_dark_e, + fss_status_code_parameter_no_color_e, + fss_status_code_parameter_verbosity_quiet_e, + fss_status_code_parameter_verbosity_normal_e, + fss_status_code_parameter_verbosity_verbose_e, + fss_status_code_parameter_verbosity_debug_e, + fss_status_code_parameter_version_e, + + fss_status_code_parameter_is_fine_e, + fss_status_code_parameter_is_warning_e, + fss_status_code_parameter_is_error_e, + fss_status_code_parameter_number_e, }; #define fss_status_code_console_parameter_t_initialize \ { \ - 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_s, fss_status_code_long_is_fine_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_status_code_short_is_warning_s, fss_status_code_long_is_warning_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_status_code_short_is_error_s, fss_status_code_long_is_error_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_status_code_short_number_s, fss_status_code_long_number_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse_e), \ + 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_e), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(fss_status_code_short_is_fine_s, fss_status_code_long_is_fine_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_status_code_short_is_warning_s, fss_status_code_long_is_warning_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_status_code_short_is_error_s, fss_status_code_long_is_error_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(fss_status_code_short_number_s, fss_status_code_long_number_s, 0, 0, f_console_type_normal_e), \ } #define fss_status_code_total_parameters_d 13 diff --git a/level_3/fss_status_code/c/private-common.c b/level_3/fss_status_code/c/private-common.c index b1b0e67..97c7d3e 100644 --- a/level_3/fss_status_code/c/private-common.c +++ b/level_3/fss_status_code/c/private-common.c @@ -8,7 +8,7 @@ extern "C" { #ifndef _di_fss_status_code_print_signal_received_ void fss_status_code_print_signal_received(fss_status_code_main_t * const main, const f_status_t signal) { - if (main->warning.verbosity != f_console_verbosity_verbose) return; + if (main->warning.verbosity != f_console_verbosity_verbose_e) return; // Must flush and reset color because the interrupt may have interrupted the middle of a print function. fflush(main->warning.to.stream); diff --git a/level_3/fss_status_code/c/private-fss_status_code.c b/level_3/fss_status_code/c/private-fss_status_code.c index d75d643..66adee5 100644 --- a/level_3/fss_status_code/c/private-fss_status_code.c +++ b/level_3/fss_status_code/c/private-fss_status_code.c @@ -11,35 +11,37 @@ extern "C" { f_number_unsigned_t number = 0; - f_status_t status = fss_status_code_convert_number(main, value, &number); - if (F_status_is_error(status)) return status; + { + const f_status_t status = fss_status_code_convert_number(main, value, &number); + if (F_status_is_error(status)) return status; + } - if (main->parameters[fss_status_code_parameter_is_error].result == f_console_result_found) { + if (main->parameters[fss_status_code_parameter_is_error_e].result == f_console_result_found_e) { if (F_status_is_error(number)) { - f_print_terminated(FL_status_string_true, main->output.to.stream); + f_print_terminated(f_status_true_s, main->output.to.stream); } else { - f_print_terminated(FL_status_string_false, main->output.to.stream); + f_print_terminated(f_status_false_s, main->output.to.stream); } f_print_character(f_string_eol_s[0], main->output.to.stream); } - else if (main->parameters[fss_status_code_parameter_is_warning].result == f_console_result_found) { + else if (main->parameters[fss_status_code_parameter_is_warning_e].result == f_console_result_found_e) { if (F_status_is_warning(number)) { - f_print_terminated(FL_status_string_true, main->output.to.stream); + f_print_terminated(f_status_true_s, main->output.to.stream); } else { - f_print_terminated(FL_status_string_false, main->output.to.stream); + f_print_terminated(f_status_false_s, main->output.to.stream); } f_print_character(f_string_eol_s[0], main->output.to.stream); } - else if (main->parameters[fss_status_code_parameter_is_fine].result == f_console_result_found) { + else if (main->parameters[fss_status_code_parameter_is_fine_e].result == f_console_result_found_e) { if (F_status_is_fine(number)) { - f_print_terminated(FL_status_string_true, main->output.to.stream); + f_print_terminated(f_status_true_s, main->output.to.stream); } else { - f_print_terminated(FL_status_string_false, main->output.to.stream); + f_print_terminated(f_status_false_s, main->output.to.stream); } f_print_character(f_string_eol_s[0], main->output.to.stream); @@ -76,11 +78,11 @@ extern "C" { f_status_t code = F_none; - status = fll_fss_status_from_string(value, &code); + status = fll_fss_status_string_from(value, &code); if (F_status_is_error(status)) { if (F_status_set_fine(status) == F_data) { - status = fll_status_from_string(value, &code); + status = fll_status_string_from(value, &code); } if (F_status_is_error(status)) { @@ -118,7 +120,7 @@ extern "C" { const f_status_t code = (f_status_t) number; f_string_t string = 0; - status = fll_fss_status_to_string(code, &string); + status = fll_fss_status_string_to(code, &string); if (F_status_is_error(status)) { if (F_status_set_fine(status) == F_data) { diff --git a/level_3/fss_status_code/c/private-fss_status_code.h b/level_3/fss_status_code/c/private-fss_status_code.h index 0e8e853..c7f630f 100644 --- a/level_3/fss_status_code/c/private-fss_status_code.h +++ b/level_3/fss_status_code/c/private-fss_status_code.h @@ -50,10 +50,10 @@ extern "C" { * F_data_not if string is empty. * * Errors (with error bit) from: fl_console_parameter_to_number_unsigned(). - * Errors (with error bit) from: fll_fss_status_from_string(). + * Errors (with error bit) from: fll_fss_status_string_from(). * * @see fl_console_parameter_to_number_unsigned() - * @see fll_fss_status_from_string() + * @see fll_fss_status_string_from() */ #ifndef _di_fss_status_code_process_number_ extern f_status_t fss_status_code_process_number(fss_status_code_main_t * const main, const f_string_t value) F_attribute_visibility_internal_d; @@ -76,10 +76,10 @@ extern "C" { * F_number_overflow (with error bit) on integer overflow. * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: fll_fss_status_from_string(). + * Errors (with error bit) from: fll_fss_status_string_from(). * Errors (with error bit) from: fss_status_code_convert_number(). * - * @see fll_fss_status_from_string() + * @see fll_fss_status_string_from() * @see fss_status_code_convert_number() */ #ifndef _di_fss_status_code_process_normal_ diff --git a/level_3/fss_status_code/data/build/dependencies b/level_3/fss_status_code/data/build/dependencies index bc8b57f..e03def4 100644 --- a/level_3/fss_status_code/data/build/dependencies +++ b/level_3/fss_status_code/data/build/dependencies @@ -15,15 +15,16 @@ f_fss f_pipe f_print f_signal +f_status_string fl_console fl_conversion fl_fss fl_print -fl_status fl_string fll_error fll_file fll_fss +fll_fss_status_string fll_print fll_program -fll_status +fll_status_string diff --git a/level_3/fss_status_code/data/build/settings b/level_3/fss_status_code/data/build/settings index b063e9e..1f26441 100644 --- a/level_3/fss_status_code/data/build/settings +++ b/level_3/fss_status_code/data/build/settings @@ -21,7 +21,7 @@ build_indexer ar build_indexer_arguments rcs build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_print -lfll_program -lfll_status -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_signal -lf_string -lf_type_array -lf_utf +build_libraries-individual -lfll_error -lfll_file -lfll_fss -lfll_fss_status_string -lfll_print -lfll_program -lfll_status_string -lfl_console -lfl_conversion -lfl_directory -lfl_fss -lfl_print -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_signal -lf_status_string -lf_string -lf_type_array -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared diff --git a/level_3/iki_read/c/iki_read.c b/level_3/iki_read/c/iki_read.c index d3f9343..1b718f2 100644 --- a/level_3/iki_read/c/iki_read.c +++ b/level_3/iki_read/c/iki_read.c @@ -74,7 +74,7 @@ extern "C" { const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, iki_read_total_parameters_d); { - f_console_parameter_id_t ids[3] = { iki_read_parameter_no_color, iki_read_parameter_light, iki_read_parameter_dark }; + f_console_parameter_id_t ids[3] = { iki_read_parameter_no_color_e, iki_read_parameter_light_e, iki_read_parameter_dark_e }; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3); status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context); @@ -102,7 +102,7 @@ extern "C" { if (F_status_is_error(status)) { fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process", F_true); - if (main->error.verbosity == f_console_verbosity_verbose) { + if (main->error.verbosity == f_console_verbosity_verbose_e) { fll_print_character(f_string_eol_s[0], main->error.to.stream); } @@ -114,7 +114,7 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { iki_read_parameter_verbosity_quiet, iki_read_parameter_verbosity_normal, iki_read_parameter_verbosity_verbose, iki_read_parameter_verbosity_debug }; + f_console_parameter_id_t ids[4] = { iki_read_parameter_verbosity_quiet_e, iki_read_parameter_verbosity_normal_e, iki_read_parameter_verbosity_verbose_e, iki_read_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); @@ -128,32 +128,32 @@ extern "C" { return status; } - if (choice == iki_read_parameter_verbosity_quiet) { - main->output.verbosity = f_console_verbosity_quiet; - main->error.verbosity = f_console_verbosity_quiet; - main->warning.verbosity = f_console_verbosity_quiet; + if (choice == iki_read_parameter_verbosity_quiet_e) { + main->output.verbosity = f_console_verbosity_quiet_e; + main->error.verbosity = f_console_verbosity_quiet_e; + main->warning.verbosity = f_console_verbosity_quiet_e; } - else if (choice == iki_read_parameter_verbosity_normal) { - main->output.verbosity = f_console_verbosity_normal; - main->error.verbosity = f_console_verbosity_normal; - main->warning.verbosity = f_console_verbosity_normal; + else if (choice == iki_read_parameter_verbosity_normal_e) { + main->output.verbosity = f_console_verbosity_normal_e; + main->error.verbosity = f_console_verbosity_normal_e; + main->warning.verbosity = f_console_verbosity_normal_e; } - else if (choice == iki_read_parameter_verbosity_verbose) { - main->output.verbosity = f_console_verbosity_verbose; - main->error.verbosity = f_console_verbosity_verbose; - main->warning.verbosity = f_console_verbosity_verbose; + else if (choice == iki_read_parameter_verbosity_verbose_e) { + main->output.verbosity = f_console_verbosity_verbose_e; + main->error.verbosity = f_console_verbosity_verbose_e; + main->warning.verbosity = f_console_verbosity_verbose_e; } - else if (choice == iki_read_parameter_verbosity_debug) { - main->output.verbosity = f_console_verbosity_debug; - main->error.verbosity = f_console_verbosity_debug; - main->warning.verbosity = f_console_verbosity_debug; + else if (choice == iki_read_parameter_verbosity_debug_e) { + main->output.verbosity = f_console_verbosity_debug_e; + main->error.verbosity = f_console_verbosity_debug_e; + main->warning.verbosity = f_console_verbosity_debug_e; } } status = F_none; } - if (main->parameters[iki_read_parameter_help].result == f_console_result_found) { + if (main->parameters[iki_read_parameter_help_e].result == f_console_result_found_e) { iki_read_print_help(main->output.to, main->context); iki_read_main_delete(main); @@ -161,7 +161,7 @@ extern "C" { return F_none; } - if (main->parameters[iki_read_parameter_version].result == f_console_result_found) { + if (main->parameters[iki_read_parameter_version_e].result == f_console_result_found_e) { fll_program_print_version(main->output.to, iki_read_program_version_s); iki_read_main_delete(main); @@ -170,8 +170,8 @@ extern "C" { } if (main->remaining.used > 0 || main->process_pipe) { - if (main->parameters[iki_read_parameter_at].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[iki_read_parameter_at_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -183,8 +183,8 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters[iki_read_parameter_at].result == f_console_result_additional) { - const f_array_length_t index = main->parameters[iki_read_parameter_at].values.array[main->parameters[iki_read_parameter_at].values.used - 1]; + else if (main->parameters[iki_read_parameter_at_e].result == f_console_result_additional_e) { + const f_array_length_t index = main->parameters[iki_read_parameter_at_e].values.array[main->parameters[iki_read_parameter_at_e].values.used - 1]; const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[index])); f_number_unsigned_t number = 0; @@ -199,8 +199,8 @@ extern "C" { main->at = number; - if (main->parameters[iki_read_parameter_whole].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[iki_read_parameter_whole_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -216,8 +216,8 @@ extern "C" { } } - if (main->parameters[iki_read_parameter_line].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[iki_read_parameter_line_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -229,8 +229,8 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters[iki_read_parameter_line].result == f_console_result_additional) { - const f_array_length_t index = main->parameters[iki_read_parameter_line].values.array[main->parameters[iki_read_parameter_line].values.used - 1]; + else if (main->parameters[iki_read_parameter_line_e].result == f_console_result_additional_e) { + const f_array_length_t index = main->parameters[iki_read_parameter_line_e].values.array[main->parameters[iki_read_parameter_line_e].values.used - 1]; const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[index])); f_number_unsigned_t number = 0; @@ -246,8 +246,8 @@ extern "C" { main->line = number; } - if (main->parameters[iki_read_parameter_name].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[iki_read_parameter_name_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -260,9 +260,9 @@ extern "C" { status = F_status_set_error(F_parameter); } - if (main->parameters[iki_read_parameter_substitute].result != f_console_result_none) { - if (main->parameters[iki_read_parameter_substitute].result == f_console_result_found || main->parameters[iki_read_parameter_substitute].values.used % 3 != 0) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[iki_read_parameter_substitute_e].result != f_console_result_none_e) { + if (main->parameters[iki_read_parameter_substitute_e].result == f_console_result_found_e || main->parameters[iki_read_parameter_substitute_e].values.used % 3 != 0) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -275,8 +275,8 @@ extern "C" { status = F_status_set_error(F_parameter); } - if (main->parameters[iki_read_parameter_total].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[iki_read_parameter_total_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -292,9 +292,9 @@ extern "C" { } } - if (main->parameters[iki_read_parameter_literal].result == f_console_result_found) { - if (main->parameters[iki_read_parameter_object].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[iki_read_parameter_literal_e].result == f_console_result_found_e) { + if (main->parameters[iki_read_parameter_object_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -309,8 +309,8 @@ extern "C" { status = F_status_set_error(F_parameter); } - if (main->parameters[iki_read_parameter_content].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[iki_read_parameter_content_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -325,8 +325,8 @@ extern "C" { status = F_status_set_error(F_parameter); } - if (main->parameters[iki_read_parameter_total].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[iki_read_parameter_total_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -341,11 +341,11 @@ extern "C" { status = F_status_set_error(F_parameter); } - main->mode = iki_read_mode_literal; + main->mode = iki_read_mode_literal_e; } - else if (main->parameters[iki_read_parameter_object].result == f_console_result_found) { - if (main->parameters[iki_read_parameter_content].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + else if (main->parameters[iki_read_parameter_object_e].result == f_console_result_found_e) { + if (main->parameters[iki_read_parameter_content_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -360,8 +360,8 @@ extern "C" { status = F_status_set_error(F_parameter); } - if (main->parameters[iki_read_parameter_total].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[iki_read_parameter_total_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -376,19 +376,19 @@ extern "C" { status = F_status_set_error(F_parameter); } - main->mode = iki_read_mode_object; + main->mode = iki_read_mode_object_e; } - else if (main->parameters[iki_read_parameter_total].result == f_console_result_found) { - main->mode = iki_read_mode_total; + else if (main->parameters[iki_read_parameter_total_e].result == f_console_result_found_e) { + main->mode = iki_read_mode_total_e; } else { // this is the default behavior, so there is no reason to check for the -c/--content parameter. - main->mode = iki_read_mode_content; + main->mode = iki_read_mode_content_e; } - if (main->parameters[iki_read_parameter_whole].result == f_console_result_found) { - if (main->parameters[iki_read_parameter_total].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[iki_read_parameter_whole_e].result == f_console_result_found_e) { + if (main->parameters[iki_read_parameter_total_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -405,7 +405,7 @@ extern "C" { } if (F_status_is_error(status)) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { fll_print_character(f_string_eol_s[0], main->error.to.stream); } @@ -422,7 +422,7 @@ extern "C" { status = f_file_read(file, &main->buffer); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read", F_true, "-", "process", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read", F_true, "-", "process", fll_error_file_type_file_e); } else { status = iki_read_process_buffer(main, arguments, "-"); @@ -454,14 +454,14 @@ extern "C" { status = f_file_open(arguments->argv[main->remaining.array[i]], 0, &file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, arguments->argv[main->remaining.array[i]], "process", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, arguments->argv[main->remaining.array[i]], "process", fll_error_file_type_file_e); break; } status = f_file_size_by_id(file.id, &total); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->remaining.array[i]], "process", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->remaining.array[i]], "process", fll_error_file_type_file_e); f_file_stream_close(F_true, &file); break; @@ -478,7 +478,7 @@ extern "C" { f_file_stream_close(F_true, &file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read_until", F_true, arguments->argv[main->remaining.array[i]], "process", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read_until", F_true, arguments->argv[main->remaining.array[i]], "process", fll_error_file_type_file_e); break; } @@ -491,7 +491,7 @@ extern "C" { } } else { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[%sYou failed to specify one or more files.%]%c", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context, f_string_eol_s[0]); } @@ -499,7 +499,7 @@ extern "C" { } // ensure a newline is always put at the end of the program execution, unless in quiet mode. - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { if (F_status_is_error(status) || !main->mode) { if (F_status_set_fine(status) == F_interrupt) { fflush(main->output.to.stream); diff --git a/level_3/iki_read/c/iki_read.h b/level_3/iki_read/c/iki_read.h index 53c69f2..e9defaa 100644 --- a/level_3/iki_read/c/iki_read.h +++ b/level_3/iki_read/c/iki_read.h @@ -79,10 +79,10 @@ extern "C" { #define iki_read_signal_check_d 10000 enum { - iki_read_mode_content = 1, - iki_read_mode_literal, - iki_read_mode_object, - iki_read_mode_total, + iki_read_mode_content_e = 1, + iki_read_mode_literal_e, + iki_read_mode_object_e, + iki_read_mode_total_e, }; #define iki_read_short_at_s "a" @@ -106,47 +106,47 @@ extern "C" { #define iki_read_long_whole_s "whole" enum { - iki_read_parameter_help, - iki_read_parameter_light, - iki_read_parameter_dark, - iki_read_parameter_no_color, - iki_read_parameter_verbosity_quiet, - iki_read_parameter_verbosity_normal, - iki_read_parameter_verbosity_verbose, - iki_read_parameter_verbosity_debug, - iki_read_parameter_version, - - iki_read_parameter_at, - iki_read_parameter_content, - iki_read_parameter_line, - iki_read_parameter_literal, - iki_read_parameter_name, - iki_read_parameter_object, - iki_read_parameter_whole, - iki_read_parameter_substitute, - iki_read_parameter_total, + iki_read_parameter_help_e, + iki_read_parameter_light_e, + iki_read_parameter_dark_e, + iki_read_parameter_no_color_e, + iki_read_parameter_verbosity_quiet_e, + iki_read_parameter_verbosity_normal_e, + iki_read_parameter_verbosity_verbose_e, + iki_read_parameter_verbosity_debug_e, + iki_read_parameter_version_e, + + iki_read_parameter_at_e, + iki_read_parameter_content_e, + iki_read_parameter_line_e, + iki_read_parameter_literal_e, + iki_read_parameter_name_e, + iki_read_parameter_object_e, + iki_read_parameter_whole_e, + iki_read_parameter_substitute_e, + iki_read_parameter_total_e, }; #define iki_read_console_parameter_t_initialize \ { \ - 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_s, iki_read_long_at_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_read_short_content_s, iki_read_long_content_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_read_short_line_s, iki_read_long_line_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_read_short_literal_s, iki_read_long_literal_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_read_short_name_s, iki_read_long_name_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_read_short_object_s, iki_read_long_object_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_read_short_whole_s, iki_read_long_whole_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_read_short_substitute_s, iki_read_long_substitute_s, 0, 3, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_read_short_total_s, iki_read_long_total_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse_e), \ + 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_e), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(iki_read_short_at_s, iki_read_long_at_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(iki_read_short_content_s, iki_read_long_content_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(iki_read_short_line_s, iki_read_long_line_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(iki_read_short_literal_s, iki_read_long_literal_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(iki_read_short_name_s, iki_read_long_name_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(iki_read_short_object_s, iki_read_long_object_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(iki_read_short_whole_s, iki_read_long_whole_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(iki_read_short_substitute_s, iki_read_long_substitute_s, 0, 3, f_console_type_normal_e), \ + f_console_parameter_t_initialize(iki_read_short_total_s, iki_read_long_total_s, 0, 0, f_console_type_normal_e), \ } #define iki_read_total_parameters_d 18 diff --git a/level_3/iki_read/c/private-common.c b/level_3/iki_read/c/private-common.c index 1a135e4..7e48ae2 100644 --- a/level_3/iki_read/c/private-common.c +++ b/level_3/iki_read/c/private-common.c @@ -8,7 +8,7 @@ extern "C" { #ifndef _di_iki_read_print_signal_received_ void iki_read_print_signal_received(iki_read_main_t * const main, const f_status_t signal) { - if (main->warning.verbosity != f_console_verbosity_verbose) return; + if (main->warning.verbosity != f_console_verbosity_verbose_e) return; // Must flush and reset color because the interrupt may have interrupted the middle of a print function. fflush(main->warning.to.stream); diff --git a/level_3/iki_read/c/private-iki_read.c b/level_3/iki_read/c/private-iki_read.c index b0354a8..41e80fb 100644 --- a/level_3/iki_read/c/private-iki_read.c +++ b/level_3/iki_read/c/private-iki_read.c @@ -9,7 +9,7 @@ extern "C" { #ifndef _di_iki_read_process_at_ f_status_t iki_read_process_at(iki_read_main_t * const main, const f_string_t file_name, f_string_range_t *range) { - if (main->parameters[iki_read_parameter_line].result != f_console_result_additional) { + if (main->parameters[iki_read_parameter_line_e].result != f_console_result_additional_e) { return F_false; } @@ -40,7 +40,7 @@ extern "C" { f_status_t status = F_none; iki_data_t iki_data = iki_data_t_initialize; - if (main->parameters[iki_read_parameter_whole].result == f_console_result_found) { + if (main->parameters[iki_read_parameter_whole_e].result == f_console_result_found_e) { f_string_range_t buffer_range = macro_f_string_range_t_initialize(main->buffer.used); status = iki_read_process_at(main, file_name, &buffer_range); @@ -54,17 +54,17 @@ extern "C" { return F_data_not; } - if (main->mode == iki_read_mode_content) { + if (main->mode == iki_read_mode_content_e) { status = iki_read_process_buffer_ranges_whole(main, arguments, file_name, buffer_range, &iki_data, &iki_data.content); } - else if (main->mode == iki_read_mode_literal) { + else if (main->mode == iki_read_mode_literal_e) { status = iki_read_process_buffer_ranges_whole(main, arguments, file_name, buffer_range, &iki_data, &iki_data.variable); } - else if (main->mode == iki_read_mode_object) { + else if (main->mode == iki_read_mode_object_e) { status = iki_read_process_buffer_ranges_whole(main, arguments, file_name, buffer_range, &iki_data, &iki_data.vocabulary); } } - else if (main->mode == iki_read_mode_total) { + else if (main->mode == iki_read_mode_total_e) { status = iki_read_process_buffer_total(main, arguments, file_name, &iki_data); } else { @@ -78,13 +78,13 @@ extern "C" { return F_data_not; } - if (main->mode == iki_read_mode_content) { + if (main->mode == iki_read_mode_content_e) { status = iki_read_process_buffer_ranges(main, arguments, file_name, &buffer_range, &iki_data, &iki_data.content); } - else if (main->mode == iki_read_mode_literal) { + else if (main->mode == iki_read_mode_literal_e) { status = iki_read_process_buffer_ranges(main, arguments, file_name, &buffer_range, &iki_data, &iki_data.variable); } - else if (main->mode == iki_read_mode_object) { + else if (main->mode == iki_read_mode_object_e) { status = iki_read_process_buffer_ranges(main, arguments, file_name, &buffer_range, &iki_data, &iki_data.vocabulary); } } @@ -118,13 +118,13 @@ extern "C" { main->buffer.string[iki_data->delimits.array[i]] = f_iki_syntax_placeholder_s[0]; } // for - const bool content_only = main->mode == iki_read_mode_content; + const bool content_only = main->mode == iki_read_mode_content_e; iki_read_substitutions_t substitutionss[iki_data->variable.used]; memset(substitutionss, 0, sizeof(iki_read_substitutions_t) * iki_data->variable.used); - if (main->mode == iki_read_mode_literal || main->mode == iki_read_mode_content) { + if (main->mode == iki_read_mode_literal_e || main->mode == iki_read_mode_content_e) { status = iki_read_substitutions_identify(main, arguments, file_name, &iki_data->vocabulary, substitutionss); if (F_status_is_error(status)) { @@ -138,7 +138,7 @@ extern "C" { } } - if (main->parameters[iki_read_parameter_name].result == f_console_result_additional) { + if (main->parameters[iki_read_parameter_name_e].result == f_console_result_additional_e) { f_string_dynamic_t name = f_string_dynamic_t_initialize; f_array_length_t index = 0; @@ -147,9 +147,9 @@ extern "C" { f_array_length_t matches = 0; buffer_range->start = 0; - for (; i < main->parameters[iki_read_parameter_name].values.used; ++i) { + for (; i < main->parameters[iki_read_parameter_name_e].values.used; ++i) { - index = main->parameters[iki_read_parameter_name].values.array[i]; + index = main->parameters[iki_read_parameter_name_e].values.array[i]; name.used = 0; status = f_string_append_nulless(arguments->argv[index], strlen(arguments->argv[index]), &name); @@ -176,7 +176,7 @@ extern "C" { if (status == F_equal_to) { unmatched = F_false; - if (main->parameters[iki_read_parameter_at].result == f_console_result_additional) { + if (main->parameters[iki_read_parameter_at_e].result == f_console_result_additional_e) { if (matches++ != main->at) continue; } @@ -200,7 +200,7 @@ extern "C" { else status = F_none; } else if (ranges->used) { - if (main->parameters[iki_read_parameter_at].result == f_console_result_additional) { + if (main->parameters[iki_read_parameter_at_e].result == f_console_result_additional_e) { if (main->at < ranges->used) { flockfile(main->output.to.stream); @@ -281,13 +281,13 @@ extern "C" { return F_none; } - const bool content_only = main->mode == iki_read_mode_content; + const bool content_only = main->mode == iki_read_mode_content_e; iki_read_substitutions_t substitutionss[iki_data->variable.used]; memset(substitutionss, 0, sizeof(iki_read_substitutions_t) * iki_data->variable.used); - if (main->mode == iki_read_mode_literal || main->mode == iki_read_mode_content) { + if (main->mode == iki_read_mode_literal_e || main->mode == iki_read_mode_content_e) { status = iki_read_substitutions_identify(main, arguments, file_name, &iki_data->vocabulary, substitutionss); if (F_status_is_error(status)) { @@ -309,14 +309,14 @@ extern "C" { substitution_range.start = 0; - if (main->parameters[iki_read_parameter_name].result == f_console_result_additional) { + if (main->parameters[iki_read_parameter_name_e].result == f_console_result_additional_e) { f_array_length_t i = 0; f_array_length_t j = 0; f_array_length_t length_argument = 0; - for (f_array_length_t index = 0; i < main->parameters[iki_read_parameter_name].values.used; ++i) { + for (f_array_length_t index = 0; i < main->parameters[iki_read_parameter_name_e].values.used; ++i) { - index = main->parameters[iki_read_parameter_name].values.array[i]; + index = main->parameters[iki_read_parameter_name_e].values.array[i]; length_argument = strnlen(arguments->argv[index], f_console_parameter_size); for (j = 0, name_missed = F_true; j < names.used; ++j) { @@ -487,7 +487,7 @@ extern "C" { f_array_length_t total = 0; - if (main->parameters[iki_read_parameter_name].result == f_console_result_additional) { + if (main->parameters[iki_read_parameter_name_e].result == f_console_result_additional_e) { f_string_dynamic_t name = f_string_dynamic_t_initialize; f_array_length_t index = 0; @@ -496,7 +496,7 @@ extern "C" { range.start = 0; - for (uint16_t signal_check = 0; i < main->parameters[iki_read_parameter_name].values.used; ++i) { + for (uint16_t signal_check = 0; i < main->parameters[iki_read_parameter_name_e].values.used; ++i) { if (!((++signal_check) % iki_read_signal_check_d)) { if (iki_read_signal_received(main)) { @@ -508,7 +508,7 @@ extern "C" { signal_check = 0; } - index = main->parameters[iki_read_parameter_name].values.array[i]; + index = main->parameters[iki_read_parameter_name_e].values.array[i]; name.used = 0; status = f_string_append_nulless(arguments->argv[index], strlen(arguments->argv[index]), &name); @@ -537,7 +537,7 @@ extern "C" { } // if that at position is within the actual total, then the total at the given position is 1, otherwise is 0. - if (main->parameters[iki_read_parameter_at].result == f_console_result_additional) { + if (main->parameters[iki_read_parameter_at_e].result == f_console_result_additional_e) { if (main->at < total) { total = 1; } @@ -555,7 +555,7 @@ extern "C" { #ifndef _di_iki_read_substitutions_identify_ f_status_t iki_read_substitutions_identify(iki_read_main_t * const main, const f_console_arguments_t *arguments, const f_string_t file_name, f_iki_vocabulary_t *vocabulary, iki_read_substitutions_t *substitutionss) { - if (main->parameters[iki_read_parameter_substitute].result != f_console_result_additional) { + if (main->parameters[iki_read_parameter_substitute_e].result != f_console_result_additional_e) { return F_none; } @@ -569,7 +569,7 @@ extern "C" { f_array_length_t length = 0; - f_console_parameter_t *parameter = &main->parameters[iki_read_parameter_substitute]; + f_console_parameter_t *parameter = &main->parameters[iki_read_parameter_substitute_e]; for (; i < parameter->values.used; i += 3) { diff --git a/level_3/iki_write/c/iki_write.c b/level_3/iki_write/c/iki_write.c index ce54389..31f4cc6 100644 --- a/level_3/iki_write/c/iki_write.c +++ b/level_3/iki_write/c/iki_write.c @@ -56,7 +56,7 @@ extern "C" { const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, iki_write_total_parameters_d); { - f_console_parameter_id_t ids[3] = { iki_write_parameter_no_color, iki_write_parameter_light, iki_write_parameter_dark }; + f_console_parameter_id_t ids[3] = { iki_write_parameter_no_color_e, iki_write_parameter_light_e, iki_write_parameter_dark_e }; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3); status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context); @@ -82,7 +82,7 @@ extern "C" { } if (F_status_is_error(status)) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process", F_true); f_print_character(f_string_eol_s[0], main->error.to.stream); } @@ -95,7 +95,7 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { iki_write_parameter_verbosity_quiet, iki_write_parameter_verbosity_normal, iki_write_parameter_verbosity_verbose, iki_write_parameter_verbosity_debug }; + f_console_parameter_id_t ids[4] = { iki_write_parameter_verbosity_quiet_e, iki_write_parameter_verbosity_normal_e, iki_write_parameter_verbosity_verbose_e, iki_write_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); @@ -107,32 +107,32 @@ extern "C" { return status; } - if (choice == iki_write_parameter_verbosity_quiet) { - main->output.verbosity = f_console_verbosity_quiet; - main->error.verbosity = f_console_verbosity_quiet; - main->warning.verbosity = f_console_verbosity_quiet; + if (choice == iki_write_parameter_verbosity_quiet_e) { + main->output.verbosity = f_console_verbosity_quiet_e; + main->error.verbosity = f_console_verbosity_quiet_e; + main->warning.verbosity = f_console_verbosity_quiet_e; } - else if (choice == iki_write_parameter_verbosity_normal) { - main->output.verbosity = f_console_verbosity_normal; - main->error.verbosity = f_console_verbosity_normal; - main->warning.verbosity = f_console_verbosity_normal; + else if (choice == iki_write_parameter_verbosity_normal_e) { + main->output.verbosity = f_console_verbosity_normal_e; + main->error.verbosity = f_console_verbosity_normal_e; + main->warning.verbosity = f_console_verbosity_normal_e; } - else if (choice == iki_write_parameter_verbosity_verbose) { - main->output.verbosity = f_console_verbosity_verbose; - main->error.verbosity = f_console_verbosity_verbose; - main->warning.verbosity = f_console_verbosity_verbose; + else if (choice == iki_write_parameter_verbosity_verbose_e) { + main->output.verbosity = f_console_verbosity_verbose_e; + main->error.verbosity = f_console_verbosity_verbose_e; + main->warning.verbosity = f_console_verbosity_verbose_e; } - else if (choice == iki_write_parameter_verbosity_debug) { - main->output.verbosity = f_console_verbosity_debug; - main->error.verbosity = f_console_verbosity_debug; - main->warning.verbosity = f_console_verbosity_debug; + else if (choice == iki_write_parameter_verbosity_debug_e) { + main->output.verbosity = f_console_verbosity_debug_e; + main->error.verbosity = f_console_verbosity_debug_e; + main->warning.verbosity = f_console_verbosity_debug_e; } } status = F_none; } - if (main->parameters[iki_write_parameter_help].result == f_console_result_found) { + if (main->parameters[iki_write_parameter_help_e].result == f_console_result_found_e) { iki_write_print_help(main->output.to, main->context); iki_write_main_delete(main); @@ -140,7 +140,7 @@ extern "C" { return F_none; } - if (main->parameters[iki_write_parameter_version].result == f_console_result_found) { + if (main->parameters[iki_write_parameter_version_e].result == f_console_result_found_e) { fll_program_print_version(main->output.to, iki_write_program_version_s); iki_write_main_delete(main); @@ -155,9 +155,9 @@ extern "C" { file.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d; if (F_status_is_error_not(status)) { - if (main->parameters[iki_write_parameter_file].result == f_console_result_additional) { - if (main->parameters[iki_write_parameter_file].values.used > 1) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[iki_write_parameter_file_e].result == f_console_result_additional_e) { + if (main->parameters[iki_write_parameter_file_e].values.used > 1) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -170,7 +170,7 @@ extern "C" { status = F_status_set_error(F_parameter); } else { - const f_array_length_t location = main->parameters[iki_write_parameter_file].values.array[0]; + const f_array_length_t location = main->parameters[iki_write_parameter_file_e].values.array[0]; file.id = -1; file.stream = 0; @@ -178,12 +178,12 @@ extern "C" { status = f_file_stream_open(arguments->argv[location], 0, &file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], "open", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], "open", fll_error_file_type_file_e); } } } - else if (main->parameters[iki_write_parameter_file].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + else if (main->parameters[iki_write_parameter_file_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -197,8 +197,8 @@ extern "C" { } } - if (F_status_is_error_not(status) && main->parameters[iki_write_parameter_object].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (F_status_is_error_not(status) && main->parameters[iki_write_parameter_object_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -211,8 +211,8 @@ extern "C" { status = F_status_set_error(F_parameter); } - if (F_status_is_error_not(status) && main->parameters[iki_write_parameter_content].result == f_console_result_found) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (F_status_is_error_not(status) && main->parameters[iki_write_parameter_content_e].result == f_console_result_found_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -226,8 +226,8 @@ extern "C" { } if (F_status_is_error_not(status) && !main->process_pipe) { - if (main->parameters[iki_write_parameter_object].result != f_console_result_additional && main->parameters[iki_write_parameter_content].result != f_console_result_additional) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[iki_write_parameter_object_e].result != f_console_result_additional_e && main->parameters[iki_write_parameter_content_e].result != f_console_result_additional_e) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sNo main provided, either pipe the main or use the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -244,8 +244,8 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[iki_write_parameter_object].values.used != main->parameters[iki_write_parameter_content].values.used) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->parameters[iki_write_parameter_object_e].values.used != main->parameters[iki_write_parameter_content_e].values.used) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameters '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -264,14 +264,14 @@ extern "C" { uint8_t quote = f_iki_syntax_quote_double_s[0]; if (F_status_is_error_not(status)) { - if (main->parameters[iki_write_parameter_double].result == f_console_result_found) { - if (main->parameters[iki_write_parameter_single].result == f_console_result_found) { - if (main->parameters[iki_write_parameter_double].location < main->parameters[iki_write_parameter_single].location) { + if (main->parameters[iki_write_parameter_double_e].result == f_console_result_found_e) { + if (main->parameters[iki_write_parameter_single_e].result == f_console_result_found_e) { + if (main->parameters[iki_write_parameter_double_e].location < main->parameters[iki_write_parameter_single_e].location) { quote = f_iki_syntax_quote_single_s[0]; } } } - else if (main->parameters[iki_write_parameter_single].result == f_console_result_found) { + else if (main->parameters[iki_write_parameter_single_e].result == f_console_result_found_e) { quote = f_iki_syntax_quote_single_s[0]; } } @@ -312,14 +312,14 @@ extern "C" { status_pipe = f_file_read(pipe, &buffer); if (F_status_is_error(status_pipe)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read_to", F_true, "-", "read", fll_error_file_type_pipe); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read_to", F_true, "-", "read", fll_error_file_type_pipe_e); status = F_status_set_error(F_pipe); break; } if (!buffer.used) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[%sThe pipe has no main.%]%c", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context, f_string_eol_s[0]); } @@ -346,7 +346,7 @@ extern "C" { } if (object_ended && previous == range.start) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[%sThe pipe has incorrectly placed newlines.%]%c", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context, f_string_eol_s[0]); } @@ -403,7 +403,7 @@ extern "C" { } // for if (F_status_is_error_not(status) && object_ended) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { fll_print_format("%c%[%sThe pipe has an object without content.%]%c", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context, f_string_eol_s[0]); } @@ -420,7 +420,7 @@ extern "C" { f_string_static_t content = f_string_static_t_initialize; uint16_t signal_check = 0; - for (f_array_length_t i = 0; i < main->parameters[iki_write_parameter_object].values.used; ++i) { + for (f_array_length_t i = 0; i < main->parameters[iki_write_parameter_object_e].values.used; ++i) { if (!((++signal_check) % iki_write_signal_check_d)) { if (iki_write_signal_received(main)) { @@ -431,11 +431,11 @@ extern "C" { signal_check = 0; } - object.string = arguments->argv[main->parameters[iki_write_parameter_object].values.array[i]]; + object.string = arguments->argv[main->parameters[iki_write_parameter_object_e].values.array[i]]; object.used = strnlen(object.string, f_console_parameter_size); object.size = object.used; - content.string = arguments->argv[main->parameters[iki_write_parameter_content].values.array[i]]; + content.string = arguments->argv[main->parameters[iki_write_parameter_content_e].values.array[i]]; content.used = strnlen(content.string, f_console_parameter_size); content.size = content.used; @@ -446,7 +446,7 @@ extern "C" { } // for // ensure there is always a newline at the end, unless in quiet mode. - if (F_status_is_error_not(status) && main->error.verbosity != f_console_verbosity_quiet && main->parameters[iki_write_parameter_file].result == f_console_result_none) { + if (F_status_is_error_not(status) && main->error.verbosity != f_console_verbosity_quiet_e && main->parameters[iki_write_parameter_file_e].result == f_console_result_none_e) { fll_print_character(f_string_eol_s[0], file.stream); } } @@ -454,14 +454,14 @@ extern "C" { macro_f_string_dynamic_t_delete_simple(escaped); } - if (main->parameters[iki_write_parameter_file].result == f_console_result_additional) { + if (main->parameters[iki_write_parameter_file_e].result == f_console_result_additional_e) { if (file.id != -1) { f_file_stream_close(F_true, &file); } } // Ensure a newline is always put at the end of the program execution, unless in quiet mode. - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { if (F_status_is_error(status)) { if (F_status_set_fine(status) == F_interrupt) { fflush(main->output.to.stream); diff --git a/level_3/iki_write/c/iki_write.h b/level_3/iki_write/c/iki_write.h index 4b7dd65..14990ec 100644 --- a/level_3/iki_write/c/iki_write.h +++ b/level_3/iki_write/c/iki_write.h @@ -91,39 +91,39 @@ extern "C" { #define iki_write_long_single_s "single" enum { - iki_write_parameter_help, - iki_write_parameter_light, - iki_write_parameter_dark, - iki_write_parameter_no_color, - iki_write_parameter_verbosity_quiet, - iki_write_parameter_verbosity_normal, - iki_write_parameter_verbosity_verbose, - iki_write_parameter_verbosity_debug, - iki_write_parameter_version, - - iki_write_parameter_file, - iki_write_parameter_content, - iki_write_parameter_double, - iki_write_parameter_object, - iki_write_parameter_single, + iki_write_parameter_help_e, + iki_write_parameter_light_e, + iki_write_parameter_dark_e, + iki_write_parameter_no_color_e, + iki_write_parameter_verbosity_quiet_e, + iki_write_parameter_verbosity_normal_e, + iki_write_parameter_verbosity_verbose_e, + iki_write_parameter_verbosity_debug_e, + iki_write_parameter_version_e, + + iki_write_parameter_file_e, + iki_write_parameter_content_e, + iki_write_parameter_double_e, + iki_write_parameter_object_e, + iki_write_parameter_single_e, }; #define iki_write_console_parameter_t_initialize \ { \ - 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_s, iki_write_long_file_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_write_short_content_s, iki_write_long_content_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_write_short_double_s, iki_write_long_double_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_write_short_object_s, iki_write_long_object_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_write_short_single_s, iki_write_long_single_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse_e), \ + 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_e), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(iki_write_short_file_s, iki_write_long_file_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(iki_write_short_content_s, iki_write_long_content_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(iki_write_short_double_s, iki_write_long_double_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(iki_write_short_object_s, iki_write_long_object_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(iki_write_short_single_s, iki_write_long_single_s, 0, 0, f_console_type_normal_e), \ } #define iki_write_total_parameters_d 14 diff --git a/level_3/iki_write/c/private-common.c b/level_3/iki_write/c/private-common.c index 8083e83..efc9870 100644 --- a/level_3/iki_write/c/private-common.c +++ b/level_3/iki_write/c/private-common.c @@ -8,7 +8,7 @@ extern "C" { #ifndef _di_iki_write_print_signal_received_ void iki_write_print_signal_received(iki_write_main_t * const main, const f_status_t signal) { - if (main->warning.verbosity != f_console_verbosity_verbose) return; + if (main->warning.verbosity != f_console_verbosity_verbose_e) return; // Must flush and reset color because the interrupt may have interrupted the middle of a print function. fflush(main->warning.to.stream); diff --git a/level_3/iki_write/c/private-iki_write.c b/level_3/iki_write/c/private-iki_write.c index ac5b3b2..1fec4f2 100644 --- a/level_3/iki_write/c/private-iki_write.c +++ b/level_3/iki_write/c/private-iki_write.c @@ -10,7 +10,7 @@ extern "C" { f_status_t iki_write_process(iki_write_main_t * const main, const f_file_t output, const f_string_static_t object, const f_string_static_t content, const uint8_t quote, f_string_dynamic_t *escaped) { if (!object.used) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe object is missing, it must not have a length of %]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -26,7 +26,7 @@ extern "C" { f_status_t status = f_iki_object_is(object); if (status == F_false) { - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe object '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); diff --git a/level_3/status_code/c/private-common.c b/level_3/status_code/c/private-common.c index 55b9867..687dafc 100644 --- a/level_3/status_code/c/private-common.c +++ b/level_3/status_code/c/private-common.c @@ -8,7 +8,7 @@ extern "C" { #ifndef _di_status_code_print_signal_received_ void status_code_print_signal_received(status_code_main_t * const main, const f_status_t signal) { - if (main->warning.verbosity != f_console_verbosity_verbose) return; + if (main->warning.verbosity != f_console_verbosity_verbose_e) return; // Must flush and reset color because the interrupt may have interrupted the middle of a print function. fflush(main->warning.to.stream); diff --git a/level_3/status_code/c/private-status_code.c b/level_3/status_code/c/private-status_code.c index 3218f07..a4d98dc 100644 --- a/level_3/status_code/c/private-status_code.c +++ b/level_3/status_code/c/private-status_code.c @@ -16,32 +16,32 @@ extern "C" { return status; } - if (main->parameters[status_code_parameter_is_error].result == f_console_result_found) { + if (main->parameters[status_code_parameter_is_error_e].result == f_console_result_found_e) { if (F_status_is_error(number)) { - f_print_terminated(FL_status_string_true, main->output.to.stream); + f_print_terminated(f_status_true_s, main->output.to.stream); } else { - f_print_terminated(FL_status_string_false, main->output.to.stream); + f_print_terminated(f_status_false_s, main->output.to.stream); } f_print_character(f_string_eol_s[0], main->output.to.stream); } - else if (main->parameters[status_code_parameter_is_warning].result == f_console_result_found) { + else if (main->parameters[status_code_parameter_is_warning_e].result == f_console_result_found_e) { if (F_status_is_warning(number)) { - f_print_terminated(FL_status_string_true, main->output.to.stream); + f_print_terminated(f_status_true_s, main->output.to.stream); } else { - f_print_terminated(FL_status_string_false, main->output.to.stream); + f_print_terminated(f_status_false_s, main->output.to.stream); } f_print_character(f_string_eol_s[0], main->output.to.stream); } - else if (main->parameters[status_code_parameter_is_fine].result == f_console_result_found) { + else if (main->parameters[status_code_parameter_is_fine_e].result == f_console_result_found_e) { if (F_status_is_fine(number)) { - f_print_terminated(FL_status_string_true, main->output.to.stream); + f_print_terminated(f_status_true_s, main->output.to.stream); } else { - f_print_terminated(FL_status_string_false, main->output.to.stream); + f_print_terminated(f_status_false_s, main->output.to.stream); } f_print_character(f_string_eol_s[0], main->output.to.stream); @@ -78,7 +78,7 @@ extern "C" { f_status_t code = F_none; - status = fll_status_from_string(value, &code); + status = fll_status_string_from(value, &code); if (F_status_is_error(status)) { if (F_status_set_fine(status) == F_data) { @@ -116,7 +116,7 @@ extern "C" { const f_status_t code = (f_status_t) number; f_string_t string = 0; - status = fl_status_to_string(code, &string); + status = f_status_string_to(code, &string); if (F_status_is_error(status)) { if (F_status_set_fine(status) == F_data) { diff --git a/level_3/status_code/c/private-status_code.h b/level_3/status_code/c/private-status_code.h index 0209ca0..3aa76f2 100644 --- a/level_3/status_code/c/private-status_code.h +++ b/level_3/status_code/c/private-status_code.h @@ -50,10 +50,10 @@ extern "C" { * F_data_not if string is empty. * * Errors (with error bit) from: fl_console_parameter_to_number_unsigned(). - * Errors (with error bit) from: fll_fss_status_from_string(). + * Errors (with error bit) from: fll_fss_status_string_from(). * * @see fl_console_parameter_to_number_unsigned() - * @see fll_fss_status_from_string() + * @see fll_fss_status_string_from() */ #ifndef _di_status_code_process_number_ extern f_status_t status_code_process_number(status_code_main_t * const main, const f_string_t value) F_attribute_visibility_internal_d; @@ -76,10 +76,10 @@ extern "C" { * F_number_overflow (with error bit) on integer overflow. * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: fll_fss_status_from_string(). + * Errors (with error bit) from: fll_fss_status_string_from(). * Errors (with error bit) from: fss_status_code_convert_number(). * - * @see fll_fss_status_from_string() + * @see fll_fss_status_string_from() * @see fss_status_code_convert_number() */ #ifndef _di_status_code_process_normal_ diff --git a/level_3/status_code/c/status_code.c b/level_3/status_code/c/status_code.c index 58ba6ad..51080c3 100644 --- a/level_3/status_code/c/status_code.c +++ b/level_3/status_code/c/status_code.c @@ -47,7 +47,7 @@ extern "C" { const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, status_code_total_parameters_d); { - f_console_parameter_id_t ids[3] = { status_code_parameter_no_color, status_code_parameter_light, status_code_parameter_dark }; + f_console_parameter_id_t ids[3] = { status_code_parameter_no_color_e, status_code_parameter_light_e, status_code_parameter_dark_e }; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3); status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context); @@ -81,7 +81,7 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { status_code_parameter_verbosity_quiet, status_code_parameter_verbosity_normal, status_code_parameter_verbosity_verbose, status_code_parameter_verbosity_debug }; + f_console_parameter_id_t ids[4] = { status_code_parameter_verbosity_quiet_e, status_code_parameter_verbosity_normal_e, status_code_parameter_verbosity_verbose_e, status_code_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); @@ -92,32 +92,32 @@ extern "C" { return status; } - if (choice == status_code_parameter_verbosity_quiet) { - main->output.verbosity = f_console_verbosity_quiet; - main->error.verbosity = f_console_verbosity_quiet; - main->warning.verbosity = f_console_verbosity_quiet; + if (choice == status_code_parameter_verbosity_quiet_e) { + main->output.verbosity = f_console_verbosity_quiet_e; + main->error.verbosity = f_console_verbosity_quiet_e; + main->warning.verbosity = f_console_verbosity_quiet_e; } - else if (choice == status_code_parameter_verbosity_normal) { - main->output.verbosity = f_console_verbosity_normal; - main->error.verbosity = f_console_verbosity_normal; - main->warning.verbosity = f_console_verbosity_normal; + else if (choice == status_code_parameter_verbosity_normal_e) { + main->output.verbosity = f_console_verbosity_normal_e; + main->error.verbosity = f_console_verbosity_normal_e; + main->warning.verbosity = f_console_verbosity_normal_e; } - else if (choice == status_code_parameter_verbosity_verbose) { - main->output.verbosity = f_console_verbosity_verbose; - main->error.verbosity = f_console_verbosity_verbose; - main->warning.verbosity = f_console_verbosity_verbose; + else if (choice == status_code_parameter_verbosity_verbose_e) { + main->output.verbosity = f_console_verbosity_verbose_e; + main->error.verbosity = f_console_verbosity_verbose_e; + main->warning.verbosity = f_console_verbosity_verbose_e; } - else if (choice == status_code_parameter_verbosity_debug) { - main->output.verbosity = f_console_verbosity_debug; - main->error.verbosity = f_console_verbosity_debug; - main->warning.verbosity = f_console_verbosity_debug; + else if (choice == status_code_parameter_verbosity_debug_e) { + main->output.verbosity = f_console_verbosity_debug_e; + main->error.verbosity = f_console_verbosity_debug_e; + main->warning.verbosity = f_console_verbosity_debug_e; } } status = F_none; } - if (main->parameters[status_code_parameter_help].result == f_console_result_found) { + if (main->parameters[status_code_parameter_help_e].result == f_console_result_found_e) { status_code_print_help(main->output.to, main->context); status_code_main_delete(main); @@ -125,7 +125,7 @@ extern "C" { return F_none; } - if (main->parameters[status_code_parameter_version].result == f_console_result_found) { + if (main->parameters[status_code_parameter_version_e].result == f_console_result_found_e) { fll_program_print_version(main->output.to, status_code_progam_version_s); status_code_main_delete(main); @@ -133,8 +133,8 @@ extern "C" { return F_none; } - if (main->parameters[status_code_parameter_is_error].result == f_console_result_found) { - if (main->parameters[status_code_parameter_is_warning].result == f_console_result_found) { + if (main->parameters[status_code_parameter_is_error_e].result == f_console_result_found_e) { + if (main->parameters[status_code_parameter_is_warning_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -149,7 +149,7 @@ extern "C" { return F_status_set_error(status); } - else if (main->parameters[status_code_parameter_is_fine].result == f_console_result_found) { + else if (main->parameters[status_code_parameter_is_fine_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -165,7 +165,7 @@ extern "C" { return F_status_set_error(status); } } - else if (main->parameters[status_code_parameter_is_warning].result == f_console_result_found && main->parameters[status_code_parameter_is_fine].result == f_console_result_found) { + else if (main->parameters[status_code_parameter_is_warning_e].result == f_console_result_found_e && main->parameters[status_code_parameter_is_fine_e].result == f_console_result_found_e) { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); @@ -191,7 +191,7 @@ extern "C" { f_status_t status2 = F_none; - if (main->parameters[status_code_parameter_is_error].result == f_console_result_found || main->parameters[status_code_parameter_is_warning].result == f_console_result_found || main->parameters[status_code_parameter_is_fine].result == f_console_result_found) { + if (main->parameters[status_code_parameter_is_error_e].result == f_console_result_found_e || main->parameters[status_code_parameter_is_warning_e].result == f_console_result_found_e || main->parameters[status_code_parameter_is_fine_e].result == f_console_result_found_e) { if (main->process_pipe) { // @todo call status_code_process_check() here for all main from pipe that is space separated. } @@ -222,7 +222,7 @@ extern "C" { funlockfile(main->output.to.stream); } } - else if (main->parameters[status_code_parameter_number].result == f_console_result_found) { + else if (main->parameters[status_code_parameter_number_e].result == f_console_result_found_e) { if (main->process_pipe) { // @todo call status_code_process_number() here for all main from pipe that is space separated. } @@ -285,7 +285,7 @@ extern "C" { } } - if (main->error.verbosity != f_console_verbosity_quiet) { + if (main->error.verbosity != f_console_verbosity_quiet_e) { if (F_status_set_fine(status) == F_interrupt) { fflush(main->output.to.stream); diff --git a/level_3/status_code/c/status_code.h b/level_3/status_code/c/status_code.h index 2c249e5..2206048 100644 --- a/level_3/status_code/c/status_code.h +++ b/level_3/status_code/c/status_code.h @@ -27,19 +27,19 @@ #include #include #include +#include // fll-1 includes #include #include #include -#include #include // fll-2 includes #include #include #include -#include +#include #ifdef __cplusplus extern "C" { @@ -80,37 +80,37 @@ extern "C" { #define status_code_long_number_s "number" enum { - status_code_parameter_help, - status_code_parameter_light, - status_code_parameter_dark, - status_code_parameter_no_color, - status_code_parameter_verbosity_quiet, - status_code_parameter_verbosity_normal, - status_code_parameter_verbosity_verbose, - status_code_parameter_verbosity_debug, - status_code_parameter_version, - - status_code_parameter_is_fine, - status_code_parameter_is_warning, - status_code_parameter_is_error, - status_code_parameter_number, + status_code_parameter_help_e, + status_code_parameter_light_e, + status_code_parameter_dark_e, + status_code_parameter_no_color_e, + status_code_parameter_verbosity_quiet_e, + status_code_parameter_verbosity_normal_e, + status_code_parameter_verbosity_verbose_e, + status_code_parameter_verbosity_debug_e, + status_code_parameter_version_e, + + status_code_parameter_is_fine_e, + status_code_parameter_is_warning_e, + status_code_parameter_is_error_e, + status_code_parameter_number_e, }; #define status_code_console_parameter_t_initialize \ { \ - 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_s, status_code_long_is_fine_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(status_code_short_is_warning_s, status_code_long_is_warning_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(status_code_short_is_error_s, status_code_long_is_error_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(status_code_short_number_s, status_code_long_number_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse_e), \ + 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_e), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(status_code_short_is_fine_s, status_code_long_is_fine_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(status_code_short_is_warning_s, status_code_long_is_warning_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(status_code_short_is_error_s, status_code_long_is_error_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(status_code_short_number_s, status_code_long_number_s, 0, 0, f_console_type_normal_e), \ } #define status_code_total_parameters_d 13 diff --git a/level_3/status_code/data/build/dependencies b/level_3/status_code/data/build/dependencies index 6238cab..f0bdd30 100644 --- a/level_3/status_code/data/build/dependencies +++ b/level_3/status_code/data/build/dependencies @@ -12,12 +12,12 @@ f_file f_pipe f_print f_signal +f_status_string fl_console fl_conversion fl_print -fl_status fl_string fll_error fll_print fll_program -fll_status +fll_status_string diff --git a/level_3/status_code/data/build/settings b/level_3/status_code/data/build/settings index 88416f4..2804c93 100644 --- a/level_3/status_code/data/build/settings +++ b/level_3/status_code/data/build/settings @@ -21,7 +21,7 @@ build_indexer ar build_indexer_arguments rcs build_language c build_libraries -lc -build_libraries-individual -lfll_error -lfll_print -lfll_program -lfll_status -lfl_console -lfl_conversion -lfl_print -lfl_status -lfl_string -lf_color -lf_console -lf_conversion -lf_file -lf_memory -lf_path -lf_pipe -lf_print -lf_signal -lf_string -lf_type_array -lf_utf +build_libraries-individual -lfll_error -lfll_print -lfll_program -lfll_status_string -lfl_console -lfl_conversion -lfl_print -lfl_string -lf_color -lf_console -lf_conversion -lf_file -lf_memory -lf_path -lf_pipe -lf_print -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf build_libraries-level -lfll_2 -lfll_1 -lfll_0 build_libraries-monolithic -lfll build_libraries_shared diff --git a/level_3/utf8/c/private-common.h b/level_3/utf8/c/private-common.h index 37bf1e7..4e7dcf2 100644 --- a/level_3/utf8/c/private-common.h +++ b/level_3/utf8/c/private-common.h @@ -24,13 +24,13 @@ extern "C" { */ #ifndef _di_utf8_codepoint_modes_ enum { - utf8_codepoint_mode_ready = 1, - utf8_codepoint_mode_begin, - utf8_codepoint_mode_number, - utf8_codepoint_mode_end, - utf8_codepoint_mode_bad, - utf8_codepoint_mode_bad_begin, - utf8_codepoint_mode_bad_end, + utf8_codepoint_mode_ready_e = 1, + utf8_codepoint_mode_begin_e, + utf8_codepoint_mode_number_e, + utf8_codepoint_mode_end_e, + utf8_codepoint_mode_bad_e, + utf8_codepoint_mode_bad_begin_e, + utf8_codepoint_mode_bad_end_e, }; #endif // _di__utf8_codepoint_modes_ diff --git a/level_3/utf8/c/private-print.c b/level_3/utf8/c/private-print.c index e697d8c..2b6240f 100644 --- a/level_3/utf8/c/private-print.c +++ b/level_3/utf8/c/private-print.c @@ -16,8 +16,8 @@ extern "C" { #ifndef _di_utf8_print_character_invalid_ void utf8_print_character_invalid(utf8_data_t * const data, const f_string_static_t character) { - if (data->main->parameters[utf8_parameter_strip_invalid].result == f_console_result_found) return; - if (data->main->parameters[utf8_parameter_verify].result == f_console_result_found) return; + if (data->main->parameters[utf8_parameter_strip_invalid_e].result == f_console_result_found_e) return; + if (data->main->parameters[utf8_parameter_verify_e].result == f_console_result_found_e) return; if (!character.used) return; @@ -81,7 +81,7 @@ extern "C" { fl_print_format("%s%s%s", data->file.stream, data->prepend, utf8_string_combining_not_s, data->append); } } - else if (data->main->parameters[utf8_parameter_strip_invalid].result == f_console_result_none && data->main->parameters[utf8_parameter_verify].result == f_console_result_none) { + else if (data->main->parameters[utf8_parameter_strip_invalid_e].result == f_console_result_none_e && data->main->parameters[utf8_parameter_verify_e].result == f_console_result_none_e) { fl_print_format("%s%[%s%]%s", data->file.stream, data->prepend, data->valid_not, utf8_string_unknown_s, data->valid_not, data->append); } } @@ -94,9 +94,9 @@ extern "C" { #ifndef _di_utf8_print_error_decode_ void utf8_print_error_decode(utf8_data_t * const data, const f_status_t status, const f_string_static_t character) { - if (data->main->error.verbosity == f_console_verbosity_quiet) return; - if (data->main->parameters[utf8_parameter_strip_invalid].result == f_console_result_found) return; - if (data->main->parameters[utf8_parameter_verify].result == f_console_result_found) return; + if (data->main->error.verbosity == f_console_verbosity_quiet_e) return; + if (data->main->parameters[utf8_parameter_strip_invalid_e].result == f_console_result_found_e) return; + if (data->main->parameters[utf8_parameter_verify_e].result == f_console_result_found_e) return; fl_print_format("%c%[%SFailed to decode character code '%]", data->main->error.to.stream, f_string_eol_s[0], data->main->context.set.error, data->main->error.prefix, data->main->context.set.error); @@ -127,7 +127,7 @@ extern "C" { #ifndef _di_utf8_print_error_encode_ void utf8_print_error_encode(utf8_data_t * const data, const f_status_t status, const uint32_t codepoint) { - if (data->main->error.verbosity == f_console_verbosity_quiet) return; + if (data->main->error.verbosity == f_console_verbosity_quiet_e) return; fl_print_format("%c%[%SFailed to encode Unicode codepoint '%]", data->main->error.to.stream, f_string_eol_s[0], data->main->context.set.error, data->main->error.prefix, data->main->context.set.error); fl_print_format("%[U+%_U%]", data->main->error.to.stream, data->main->context.set.notable, codepoint, data->main->context.set.notable); @@ -146,7 +146,7 @@ extern "C" { #ifndef _di_utf8_print_error_no_from_ void utf8_print_error_no_from(utf8_data_t * const data) { - if (data->main->error.verbosity == f_console_verbosity_quiet) return; + if (data->main->error.verbosity == f_console_verbosity_quiet_e) return; fll_print_format("%c%[%sNo from sources are specified, please pipe data, designate a file, or add parameters.%]%c", data->main->error.to.stream, f_string_eol_s[0], data->main->error.context, data->main->error.prefix, data->main->error.context, f_string_eol_s[0]); } @@ -155,7 +155,7 @@ extern "C" { #ifndef _di_utf8_print_error_no_value_ void utf8_print_error_no_value(utf8_data_t * const data, const f_string_t parameter) { - if (data->main->error.verbosity == f_console_verbosity_quiet) return; + if (data->main->error.verbosity == f_console_verbosity_quiet_e) return; flockfile(data->main->error.to.stream); @@ -170,7 +170,7 @@ extern "C" { #ifndef _di_utf8_print_error_parameter_file_name_empty_ void utf8_print_error_parameter_file_name_empty(utf8_data_t * const data, const f_array_length_t index) { - if (data->main->error.verbosity == f_console_verbosity_quiet) return; + if (data->main->error.verbosity == f_console_verbosity_quiet_e) return; flockfile(data->main->error.to.stream); @@ -185,7 +185,7 @@ extern "C" { #ifndef _di_utf8_print_error_parameter_file_not_found_ void utf8_print_error_parameter_file_not_found(utf8_data_t * const data, const bool from, const f_string_t name) { - if (data->main->error.verbosity == f_console_verbosity_quiet) return; + if (data->main->error.verbosity == f_console_verbosity_quiet_e) return; flockfile(data->main->error.to.stream); @@ -200,7 +200,7 @@ extern "C" { #ifndef _di_utf8_print_error_parameter_file_to_too_many_ void utf8_print_error_parameter_file_to_too_many(utf8_data_t * const data) { - if (data->main->error.verbosity == f_console_verbosity_quiet) return; + if (data->main->error.verbosity == f_console_verbosity_quiet_e) return; fll_print_format("%c%[%SToo many %s files specified, there may only be one to file.%]%c", data->main->error.to.stream, f_string_eol_s[0], data->main->context.set.error, data->main->error.prefix, utf8_string_to_s, data->main->context.set.error, f_string_eol_s[0]); } @@ -209,8 +209,8 @@ extern "C" { #ifndef _di_utf8_print_section_header_file_ void utf8_print_section_header_file(utf8_data_t * const data, const f_string_t name) { - if (data->main->parameters[utf8_parameter_headers].result == f_console_result_none) return; - if (data->main->parameters[utf8_parameter_verify].result == f_console_result_found) return; + if (data->main->parameters[utf8_parameter_headers_e].result == f_console_result_none_e) return; + if (data->main->parameters[utf8_parameter_verify_e].result == f_console_result_found_e) return; flockfile(data->main->output.to.stream); @@ -230,8 +230,8 @@ extern "C" { #ifndef _di_utf8_print_section_header_parameter_ void utf8_print_section_header_parameter(utf8_data_t * const data, const f_array_length_t index) { - if (data->main->parameters[utf8_parameter_headers].result == f_console_result_none) return; - if (data->main->parameters[utf8_parameter_verify].result == f_console_result_found) return; + if (data->main->parameters[utf8_parameter_headers_e].result == f_console_result_none_e) return; + if (data->main->parameters[utf8_parameter_verify_e].result == f_console_result_found_e) return; flockfile(data->main->output.to.stream); @@ -245,8 +245,8 @@ extern "C" { #ifndef _di_utf8_print_section_header_pipe_ void utf8_print_section_header_pipe(utf8_data_t * const data) { - if (data->main->parameters[utf8_parameter_headers].result == f_console_result_none) return; - if (data->main->parameters[utf8_parameter_verify].result == f_console_result_found) return; + if (data->main->parameters[utf8_parameter_headers_e].result == f_console_result_none_e) return; + if (data->main->parameters[utf8_parameter_verify_e].result == f_console_result_found_e) return; fll_print_format("%c%[Pipe%]:%c", data->main->output.to.stream, f_string_eol_s[0], data->main->output.set->title, data->main->output.set->title, f_string_eol_s[0]); } @@ -255,7 +255,7 @@ extern "C" { #ifndef _di_utf8_print_signal_received_ void utf8_print_signal_received(utf8_data_t * const data, const f_status_t signal) { - if (data->main->warning.verbosity != f_console_verbosity_verbose) return; + if (data->main->warning.verbosity != f_console_verbosity_verbose_e) return; // Must flush and reset color because the interrupt may have interrupted the middle of a print function. fflush(data->main->warning.to.stream); @@ -297,7 +297,7 @@ extern "C" { } } - if (data->main->parameters[utf8_parameter_strip_invalid].result == f_console_result_none && data->main->parameters[utf8_parameter_verify].result == f_console_result_none) { + if (data->main->parameters[utf8_parameter_strip_invalid_e].result == f_console_result_none_e && data->main->parameters[utf8_parameter_verify_e].result == f_console_result_none_e) { fl_print_format("%s%[%s%]%s", data->file.stream, data->prepend, data->valid_not, utf8_string_unknown_s, data->valid_not, data->append); } } diff --git a/level_3/utf8/c/private-utf8.c b/level_3/utf8/c/private-utf8.c index 89e3c3f..713fb65 100644 --- a/level_3/utf8/c/private-utf8.c +++ b/level_3/utf8/c/private-utf8.c @@ -30,7 +30,7 @@ extern "C" { f_status_t status = F_none; bool valid = F_true; - uint8_t mode_codepoint = utf8_codepoint_mode_ready; + uint8_t mode_codepoint = utf8_codepoint_mode_ready_e; f_string_static_t current = macro_f_string_static_t_initialize(text, 0); @@ -77,12 +77,12 @@ extern "C" { } // for if (F_status_is_error_not(status) && !(data->mode & utf8_mode_from_binary_d)) { - if (mode_codepoint != utf8_codepoint_mode_ready && mode_codepoint != utf8_codepoint_mode_end && mode_codepoint != utf8_codepoint_mode_bad_end) { - if (mode_codepoint == utf8_codepoint_mode_number) { - mode_codepoint = utf8_codepoint_mode_end; + if (mode_codepoint != utf8_codepoint_mode_ready_e && mode_codepoint != utf8_codepoint_mode_end_e && mode_codepoint != utf8_codepoint_mode_bad_end_e) { + if (mode_codepoint == utf8_codepoint_mode_number_e) { + mode_codepoint = utf8_codepoint_mode_end_e; } else { - mode_codepoint = utf8_codepoint_mode_bad_end; + mode_codepoint = utf8_codepoint_mode_bad_end_e; valid = F_false; } @@ -98,10 +98,10 @@ extern "C" { return status; } - if (data->main->parameters[utf8_parameter_verify].result == f_console_result_none) { + if (data->main->parameters[utf8_parameter_verify_e].result == f_console_result_none_e) { // When headers are printed, they are printed with a newline so only print this newline when separate is used without headers being printed. - if (data->main->parameters[utf8_parameter_headers].result == f_console_result_none && data->main->parameters[utf8_parameter_separate].result == f_console_result_found) { + if (data->main->parameters[utf8_parameter_headers_e].result == f_console_result_none_e && data->main->parameters[utf8_parameter_separate_e].result == f_console_result_found_e) { f_print_terminated(f_string_eol_s, data->file.stream); } } diff --git a/level_3/utf8/c/private-utf8_binary.c b/level_3/utf8/c/private-utf8_binary.c index 8ef75fd..59c2eb7 100644 --- a/level_3/utf8/c/private-utf8_binary.c +++ b/level_3/utf8/c/private-utf8_binary.c @@ -40,7 +40,7 @@ extern "C" { return status; } } - else if (data->main->parameters[utf8_parameter_verify].result == f_console_result_none) { + else if (data->main->parameters[utf8_parameter_verify_e].result == f_console_result_none_e) { if (data->mode & utf8_mode_to_binary_d) { utf8_print_binary(data, character); } @@ -67,7 +67,7 @@ extern "C" { bool valid = F_true; bool next = F_true; - uint8_t mode_codepoint = utf8_codepoint_mode_ready; + uint8_t mode_codepoint = utf8_codepoint_mode_ready_e; uint16_t signal_check = 0; f_array_length_t i = 0; diff --git a/level_3/utf8/c/private-utf8_codepoint.c b/level_3/utf8/c/private-utf8_codepoint.c index 83b714f..b517c03 100644 --- a/level_3/utf8/c/private-utf8_codepoint.c +++ b/level_3/utf8/c/private-utf8_codepoint.c @@ -15,7 +15,7 @@ extern "C" { f_status_t status = F_none; bool valid_not = F_false; - if (*mode != utf8_codepoint_mode_end) { + if (*mode != utf8_codepoint_mode_end_e) { if (data->text.used + character.used >= data->text.size) { status = f_string_dynamic_increase_by(utf8_default_allocation_step_d, &data->text); if (F_status_is_error(status)) return status; @@ -26,11 +26,11 @@ extern "C" { } // for } - if (!(*mode == utf8_codepoint_mode_end || *mode == utf8_codepoint_mode_bad_end)) { + if (!(*mode == utf8_codepoint_mode_end_e || *mode == utf8_codepoint_mode_bad_end_e)) { return F_none; } - if (*mode == utf8_codepoint_mode_end) { + if (*mode == utf8_codepoint_mode_end_e) { uint32_t codepoint = 0; status = f_utf_unicode_string_to(data->text.string, data->text.used, &codepoint); @@ -51,7 +51,7 @@ extern "C" { return status; } } - else if (data->main->parameters[utf8_parameter_verify].result == f_console_result_none) { + else if (data->main->parameters[utf8_parameter_verify_e].result == f_console_result_none_e) { if (data->mode & utf8_mode_to_binary_d) { char byte[5] = { 0, 0, 0, 0, 0 }; f_string_static_t character = macro_f_string_static_t_initialize(byte, 5); @@ -82,7 +82,7 @@ extern "C" { utf8_print_character_invalid(data, character); } - *mode = utf8_codepoint_mode_ready; + *mode = utf8_codepoint_mode_ready_e; data->text.used = 0; if (valid_not || F_status_is_error(status)) { @@ -151,44 +151,44 @@ extern "C" { } if (status == F_valid_not) { - if (*mode != utf8_codepoint_mode_bad) { - if (*mode == utf8_codepoint_mode_bad_begin) { - *mode = utf8_codepoint_mode_bad; + if (*mode != utf8_codepoint_mode_bad_e) { + if (*mode == utf8_codepoint_mode_bad_begin_e) { + *mode = utf8_codepoint_mode_bad_e; } else { - *mode = utf8_codepoint_mode_bad_begin; + *mode = utf8_codepoint_mode_bad_begin_e; } } } else { - if (*mode == utf8_codepoint_mode_bad) { + if (*mode == utf8_codepoint_mode_bad_e) { if (status == F_space) { - *mode = utf8_codepoint_mode_bad_end; + *mode = utf8_codepoint_mode_bad_end_e; } } - else if (*mode == utf8_codepoint_mode_ready) { + else if (*mode == utf8_codepoint_mode_ready_e) { if (status == F_space) { status = F_next; } else if (character.string[0] == f_string_ascii_u_s[0] || character.string[0] == f_string_ascii_U_s[0]) { - *mode = utf8_codepoint_mode_begin; + *mode = utf8_codepoint_mode_begin_e; data->text.used = 0; } else { - *mode = utf8_codepoint_mode_bad; + *mode = utf8_codepoint_mode_bad_e; } } - else if (*mode == utf8_codepoint_mode_begin) { + else if (*mode == utf8_codepoint_mode_begin_e) { if (character.string[0] == f_string_ascii_plus_s[0]) { - *mode = utf8_codepoint_mode_number; + *mode = utf8_codepoint_mode_number_e; } else { - *mode = utf8_codepoint_mode_bad; + *mode = utf8_codepoint_mode_bad_e; } } - else if (*mode == utf8_codepoint_mode_number) { + else if (*mode == utf8_codepoint_mode_number_e) { if (status == F_space) { - *mode = utf8_codepoint_mode_end; + *mode = utf8_codepoint_mode_end_e; } } } @@ -203,7 +203,7 @@ extern "C" { f_status_t status = F_none; bool valid = F_true; bool next = F_true; - uint8_t mode_codepoint = utf8_codepoint_mode_ready; + uint8_t mode_codepoint = utf8_codepoint_mode_ready_e; uint16_t signal_check = 0; f_array_length_t i = 0; diff --git a/level_3/utf8/c/utf8.c b/level_3/utf8/c/utf8.c index d56607a..c6ef915 100644 --- a/level_3/utf8/c/utf8.c +++ b/level_3/utf8/c/utf8.c @@ -79,7 +79,7 @@ extern "C" { // Identify priority of color parameters. { - f_console_parameter_id_t ids[3] = { utf8_parameter_no_color, utf8_parameter_light, utf8_parameter_dark }; + f_console_parameter_id_t ids[3] = { utf8_parameter_no_color_e, utf8_parameter_light_e, utf8_parameter_dark_e }; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3); status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context); @@ -116,7 +116,7 @@ extern "C" { // Identify priority of verbosity related parameters. { - f_console_parameter_id_t ids[4] = { utf8_parameter_verbosity_quiet, utf8_parameter_verbosity_normal, utf8_parameter_verbosity_verbose, utf8_parameter_verbosity_debug }; + f_console_parameter_id_t ids[4] = { utf8_parameter_verbosity_quiet_e, utf8_parameter_verbosity_normal_e, utf8_parameter_verbosity_verbose_e, utf8_parameter_verbosity_debug_e }; f_console_parameter_id_t choice = 0; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); @@ -131,31 +131,31 @@ extern "C" { return status; } - if (choice == utf8_parameter_verbosity_quiet) { - main->output.verbosity = f_console_verbosity_quiet; - main->error.verbosity = f_console_verbosity_quiet; - main->warning.verbosity = f_console_verbosity_quiet; + if (choice == utf8_parameter_verbosity_quiet_e) { + main->output.verbosity = f_console_verbosity_quiet_e; + main->error.verbosity = f_console_verbosity_quiet_e; + main->warning.verbosity = f_console_verbosity_quiet_e; } - else if (choice == utf8_parameter_verbosity_normal) { - main->output.verbosity = f_console_verbosity_normal; - main->error.verbosity = f_console_verbosity_normal; - main->warning.verbosity = f_console_verbosity_normal; + else if (choice == utf8_parameter_verbosity_normal_e) { + main->output.verbosity = f_console_verbosity_normal_e; + main->error.verbosity = f_console_verbosity_normal_e; + main->warning.verbosity = f_console_verbosity_normal_e; } - else if (choice == utf8_parameter_verbosity_verbose) { - main->output.verbosity = f_console_verbosity_verbose; - main->error.verbosity = f_console_verbosity_verbose; - main->warning.verbosity = f_console_verbosity_verbose; + else if (choice == utf8_parameter_verbosity_verbose_e) { + main->output.verbosity = f_console_verbosity_verbose_e; + main->error.verbosity = f_console_verbosity_verbose_e; + main->warning.verbosity = f_console_verbosity_verbose_e; } - else if (choice == utf8_parameter_verbosity_debug) { - main->output.verbosity = f_console_verbosity_debug; - main->error.verbosity = f_console_verbosity_debug; - main->warning.verbosity = f_console_verbosity_debug; + else if (choice == utf8_parameter_verbosity_debug_e) { + main->output.verbosity = f_console_verbosity_debug_e; + main->error.verbosity = f_console_verbosity_debug_e; + main->warning.verbosity = f_console_verbosity_debug_e; } } // Identify and prioritize from mode parameters. { - f_console_parameter_id_t ids[2] = { utf8_parameter_from_binary, utf8_parameter_from_codepoint }; + f_console_parameter_id_t ids[2] = { utf8_parameter_from_binary_e, utf8_parameter_from_codepoint_e }; f_console_parameter_id_t choice = 0; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 2); @@ -170,14 +170,14 @@ extern "C" { return status; } - if (choice == utf8_parameter_from_binary) { + if (choice == utf8_parameter_from_binary_e) { if (data.mode & utf8_mode_from_codepoint_d) { data.mode -= utf8_mode_from_codepoint_d; } data.mode |= utf8_mode_from_binary_d; } - else if (choice == utf8_parameter_from_codepoint) { + else if (choice == utf8_parameter_from_codepoint_e) { if (data.mode & utf8_mode_from_binary_d) { data.mode -= utf8_mode_from_binary_d; } @@ -188,7 +188,7 @@ extern "C" { // Identify and prioritize to mode parameters. { - f_console_parameter_id_t ids[4] = { utf8_parameter_to_binary, utf8_parameter_to_codepoint, utf8_parameter_to_combining, utf8_parameter_to_width }; + f_console_parameter_id_t ids[4] = { utf8_parameter_to_binary_e, utf8_parameter_to_codepoint_e, utf8_parameter_to_combining_e, utf8_parameter_to_width_e }; f_console_parameter_id_t choice = 0; const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4); @@ -203,7 +203,7 @@ extern "C" { return status; } - if (choice == utf8_parameter_to_binary) { + if (choice == utf8_parameter_to_binary_e) { if (data.mode & utf8_mode_to_codepoint_d) { data.mode -= utf8_mode_to_codepoint_d; } @@ -218,7 +218,7 @@ extern "C" { data.mode |= utf8_mode_to_binary_d; } - else if (choice == utf8_parameter_to_codepoint) { + else if (choice == utf8_parameter_to_codepoint_e) { if (data.mode & utf8_mode_to_binary_d) { data.mode -= utf8_mode_to_binary_d; } @@ -233,7 +233,7 @@ extern "C" { data.mode |= utf8_mode_to_codepoint_d; } - else if (choice == utf8_parameter_to_combining) { + else if (choice == utf8_parameter_to_combining_e) { if (data.mode & utf8_mode_to_binary_d) { data.mode -= utf8_mode_to_binary_d; } @@ -243,13 +243,13 @@ extern "C" { } // --to_width may be specified with --to_combining. - if (main->parameters[utf8_parameter_to_width].result == f_console_result_found) { + if (main->parameters[utf8_parameter_to_width_e].result == f_console_result_found_e) { data.mode |= utf8_mode_to_width_d; } data.mode |= utf8_mode_to_combining_d; } - else if (choice == utf8_parameter_to_width) { + else if (choice == utf8_parameter_to_width_e) { if (data.mode & utf8_mode_to_binary_d) { data.mode -= utf8_mode_to_binary_d; } @@ -259,7 +259,7 @@ extern "C" { } // --to_width may be specified with --to_combining. - if (main->parameters[utf8_parameter_to_combining].result == f_console_result_found) { + if (main->parameters[utf8_parameter_to_combining_e].result == f_console_result_found_e) { data.mode |= utf8_mode_to_combining_d; } @@ -270,7 +270,7 @@ extern "C" { status = F_none; } - if (main->parameters[utf8_parameter_help].result == f_console_result_found) { + if (main->parameters[utf8_parameter_help_e].result == f_console_result_found_e) { utf8_print_help(main->output.to, main->context); utf8_data_delete(&data); @@ -279,7 +279,7 @@ extern "C" { return F_none; } - if (main->parameters[utf8_parameter_version].result == f_console_result_found) { + if (main->parameters[utf8_parameter_version_e].result == f_console_result_found_e) { fll_program_print_version(main->output.to, utf8_version_s); utf8_data_delete(&data); @@ -289,13 +289,13 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[utf8_parameter_from_file].result == f_console_result_additional) { + if (main->parameters[utf8_parameter_from_file_e].result == f_console_result_additional_e) { f_array_length_t i = 0; f_array_length_t index = 0; - for (; i < main->parameters[utf8_parameter_from_file].values.used; ++i) { + for (; i < main->parameters[utf8_parameter_from_file_e].values.used; ++i) { - index = main->parameters[utf8_parameter_from_file].values.array[i]; + index = main->parameters[utf8_parameter_from_file_e].values.array[i]; if (arguments->argv[index][0]) { if (!f_file_exists(arguments->argv[index])) { @@ -315,7 +315,7 @@ extern "C" { } } // for } - else if (main->parameters[utf8_parameter_from_file].result == f_console_result_found) { + else if (main->parameters[utf8_parameter_from_file_e].result == f_console_result_found_e) { utf8_print_error_no_value(&data, utf8_long_from_file_s); status = F_status_set_error(F_parameter); @@ -325,31 +325,31 @@ extern "C" { bool valid = F_true; if (F_status_is_error_not(status)) { - if (main->parameters[utf8_parameter_to_file].result == f_console_result_additional) { - if (main->parameters[utf8_parameter_to_file].values.used > 1) { + if (main->parameters[utf8_parameter_to_file_e].result == f_console_result_additional_e) { + if (main->parameters[utf8_parameter_to_file_e].values.used > 1) { utf8_print_error_parameter_file_to_too_many(&data); status = F_status_set_error(F_parameter); } else { - data.file_name.string = arguments->argv[main->parameters[utf8_parameter_to_file].values.array[0]]; + data.file_name.string = arguments->argv[main->parameters[utf8_parameter_to_file_e].values.array[0]]; data.file_name.used = strnlen(data.file_name.string, PATH_MAX); if (data.file_name.used) { status = f_file_stream_open(data.file_name.string, "a", &data.file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, data.file_name.string, "open", fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, data.file_name.string, "open", fll_error_file_type_file_e); } } else { - utf8_print_error_parameter_file_name_empty(&data, main->parameters[utf8_parameter_to_file].values.array[0]); + utf8_print_error_parameter_file_name_empty(&data, main->parameters[utf8_parameter_to_file_e].values.array[0]); status = F_status_set_error(F_parameter); } } } - else if (main->parameters[utf8_parameter_to_file].result == f_console_result_found) { + else if (main->parameters[utf8_parameter_to_file_e].result == f_console_result_found_e) { utf8_print_error_no_value(&data, utf8_long_to_file_s); status = F_status_set_error(F_parameter); @@ -360,14 +360,14 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters[utf8_parameter_from_file].result == f_console_result_none && !(main->process_pipe || main->remaining.used)) { + if (main->parameters[utf8_parameter_from_file_e].result == f_console_result_none_e && !(main->process_pipe || main->remaining.used)) { utf8_print_error_no_from(&data); status = F_status_set_error(F_parameter); } if (!(data.mode & utf8_mode_to_binary_d)) { - if (main->parameters[utf8_parameter_separate].result == f_console_result_found || main->parameters[utf8_parameter_headers].result == f_console_result_found) { + if (main->parameters[utf8_parameter_separate_e].result == f_console_result_found_e || main->parameters[utf8_parameter_headers_e].result == f_console_result_found_e) { data.prepend = " "; data.append = f_string_eol_s; } @@ -398,17 +398,17 @@ extern "C" { } if (F_status_is_error(status) && F_status_set_fine(status) != F_utf_fragment) { - fll_error_file_print(main->error, F_status_set_fine(status), data.mode & utf8_mode_from_binary_d ? "utf8_process_file_binary" : "utf8_process_file_codepoint", F_true, 0, utf8_string_process_s, fll_error_file_type_pipe); + fll_error_file_print(main->error, F_status_set_fine(status), data.mode & utf8_mode_from_binary_d ? "utf8_process_file_binary" : "utf8_process_file_codepoint", F_true, 0, utf8_string_process_s, fll_error_file_type_pipe_e); } } - if (F_status_is_error_not(status) && status != F_signal && main->parameters[utf8_parameter_from_file].result == f_console_result_additional) { + if (F_status_is_error_not(status) && status != F_signal && main->parameters[utf8_parameter_from_file_e].result == f_console_result_additional_e) { f_array_length_t i = 0; f_array_length_t index = 0; f_file_t file = macro_f_file_t_initialize(0, -1, F_file_flag_read_only_d, 32768, F_file_default_write_size_d); - for (uint16_t signal_check = 0; i < main->parameters[utf8_parameter_from_file].values.used && status != F_signal; ++i) { + for (uint16_t signal_check = 0; i < main->parameters[utf8_parameter_from_file_e].values.used && status != F_signal; ++i) { if (!((++signal_check) % utf8_signal_check_d)) { if (utf8_signal_received(&data)) { @@ -419,14 +419,14 @@ extern "C" { signal_check = 0; } - index = main->parameters[utf8_parameter_from_file].values.array[i]; + index = main->parameters[utf8_parameter_from_file_e].values.array[i]; utf8_print_section_header_file(&data, arguments->argv[index]); status = f_file_stream_open(arguments->argv[index], 0, &file); if (F_status_is_error(status)) { - fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[index], utf8_string_open_s, fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[index], utf8_string_open_s, fll_error_file_type_file_e); break; } @@ -440,14 +440,14 @@ extern "C" { f_file_stream_close(F_true, &file); - if (main->parameters[utf8_parameter_verify].result == f_console_result_found) { + if (main->parameters[utf8_parameter_verify_e].result == f_console_result_found_e) { if (status == F_false) { valid = F_false; } } if (F_status_is_error(status) && F_status_set_fine(status) != F_utf_fragment) { - fll_error_file_print(main->error, F_status_set_fine(status), data.mode & utf8_mode_from_binary_d ? "utf8_process_file_binary" : "utf8_process_file_codepoint", F_true, arguments->argv[index], utf8_string_process_s, fll_error_file_type_file); + fll_error_file_print(main->error, F_status_set_fine(status), data.mode & utf8_mode_from_binary_d ? "utf8_process_file_binary" : "utf8_process_file_codepoint", F_true, arguments->argv[index], utf8_string_process_s, fll_error_file_type_file_e); break; } @@ -475,7 +475,7 @@ extern "C" { status = utf8_process_text(&data, arguments->argv[index]); - if (main->parameters[utf8_parameter_verify].result == f_console_result_found) { + if (main->parameters[utf8_parameter_verify_e].result == f_console_result_found_e) { if (status == F_false) { valid = F_false; } @@ -484,7 +484,7 @@ extern "C" { } } - if (main->output.verbosity != f_console_verbosity_quiet && main->parameters[utf8_parameter_verify].result == f_console_result_none) { + if (main->output.verbosity != f_console_verbosity_quiet_e && main->parameters[utf8_parameter_verify_e].result == f_console_result_none_e) { if (status == F_signal) { fflush(data.file.stream); diff --git a/level_3/utf8/c/utf8.h b/level_3/utf8/c/utf8.h index 24cc0d1..c7f0625 100644 --- a/level_3/utf8/c/utf8.h +++ b/level_3/utf8/c/utf8.h @@ -156,56 +156,56 @@ extern "C" { #define utf8_long_to_width_s "to_width" enum { - utf8_parameter_help, - utf8_parameter_light, - utf8_parameter_dark, - utf8_parameter_no_color, - utf8_parameter_verbosity_quiet, - utf8_parameter_verbosity_normal, - utf8_parameter_verbosity_verbose, - utf8_parameter_verbosity_debug, - utf8_parameter_version, - - utf8_parameter_from_binary, - utf8_parameter_from_codepoint, - utf8_parameter_from_file, - - utf8_parameter_headers, - utf8_parameter_separate, - utf8_parameter_strip_invalid, - - utf8_parameter_to_binary, - utf8_parameter_to_codepoint, - utf8_parameter_to_combining, - utf8_parameter_to_file, - utf8_parameter_to_width, - - utf8_parameter_verify, + utf8_parameter_help_e, + utf8_parameter_light_e, + utf8_parameter_dark_e, + utf8_parameter_no_color_e, + utf8_parameter_verbosity_quiet_e, + utf8_parameter_verbosity_normal_e, + utf8_parameter_verbosity_verbose_e, + utf8_parameter_verbosity_debug_e, + utf8_parameter_version_e, + + utf8_parameter_from_binary_e, + utf8_parameter_from_codepoint_e, + utf8_parameter_from_file_e, + + utf8_parameter_headers_e, + utf8_parameter_separate_e, + utf8_parameter_strip_invalid_e, + + utf8_parameter_to_binary_e, + utf8_parameter_to_codepoint_e, + utf8_parameter_to_combining_e, + utf8_parameter_to_file_e, + utf8_parameter_to_width_e, + + utf8_parameter_verify_e, }; #define utf8_console_parameter_t_initialize \ { \ - 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(utf8_short_from_binary_s, utf8_long_from_binary_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(utf8_short_from_codepoint_s, utf8_long_from_codepoint_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(utf8_short_from_file_s, utf8_long_from_file_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(utf8_short_headers_s, utf8_long_headers_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(utf8_short_separate_s, utf8_long_headers_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(utf8_short_strip_invalid_s, utf8_long_strip_invalid_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(utf8_short_to_binary_s, utf8_long_to_binary_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(utf8_short_to_codepoint_s, utf8_long_to_codepoint_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(utf8_short_to_combining_s, utf8_long_to_combining_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(utf8_short_to_file_s, utf8_long_to_file_s, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(utf8_short_to_width_s, utf8_long_to_width_s, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(utf8_short_verify_s, utf8_long_verify_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, 0, f_console_type_inverse_e), \ + 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_e), \ + f_console_parameter_t_initialize(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse_e), \ + f_console_parameter_t_initialize(utf8_short_from_binary_s, utf8_long_from_binary_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(utf8_short_from_codepoint_s, utf8_long_from_codepoint_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(utf8_short_from_file_s, utf8_long_from_file_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(utf8_short_headers_s, utf8_long_headers_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(utf8_short_separate_s, utf8_long_headers_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(utf8_short_strip_invalid_s, utf8_long_strip_invalid_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(utf8_short_to_binary_s, utf8_long_to_binary_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(utf8_short_to_codepoint_s, utf8_long_to_codepoint_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(utf8_short_to_combining_s, utf8_long_to_combining_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(utf8_short_to_file_s, utf8_long_to_file_s, 0, 1, f_console_type_normal_e), \ + f_console_parameter_t_initialize(utf8_short_to_width_s, utf8_long_to_width_s, 0, 0, f_console_type_normal_e), \ + f_console_parameter_t_initialize(utf8_short_verify_s, utf8_long_verify_s, 0, 0, f_console_type_normal_e), \ } #define utf8_total_parameters_d 21 diff --git a/specifications/fss-000B.txt b/specifications/fss-000B.txt index aca97cb..f048621 100644 --- a/specifications/fss-000B.txt +++ b/specifications/fss-000B.txt @@ -1,4 +1,6 @@ # fss-0002 -Featureless Settings Specification: 000C - Simple List: +Featureless Settings Specification: 000B - Simple List: This might be similar to fss-0008 - Embedded List, except it is an fss-0003 Extended List with a (non-recursive) fss-0002 Basic List inside the Content. + + TODO: further document this.