From d48bad79ff188510754c7acf834959086b7d24f2 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sat, 19 Nov 2022 17:20:21 -0600 Subject: [PATCH] Update: Change the console structure to use bits and prepare console for future changes. Fix bug whee the level_0 console public functions do not directly call each other and should instead call private functions. Change the console types to f_console_flag_t and f_console_result_t. Rather than using the full integer value instead use bits for both the flags and the results. Rename "enable" to "normal". Rename "disable" to "inverse". Rename "other" and "additional" to "simple". Add "complex" for planned future use. All equivalence checks are changed to bitwise checks. --- build/level_0/settings | 4 +- build/monolithic/settings | 4 +- build/stand_alone/fake.settings | 2 +- build/stand_alone/utf8.settings | 2 +- level_0/f_console/c/console.c | 121 +++--------- level_0/f_console/c/console.h | 4 +- level_0/f_console/c/console/common.c | 8 +- level_0/f_console/c/console/common.h | 212 +++++++++++---------- level_0/f_console/c/private-console.c | 64 +++++++ level_0/f_console/c/private-console.h | 44 +++++ level_0/f_console/data/build/settings | 4 +- level_2/fll_program/c/program/print.c | 24 +-- level_2/fll_program/c/program/print.h | 38 ++-- level_3/byte_dump/c/byte_dump.c | 34 ++-- level_3/byte_dump/c/common.c | 10 +- level_3/byte_dump/c/common.h | 56 +++--- level_3/byte_dump/c/print.c | 40 ++-- level_3/byte_dump/c/private-byte_dump.c | 52 ++--- level_3/control/c/common.c | 10 +- level_3/control/c/common.h | 32 ++-- level_3/control/c/control.c | 8 +- level_3/control/c/print.c | 16 +- level_3/control/c/private-control.c | 12 +- level_3/control/c/private-print.c | 4 +- level_3/controller/c/common.c | 10 +- level_3/controller/c/common.h | 44 ++--- level_3/controller/c/controller.c | 30 +-- .../controller/c/controller/private-controller.c | 4 +- level_3/controller/c/entry/private-entry.c | 52 +++-- level_3/controller/c/entry/private-entry_print.c | 2 +- level_3/controller/c/print.c | 28 +-- level_3/controller/c/rule/private-rule.c | 54 +++--- level_3/controller/c/rule/private-rule_print.c | 18 +- level_3/controller/c/thread/private-thread.c | 8 +- level_3/controller/c/thread/private-thread_entry.c | 4 +- level_3/fake/c/common.c | 10 +- level_3/fake/c/common.h | 62 +++--- level_3/fake/c/fake.c | 4 +- level_3/fake/c/print.c | 36 ++-- level_3/fake/c/private-build-load.c | 26 +-- level_3/fake/c/private-build.c | 36 ++-- level_3/fake/c/private-fake.c | 44 ++--- level_3/fake/c/private-make-load_parameters.c | 80 ++++---- level_3/fake/c/private-make-operate_process_type.c | 22 +-- level_3/fake/c/private-print.c | 4 +- level_3/firewall/c/common.c | 10 +- level_3/firewall/c/common.h | 34 ++-- level_3/firewall/c/firewall.c | 14 +- level_3/fss_basic_list_read/c/common.c | 10 +- level_3/fss_basic_list_read/c/common.h | 52 ++--- .../fss_basic_list_read/c/fss_basic_list_read.c | 32 ++-- level_3/fss_basic_list_read/c/print.c | 76 ++++---- level_3/fss_basic_list_read/c/private-print.c | 8 +- level_3/fss_basic_list_read/c/private-read.c | 40 ++-- level_3/fss_basic_list_write/c/common.c | 10 +- level_3/fss_basic_list_write/c/common.h | 42 ++-- .../fss_basic_list_write/c/fss_basic_list_write.c | 74 +++---- level_3/fss_basic_list_write/c/print.c | 24 +-- level_3/fss_basic_list_write/c/private-write.c | 10 +- level_3/fss_basic_read/c/common.c | 10 +- level_3/fss_basic_read/c/common.h | 52 ++--- level_3/fss_basic_read/c/fss_basic_read.c | 32 ++-- level_3/fss_basic_read/c/print.c | 76 ++++---- level_3/fss_basic_read/c/private-print.c | 4 +- level_3/fss_basic_read/c/private-read.c | 40 ++-- level_3/fss_basic_write/c/common.c | 10 +- level_3/fss_basic_write/c/common.h | 42 ++-- level_3/fss_basic_write/c/fss_basic_write.c | 74 +++---- level_3/fss_basic_write/c/print.c | 22 +-- level_3/fss_basic_write/c/private-write.c | 8 +- level_3/fss_embedded_list_read/c/common.c | 10 +- level_3/fss_embedded_list_read/c/common.h | 52 ++--- .../c/fss_embedded_list_read.c | 56 +++--- level_3/fss_embedded_list_read/c/print.c | 76 ++++---- level_3/fss_embedded_list_read/c/private-print.c | 10 +- level_3/fss_embedded_list_read/c/private-read.c | 38 ++-- level_3/fss_embedded_list_write/c/common.c | 10 +- level_3/fss_embedded_list_write/c/common.h | 42 ++-- .../c/fss_embedded_list_write.c | 74 +++---- level_3/fss_embedded_list_write/c/print.c | 28 +-- level_3/fss_embedded_list_write/c/private-write.c | 10 +- level_3/fss_extended_list_read/c/common.c | 10 +- level_3/fss_extended_list_read/c/common.h | 52 ++--- .../c/fss_extended_list_read.c | 32 ++-- level_3/fss_extended_list_read/c/print.c | 76 ++++---- level_3/fss_extended_list_read/c/private-print.c | 6 +- level_3/fss_extended_list_read/c/private-read.c | 40 ++-- level_3/fss_extended_list_write/c/common.c | 10 +- level_3/fss_extended_list_write/c/common.h | 42 ++-- .../c/fss_extended_list_write.c | 74 +++---- level_3/fss_extended_list_write/c/print.c | 28 +-- level_3/fss_extended_list_write/c/private-write.c | 10 +- level_3/fss_extended_read/c/common.c | 10 +- level_3/fss_extended_read/c/common.h | 50 ++--- level_3/fss_extended_read/c/fss_extended_read.c | 32 ++-- level_3/fss_extended_read/c/print.c | 76 ++++---- level_3/fss_extended_read/c/private-print.c | 6 +- level_3/fss_extended_read/c/private-read.c | 38 ++-- level_3/fss_extended_write/c/common.c | 10 +- level_3/fss_extended_write/c/common.h | 42 ++-- level_3/fss_extended_write/c/fss_extended_write.c | 78 ++++---- level_3/fss_extended_write/c/print.c | 22 +-- level_3/fss_extended_write/c/private-write.c | 8 +- level_3/fss_identify/c/common.c | 10 +- level_3/fss_identify/c/common.h | 34 ++-- level_3/fss_identify/c/fss_identify.c | 34 ++-- level_3/fss_identify/c/print.c | 22 +-- level_3/fss_identify/c/private-identify.c | 6 +- level_3/fss_identify/c/private-print.c | 6 +- level_3/fss_payload_read/c/common.c | 10 +- level_3/fss_payload_read/c/common.h | 52 ++--- level_3/fss_payload_read/c/fss_payload_read.c | 32 ++-- level_3/fss_payload_read/c/print.c | 80 ++++---- level_3/fss_payload_read/c/private-print.c | 14 +- level_3/fss_payload_read/c/private-read.c | 42 ++-- level_3/fss_payload_write/c/common.c | 68 +++---- level_3/fss_payload_write/c/common.h | 42 ++-- level_3/fss_payload_write/c/print.c | 30 +-- level_3/fss_payload_write/c/private-write.c | 2 +- level_3/iki_read/c/common.c | 74 +++---- level_3/iki_read/c/common.h | 48 ++--- level_3/iki_read/c/print.c | 50 ++--- level_3/iki_read/c/private-read.c | 4 +- level_3/iki_write/c/common.c | 34 ++-- level_3/iki_write/c/common.h | 34 ++-- level_3/iki_write/c/print.c | 34 ++-- level_3/status_code/c/common.c | 20 +- level_3/status_code/c/common.h | 32 ++-- level_3/status_code/c/print.c | 14 +- level_3/utf8/c/common.c | 34 ++-- level_3/utf8/c/common.h | 48 ++--- level_3/utf8/c/print.c | 30 +-- 132 files changed, 2168 insertions(+), 2119 deletions(-) create mode 100644 level_0/f_console/c/private-console.c create mode 100644 level_0/f_console/c/private-console.h diff --git a/build/level_0/settings b/build/level_0/settings index dc5c86e..1e00ef1 100644 --- a/build/level_0/settings +++ b/build/level_0/settings @@ -22,7 +22,7 @@ build_libraries -lc -lcap build_sources_library account.c private-account.c account/accounts.c account/private-accounts.c build_sources_library capability.c build_sources_library color.c private-color.c color/common.c -build_sources_library console.c console/common.c +build_sources_library console.c console/common.c private-console.c build_sources_library control_group.c control_group/common.c build_sources_library conversion.c private-conversion.c conversion/common.c build_sources_library directory.c directory/common.c private-directory.c @@ -53,7 +53,7 @@ build_sources_library-level thread.c private-thread.c thread/attribute.c thread/ build_sources_headers account.h account/accounts.h account/common.h build_sources_headers capability.h capability/common.h build_sources_headers color.h color/common.h -build_sources_headers console.h console/common.h +build_sources_headers console.h console/common.h private-console.h build_sources_headers control_group.h control_group/common.h build_sources_headers conversion.h conversion/common.h build_sources_headers directory.h directory/common.h directory/type.h diff --git a/build/monolithic/settings b/build/monolithic/settings index 42d231b..533dc9e 100644 --- a/build/monolithic/settings +++ b/build/monolithic/settings @@ -22,7 +22,7 @@ build_libraries -lc -lcap build_sources_library level_0/account.c level_0/private-account.c level_0/account/accounts.c level_0/account/private-accounts.c build_sources_library level_0/capability.c build_sources_library level_0/color.c level_0/private-color.c level_0/color/common.c -build_sources_library level_0/console.c level_0/console/common.c +build_sources_library level_0/console.c level_0/console/common.c level_0/private-console.c build_sources_library level_0/control_group.c level_0/control_group/common.c build_sources_library level_0/conversion.c level_0/private-conversion.c level_0/conversion/common.c build_sources_library level_0/directory.c level_0/directory/common.c level_0/private-directory.c @@ -77,7 +77,7 @@ build_sources_library-monolithic level_0/thread.c level_0/private-thread.c level build_sources_headers level_0/account.h level_0/account/accounts.h level_0/account/common.h build_sources_headers level_0/capability.h level_0/capability/common.h build_sources_headers level_0/color.h level_0/color/common.h -build_sources_headers level_0/console.h level_0/console/common.h +build_sources_headers level_0/console.h level_0/console/common.h level_0/private-console.h build_sources_headers level_0/control_group.h level_0/control_group/common.h build_sources_headers level_0/conversion.h level_0/conversion/common.h build_sources_headers level_0/directory.h level_0/directory/common.h level_0/directory/type.h diff --git a/build/stand_alone/fake.settings b/build/stand_alone/fake.settings index d75728d..fec6239 100644 --- a/build/stand_alone/fake.settings +++ b/build/stand_alone/fake.settings @@ -26,7 +26,7 @@ build_libraries -lc -lcap build_sources_program fll/level_0/account.c fll/level_0/private-account.c fll/level_0/account/accounts.c fll/level_0/account/private-accounts.c build_sources_program fll/level_0/capability.c build_sources_program fll/level_0/color.c fll/level_0/private-color.c fll/level_0/color/common.c -build_sources_program fll/level_0/console.c fll/level_0/console/common.c +build_sources_program fll/level_0/console.c fll/level_0/console/common.c fll/level_0/private-console.c build_sources_program fll/level_0/control_group.c fll/level_0/control_group/common.c build_sources_program fll/level_0/conversion.c fll/level_0/private-conversion.c fll/level_0/conversion/common.c build_sources_program fll/level_0/directory.c fll/level_0/directory/common.c fll/level_0/private-directory.c diff --git a/build/stand_alone/utf8.settings b/build/stand_alone/utf8.settings index 7f7a6f6..01a2f5f 100644 --- a/build/stand_alone/utf8.settings +++ b/build/stand_alone/utf8.settings @@ -24,7 +24,7 @@ build_language c build_libraries -lc -lcap build_sources_program fll/level_0/color.c fll/level_0/private-color.c fll/level_0/color/common.c -build_sources_program fll/level_0/console.c fll/level_0/console/common.c +build_sources_program fll/level_0/console.c fll/level_0/console/common.c fll/level_0/private-console.c build_sources_program fll/level_0/conversion.c fll/level_0/private-conversion.c fll/level_0/conversion/common.c build_sources_program fll/level_0/file.c fll/level_0/private-file.c fll/level_0/file/common.c fll/level_0/file/stream.c build_sources_program fll/level_0/memory.c fll/level_0/private-memory.c fll/level_0/memory/structure.c diff --git a/level_0/f_console/c/console.c b/level_0/f_console/c/console.c index 1c405dc..a78a46b 100644 --- a/level_0/f_console/c/console.c +++ b/level_0/f_console/c/console.c @@ -1,4 +1,5 @@ #include "console.h" +#include "private-console.h" #ifdef __cplusplus extern "C" { @@ -60,52 +61,12 @@ extern "C" { #endif // _di_f_console_environment_process_ #ifndef _di_f_console_identify_ - f_status_t f_console_identify(const f_string_t input, f_console_id_t * const result) { + f_status_t f_console_identify(const f_string_t input, f_console_result_t * const result) { #ifndef _di_level_0_parameter_checking_ if (!result) return F_status_set_error(F_parameter); - #endif // _di_level_0_parameter_checking_f - - if (!input) { - *result = f_console_none_e; - - return F_data_not; - } - - const f_array_length_t length = strnlen(input, 3); - - if (!length) { - *result = f_console_none_e; - - return F_data_not; - } - - if (input[0] == f_console_symbol_short_enable_s.string[0]) { - if (length > 1) { - if (input[1] == f_console_symbol_short_enable_s.string[0]) { - if (length > 2) { - *result = f_console_long_enable_e; - } - else *result = f_console_empty_long_enable_e; - } - else *result = f_console_short_enable_e; - } - else *result = f_console_empty_short_enable_e; - } - else if (input[0] == f_console_symbol_short_disable_s.string[0]) { - if (length > 1) { - if (input[1] == f_console_symbol_short_disable_s.string[0]) { - if (length > 2) { - *result = f_console_long_disable_e; - } - else *result = f_console_empty_long_disable_e; - } - else *result = f_console_short_disable_e; - } - else *result = f_console_empty_short_disable_e; - } - else *result = f_console_none_e; + #endif // _di_level_0_parameter_checking_ - return F_none; + return private_f_console_identify(input, result); } #endif // _di_f_console_identify_ @@ -126,7 +87,7 @@ extern "C" { if (choices.array[i] > parameters.used) return F_status_set_error(F_parameter); - if (parameters.array[choices.array[i]].result == f_console_result_found_e) { + if (parameters.array[choices.array[i]].result & f_console_result_found_e) { if (!location || parameters.array[choices.array[i]].location < location) { location = parameters.array[choices.array[i]].location; location_sub = parameters.array[choices.array[i]].location_sub; @@ -165,7 +126,7 @@ extern "C" { if (choices.array[i] > parameters.used) return F_status_set_error(F_parameter); - if (parameters.array[choices.array[i]].result == f_console_result_found_e) { + if (parameters.array[choices.array[i]].result & f_console_result_found_e) { if (!location || parameters.array[choices.array[i]].location > location) { location = parameters.array[choices.array[i]].location; location_sub = parameters.array[choices.array[i]].location_sub; @@ -205,7 +166,7 @@ extern "C" { parameters->arguments.array[parameters->arguments.used].used = strnlen(arguments.argv[0], F_console_parameter_size_d); parameters->arguments.array[parameters->arguments.used++].size = 0; - f_console_id_t result = 0; + f_console_result_t result = 0; bool found = F_false; // Parameter 0 represents the program name so skip it. @@ -213,14 +174,8 @@ extern "C" { f_array_length_t sub_location = 0; f_array_length_t increment_by = 0; - f_array_length_t i = 0; f_array_length_t values = 0; - - 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; uint8_t width = 0; @@ -232,13 +187,13 @@ extern "C" { parameters->arguments.array[parameters->arguments.used++].size = 0; // Additional parameters must always follow what requests them. - if (needs_value.used > 0) { + if (needs_value.used) { i = needs_value.array[0]; status = f_array_lengths_increase(F_memory_default_allocation_small_d, ¶meters->array[i].values); if (F_status_is_error(status)) break; - parameters->array[i].result = f_console_result_additional_e; + parameters->array[i].result |= f_console_result_value_e; parameters->array[i].values.array[parameters->array[i].values.used++] = location; --needs_value.used; @@ -256,11 +211,11 @@ extern "C" { f_console_identify(arguments.argv[location], &result); // Process the current parameter. - if (result == f_console_short_enable_e || result == f_console_short_disable_e) { + if (result & f_console_result_short_e) { increment_by = 1; sub_location = 1; } - else if (result == f_console_long_enable_e || result == f_console_long_disable_e) { + else if (result & f_console_result_long_e) { increment_by = parameters->arguments.array[location].used; sub_location = 2; } @@ -269,44 +224,29 @@ extern "C" { sub_location = 0; } - // Handle the normal commands. - 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_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_e; - } - found = F_false; - if (console_short != f_console_none_e) { + if (result & (f_console_result_short_e | f_console_result_long_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). + // The sub_location is used on a per increment basis. while (sub_location < parameters->arguments.array[location].used) { for (i = 0; i < parameters->used; ++i) { - if (parameters->array[i].type != console_type) continue; + if (parameters->array[i].flag & f_console_flag_disable_e) continue; + if ((result & f_console_result_normal_e) && !(parameters->array[i].flag & f_console_flag_normal_e)) continue; + if ((result & f_console_result_inverse_e) && !(parameters->array[i].flag & f_console_flag_inverse_e)) continue; - if (result == console_short) { + // For sublocation processing of 'tar -xcf', the '-' would have an increment of 1, therefore x, c, and f would all be three separate parameters) + if (result & f_console_result_short_e) { if (!parameters->array[i].symbol_short) continue; width = macro_f_utf_byte_width_is(arguments.argv[location][sub_location]); - - if (width > 0) { - increment_by = width; - } + if (width) increment_by = width; if (arguments.argv[location][sub_location] != *parameters->array[i].symbol_short) continue; - if (width > 0) { + if (width) { f_utf_char_t character_argument_utf = 0; f_utf_char_t character_console_utf = 0; @@ -323,12 +263,9 @@ extern "C" { if (character_argument_utf != character_console_utf) continue; } } - else if (result == console_long) { + else if (result & f_console_result_long_e) { if (!parameters->array[i].symbol_long) continue; - - if (strncmp(&arguments.argv[location][sub_location], parameters->array[i].symbol_long, increment_by + 1) != 0) { - continue; - } + if (strncmp(&arguments.argv[location][sub_location], parameters->array[i].symbol_long, increment_by + 1)) continue; } else { continue; @@ -344,11 +281,11 @@ extern "C" { parameters->array[i].locations.array[parameters->array[i].locations.used++] = location; - parameters->array[i].result = f_console_result_found_e; + parameters->array[i].result = result | (parameters->array[i].result & f_console_result_value_e); parameters->array[i].location = location; parameters->array[i].location_sub = 0; - if (result == console_short) { + if (result & f_console_result_short_e) { parameters->array[i].location_sub = sub_location; parameters->array[i].locations_sub.array[parameters->array[i].locations_sub.used++] = sub_location; } @@ -378,11 +315,11 @@ extern "C" { else { for (i = 0; i < parameters->used; ++i) { - if (parameters->array[i].type != f_console_type_other_e) continue; - - if (!parameters->array[i].symbol_other) continue; + if (parameters->array[i].flag & f_console_flag_disable_e) continue; + if (!(parameters->array[i].flag & f_console_result_alone_e)) continue; + if (!parameters->array[i].symbol_simple) continue; - if (strncmp(arguments.argv[location], parameters->array[i].symbol_other, parameters->arguments.array[location].used + 1) != 0) continue; + if (strncmp(arguments.argv[location], parameters->array[i].symbol_simple, parameters->arguments.array[location].used + 1) != 0) continue; status = f_array_lengths_increase(F_memory_default_allocation_small_d, ¶meters->array[i].locations); if (F_status_is_error(status)) break; @@ -393,7 +330,7 @@ extern "C" { parameters->array[i].locations.array[parameters->array[i].locations.used++] = location; parameters->array[i].locations_sub.array[parameters->array[i].locations_sub.used++] = 0; - parameters->array[i].result = f_console_result_found_e; + parameters->array[i].result = result | (parameters->array[i].result & f_console_result_value_e); parameters->array[i].location = location; parameters->array[i].location_sub = 0; diff --git a/level_0/f_console/c/console.h b/level_0/f_console/c/console.h index 1a1ef58..147c2b2 100644 --- a/level_0/f_console/c/console.h +++ b/level_0/f_console/c/console.h @@ -58,14 +58,14 @@ extern "C" { * @param input * The input parameter to process. * @param result - * The resulting console type code determined by this function. + * The flag with the console type bits determined by this function. * * @return * F_none on success. * F_data_not the input string is empty. */ #ifndef _di_f_console_identify_ - extern f_status_t f_console_identify(const f_string_t input, f_console_id_t * const result); + extern f_status_t f_console_identify(const f_string_t input, f_console_result_t * const result); #endif // _di_f_console_identify_ /** diff --git a/level_0/f_console/c/console/common.c b/level_0/f_console/c/console/common.c index 431417b..cbfbeb2 100644 --- a/level_0/f_console/c/console/common.c +++ b/level_0/f_console/c/console/common.c @@ -37,11 +37,11 @@ extern "C" { #endif // _di_f_console_standard_s_ #ifndef _di_f_console_symbol_s_ - const f_string_static_t f_console_symbol_short_enable_s = macro_f_string_static_t_initialize((f_string_t)F_console_symbol_short_enable_s, 0, F_console_symbol_short_enable_s_length); - const f_string_static_t f_console_symbol_short_disable_s = macro_f_string_static_t_initialize((f_string_t)F_console_symbol_short_disable_s, 0, F_console_symbol_short_disable_s_length); + const f_string_static_t f_console_symbol_short_normal_s = macro_f_string_static_t_initialize((f_string_t)F_console_symbol_short_normal_s, 0, F_console_symbol_short_normal_s_length); + const f_string_static_t f_console_symbol_short_inverse_s = macro_f_string_static_t_initialize((f_string_t)F_console_symbol_short_inverse_s, 0, F_console_symbol_short_inverse_s_length); - const f_string_static_t f_console_symbol_long_enable_s = macro_f_string_static_t_initialize((f_string_t)F_console_symbol_long_enable_s, 0, F_console_symbol_long_enable_s_length); - const f_string_static_t f_console_symbol_long_disable_s = macro_f_string_static_t_initialize((f_string_t)F_console_symbol_long_disable_s, 0, F_console_symbol_long_disable_s_length); + const f_string_static_t f_console_symbol_long_normal_s = macro_f_string_static_t_initialize((f_string_t)F_console_symbol_long_normal_s, 0, F_console_symbol_long_normal_s_length); + const f_string_static_t f_console_symbol_long_inverse_s = macro_f_string_static_t_initialize((f_string_t)F_console_symbol_long_inverse_s, 0, F_console_symbol_long_inverse_s_length); #endif // _di_f_console_symbol_s_ #ifndef _di_f_console_parameters_delete_ diff --git a/level_0/f_console/c/console/common.h b/level_0/f_console/c/console/common.h index 466581c..e71628f 100644 --- a/level_0/f_console/c/console/common.h +++ b/level_0/f_console/c/console/common.h @@ -17,61 +17,28 @@ extern "C" { #endif /** - * 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). - * - * @todo consider renaming "-" and "--" from "enable" to "normal" and "+" and "++" from "disable" to "inverse". - * - * 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_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_ - -/** * The symbols passed to the program for option handling. + * + * For historical reasons the "-" is the normal symbol and "+" is the inverse. */ #ifndef _di_f_console_symbol_s_ - #define F_console_symbol_short_enable_s "-" - #define F_console_symbol_short_disable_s "+" + #define F_console_symbol_short_normal_s "-" + #define F_console_symbol_short_inverse_s "+" - #define F_console_symbol_short_enable_s_length 1 - #define F_console_symbol_short_disable_s_length 1 + #define F_console_symbol_short_normal_s_length 1 + #define F_console_symbol_short_inverse_s_length 1 - #define F_console_symbol_long_enable_s "--" - #define F_console_symbol_long_disable_s "++" + #define F_console_symbol_long_normal_s "--" + #define F_console_symbol_long_inverse_s "++" - #define F_console_symbol_long_enable_s_length 2 - #define F_console_symbol_long_disable_s_length 2 + #define F_console_symbol_long_normal_s_length 2 + #define F_console_symbol_long_inverse_s_length 2 - extern const f_string_static_t f_console_symbol_short_enable_s; - extern const f_string_static_t f_console_symbol_short_disable_s; + extern const f_string_static_t f_console_symbol_short_normal_s; + extern const f_string_static_t f_console_symbol_short_inverse_s; - extern const f_string_static_t f_console_symbol_long_enable_s; - extern const f_string_static_t f_console_symbol_long_disable_s; + extern const f_string_static_t f_console_symbol_long_normal_s; + extern const f_string_static_t f_console_symbol_long_inverse_s; #endif // _di_f_console_symbol_s_ /** @@ -214,35 +181,78 @@ extern "C" { #endif // _di_f_console_length_size_ /** - * Provide console type enumerations: + * Provide console flags. * - * 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). + * The flags are bits or sets of bits used for designating different states of the parameter. + * + * The disabled flag prevents it from being processed at all and will be treated as other data. + * If the flag should still be processed, then do not set disabled flag and instead just ignore it when found. * - * f_console_type_*: - * - normal: Parameters using minus sign, such as '--help'. + * f_console_flag_*: + * - none: No flag data is set. + * - normal: Parameters using minus sign, such as '--help' ("inverse" and "additional" bits are 0. * - inverse: Parameters using plus sign, such as '++version'. - * - other: Parameters using neither minus nor plus sign, such as 'build'. + * - simple: Parameters using neither minus nor plus sign, such as 'build'. + * - complex: Parameters that provide a set of additional parameters, similar to 'git clone http:s//..' (Not yet implemented). + * - disable: This parameter is disabled (does not get processed). + * + * f_console_flag_mask_*: + * - type: A mask for selecting the bits representing all possible type value flags. + * - state: A mask for selecting the bits representing all possible state flags. */ -#ifndef _di_f_console_types_t_ - typedef uint16_t f_console_id_t; +#ifndef _di_f_console_flag_t_ + typedef uint8_t f_console_flag_t; - #define f_console_id_t_initialize 0 + #define f_console_flag_t_initialize 0 enum { - f_console_result_none_e = 1, - f_console_result_found_e, - f_console_result_additional_e, + f_console_flag_none_e = 0x0, + + // Type flags. + f_console_flag_normal_e = 0x1, + f_console_flag_inverse_e = 0x2, + f_console_flag_simple_e = 0x4, + f_console_flag_complex_e = 0x8, + + // State flags. + f_console_flag_disable_e = 0x10, }; + #define f_console_flag_mask_type_d 0xf + #define f_console_flag_mask_state_d 0x10 +#endif // _di_f_console_flag_t_ + +/** + * Result values that represent the type of command found. + * + * Here "alone" refers to '-', or '++', in that they only have the symbols (whereas '-x', or '++x' would not be alone). + * + * f_console_result_*: + * - none: No flags are set. + * - found: The parameter has been found. + * - normal: The normal prefix character ("-" by default) has been found. + * - inverse: The inverse prefix character ("+" by default) has been found. + * - short: The found prefix is short (only a single character, such as "-" or "+"). + * - long: The found prefix is long (two characters, such as "--" or "++"). + * - alone: The prefix character is by itself (such as only "-" rather than "-h"). + * - value: One or more values associated with the parameter have been found. + */ +#ifndef _di_f_console_result_t_ + typedef uint8_t f_console_result_t; + + #define f_console_result_t_initialize 0 + enum { - f_console_type_normal_e = 1, - f_console_type_inverse_e, - f_console_type_other_e, + f_console_result_none_e = 0x0, + f_console_result_found_e = 0x1, + f_console_result_normal_e = 0x2, + f_console_result_inverse_e = 0x4, + f_console_result_short_e = 0x8, + f_console_result_long_e = 0x10, + f_console_result_alone_e = 0x20, + f_console_result_value_e = 0x40, }; -#endif // _di_f_console_types_t_ +#endif // _di_f_console_result_t_ /** * Provide the standard verbosity codes. @@ -271,16 +281,16 @@ extern "C" { /** * Provide a structure for describing console parameters for the console processing functions to use. * - * The short parameters are will be prepended with either '-' or '+'. - * The long parameters are will be prepended with either '--' or '++'. - * The other parameters are for any other parameter that has no prepended characters. + * The short parameters are prepended with either '-' or '+'. + * The long parameters are prepended with either '--' or '++'. + * The simple parameters have no prefix characters. * - * symbol_short: The single character string, such as 'h' in '-h'. - * symbol_long: The multi-character string, such as 'help' in '--help'. - * symbol_other: The special meaning parameter, such as 'all' in 'make all'. + * symbol_short: The NULL terminated single character string, such as 'h' in '-h'. + * symbol_long: The NULL terminated multi-character string, such as 'help' in '--help'. + * symbol_simple: The NULL terminated parameter that has no prefix, such as 'all' in 'make all'. * values_total: Designates that a parameter will have a given number of values arguments, such as 'blue' in '--color blue'. - * type: One of the f_console_type_* codes, defining how this parameter is to be processed. - * result: A code representing that the parameter is found and how it is found ('-h' vs '--help'). + * flag: A set of bits for providing. + * result: A set of bits representing if and how the parameter is found (such as '-h' vs '--help'). * location: The last location in argv[] where this parameter is found. * location_sub: The last sub-location at location in argv (only used by short parameters, such as -h or +l). * locations: All locations within argv where this parameter is found (order is preserved). @@ -289,22 +299,22 @@ extern "C" { * * The macro_f_console_parameter_t_initialize() all arguments. * The macro_f_console_parameter_t_initialize2() reduced arguments. - * The macro_f_console_parameter_t_initialize3() reduced arguments, strings are of f_string_static_t, has short, long, and other. + * The macro_f_console_parameter_t_initialize3() reduced arguments, strings are of f_string_static_t, has short, long, and simple. * The macro_f_console_parameter_t_initialize4() reduced arguments, strings are of f_string_static_t, has short and long. * The macro_f_console_parameter_t_initialize5() reduced arguments, strings are of f_string_static_t, has short. * The macro_f_console_parameter_t_initialize6() reduced arguments, strings are of f_string_static_t, has long. - * The macro_f_console_parameter_t_initialize7() reduced arguments, strings are of f_string_static_t, has other. + * The macro_f_console_parameter_t_initialize7() reduced arguments, strings are of f_string_static_t, has simple. */ #ifndef _di_f_console_parameter_t_ typedef struct { - const f_string_t symbol_short; - const f_string_t symbol_long; - const f_string_t symbol_other; + f_string_t symbol_short; + f_string_t symbol_long; + f_string_t symbol_simple; - const uint8_t values_total; - const uint8_t type; + uint16_t values_total; - f_array_length_t result; + f_console_flag_t flag; + f_console_result_t result; f_array_length_t location; f_array_length_t location_sub; f_array_lengths_t locations; @@ -316,8 +326,8 @@ extern "C" { 0, \ 0, \ 0, \ - 0, \ - 0, \ + f_console_flag_t_initialize, \ + f_console_result_t_initialize, \ f_array_length_t_initialize, \ f_array_length_t_initialize, \ f_array_length_t_initialize, \ @@ -326,12 +336,12 @@ extern "C" { f_array_lengths_t_initialize, \ } - #define macro_f_console_parameter_t_initialize(symbol_short, symbol_long, symbol_other, values_total, type_value, result, location, location_sub, locations, locations_sub, values) { \ + #define macro_f_console_parameter_t_initialize(symbol_short, symbol_long, symbol_simple, values_total, flag, result, location, location_sub, locations, locations_sub, values) { \ symbol_short, \ symbol_long, \ - symbol_other, \ + symbol_simple, \ values_total, \ - type_value, \ + flag, \ result, \ total, \ location, \ @@ -341,12 +351,12 @@ extern "C" { values, \ } - #define macro_f_console_parameter_t_initialize2(symbol_short, symbol_long, symbol_other, values_total, type_value) { \ + #define macro_f_console_parameter_t_initialize2(symbol_short, symbol_long, symbol_simple, values_total, flag) { \ symbol_short, \ symbol_long, \ - symbol_other, \ + symbol_simple, \ values_total, \ - type_value, \ + flag, \ f_console_result_none_e, \ 0, \ 0, \ @@ -355,12 +365,12 @@ extern "C" { f_array_lengths_t_initialize, \ } - #define macro_f_console_parameter_t_initialize3(symbol_short, symbol_long, symbol_other, values_total, type_value) { \ + #define macro_f_console_parameter_t_initialize3(symbol_short, symbol_long, symbol_simple, values_total, flag) { \ symbol_short.string, \ symbol_long.string, \ - symbol_other.string, \ + symbol_simple.string, \ values_total, \ - type_value, \ + flag, \ f_console_result_none_e, \ 0, \ 0, \ @@ -369,12 +379,12 @@ extern "C" { f_array_lengths_t_initialize, \ } - #define macro_f_console_parameter_t_initialize4(symbol_short, symbol_long, values_total, type_value) { \ + #define macro_f_console_parameter_t_initialize4(symbol_short, symbol_long, values_total, flag) { \ symbol_short.string, \ symbol_long.string, \ 0, \ values_total, \ - type_value, \ + flag, \ f_console_result_none_e, \ 0, \ 0, \ @@ -383,12 +393,12 @@ extern "C" { f_array_lengths_t_initialize, \ } - #define macro_f_console_parameter_t_initialize5(symbol_short, values_total, type_value) { \ + #define macro_f_console_parameter_t_initialize5(symbol_short, values_total, flag) { \ symbol_short.string, \ 0, \ 0, \ values_total, \ - type_value, \ + flag, \ f_console_result_none_e, \ 0, \ 0, \ @@ -397,12 +407,12 @@ extern "C" { f_array_lengths_t_initialize, \ } - #define macro_f_console_parameter_t_initialize6(symbol_long, values_total, type_value) { \ + #define macro_f_console_parameter_t_initialize6(symbol_long, values_total, flag) { \ 0, \ symbol_long.string, \ 0, \ values_total, \ - type_value, \ + flag, \ f_console_result_none_e, \ 0, \ 0, \ @@ -411,12 +421,12 @@ extern "C" { f_array_lengths_t_initialize, \ } - #define macro_f_console_parameter_t_initialize7(symbol_other, values_total, type_value) { \ + #define macro_f_console_parameter_t_initialize7(symbol_simple, values_total, flag) { \ 0, \ 0, \ - symbol_other.string, \ + symbol_simple.string, \ values_total, \ - type_value, \ + flag, \ f_console_result_none_e, \ 0, \ 0, \ diff --git a/level_0/f_console/c/private-console.c b/level_0/f_console/c/private-console.c new file mode 100644 index 0000000..c0af986 --- /dev/null +++ b/level_0/f_console/c/private-console.c @@ -0,0 +1,64 @@ +#include "console.h" +#include "private-console.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if !defined(_di_f_console_identify_) || !defined(_di_f_console_parameter_process_) + f_status_t private_f_console_identify(const f_string_t input, f_console_result_t * const result) { + + *result = f_console_result_none_e; + + if (!input) return F_data_not; + + // Only the first three characters need to be scanned. + const f_array_length_t length = strnlen(input, 3); + if (!length) return F_data_not; + + if (input[0] == f_console_symbol_short_normal_s.string[0]) { + *result = f_console_result_found_e | f_console_result_normal_e; + + if (length > 1) { + if (input[1] == f_console_symbol_short_normal_s.string[0]) { + *result |= f_console_result_long_e; + + if (length < 3) { + *result |= f_console_result_alone_e; + } + } + else { + *result |= f_console_result_short_e; + } + } + else { + *result |= f_console_result_short_e | f_console_result_alone_e; + } + } + else if (input[0] == f_console_symbol_short_inverse_s.string[0]) { + *result = f_console_result_found_e | f_console_result_inverse_e; + + if (length > 1) { + if (input[1] == f_console_symbol_short_inverse_s.string[0]) { + *result |= f_console_result_long_e; + + if (length < 3) { + *result |= f_console_result_alone_e; + } + } + else { + *result |= f_console_result_short_e; + } + } + else { + *result = f_console_result_short_e | f_console_result_alone_e; + } + } + + return F_none; + } +#endif // !defined(_di_f_console_identify_) || !defined(_di_f_console_parameter_process_) + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_console/c/private-console.h b/level_0/f_console/c/private-console.h new file mode 100644 index 0000000..62a4af8 --- /dev/null +++ b/level_0/f_console/c/private-console.h @@ -0,0 +1,44 @@ +/** + * FLL - Level 0 + * + * Project: Console + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * These are provided for internal reduction in redundant code. + * These should not be exposed/used outside of this project. + */ +#ifndef _PRIVATE_F_console_h +#define _PRIVATE_F_console_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Private implementation of f_console_identify(). + * + * Intended to be shared to each of the different implementation variations. + * + * @param input + * The input parameter to process. + * @param result + * The flag with the console type bits determined by this function. + * + * @return + * F_none on success. + * F_data_not the input string is empty. + * + * + * @see f_console_identify() + * @see f_console_parameter_process() + */ +#if !defined(_di_f_console_identify_) || !defined(_di_f_console_parameter_process_) + extern f_status_t private_f_console_identify(const f_string_t input, f_console_result_t * const result) F_attribute_visibility_internal_d; +#endif // !defined(_di_f_console_identify_) || !defined(_di_f_console_parameter_process_) + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _PRIVATE_F_console_h diff --git a/level_0/f_console/data/build/settings b/level_0/f_console/data/build/settings index 66d4a6a..49fcc8f 100644 --- a/level_0/f_console/data/build/settings +++ b/level_0/f_console/data/build/settings @@ -20,9 +20,9 @@ build_language c build_libraries -lc build_libraries-individual -lf_memory -lf_string -lf_type_array -lf_utf -build_sources_library console.c console/common.c +build_sources_library console.c console/common.c private-console.c -build_sources_headers console.h console/common.h +build_sources_headers console.h console/common.h private-console.h build_script yes build_shared yes diff --git a/level_2/fll_program/c/program/print.c b/level_2/fll_program/c/program/print.c index e15a805..c93bd69 100644 --- a/level_2/fll_program/c/program/print.c +++ b/level_2/fll_program/c/program/print.c @@ -353,18 +353,18 @@ extern "C" { #ifndef _di_fll_program_print_help_option_standard_ f_status_t fll_program_print_help_option_standard(const fl_print_t print) { - private_fll_program_print_help_option(print, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); - private_fll_program_print_help_option(print, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); - private_fll_program_print_help_option(print, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); - private_fll_program_print_help_option(print, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Do not print using color."); - private_fll_program_print_help_option(print, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, silencing most print.to."); - private_fll_program_print_help_option(print, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, using only error print.to."); - private_fll_program_print_help_option(print, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal."); - private_fll_program_print_help_option(print, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal print.to."); - private_fll_program_print_help_option(print, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, significantly increasing verbosity beyond normal print.to."); - private_fll_program_print_help_option(print, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); - private_fll_program_print_help_option(print, f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Disable printing of first line."); - private_fll_program_print_help_option(print, f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Disable printing of last line."); + private_fll_program_print_help_option(print, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print this help message."); + private_fll_program_print_help_option(print, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Output using colors that show up better on dark backgrounds."); + private_fll_program_print_help_option(print, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Output using colors that show up better on light backgrounds."); + private_fll_program_print_help_option(print, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Do not print using color."); + private_fll_program_print_help_option(print, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Decrease verbosity, silencing most print.to."); + private_fll_program_print_help_option(print, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Decrease verbosity, using only error print.to."); + private_fll_program_print_help_option(print, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Set verbosity to normal."); + private_fll_program_print_help_option(print, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Increase verbosity beyond normal print.to."); + private_fll_program_print_help_option(print, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Enable debugging, significantly increasing verbosity beyond normal print.to."); + private_fll_program_print_help_option(print, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Print only the version number."); + private_fll_program_print_help_option(print, f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "Disable printing of first line."); + private_fll_program_print_help_option(print, f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Disable printing of last line."); return F_none; } diff --git a/level_2/fll_program/c/program/print.h b/level_2/fll_program/c/program/print.h index a653f96..5c65fc4 100644 --- a/level_2/fll_program/c/program/print.h +++ b/level_2/fll_program/c/program/print.h @@ -77,10 +77,10 @@ extern "C" { * This locks, uses, and unlocks the file stream. * @param symbol_first * The symbol string prepended to the first parameter. - * This is usually f_console_symbol_long_enable_s. + * This is usually f_console_symbol_long_normal_s. * @param symbol_second * The symbol string prepended to the second parameter. - * This is usually f_console_symbol_long_enable_s. + * This is usually f_console_symbol_long_normal_s. * @param first * The first parameter name. * @param second @@ -109,13 +109,13 @@ extern "C" { * This locks, uses, and unlocks the file stream. * @param symbol_first * The symbol string prepended to the first parameter. - * This is usually f_console_symbol_long_enable_s. + * This is usually f_console_symbol_long_normal_s. * @param symbol_second * The symbol string prepended to the second parameter. - * This is usually f_console_symbol_long_enable_s. + * This is usually f_console_symbol_long_normal_s. * @param symbol_third * The symbol string prepended to the third parameter. - * This is usually f_console_symbol_long_enable_s. + * This is usually f_console_symbol_long_normal_s. * @param first * The first parameter name. * @param second @@ -147,10 +147,10 @@ extern "C" { * This locks, uses, and unlocks the file stream. * @param symbol_first * The symbol string prepended to the first parameter. - * This is usually f_console_symbol_long_enable_s. + * This is usually f_console_symbol_long_normal_s. * @param symbol_second * The symbol string prepended to the second parameter. - * This is usually f_console_symbol_long_enable_s. + * This is usually f_console_symbol_long_normal_s. * @param first * The first parameter name. * @param second @@ -179,7 +179,7 @@ extern "C" { * This locks, uses, and unlocks the file stream. * @param symbol * The symbol string prepended to the first parameter. - * This is usually f_console_symbol_long_enable_s. + * This is usually f_console_symbol_long_normal_s. * @param parameter * The parameter name. * @@ -206,13 +206,13 @@ extern "C" { * This locks, uses, and unlocks the file stream. * @param symbol_first * The symbol string prepended to the first parameter. - * This is usually f_console_symbol_long_enable_s. + * This is usually f_console_symbol_long_normal_s. * @param symbol_second * The symbol string prepended to the second parameter. - * This is usually f_console_symbol_long_enable_s. + * This is usually f_console_symbol_long_normal_s. * @param symbol_third * The symbol string prepended to the third parameter. - * This is usually f_console_symbol_long_enable_s. + * This is usually f_console_symbol_long_normal_s. * @param first * The first parameter name. * @@ -250,7 +250,7 @@ extern "C" { * @param symbol * The symbol string prepended to both parameters. * This locks, uses, and unlocks the file stream. - * This is usually f_console_symbol_long_enable_s. + * This is usually f_console_symbol_long_normal_s. * @param parameter * The parameter name. * @param value @@ -280,7 +280,7 @@ extern "C" { * @param symbol * The symbol string prepended to both parameters. * This locks, uses, and unlocks the file stream. - * This is usually f_console_symbol_long_enable_s. + * This is usually f_console_symbol_long_normal_s. * @param parameter * The parameter name. * @param value @@ -310,7 +310,7 @@ extern "C" { * @param symbol * The symbol string prepended to both parameters. * This locks, uses, and unlocks the file stream. - * This is usually f_console_symbol_long_enable_s. + * This is usually f_console_symbol_long_normal_s. * @param parameter * The parameter name. * @param value @@ -340,7 +340,7 @@ extern "C" { * @param symbol * The symbol string prepended to both parameters. * This locks, uses, and unlocks the file stream. - * This is usually f_console_symbol_long_enable_s. + * This is usually f_console_symbol_long_normal_s. * @param parameter * The parameter name. * @@ -368,7 +368,7 @@ extern "C" { * @param symbol * The symbol string prepended to both parameters. * This locks, uses, and unlocks the file stream. - * This is usually f_console_symbol_long_enable_s. + * This is usually f_console_symbol_long_normal_s. * @param parameter * The parameter name. * @param amount @@ -398,7 +398,7 @@ extern "C" { * @param symbol * The symbol string prepended to both parameters. * This locks, uses, and unlocks the file stream. - * This is usually f_console_symbol_long_enable_s. + * This is usually f_console_symbol_long_normal_s. * @param parameter * The parameter name. * @@ -426,7 +426,7 @@ extern "C" { * @param symbol * The symbol string prepended to both parameters. * This locks, uses, and unlocks the file stream. - * This is usually f_console_symbol_long_enable_s. + * This is usually f_console_symbol_long_normal_s. * @param parameter * The parameter name. * @param value @@ -456,7 +456,7 @@ extern "C" { * @param symbol * The symbol string prepended to both parameters. * This locks, uses, and unlocks the file stream. - * This is usually f_console_symbol_long_enable_s. + * This is usually f_console_symbol_long_normal_s. * @param parameter * The parameter name. * @param value_start diff --git a/level_3/byte_dump/c/byte_dump.c b/level_3/byte_dump/c/byte_dump.c index 70f7be3..45eac35 100644 --- a/level_3/byte_dump/c/byte_dump.c +++ b/level_3/byte_dump/c/byte_dump.c @@ -144,24 +144,24 @@ extern "C" { status = F_none; - if (main->parameters.array[byte_dump_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[byte_dump_parameter_help_e].result & f_console_result_found_e) { byte_dump_print_help(setting, main->message); return F_none; } - if (main->parameters.array[byte_dump_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[byte_dump_parameter_version_e].result & f_console_result_found_e) { fll_program_print_version(main->message, byte_dump_program_version_s); return F_none; } if (main->parameters.remaining.used || (main->pipe & fll_program_data_pipe_input_e)) { - if (main->parameters.array[byte_dump_parameter_width_e].result == f_console_result_found_e) { + if (main->parameters.array[byte_dump_parameter_width_e].result & f_console_result_found_e) { f_file_stream_lock(main->error.to); fl_print_format("%[%QThe parameter '%]", main->error.to, main->context.set.error, main->error.prefix, main->context.set.error); - fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_width_s, main->context.set.notable); + fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_normal_s, byte_dump_long_width_s, main->context.set.notable); fl_print_format("%[' is specified, but no value is given.%]%r", main->error.to, main->context.set.error, main->context.set.error, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -169,7 +169,7 @@ extern "C" { return F_status_set_error(F_parameter); } - if (main->parameters.array[byte_dump_parameter_width_e].result == f_console_result_additional_e) { + if (main->parameters.array[byte_dump_parameter_width_e].result & f_console_result_value_e) { const f_array_length_t index = main->parameters.array[byte_dump_parameter_width_e].values.array[main->parameters.array[byte_dump_parameter_width_e].values.used - 1]; f_number_unsigned_t number = 0; @@ -179,7 +179,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%[%QThe parameter '%]", main->error.to, main->context.set.error, main->error.prefix, main->context.set.error); - fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_width_s, main->context.set.notable); + fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_normal_s, byte_dump_long_width_s, main->context.set.notable); fl_print_format("%[' value can only be a number (inclusively) between %]", main->error.to, main->context.set.error, main->context.set.error); fl_print_format("%[1%]", main->error.to, main->context.set.notable, main->context.set.notable); fl_print_format(" %[and%] ", main->error.to, main->context.set.error, main->context.set.error); @@ -196,11 +196,11 @@ extern "C" { data.width = (uint8_t) number; } - if (main->parameters.array[byte_dump_parameter_first_e].result == f_console_result_found_e) { + if (main->parameters.array[byte_dump_parameter_first_e].result & f_console_result_found_e) { f_file_stream_lock(main->error.to); fl_print_format("%[%QThe parameter '%]", main->error.to, main->context.set.error, main->error.prefix, main->context.set.error); - fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_first_s, main->context.set.notable); + fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_normal_s, byte_dump_long_first_s, main->context.set.notable); fl_print_format("%[' is specified, but no value is given.%]%r", main->error.to, main->context.set.error, main->context.set.error, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -208,7 +208,7 @@ extern "C" { return F_status_set_error(F_parameter); } - if (main->parameters.array[byte_dump_parameter_first_e].result == f_console_result_additional_e) { + if (main->parameters.array[byte_dump_parameter_first_e].result & f_console_result_value_e) { const f_array_length_t index = main->parameters.array[byte_dump_parameter_first_e].values.array[main->parameters.array[byte_dump_parameter_first_e].values.used - 1]; f_number_unsigned_t number = 0; @@ -218,7 +218,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%[%QThe parameter '%]", main->error.to, main->context.set.error, main->error.prefix, main->context.set.error); - fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_first_s, main->context.set.notable); + fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_normal_s, byte_dump_long_first_s, main->context.set.notable); fl_print_format("%[' value can only be a number (inclusively) between %]", main->error.to, main->context.set.error, main->context.set.error); fl_print_format("%[0%]", main->error.to, main->context.set.notable, main->context.set.notable); fl_print_format(" %[and%] ", main->error.to, main->context.set.error, main->context.set.error); @@ -235,11 +235,11 @@ extern "C" { data.first = number; } - if (main->parameters.array[byte_dump_parameter_last_e].result == f_console_result_found_e) { + if (main->parameters.array[byte_dump_parameter_last_e].result & f_console_result_found_e) { f_file_stream_lock(main->error.to); fl_print_format("%[%QThe parameter '%]", main->error.to, main->context.set.error, main->error.prefix, main->context.set.error); - fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_last_s, main->context.set.notable); + fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_normal_s, byte_dump_long_last_s, main->context.set.notable); fl_print_format("%[' is specified, but no value is given.%]%r", main->error.to, main->context.set.error, main->context.set.error, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -247,7 +247,7 @@ extern "C" { return F_status_set_error(F_parameter); } - if (main->parameters.array[byte_dump_parameter_last_e].result == f_console_result_additional_e) { + if (main->parameters.array[byte_dump_parameter_last_e].result & f_console_result_value_e) { const f_array_length_t index = main->parameters.array[byte_dump_parameter_last_e].values.array[main->parameters.array[byte_dump_parameter_last_e].values.used - 1]; f_number_unsigned_t number = 0; @@ -257,7 +257,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%[%QThe parameter '%]", main->error.to, main->context.set.error, main->error.prefix, main->context.set.error); - fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_last_s, main->context.set.notable); + fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_normal_s, byte_dump_long_last_s, main->context.set.notable); fl_print_format("%[' value can only be a number (inclusively) between %]", main->error.to, main->context.set.error, main->context.set.error); fl_print_format("%[0%]", main->error.to, main->context.set.notable, main->context.set.notable); fl_print_format(" %[and%] ", main->error.to, main->context.set.error, main->context.set.error); @@ -274,14 +274,14 @@ extern "C" { data.last = number; } - if (main->parameters.array[byte_dump_parameter_first_e].result == f_console_result_additional_e && main->parameters.array[byte_dump_parameter_last_e].result == f_console_result_additional_e) { + if (main->parameters.array[byte_dump_parameter_first_e].result & f_console_result_value_e && main->parameters.array[byte_dump_parameter_last_e].result & f_console_result_value_e) { if (data.first > data.last) { f_file_stream_lock(main->error.to); fl_print_format("%[%QThe parameter '%]", main->error.to, main->context.set.error, main->error.prefix, main->context.set.error); - fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_first_s, main->context.set.notable); + fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_normal_s, byte_dump_long_first_s, main->context.set.notable); fl_print_format("%[' value cannot be greater than the parameter '%]", main->error.to, main->context.set.error, main->context.set.error); - fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_last_s, main->context.set.notable); + fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_normal_s, byte_dump_long_last_s, main->context.set.notable); fl_print_format("%[' value.%]%r", main->error.to, main->context.set.error, main->context.set.error, f_string_eol_s); f_file_stream_unlock(main->error.to); diff --git a/level_3/byte_dump/c/common.c b/level_3/byte_dump/c/common.c index f5b5aa2..b85f53f 100644 --- a/level_3/byte_dump/c/common.c +++ b/level_3/byte_dump/c/common.c @@ -117,14 +117,14 @@ extern "C" { } } - if (main->parameters.array[byte_dump_parameter_line_first_no_e].result == f_console_result_found_e) { + if (main->parameters.array[byte_dump_parameter_line_first_no_e].result & f_console_result_found_e) { setting->line_first = f_string_empty_s; } else { setting->line_first = f_string_eol_s; } - if (main->parameters.array[byte_dump_parameter_line_last_no_e].result == f_console_result_found_e) { + if (main->parameters.array[byte_dump_parameter_line_last_no_e].result & f_console_result_found_e) { setting->line_last = f_string_empty_s; } else { @@ -150,13 +150,13 @@ extern "C" { } } - if (main->parameters.array[byte_dump_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[byte_dump_parameter_help_e].result & f_console_result_found_e) { setting->flag |= byte_dump_main_flag_help_e; return; } - if (main->parameters.array[byte_dump_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[byte_dump_parameter_version_e].result & f_console_result_found_e) { setting->flag |= byte_dump_main_flag_version_e; return; @@ -169,7 +169,7 @@ extern "C" { f_string_static_t * const args = main->parameters.arguments.array; - if (main->parameters.array[byte_dump_parameter_strip_invalid_e].result == f_console_result_found_e) { + if (main->parameters.array[byte_dump_parameter_strip_invalid_e].result & f_console_result_found_e) { setting->flag |= byte_dump_main_flag_strip_invalid_e; } } diff --git a/level_3/byte_dump/c/common.h b/level_3/byte_dump/c/common.h index df5c7ec..4925cb9 100644 --- a/level_3/byte_dump/c/common.h +++ b/level_3/byte_dump/c/common.h @@ -309,35 +309,35 @@ extern "C" { #define byte_dump_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \ \ - macro_f_console_parameter_t_initialize2(byte_dump_short_binary_s.string, byte_dump_long_binary_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_decimal_s.string, byte_dump_long_decimal_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_duodecimal_s.string, byte_dump_long_duodecimal_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_hexidecimal_s.string, byte_dump_long_hexidecimal_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_octal_s.string, byte_dump_long_octal_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_unicode_s.string, byte_dump_long_unicode_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_first_s.string, byte_dump_long_first_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_last_s.string, byte_dump_long_last_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_narrow_s.string, byte_dump_long_narrow_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_placeholder_s.string, byte_dump_long_placeholder_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_text_s.string, byte_dump_long_text_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_wide_s.string, byte_dump_long_wide_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(byte_dump_short_width_s.string, byte_dump_long_width_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(0, byte_dump_long_normal_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(0, byte_dump_long_simple_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(0, byte_dump_long_classic_s.string, 0, 0, f_console_type_normal_e), \ + macro_f_console_parameter_t_initialize2(byte_dump_short_binary_s.string, byte_dump_long_binary_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(byte_dump_short_decimal_s.string, byte_dump_long_decimal_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(byte_dump_short_duodecimal_s.string, byte_dump_long_duodecimal_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(byte_dump_short_hexidecimal_s.string, byte_dump_long_hexidecimal_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(byte_dump_short_octal_s.string, byte_dump_long_octal_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(byte_dump_short_unicode_s.string, byte_dump_long_unicode_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(byte_dump_short_first_s.string, byte_dump_long_first_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(byte_dump_short_last_s.string, byte_dump_long_last_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(byte_dump_short_narrow_s.string, byte_dump_long_narrow_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(byte_dump_short_placeholder_s.string, byte_dump_long_placeholder_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(byte_dump_short_text_s.string, byte_dump_long_text_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(byte_dump_short_wide_s.string, byte_dump_long_wide_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(byte_dump_short_width_s.string, byte_dump_long_width_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(0, byte_dump_long_normal_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(0, byte_dump_long_simple_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(0, byte_dump_long_classic_s.string, 0, 0, f_console_flag_normal_e), \ } #define byte_dump_total_parameters_d 28 diff --git a/level_3/byte_dump/c/print.c b/level_3/byte_dump/c/print.c index b9c0050..d70cc81 100644 --- a/level_3/byte_dump/c/print.c +++ b/level_3/byte_dump/c/print.c @@ -18,34 +18,34 @@ extern "C" { f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, byte_dump_short_binary_s, byte_dump_long_binary_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display binary representation."); - fll_program_print_help_option(print, byte_dump_short_decimal_s, byte_dump_long_decimal_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display decimal representation."); - fll_program_print_help_option(print, byte_dump_short_duodecimal_s, byte_dump_long_duodecimal_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display duodecimal representation."); - fll_program_print_help_option(print, byte_dump_short_hexidecimal_s, byte_dump_long_hexidecimal_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Display hexadecimal representation."); - fll_program_print_help_option(print, byte_dump_short_octal_s, byte_dump_long_octal_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display octal representation."); - fll_program_print_help_option(print, byte_dump_short_unicode_s, byte_dump_long_unicode_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display using Unicode representation for valid Unicode (like: U+0000)."); + fll_program_print_help_option(print, byte_dump_short_binary_s, byte_dump_long_binary_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Display binary representation."); + fll_program_print_help_option(print, byte_dump_short_decimal_s, byte_dump_long_decimal_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Display decimal representation."); + fll_program_print_help_option(print, byte_dump_short_duodecimal_s, byte_dump_long_duodecimal_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Display duodecimal representation."); + fll_program_print_help_option(print, byte_dump_short_hexidecimal_s, byte_dump_long_hexidecimal_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Display hexadecimal representation."); + fll_program_print_help_option(print, byte_dump_short_octal_s, byte_dump_long_octal_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Display octal representation."); + fll_program_print_help_option(print, byte_dump_short_unicode_s, byte_dump_long_unicode_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Display using Unicode representation for valid Unicode (like: U+0000)."); f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, byte_dump_short_first_s, byte_dump_long_first_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Start reading at this byte offset."); - fll_program_print_help_option(print, byte_dump_short_last_s, byte_dump_long_last_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Stop reading at this (inclusive) byte offset."); + fll_program_print_help_option(print, byte_dump_short_first_s, byte_dump_long_first_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Start reading at this byte offset."); + fll_program_print_help_option(print, byte_dump_short_last_s, byte_dump_long_last_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Stop reading at this (inclusive) byte offset."); f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, byte_dump_short_narrow_s, byte_dump_long_narrow_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use narrow display, resulting in 1*width reducing size of the text columns."); - fll_program_print_help_option(print, byte_dump_short_placeholder_s, byte_dump_long_placeholder_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Use a placeholder character instead of a space for placeholders."); - fll_program_print_help_option(print, byte_dump_short_text_s, byte_dump_long_text_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include a column of text when displaying the bytes."); - fll_program_print_help_option(print, byte_dump_short_wide_s, byte_dump_long_wide_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use wide display, resulting in 2*width allowing for space for wide characters in the text columns."); - fll_program_print_help_option(print, byte_dump_short_width_s, byte_dump_long_width_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Set number of columns of Bytes to display."); + fll_program_print_help_option(print, byte_dump_short_narrow_s, byte_dump_long_narrow_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use narrow display, resulting in 1*width reducing size of the text columns."); + fll_program_print_help_option(print, byte_dump_short_placeholder_s, byte_dump_long_placeholder_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Use a placeholder character instead of a space for placeholders."); + fll_program_print_help_option(print, byte_dump_short_text_s, byte_dump_long_text_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Include a column of text when displaying the bytes."); + fll_program_print_help_option(print, byte_dump_short_wide_s, byte_dump_long_wide_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use wide display, resulting in 2*width allowing for space for wide characters in the text columns."); + fll_program_print_help_option(print, byte_dump_short_width_s, byte_dump_long_width_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Set number of columns of Bytes to display."); f_print_dynamic_raw(f_string_eol_s, print.to); f_print_dynamic_raw(f_string_eol_s, print.to); fl_print_format(" %[Special Options:%] ", print.to, context.set.important, context.set.important); - fll_program_print_help_option_long(print.to, context, byte_dump_long_normal_s, f_console_symbol_long_enable_s, " Display UTF-8 symbols for ASCII control codes."); - fll_program_print_help_option_long(print.to, context, byte_dump_long_simple_s, f_console_symbol_long_enable_s, " Display spaces for ASCII control codes."); - fll_program_print_help_option_long(print.to, context, byte_dump_long_classic_s, f_console_symbol_long_enable_s, "Display periods for ASCII control codes."); + fll_program_print_help_option_long(print.to, context, byte_dump_long_normal_s, f_console_symbol_long_normal_s, " Display UTF-8 symbols for ASCII control codes."); + fll_program_print_help_option_long(print.to, context, byte_dump_long_simple_s, f_console_symbol_long_normal_s, " Display spaces for ASCII control codes."); + fll_program_print_help_option_long(print.to, context, byte_dump_long_classic_s, f_console_symbol_long_normal_s, "Display periods for ASCII control codes."); f_print_dynamic_raw(f_string_eol_s, print.to); f_print_dynamic_raw(f_string_eol_s, print.to); @@ -56,15 +56,15 @@ extern "C" { f_print_dynamic_raw(f_string_eol_s, print.to); //} - fl_print_format(" When using the %[%r%r%] option, some UTF-8 characters may be replaced by your instance and cause display alignment issues.%r%r", print.to, context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_text_s, context.set.notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" When using the %[%r%r%] option, some UTF-8 characters may be replaced by your instance and cause display alignment issues.%r%r", print.to, context.set.notable, f_console_symbol_long_normal_s, byte_dump_long_text_s, context.set.notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" Special UTF-8 characters and non-spacing UTF-8 characters may be replaced with a space (or a placeholder when the %[%r%r%] option is used).%r%r", print.to, context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_placeholder_s, context.set.notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" Special UTF-8 characters and non-spacing UTF-8 characters may be replaced with a space (or a placeholder when the %[%r%r%] option is used).%r%r", print.to, context.set.notable, f_console_symbol_long_normal_s, byte_dump_long_placeholder_s, context.set.notable, f_string_eol_s, f_string_eol_s); fl_print_format(" UTF-8 \"Combining\" characters might have a space appended to allow a proper display but this may cause copy and paste issues.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" When %[%r%r%] is used, any UTF-8 sequences will still be printed in full should any part is found within the requested range.%r%r", print.to, context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_last_s, context.set.notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" When %[%r%r%] is used, any UTF-8 sequences will still be printed in full should any part is found within the requested range.%r%r", print.to, context.set.notable, f_console_symbol_long_normal_s, byte_dump_long_last_s, context.set.notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" When using the %[%r%r%] option, invalid Unicode will fallback to being displayed using one of the other modes.%r", print.to, context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_unicode_s, context.set.notable, f_string_eol_s); + fl_print_format(" When using the %[%r%r%] option, invalid Unicode will fallback to being displayed using one of the other modes.%r", print.to, context.set.notable, f_console_symbol_long_normal_s, byte_dump_long_unicode_s, context.set.notable, f_string_eol_s); f_print_dynamic_raw(setting->line_last, print.to); diff --git a/level_3/byte_dump/c/private-byte_dump.c b/level_3/byte_dump/c/private-byte_dump.c index 186bb73..94917d9 100644 --- a/level_3/byte_dump/c/private-byte_dump.c +++ b/level_3/byte_dump/c/private-byte_dump.c @@ -243,7 +243,7 @@ extern "C" { if (cell.column && cell.column < data->width) { while (cell.column < data->width) { - if (data->main->parameters.array[byte_dump_parameter_unicode_e].result == f_console_result_found_e) { + if (data->main->parameters.array[byte_dump_parameter_unicode_e].result & f_console_result_found_e) { f_print_terminated(" ", data->main->output.to); } else if (data->mode == byte_dump_mode_hexidecimal_e) { @@ -265,7 +265,7 @@ extern "C" { ++cell.column; if (cell.column < data->width) { - if (data->main->parameters.array[byte_dump_parameter_unicode_e].result == f_console_result_found_e) { + if (data->main->parameters.array[byte_dump_parameter_unicode_e].result & f_console_result_found_e) { if (!(cell.column % 4)) { f_print_dynamic_raw(f_string_space_s, data->main->output.to); } @@ -298,7 +298,7 @@ extern "C" { } } // while - if (data->main->parameters.array[byte_dump_parameter_text_e].result == f_console_result_found_e) { + if (data->main->parameters.array[byte_dump_parameter_text_e].result & f_console_result_found_e) { byte_dump_print_text(data, sequence, invalid, &previous, &offset); } else { @@ -376,7 +376,7 @@ extern "C" { // Pad the buffer with spaces to hide any skipped bytes (skipped via --first). while (offset_to_print && cell->column < data->width) { - if (data->main->parameters.array[byte_dump_parameter_unicode_e].result == f_console_result_found_e) { + if (data->main->parameters.array[byte_dump_parameter_unicode_e].result & f_console_result_found_e) { f_print_terminated(" ", data->main->output.to); } else if (data->mode == byte_dump_mode_hexidecimal_e) { @@ -399,7 +399,7 @@ extern "C" { ++cell->column; if (cell->column < data->width) { - if (data->main->parameters.array[byte_dump_parameter_unicode_e].result == f_console_result_found_e) { + if (data->main->parameters.array[byte_dump_parameter_unicode_e].result & f_console_result_found_e) { if (!(cell->column % 4)) { f_print_dynamic_raw(f_string_space_s, data->main->output.to); } @@ -435,7 +435,7 @@ extern "C" { } if (cell->column < data->width) { - if (data->main->parameters.array[byte_dump_parameter_unicode_e].result == f_console_result_found_e && !invalid[current]) { + if ((data->main->parameters.array[byte_dump_parameter_unicode_e].result & f_console_result_found_e) && !invalid[current]) { if (byte_current == 1) { uint32_t unicode = 0; @@ -481,7 +481,7 @@ extern "C" { } else { if (data->mode == byte_dump_mode_hexidecimal_e) { - if (data->main->parameters.array[byte_dump_parameter_unicode_e].result == f_console_result_found_e) { + if (data->main->parameters.array[byte_dump_parameter_unicode_e].result & f_console_result_found_e) { f_print_terminated(" ", data->main->output.to); } @@ -493,7 +493,7 @@ extern "C" { } } else if (data->mode == byte_dump_mode_duodecimal_e) { - if (data->main->parameters.array[byte_dump_parameter_unicode_e].result == f_console_result_found_e) { + if (data->main->parameters.array[byte_dump_parameter_unicode_e].result & f_console_result_found_e) { f_print_terminated(" ", data->main->output.to); } @@ -505,7 +505,7 @@ extern "C" { } } else if (data->mode == byte_dump_mode_octal_e) { - if (data->main->parameters.array[byte_dump_parameter_unicode_e].result == f_console_result_found_e) { + if (data->main->parameters.array[byte_dump_parameter_unicode_e].result & f_console_result_found_e) { f_print_terminated(" ", data->main->output.to); } @@ -525,7 +525,7 @@ extern "C" { } } else if (data->mode == byte_dump_mode_decimal_e) { - if (data->main->parameters.array[byte_dump_parameter_unicode_e].result == f_console_result_found_e) { + if (data->main->parameters.array[byte_dump_parameter_unicode_e].result & f_console_result_found_e) { f_print_terminated(" ", data->main->output.to); } @@ -550,7 +550,7 @@ extern "C" { reset = F_true; - if (data->main->parameters.array[byte_dump_parameter_text_e].result == f_console_result_found_e) { + if (data->main->parameters.array[byte_dump_parameter_text_e].result & f_console_result_found_e) { byte_dump_print_text(data, sequence, invalid, previous, offset); } else { @@ -570,7 +570,7 @@ extern "C" { } } else { - if (data->main->parameters.array[byte_dump_parameter_unicode_e].result == f_console_result_found_e) { + if (data->main->parameters.array[byte_dump_parameter_unicode_e].result & f_console_result_found_e) { if (!(cell->column % 4)) { f_print_dynamic_raw(f_string_space_s, data->main->output.to); } @@ -619,7 +619,7 @@ extern "C" { fl_print_format(" %[%r%] ", data->main->output.to, data->main->context.set.notable, byte_dump_character_wall_s, data->main->context.set.notable); if (*offset) { - if (data->main->parameters.array[byte_dump_parameter_classic_e].result == f_console_result_found_e) { + if (data->main->parameters.array[byte_dump_parameter_classic_e].result & f_console_result_found_e) { while (*offset && at < data->width) { f_print_dynamic_raw(f_string_ascii_period_s, data->main->output.to); @@ -633,7 +633,7 @@ extern "C" { } // while } else { - if (data->main->parameters.array[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) { + if (data->main->parameters.array[byte_dump_parameter_placeholder_e].result & f_console_result_found_e) { for (; *offset && at < data->width; --(*offset), ++at) { fl_print_format("%[%r%]", data->main->output.to, data->main->context.set.warning, byte_dump_character_placeholder_s, data->main->context.set.warning); @@ -665,13 +665,13 @@ extern "C" { } if (previous->bytes) { - if (data->main->parameters.array[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) { + if (data->main->parameters.array[byte_dump_parameter_placeholder_e].result & f_console_result_found_e) { for (; at < previous->bytes && at < data->width; ++at) { if (previous->invalid) { fl_print_format("%[%r%]", data->main->output.to, data->main->context.set.error, byte_dump_character_placeholder_s, data->main->context.set.error); } - else if (data->main->parameters.array[byte_dump_parameter_classic_e].result == f_console_result_found_e) { + else if (data->main->parameters.array[byte_dump_parameter_classic_e].result & f_console_result_found_e) { f_print_dynamic_raw(f_string_ascii_period_s, data->main->output.to); } else { @@ -796,7 +796,7 @@ extern "C" { } } else if (f_utf_character_is_whitespace(sequence.string[i], F_true) == F_true) { - if (data->main->parameters.array[byte_dump_parameter_classic_e].result == f_console_result_found_e) { + if (data->main->parameters.array[byte_dump_parameter_classic_e].result & f_console_result_found_e) { f_print_dynamic_raw(f_string_ascii_period_s, data->main->output.to); } else { @@ -811,7 +811,7 @@ extern "C" { if (data->presentation == byte_dump_presentation_classic_e) { f_print_dynamic_raw(f_string_ascii_period_s, data->main->output.to); } - else if (data->main->parameters.array[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) { + else if (data->main->parameters.array[byte_dump_parameter_placeholder_e].result & f_console_result_found_e) { fl_print_format("%[%[%r%]%]", data->main->output.to, data->main->context.set.notable, data->main->context.set.warning, byte_dump_character_placeholder_s, data->main->context.set.warning, data->main->context.set.notable); } else { @@ -919,11 +919,11 @@ extern "C" { // Print placeholders when using UTF-8 sequence to simulate the spaces bytes used for the character. if (width_utf > 1 && at + 1 < data->width) { - if (data->main->parameters.array[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) { + if (data->main->parameters.array[byte_dump_parameter_placeholder_e].result & f_console_result_found_e) { if (invalid[i]) { fl_print_format("%[%r%]", data->main->output.to, data->main->context.set.error, byte_dump_character_placeholder_s, data->main->context.set.error); } - else if (data->main->parameters.array[byte_dump_parameter_classic_e].result == f_console_result_found_e) { + else if (data->main->parameters.array[byte_dump_parameter_classic_e].result & f_console_result_found_e) { f_print_dynamic_raw(f_string_ascii_period_s, data->main->output.to); } else { @@ -941,11 +941,11 @@ extern "C" { ++at; if (width_utf > 2 && at + 1 < data->width) { - if (data->main->parameters.array[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) { + if (data->main->parameters.array[byte_dump_parameter_placeholder_e].result & f_console_result_found_e) { if (invalid[i]) { fl_print_format("%[%r%]", data->main->output.to, data->main->context.set.error, byte_dump_character_placeholder_s, data->main->context.set.error); } - else if (data->main->parameters.array[byte_dump_parameter_classic_e].result == f_console_result_found_e) { + else if (data->main->parameters.array[byte_dump_parameter_classic_e].result & f_console_result_found_e) { f_print_dynamic_raw(f_string_ascii_period_s, data->main->output.to); } else { @@ -963,11 +963,11 @@ extern "C" { ++at; if (width_utf > 3 && at + 1 < data->width) { - if (data->main->parameters.array[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) { + if (data->main->parameters.array[byte_dump_parameter_placeholder_e].result & f_console_result_found_e) { if (invalid[i]) { fl_print_format("%[%r%]", data->main->output.to, data->main->context.set.error, byte_dump_character_placeholder_s, data->main->context.set.error); } - else if (data->main->parameters.array[byte_dump_parameter_classic_e].result == f_console_result_found_e) { + else if (data->main->parameters.array[byte_dump_parameter_classic_e].result & f_console_result_found_e) { f_print_dynamic_raw(f_string_ascii_period_s, data->main->output.to); } else { @@ -989,13 +989,13 @@ extern "C" { } // for // Print placeholder for the remaining parts of the line. - if (data->main->parameters.array[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) { + if (data->main->parameters.array[byte_dump_parameter_placeholder_e].result & f_console_result_found_e) { for (; at < data->width; ++at) { if (invalid[at]) { fl_print_format("%[%r%]", data->main->output.to, data->main->context.set.error, byte_dump_character_placeholder_s, data->main->context.set.error); } - else if (data->main->parameters.array[byte_dump_parameter_classic_e].result == f_console_result_found_e) { + else if (data->main->parameters.array[byte_dump_parameter_classic_e].result & f_console_result_found_e) { f_print_dynamic_raw(f_string_ascii_period_s, data->main->output.to); } else { diff --git a/level_3/control/c/common.c b/level_3/control/c/common.c index 81f18bd..1e6d4f5 100644 --- a/level_3/control/c/common.c +++ b/level_3/control/c/common.c @@ -220,14 +220,14 @@ extern "C" { } } - if (main->parameters.array[control_parameter_line_first_no_e].result == f_console_result_found_e) { + if (main->parameters.array[control_parameter_line_first_no_e].result & f_console_result_found_e) { setting->line_first = f_string_empty_s; } else { setting->line_first = f_string_eol_s; } - if (main->parameters.array[control_parameter_line_last_no_e].result == f_console_result_found_e) { + if (main->parameters.array[control_parameter_line_last_no_e].result & f_console_result_found_e) { setting->line_last = f_string_empty_s; } else { @@ -253,13 +253,13 @@ extern "C" { } } - if (main->parameters.array[control_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[control_parameter_help_e].result & f_console_result_found_e) { setting->flag |= control_main_flag_help_e; return; } - if (main->parameters.array[control_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[control_parameter_version_e].result & f_console_result_found_e) { setting->flag |= control_main_flag_version_e; return; @@ -272,7 +272,7 @@ extern "C" { f_string_static_t * const args = main->parameters.arguments.array; - if (main->parameters.array[control_parameter_strip_invalid_e].result == f_console_result_found_e) { + if (main->parameters.array[control_parameter_strip_invalid_e].result & f_console_result_found_e) { setting->flag |= control_main_flag_strip_invalid_e; } } diff --git a/level_3/control/c/common.h b/level_3/control/c/common.h index 39d41b6..8862cad 100644 --- a/level_3/control/c/common.h +++ b/level_3/control/c/common.h @@ -115,23 +115,23 @@ extern "C" { #define control_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \ \ - macro_f_console_parameter_t_initialize2(control_short_name_s.string, control_long_name_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(control_short_return_s.string, control_long_return_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(control_short_settings_s.string, control_long_settings_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(control_short_socket_s.string, control_long_socket_s.string, 0, 1, f_console_type_normal_e), \ + macro_f_console_parameter_t_initialize2(control_short_name_s.string, control_long_name_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(control_short_return_s.string, control_long_return_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(control_short_settings_s.string, control_long_settings_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(control_short_socket_s.string, control_long_socket_s.string, 0, 1, f_console_flag_normal_e), \ } #define control_total_parameters_d 16 diff --git a/level_3/control/c/control.c b/level_3/control/c/control.c index f4ddb02..74953d4 100644 --- a/level_3/control/c/control.c +++ b/level_3/control/c/control.c @@ -61,13 +61,13 @@ extern "C" { status = F_none; - if (main->parameters.array[control_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[control_parameter_help_e].result & f_console_result_found_e) { control_print_help(main); return F_none; } - if (main->parameters.array[control_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[control_parameter_version_e].result & f_console_result_found_e) { fll_program_print_version(main->message, control_program_version_s); return F_none; @@ -90,12 +90,12 @@ extern "C" { for (uint8_t i = 0; i < 3; ++i) { - if (main->parameters.array[ids[i]].result == f_console_result_found_e) { + if (main->parameters.array[ids[i]].result & f_console_result_found_e) { control_print_error_parameter_value_not(main, names[i]); status = F_status_set_error(F_parameter); } - else if (main->parameters.array[ids[i]].result == f_console_result_additional_e) { + else if (main->parameters.array[ids[i]].result & f_console_result_value_e) { index = main->parameters.array[ids[i]].values.array[main->parameters.array[ids[i]].values.used - 1]; if (!main->parameters.arguments.array[index].used) { diff --git a/level_3/control/c/print.c b/level_3/control/c/print.c index 66f8f62..6f16021 100644 --- a/level_3/control/c/print.c +++ b/level_3/control/c/print.c @@ -18,25 +18,25 @@ extern "C" { f_print_dynamic_raw(f_string_eol_s, main->output.to); - fll_program_print_help_option(print, control_short_name_s, control_long_name_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify the name of the controller socket file."); - fll_program_print_help_option(print, control_short_return_s, control_long_return_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print a message about the response packet."); - fll_program_print_help_option(print, control_short_settings_s, control_long_settings_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Specify a directory path or a full path to the control settings file."); - fll_program_print_help_option(print, control_short_socket_s, control_long_socket_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a directory path or a full path to the controller socket file."); + fll_program_print_help_option(print, control_short_name_s, control_long_name_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Specify the name of the controller socket file."); + fll_program_print_help_option(print, control_short_return_s, control_long_return_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print a message about the response packet."); + fll_program_print_help_option(print, control_short_settings_s, control_long_settings_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Specify a directory path or a full path to the control settings file."); + fll_program_print_help_option(print, control_short_socket_s, control_long_socket_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Specify a directory path or a full path to the controller socket file."); f_print_dynamic_raw(f_string_eol_s, print.to); f_print_dynamic_raw(f_string_eol_s, print.to); fll_program_print_help_usage(print, control_program_name_s, control_action_s); - fl_print_format("%r When the %[%r%r%] parameter represents a directory path then the file name is generated from either the", print.to, f_string_eol_s, print.set->notable, f_console_symbol_long_enable_s, control_long_socket_s, print.set->notable); - fl_print_format(" %[%r%r%] parameter or from the control settings file.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, control_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format("%r When the %[%r%r%] parameter represents a directory path then the file name is generated from either the", print.to, f_string_eol_s, print.set->notable, f_console_symbol_long_normal_s, control_long_socket_s, print.set->notable); + fl_print_format(" %[%r%r%] parameter or from the control settings file.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, control_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); fl_print_format(" A rule action allows for either the full rule path, such as '%[boot/root%]'", print.to, print.set->notable, print.set->notable); fl_print_format(" as a single parameter or two parameters with the first representing the rule directory path '%[boot%]'", print.to, print.set->notable, print.set->notable); fl_print_format(" and the second representing the rule base name '%[root%]'.%r%r", print.to, print.set->notable, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" The %[%r%r%] parameter is intended to be used for scripting and is of the form \"response [type] [action] [status]\".%r", print.to, print.set->notable, f_console_symbol_long_enable_s, control_long_return_s, print.set->notable, f_string_eol_s); - fl_print_format(" Be sure to use the %[%r%r%] parameter to suppress output when using this in scripting.%r", print.to, print.set->notable, f_console_symbol_long_disable_s, f_console_standard_long_quiet_s, print.set->notable, f_string_eol_s); + fl_print_format(" The %[%r%r%] parameter is intended to be used for scripting and is of the form \"response [type] [action] [status]\".%r", print.to, print.set->notable, f_console_symbol_long_normal_s, control_long_return_s, print.set->notable, f_string_eol_s); + fl_print_format(" Be sure to use the %[%r%r%] parameter to suppress output when using this in scripting.%r", print.to, print.set->notable, f_console_symbol_long_inverse_s, f_console_standard_long_quiet_s, print.set->notable, f_string_eol_s); fl_print_format(" No response is returned on program errors, especially those errors that prevent communicating to the controller.%r", print.to, f_string_eol_s); f_print_dynamic_raw(setting->line_last, print.to); diff --git a/level_3/control/c/private-control.c b/level_3/control/c/private-control.c index 54878ba..2b238d0 100644 --- a/level_3/control/c/private-control.c +++ b/level_3/control/c/private-control.c @@ -573,7 +573,7 @@ extern "C" { } } - if (main->parameters.array[control_parameter_return_e].result == f_console_result_found_e) { + if (main->parameters.array[control_parameter_return_e].result & f_console_result_found_e) { fll_print_format("%rresponse %q %q %q%r", main->output.to, f_string_eol_s, control_payload_type_name(header->type), control_action_type_name(header->action), string_status, f_string_eol_s); } else if (header->type == control_payload_type_error_e) { @@ -614,7 +614,7 @@ extern "C" { data->cache.small.used = 0; - if (main->parameters.array[control_parameter_settings_e].result == f_console_result_additional_e) { + if (main->parameters.array[control_parameter_settings_e].result & f_console_result_value_e) { const f_array_length_t index = main->parameters.array[control_parameter_settings_e].values.array[main->parameters.array[control_parameter_settings_e].values.used - 1]; status = f_string_dynamic_append(data->argv[index], &data->cache.small); @@ -706,7 +706,7 @@ extern "C" { data->cache.small.used = 0; - if (main->parameters.array[control_parameter_socket_e].result == f_console_result_additional_e) { + if (main->parameters.array[control_parameter_socket_e].result & f_console_result_value_e) { const f_array_length_t index = main->parameters.array[control_parameter_socket_e].values.array[main->parameters.array[control_parameter_socket_e].values.used - 1]; status = f_string_dynamic_append(data->argv[index], &data->cache.small); @@ -719,7 +719,7 @@ extern "C" { } if (F_status_is_error(status)) { - if (main->parameters.array[control_parameter_socket_e].result == f_console_result_additional_e || !parameter_hass[1]) { + if (main->parameters.array[control_parameter_socket_e].result & f_console_result_value_e || !parameter_hass[1]) { fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append", F_true); } else { @@ -771,7 +771,7 @@ extern "C" { for (uint8_t i = 0; i < 3; ++i) { - if (append_ids[i] && main->parameters.array[append_ids[i]].result == f_console_result_additional_e) { + if (append_ids[i] && main->parameters.array[append_ids[i]].result & f_console_result_value_e) { const f_array_length_t index = main->parameters.array[append_ids[i]].values.array[main->parameters.array[append_ids[i]].values.used - 1]; status = f_string_dynamic_append(data->argv[index], &data->cache.small); @@ -784,7 +784,7 @@ extern "C" { } if (F_status_is_error(status)) { - if ((append_ids[i] && main->parameters.array[append_ids[i]].result == f_console_result_additional_e) || !append_hass[i]) { + if ((append_ids[i] && main->parameters.array[append_ids[i]].result & f_console_result_value_e) || !append_hass[i]) { fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append", F_true); } else { diff --git a/level_3/control/c/private-print.c b/level_3/control/c/private-print.c index 6de0f1f..474944c 100644 --- a/level_3/control/c/private-print.c +++ b/level_3/control/c/private-print.c @@ -313,7 +313,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe value for the parameter '%]", main->error.to, f_string_eol_s, main->context.set.error, main->error.prefix, main->context.set.error); - fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_enable_s, parameter, main->context.set.notable); + fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_normal_s, parameter, main->context.set.notable); fl_print_format("%[' must not be an empty string.%]%r", main->error.to, main->context.set.error, main->context.set.error, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -328,7 +328,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->context.set.error, main->error.prefix, main->context.set.error); - fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_enable_s, parameter, main->context.set.notable); + fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_normal_s, parameter, main->context.set.notable); fl_print_format("%[' is specified, but no value is given.%]%r", main->error.to, main->context.set.error, main->context.set.error, f_string_eol_s); f_file_stream_unlock(main->error.to); diff --git a/level_3/controller/c/common.c b/level_3/controller/c/common.c index c1ff388..158e265 100644 --- a/level_3/controller/c/common.c +++ b/level_3/controller/c/common.c @@ -652,14 +652,14 @@ extern "C" { } } - if (main->parameters.array[controller_parameter_line_first_no_e].result == f_console_result_found_e) { + if (main->parameters.array[controller_parameter_line_first_no_e].result & f_console_result_found_e) { setting->line_first = f_string_empty_s; } else { setting->line_first = f_string_eol_s; } - if (main->parameters.array[controller_parameter_line_last_no_e].result == f_console_result_found_e) { + if (main->parameters.array[controller_parameter_line_last_no_e].result & f_console_result_found_e) { setting->line_last = f_string_empty_s; } else { @@ -685,13 +685,13 @@ extern "C" { } } - if (main->parameters.array[controller_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[controller_parameter_help_e].result & f_console_result_found_e) { setting->flag |= controller_main_flag_help_e; return; } - if (main->parameters.array[controller_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[controller_parameter_version_e].result & f_console_result_found_e) { setting->flag |= controller_main_flag_version_e; return; @@ -704,7 +704,7 @@ extern "C" { f_string_static_t * const args = main->parameters.arguments.array; - if (main->parameters.array[controller_parameter_strip_invalid_e].result == f_console_result_found_e) { + if (main->parameters.array[controller_parameter_strip_invalid_e].result & f_console_result_found_e) { setting->flag |= controller_main_flag_strip_invalid_e; } } diff --git a/level_3/controller/c/common.h b/level_3/controller/c/common.h index d808c3b..c4f056f 100644 --- a/level_3/controller/c/common.h +++ b/level_3/controller/c/common.h @@ -143,29 +143,29 @@ extern "C" { #define controller_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \ \ - macro_f_console_parameter_t_initialize2(controller_short_cgroup_s.string, controller_long_cgroup_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(controller_short_daemon_s.string, controller_long_daemon_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(controller_short_init_s.string, controller_long_init_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(controller_short_interruptible_s.string, controller_long_interruptible_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(controller_short_pid_s.string, controller_long_pid_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(controller_short_settings_s.string, controller_long_settings_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(controller_short_simulate_s.string, controller_long_simulate_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(controller_short_socket_s.string, controller_long_socket_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(controller_short_uninterruptible_s.string, controller_long_uninterruptible_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(controller_short_validate_s.string, controller_long_validate_s.string, 0, 0, f_console_type_normal_e), \ + macro_f_console_parameter_t_initialize2(controller_short_cgroup_s.string, controller_long_cgroup_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(controller_short_daemon_s.string, controller_long_daemon_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(controller_short_init_s.string, controller_long_init_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(controller_short_interruptible_s.string, controller_long_interruptible_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(controller_short_pid_s.string, controller_long_pid_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(controller_short_settings_s.string, controller_long_settings_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(controller_short_simulate_s.string, controller_long_simulate_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(controller_short_socket_s.string, controller_long_socket_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(controller_short_uninterruptible_s.string, controller_long_uninterruptible_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(controller_short_validate_s.string, controller_long_validate_s.string, 0, 0, f_console_flag_normal_e), \ } #define controller_total_parameters_d 22 diff --git a/level_3/controller/c/controller.c b/level_3/controller/c/controller.c index 2e598b1..bf1a193 100644 --- a/level_3/controller/c/controller.c +++ b/level_3/controller/c/controller.c @@ -68,13 +68,13 @@ extern "C" { status = F_none; - if (main->parameters.array[controller_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[controller_parameter_help_e].result & f_console_result_found_e) { controller_print_help(main); return F_none; } - if (main->parameters.array[controller_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[controller_parameter_version_e].result & f_console_result_found_e) { controller_lock_print(main->output.to, 0); fll_program_print_version(main->message, controller_program_version_s); @@ -106,7 +106,7 @@ extern "C" { return status; } - if (main->parameters.array[controller_parameter_init_e].result == f_console_result_found_e) { + if (main->parameters.array[controller_parameter_init_e].result & f_console_result_found_e) { main->as_init = F_true; } @@ -120,12 +120,12 @@ extern "C" { fll_error_print(main->error, F_status_set_fine(status), "f_path_current", F_true); } else { - if (main->parameters.array[controller_parameter_settings_e].result == f_console_result_found_e) { + if (main->parameters.array[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("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_enable_s, controller_long_settings_s, main->context.set.notable); + fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_normal_s, controller_long_settings_s, main->context.set.notable); fl_print_format("%[' is specified, but no value is given.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); controller_unlock_print_flush(main->error.to, 0); @@ -159,12 +159,12 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters.array[controller_parameter_pid_e].result == f_console_result_found_e) { + if (main->parameters.array[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("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_enable_s, controller_long_pid_s, main->context.set.notable); + fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_normal_s, controller_long_pid_s, main->context.set.notable); fl_print_format("%[' is specified, but no value is given.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); controller_unlock_print_flush(main->error.to, 0); @@ -217,12 +217,12 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters.array[controller_parameter_cgroup_e].result == f_console_result_found_e) { + if (main->parameters.array[controller_parameter_cgroup_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("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_enable_s, controller_long_cgroup_s, main->context.set.notable); + fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_normal_s, controller_long_cgroup_s, main->context.set.notable); fl_print_format("%[' is specified, but no value is given.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); controller_unlock_print_flush(main->error.to, 0); @@ -252,7 +252,7 @@ extern "C" { controller_lock_print(main->warning.to, 0); fl_print_format("%r%[%QThe parameter '%]", main->warning.to, f_string_eol_s, main->warning.context, main->warning.prefix, main->warning.context); - fl_print_format("%[%r%r%]", main->warning.to, main->context.set.notable, f_console_symbol_long_enable_s, controller_long_cgroup_s, main->context.set.notable); + fl_print_format("%[%r%r%]", main->warning.to, main->context.set.notable, f_console_symbol_long_normal_s, controller_long_cgroup_s, main->context.set.notable); fl_print_format("%[' must be a file directory path but instead is an empty string, falling back to the default.%]%r", main->warning.to, main->warning.context, main->warning.context, f_string_eol_s); controller_unlock_print_flush(main->warning.to, 0); @@ -261,14 +261,14 @@ extern "C" { } } - if (F_status_is_error_not(status) && main->parameters.array[controller_parameter_daemon_e].result == f_console_result_found_e) { - if (main->parameters.array[controller_parameter_validate_e].result == f_console_result_found_e) { + if (F_status_is_error_not(status) && (main->parameters.array[controller_parameter_daemon_e].result & f_console_result_found_e)) { + if (main->parameters.array[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("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); fl_print_format("%[' must not be specified with the parameter '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_enable_s, controller_long_daemon_s, main->context.set.notable); + fl_print_format("%[%r%r%]", main->error.to, main->context.set.notable, f_console_symbol_long_normal_s, controller_long_daemon_s, main->context.set.notable); fl_print_format("%['.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); controller_unlock_print_flush(main->error.to, 0); @@ -283,7 +283,7 @@ extern "C" { setting.entry.pid = controller_entry_pid_disable_e; setting.entry.show = controller_entry_show_init_e; - if (main->parameters.array[controller_parameter_interruptible_e].result == f_console_result_found_e) { + if (main->parameters.array[controller_parameter_interruptible_e].result & f_console_result_found_e) { setting.flag |= controller_setting_flag_interruptible_e; } else if (setting.flag & controller_setting_flag_interruptible_e) { @@ -291,7 +291,7 @@ extern "C" { } } else { - if (main->parameters.array[controller_parameter_uninterruptible_e].result == f_console_result_found_e) { + if (main->parameters.array[controller_parameter_uninterruptible_e].result & f_console_result_found_e) { if (setting.flag & controller_setting_flag_interruptible_e) { setting.flag -= controller_setting_flag_interruptible_e; } diff --git a/level_3/controller/c/controller/private-controller.c b/level_3/controller/c/controller/private-controller.c index 020a669..6cef297 100644 --- a/level_3/controller/c/controller/private-controller.c +++ b/level_3/controller/c/controller/private-controller.c @@ -405,8 +405,8 @@ extern "C" { return F_none; } - if (global->main->parameters.array[controller_parameter_validate_e].result == f_console_result_found_e) { - if (global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e && global->main->output.verbosity == f_console_verbosity_debug_e) { + if (global->main->parameters.array[controller_parameter_validate_e].result & f_console_result_found_e) { + if ((global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) && global->main->output.verbosity == f_console_verbosity_debug_e) { controller_lock_print(global->main->output.to, global->thread); fl_print_format("%rPID file '", global->main->output.to, f_string_eol_s); diff --git a/level_3/controller/c/entry/private-entry.c b/level_3/controller/c/entry/private-entry.c index 406edb8..63177f2 100644 --- a/level_3/controller/c/entry/private-entry.c +++ b/level_3/controller/c/entry/private-entry.c @@ -887,7 +887,7 @@ extern "C" { return status; } - if (global->main->parameters.array[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->parameters.array[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_error_e)) { controller_lock_print(global->main->output.to, global->thread); @@ -924,7 +924,7 @@ extern "C" { } if (F_status_is_error(entry_action->status)) { - if (global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e) { + if (global->main->parameters.array[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); @@ -1004,7 +1004,7 @@ extern "C" { 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.array[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->parameters.array[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 && global->main->error.verbosity != f_console_verbosity_error_e) { controller_lock_print(global->main->output.to, global->thread); @@ -1016,14 +1016,14 @@ extern "C" { } } - if (global->main->parameters.array[controller_parameter_validate_e].result == f_console_result_none_e) { + if (!(global->main->parameters.array[controller_parameter_validate_e].result & f_console_result_found_e)) { status = controller_rule_wait_all(*global, is_entry, F_false, process); if (F_status_is_error(status)) return status; } } if (global->setting->ready == controller_setting_ready_yes_e) { - if (global->main->parameters.array[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->parameters.array[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 && global->main->error.verbosity != f_console_verbosity_error_e) { controller_lock_print(global->main->output.to, global->thread); @@ -1036,8 +1036,8 @@ extern "C" { } } else { - if (!failsafe && (global->main->error.verbosity == f_console_verbosity_verbose_e || entry->show == controller_entry_show_init_e) && global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_none_e) { - if ((global->main->error.verbosity > f_console_verbosity_error_e)) { + if (!failsafe && (global->main->error.verbosity == f_console_verbosity_verbose_e || entry->show == controller_entry_show_init_e) && !(global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e)) { + if (global->main->error.verbosity > f_console_verbosity_error_e) { fl_print_format("%rState is now '%[%r%]'.%r", global->main->output.to, f_string_eol_s, global->main->context.set.notable, controller_ready_s, global->main->context.set.notable, f_string_eol_s); } } @@ -1096,7 +1096,7 @@ extern "C" { return status; } - if (global->main->parameters.array[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->parameters.array[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 && global->main->error.verbosity != f_console_verbosity_error_e) { controller_lock_print(global->main->output.to, global->thread); @@ -1152,14 +1152,14 @@ extern "C" { f_thread_unlock(&global->thread->lock.rule); - if (global->main->parameters.array[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->parameters.array[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 && global->main->error.verbosity != f_console_verbosity_error_e) { controller_lock_print(global->main->output.to, global->thread); fl_print_format("%r%r %r item rule ", global->main->output.to, f_string_eol_s, entry_action->type == controller_entry_action_type_consider_e ? controller_entry_print_considering_s : controller_entry_print_processing_s, is_entry ? controller_entry_s : controller_exit_s); fl_print_format("'%[%Q%]'", global->main->output.to, global->main->context.set.title, alias_rule, global->main->context.set.title); - if (entry->show == controller_entry_show_init_e && global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_none_e) { + if (entry->show == controller_entry_show_init_e && !(global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e)) { fl_print_format(" [%[%r%]]", global->main->output.to, 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) { @@ -1244,7 +1244,7 @@ extern "C" { // Designate the action as failed. entry_action->status = F_status_set_error(F_failure); - if (global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_none_e) { + if (!(global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e)) { f_thread_unlock(&global->thread->lock.rule); if (entry_action->code & controller_entry_rule_code_require_d) { @@ -1266,7 +1266,7 @@ extern "C" { options_force = 0; options_process = 0; - if (global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e) { + if (global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) { options_process |= controller_process_option_simulate_d; } @@ -1278,12 +1278,12 @@ extern "C" { options_process |= controller_process_option_wait_d; } - if (global->main->parameters.array[controller_parameter_validate_e].result == f_console_result_found_e) { + if (global->main->parameters.array[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.array[controller_parameter_validate_e].result == f_console_result_none_e) { + if (!(global->main->parameters.array[controller_parameter_validate_e].result & f_console_result_found_e)) { options_force |= controller_process_option_asynchronous_d; } @@ -1296,13 +1296,13 @@ extern "C" { break; } - if (F_status_is_error(status) && global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_none_e && (entry_action->code & controller_entry_rule_code_require_d)) { + if (F_status_is_error(status) && !(global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_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_e) { - if (global->main->parameters.array[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->parameters.array[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 && global->main->error.verbosity != f_console_verbosity_error_e) { controller_lock_print(global->main->output.to, global->thread); @@ -1323,9 +1323,7 @@ extern "C" { } } - if (global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e) { - return F_execute; - } + if (global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) return F_execute; controller_thread_process_cancel(*global, is_entry, is_entry ? controller_thread_cancel_execute_e : controller_thread_cancel_exit_execute_e, process); @@ -1488,19 +1486,13 @@ 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.array[controller_parameter_validate_e].result == f_console_result_none_e) { + if (F_status_is_error_not(status) && !failsafe && !(global->main->parameters.array[controller_parameter_validate_e].result & f_console_result_found_e)) { const f_status_t status_wait = controller_rule_wait_all(*global, is_entry, F_true, 0); - - if (F_status_is_error(status_wait)) { - return status_wait; - } - - if (status_wait == F_require) { - return F_status_set_error(F_require); - } + if (F_status_is_error(status_wait)) return status_wait; + if (status_wait == F_require) return F_status_set_error(F_require); } - if ((global->main->parameters.array[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_error_e || global->main->error.verbosity == f_console_verbosity_verbose_e) { + if (((global->main->parameters.array[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_error_e || global->main->error.verbosity == f_console_verbosity_verbose_e) { controller_lock_print(global->main->output.to, global->thread); fl_print_format("%rDone processing %r item '", global->main->output.to, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s); @@ -2132,7 +2124,7 @@ extern "C" { continue; } - if (global.main->parameters.array[controller_parameter_pid_e].result == f_console_result_additional_e) { + if (global.main->parameters.array[controller_parameter_pid_e].result & f_console_result_value_e) { controller_entry_settings_read_print_setting_ignored(global, is_entry, *cache, i); } else { diff --git a/level_3/controller/c/entry/private-entry_print.c b/level_3/controller/c/entry/private-entry_print.c index e298d4f..d8ecfaf 100644 --- a/level_3/controller/c/entry/private-entry_print.c +++ b/level_3/controller/c/entry/private-entry_print.c @@ -33,7 +33,7 @@ extern "C" { #ifndef _di_controller_entry_preprocess_print_simulate_setting_value_ void controller_entry_preprocess_print_simulate_setting_value(const controller_global_t global, const bool is_entry, const f_string_static_t name, const f_string_static_t name_sub, const f_string_static_t value, const f_string_static_t suffix) { - if (global.main->error.verbosity != f_console_verbosity_debug_e && !(global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e)) { + if (global.main->error.verbosity != f_console_verbosity_debug_e && !(global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e)) { return; } diff --git a/level_3/controller/c/print.c b/level_3/controller/c/print.c index 0daa4d2..d25b6f2 100644 --- a/level_3/controller/c/print.c +++ b/level_3/controller/c/print.c @@ -18,30 +18,30 @@ extern "C" { f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, controller_short_cgroup_s, controller_long_cgroup_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom control group file path, such as '" F_control_group_path_system_prefix_s F_control_group_path_system_default_s "'."); - fll_program_print_help_option(print, controller_short_daemon_s, controller_long_daemon_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Run in daemon only mode (do not process the entry)."); - fll_program_print_help_option(print, controller_short_init_s, controller_long_init_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The program will run as an init replacement."); - fll_program_print_help_option(print, controller_short_interruptible_s, controller_long_interruptible_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate that this program can be interrupted by a signal."); - fll_program_print_help_option(print, controller_short_pid_s, controller_long_pid_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom pid file path, such as 'controller/run/default.pid'."); - fll_program_print_help_option(print, controller_short_settings_s, controller_long_settings_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom settings path, such as 'controller/'."); - fll_program_print_help_option(print, controller_short_simulate_s, controller_long_simulate_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Run as a simulation."); - fll_program_print_help_option(print, controller_short_socket_s, controller_long_socket_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom socket file path, such as 'controller/run/default.socket'."); - fll_program_print_help_option(print, controller_short_uninterruptible_s, controller_long_uninterruptible_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Designate that this program cannot be interrupted by a signal."); - fll_program_print_help_option(print, controller_short_validate_s, controller_long_validate_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Validate the settings (entry and rules) without running (does not simulate)."); + fll_program_print_help_option(print, controller_short_cgroup_s, controller_long_cgroup_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Specify a custom control group file path, such as '" F_control_group_path_system_prefix_s F_control_group_path_system_default_s "'."); + fll_program_print_help_option(print, controller_short_daemon_s, controller_long_daemon_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Run in daemon only mode (do not process the entry)."); + fll_program_print_help_option(print, controller_short_init_s, controller_long_init_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " The program will run as an init replacement."); + fll_program_print_help_option(print, controller_short_interruptible_s, controller_long_interruptible_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Designate that this program can be interrupted by a signal."); + fll_program_print_help_option(print, controller_short_pid_s, controller_long_pid_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Specify a custom pid file path, such as 'controller/run/default.pid'."); + fll_program_print_help_option(print, controller_short_settings_s, controller_long_settings_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Specify a custom settings path, such as 'controller/'."); + fll_program_print_help_option(print, controller_short_simulate_s, controller_long_simulate_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Run as a simulation."); + fll_program_print_help_option(print, controller_short_socket_s, controller_long_socket_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Specify a custom socket file path, such as 'controller/run/default.socket'."); + fll_program_print_help_option(print, controller_short_uninterruptible_s, controller_long_uninterruptible_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Designate that this program cannot be interrupted by a signal."); + fll_program_print_help_option(print, controller_short_validate_s, controller_long_validate_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Validate the settings (entry and rules) without running (does not simulate)."); f_print_dynamic_raw(f_string_eol_s, print.to); f_print_dynamic_raw(f_string_eol_s, print.to); fll_program_print_help_usage(print, *main->program_name, controller_entry_s); - fl_print_format("%r When both the %[%r%r%] parameter and the", print.to, f_string_eol_s, print.set->notable, f_console_symbol_long_enable_s, controller_long_simulate_s, print.set->notable); - fl_print_format(" %[%r%r%] parameter are specified, then additional information on each would be executed rule is printed but no simulation is performed.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, controller_long_validate_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format("%r When both the %[%r%r%] parameter and the", print.to, f_string_eol_s, print.set->notable, f_console_symbol_long_normal_s, controller_long_simulate_s, print.set->notable); + fl_print_format(" %[%r%r%] parameter are specified, then additional information on each would be executed rule is printed but no simulation is performed.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, controller_long_validate_s, print.set->notable, f_string_eol_s, f_string_eol_s); const f_string_static_t interruptable = main->as_init ? controller_long_uninterruptible_s : controller_long_interruptible_s; - fl_print_format(" The default interrupt behavior is to operate as if the %[%r%r%] parameter is passed.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, interruptable, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" The default interrupt behavior is to operate as if the %[%r%r%] parameter is passed.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, interruptable, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" Specify an empty string for the %[%r%r%] parameter to disable pid file creation for this program.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, controller_long_pid_s, print.set->notable, f_string_eol_s); + fl_print_format(" Specify an empty string for the %[%r%r%] parameter to disable pid file creation for this program.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, controller_long_pid_s, print.set->notable, f_string_eol_s); f_print_dynamic_raw(setting->line_last, print.to); diff --git a/level_3/controller/c/rule/private-rule.c b/level_3/controller/c/rule/private-rule.c index a9934c0..4d17383 100644 --- a/level_3/controller/c/rule/private-rule.c +++ b/level_3/controller/c/rule/private-rule.c @@ -2132,25 +2132,25 @@ extern "C" { }; const f_string_static_t symbols[] = { - f_console_symbol_short_disable_s, // light. - f_console_symbol_short_disable_s, // dark. - f_console_symbol_short_disable_s, // no_color. - f_console_symbol_short_disable_s, // quiet. - f_console_symbol_short_disable_s, // normal. - f_console_symbol_short_disable_s, // verbose. - f_console_symbol_short_disable_s, // debug. - f_console_symbol_short_enable_s, // daemon. - f_console_symbol_short_enable_s, // init. - f_console_symbol_short_enable_s, // interruptible. - f_console_symbol_short_enable_s, // simulate. - f_console_symbol_short_enable_s, // uninterruptible. - f_console_symbol_short_enable_s, // validate. + f_console_symbol_short_inverse_s, // light. + f_console_symbol_short_inverse_s, // dark. + f_console_symbol_short_inverse_s, // no_color. + f_console_symbol_short_inverse_s, // quiet. + f_console_symbol_short_inverse_s, // normal. + f_console_symbol_short_inverse_s, // verbose. + f_console_symbol_short_inverse_s, // debug. + f_console_symbol_short_normal_s, // daemon. + f_console_symbol_short_normal_s, // init. + f_console_symbol_short_normal_s, // interruptible. + f_console_symbol_short_normal_s, // simulate. + f_console_symbol_short_normal_s, // uninterruptible. + f_console_symbol_short_normal_s, // validate. // Option and Value. - f_console_symbol_short_enable_s, // cgroup. - f_console_symbol_short_enable_s, // pid. - f_console_symbol_short_enable_s, // settings. - f_console_symbol_short_enable_s, // socket. + f_console_symbol_short_normal_s, // cgroup. + f_console_symbol_short_normal_s, // pid. + f_console_symbol_short_normal_s, // settings. + f_console_symbol_short_normal_s, // socket. }; const f_string_static_t expands[] = { @@ -2224,7 +2224,7 @@ extern "C" { if (fl_string_dynamic_partial_compare_string(options[i].string, source, options[i].used, content) == F_equal_to) { if (values[i]) { - if (parameters->array[codes[i]].result == f_console_result_additional_e) { + if (parameters->array[codes[i]].result & f_console_result_value_e) { const f_array_length_t index = parameters->array[codes[i]].values.array[parameters->array[codes[i]].values.used - 1]; status = f_string_dynamic_increase_by(symbols[i].used + expands[i].used + f_string_ascii_space_s.used + argv[index].used + 1, destination); @@ -2244,7 +2244,7 @@ extern "C" { } } else { - if (parameters->array[codes[i]].result == f_console_result_found_e) { + if (parameters->array[codes[i]].result & f_console_result_found_e) { status = f_string_dynamic_increase_by(symbols[i].used + expands[i].used + 1, destination); if (F_status_is_error(status)) return status; @@ -2270,7 +2270,7 @@ extern "C" { memcpy(buffer_string + options[i].used, controller_parameter_map_option_s.string, sizeof(f_char_t) * controller_parameter_map_option_s.used); if (fl_string_dynamic_partial_compare_string(buffer.string, source, buffer.used, content) == F_equal_to) { - if (values[i] && parameters->array[codes[i]].result == f_console_result_additional_e || !values[i] && parameters->array[codes[i]].result == f_console_result_found_e) { + if (values[i] && parameters->array[codes[i]].result & f_console_result_value_e || !values[i] && (parameters->array[codes[i]].result & f_console_result_found_e)) { status = f_string_dynamic_increase_by(symbols[i].used + expands[i].used + 1, destination); if (F_status_is_error(status)) return status; @@ -2296,7 +2296,7 @@ extern "C" { memcpy(buffer_string + options[i].used, controller_parameter_map_value_s.string, sizeof(f_char_t) * controller_parameter_map_value_s.used); if (fl_string_dynamic_partial_compare_string(buffer.string, source, buffer.used, content) == F_equal_to) { - if (parameters->array[codes[i]].result == f_console_result_additional_e) { + if (parameters->array[codes[i]].result & f_console_result_value_e) { const f_array_length_t index = parameters->array[codes[i]].values.array[parameters->array[codes[i]].values.used - 1]; status = f_string_dynamic_append(argv[index], destination); @@ -2830,7 +2830,7 @@ extern "C" { options_process = 0; - if (global.main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e) { + if (global.main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) { options_process |= controller_process_option_simulate_d; } @@ -4934,7 +4934,7 @@ extern "C" { rule->timeout_stop = number; } - if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e)) { + if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && (global.main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e))) { f_string_static_t name_sub = controller_stop_s; if (timeout_code == controller_rule_timeout_code_kill_d) { @@ -5097,7 +5097,7 @@ extern "C" { rule->nice = number; rule->has |= controller_rule_has_nice_d; - if (global.main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e || global.main->error.verbosity == f_console_verbosity_verbose_e) { + if ((global.main->parameters.array[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); @@ -5173,7 +5173,7 @@ extern "C" { rule->user = number; rule->has |= controller_rule_has_user_d; - if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e)) { + if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && (global.main->parameters.array[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); @@ -5390,7 +5390,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_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e)) { + if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && (global.main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e))) { controller_lock_print(global.main->output.to, global.thread); fl_print_format("%rProcessing rule item action '%[%r%]' setting value to an empty set.%r", global.main->output.to, f_string_eol_s, global.main->context.set.title, controller_environment_s, global.main->context.set.title, f_string_eol_s); @@ -5602,7 +5602,7 @@ extern "C" { ++rule->ons.used; } - if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e)) { + if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && (global.main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e))) { controller_lock_print(global.main->output.to, global.thread); fl_print_format("%rProcessing rule item action '%[%r%]', adding ", global.main->output.to, f_string_eol_s, global.main->context.set.title, controller_on_s, global.main->context.set.title); diff --git a/level_3/controller/c/rule/private-rule_print.c b/level_3/controller/c/rule/private-rule_print.c index 5751eae..ade5f09 100644 --- a/level_3/controller/c/rule/private-rule_print.c +++ b/level_3/controller/c/rule/private-rule_print.c @@ -412,8 +412,10 @@ extern "C" { #ifndef _di_controller_rule_setting_read_print_mapping_ void controller_rule_setting_read_print_mapping(const controller_global_t global, const f_string_static_t name, const f_string_map_t map) { - if (global.main->error.verbosity != f_console_verbosity_debug_e && !(global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e)) { - return; + if (global.main->error.verbosity != f_console_verbosity_debug_e) { + if (!(global.main->error.verbosity == f_console_verbosity_verbose_e && (global.main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e))) { + return; + } } controller_lock_print(global.main->output.to, global.thread); @@ -429,8 +431,10 @@ 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_static_t name, const f_string_static_t name_sub, const f_string_static_t value, const f_string_t suffix) { - if (global.main->error.verbosity != f_console_verbosity_debug_e && !(global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e)) { - return; + if (global.main->error.verbosity != f_console_verbosity_debug_e) { + if (!(global.main->error.verbosity == f_console_verbosity_verbose_e && (global.main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e))) { + return; + } } controller_lock_print(global.main->output.to, global.thread); @@ -454,8 +458,10 @@ 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_static_t name, const f_array_length_t index, controller_cache_t * const cache) { - if (global.main->error.verbosity != f_console_verbosity_debug_e && !(global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e)) { - return; + if (global.main->error.verbosity != f_console_verbosity_debug_e) { + if (!(global.main->error.verbosity == f_console_verbosity_verbose_e && (global.main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e))) { + return; + } } controller_lock_print(global.main->output.to, global.thread); diff --git a/level_3/controller/c/thread/private-thread.c b/level_3/controller/c/thread/private-thread.c index e4afc79..27f3447 100644 --- a/level_3/controller/c/thread/private-thread.c +++ b/level_3/controller/c/thread/private-thread.c @@ -25,7 +25,7 @@ extern "C" { if (global->thread->enabled != controller_thread_enabled_e) return 0; - const struct timespec delay = controller_time_seconds(global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e ? controller_thread_cleanup_interval_short_d : controller_thread_cleanup_interval_long_d); + const struct timespec delay = controller_time_seconds((global->main->parameters.array[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; @@ -215,7 +215,7 @@ extern "C" { } } else { - if (main->parameters.array[controller_parameter_daemon_e].result == f_console_result_found_e) { + if (main->parameters.array[controller_parameter_daemon_e].result & f_console_result_found_e) { setting->ready = controller_setting_ready_done_e; if (f_file_exists(setting->path_pid, F_true) == F_true) { @@ -254,7 +254,7 @@ 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_e) { - if (main->parameters.array[controller_parameter_validate_e].result == f_console_result_none_e) { + if (!(main->parameters.array[controller_parameter_validate_e].result & f_console_result_found_e)) { // Wait for the entry thread to complete before starting the rule thread. controller_thread_join(&thread.id_rule); @@ -286,7 +286,7 @@ extern "C" { return F_child; } - if (F_status_is_error_not(status) && status != F_failure && main->parameters.array[controller_parameter_validate_e].result == f_console_result_none_e && controller_thread_is_enabled(F_true, &thread)) { + if (F_status_is_error_not(status) && status != F_failure && !(main->parameters.array[controller_parameter_validate_e].result & f_console_result_found_e) && controller_thread_is_enabled(F_true, &thread)) { if (setting->mode == controller_setting_mode_service_e) { controller_thread_join(&thread.id_signal); diff --git a/level_3/controller/c/thread/private-thread_entry.c b/level_3/controller/c/thread/private-thread_entry.c index 2050b7d..a231e28 100644 --- a/level_3/controller/c/thread/private-thread_entry.c +++ b/level_3/controller/c/thread/private-thread_entry.c @@ -36,7 +36,7 @@ extern "C" { } if (F_status_is_error_not(*status) && *status != F_child) { - if (main->parameters.array[controller_parameter_validate_e].result == f_console_result_none_e || main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e) { + if (!(main->parameters.array[controller_parameter_validate_e].result & f_console_result_found_e) || (main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e)) { if (entry->setting->entry.pid == controller_entry_pid_require_e && f_file_exists(entry->setting->path_pid, F_true) == F_true) { if (main->error.verbosity > f_console_verbosity_quiet_e) { @@ -163,7 +163,7 @@ extern "C" { } if (F_status_is_error_not(*status) && *status != F_child && *status != F_file_found_not) { - if (main->parameters.array[controller_parameter_validate_e].result == f_console_result_none_e || main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e) { + if (!(main->parameters.array[controller_parameter_validate_e].result & f_console_result_found_e) || (main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e)) { *status = controller_entry_process(entry->global, cache, F_false, F_false); diff --git a/level_3/fake/c/common.c b/level_3/fake/c/common.c index 7ec79bd..acbb147 100644 --- a/level_3/fake/c/common.c +++ b/level_3/fake/c/common.c @@ -165,14 +165,14 @@ extern "C" { } } - if (main->parameters.array[fake_parameter_line_first_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fake_parameter_line_first_no_e].result & f_console_result_found_e) { setting->line_first = f_string_empty_s; } else { setting->line_first = f_string_eol_s; } - if (main->parameters.array[fake_parameter_line_last_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fake_parameter_line_last_no_e].result & f_console_result_found_e) { setting->line_last = f_string_empty_s; } else { @@ -198,13 +198,13 @@ extern "C" { } } - if (main->parameters.array[fake_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fake_parameter_help_e].result & f_console_result_found_e) { setting->flag |= fake_main_flag_help_e; return; } - if (main->parameters.array[fake_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fake_parameter_version_e].result & f_console_result_found_e) { setting->flag |= fake_main_flag_version_e; return; @@ -217,7 +217,7 @@ extern "C" { f_string_static_t * const args = main->parameters.arguments.array; - if (main->parameters.array[fake_parameter_strip_invalid_e].result == f_console_result_found_e) { + if (main->parameters.array[fake_parameter_strip_invalid_e].result & f_console_result_found_e) { setting->flag |= fake_main_flag_strip_invalid_e; } } diff --git a/level_3/fake/c/common.h b/level_3/fake/c/common.h index 11361f9..51b9b9f 100644 --- a/level_3/fake/c/common.h +++ b/level_3/fake/c/common.h @@ -420,38 +420,38 @@ extern "C" { #define fake_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \ \ - macro_f_console_parameter_t_initialize2(fake_short_define_s.string, fake_long_define_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fake_short_fakefile_s.string, fake_long_fakefile_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fake_short_mode_s.string, fake_long_mode_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fake_short_process_s.string, fake_long_process_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fake_short_settings_s.string, fake_long_settings_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fake_short_path_build_s.string, fake_long_path_build_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fake_short_path_data_s.string, fake_long_path_data_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fake_short_path_sources_s.string, fake_long_path_sources_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fake_short_path_work_s.string, fake_long_path_work_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(0, fake_long_documents_disabled_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(0, fake_long_documents_enabled_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(0, fake_long_shared_disabled_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(0, fake_long_shared_enabled_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(0, fake_long_static_disabled_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(0, fake_long_static_enabled_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(0, 0, fake_other_operation_build_s.string, 0, f_console_type_other_e), \ - macro_f_console_parameter_t_initialize2(0, 0, fake_other_operation_clean_s.string, 0, f_console_type_other_e), \ - macro_f_console_parameter_t_initialize2(0, 0, fake_other_operation_make_s.string, 0, f_console_type_other_e), \ - macro_f_console_parameter_t_initialize2(0, 0, fake_other_operation_skeleton_s.string, 0, f_console_type_other_e), \ + macro_f_console_parameter_t_initialize2(fake_short_define_s.string, fake_long_define_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fake_short_fakefile_s.string, fake_long_fakefile_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fake_short_mode_s.string, fake_long_mode_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fake_short_process_s.string, fake_long_process_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fake_short_settings_s.string, fake_long_settings_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fake_short_path_build_s.string, fake_long_path_build_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fake_short_path_data_s.string, fake_long_path_data_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fake_short_path_sources_s.string, fake_long_path_sources_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fake_short_path_work_s.string, fake_long_path_work_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(0, fake_long_documents_disabled_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(0, fake_long_documents_enabled_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(0, fake_long_shared_disabled_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(0, fake_long_shared_enabled_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(0, fake_long_static_disabled_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(0, fake_long_static_enabled_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(0, 0, fake_other_operation_build_s.string, 0, f_console_flag_simple_e), \ + macro_f_console_parameter_t_initialize2(0, 0, fake_other_operation_clean_s.string, 0, f_console_flag_simple_e), \ + macro_f_console_parameter_t_initialize2(0, 0, fake_other_operation_make_s.string, 0, f_console_flag_simple_e), \ + macro_f_console_parameter_t_initialize2(0, 0, fake_other_operation_skeleton_s.string, 0, f_console_flag_simple_e), \ } #define fake_total_parameters_d 31 diff --git a/level_3/fake/c/fake.c b/level_3/fake/c/fake.c index ddefbbd..6b6ea05 100644 --- a/level_3/fake/c/fake.c +++ b/level_3/fake/c/fake.c @@ -65,13 +65,13 @@ extern "C" { } } - if (main->parameters.array[fake_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fake_parameter_help_e].result & f_console_result_found_e) { fake_print_help(setting, main->message); return F_none; } - if (main->parameters.array[fake_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fake_parameter_version_e].result & f_console_result_found_e) { fll_program_print_version(main->message, fake_program_version_s); return F_none; diff --git a/level_3/fake/c/print.c b/level_3/fake/c/print.c index b9195b6..ab71f74 100644 --- a/level_3/fake/c/print.c +++ b/level_3/fake/c/print.c @@ -18,27 +18,27 @@ extern "C" { f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, fake_short_define_s, fake_long_define_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Append an additional define after defines from settings file."); - fll_program_print_help_option(print, fake_short_fakefile_s, fake_long_fakefile_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Use this fakefile."); - fll_program_print_help_option(print, fake_short_mode_s, fake_long_mode_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use this mode when processing the build settings."); - fll_program_print_help_option(print, fake_short_process_s, fake_long_process_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Process name for storing build states."); - fll_program_print_help_option(print, fake_short_settings_s, fake_long_settings_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Use this settings file."); + fll_program_print_help_option(print, fake_short_define_s, fake_long_define_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Append an additional define after defines from settings file."); + fll_program_print_help_option(print, fake_short_fakefile_s, fake_long_fakefile_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Use this fakefile."); + fll_program_print_help_option(print, fake_short_mode_s, fake_long_mode_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use this mode when processing the build settings."); + fll_program_print_help_option(print, fake_short_process_s, fake_long_process_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Process name for storing build states."); + fll_program_print_help_option(print, fake_short_settings_s, fake_long_settings_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Use this settings file."); f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, fake_short_path_build_s, fake_long_path_build_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom build directory."); - fll_program_print_help_option(print, fake_short_path_data_s, fake_long_path_data_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom path to the data files."); - fll_program_print_help_option(print, fake_short_path_sources_s, fake_long_path_sources_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Specify a custom path to the source files."); - fll_program_print_help_option(print, fake_short_path_work_s, fake_long_path_work_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use includes/libraries/programs from this directory instead of system."); + fll_program_print_help_option(print, fake_short_path_build_s, fake_long_path_build_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Specify a custom build directory."); + fll_program_print_help_option(print, fake_short_path_data_s, fake_long_path_data_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Specify a custom path to the data files."); + fll_program_print_help_option(print, fake_short_path_sources_s, fake_long_path_sources_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Specify a custom path to the source files."); + fll_program_print_help_option(print, fake_short_path_work_s, fake_long_path_work_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use includes/libraries/programs from this directory instead of system."); fl_print_format("%r%r %[Special Options:%] ", print.to, f_string_eol_s, f_string_eol_s, print.set->important, print.set->important); - fll_program_print_help_option_long(print, fake_long_documents_disabled_s, f_console_symbol_long_enable_s, " Forcibly do not build documents files."); - fll_program_print_help_option_long(print, fake_long_documents_enabled_s, f_console_symbol_long_enable_s, " Forcibly do build documents files."); - fll_program_print_help_option_long(print, fake_long_shared_disabled_s, f_console_symbol_long_enable_s, "Forcibly do not build shared files."); - fll_program_print_help_option_long(print, fake_long_shared_enabled_s, f_console_symbol_long_enable_s, " Forcibly do build shared files."); - fll_program_print_help_option_long(print, fake_long_static_disabled_s, f_console_symbol_long_enable_s, "Forcibly do not build static files."); - fll_program_print_help_option_long(print, fake_long_static_enabled_s, f_console_symbol_long_enable_s, " Forcibly do build static files."); + fll_program_print_help_option_long(print, fake_long_documents_disabled_s, f_console_symbol_long_normal_s, " Forcibly do not build documents files."); + fll_program_print_help_option_long(print, fake_long_documents_enabled_s, f_console_symbol_long_normal_s, " Forcibly do build documents files."); + fll_program_print_help_option_long(print, fake_long_shared_disabled_s, f_console_symbol_long_normal_s, "Forcibly do not build shared files."); + fll_program_print_help_option_long(print, fake_long_shared_enabled_s, f_console_symbol_long_normal_s, " Forcibly do build shared files."); + fll_program_print_help_option_long(print, fake_long_static_disabled_s, f_console_symbol_long_normal_s, "Forcibly do not build static files."); + fll_program_print_help_option_long(print, fake_long_static_enabled_s, f_console_symbol_long_normal_s, " Forcibly do build static files."); fl_print_format("%r%r %[Operations:%] ", print.to, f_string_eol_s, f_string_eol_s, print.set->important, print.set->important); @@ -53,7 +53,7 @@ extern "C" { fll_program_print_help_usage(print, fake_program_name_s, fake_program_help_parameters_s); fl_print_format("%r When performing the %[%r%] operation, the", print.to, f_string_eol_s, print.set->notable, fake_other_operation_build_s, print.set->notable); - fl_print_format(" %[%r%r%] parameter specifies a name (limited to alpha-numeric, underscore, and dash) to be used in addition to the global.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fake_long_mode_s, print.set->notable, f_string_eol_s); + fl_print_format(" %[%r%r%] parameter specifies a name (limited to alpha-numeric, underscore, and dash) to be used in addition to the global.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fake_long_mode_s, print.set->notable, f_string_eol_s); fl_print_format(" For example, when a %[%r%]", print.to, print.set->notable, fake_make_parameter_variable_mode_s, print.set->notable); fl_print_format(" of 'fll_monolithic' is specified, build libraries from both 'build_libraries' and 'build_libraries-fll_monolithic' are used (but not 'build_libraries-fll_level').%r%r", print.to, f_string_eol_s, f_string_eol_s); @@ -61,10 +61,10 @@ extern "C" { fl_print_format(" When specifying the %[%r%] or the %[%r%]", print.to, print.set->notable, fake_make_parameter_variable_fakefile_s, print.set->notable, print.set->notable, fake_make_parameter_variable_settings_s, print.set->notable); fl_print_format(" parameters, the project root is seached first and then the build data director is searched when the given file does not contain a directory separator.%r", print.to, f_string_eol_s); - fl_print_format(" For example, with '%[%r%r my_fakefile%]' the fakefile at", print.to, print.set->notable, f_console_symbol_long_enable_s, fake_long_fakefile_s, print.set->notable); + fl_print_format(" For example, with '%[%r%r my_fakefile%]' the fakefile at", print.to, print.set->notable, f_console_symbol_long_normal_s, fake_long_fakefile_s, print.set->notable); fl_print_format(" '%[./my_fakefile%]' is used if found, but if it is not found then", print.to, print.set->notable, print.set->notable); fl_print_format(" '%[./%r%rmy_fakefile%]' is used if found.%r", print.to, print.set->notable, fake_default_path_data_s, fake_default_path_build_s, print.set->notable, f_string_eol_s); - fl_print_format(" For example, with '%[%r%r ./my_fakefile%]' the fakefile at", print.to, print.set->notable, f_console_symbol_long_enable_s, fake_long_fakefile_s, print.set->notable); + fl_print_format(" For example, with '%[%r%r ./my_fakefile%]' the fakefile at", print.to, print.set->notable, f_console_symbol_long_normal_s, fake_long_fakefile_s, print.set->notable); fl_print_format(" '%[./my_fakefile%]' is used if found, but if it is not found then no other paths are attempted.%r%r", print.to, print.set->notable, print.set->notable, f_string_eol_s, f_string_eol_s); fl_print_format(" When piping data to this program, the piped data is treated as if it were prepended to the %[%r%]", print.to, print.set->notable, fake_make_parameter_variable_fakefile_s, print.set->notable); diff --git a/level_3/fake/c/private-build-load.c b/level_3/fake/c/private-build-load.c index 99ab4b4..fe7ffad 100644 --- a/level_3/fake/c/private-build-load.c +++ b/level_3/fake/c/private-build-load.c @@ -1355,7 +1355,7 @@ extern "C" { if (F_status_is_error(*status)) return; - if (data->main->parameters.array[fake_parameter_path_sources_e].result == f_console_result_additional_e && data->path_sources.used) { + if (data->main->parameters.array[fake_parameter_path_sources_e].result & f_console_result_value_e && data->path_sources.used) { *status = f_string_dynamic_append_assure(f_path_separator_s, &data->path_sources); if (F_status_is_error(*status)) { @@ -1365,8 +1365,8 @@ extern "C" { } } - if (data->main->parameters.array[fake_parameter_shared_disabled_e].result == f_console_result_found_e) { - if (data->main->parameters.array[fake_parameter_shared_enabled_e].result == f_console_result_found_e) { + if (data->main->parameters.array[fake_parameter_shared_disabled_e].result & f_console_result_found_e) { + if (data->main->parameters.array[fake_parameter_shared_enabled_e].result & f_console_result_found_e) { if (data->main->parameters.array[fake_parameter_shared_enabled_e].location > data->main->parameters.array[fake_parameter_shared_disabled_e].location) { setting->build_shared = F_true; setting->search_shared = F_true; @@ -1380,11 +1380,11 @@ extern "C" { f_file_stream_lock(data->main->error); fl_print_format("%r%[%QThe parameters '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); - fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_enable_s, fake_long_shared_disabled_s, data->main->error.notable); + fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fake_long_shared_disabled_s, data->main->error.notable); fl_print_format("%[' and '%]", data->main->error.to, data->main->error.context, data->main->error.context); - fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_enable_s, fake_long_shared_enabled_s, data->main->error.notable); + fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fake_long_shared_enabled_s, data->main->error.notable); fl_print_format("%[' contradict, defaulting to '%]", data->main->error.to, data->main->error.context, data->main->error.context); - fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_enable_s, setting->build_shared ? fake_long_shared_enabled_s : fake_long_shared_disabled_s, data->main->error.notable); + fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, setting->build_shared ? fake_long_shared_enabled_s : fake_long_shared_disabled_s, data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); f_file_stream_unlock(data->main->error); @@ -1395,13 +1395,13 @@ extern "C" { setting->search_shared = F_false; } } - else if (data->main->parameters.array[fake_parameter_shared_enabled_e].result == f_console_result_found_e) { + else if (data->main->parameters.array[fake_parameter_shared_enabled_e].result & f_console_result_found_e) { setting->build_shared = F_true; setting->search_shared = F_true; } - if (data->main->parameters.array[fake_parameter_static_disabled_e].result == f_console_result_found_e) { - if (data->main->parameters.array[fake_parameter_static_enabled_e].result == f_console_result_found_e) { + if (data->main->parameters.array[fake_parameter_static_disabled_e].result & f_console_result_found_e) { + if (data->main->parameters.array[fake_parameter_static_enabled_e].result & f_console_result_found_e) { if (data->main->parameters.array[fake_parameter_static_enabled_e].location > data->main->parameters.array[fake_parameter_static_disabled_e].location) { setting->build_static = F_true; setting->search_static = F_true; @@ -1415,11 +1415,11 @@ extern "C" { f_file_stream_lock(data->main->error); fl_print_format("%r%[%QThe parameters '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); - fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_enable_s, fake_long_static_disabled_s, data->main->error.notable); + fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fake_long_static_disabled_s, data->main->error.notable); fl_print_format("%[' and '%]", data->main->error.to, data->main->error.context, data->main->error.context); - fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_enable_s, fake_long_static_enabled_s, data->main->error.notable); + fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fake_long_static_enabled_s, data->main->error.notable); fl_print_format("%[' contradict, defaulting to '%]", data->main->error.to, data->main->error.context, data->main->error.context); - fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_enable_s, setting->build_static ? fake_long_static_enabled_s : fake_long_static_disabled_s, data->main->error.notable); + fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, setting->build_static ? fake_long_static_enabled_s : fake_long_static_disabled_s, data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); f_file_stream_unlock(data->main->error); @@ -1430,7 +1430,7 @@ extern "C" { setting->search_static = F_false; } } - else if (data->main->parameters.array[fake_parameter_static_enabled_e].result == f_console_result_found_e) { + else if (data->main->parameters.array[fake_parameter_static_enabled_e].result & f_console_result_found_e) { setting->build_static = F_true; setting->search_static = F_true; } diff --git a/level_3/fake/c/private-build.c b/level_3/fake/c/private-build.c index dba0555..e1ee1c8 100644 --- a/level_3/fake/c/private-build.c +++ b/level_3/fake/c/private-build.c @@ -562,22 +562,22 @@ extern "C" { // Ensure console color mode is passed to the scripts so that they can also react to color mode. if (F_status_is_error_not(*status) && data->main->context.mode != f_color_mode_none_e) { f_string_static_t argument = f_string_static_t_initialize; - argument.used = f_console_symbol_short_disable_s.used + f_console_standard_short_dark_s.used; + argument.used = f_console_symbol_short_inverse_s.used + f_console_standard_short_dark_s.used; f_char_t argument_string[argument.used + 1]; argument.string = argument_string; argument_string[argument.used] = 0; - memcpy(argument_string, f_console_symbol_short_disable_s.string, sizeof(f_char_t) * f_console_symbol_short_disable_s.used); + memcpy(argument_string, f_console_symbol_short_inverse_s.string, sizeof(f_char_t) * f_console_symbol_short_inverse_s.used); if (data->main->context.mode == f_color_mode_dark_e) { - memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_dark_s.string, sizeof(f_char_t) * f_console_standard_short_dark_s.used); + memcpy(argument_string + f_console_symbol_short_inverse_s.used, f_console_standard_short_dark_s.string, sizeof(f_char_t) * f_console_standard_short_dark_s.used); } else if (data->main->context.mode == f_color_mode_light_e) { - memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_light_s.string, sizeof(f_char_t) * f_console_standard_short_light_s.used); + memcpy(argument_string + f_console_symbol_short_inverse_s.used, f_console_standard_short_light_s.string, sizeof(f_char_t) * f_console_standard_short_light_s.used); } else if (data->main->context.mode == f_color_mode_color_not_e) { - memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_no_color_s.string, sizeof(f_char_t) * f_console_standard_short_no_color_s.used); + memcpy(argument_string + f_console_symbol_short_inverse_s.used, f_console_standard_short_no_color_s.string, sizeof(f_char_t) * f_console_standard_short_no_color_s.used); } *status = fll_execute_arguments_add(argument, &arguments); @@ -586,25 +586,25 @@ extern "C" { // Ensure verbosity level is passed to the scripts so that they can also react to requested verbosity. if (F_status_is_error_not(*status) && data->main->error.verbosity != f_console_verbosity_normal_e) { f_string_static_t argument = f_string_static_t_initialize; - argument.used = f_console_symbol_short_disable_s.used + f_console_standard_short_quiet_s.used; + argument.used = f_console_symbol_short_inverse_s.used + f_console_standard_short_quiet_s.used; f_char_t argument_string[argument.used + 1]; argument.string = argument_string; argument_string[argument.used] = 0; - memcpy(argument_string, f_console_symbol_short_disable_s.string, sizeof(f_char_t) * f_console_symbol_short_disable_s.used); + memcpy(argument_string, f_console_symbol_short_inverse_s.string, sizeof(f_char_t) * f_console_symbol_short_inverse_s.used); if (data->main->context.mode == f_console_verbosity_quiet_e) { - memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_quiet_s.string, sizeof(f_char_t) * f_console_standard_short_quiet_s.used); + memcpy(argument_string + f_console_symbol_short_inverse_s.used, f_console_standard_short_quiet_s.string, sizeof(f_char_t) * f_console_standard_short_quiet_s.used); } else if (data->main->context.mode == f_console_verbosity_error_e) { - memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_error_s.string, sizeof(f_char_t) * f_console_standard_short_error_s.used); + memcpy(argument_string + f_console_symbol_short_inverse_s.used, f_console_standard_short_error_s.string, sizeof(f_char_t) * f_console_standard_short_error_s.used); } else if (data->main->context.mode == f_console_verbosity_verbose_e) { - memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_verbose_s.string, sizeof(f_char_t) * f_console_standard_short_verbose_s.used); + memcpy(argument_string + f_console_symbol_short_inverse_s.used, f_console_standard_short_verbose_s.string, sizeof(f_char_t) * f_console_standard_short_verbose_s.used); } else if (data->main->context.mode == f_console_verbosity_debug_e) { - memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_debug_s.string, sizeof(f_char_t) * f_console_standard_short_debug_s.used); + memcpy(argument_string + f_console_symbol_short_inverse_s.used, f_console_standard_short_debug_s.string, sizeof(f_char_t) * f_console_standard_short_debug_s.used); } *status = fll_execute_arguments_add(argument, &arguments); @@ -639,13 +639,13 @@ extern "C" { } const f_string_static_t parameters_prefix[] = { - f_console_symbol_short_enable_s, - f_console_symbol_short_enable_s, - f_console_symbol_short_enable_s, - f_console_symbol_short_enable_s, - f_console_symbol_short_enable_s, - f_console_symbol_short_enable_s, - f_console_symbol_short_enable_s, + f_console_symbol_short_normal_s, + f_console_symbol_short_normal_s, + f_console_symbol_short_normal_s, + f_console_symbol_short_normal_s, + f_console_symbol_short_normal_s, + f_console_symbol_short_normal_s, + f_console_symbol_short_normal_s, }; const f_string_static_t parameters_name[] = { diff --git a/level_3/fake/c/private-fake.c b/level_3/fake/c/private-fake.c index ef22d22..4021efa 100644 --- a/level_3/fake/c/private-fake.c +++ b/level_3/fake/c/private-fake.c @@ -228,13 +228,13 @@ extern "C" { for (uint8_t i = 0; i < 3; ++i) { - if (data->main->parameters.array[parameters_id[i]].result == f_console_result_found_e) { + if (data->main->parameters.array[parameters_id[i]].result & f_console_result_found_e) { fake_print_error_parameter_missing_value(data, parameters_name[i]); return F_status_set_error(F_parameter); } - if (data->main->parameters.array[parameters_id[i]].result == f_console_result_additional_e) { + if (data->main->parameters.array[parameters_id[i]].result & f_console_result_value_e) { if (data->main->parameters.array[parameters_id[i]].locations.used > 1) { fake_print_error_parameter_too_many(data, parameters_name[i]); @@ -259,7 +259,7 @@ extern "C" { f_file_stream_lock(data->main->error); fl_print_format("%r%[%QFailed to process the parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); - fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_enable_s, fake_long_process_s, data->main->error.notable); + fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fake_long_process_s, data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); f_file_stream_unlock(data->main->error); @@ -273,7 +273,7 @@ extern "C" { f_file_stream_lock(data->main->error); fl_print_format("%r%[%QThe '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); - fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_enable_s, fake_long_process_s, data->main->error.notable); + fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fake_long_process_s, data->main->error.notable); fl_print_format("%[' parameters value '%]", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, data->main->parameters.arguments.array[index], data->main->error.notable); fl_print_format("%[' contains non-word, non-dash, and non-plus characters.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); @@ -302,7 +302,7 @@ extern "C" { f_file_stream_lock(data->main->error); fl_print_format("%r%[%QThe parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); - fl_print_format("%[%r%Q%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_enable_s, parameters_name[i], data->main->error.notable); + fl_print_format("%[%r%Q%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, parameters_name[i], data->main->error.notable); fl_print_format("%[' is too long.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); f_file_stream_unlock(data->main->error); @@ -323,7 +323,7 @@ extern "C" { f_file_stream_lock(data->main->error); fl_print_format("%r%[%QThe parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); - fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_enable_s, parameters_name[i], data->main->error.notable); + fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, parameters_name[i], data->main->error.notable); fl_print_format("%[' must not be empty and must not contain only white space.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); f_file_stream_unlock(data->main->error); @@ -352,7 +352,7 @@ extern "C" { } // for } - if (data->main->parameters.array[fake_parameter_define_e].result == f_console_result_found_e) { + if (data->main->parameters.array[fake_parameter_define_e].result & f_console_result_found_e) { fake_print_error_parameter_missing_value(data, fake_long_define_s); return F_status_set_error(F_parameter); @@ -385,13 +385,13 @@ extern "C" { for (uint8_t i = 0; i < 3; ++i) { - if (data->main->parameters.array[parameters_id[i]].result == f_console_result_found_e) { + if (data->main->parameters.array[parameters_id[i]].result & f_console_result_found_e) { fake_print_error_parameter_missing_value(data, parameters_name[i]); return F_status_set_error(F_parameter); } - if (data->main->parameters.array[parameters_id[i]].result == f_console_result_additional_e) { + if (data->main->parameters.array[parameters_id[i]].result & f_console_result_value_e) { if (data->main->parameters.array[parameters_id[i]].values.used > 1) { fake_print_error_parameter_too_many(data, parameters_name[i]); @@ -417,7 +417,7 @@ extern "C" { f_file_stream_lock(data->main->error); fl_print_format("%r%[%QFailed to process parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); - fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_enable_s, parameters_name[i], data->main->error.notable); + fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, parameters_name[i], data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); f_file_stream_unlock(data->main->error); @@ -444,7 +444,7 @@ extern "C" { f_file_stream_lock(data->main->error); fl_print_format("%r%[%QFailed to load default for the parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); - fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_enable_s, parameters_name[i], data->main->error.notable); + fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, parameters_name[i], data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); f_file_stream_unlock(data->main->error); @@ -456,7 +456,7 @@ extern "C" { } // for } - if (data->main->parameters.array[fake_parameter_define_e].result == f_console_result_additional_e) { + if (data->main->parameters.array[fake_parameter_define_e].result & f_console_result_value_e) { status = fll_program_parameter_additional_rip(data->main->parameters.arguments.array, data->main->parameters.array[fake_parameter_define_e].values, &data->define); if (F_status_is_error(status)) { @@ -464,7 +464,7 @@ extern "C" { f_file_stream_lock(data->main->error); fl_print_format("%r%[%QFailed to process the parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); - fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_enable_s, fake_long_define_s, data->main->error.notable); + fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fake_long_define_s, data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); f_file_stream_unlock(data->main->error); @@ -474,13 +474,13 @@ extern "C" { } } - if (data->main->parameters.array[fake_parameter_mode_e].result == f_console_result_found_e) { + if (data->main->parameters.array[fake_parameter_mode_e].result & f_console_result_found_e) { fake_print_error_parameter_missing_value(data, fake_long_mode_s); return F_status_set_error(F_parameter); } - if (data->main->parameters.array[fake_parameter_mode_e].result == f_console_result_additional_e) { + if (data->main->parameters.array[fake_parameter_mode_e].result & f_console_result_value_e) { status = fll_program_parameter_additional_rip(data->main->parameters.arguments.array, data->main->parameters.array[fake_parameter_mode_e].values, &data->mode); if (F_status_is_error(status)) { @@ -488,7 +488,7 @@ extern "C" { f_file_stream_lock(data->main->error); fl_print_format("%r%[%QFailed to process the parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); - fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_enable_s, fake_long_mode_s, data->main->error.notable); + fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fake_long_mode_s, data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); f_file_stream_unlock(data->main->error); @@ -514,7 +514,7 @@ extern "C" { f_file_stream_lock(data->main->error); fl_print_format("%r%[%QFailed to process the parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); - fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_enable_s, fake_long_mode_s, data->main->error.notable); + fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fake_long_mode_s, data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); f_file_stream_unlock(data->main->error); @@ -528,8 +528,8 @@ extern "C" { f_file_stream_lock(data->main->error); fl_print_format("%r%[%QThe '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); - fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_enable_s, fake_long_mode_s, data->main->error.notable); - fl_print_format("%[' parameters value '%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_enable_s, fake_long_mode_s, data->main->error.notable); + fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fake_long_mode_s, data->main->error.notable); + fl_print_format("%[' parameters value '%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fake_long_mode_s, data->main->error.notable); fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, data->mode.array[i], data->main->error.notable); fl_print_format("%[' contains non-word, non-dash, and non-plus characters.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); @@ -579,7 +579,7 @@ extern "C" { if (data->operation == fake_operation_make_e) { // If a custom --data or a custom --fakefile parameter is passed and uses an absolute or relative to current path, then do not check. - if (data->main->parameters.array[fake_parameter_fakefile_e].result == f_console_result_additional_e) { + if (data->main->parameters.array[fake_parameter_fakefile_e].result & f_console_result_value_e) { const f_array_length_t index = data->main->parameters.array[fake_parameter_fakefile_e].values.array[data->main->parameters.array[fake_parameter_fakefile_e].values.used - 1]; if (f_path_is_absolute(data->main->parameters.arguments.array[index]) == F_true || f_path_is_relative_current(data->main->parameters.arguments.array[index]) == F_true) { @@ -597,7 +597,7 @@ extern "C" { else if (data->operation == fake_operation_build_e) { // If a custom --data or a custom --settings parameter is passed and uses an absolute or relative to current path, then do not check. - if (data->main->parameters.array[fake_parameter_settings_e].result == f_console_result_additional_e) { + if (data->main->parameters.array[fake_parameter_settings_e].result & f_console_result_value_e) { const f_array_length_t index = data->main->parameters.array[fake_parameter_settings_e].values.array[data->main->parameters.array[fake_parameter_settings_e].values.used - 1]; if (f_path_is_absolute(data->main->parameters.arguments.array[index]) == F_true || f_path_is_relative_current(data->main->parameters.arguments.array[index]) == F_true) { @@ -636,7 +636,7 @@ extern "C" { f_file_stream_lock(data->main->error); fl_print_format("%r%[%QNo valid path for the (required) directory parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); - fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_enable_s, parameters_name[i], data->main->error.notable); + fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, parameters_name[i], data->main->error.notable); fl_print_format("%[' was found.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); f_file_stream_unlock(data->main->error); diff --git a/level_3/fake/c/private-make-load_parameters.c b/level_3/fake/c/private-make-load_parameters.c index 6ebcae2..689e94d 100644 --- a/level_3/fake/c/private-make-load_parameters.c +++ b/level_3/fake/c/private-make-load_parameters.c @@ -25,11 +25,11 @@ extern "C" { } if (data_make->main->context.mode == f_color_mode_color_not_e) { - if (data_make->main->parameters.array[fake_parameter_no_color_e].type == f_console_type_normal_e) { - *status = f_string_dynamic_append(f_console_symbol_short_enable_s, &data_make->parameter.color.array[data_make->parameter.color.used]); + if (data_make->main->parameters.array[fake_parameter_no_color_e].flag & f_console_flag_normal_e) { + *status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.color.array[data_make->parameter.color.used]); } - else if (data_make->main->parameters.array[fake_parameter_no_color_e].type == f_console_type_inverse_e) { - *status = f_string_dynamic_append(f_console_symbol_short_disable_s, &data_make->parameter.color.array[data_make->parameter.color.used]); + else if (data_make->main->parameters.array[fake_parameter_no_color_e].flag & f_console_flag_normal_e) { + *status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.color.array[data_make->parameter.color.used]); } if (F_status_is_error_not(*status)) { @@ -37,11 +37,11 @@ extern "C" { } } else if (data_make->main->context.mode == f_color_mode_dark_e) { - if (data_make->main->parameters.array[fake_parameter_dark_e].type == f_console_type_normal_e) { - *status = f_string_dynamic_append(f_console_symbol_short_enable_s, &data_make->parameter.color.array[data_make->parameter.color.used]); + if (data_make->main->parameters.array[fake_parameter_dark_e].flag & f_console_flag_normal_e) { + *status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.color.array[data_make->parameter.color.used]); } - else if (data_make->main->parameters.array[fake_parameter_dark_e].type == f_console_type_inverse_e) { - *status = f_string_dynamic_append(f_console_symbol_short_disable_s, &data_make->parameter.color.array[data_make->parameter.color.used]); + else if (data_make->main->parameters.array[fake_parameter_dark_e].flag & f_console_flag_normal_e) { + *status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.color.array[data_make->parameter.color.used]); } if (F_status_is_error_not(*status)) { @@ -49,11 +49,11 @@ extern "C" { } } else { - if (data_make->main->parameters.array[fake_parameter_light_e].type == f_console_type_normal_e) { - *status = f_string_dynamic_append(f_console_symbol_short_enable_s, &data_make->parameter.color.array[data_make->parameter.color.used]); + if (data_make->main->parameters.array[fake_parameter_light_e].flag & f_console_flag_normal_e) { + *status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.color.array[data_make->parameter.color.used]); } - else if (data_make->main->parameters.array[fake_parameter_light_e].type == f_console_type_inverse_e) { - *status = f_string_dynamic_append(f_console_symbol_short_disable_s, &data_make->parameter.color.array[data_make->parameter.color.used]); + else if (data_make->main->parameters.array[fake_parameter_light_e].flag & f_console_flag_normal_e) { + *status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.color.array[data_make->parameter.color.used]); } if (F_status_is_error_not(*status)) { @@ -89,11 +89,11 @@ extern "C" { } if (data_make->main->error.verbosity == f_console_verbosity_quiet_e) { - if (data_make->main->parameters.array[fake_parameter_verbosity_quiet_e].type == f_console_type_normal_e) { - *status = f_string_dynamic_append(f_console_symbol_short_enable_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); + if (data_make->main->parameters.array[fake_parameter_verbosity_quiet_e].flag & f_console_flag_normal_e) { + *status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } - else if (data_make->main->parameters.array[fake_parameter_verbosity_quiet_e].type == f_console_type_inverse_e) { - *status = f_string_dynamic_append(f_console_symbol_short_disable_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); + else if (data_make->main->parameters.array[fake_parameter_verbosity_quiet_e].flag & f_console_flag_normal_e) { + *status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } if (F_status_is_error_not(*status)) { @@ -101,11 +101,11 @@ extern "C" { } } else if (data_make->main->error.verbosity == f_console_verbosity_error_e) { - if (data_make->main->parameters.array[fake_parameter_verbosity_error_e].type == f_console_type_normal_e) { - *status = f_string_dynamic_append(f_console_symbol_short_enable_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); + if (data_make->main->parameters.array[fake_parameter_verbosity_error_e].flag & f_console_flag_normal_e) { + *status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } - else if (data_make->main->parameters.array[fake_parameter_verbosity_error_e].type == f_console_type_inverse_e) { - *status = f_string_dynamic_append(f_console_symbol_short_disable_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); + else if (data_make->main->parameters.array[fake_parameter_verbosity_error_e].flag & f_console_flag_normal_e) { + *status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } if (F_status_is_error_not(*status)) { @@ -113,11 +113,11 @@ extern "C" { } } else if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - if (data_make->main->parameters.array[fake_parameter_verbosity_verbose_e].type == f_console_type_normal_e) { - *status = f_string_dynamic_append(f_console_symbol_short_enable_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); + if (data_make->main->parameters.array[fake_parameter_verbosity_verbose_e].flag & f_console_flag_normal_e) { + *status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } - else if (data_make->main->parameters.array[fake_parameter_verbosity_verbose_e].type == f_console_type_inverse_e) { - *status = f_string_dynamic_append(f_console_symbol_short_disable_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); + else if (data_make->main->parameters.array[fake_parameter_verbosity_verbose_e].flag & f_console_flag_normal_e) { + *status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } if (F_status_is_error_not(*status)) { @@ -125,11 +125,11 @@ extern "C" { } } else { - if (data_make->main->parameters.array[fake_parameter_verbosity_debug_e].type == f_console_type_normal_e) { - *status = f_string_dynamic_append(f_console_symbol_short_enable_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); + if (data_make->main->parameters.array[fake_parameter_verbosity_debug_e].flag & f_console_flag_normal_e) { + *status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } - else if (data_make->main->parameters.array[fake_parameter_verbosity_debug_e].type == f_console_type_inverse_e) { - *status = f_string_dynamic_append(f_console_symbol_short_disable_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); + else if (data_make->main->parameters.array[fake_parameter_verbosity_debug_e].flag & f_console_flag_normal_e) { + *status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]); } if (F_status_is_error_not(*status)) { @@ -187,9 +187,7 @@ extern "C" { for (; i < 2; ++i) { - if (console[i]->result == f_console_result_none_e) { - continue; - } + if (!(console[i]->result & f_console_result_found_e)) continue; for (j = 0; j < source[i]->used; ++j) { @@ -215,11 +213,11 @@ extern "C" { return; } - if (console[i]->type == f_console_type_normal_e) { - *status = f_string_dynamic_append_nulless(f_console_symbol_short_enable_s, &destination[i]->array[destination[i]->used]); + if (console[i]->flag & f_console_flag_normal_e) { + *status = f_string_dynamic_append_nulless(f_console_symbol_short_normal_s, &destination[i]->array[destination[i]->used]); } - else if (console[i]->type == f_console_type_inverse_e) { - *status = f_string_dynamic_append_nulless(f_console_symbol_short_disable_s, &destination[i]->array[destination[i]->used]); + else if (console[i]->flag & f_console_flag_inverse_e) { + *status = f_string_dynamic_append_nulless(f_console_symbol_short_inverse_s, &destination[i]->array[destination[i]->used]); } if (F_status_is_error_not(*status)) { @@ -328,9 +326,7 @@ extern "C" { for (uint8_t i = 0; i < 7; ++i) { - if (console[i]->result == f_console_result_none_e) { - continue; - } + if (!(console[i]->result & f_console_result_found_e)) continue; if (destination[i]->used + 2 > destination[i]->size) { *status = f_string_dynamics_increase_by(fake_default_allocation_small_d, destination[i]); @@ -354,11 +350,11 @@ extern "C" { return; } - if (console[i]->type == f_console_type_normal_e) { - *status = f_string_dynamic_append_nulless(f_console_symbol_short_enable_s, &destination[i]->array[destination[i]->used]); + if (console[i]->flag & f_console_flag_normal_e) { + *status = f_string_dynamic_append_nulless(f_console_symbol_short_normal_s, &destination[i]->array[destination[i]->used]); } - else if (console[i]->type == f_console_type_inverse_e) { - *status = f_string_dynamic_append_nulless(f_console_symbol_short_disable_s, &destination[i]->array[destination[i]->used]); + else if (console[i]->flag & f_console_flag_inverse_e) { + *status = f_string_dynamic_append_nulless(f_console_symbol_short_inverse_s, &destination[i]->array[destination[i]->used]); } if (F_status_is_error_not(*status)) { 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 73e0e2d..1c20f49 100644 --- a/level_3/fake/c/private-make-operate_process_type.c +++ b/level_3/fake/c/private-make-operate_process_type.c @@ -1209,17 +1209,17 @@ extern "C" { data_make->data->path_sources.used, F_true, data_make->data->path_work.used, - data_make->main->parameters.array[fake_parameter_path_build_e].result == f_console_result_additional_e, - data_make->main->parameters.array[fake_parameter_light_e].result == f_console_result_found_e || data_make->main->parameters.array[fake_parameter_dark_e].result == f_console_result_found_e || data_make->main->parameters.array[fake_parameter_no_color_e].result == f_console_result_found_e, - data_make->main->parameters.array[fake_parameter_path_data_e].result == f_console_result_additional_e, - data_make->main->parameters.array[fake_parameter_define_e].result == f_console_result_additional_e, - data_make->main->parameters.array[fake_parameter_fakefile_e].result == f_console_result_additional_e, - data_make->main->parameters.array[fake_parameter_mode_e].result == f_console_result_additional_e, - data_make->main->parameters.array[fake_parameter_process_e].result == f_console_result_additional_e, - data_make->main->parameters.array[fake_parameter_settings_e].result == f_console_result_additional_e, - data_make->main->parameters.array[fake_parameter_path_sources_e].result == f_console_result_additional_e, - data_make->main->parameters.array[fake_parameter_verbosity_quiet_e].result == f_console_result_found_e || data_make->main->parameters.array[fake_parameter_verbosity_normal_e].result == f_console_result_found_e || data_make->main->parameters.array[fake_parameter_verbosity_verbose_e].result == f_console_result_found_e || data_make->main->parameters.array[fake_parameter_verbosity_debug_e].result == f_console_result_found_e, - data_make->main->parameters.array[fake_parameter_path_work_e].result == f_console_result_additional_e, + data_make->main->parameters.array[fake_parameter_path_build_e].result & f_console_result_value_e, + (data_make->main->parameters.array[fake_parameter_light_e].result & f_console_result_found_e) || (data_make->main->parameters.array[fake_parameter_dark_e].result & f_console_result_found_e) || (data_make->main->parameters.array[fake_parameter_no_color_e].result & f_console_result_found_e), + data_make->main->parameters.array[fake_parameter_path_data_e].result & f_console_result_value_e, + data_make->main->parameters.array[fake_parameter_define_e].result & f_console_result_value_e, + data_make->main->parameters.array[fake_parameter_fakefile_e].result & f_console_result_value_e, + data_make->main->parameters.array[fake_parameter_mode_e].result & f_console_result_value_e, + data_make->main->parameters.array[fake_parameter_process_e].result & f_console_result_value_e, + data_make->main->parameters.array[fake_parameter_settings_e].result & f_console_result_value_e, + data_make->main->parameters.array[fake_parameter_path_sources_e].result & f_console_result_value_e, + (data_make->main->parameters.array[fake_parameter_verbosity_quiet_e].result & f_console_result_found_e) || (data_make->main->parameters.array[fake_parameter_verbosity_normal_e].result & f_console_result_found_e) || (data_make->main->parameters.array[fake_parameter_verbosity_verbose_e].result & f_console_result_found_e) || (data_make->main->parameters.array[fake_parameter_verbosity_debug_e].result & f_console_result_found_e), + data_make->main->parameters.array[fake_parameter_path_work_e].result & f_console_result_value_e, data_make->parameter_value.build.used, data_make->parameter_value.color.used, data_make->parameter_value.data.used, diff --git a/level_3/fake/c/private-print.c b/level_3/fake/c/private-print.c index c7c3071..1691530 100644 --- a/level_3/fake/c/private-print.c +++ b/level_3/fake/c/private-print.c @@ -306,7 +306,7 @@ extern "C" { f_file_stream_lock(data->main->error); fl_print_format("%r%[%QThe parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); - fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_enable_s, parameter, data->main->error.notable); + fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, parameter, data->main->error.notable); fl_print_format("%[' is specified, but no value is given.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); f_file_stream_unlock(data->main->error); @@ -321,7 +321,7 @@ extern "C" { f_file_stream_lock(data->main->error); fl_print_format("%r%[%QThe parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); - fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_enable_s, parameter, data->main->error.notable); + fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, parameter, data->main->error.notable); fl_print_format("%[' was specified too many times.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); f_file_stream_unlock(data->main->error); diff --git a/level_3/firewall/c/common.c b/level_3/firewall/c/common.c index 8fb90a8..a3f2d79 100644 --- a/level_3/firewall/c/common.c +++ b/level_3/firewall/c/common.c @@ -153,14 +153,14 @@ extern "C" { } } - if (main->parameters.array[firewall_parameter_line_first_no_e].result == f_console_result_found_e) { + if (main->parameters.array[firewall_parameter_line_first_no_e].result & f_console_result_found_e) { setting->line_first = f_string_empty_s; } else { setting->line_first = f_string_eol_s; } - if (main->parameters.array[firewall_parameter_line_last_no_e].result == f_console_result_found_e) { + if (main->parameters.array[firewall_parameter_line_last_no_e].result & f_console_result_found_e) { setting->line_last = f_string_empty_s; } else { @@ -186,13 +186,13 @@ extern "C" { } } - if (main->parameters.array[firewall_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[firewall_parameter_help_e].result & f_console_result_found_e) { setting->flag |= firewall_main_flag_help_e; return; } - if (main->parameters.array[firewall_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[firewall_parameter_version_e].result & f_console_result_found_e) { setting->flag |= firewall_main_flag_version_e; return; @@ -205,7 +205,7 @@ extern "C" { f_string_static_t * const args = main->parameters.arguments.array; - if (main->parameters.array[firewall_parameter_strip_invalid_e].result == f_console_result_found_e) { + if (main->parameters.array[firewall_parameter_strip_invalid_e].result & f_console_result_found_e) { setting->flag |= firewall_main_flag_strip_invalid_e; } } diff --git a/level_3/firewall/c/common.h b/level_3/firewall/c/common.h index fb7e431..8a80dea 100644 --- a/level_3/firewall/c/common.h +++ b/level_3/firewall/c/common.h @@ -386,24 +386,24 @@ extern "C" { #define firewall_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \ \ - macro_f_console_parameter_t_initialize2(0, 0, firewall_command_start_s.string, F_false, f_console_type_other_e), \ - macro_f_console_parameter_t_initialize2(0, 0, firewall_command_stop_s.string, F_false, f_console_type_other_e), \ - macro_f_console_parameter_t_initialize2(0, 0, firewall_command_restart_s.string, F_false, f_console_type_other_e), \ - macro_f_console_parameter_t_initialize2(0, 0, firewall_command_lock_s.string, F_false, f_console_type_other_e), \ - macro_f_console_parameter_t_initialize2(0, 0, firewall_command_show_s.string, F_false, f_console_type_other_e), \ + macro_f_console_parameter_t_initialize2(0, 0, firewall_command_start_s.string, F_false, f_console_flag_simple_e), \ + macro_f_console_parameter_t_initialize2(0, 0, firewall_command_stop_s.string, F_false, f_console_flag_simple_e), \ + macro_f_console_parameter_t_initialize2(0, 0, firewall_command_restart_s.string, F_false, f_console_flag_simple_e), \ + macro_f_console_parameter_t_initialize2(0, 0, firewall_command_lock_s.string, F_false, f_console_flag_simple_e), \ + macro_f_console_parameter_t_initialize2(0, 0, firewall_command_show_s.string, F_false, f_console_flag_simple_e), \ } #define firewall_total_parameters_d 17 diff --git a/level_3/firewall/c/firewall.c b/level_3/firewall/c/firewall.c index 0e8489b..340cfa5 100644 --- a/level_3/firewall/c/firewall.c +++ b/level_3/firewall/c/firewall.c @@ -72,13 +72,13 @@ extern "C" { status = F_none; - if (main->parameters.array[firewall_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[firewall_parameter_help_e].result & f_console_result_found_e) { firewall_print_help(setting, main->message); return F_none; } - if (main->parameters.array[firewall_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[firewall_parameter_version_e].result & f_console_result_found_e) { fll_program_print_version(main->message, firewall_program_version_s); return F_none; @@ -88,12 +88,12 @@ extern "C" { bool found_command = F_false; unsigned int command = 0; - if (main->parameters.array[firewall_parameter_command_start_e].result == f_console_result_found_e) { + if (main->parameters.array[firewall_parameter_command_start_e].result & f_console_result_found_e) { command = firewall_parameter_command_start_e; found_command = F_true; } - if (main->parameters.array[firewall_parameter_command_stop_e].result == f_console_result_found_e) { + if (main->parameters.array[firewall_parameter_command_stop_e].result & f_console_result_found_e) { if (found_command) { if (main->parameters.array[command].values.array[0] > main->parameters.array[firewall_parameter_command_stop_e].values.array[0]) { command = firewall_parameter_command_stop_e; @@ -105,7 +105,7 @@ extern "C" { } } - if (main->parameters.array[firewall_parameter_command_restart_e].result == f_console_result_found_e) { + if (main->parameters.array[firewall_parameter_command_restart_e].result & f_console_result_found_e) { if (found_command) { if (main->parameters.array[command].values.array[0] > main->parameters.array[firewall_parameter_command_restart_e].values.array[0]) { command = firewall_parameter_command_restart_e; @@ -117,7 +117,7 @@ extern "C" { } } - if (main->parameters.array[firewall_parameter_command_lock_e].result == f_console_result_found_e) { + if (main->parameters.array[firewall_parameter_command_lock_e].result & f_console_result_found_e) { if (found_command) { if (main->parameters.array[command].values.array[0] > main->parameters.array[firewall_parameter_command_lock_e].values.array[0]) { command = firewall_parameter_command_lock_e; @@ -129,7 +129,7 @@ extern "C" { } } - if (main->parameters.array[firewall_parameter_command_show_e].result == f_console_result_found_e) { + if (main->parameters.array[firewall_parameter_command_show_e].result & f_console_result_found_e) { if (found_command) { if (main->parameters.array[command].values.array[0] > main->parameters.array[firewall_parameter_command_show_e].values.array[0]) { command = firewall_parameter_command_show_e; diff --git a/level_3/fss_basic_list_read/c/common.c b/level_3/fss_basic_list_read/c/common.c index 98000c2..87f82c8 100644 --- a/level_3/fss_basic_list_read/c/common.c +++ b/level_3/fss_basic_list_read/c/common.c @@ -111,14 +111,14 @@ extern "C" { } } - if (main->parameters.array[fss_basic_list_read_parameter_line_first_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_read_parameter_line_first_no_e].result & f_console_result_found_e) { setting->line_first = f_string_empty_s; } else { setting->line_first = f_string_eol_s; } - if (main->parameters.array[fss_basic_list_read_parameter_line_last_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_read_parameter_line_last_no_e].result & f_console_result_found_e) { setting->line_last = f_string_empty_s; } else { @@ -144,13 +144,13 @@ extern "C" { } } - if (main->parameters.array[fss_basic_list_read_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_read_parameter_help_e].result & f_console_result_found_e) { setting->flag |= fss_basic_list_read_main_flag_help_e; return; } - if (main->parameters.array[fss_basic_list_read_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_read_parameter_version_e].result & f_console_result_found_e) { setting->flag |= fss_basic_list_read_main_flag_version_e; return; @@ -163,7 +163,7 @@ extern "C" { f_string_static_t * const args = main->parameters.arguments.array; - if (main->parameters.array[fss_basic_list_read_parameter_strip_invalid_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_read_parameter_strip_invalid_e].result & f_console_result_found_e) { setting->flag |= fss_basic_list_read_main_flag_strip_invalid_e; } } diff --git a/level_3/fss_basic_list_read/c/common.h b/level_3/fss_basic_list_read/c/common.h index 7a3adab..d822b30 100644 --- a/level_3/fss_basic_list_read/c/common.h +++ b/level_3/fss_basic_list_read/c/common.h @@ -216,33 +216,33 @@ extern "C" { #define fss_basic_list_read_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \ \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_at_s.string, fss_basic_list_read_long_at_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_content_s.string, fss_basic_list_read_long_content_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_columns_s.string, fss_basic_list_read_long_columns_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_delimit_s.string, fss_basic_list_read_long_delimit_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_depth_s.string, fss_basic_list_read_long_depth_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_empty_s.string, fss_basic_list_read_long_empty_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_line_s.string, fss_basic_list_read_long_line_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_name_s.string, fss_basic_list_read_long_name_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_object_s.string, fss_basic_list_read_long_object_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_pipe_s.string, fss_basic_list_read_long_pipe_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_original_s.string, fss_basic_list_read_long_original_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_select_s.string, fss_basic_list_read_long_select_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_total_s.string, fss_basic_list_read_long_total_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_trim_s.string, fss_basic_list_read_long_trim_s.string, 0, 0, f_console_type_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_at_s.string, fss_basic_list_read_long_at_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_content_s.string, fss_basic_list_read_long_content_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_columns_s.string, fss_basic_list_read_long_columns_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_delimit_s.string, fss_basic_list_read_long_delimit_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_depth_s.string, fss_basic_list_read_long_depth_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_empty_s.string, fss_basic_list_read_long_empty_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_line_s.string, fss_basic_list_read_long_line_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_name_s.string, fss_basic_list_read_long_name_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_object_s.string, fss_basic_list_read_long_object_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_pipe_s.string, fss_basic_list_read_long_pipe_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_original_s.string, fss_basic_list_read_long_original_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_select_s.string, fss_basic_list_read_long_select_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_total_s.string, fss_basic_list_read_long_total_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_list_read_short_trim_s.string, fss_basic_list_read_long_trim_s.string, 0, 0, f_console_flag_normal_e), \ } #define fss_basic_list_read_total_parameters_d 26 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 a73a06f..073ca6c 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 @@ -61,13 +61,13 @@ extern "C" { status = F_none; - if (main->parameters.array[fss_basic_list_read_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_read_parameter_help_e].result & f_console_result_found_e) { fss_basic_list_read_print_help(setting, main->message); return status; } - if (main->parameters.array[fss_basic_list_read_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_read_parameter_version_e].result & f_console_result_found_e) { fll_program_print_version(main->message, fss_basic_list_read_program_version_s); return status; @@ -120,11 +120,11 @@ extern "C" { for (f_array_length_t i = 0; i < 6; ++i) { - if (main->parameters.array[parameter_code[i]].result == f_console_result_found_e) { + if (main->parameters.array[parameter_code[i]].result & f_console_result_found_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, parameter_name[i], main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, parameter_name[i], main->error.notable); fl_print_format("%[' requires a %s.%]%r", main->error.to, main->error.context, parameter_message[i], main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -136,7 +136,7 @@ extern "C" { } // for } - if (F_status_is_error_not(status) && main->parameters.array[fss_basic_list_read_parameter_columns_e].result == f_console_result_found_e) { + if (F_status_is_error_not(status) && (main->parameters.array[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_e, fss_basic_list_read_parameter_line_e, @@ -165,7 +165,7 @@ extern "C" { if (main->parameters.array[parameter_code[i]].result == parameter_match[i]) { if (main->error.verbosity > f_console_verbosity_quiet_e) { - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, fss_basic_list_read_long_columns_s, parameter_name[i]); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_basic_list_read_long_columns_s, parameter_name[i]); } status = F_status_set_error(F_parameter); @@ -175,24 +175,24 @@ extern "C" { } // for } - if (F_status_is_error_not(status) && main->parameters.array[fss_basic_list_read_parameter_pipe_e].result == f_console_result_found_e) { - if (main->parameters.array[fss_basic_list_read_parameter_total_e].result == f_console_result_found_e) { + if (F_status_is_error_not(status) && (main->parameters.array[fss_basic_list_read_parameter_pipe_e].result & f_console_result_found_e)) { + if (main->parameters.array[fss_basic_list_read_parameter_total_e].result & f_console_result_found_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, fss_basic_list_read_long_pipe_s, fss_basic_list_read_long_total_s); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_basic_list_read_long_pipe_s, fss_basic_list_read_long_total_s); } status = F_status_set_error(F_parameter); } - else if (main->parameters.array[fss_basic_list_read_parameter_line_e].result == f_console_result_additional_e) { + else if (main->parameters.array[fss_basic_list_read_parameter_line_e].result & f_console_result_value_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, fss_basic_list_read_long_pipe_s, fss_basic_list_read_long_line_s); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_basic_list_read_long_pipe_s, fss_basic_list_read_long_line_s); } status = F_status_set_error(F_parameter); } } - if (F_status_is_error_not(status) && main->parameters.array[fss_basic_list_read_parameter_delimit_e].result == f_console_result_additional_e) { + if (F_status_is_error_not(status) && main->parameters.array[fss_basic_list_read_parameter_delimit_e].result & f_console_result_value_e) { f_array_length_t index = 0; f_array_length_t length = 0; @@ -220,7 +220,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe value for the parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_delimit_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_delimit_s, main->error.notable); fl_print_format("%[' must not be empty.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -340,7 +340,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) { - if (main->parameters.array[fss_basic_list_read_parameter_total_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_read_parameter_total_e].result & f_console_result_found_e) { fss_basic_list_read_print_zero(main); } @@ -349,11 +349,11 @@ extern "C" { return F_none; } - if (F_status_is_error_not(status) && main->parameters.array[fss_basic_list_read_parameter_select_e].result == f_console_result_found_e) { + if (F_status_is_error_not(status) && (main->parameters.array[fss_basic_list_read_parameter_select_e].result & f_console_result_found_e)) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_select_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_select_s, main->error.notable); fl_print_format("%[' parameter requires a positive number.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); diff --git a/level_3/fss_basic_list_read/c/print.c b/level_3/fss_basic_list_read/c/print.c index a9df475..0ef43f7 100644 --- a/level_3/fss_basic_list_read/c/print.c +++ b/level_3/fss_basic_list_read/c/print.c @@ -18,20 +18,20 @@ extern "C" { f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, fss_basic_list_read_short_at_s, fss_basic_list_read_long_at_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric index."); - fll_program_print_help_option(print, fss_basic_list_read_short_content_s, fss_basic_list_read_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Content (default)."); - fll_program_print_help_option(print, fss_basic_list_read_short_columns_s, fss_basic_list_read_long_columns_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns."); - fll_program_print_help_option(print, fss_basic_list_read_short_delimit_s, fss_basic_list_read_long_delimit_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits."); - fll_program_print_help_option(print, fss_basic_list_read_short_depth_s, fss_basic_list_read_long_depth_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth."); - fll_program_print_help_option(print, fss_basic_list_read_short_empty_s, fss_basic_list_read_long_empty_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing."); - fll_program_print_help_option(print, fss_basic_list_read_short_line_s, fss_basic_list_read_long_line_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line."); - fll_program_print_help_option(print, fss_basic_list_read_short_name_s, fss_basic_list_read_long_name_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name."); - fll_program_print_help_option(print, fss_basic_list_read_short_object_s, fss_basic_list_read_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object."); - fll_program_print_help_option(print, fss_basic_list_read_short_pipe_s, fss_basic_list_read_long_pipe_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format."); - fll_program_print_help_option(print, fss_basic_list_read_short_original_s, fss_basic_list_read_long_original_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print with the original quotes and escapes."); - fll_program_print_help_option(print, fss_basic_list_read_short_select_s, fss_basic_list_read_long_select_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index."); - fll_program_print_help_option(print, fss_basic_list_read_short_total_s, fss_basic_list_read_long_total_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines."); - fll_program_print_help_option(print, fss_basic_list_read_short_trim_s, fss_basic_list_read_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print."); + fll_program_print_help_option(print, fss_basic_list_read_short_at_s, fss_basic_list_read_long_at_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select Object at this numeric index."); + fll_program_print_help_option(print, fss_basic_list_read_short_content_s, fss_basic_list_read_long_content_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the Content (default)."); + fll_program_print_help_option(print, fss_basic_list_read_short_columns_s, fss_basic_list_read_long_columns_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the total number of columns."); + fll_program_print_help_option(print, fss_basic_list_read_short_delimit_s, fss_basic_list_read_long_delimit_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Designate how to handle applying delimits."); + fll_program_print_help_option(print, fss_basic_list_read_short_depth_s, fss_basic_list_read_long_depth_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select Object at this numeric depth."); + fll_program_print_help_option(print, fss_basic_list_read_short_empty_s, fss_basic_list_read_long_empty_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Include empty Content when processing."); + fll_program_print_help_option(print, fss_basic_list_read_short_line_s, fss_basic_list_read_long_line_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print only the Content at the given line."); + fll_program_print_help_option(print, fss_basic_list_read_short_name_s, fss_basic_list_read_long_name_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select Object with this name."); + fll_program_print_help_option(print, fss_basic_list_read_short_object_s, fss_basic_list_read_long_object_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the Object."); + fll_program_print_help_option(print, fss_basic_list_read_short_pipe_s, fss_basic_list_read_long_pipe_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print using the special pipe format."); + fll_program_print_help_option(print, fss_basic_list_read_short_original_s, fss_basic_list_read_long_original_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Print with the original quotes and escapes."); + fll_program_print_help_option(print, fss_basic_list_read_short_select_s, fss_basic_list_read_long_select_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select sub-Content at this index."); + fll_program_print_help_option(print, fss_basic_list_read_short_total_s, fss_basic_list_read_long_total_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the total number of lines."); + fll_program_print_help_option(print, fss_basic_list_read_short_trim_s, fss_basic_list_read_long_trim_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Trim Object names on select or print."); f_print_dynamic_raw(f_string_eol_s, print.to); f_print_dynamic_raw(f_string_eol_s, print.to); @@ -45,47 +45,47 @@ extern "C" { fl_print_format(" All numeric positions (indexes) start at 0 instead of 1.%r", print.to, f_string_eol_s); fl_print_format(" For example, a file of 17 lines would range from 0 to 16.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" When using the %[%r%r%] option, an order of operations is enforced on the parameters.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth_s, print.set->notable, f_string_eol_s); + fl_print_format(" When using the %[%r%r%] option, an order of operations is enforced on the parameters.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_depth_s, print.set->notable, f_string_eol_s); fl_print_format(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%r", print.to, f_string_eol_s); - fl_print_format(" %[%r%r%]: An Object index at the specified depth.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_at_s, print.set->notable, f_string_eol_s); - fl_print_format(" %[%r%r%]: A new depth within the specified depth, indexed from the root.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth_s, print.set->notable, f_string_eol_s); - fl_print_format(" %[%r%r%]: An Object name at the specified depth.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" %[%r%r%]: An Object index at the specified depth.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_at_s, print.set->notable, f_string_eol_s); + fl_print_format(" %[%r%r%]: A new depth within the specified depth, indexed from the root.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_depth_s, print.set->notable, f_string_eol_s); + fl_print_format(" %[%r%r%]: An Object name at the specified depth.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%] must be in numeric order, but values in between may be skipped.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth_s, print.set->notable, f_string_eol_s); + fl_print_format(" The parameter %[%r%r%] must be in numeric order, but values in between may be skipped.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_depth_s, print.set->notable, f_string_eol_s); fl_print_format(" ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%r", print.to, f_string_eol_s); fl_print_format(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%] selects a Content column.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_select_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" The parameter %[%r%r%] selects a Content column.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_select_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" Specify both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_object_s, print.set->notable); - fl_print_format(" and the %[%r%r%] parameters to get the total objects.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_total_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" Specify both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_object_s, print.set->notable); + fl_print_format(" and the %[%r%r%] parameters to get the total objects.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_total_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" When both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_at_s, print.set->notable); - fl_print_format(" and %[%r%r%] parameters are specified (at the same depth),", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_name_s, print.set->notable); - fl_print_format(" the %[%r%r%] parameter value will be treated as a position relative to the specified", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_at_s, print.set->notable); - fl_print_format(" %[%r%r%] parameter value.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" When both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_at_s, print.set->notable); + fl_print_format(" and %[%r%r%] parameters are specified (at the same depth),", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_name_s, print.set->notable); + fl_print_format(" the %[%r%r%] parameter value will be treated as a position relative to the specified", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_at_s, print.set->notable); + fl_print_format(" %[%r%r%] parameter value.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" This program may support parameters, such as %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth_s, print.set->notable); - fl_print_format(" or %[%r%r%], even if not supported by the standard.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_select_s, print.set->notable, f_string_eol_s); + fl_print_format(" This program may support parameters, such as %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_depth_s, print.set->notable); + fl_print_format(" or %[%r%r%], even if not supported by the standard.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_select_s, print.set->notable, f_string_eol_s); fl_print_format(" This is done to help ensure consistency for scripting.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth_s, print.set->notable); + fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_depth_s, print.set->notable); fl_print_format(" if the standard doesn't support nested Content, then only a depth of 0 would be valid.%r", print.to, f_string_eol_s); - fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_select_s, print.set->notable); + fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_select_s, print.set->notable); fl_print_format(" if the standard doesn't support multiple Content groups, then only a select of 0 would be valid.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_trim_s, print.set->notable); + fl_print_format(" The parameter %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_trim_s, print.set->notable); fl_print_format(" will remove leading and trailing white spaces when selecting objects or when printing objects.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" When specifying both the %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_object_s, print.set->notable); - fl_print_format(" parameter and the %[%r%r%] parameter, the entire Object and Content are printed, including the formatting.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_content_s, print.set->notable, f_string_eol_s); + fl_print_format(" When specifying both the %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_object_s, print.set->notable); + fl_print_format(" parameter and the %[%r%r%] parameter, the entire Object and Content are printed, including the formatting.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_content_s, print.set->notable, f_string_eol_s); fl_print_format(" Both the Object and Content printed are already escaped.%r", print.to, f_string_eol_s); fl_print_format(" Both the Object and Content are separated by a New Line character '\\n' (U+000A).%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%] accepts the following:%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_delimit_s, print.set->notable, f_string_eol_s); + fl_print_format(" The parameter %[%r%r%] accepts the following:%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_delimit_s, print.set->notable, f_string_eol_s); fl_print_format(" - %[%r%]: Do not apply delimits.%r", print.to, print.set->notable, fss_basic_list_read_delimit_mode_name_none_s, print.set->notable, f_string_eol_s); fl_print_format(" - %[%r%]: (default) Apply all delimits.%r", print.to, print.set->notable, fss_basic_list_read_delimit_mode_name_all_s, print.set->notable, f_string_eol_s); fl_print_format(" - %[%r%]: Apply delimits for Objects.%r", print.to, print.set->notable, fss_basic_list_read_delimit_mode_name_object_s, print.set->notable, f_string_eol_s); @@ -93,15 +93,15 @@ extern "C" { fl_print_format(" - A number, 0 or greater, followed by a %[%r%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%r", print.to, print.set->notable, fss_basic_list_read_delimit_mode_name_greater_s, print.set->notable, f_string_eol_s, f_string_eol_s); fl_print_format(" - A number, 0 or lesser, followed by a %[%r%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%r%r", print.to, print.set->notable, fss_basic_list_read_delimit_mode_name_lesser_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" The %[%r%r%] parameter may be specified multiple times to customize the delimit behavior.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_delimit_s, print.set->notable, f_string_eol_s); + fl_print_format(" The %[%r%r%] parameter may be specified multiple times to customize the delimit behavior.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_delimit_s, print.set->notable, f_string_eol_s); - fl_print_format(" The %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_delimit_s, print.set->notable); + fl_print_format(" The %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_delimit_s, print.set->notable); fl_print_format(" values %[%r%]", print.to, print.set->notable, fss_basic_list_read_delimit_mode_name_none_s, print.set->notable); fl_print_format(" and %[%r%],", print.to, print.set->notable, fss_basic_list_read_delimit_mode_name_all_s, print.set->notable); fl_print_format(" overrule all other delimit values.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameters %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_columns_s, print.set->notable); - fl_print_format(" and %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_select_s, print.set->notable); + fl_print_format(" The parameters %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_columns_s, print.set->notable); + fl_print_format(" and %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_select_s, print.set->notable); fl_print_format(" refer to a Content column.%r", print.to, f_string_eol_s); fl_print_format(" The word \"column\" is being loosely defined to refer to a specific Content.%r", print.to, f_string_eol_s); fl_print_format(" This is not to be confused with a depth.%r", print.to, f_string_eol_s); diff --git a/level_3/fss_basic_list_read/c/private-print.c b/level_3/fss_basic_list_read/c/private-print.c index c45be1a..cc6898f 100644 --- a/level_3/fss_basic_list_read/c/private-print.c +++ b/level_3/fss_basic_list_read/c/private-print.c @@ -65,7 +65,7 @@ extern "C" { #ifndef _di_fss_basic_list_read_print_content_ignore_ void fss_basic_list_read_print_content_ignore(fll_program_data_t * const main) { - if (main->parameters.array[fss_basic_list_read_parameter_pipe_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_read_parameter_pipe_e].result & f_console_result_found_e) { f_print_dynamic_raw(fss_basic_list_read_pipe_content_ignore_s, main->output.to); } } @@ -74,11 +74,11 @@ extern "C" { #ifndef _di_fss_basic_list_read_print_object_end_ void fss_basic_list_read_print_object_end(fll_program_data_t * const main) { - if (main->parameters.array[fss_basic_list_read_parameter_pipe_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_read_parameter_pipe_e].result & f_console_result_found_e) { f_print_dynamic_raw(fss_basic_list_read_pipe_content_start_s, main->output.to); } else { - if (main->parameters.array[fss_basic_list_read_parameter_content_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_read_parameter_content_e].result & f_console_result_found_e) { f_print_dynamic_raw(f_fss_basic_list_open_s, main->output.to); f_print_dynamic_raw(f_fss_basic_list_open_end_s, main->output.to); } @@ -92,7 +92,7 @@ extern "C" { #ifndef _di_fss_basic_list_read_print_set_end_ void fss_basic_list_read_print_set_end(fll_program_data_t * const main) { - if (main->parameters.array[fss_basic_list_read_parameter_pipe_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_read_parameter_pipe_e].result & f_console_result_found_e) { f_print_dynamic_raw(fss_basic_list_read_pipe_content_end_s, main->output.to); } } diff --git a/level_3/fss_basic_list_read/c/private-read.c b/level_3/fss_basic_list_read/c/private-read.c index 1025f6e..6dc39e3 100644 --- a/level_3/fss_basic_list_read/c/private-read.c +++ b/level_3/fss_basic_list_read/c/private-read.c @@ -63,7 +63,7 @@ extern "C" { { f_array_length_t depth_size = 1; - if (main->parameters.array[fss_basic_list_read_parameter_depth_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_list_read_parameter_depth_e].result & f_console_result_value_e) { depth_size = main->parameters.array[fss_basic_list_read_parameter_depth_e].values.used; } @@ -118,7 +118,7 @@ extern "C" { } } - if (main->parameters.array[fss_basic_list_read_parameter_at_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_list_read_parameter_at_e].result & f_console_result_value_e) { for (; position_at < main->parameters.array[fss_basic_list_read_parameter_at_e].values.used; ++position_at) { if (main->parameters.array[fss_basic_list_read_parameter_at_e].values.array[position_at] < position_depth) { @@ -141,7 +141,7 @@ extern "C" { } // for } - if (main->parameters.array[fss_basic_list_read_parameter_name_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_list_read_parameter_name_e].result & f_console_result_value_e) { for (; position_name < main->parameters.array[fss_basic_list_read_parameter_name_e].values.used; ++position_name) { if (main->parameters.array[fss_basic_list_read_parameter_name_e].values.array[position_name] < position_depth) { @@ -154,7 +154,7 @@ extern "C" { data->depths.array[i].index_name = main->parameters.array[fss_basic_list_read_parameter_name_e].values.array[position_name]; - if (main->parameters.array[fss_basic_list_read_parameter_trim_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_read_parameter_trim_e].result & f_console_result_found_e) { status = fl_string_dynamic_rip(data->argv[data->depths.array[i].index_name], &data->depths.array[i].value_name); } else { @@ -162,7 +162,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), main->parameters.array[fss_basic_list_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_dynamic_rip" : "f_string_dynamic_append", F_true); + fll_error_print(main->error, F_status_set_fine(status), (main->parameters.array[fss_basic_list_read_parameter_trim_e].result & f_console_result_found_e) ? "fl_string_dynamic_rip" : "f_string_dynamic_append", F_true); return status; } @@ -191,7 +191,7 @@ extern "C" { fl_print_format("%r%[%QThe value '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); fl_print_format("%[%ul%]", main->error.to, main->error.notable, data->depths.array[i].depth, main->error.notable); fl_print_format("%[' may only be specified once for the parameter '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_depth_s, main->error.notable); fl_print_format("%['.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -205,7 +205,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_list_read_long_depth_s, main->error.notable); fl_print_format("%[' may not have the value '%]", main->error.to, main->error.context, main->error.context); fl_print_format("%[%ul%]", main->error.to, main->error.notable, data->depths.array[i].depth, main->error.notable); fl_print_format("%[' before the value '%]", main->error.to, main->error.context, main->error.context); @@ -273,7 +273,7 @@ extern "C" { #ifndef _di_fss_basic_list_read_load_number_ f_status_t fss_basic_list_read_load_number(fll_program_data_t * const main, fss_basic_list_read_data_t * const data, const f_array_length_t parameter, const f_string_static_t name, f_number_unsigned_t *number) { - if (main->parameters.array[parameter].result == f_console_result_additional_e) { + if (main->parameters.array[parameter].result & f_console_result_value_e) { const f_array_length_t index = main->parameters.array[parameter].values.array[main->parameters.array[parameter].values.used - 1]; const f_status_t status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, data->argv[index], number); @@ -299,7 +299,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.array[fss_basic_list_read_parameter_total_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_read_parameter_total_e].result & f_console_result_found_e) { f_file_stream_lock(main->output.to); fss_basic_list_read_print_zero(main); @@ -668,53 +668,53 @@ extern "C" { f_status_t status = F_none; - if (main->parameters.array[fss_basic_list_read_parameter_at_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_list_read_parameter_at_e].result & f_console_result_value_e) { data->option |= fss_basic_list_read_data_option_at_d; } - if (main->parameters.array[fss_basic_list_read_parameter_columns_e].result == f_console_result_found_e) { + if (main->parameters.array[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.array[fss_basic_list_read_parameter_content_e].result == f_console_result_found_e) { + if (main->parameters.array[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.array[fss_basic_list_read_parameter_empty_e].result == f_console_result_found_e) { + if (main->parameters.array[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.array[fss_basic_list_read_parameter_line_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_list_read_parameter_line_e].result & f_console_result_value_e) { data->option |= fss_basic_list_read_data_option_line_d; status = fss_basic_list_read_load_number(main, data, fss_basic_list_read_parameter_line_e, fss_basic_list_read_long_line_s, &data->line); if (F_status_is_error(status)) return status; } - if (main->parameters.array[fss_basic_list_read_parameter_name_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_list_read_parameter_name_e].result & f_console_result_value_e) { data->option |= fss_basic_list_read_data_option_name_d; } - if (main->parameters.array[fss_basic_list_read_parameter_object_e].result == f_console_result_found_e) { + if (main->parameters.array[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.array[fss_basic_list_read_parameter_original_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_read_parameter_original_e].result & f_console_result_found_e) { data->option |= fss_basic_list_read_data_option_original_d; } - if (main->parameters.array[fss_basic_list_read_parameter_select_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_list_read_parameter_select_e].result & f_console_result_value_e) { data->option |= fss_basic_list_read_data_option_select_d; status = fss_basic_list_read_load_number(main, data, fss_basic_list_read_parameter_select_e, fss_basic_list_read_long_select_s, &data->select); if (F_status_is_error(status)) return status; } - if (main->parameters.array[fss_basic_list_read_parameter_total_e].result == f_console_result_found_e) { + if (main->parameters.array[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.array[fss_basic_list_read_parameter_trim_e].result == f_console_result_found_e) { + if (main->parameters.array[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_write/c/common.c b/level_3/fss_basic_list_write/c/common.c index 2aa9c2a..418f7ec 100644 --- a/level_3/fss_basic_list_write/c/common.c +++ b/level_3/fss_basic_list_write/c/common.c @@ -92,14 +92,14 @@ extern "C" { } } - if (main->parameters.array[fss_basic_list_write_parameter_line_first_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_write_parameter_line_first_no_e].result & f_console_result_found_e) { setting->line_first = f_string_empty_s; } else { setting->line_first = f_string_eol_s; } - if (main->parameters.array[fss_basic_list_write_parameter_line_last_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_write_parameter_line_last_no_e].result & f_console_result_found_e) { setting->line_last = f_string_empty_s; } else { @@ -125,13 +125,13 @@ extern "C" { } } - if (main->parameters.array[fss_basic_list_write_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_write_parameter_help_e].result & f_console_result_found_e) { setting->flag |= fss_basic_list_write_main_flag_help_e; return; } - if (main->parameters.array[fss_basic_list_write_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_write_parameter_version_e].result & f_console_result_found_e) { setting->flag |= fss_basic_list_write_main_flag_version_e; return; @@ -144,7 +144,7 @@ extern "C" { f_string_static_t * const args = main->parameters.arguments.array; - if (main->parameters.array[fss_basic_list_write_parameter_strip_invalid_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_write_parameter_strip_invalid_e].result & f_console_result_found_e) { setting->flag |= fss_basic_list_write_main_flag_strip_invalid_e; } } diff --git a/level_3/fss_basic_list_write/c/common.h b/level_3/fss_basic_list_write/c/common.h index 02c4ebd..8f9a21e 100644 --- a/level_3/fss_basic_list_write/c/common.h +++ b/level_3/fss_basic_list_write/c/common.h @@ -181,28 +181,28 @@ extern "C" { #define fss_basic_list_write_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \ \ - macro_f_console_parameter_t_initialize2(fss_basic_list_write_short_file_s.string, fss_basic_list_write_long_file_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_write_short_content_s.string, fss_basic_list_write_long_content_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_write_short_double_s.string, fss_basic_list_write_long_double_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_write_short_ignore_s.string, fss_basic_list_write_long_ignore_s.string, 0, 2, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_write_short_object_s.string, fss_basic_list_write_long_object_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_write_short_partial_s.string, fss_basic_list_write_long_partial_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_write_short_prepend_s.string, fss_basic_list_write_long_prepend_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_write_short_single_s.string, fss_basic_list_write_long_single_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_list_write_short_trim_s.string, fss_basic_list_write_long_trim_s.string, 0, 0, f_console_type_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_list_write_short_file_s.string, fss_basic_list_write_long_file_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_list_write_short_content_s.string, fss_basic_list_write_long_content_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_list_write_short_double_s.string, fss_basic_list_write_long_double_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_list_write_short_ignore_s.string, fss_basic_list_write_long_ignore_s.string, 0, 2, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_list_write_short_object_s.string, fss_basic_list_write_long_object_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_list_write_short_partial_s.string, fss_basic_list_write_long_partial_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_list_write_short_prepend_s.string, fss_basic_list_write_long_prepend_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_list_write_short_single_s.string, fss_basic_list_write_long_single_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_list_write_short_trim_s.string, fss_basic_list_write_long_trim_s.string, 0, 0, f_console_flag_normal_e), \ } #define fss_basic_list_write_total_parameters_d 21 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 ef8e535..c14fff1 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 @@ -62,13 +62,13 @@ extern "C" { status = F_none; - if (main->parameters.array[fss_basic_list_write_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_write_parameter_help_e].result & f_console_result_found_e) { fss_basic_list_write_print_help(setting, main->message); return status; } - if (main->parameters.array[fss_basic_list_write_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_write_parameter_version_e].result & f_console_result_found_e) { fll_program_print_version(main->message, fss_basic_list_write_program_version_s); return status; @@ -83,13 +83,13 @@ extern "C" { output.size_write = main->output.to.size_write; if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_basic_list_write_parameter_file_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_list_write_parameter_file_e].result & f_console_result_value_e) { if (main->parameters.array[fss_basic_list_write_parameter_file_e].values.used > 1) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_file_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_list_write_long_file_s, main->error.notable); fl_print_format("%[' may only be specified once.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -109,8 +109,8 @@ extern "C" { } } } - else if (main->parameters.array[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); + else if (main->parameters.array[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_normal_s, fss_basic_list_write_long_file_s); status = F_status_set_error(F_parameter); } } @@ -119,28 +119,28 @@ extern "C" { if (main->parameters.array[fss_basic_list_write_parameter_object_e].locations.used || main->parameters.array[fss_basic_list_write_parameter_content_e].locations.used) { if (main->parameters.array[fss_basic_list_write_parameter_object_e].locations.used) { if (main->parameters.array[fss_basic_list_write_parameter_object_e].locations.used != main->parameters.array[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); + fss_basic_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_normal_s, fss_basic_list_write_long_object_s); status = F_status_set_error(F_parameter); } else if (main->parameters.array[fss_basic_list_write_parameter_content_e].locations.used != main->parameters.array[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); + fss_basic_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_normal_s, fss_basic_list_write_long_content_s); status = F_status_set_error(F_parameter); } - else if (main->parameters.array[fss_basic_list_write_parameter_object_e].locations.used != main->parameters.array[fss_basic_list_write_parameter_content_e].locations.used && main->parameters.array[fss_basic_list_write_parameter_partial_e].result == f_console_result_none_e) { + else if (main->parameters.array[fss_basic_list_write_parameter_object_e].locations.used != main->parameters.array[fss_basic_list_write_parameter_content_e].locations.used && !(main->parameters.array[fss_basic_list_write_parameter_partial_e].result & f_console_result_found_e)) { fss_basic_list_write_error_parameter_same_times_print(main); status = F_status_set_error(F_parameter); } else if (main->parameters.array[fss_basic_list_write_parameter_content_e].locations.used && main->parameters.array[fss_basic_list_write_parameter_partial_e].locations.used) { - if (main->parameters.array[fss_basic_list_write_parameter_content_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_list_write_parameter_content_e].result & f_console_result_value_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_partial_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_list_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter only allows either the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_object_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_list_write_long_object_s, main->error.notable); fl_print_format("%[' parameter or the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_content_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_list_write_long_content_s, main->error.notable); fl_print_format("%[' parameter, but not both.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -151,7 +151,7 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_basic_list_write_parameter_content_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_list_write_parameter_content_e].result & f_console_result_value_e) { f_array_length_t location_object = 0; f_array_length_t location_content = 0; f_array_length_t location_sub_object = 0; @@ -168,9 +168,9 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QEach '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_object_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_list_write_long_object_s, main->error.notable); fl_print_format("%[' parameter must be specified before a '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_content_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_list_write_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -186,7 +186,7 @@ extern "C" { } else if (main->parameters.array[fss_basic_list_write_parameter_content_e].locations.used) { if (main->parameters.array[fss_basic_list_write_parameter_content_e].locations.used != main->parameters.array[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); + fss_basic_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_normal_s, fss_basic_list_write_long_content_s); status = F_status_set_error(F_parameter); } else if (!main->parameters.array[fss_basic_list_write_parameter_partial_e].locations.used) { @@ -200,9 +200,9 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThis requires either piped data or the use of the '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_object_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_list_write_long_object_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_content_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_list_write_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -212,12 +212,12 @@ extern "C" { } if (F_status_is_error_not(status) && (main->pipe & fll_program_data_pipe_input_e)) { - if (main->parameters.array[fss_basic_list_write_parameter_partial_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_write_parameter_partial_e].result & f_console_result_found_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThis '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_partial_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_list_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter cannot be used when processing a pipe.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -229,12 +229,12 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_basic_list_write_parameter_prepend_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_write_parameter_prepend_e].result & f_console_result_found_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_prepend_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_list_write_long_prepend_s, main->error.notable); fl_print_format("%[' is specified, but no value is given.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -242,7 +242,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters.array[fss_basic_list_write_parameter_prepend_e].result == f_console_result_additional_e) { + else if (main->parameters.array[fss_basic_list_write_parameter_prepend_e].result & f_console_result_value_e) { const f_array_length_t index = main->parameters.array[fss_basic_list_write_parameter_prepend_e].values.array[main->parameters.array[fss_basic_list_write_parameter_prepend_e].values.used - 1]; if (argv[index].used) { @@ -259,7 +259,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe value for the parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_prepend_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_list_write_long_prepend_s, main->error.notable); fl_print_format("%[' must only contain white space.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -276,7 +276,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe value for the parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_prepend_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_list_write_long_prepend_s, main->error.notable); fl_print_format("%[' must not be an empty string.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -288,12 +288,12 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_basic_list_write_parameter_ignore_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_write_parameter_ignore_e].result & f_console_result_found_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_ignore_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_list_write_long_ignore_s, main->error.notable); fl_print_format("%[' was specified, but no values were given.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -301,7 +301,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters.array[fss_basic_list_write_parameter_ignore_e].result == f_console_result_additional_e) { + else if (main->parameters.array[fss_basic_list_write_parameter_ignore_e].result & f_console_result_value_e) { const f_array_length_t total_locations = main->parameters.array[fss_basic_list_write_parameter_ignore_e].locations.used; const f_array_length_t total_arguments = main->parameters.array[fss_basic_list_write_parameter_ignore_e].values.used; @@ -309,7 +309,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_ignore_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_list_write_long_ignore_s, main->error.notable); fl_print_format("%[' requires two values.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -322,14 +322,14 @@ extern "C" { f_fss_quote_t quoted = f_fss_quote_type_double_e; if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_basic_list_write_parameter_double_e].result == f_console_result_found_e) { - if (main->parameters.array[fss_basic_list_write_parameter_single_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_write_parameter_double_e].result & f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_write_parameter_single_e].result & f_console_result_found_e) { if (main->parameters.array[fss_basic_list_write_parameter_double_e].location < main->parameters.array[fss_basic_list_write_parameter_single_e].location) { quoted = f_fss_quote_type_single_e; } } } - else if (main->parameters.array[fss_basic_list_write_parameter_single_e].result == f_console_result_found_e) { + else if (main->parameters.array[fss_basic_list_write_parameter_single_e].result & f_console_result_found_e) { quoted = f_fss_quote_type_single_e; } } @@ -355,8 +355,8 @@ extern "C" { if (F_status_is_error_not(status)) { f_array_length_t index = 0; - if (main->parameters.array[fss_basic_list_write_parameter_partial_e].result == f_console_result_found_e) { - if (main->parameters.array[fss_basic_list_write_parameter_object_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_list_write_parameter_partial_e].result & f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_write_parameter_object_e].result & f_console_result_value_e) { for (f_array_length_t i = 0; i < main->parameters.array[fss_basic_list_write_parameter_object_e].values.used; ++i) { if (!((++main->signal_check) % fss_basic_list_write_signal_check_d)) { @@ -431,7 +431,7 @@ extern "C" { f_file_stream_unlock(main->error.to); } } - else if (main->error.verbosity > f_console_verbosity_quiet_e && main->parameters.array[fss_basic_list_write_parameter_file_e].result == f_console_result_none_e) { + else if (!(main->error.verbosity > f_console_verbosity_quiet_e && (main->parameters.array[fss_basic_list_write_parameter_file_e].result & f_console_result_found_e))) { // Ensure there is always a newline at the end, unless in quiet mode. fll_print_dynamic_raw(f_string_eol_s, main->output.to); @@ -439,7 +439,7 @@ extern "C" { } } - if (main->parameters.array[fss_basic_list_write_parameter_file_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_list_write_parameter_file_e].result & f_console_result_value_e) { f_file_stream_flush(output); f_file_stream_close(&output); } diff --git a/level_3/fss_basic_list_write/c/print.c b/level_3/fss_basic_list_write/c/print.c index f348c92..32b2420 100644 --- a/level_3/fss_basic_list_write/c/print.c +++ b/level_3/fss_basic_list_write/c/print.c @@ -18,15 +18,15 @@ extern "C" { f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, fss_basic_list_write_short_file_s, fss_basic_list_write_long_file_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send data to."); - fll_program_print_help_option(print, fss_basic_list_write_short_content_s, fss_basic_list_write_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to write."); - fll_program_print_help_option(print, fss_basic_list_write_short_double_s, fss_basic_list_write_long_double_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); - fll_program_print_help_option(print, fss_basic_list_write_short_ignore_s, fss_basic_list_write_long_ignore_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content."); - fll_program_print_help_option(print, fss_basic_list_write_short_object_s, fss_basic_list_write_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to write."); - fll_program_print_help_option(print, fss_basic_list_write_short_partial_s, fss_basic_list_write_long_partial_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not write end of Object/Content character."); - fll_program_print_help_option(print, fss_basic_list_write_short_prepend_s, fss_basic_list_write_long_prepend_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given white space characters to the start of each multi-line Content."); - fll_program_print_help_option(print, fss_basic_list_write_short_single_s, fss_basic_list_write_long_single_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); - fll_program_print_help_option(print, fss_basic_list_write_short_trim_s, fss_basic_list_write_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names."); + fll_program_print_help_option(print, fss_basic_list_write_short_file_s, fss_basic_list_write_long_file_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Specify a file to send data to."); + fll_program_print_help_option(print, fss_basic_list_write_short_content_s, fss_basic_list_write_long_content_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "The Content to write."); + fll_program_print_help_option(print, fss_basic_list_write_short_double_s, fss_basic_list_write_long_double_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use double quotes (default)."); + fll_program_print_help_option(print, fss_basic_list_write_short_ignore_s, fss_basic_list_write_long_ignore_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Ignore a given range within a Content."); + fll_program_print_help_option(print, fss_basic_list_write_short_object_s, fss_basic_list_write_long_object_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " The Object to write."); + fll_program_print_help_option(print, fss_basic_list_write_short_partial_s, fss_basic_list_write_long_partial_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Do not write end of Object/Content character."); + fll_program_print_help_option(print, fss_basic_list_write_short_prepend_s, fss_basic_list_write_long_prepend_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Prepend the given white space characters to the start of each multi-line Content."); + fll_program_print_help_option(print, fss_basic_list_write_short_single_s, fss_basic_list_write_long_single_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use single quotes."); + fll_program_print_help_option(print, fss_basic_list_write_short_trim_s, fss_basic_list_write_long_trim_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Trim Object names."); f_print_dynamic_raw(f_string_eol_s, print.to); f_print_dynamic_raw(f_string_eol_s, print.to); @@ -40,10 +40,10 @@ extern "C" { fl_print_format(" or a Form Feed character '%[\\f%]' (%[U+000C%]).%r", print.to, print.set->notable, print.set->notable, print.set->notable, print.set->notable, f_string_eol_s); fl_print_format(" The end of the pipe represents the end of any Object or Content.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The FSS-0002 (Basic List) specification does not support quoted names, therefore the parameters '%[%r%r%]'", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_single_s, print.set->notable); - fl_print_format(" and '%[%r%r%]' do nothing.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_double_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" The FSS-0002 (Basic List) specification does not support quoted names, therefore the parameters '%[%r%r%]'", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_write_long_single_s, print.set->notable); + fl_print_format(" and '%[%r%r%]' do nothing.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_write_long_double_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" This program does not use the parameter '%[%r%r%]', which therefore does nothing.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_ignore_s, print.set->notable, f_string_eol_s); + fl_print_format(" This program does not use the parameter '%[%r%r%]', which therefore does nothing.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_list_write_long_ignore_s, print.set->notable, f_string_eol_s); fl_print_format(" This parameter requires two values.%r", print.to, f_string_eol_s); f_print_dynamic_raw(setting->line_last, print.to); diff --git a/level_3/fss_basic_list_write/c/private-write.c b/level_3/fss_basic_list_write/c/private-write.c index 0eb1379..94debe1 100644 --- a/level_3/fss_basic_list_write/c/private-write.c +++ b/level_3/fss_basic_list_write/c/private-write.c @@ -14,11 +14,11 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QMust specify the '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_object_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_list_write_long_object_s, main->error.notable); fl_print_format("%[' parameter and the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_content_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_list_write_long_content_s, main->error.notable); fl_print_format("%[' parameter the same number of times when not specifying the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_partial_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_list_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -77,7 +77,7 @@ extern "C" { } if (content) { - if (main->parameters.array[fss_basic_list_write_parameter_trim_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_list_write_parameter_trim_e].result & f_console_result_found_e) { complete = f_fss_complete_full_trim_e; } else { @@ -106,7 +106,7 @@ extern "C" { f_string_static_t *prepend = 0; - if (main->parameters.array[fss_basic_list_write_parameter_prepend_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_list_write_parameter_prepend_e].result & f_console_result_value_e) { const f_array_length_t index = main->parameters.array[fss_basic_list_write_parameter_prepend_e].values.array[main->parameters.array[fss_basic_list_write_parameter_prepend_e].values.used - 1]; prepend = &main->parameters.arguments.array[index]; diff --git a/level_3/fss_basic_read/c/common.c b/level_3/fss_basic_read/c/common.c index d1a5377..1236c9b 100644 --- a/level_3/fss_basic_read/c/common.c +++ b/level_3/fss_basic_read/c/common.c @@ -110,14 +110,14 @@ extern "C" { } } - if (main->parameters.array[fss_basic_read_parameter_line_first_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_read_parameter_line_first_no_e].result & f_console_result_found_e) { setting->line_first = f_string_empty_s; } else { setting->line_first = f_string_eol_s; } - if (main->parameters.array[fss_basic_read_parameter_line_last_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_read_parameter_line_last_no_e].result & f_console_result_found_e) { setting->line_last = f_string_empty_s; } else { @@ -143,13 +143,13 @@ extern "C" { } } - if (main->parameters.array[fss_basic_read_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_read_parameter_help_e].result & f_console_result_found_e) { setting->flag |= fss_basic_read_main_flag_help_e; return; } - if (main->parameters.array[fss_basic_read_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_read_parameter_version_e].result & f_console_result_found_e) { setting->flag |= fss_basic_read_main_flag_version_e; return; @@ -162,7 +162,7 @@ extern "C" { f_string_static_t * const args = main->parameters.arguments.array; - if (main->parameters.array[fss_basic_read_parameter_strip_invalid_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_read_parameter_strip_invalid_e].result & f_console_result_found_e) { setting->flag |= fss_basic_read_main_flag_strip_invalid_e; } } diff --git a/level_3/fss_basic_read/c/common.h b/level_3/fss_basic_read/c/common.h index 129b1dd..ec8410a 100644 --- a/level_3/fss_basic_read/c/common.h +++ b/level_3/fss_basic_read/c/common.h @@ -216,33 +216,33 @@ extern "C" { #define fss_basic_read_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \ \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_at_s.string, fss_basic_read_long_at_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_content_s.string, fss_basic_read_long_content_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_columns_s.string, fss_basic_read_long_columns_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_delimit_s.string, fss_basic_read_long_delimit_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_depth_s.string, fss_basic_read_long_depth_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_empty_s.string, fss_basic_read_long_empty_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_line_s.string, fss_basic_read_long_line_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_name_s.string, fss_basic_read_long_name_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_object_s.string, fss_basic_read_long_object_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_pipe_s.string, fss_basic_read_long_pipe_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_original_s.string, fss_basic_read_long_original_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_select_s.string, fss_basic_read_long_select_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_total_s.string, fss_basic_read_long_total_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_read_short_trim_s.string, fss_basic_read_long_trim_s.string, 0, 0, f_console_type_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_read_short_at_s.string, fss_basic_read_long_at_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_read_short_content_s.string, fss_basic_read_long_content_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_read_short_columns_s.string, fss_basic_read_long_columns_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_read_short_delimit_s.string, fss_basic_read_long_delimit_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_read_short_depth_s.string, fss_basic_read_long_depth_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_read_short_empty_s.string, fss_basic_read_long_empty_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_read_short_line_s.string, fss_basic_read_long_line_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_read_short_name_s.string, fss_basic_read_long_name_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_read_short_object_s.string, fss_basic_read_long_object_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_read_short_pipe_s.string, fss_basic_read_long_pipe_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_read_short_original_s.string, fss_basic_read_long_original_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_read_short_select_s.string, fss_basic_read_long_select_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_read_short_total_s.string, fss_basic_read_long_total_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_read_short_trim_s.string, fss_basic_read_long_trim_s.string, 0, 0, f_console_flag_normal_e), \ } #define fss_basic_read_total_parameters_d 26 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 b114faa..6ffd56f 100644 --- a/level_3/fss_basic_read/c/fss_basic_read.c +++ b/level_3/fss_basic_read/c/fss_basic_read.c @@ -61,13 +61,13 @@ extern "C" { status = F_none; - if (main->parameters.array[fss_basic_read_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_read_parameter_help_e].result & f_console_result_found_e) { fss_basic_read_print_help(setting, main->message); return status; } - if (main->parameters.array[fss_basic_read_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_read_parameter_version_e].result & f_console_result_found_e) { fll_program_print_version(main->message, fss_basic_read_program_version_s); return status; @@ -120,11 +120,11 @@ extern "C" { for (f_array_length_t i = 0; i < 6; ++i) { - if (main->parameters.array[parameter_code[i]].result == f_console_result_found_e) { + if (main->parameters.array[parameter_code[i]].result & f_console_result_found_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, parameter_name[i], main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, parameter_name[i], main->error.notable); fl_print_format("%[' requires a %s.%]%r", main->error.to, main->error.context, parameter_message[i], main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -136,7 +136,7 @@ extern "C" { } // for } - if (F_status_is_error_not(status) && main->parameters.array[fss_basic_read_parameter_columns_e].result == f_console_result_found_e) { + if (F_status_is_error_not(status) && (main->parameters.array[fss_basic_read_parameter_columns_e].result & f_console_result_found_e)) { const f_array_length_t parameter_code[] = { fss_basic_read_parameter_depth_e, fss_basic_read_parameter_line_e, @@ -165,7 +165,7 @@ extern "C" { if (main->parameters.array[parameter_code[i]].result == parameter_match[i]) { if (main->error.verbosity > f_console_verbosity_quiet_e) { - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, fss_basic_read_long_columns_s, parameter_name[i]); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_basic_read_long_columns_s, parameter_name[i]); } status = F_status_set_error(F_parameter); @@ -175,24 +175,24 @@ extern "C" { } // for } - if (F_status_is_error_not(status) && main->parameters.array[fss_basic_read_parameter_pipe_e].result == f_console_result_found_e) { - if (main->parameters.array[fss_basic_read_parameter_total_e].result == f_console_result_found_e) { + if (F_status_is_error_not(status) && (main->parameters.array[fss_basic_read_parameter_pipe_e].result & f_console_result_found_e)) { + if (main->parameters.array[fss_basic_read_parameter_total_e].result & f_console_result_found_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, fss_basic_read_long_pipe_s, fss_basic_read_long_total_s); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_basic_read_long_pipe_s, fss_basic_read_long_total_s); } status = F_status_set_error(F_parameter); } - else if (main->parameters.array[fss_basic_read_parameter_line_e].result == f_console_result_additional_e) { + else if (main->parameters.array[fss_basic_read_parameter_line_e].result & f_console_result_value_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, fss_basic_read_long_pipe_s, fss_basic_read_long_line_s); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_basic_read_long_pipe_s, fss_basic_read_long_line_s); } status = F_status_set_error(F_parameter); } } - if (F_status_is_error_not(status) && main->parameters.array[fss_basic_read_parameter_delimit_e].result == f_console_result_additional_e) { + if (F_status_is_error_not(status) && main->parameters.array[fss_basic_read_parameter_delimit_e].result & f_console_result_value_e) { f_array_length_t index = 0; f_array_length_t length = 0; @@ -220,7 +220,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe value for the parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_delimit_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_read_long_delimit_s, main->error.notable); fl_print_format("%[' must not be empty.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -340,7 +340,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.array[fss_basic_read_parameter_total_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_read_parameter_total_e].result & f_console_result_found_e) { fss_basic_read_print_zero(main); } @@ -349,11 +349,11 @@ extern "C" { return F_none; } - if (F_status_is_error_not(status) && main->parameters.array[fss_basic_read_parameter_select_e].result == f_console_result_found_e) { + if (F_status_is_error_not(status) && (main->parameters.array[fss_basic_read_parameter_select_e].result & f_console_result_found_e)) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_select_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_read_long_select_s, main->error.notable); fl_print_format("%[' parameter requires a positive number.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); diff --git a/level_3/fss_basic_read/c/print.c b/level_3/fss_basic_read/c/print.c index f993843..d33d4ea 100644 --- a/level_3/fss_basic_read/c/print.c +++ b/level_3/fss_basic_read/c/print.c @@ -18,20 +18,20 @@ extern "C" { f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, fss_basic_read_short_at_s, fss_basic_read_long_at_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric index."); - fll_program_print_help_option(print, fss_basic_read_short_content_s, fss_basic_read_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Content (default)."); - fll_program_print_help_option(print, fss_basic_read_short_columns_s, fss_basic_read_long_columns_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns."); - fll_program_print_help_option(print, fss_basic_read_short_delimit_s, fss_basic_read_long_delimit_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits."); - fll_program_print_help_option(print, fss_basic_read_short_depth_s, fss_basic_read_long_depth_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth."); - fll_program_print_help_option(print, fss_basic_read_short_empty_s, fss_basic_read_long_empty_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing."); - fll_program_print_help_option(print, fss_basic_read_short_line_s, fss_basic_read_long_line_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line."); - fll_program_print_help_option(print, fss_basic_read_short_name_s, fss_basic_read_long_name_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name."); - fll_program_print_help_option(print, fss_basic_read_short_object_s, fss_basic_read_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object."); - fll_program_print_help_option(print, fss_basic_read_short_pipe_s, fss_basic_read_long_pipe_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format."); - fll_program_print_help_option(print, fss_basic_read_short_original_s, fss_basic_read_long_original_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print with the original quotes and escapes."); - fll_program_print_help_option(print, fss_basic_read_short_select_s, fss_basic_read_long_select_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index."); - fll_program_print_help_option(print, fss_basic_read_short_total_s, fss_basic_read_long_total_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines."); - fll_program_print_help_option(print, fss_basic_read_short_trim_s, fss_basic_read_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print."); + fll_program_print_help_option(print, fss_basic_read_short_at_s, fss_basic_read_long_at_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select Object at this numeric index."); + fll_program_print_help_option(print, fss_basic_read_short_content_s, fss_basic_read_long_content_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the Content (default)."); + fll_program_print_help_option(print, fss_basic_read_short_columns_s, fss_basic_read_long_columns_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the total number of columns."); + fll_program_print_help_option(print, fss_basic_read_short_delimit_s, fss_basic_read_long_delimit_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Designate how to handle applying delimits."); + fll_program_print_help_option(print, fss_basic_read_short_depth_s, fss_basic_read_long_depth_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select Object at this numeric depth."); + fll_program_print_help_option(print, fss_basic_read_short_empty_s, fss_basic_read_long_empty_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Include empty Content when processing."); + fll_program_print_help_option(print, fss_basic_read_short_line_s, fss_basic_read_long_line_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print only the Content at the given line."); + fll_program_print_help_option(print, fss_basic_read_short_name_s, fss_basic_read_long_name_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select Object with this name."); + fll_program_print_help_option(print, fss_basic_read_short_object_s, fss_basic_read_long_object_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the Object."); + fll_program_print_help_option(print, fss_basic_read_short_pipe_s, fss_basic_read_long_pipe_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print using the special pipe format."); + fll_program_print_help_option(print, fss_basic_read_short_original_s, fss_basic_read_long_original_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Print with the original quotes and escapes."); + fll_program_print_help_option(print, fss_basic_read_short_select_s, fss_basic_read_long_select_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select sub-Content at this index."); + fll_program_print_help_option(print, fss_basic_read_short_total_s, fss_basic_read_long_total_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the total number of lines."); + fll_program_print_help_option(print, fss_basic_read_short_trim_s, fss_basic_read_long_trim_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Trim Object names on select or print."); f_print_dynamic_raw(f_string_eol_s, print.to); f_print_dynamic_raw(f_string_eol_s, print.to); @@ -45,47 +45,47 @@ extern "C" { fl_print_format(" All numeric positions (indexes) start at 0 instead of 1.%r", print.to, f_string_eol_s); fl_print_format(" For example, a file of 17 lines would range from 0 to 16.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" When using the %[%r%r%] option, an order of operations is enforced on the parameters.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth_s, print.set->notable, f_string_eol_s); + fl_print_format(" When using the %[%r%r%] option, an order of operations is enforced on the parameters.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_depth_s, print.set->notable, f_string_eol_s); fl_print_format(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%r", print.to, f_string_eol_s); - fl_print_format(" %[%r%r%]: An Object index at the specified depth.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_at_s, print.set->notable, f_string_eol_s); - fl_print_format(" %[%r%r%]: A new depth within the specified depth, indexed from the root.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth_s, print.set->notable, f_string_eol_s); - fl_print_format(" %[%r%r%]: An Object name at the specified depth.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" %[%r%r%]: An Object index at the specified depth.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_at_s, print.set->notable, f_string_eol_s); + fl_print_format(" %[%r%r%]: A new depth within the specified depth, indexed from the root.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_depth_s, print.set->notable, f_string_eol_s); + fl_print_format(" %[%r%r%]: An Object name at the specified depth.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%] must be in numeric order, but values in between may be skipped.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth_s, print.set->notable, f_string_eol_s); + fl_print_format(" The parameter %[%r%r%] must be in numeric order, but values in between may be skipped.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_depth_s, print.set->notable, f_string_eol_s); fl_print_format(" ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%r", print.to, f_string_eol_s); fl_print_format(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%] selects a Content column.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_select_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" The parameter %[%r%r%] selects a Content column.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_select_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" Specify both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_object_s, print.set->notable); - fl_print_format(" and the %[%r%r%] parameters to get the total objects.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_total_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" Specify both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_object_s, print.set->notable); + fl_print_format(" and the %[%r%r%] parameters to get the total objects.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_total_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" When both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_at_s, print.set->notable); - fl_print_format(" and %[%r%r%] parameters are specified (at the same depth),", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_name_s, print.set->notable); - fl_print_format(" the %[%r%r%] parameter value will be treated as a position relative to the specified", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_at_s, print.set->notable); - fl_print_format(" %[%r%r%] parameter value.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" When both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_at_s, print.set->notable); + fl_print_format(" and %[%r%r%] parameters are specified (at the same depth),", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_name_s, print.set->notable); + fl_print_format(" the %[%r%r%] parameter value will be treated as a position relative to the specified", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_at_s, print.set->notable); + fl_print_format(" %[%r%r%] parameter value.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" This program may support parameters, such as %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth_s, print.set->notable); - fl_print_format(" or %[%r%r%], even if not supported by the standard.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_select_s, print.set->notable, f_string_eol_s); + fl_print_format(" This program may support parameters, such as %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_depth_s, print.set->notable); + fl_print_format(" or %[%r%r%], even if not supported by the standard.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_select_s, print.set->notable, f_string_eol_s); fl_print_format(" This is done to help ensure consistency for scripting.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth_s, print.set->notable); + fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_depth_s, print.set->notable); fl_print_format(" if the standard doesn't support nested Content, then only a depth of 0 would be valid.%r", print.to, f_string_eol_s); - fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_select_s, print.set->notable); + fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_select_s, print.set->notable); fl_print_format(" if the standard doesn't support multiple Content groups, then only a select of 0 would be valid.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_trim_s, print.set->notable); + fl_print_format(" The parameter %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_trim_s, print.set->notable); fl_print_format(" will remove leading and trailing white spaces when selecting objects or when printing objects.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" When specifying both the %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_object_s, print.set->notable); - fl_print_format(" parameter and the %[%r%r%] parameter, the entire Object and Content are printed, including the formatting.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_content_s, print.set->notable, f_string_eol_s); + fl_print_format(" When specifying both the %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_object_s, print.set->notable); + fl_print_format(" parameter and the %[%r%r%] parameter, the entire Object and Content are printed, including the formatting.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_content_s, print.set->notable, f_string_eol_s); fl_print_format(" Both the Object and Content printed are already escaped.%r", print.to, f_string_eol_s); fl_print_format(" Both the Object and Content are separated by a space.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%] accepts the following:%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_delimit_s, print.set->notable, f_string_eol_s); + fl_print_format(" The parameter %[%r%r%] accepts the following:%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_delimit_s, print.set->notable, f_string_eol_s); fl_print_format(" - %[%r%]: Do not apply delimits.%r", print.to, print.set->notable, fss_basic_read_delimit_mode_name_none_s, print.set->notable, f_string_eol_s); fl_print_format(" - %[%r%]: (default) Apply all delimits.%r", print.to, print.set->notable, fss_basic_read_delimit_mode_name_all_s, print.set->notable, f_string_eol_s); fl_print_format(" - %[%r%]: Apply delimits for Objects.%r", print.to, print.set->notable, fss_basic_read_delimit_mode_name_object_s, print.set->notable, f_string_eol_s); @@ -93,15 +93,15 @@ extern "C" { fl_print_format(" - A number, 0 or greater, followed by a %[%r%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%r", print.to, print.set->notable, fss_basic_read_delimit_mode_name_greater_s, print.set->notable, f_string_eol_s, f_string_eol_s); fl_print_format(" - A number, 0 or lesser, followed by a %[%r%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%r%r", print.to, print.set->notable, fss_basic_read_delimit_mode_name_lesser_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" The %[%r%r%] parameter may be specified multiple times to customize the delimit behavior.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_delimit_s, print.set->notable, f_string_eol_s); + fl_print_format(" The %[%r%r%] parameter may be specified multiple times to customize the delimit behavior.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_delimit_s, print.set->notable, f_string_eol_s); - fl_print_format(" The %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_delimit_s, print.set->notable); + fl_print_format(" The %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_delimit_s, print.set->notable); fl_print_format(" values %[%r%]", print.to, print.set->notable, fss_basic_read_delimit_mode_name_none_s, print.set->notable); fl_print_format(" and %[%r%],", print.to, print.set->notable, fss_basic_read_delimit_mode_name_all_s, print.set->notable); fl_print_format(" overrule all other delimit values.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameters %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_columns_s, print.set->notable); - fl_print_format(" and %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_read_long_select_s, print.set->notable); + fl_print_format(" The parameters %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_columns_s, print.set->notable); + fl_print_format(" and %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_read_long_select_s, print.set->notable); fl_print_format(" refer to a Content column.%r", print.to, f_string_eol_s); fl_print_format(" The word \"column\" is being loosely defined to refer to a specific Content.%r", print.to, f_string_eol_s); fl_print_format(" This is not to be confused with a depth.%r", print.to, f_string_eol_s); diff --git a/level_3/fss_basic_read/c/private-print.c b/level_3/fss_basic_read/c/private-print.c index 3c5ed2d..c2836c8 100644 --- a/level_3/fss_basic_read/c/private-print.c +++ b/level_3/fss_basic_read/c/private-print.c @@ -74,7 +74,7 @@ extern "C" { #ifndef _di_fss_basic_read_print_object_end_ void fss_basic_read_print_object_end(fll_program_data_t * const main) { - if (main->parameters.array[fss_basic_read_parameter_pipe_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_read_parameter_pipe_e].result & f_console_result_found_e) { f_print_dynamic_raw(fss_basic_read_pipe_content_start_s, main->output.to); } else { @@ -94,7 +94,7 @@ extern "C" { #ifndef _di_fss_basic_read_print_set_end_ void fss_basic_read_print_set_end(fll_program_data_t * const main) { - if (main->parameters.array[fss_basic_read_parameter_pipe_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_read_parameter_pipe_e].result & f_console_result_found_e) { f_print_dynamic_raw(fss_basic_read_pipe_content_end_s, main->output.to); } else { diff --git a/level_3/fss_basic_read/c/private-read.c b/level_3/fss_basic_read/c/private-read.c index 255777f..17ec22b 100644 --- a/level_3/fss_basic_read/c/private-read.c +++ b/level_3/fss_basic_read/c/private-read.c @@ -40,7 +40,7 @@ extern "C" { { f_array_length_t depth_size = 1; - if (main->parameters.array[fss_basic_read_parameter_depth_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_read_parameter_depth_e].result & f_console_result_value_e) { depth_size = main->parameters.array[fss_basic_read_parameter_depth_e].values.used; } @@ -95,7 +95,7 @@ extern "C" { } } - if (main->parameters.array[fss_basic_read_parameter_at_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_read_parameter_at_e].result & f_console_result_value_e) { for (; position_at < main->parameters.array[fss_basic_read_parameter_at_e].values.used; ++position_at) { if (main->parameters.array[fss_basic_read_parameter_at_e].values.array[position_at] < position_depth) { @@ -118,7 +118,7 @@ extern "C" { } // for } - if (main->parameters.array[fss_basic_read_parameter_name_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_read_parameter_name_e].result & f_console_result_value_e) { for (; position_name < main->parameters.array[fss_basic_read_parameter_name_e].values.used; position_name++) { if (main->parameters.array[fss_basic_read_parameter_name_e].values.array[position_name] < position_depth) { @@ -131,7 +131,7 @@ extern "C" { data->depths.array[i].index_name = main->parameters.array[fss_basic_read_parameter_name_e].values.array[position_name]; - if (main->parameters.array[fss_basic_read_parameter_trim_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_read_parameter_trim_e].result & f_console_result_found_e) { status = fl_string_dynamic_rip(data->argv[data->depths.array[i].index_name], &data->depths.array[i].value_name); } else { @@ -139,7 +139,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), main->parameters.array[fss_basic_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_dynamic_rip" : "f_string_dynamic_append", F_true); + fll_error_print(main->error, F_status_set_fine(status), (main->parameters.array[fss_basic_read_parameter_trim_e].result & f_console_result_found_e) ? "fl_string_dynamic_rip" : "f_string_dynamic_append", F_true); return status; } @@ -168,7 +168,7 @@ extern "C" { fl_print_format("%r%[%QThe value '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); fl_print_format("%[%ul%]", main->error.to, main->error.notable, data->depths.array[i].depth, main->error.notable); fl_print_format("%[' may only be specified once for the parameter '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_read_long_depth_s, main->error.notable); fl_print_format("%['.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -182,7 +182,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_read_long_depth_s, main->error.notable); fl_print_format("%[' may not have the value '%]", main->error.to, main->error.context, main->error.context); fl_print_format("%[%ul%]", main->error.to, main->error.notable, data->depths.array[i].depth, main->error.notable); fl_print_format("%[' before the value '%]", main->error.to, main->error.context, main->error.context); @@ -258,7 +258,7 @@ extern "C" { #ifndef _di_fss_basic_read_load_number_ f_status_t fss_basic_read_load_number(fll_program_data_t * const main, fss_basic_read_data_t * const data, const f_array_length_t parameter, const f_string_static_t name, f_number_unsigned_t *number) { - if (main->parameters.array[parameter].result == f_console_result_additional_e) { + if (main->parameters.array[parameter].result & f_console_result_value_e) { const f_array_length_t index = main->parameters.array[parameter].values.array[main->parameters.array[parameter].values.used - 1]; const f_status_t status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, data->argv[index], number); @@ -284,7 +284,7 @@ extern "C" { // This standard does not support multiple content groups. if ((data->option & fss_basic_read_data_option_select_d) && data->select) { - if (main->parameters.array[fss_basic_read_parameter_total_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_read_parameter_total_e].result & f_console_result_found_e) { f_file_stream_lock(main->output.to); fss_basic_read_print_zero(main); @@ -571,53 +571,53 @@ extern "C" { f_status_t status = F_none; - if (main->parameters.array[fss_basic_read_parameter_at_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_read_parameter_at_e].result & f_console_result_value_e) { data->option |= fss_basic_read_data_option_at_d; } - if (main->parameters.array[fss_basic_read_parameter_columns_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_read_parameter_columns_e].result & f_console_result_found_e) { data->option |= fss_basic_read_data_option_columns_d; } - if (main->parameters.array[fss_basic_read_parameter_content_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_read_parameter_content_e].result & f_console_result_found_e) { data->option |= fss_basic_read_data_option_content_d; } - if (main->parameters.array[fss_basic_read_parameter_empty_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_read_parameter_empty_e].result & f_console_result_found_e) { data->option |= fss_basic_read_data_option_empty_d; } - if (main->parameters.array[fss_basic_read_parameter_line_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_read_parameter_line_e].result & f_console_result_value_e) { data->option |= fss_basic_read_data_option_line_d; status = fss_basic_read_load_number(main, data, fss_basic_read_parameter_line_e, fss_basic_read_long_line_s, &data->line); if (F_status_is_error(status)) return status; } - if (main->parameters.array[fss_basic_read_parameter_name_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_read_parameter_name_e].result & f_console_result_value_e) { data->option |= fss_basic_read_data_option_name_d; } - if (main->parameters.array[fss_basic_read_parameter_object_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_read_parameter_object_e].result & f_console_result_found_e) { data->option |= fss_basic_read_data_option_object_d; } - if (main->parameters.array[fss_basic_read_parameter_original_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_read_parameter_original_e].result & f_console_result_found_e) { data->option |= fss_basic_read_data_option_original_d; } - if (main->parameters.array[fss_basic_read_parameter_select_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_read_parameter_select_e].result & f_console_result_value_e) { data->option |= fss_basic_read_data_option_select_d; status = fss_basic_read_load_number(main, data, fss_basic_read_parameter_select_e, fss_basic_read_long_select_s, &data->select); if (F_status_is_error(status)) return status; } - if (main->parameters.array[fss_basic_read_parameter_total_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_read_parameter_total_e].result & f_console_result_found_e) { data->option |= fss_basic_read_data_option_total_d; } - if (main->parameters.array[fss_basic_read_parameter_trim_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_read_parameter_trim_e].result & f_console_result_found_e) { data->option |= fss_basic_read_data_option_trim_d; } diff --git a/level_3/fss_basic_write/c/common.c b/level_3/fss_basic_write/c/common.c index b67049a..f00eaee 100644 --- a/level_3/fss_basic_write/c/common.c +++ b/level_3/fss_basic_write/c/common.c @@ -92,14 +92,14 @@ extern "C" { } } - if (main->parameters.array[fss_basic_write_parameter_line_first_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_write_parameter_line_first_no_e].result & f_console_result_found_e) { setting->line_first = f_string_empty_s; } else { setting->line_first = f_string_eol_s; } - if (main->parameters.array[fss_basic_write_parameter_line_last_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_write_parameter_line_last_no_e].result & f_console_result_found_e) { setting->line_last = f_string_empty_s; } else { @@ -125,13 +125,13 @@ extern "C" { } } - if (main->parameters.array[fss_basic_write_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_write_parameter_help_e].result & f_console_result_found_e) { setting->flag |= fss_basic_write_main_flag_help_e; return; } - if (main->parameters.array[fss_basic_write_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_write_parameter_version_e].result & f_console_result_found_e) { setting->flag |= fss_basic_write_main_flag_version_e; return; @@ -144,7 +144,7 @@ extern "C" { f_string_static_t * const args = main->parameters.arguments.array; - if (main->parameters.array[fss_basic_write_parameter_strip_invalid_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_write_parameter_strip_invalid_e].result & f_console_result_found_e) { setting->flag |= fss_basic_write_main_flag_strip_invalid_e; } } diff --git a/level_3/fss_basic_write/c/common.h b/level_3/fss_basic_write/c/common.h index 3fb9882..5c84600 100644 --- a/level_3/fss_basic_write/c/common.h +++ b/level_3/fss_basic_write/c/common.h @@ -181,28 +181,28 @@ extern "C" { #define fss_basic_write_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \ \ - macro_f_console_parameter_t_initialize2(fss_basic_write_short_file_s.string, fss_basic_write_long_file_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_write_short_content_s.string, fss_basic_write_long_content_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_write_short_double_s.string, fss_basic_write_long_double_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_write_short_ignore_s.string, fss_basic_write_long_ignore_s.string, 0, 2, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_write_short_object_s.string, fss_basic_write_long_object_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_write_short_partial_s.string, fss_basic_write_long_partial_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_write_short_prepend_s.string, fss_basic_write_long_prepend_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_write_short_single_s.string, fss_basic_write_long_single_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_basic_write_short_trim_s.string, fss_basic_write_long_trim_s.string, 0, 0, f_console_type_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_write_short_file_s.string, fss_basic_write_long_file_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_write_short_content_s.string, fss_basic_write_long_content_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_write_short_double_s.string, fss_basic_write_long_double_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_write_short_ignore_s.string, fss_basic_write_long_ignore_s.string, 0, 2, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_write_short_object_s.string, fss_basic_write_long_object_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_write_short_partial_s.string, fss_basic_write_long_partial_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_write_short_prepend_s.string, fss_basic_write_long_prepend_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_write_short_single_s.string, fss_basic_write_long_single_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_basic_write_short_trim_s.string, fss_basic_write_long_trim_s.string, 0, 0, f_console_flag_normal_e), \ } #define fss_basic_write_total_parameters_d 20 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 8ba09d5..b3c53e2 100644 --- a/level_3/fss_basic_write/c/fss_basic_write.c +++ b/level_3/fss_basic_write/c/fss_basic_write.c @@ -62,13 +62,13 @@ extern "C" { status = F_none; - if (main->parameters.array[fss_basic_write_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_write_parameter_help_e].result & f_console_result_found_e) { fss_basic_write_print_help(setting, main->message); return status; } - if (main->parameters.array[fss_basic_write_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_write_parameter_version_e].result & f_console_result_found_e) { fll_program_print_version(main->message, fss_basic_write_program_version_s); return status; @@ -81,13 +81,13 @@ 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.array[fss_basic_write_parameter_file_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_write_parameter_file_e].result & f_console_result_value_e) { if (main->parameters.array[fss_basic_write_parameter_file_e].values.used > 1) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_file_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_write_long_file_s, main->error.notable); fl_print_format("%[' may only be specified once.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -107,8 +107,8 @@ extern "C" { } } } - else if (main->parameters.array[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); + else if (main->parameters.array[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_normal_s, fss_basic_write_long_file_s); status = F_status_set_error(F_parameter); } } @@ -117,28 +117,28 @@ extern "C" { if (main->parameters.array[fss_basic_write_parameter_object_e].locations.used || main->parameters.array[fss_basic_write_parameter_content_e].locations.used) { if (main->parameters.array[fss_basic_write_parameter_object_e].locations.used) { if (main->parameters.array[fss_basic_write_parameter_object_e].locations.used != main->parameters.array[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); + fss_basic_write_error_parameter_value_missing_print(main, f_console_symbol_long_normal_s, fss_basic_write_long_object_s); status = F_status_set_error(F_parameter); } else if (main->parameters.array[fss_basic_write_parameter_content_e].locations.used != main->parameters.array[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); + fss_basic_write_error_parameter_value_missing_print(main, f_console_symbol_long_normal_s, fss_basic_write_long_content_s); status = F_status_set_error(F_parameter); } - else if (main->parameters.array[fss_basic_write_parameter_object_e].locations.used != main->parameters.array[fss_basic_write_parameter_content_e].locations.used && main->parameters.array[fss_basic_write_parameter_partial_e].result == f_console_result_none_e) { + else if (main->parameters.array[fss_basic_write_parameter_object_e].locations.used != main->parameters.array[fss_basic_write_parameter_content_e].locations.used && !(main->parameters.array[fss_basic_write_parameter_partial_e].result & f_console_result_found_e)) { fss_basic_write_error_parameter_same_times_print(main); status = F_status_set_error(F_parameter); } else if (main->parameters.array[fss_basic_write_parameter_content_e].locations.used && main->parameters.array[fss_basic_write_parameter_partial_e].locations.used) { - if (main->parameters.array[fss_basic_write_parameter_content_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_write_parameter_content_e].result & f_console_result_value_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_partial_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter only allows either the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_object_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_write_long_object_s, main->error.notable); fl_print_format("%[' parameter or the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_content_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_write_long_content_s, main->error.notable); fl_print_format("%[' parameter, but not both.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -149,7 +149,7 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_basic_write_parameter_content_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_write_parameter_content_e].result & f_console_result_value_e) { f_array_length_t location_object = 0; f_array_length_t location_content = 0; f_array_length_t location_sub_object = 0; @@ -166,9 +166,9 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QEach '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_object_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_write_long_object_s, main->error.notable); fl_print_format("%[' parameter must be specified before a '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_content_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_write_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -184,7 +184,7 @@ extern "C" { } else if (main->parameters.array[fss_basic_write_parameter_content_e].locations.used) { if (main->parameters.array[fss_basic_write_parameter_content_e].locations.used != main->parameters.array[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); + fss_basic_write_error_parameter_value_missing_print(main, f_console_symbol_long_normal_s, fss_basic_write_long_content_s); status = F_status_set_error(F_parameter); } else if (!main->parameters.array[fss_basic_write_parameter_partial_e].locations.used) { @@ -198,9 +198,9 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThis requires either piped data or the use of the '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_object_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_write_long_object_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_content_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_write_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -210,12 +210,12 @@ extern "C" { } if (F_status_is_error_not(status) && (main->pipe & fll_program_data_pipe_input_e)) { - if (main->parameters.array[fss_basic_write_parameter_partial_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_write_parameter_partial_e].result & f_console_result_found_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThis '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_partial_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter cannot be used when processing a pipe.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -227,12 +227,12 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_basic_write_parameter_prepend_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_write_parameter_prepend_e].result & f_console_result_found_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_prepend_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_write_long_prepend_s, main->error.notable); fl_print_format("%[' is specified, but no value is given.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -240,7 +240,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters.array[fss_basic_write_parameter_prepend_e].result == f_console_result_additional_e) { + else if (main->parameters.array[fss_basic_write_parameter_prepend_e].result & f_console_result_value_e) { const f_array_length_t index = main->parameters.array[fss_basic_write_parameter_prepend_e].values.array[main->parameters.array[fss_basic_write_parameter_prepend_e].values.used - 1]; // Even though this standard does not utilize this parameter, provide the validation for consistency. @@ -258,7 +258,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe value for the parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_prepend_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_write_long_prepend_s, main->error.notable); fl_print_format("%[' must only contain white space.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -275,7 +275,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe value for the parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_prepend_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_write_long_prepend_s, main->error.notable); fl_print_format("%[' must not be an empty string.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -287,12 +287,12 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_basic_write_parameter_ignore_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_write_parameter_ignore_e].result & f_console_result_found_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_ignore_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_write_long_ignore_s, main->error.notable); fl_print_format("%[' was specified, but no values were given.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -300,7 +300,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters.array[fss_basic_write_parameter_ignore_e].result == f_console_result_additional_e) { + else if (main->parameters.array[fss_basic_write_parameter_ignore_e].result & f_console_result_value_e) { const f_array_length_t total_locations = main->parameters.array[fss_basic_write_parameter_ignore_e].locations.used; const f_array_length_t total_arguments = main->parameters.array[fss_basic_write_parameter_ignore_e].values.used; @@ -308,7 +308,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_ignore_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_write_long_ignore_s, main->error.notable); fl_print_format("%[' requires two values.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -321,14 +321,14 @@ extern "C" { f_fss_quote_t quote = f_fss_quote_type_double_e; if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_basic_write_parameter_double_e].result == f_console_result_found_e) { - if (main->parameters.array[fss_basic_write_parameter_single_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_write_parameter_double_e].result & f_console_result_found_e) { + if (main->parameters.array[fss_basic_write_parameter_single_e].result & f_console_result_found_e) { if (main->parameters.array[fss_basic_write_parameter_double_e].location < main->parameters.array[fss_basic_write_parameter_single_e].location) { quote = f_fss_quote_type_single_e; } } } - else if (main->parameters.array[fss_basic_write_parameter_single_e].result == f_console_result_found_e) { + else if (main->parameters.array[fss_basic_write_parameter_single_e].result & f_console_result_found_e) { quote = f_fss_quote_type_single_e; } } @@ -352,8 +352,8 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_basic_write_parameter_partial_e].result == f_console_result_found_e) { - if (main->parameters.array[fss_basic_write_parameter_object_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_write_parameter_partial_e].result & f_console_result_found_e) { + if (main->parameters.array[fss_basic_write_parameter_object_e].result & f_console_result_value_e) { for (f_array_length_t i = 0; i < main->parameters.array[fss_basic_write_parameter_object_e].values.used; ++i) { if (!((++main->signal_check) % fss_basic_write_signal_check_d)) { @@ -422,7 +422,7 @@ extern "C" { f_file_stream_unlock(main->error.to); } } - else if (main->error.verbosity > f_console_verbosity_quiet_e && main->error.verbosity != f_console_verbosity_error_e && main->parameters.array[fss_basic_write_parameter_file_e].result == f_console_result_none_e) { + else if (main->error.verbosity > f_console_verbosity_quiet_e && main->error.verbosity != f_console_verbosity_error_e && !(main->parameters.array[fss_basic_write_parameter_file_e].result & f_console_result_found_e)) { // Ensure there is always a newline at the end, unless in quiet mode. fll_print_dynamic_raw(f_string_eol_s, main->output.to); @@ -430,7 +430,7 @@ extern "C" { } } - if (main->parameters.array[fss_basic_write_parameter_file_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_basic_write_parameter_file_e].result & f_console_result_value_e) { f_file_stream_flush(output); f_file_stream_close(&output); } diff --git a/level_3/fss_basic_write/c/print.c b/level_3/fss_basic_write/c/print.c index d60f04d..424abf6 100644 --- a/level_3/fss_basic_write/c/print.c +++ b/level_3/fss_basic_write/c/print.c @@ -18,15 +18,15 @@ extern "C" { f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, fss_basic_write_short_file_s, fss_basic_write_long_file_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send data to."); - fll_program_print_help_option(print, fss_basic_write_short_content_s, fss_basic_write_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to write."); - fll_program_print_help_option(print, fss_basic_write_short_double_s, fss_basic_write_long_double_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); - fll_program_print_help_option(print, fss_basic_write_short_ignore_s, fss_basic_write_long_ignore_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content."); - fll_program_print_help_option(print, fss_basic_write_short_object_s, fss_basic_write_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to write."); - fll_program_print_help_option(print, fss_basic_write_short_partial_s, fss_basic_write_long_partial_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not write end of Object/Content character."); - fll_program_print_help_option(print, fss_basic_write_short_prepend_s, fss_basic_write_long_prepend_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given white space characters to the start of each multi-line Content."); - fll_program_print_help_option(print, fss_basic_write_short_single_s, fss_basic_write_long_single_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); - fll_program_print_help_option(print, fss_basic_write_short_trim_s, fss_basic_write_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names."); + fll_program_print_help_option(print, fss_basic_write_short_file_s, fss_basic_write_long_file_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Specify a file to send data to."); + fll_program_print_help_option(print, fss_basic_write_short_content_s, fss_basic_write_long_content_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "The Content to write."); + fll_program_print_help_option(print, fss_basic_write_short_double_s, fss_basic_write_long_double_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use double quotes (default)."); + fll_program_print_help_option(print, fss_basic_write_short_ignore_s, fss_basic_write_long_ignore_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Ignore a given range within a Content."); + fll_program_print_help_option(print, fss_basic_write_short_object_s, fss_basic_write_long_object_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " The Object to write."); + fll_program_print_help_option(print, fss_basic_write_short_partial_s, fss_basic_write_long_partial_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Do not write end of Object/Content character."); + fll_program_print_help_option(print, fss_basic_write_short_prepend_s, fss_basic_write_long_prepend_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Prepend the given white space characters to the start of each multi-line Content."); + fll_program_print_help_option(print, fss_basic_write_short_single_s, fss_basic_write_long_single_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use single quotes."); + fll_program_print_help_option(print, fss_basic_write_short_trim_s, fss_basic_write_long_trim_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Trim Object names."); f_print_dynamic_raw(f_string_eol_s, print.to); f_print_dynamic_raw(f_string_eol_s, print.to); @@ -40,10 +40,10 @@ extern "C" { fl_print_format(" or a Form Feed character '%[\\f%]' (%[U+000C%]).%r", print.to, print.set->notable, print.set->notable, print.set->notable, print.set->notable, f_string_eol_s); fl_print_format(" The end of the pipe represents the end of any Object or Content.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The FSS-0000 (Basic) specification does not support multi-line Content, therefore the parameter '%[%r%r%]'", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_write_long_prepend_s, print.set->notable); + fl_print_format(" The FSS-0000 (Basic) specification does not support multi-line Content, therefore the parameter '%[%r%r%]'", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_write_long_prepend_s, print.set->notable); fl_print_format(" does nothing.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" This program does not use the parameter '%[%r%r%]', which therefore does nothing.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_basic_write_long_ignore_s, print.set->notable, f_string_eol_s); + fl_print_format(" This program does not use the parameter '%[%r%r%]', which therefore does nothing.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_basic_write_long_ignore_s, print.set->notable, f_string_eol_s); fl_print_format(" This parameter requires two values.%r", print.to, f_string_eol_s); f_print_dynamic_raw(setting->line_last, print.to); diff --git a/level_3/fss_basic_write/c/private-write.c b/level_3/fss_basic_write/c/private-write.c index 1915650..2662304 100644 --- a/level_3/fss_basic_write/c/private-write.c +++ b/level_3/fss_basic_write/c/private-write.c @@ -14,11 +14,11 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QMust specify the '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_object_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_write_long_object_s, main->error.notable); fl_print_format("%[' parameter and the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_content_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_write_long_content_s, main->error.notable); fl_print_format("%[' parameter the same number of times when not specifying the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_partial_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_basic_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -77,7 +77,7 @@ extern "C" { } if (content) { - if (main->parameters.array[fss_basic_write_parameter_trim_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_basic_write_parameter_trim_e].result & f_console_result_found_e) { complete = f_fss_complete_full_trim_e; } else { diff --git a/level_3/fss_embedded_list_read/c/common.c b/level_3/fss_embedded_list_read/c/common.c index c791fcf..ef4fcff 100644 --- a/level_3/fss_embedded_list_read/c/common.c +++ b/level_3/fss_embedded_list_read/c/common.c @@ -109,14 +109,14 @@ extern "C" { } } - if (main->parameters.array[fss_embedded_list_read_parameter_line_first_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_read_parameter_line_first_no_e].result & f_console_result_found_e) { setting->line_first = f_string_empty_s; } else { setting->line_first = f_string_eol_s; } - if (main->parameters.array[fss_embedded_list_read_parameter_line_last_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_read_parameter_line_last_no_e].result & f_console_result_found_e) { setting->line_last = f_string_empty_s; } else { @@ -142,13 +142,13 @@ extern "C" { } } - if (main->parameters.array[fss_embedded_list_read_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_read_parameter_help_e].result & f_console_result_found_e) { setting->flag |= fss_embedded_list_read_main_flag_help_e; return; } - if (main->parameters.array[fss_embedded_list_read_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_read_parameter_version_e].result & f_console_result_found_e) { setting->flag |= fss_embedded_list_read_main_flag_version_e; return; @@ -161,7 +161,7 @@ extern "C" { f_string_static_t * const args = main->parameters.arguments.array; - if (main->parameters.array[fss_embedded_list_read_parameter_strip_invalid_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_read_parameter_strip_invalid_e].result & f_console_result_found_e) { setting->flag |= fss_embedded_list_read_main_flag_strip_invalid_e; } } diff --git a/level_3/fss_embedded_list_read/c/common.h b/level_3/fss_embedded_list_read/c/common.h index c1235fd..b00b814 100644 --- a/level_3/fss_embedded_list_read/c/common.h +++ b/level_3/fss_embedded_list_read/c/common.h @@ -216,33 +216,33 @@ extern "C" { #define fss_embedded_list_read_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \ \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_at_s.string, fss_embedded_list_read_long_at_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_content_s.string, fss_embedded_list_read_long_content_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_columns_s.string, fss_embedded_list_read_long_columns_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_delimit_s.string, fss_embedded_list_read_long_delimit_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_depth_s.string, fss_embedded_list_read_long_depth_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_empty_s.string, fss_embedded_list_read_long_empty_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_line_s.string, fss_embedded_list_read_long_line_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_name_s.string, fss_embedded_list_read_long_name_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_object_s.string, fss_embedded_list_read_long_object_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_pipe_s.string, fss_embedded_list_read_long_pipe_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_original_s.string, fss_embedded_list_read_long_original_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_select_s.string, fss_embedded_list_read_long_select_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_total_s.string, fss_embedded_list_read_long_total_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_trim_s.string, fss_embedded_list_read_long_trim_s.string, 0, 0, f_console_type_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_at_s.string, fss_embedded_list_read_long_at_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_content_s.string, fss_embedded_list_read_long_content_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_columns_s.string, fss_embedded_list_read_long_columns_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_delimit_s.string, fss_embedded_list_read_long_delimit_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_depth_s.string, fss_embedded_list_read_long_depth_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_empty_s.string, fss_embedded_list_read_long_empty_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_line_s.string, fss_embedded_list_read_long_line_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_name_s.string, fss_embedded_list_read_long_name_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_object_s.string, fss_embedded_list_read_long_object_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_pipe_s.string, fss_embedded_list_read_long_pipe_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_original_s.string, fss_embedded_list_read_long_original_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_select_s.string, fss_embedded_list_read_long_select_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_total_s.string, fss_embedded_list_read_long_total_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_embedded_list_read_short_trim_s.string, fss_embedded_list_read_long_trim_s.string, 0, 0, f_console_flag_normal_e), \ } #define fss_embedded_list_read_total_parameters_d 26 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 4eb69bc..5dbbd7b 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 @@ -65,7 +65,7 @@ extern "C" { status = F_none; - if (main->parameters.array[fss_embedded_list_read_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_read_parameter_help_e].result & f_console_result_found_e) { fss_embedded_list_read_print_help(setting, main->message); fss_embedded_list_read_data_delete(&data); @@ -73,7 +73,7 @@ extern "C" { return F_none; } - if (main->parameters.array[fss_embedded_list_read_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_read_parameter_version_e].result & f_console_result_found_e) { fll_program_print_version(main->message, fss_embedded_list_read_program_version_s); fss_embedded_list_read_data_delete(&data); @@ -81,10 +81,10 @@ extern "C" { return F_none; } - if (F_status_is_error_not(status) && main->parameters.array[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) { - if (main->parameters.array[fss_embedded_list_read_parameter_columns_e].result == f_console_result_found_e) { + if (F_status_is_error_not(status) && (main->parameters.array[fss_embedded_list_read_parameter_total_e].result & f_console_result_found_e)) { + if (main->parameters.array[fss_embedded_list_read_parameter_columns_e].result & f_console_result_found_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, fss_embedded_list_read_long_columns_s, fss_embedded_list_read_long_total_s); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_embedded_list_read_long_columns_s, fss_embedded_list_read_long_total_s); } status = F_status_set_error(F_parameter); @@ -92,11 +92,11 @@ extern "C" { } if (main->parameters.remaining.used > 0 || (main->pipe & fll_program_data_pipe_input_e)) { - if (main->parameters.array[fss_embedded_list_read_parameter_at_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_read_parameter_at_e].result & f_console_result_found_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_at_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_at_s, main->error.notable); fl_print_format("%[' requires a positive number.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -104,11 +104,11 @@ extern "C" { status = F_status_set_error(F_parameter); } - if (F_status_is_error_not(status) && main->parameters.array[fss_embedded_list_read_parameter_depth_e].result == f_console_result_found_e) { + if (F_status_is_error_not(status) && (main->parameters.array[fss_embedded_list_read_parameter_depth_e].result & f_console_result_found_e)) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_depth_s, main->error.notable); fl_print_format("%[' requires a positive number.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -116,11 +116,11 @@ extern "C" { status = F_status_set_error(F_parameter); } - if (F_status_is_error_not(status) && main->parameters.array[fss_embedded_list_read_parameter_line_e].result == f_console_result_additional_e) { + if (F_status_is_error_not(status) && main->parameters.array[fss_embedded_list_read_parameter_line_e].result & f_console_result_value_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_line_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_line_s, main->error.notable); fl_print_format("%[' requires a positive number.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -128,11 +128,11 @@ extern "C" { status = F_status_set_error(F_parameter); } - if (F_status_is_error_not(status) && main->parameters.array[fss_embedded_list_read_parameter_name_e].result == f_console_result_found_e) { + if (F_status_is_error_not(status) && (main->parameters.array[fss_embedded_list_read_parameter_name_e].result & f_console_result_found_e)) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_name_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_name_s, main->error.notable); fl_print_format("%[' requires a string.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -140,11 +140,11 @@ extern "C" { status = F_status_set_error(F_parameter); } - if (F_status_is_error_not(status) && main->parameters.array[fss_embedded_list_read_parameter_select_e].result == f_console_result_found_e) { + if (F_status_is_error_not(status) && (main->parameters.array[fss_embedded_list_read_parameter_select_e].result & f_console_result_found_e)) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_select_s, main->error.notable); fl_print_format("%[' requires a positive number.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -152,20 +152,20 @@ extern "C" { status = F_status_set_error(F_parameter); } - if (main->parameters.array[fss_embedded_list_read_parameter_line_e].result == f_console_result_additional_e) { - if (F_status_is_error_not(status) && main->parameters.array[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_read_parameter_line_e].result & f_console_result_value_e) { + if (F_status_is_error_not(status) && (main->parameters.array[fss_embedded_list_read_parameter_total_e].result & f_console_result_found_e)) { if (main->error.verbosity > f_console_verbosity_quiet_e) { - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, fss_embedded_list_read_long_line_s, fss_embedded_list_read_long_total_s); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_embedded_list_read_long_line_s, fss_embedded_list_read_long_total_s); } status = F_status_set_error(F_parameter); } } - if (main->parameters.array[fss_embedded_list_read_parameter_pipe_e].result == f_console_result_found_e) { - if (F_status_is_error_not(status) && main->parameters.array[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_read_parameter_pipe_e].result & f_console_result_found_e) { + if (F_status_is_error_not(status) && (main->parameters.array[fss_embedded_list_read_parameter_total_e].result & f_console_result_found_e)) { if (main->error.verbosity > f_console_verbosity_quiet_e) { - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, fss_embedded_list_read_long_pipe_s, fss_embedded_list_read_long_total_s); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_embedded_list_read_long_pipe_s, fss_embedded_list_read_long_total_s); } status = F_status_set_error(F_parameter); @@ -173,18 +173,18 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_embedded_list_read_parameter_delimit_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_read_parameter_delimit_e].result & f_console_result_found_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_delimit_s, main->error.notable); fl_print_format("%[' requires a value.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); status = F_status_set_error(F_parameter); } - else if (main->parameters.array[fss_embedded_list_read_parameter_delimit_e].result == f_console_result_additional_e) { + else if (main->parameters.array[fss_embedded_list_read_parameter_delimit_e].result & f_console_result_value_e) { const f_array_length_t index = main->parameters.array[fss_embedded_list_read_parameter_delimit_e].values.array[0]; f_array_length_t length = data.argv[index].used; @@ -192,7 +192,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe value for the parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_delimit_s, main->error.notable); fl_print_format("%[' must not be empty.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -251,11 +251,11 @@ extern "C" { } } - if (F_status_is_error_not(status) && main->parameters.array[fss_embedded_list_read_parameter_select_e].result == f_console_result_found_e) { + if (F_status_is_error_not(status) && (main->parameters.array[fss_embedded_list_read_parameter_select_e].result & f_console_result_found_e)) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_select_s, main->error.notable); fl_print_format("%[' parameter requires a positive number.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -332,7 +332,7 @@ extern "C" { // Skip past empty files. if (!size_file) { - if (main->parameters.array[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_read_parameter_total_e].result & f_console_result_found_e) { fll_print_format("%r%r", main->output.to, f_string_ascii_0_s, f_string_eol_s); } diff --git a/level_3/fss_embedded_list_read/c/print.c b/level_3/fss_embedded_list_read/c/print.c index 6bb9648..f787c98 100644 --- a/level_3/fss_embedded_list_read/c/print.c +++ b/level_3/fss_embedded_list_read/c/print.c @@ -18,20 +18,20 @@ extern "C" { f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, fss_embedded_list_read_short_at_s, fss_embedded_list_read_long_at_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric index."); - fll_program_print_help_option(print, fss_embedded_list_read_short_content_s, fss_embedded_list_read_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Content (default)."); - fll_program_print_help_option(print, fss_embedded_list_read_short_columns_s, fss_embedded_list_read_long_columns_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns."); - fll_program_print_help_option(print, fss_embedded_list_read_short_delimit_s, fss_embedded_list_read_long_delimit_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits."); - fll_program_print_help_option(print, fss_embedded_list_read_short_depth_s, fss_embedded_list_read_long_depth_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth."); - fll_program_print_help_option(print, fss_embedded_list_read_short_empty_s, fss_embedded_list_read_long_empty_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing."); - fll_program_print_help_option(print, fss_embedded_list_read_short_line_s, fss_embedded_list_read_long_line_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line."); - fll_program_print_help_option(print, fss_embedded_list_read_short_name_s, fss_embedded_list_read_long_name_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name."); - fll_program_print_help_option(print, fss_embedded_list_read_short_object_s, fss_embedded_list_read_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object."); - fll_program_print_help_option(print, fss_embedded_list_read_short_pipe_s, fss_embedded_list_read_long_pipe_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format."); - fll_program_print_help_option(print, fss_embedded_list_read_short_original_s, fss_embedded_list_read_long_original_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print with the original quotes and escapes."); - fll_program_print_help_option(print, fss_embedded_list_read_short_select_s, fss_embedded_list_read_long_select_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index."); - fll_program_print_help_option(print, fss_embedded_list_read_short_total_s, fss_embedded_list_read_long_total_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines."); - fll_program_print_help_option(print, fss_embedded_list_read_short_trim_s, fss_embedded_list_read_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print."); + fll_program_print_help_option(print, fss_embedded_list_read_short_at_s, fss_embedded_list_read_long_at_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select Object at this numeric index."); + fll_program_print_help_option(print, fss_embedded_list_read_short_content_s, fss_embedded_list_read_long_content_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the Content (default)."); + fll_program_print_help_option(print, fss_embedded_list_read_short_columns_s, fss_embedded_list_read_long_columns_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the total number of columns."); + fll_program_print_help_option(print, fss_embedded_list_read_short_delimit_s, fss_embedded_list_read_long_delimit_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Designate how to handle applying delimits."); + fll_program_print_help_option(print, fss_embedded_list_read_short_depth_s, fss_embedded_list_read_long_depth_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select Object at this numeric depth."); + fll_program_print_help_option(print, fss_embedded_list_read_short_empty_s, fss_embedded_list_read_long_empty_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Include empty Content when processing."); + fll_program_print_help_option(print, fss_embedded_list_read_short_line_s, fss_embedded_list_read_long_line_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print only the Content at the given line."); + fll_program_print_help_option(print, fss_embedded_list_read_short_name_s, fss_embedded_list_read_long_name_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select Object with this name."); + fll_program_print_help_option(print, fss_embedded_list_read_short_object_s, fss_embedded_list_read_long_object_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the Object."); + fll_program_print_help_option(print, fss_embedded_list_read_short_pipe_s, fss_embedded_list_read_long_pipe_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print using the special pipe format."); + fll_program_print_help_option(print, fss_embedded_list_read_short_original_s, fss_embedded_list_read_long_original_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Print with the original quotes and escapes."); + fll_program_print_help_option(print, fss_embedded_list_read_short_select_s, fss_embedded_list_read_long_select_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select sub-Content at this index."); + fll_program_print_help_option(print, fss_embedded_list_read_short_total_s, fss_embedded_list_read_long_total_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the total number of lines."); + fll_program_print_help_option(print, fss_embedded_list_read_short_trim_s, fss_embedded_list_read_long_trim_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Trim Object names on select or print."); f_print_dynamic_raw(f_string_eol_s, print.to); f_print_dynamic_raw(f_string_eol_s, print.to); @@ -45,62 +45,62 @@ extern "C" { fl_print_format(" All numeric positions (indexes) start at 0 instead of 1.%r", print.to, f_string_eol_s); fl_print_format(" For example, a file of 17 lines would range from 0 to 16.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" When using the %[%r%r%] option, an order of operations is enforced on the parameters.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth_s, print.set->notable, f_string_eol_s); + fl_print_format(" When using the %[%r%r%] option, an order of operations is enforced on the parameters.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_depth_s, print.set->notable, f_string_eol_s); fl_print_format(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%r", print.to, f_string_eol_s); - fl_print_format(" %[%r%r%]: An Object index at the specified depth.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_at_s, print.set->notable, f_string_eol_s); - fl_print_format(" %[%r%r%]: A new depth within the specified depth, indexed from the root.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth_s, print.set->notable, f_string_eol_s); - fl_print_format(" %[%r%r%]: An Object name at the specified depth.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" %[%r%r%]: An Object index at the specified depth.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_at_s, print.set->notable, f_string_eol_s); + fl_print_format(" %[%r%r%]: A new depth within the specified depth, indexed from the root.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_depth_s, print.set->notable, f_string_eol_s); + fl_print_format(" %[%r%r%]: An Object name at the specified depth.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%] must be in numeric order, but values in between may be skipped.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth_s, print.set->notable, f_string_eol_s); + fl_print_format(" The parameter %[%r%r%] must be in numeric order, but values in between may be skipped.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_depth_s, print.set->notable, f_string_eol_s); fl_print_format(" ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%r", print.to, f_string_eol_s); fl_print_format(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%] selects a Content column.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" The parameter %[%r%r%] selects a Content column.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_select_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" Specify both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_object_s, print.set->notable); - fl_print_format(" and the %[%r%r%] parameters to get the total objects.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_total_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" Specify both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_object_s, print.set->notable); + fl_print_format(" and the %[%r%r%] parameters to get the total objects.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_total_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" When both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_at_s, print.set->notable); - fl_print_format(" and %[%r%r%] parameters are specified (at the same depth),", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_name_s, print.set->notable); - fl_print_format(" the %[%r%r%] parameter value will be treated as a position relative to the specified", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_at_s, print.set->notable); - fl_print_format(" %[%r%r%] parameter value.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" When both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_at_s, print.set->notable); + fl_print_format(" and %[%r%r%] parameters are specified (at the same depth),", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_name_s, print.set->notable); + fl_print_format(" the %[%r%r%] parameter value will be treated as a position relative to the specified", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_at_s, print.set->notable); + fl_print_format(" %[%r%r%] parameter value.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" This program may support parameters, such as %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth_s, print.set->notable); - fl_print_format(" or %[%r%r%], even if not supported by the standard.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select_s, print.set->notable, f_string_eol_s); + fl_print_format(" This program may support parameters, such as %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_depth_s, print.set->notable); + fl_print_format(" or %[%r%r%], even if not supported by the standard.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_select_s, print.set->notable, f_string_eol_s); fl_print_format(" This is done to help ensure consistency for scripting.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth_s, print.set->notable); + fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_depth_s, print.set->notable); fl_print_format(" if the standard doesn't support nested Content, then only a depth of 0 would be valid.%r", print.to, f_string_eol_s); - fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select_s, print.set->notable); + fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_select_s, print.set->notable); fl_print_format(" if the standard doesn't support multiple Content groups, then only a select of 0 would be valid.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_trim_s, print.set->notable); + fl_print_format(" The parameter %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_trim_s, print.set->notable); fl_print_format(" will remove leading and trailing white spaces when selecting objects or when printing objects.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" When specifying both the %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_object_s, print.set->notable); - fl_print_format(" parameter and the %[%r%r%] parameter, the entire Object and Content are printed, including the formatting.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_content_s, print.set->notable, f_string_eol_s); + fl_print_format(" When specifying both the %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_object_s, print.set->notable); + fl_print_format(" parameter and the %[%r%r%] parameter, the entire Object and Content are printed, including the formatting.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_content_s, print.set->notable, f_string_eol_s); fl_print_format(" Both the Object and Content printed are already escaped.%r", print.to, f_string_eol_s); fl_print_format(" Both the Object and Content are separated by a New Line character '\\n' (U+000A).%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%] accepts the following:%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit_s, print.set->notable, f_string_eol_s); + fl_print_format(" The parameter %[%r%r%] accepts the following:%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_delimit_s, print.set->notable, f_string_eol_s); fl_print_format(" - %[%r%]: Do not apply delimits.%r", print.to, print.set->notable, fss_embedded_list_read_delimit_mode_name_none_s, print.set->notable, f_string_eol_s); fl_print_format(" - %[%r%]: (default) Apply all delimits.%r", print.to, print.set->notable, fss_embedded_list_read_delimit_mode_name_all_s, print.set->notable, f_string_eol_s); fl_print_format(" - A number, 0 or greater: apply delimits for Content at the specified depth.%r", print.to, f_string_eol_s); fl_print_format(" - A number, 0 or greater, followed by a %[%r%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%r", print.to, print.set->notable, fss_embedded_list_read_delimit_mode_name_greater_s, print.set->notable, f_string_eol_s, f_string_eol_s); fl_print_format(" - A number, 0 or lesser, followed by a %[%r%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%r%r", print.to, print.set->notable, fss_embedded_list_read_delimit_mode_name_lesser_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" The %[%r%r%] parameter may be specified multiple times to customize the delimit behavior.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit_s, print.set->notable, f_string_eol_s); + fl_print_format(" The %[%r%r%] parameter may be specified multiple times to customize the delimit behavior.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_delimit_s, print.set->notable, f_string_eol_s); - fl_print_format(" The %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit_s, print.set->notable); + fl_print_format(" The %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_delimit_s, print.set->notable); fl_print_format(" values %[%r%]", print.to, print.set->notable, fss_embedded_list_read_delimit_mode_name_none_s, print.set->notable); fl_print_format(" and %[%r%],", print.to, print.set->notable, fss_embedded_list_read_delimit_mode_name_all_s, print.set->notable); fl_print_format(" overrule all other delimit values.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameters %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_columns_s, print.set->notable); - fl_print_format(" and %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select_s, print.set->notable); + fl_print_format(" The parameters %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_columns_s, print.set->notable); + fl_print_format(" and %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_select_s, print.set->notable); fl_print_format(" refer to a Content column.%r", print.to, f_string_eol_s); fl_print_format(" The word \"column\" is being loosely defined to refer to a specific Content.%r", print.to, f_string_eol_s); fl_print_format(" This is not to be confused with a depth.%r", print.to, f_string_eol_s); diff --git a/level_3/fss_embedded_list_read/c/private-print.c b/level_3/fss_embedded_list_read/c/private-print.c index 79611c7..40219ea 100644 --- a/level_3/fss_embedded_list_read/c/private-print.c +++ b/level_3/fss_embedded_list_read/c/private-print.c @@ -9,11 +9,11 @@ extern "C" { #ifndef _di_fss_embedded_list_read_print_object_end_ void fss_embedded_list_read_print_object_end(fss_embedded_list_read_data_t * const data) { - if (data->main->parameters.array[fss_embedded_list_read_parameter_pipe_e].result == f_console_result_found_e) { + if (data->main->parameters.array[fss_embedded_list_read_parameter_pipe_e].result & f_console_result_found_e) { f_print_dynamic_raw(fss_embedded_list_read_pipe_content_start_s, data->main->output.to); } else { - if (data->main->parameters.array[fss_embedded_list_read_parameter_object_e].result == f_console_result_found_e && data->main->parameters.array[fss_embedded_list_read_parameter_content_e].result == f_console_result_found_e) { + if (data->main->parameters.array[fss_embedded_list_read_parameter_object_e].result & f_console_result_found_e && (data->main->parameters.array[fss_embedded_list_read_parameter_content_e].result & f_console_result_found_e)) { f_print_dynamic_raw(f_fss_embedded_list_open_s, data->main->output.to); f_print_dynamic_raw(f_fss_embedded_list_open_end_s, data->main->output.to); } @@ -27,7 +27,7 @@ extern "C" { #ifndef _di_fss_embedded_list_read_print_content_ignore_ void fss_embedded_list_read_print_content_ignore(fss_embedded_list_read_data_t * const data) { - if (data->main->parameters.array[fss_embedded_list_read_parameter_pipe_e].result == f_console_result_found_e) { + if (data->main->parameters.array[fss_embedded_list_read_parameter_pipe_e].result & f_console_result_found_e) { f_print_dynamic_raw(fss_embedded_list_read_pipe_content_ignore_s, data->main->output.to); } } @@ -36,11 +36,11 @@ extern "C" { #ifndef _di_fss_embedded_list_read_print_set_end_ void fss_embedded_list_read_print_set_end(fss_embedded_list_read_data_t * const data) { - if (data->main->parameters.array[fss_embedded_list_read_parameter_pipe_e].result == f_console_result_found_e) { + if (data->main->parameters.array[fss_embedded_list_read_parameter_pipe_e].result & f_console_result_found_e) { f_print_dynamic_raw(fss_embedded_list_read_pipe_content_end_s, data->main->output.to); } else { - if (data->main->parameters.array[fss_embedded_list_read_parameter_object_e].result == f_console_result_found_e && data->main->parameters.array[fss_embedded_list_read_parameter_content_e].result == f_console_result_found_e) { + if ((data->main->parameters.array[fss_embedded_list_read_parameter_object_e].result & f_console_result_found_e) && (data->main->parameters.array[fss_embedded_list_read_parameter_content_e].result & f_console_result_found_e)) { f_print_dynamic_raw(f_fss_embedded_list_close_s, data->main->output.to); f_print_dynamic_raw(f_fss_embedded_list_close_end_s, data->main->output.to); } diff --git a/level_3/fss_embedded_list_read/c/private-read.c b/level_3/fss_embedded_list_read/c/private-read.c index 601b390..8df02bd 100644 --- a/level_3/fss_embedded_list_read/c/private-read.c +++ b/level_3/fss_embedded_list_read/c/private-read.c @@ -103,7 +103,7 @@ extern "C" { { i = 1; - if (data->main->parameters.array[fss_embedded_list_read_parameter_depth_e].result == f_console_result_additional_e) { + if (data->main->parameters.array[fss_embedded_list_read_parameter_depth_e].result & f_console_result_value_e) { i = data->main->parameters.array[fss_embedded_list_read_parameter_depth_e].values.used + 1; } @@ -176,7 +176,7 @@ extern "C" { depths->array[depths->used].index_name = values_order[i]; depths->array[depths->used].value_name.used = 0; - if (data->main->parameters.array[fss_embedded_list_read_parameter_trim_e].result == f_console_result_found_e) { + if (data->main->parameters.array[fss_embedded_list_read_parameter_trim_e].result & f_console_result_found_e) { status = fl_string_dynamic_rip(argv[values_order[i]], &depths->array[depths->used].value_name); if (F_status_is_error(status)) { @@ -210,7 +210,7 @@ extern "C" { fl_print_format("%r%[%QThe value '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); fl_print_format("%[%ul%]", data->main->error.to, data->main->error.notable, depths->array[i].depth, data->main->error.notable); fl_print_format("%[' may only be specified once for the parameter '%]", data->main->error.to, data->main->error.notable, data->main->error.notable); - fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth_s, data->main->error.notable); + fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_depth_s, data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); f_file_stream_unlock(data->main->error); @@ -221,7 +221,7 @@ extern "C" { f_file_stream_lock(data->main->error); fl_print_format("%r%[%QThe parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context); - fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth_s, data->main->error.notable); + fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_read_long_depth_s, data->main->error.notable); fl_print_format("%[' may not have the value '%]", data->main->error.to, data->main->error.notable, data->main->error.notable); fl_print_format("%[%ul%]", data->main->error.to, data->main->error.notable, depths->array[i].depth, data->main->error.notable); fl_print_format("%[' before the value '%]", data->main->error.to, data->main->error.notable, data->main->error.notable); @@ -257,7 +257,7 @@ extern "C" { if (F_status_is_error_not(status) && (status == F_data_not_stop || status == F_data_not_eos)) { fss_embedded_list_read_data_delete(data); - if (data->main->parameters.array[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) { + if (data->main->parameters.array[fss_embedded_list_read_parameter_total_e].result & f_console_result_found_e) { fll_print_format("%r%r", data->main->output.to, f_string_ascii_0_s, f_string_eol_s); return F_none; @@ -286,7 +286,7 @@ extern "C" { // Requested depths cannot be greater than contents depth. if (depths.used > data->nest.used) { - if (data->main->parameters.array[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) { + if (data->main->parameters.array[fss_embedded_list_read_parameter_total_e].result & f_console_result_found_e) { fll_print_format("%r%r", data->main->output.to, f_string_ascii_0_s, f_string_eol_s); return F_none; @@ -298,7 +298,7 @@ extern "C" { { f_number_unsigned_t select = 0; - if (data->main->parameters.array[fss_embedded_list_read_parameter_select_e].result == f_console_result_additional_e) { + if (data->main->parameters.array[fss_embedded_list_read_parameter_select_e].result & f_console_result_value_e) { const f_array_length_t index = data->main->parameters.array[fss_embedded_list_read_parameter_select_e].values.array[data->main->parameters.array[fss_embedded_list_read_parameter_select_e].values.used - 1]; status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, data->main->parameters.arguments.array[index], &select); @@ -318,7 +318,7 @@ extern "C" { f_array_length_t line = 0; - if (data->main->parameters.array[fss_embedded_list_read_parameter_line_e].result == f_console_result_additional_e) { + if (data->main->parameters.array[fss_embedded_list_read_parameter_line_e].result & f_console_result_value_e) { const f_array_length_t index = data->main->parameters.array[fss_embedded_list_read_parameter_line_e].values.array[data->main->parameters.array[fss_embedded_list_read_parameter_line_e].values.used - 1]; status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, data->main->parameters.arguments.array[index], &line); @@ -335,7 +335,7 @@ extern "C" { const fss_embedded_list_read_skip_t parents = fss_embedded_list_read_skip_t_initialize; - if (data->main->parameters.array[fss_embedded_list_read_parameter_original_e].result == f_console_result_found_e) { + if (data->main->parameters.array[fss_embedded_list_read_parameter_original_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(data, filename, depths, 0, line, parents, &except_none, &except_none); @@ -387,7 +387,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 (data->main->parameters.array[fss_embedded_list_read_parameter_trim_e].result == f_console_result_found_e) { + if (data->main->parameters.array[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, data->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; @@ -402,7 +402,7 @@ extern "C" { } } else { - if (data->main->parameters.array[fss_embedded_list_read_parameter_trim_e].result == f_console_result_found_e) { + if (data->main->parameters.array[fss_embedded_list_read_parameter_trim_e].result & f_console_result_found_e) { for (i = 0; i < items->used; ++i) { if (skip[i]) continue; @@ -495,8 +495,8 @@ extern "C" { f_array_length_t i = 0; f_array_length_t j = 0; - if (data->main->parameters.array[fss_embedded_list_read_parameter_object_e].result == f_console_result_found_e) { - if (data->main->parameters.array[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) { + if (data->main->parameters.array[fss_embedded_list_read_parameter_object_e].result & f_console_result_found_e) { + if (data->main->parameters.array[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) { @@ -512,7 +512,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 (data->main->parameters.array[fss_embedded_list_read_parameter_trim_e].result == f_console_result_found_e) { + if (data->main->parameters.array[fss_embedded_list_read_parameter_trim_e].result & f_console_result_found_e) { print_object = &fl_print_trim_except_dynamic_partial; } @@ -524,7 +524,7 @@ extern "C" { print_object(data->buffer, items->array[i].object, *objects_delimits, data->main->output.to); - if (data->main->parameters.array[fss_embedded_list_read_parameter_content_e].result == f_console_result_found_e) { + if (data->main->parameters.array[fss_embedded_list_read_parameter_content_e].result & f_console_result_found_e) { fss_embedded_list_read_print_object_end(data); if (items->array[i].content.used) { @@ -543,11 +543,11 @@ extern "C" { // Process contents. bool include_empty = 0; - if (data->main->parameters.array[fss_embedded_list_read_parameter_empty_e].result == f_console_result_found_e) { + if (data->main->parameters.array[fss_embedded_list_read_parameter_empty_e].result & f_console_result_found_e) { include_empty = 1; } - if (data->main->parameters.array[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) { + if (data->main->parameters.array[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) { @@ -587,7 +587,7 @@ extern "C" { return F_none; } - if (data->main->parameters.array[fss_embedded_list_read_parameter_line_e].result == f_console_result_additional_e) { + if (data->main->parameters.array[fss_embedded_list_read_parameter_line_e].result & f_console_result_value_e) { f_array_length_t line_current = 0; f_file_stream_lock(data->main->output); @@ -668,7 +668,7 @@ extern "C" { f_print_except_dynamic_partial(data->buffer, items->array[i].content.array[0], *contents_delimits, data->main->output.to); - if (data->main->parameters.array[fss_embedded_list_read_parameter_pipe_e].result == f_console_result_found_e) { + if (data->main->parameters.array[fss_embedded_list_read_parameter_pipe_e].result & f_console_result_found_e) { f_print_dynamic_raw(fss_embedded_list_read_pipe_content_end_s, data->main->output.to); } } // for diff --git a/level_3/fss_embedded_list_write/c/common.c b/level_3/fss_embedded_list_write/c/common.c index 91ec7f8..a464a7e 100644 --- a/level_3/fss_embedded_list_write/c/common.c +++ b/level_3/fss_embedded_list_write/c/common.c @@ -92,14 +92,14 @@ extern "C" { } } - if (main->parameters.array[fss_embedded_list_write_parameter_line_first_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_write_parameter_line_first_no_e].result & f_console_result_found_e) { setting->line_first = f_string_empty_s; } else { setting->line_first = f_string_eol_s; } - if (main->parameters.array[fss_embedded_list_write_parameter_line_last_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_write_parameter_line_last_no_e].result & f_console_result_found_e) { setting->line_last = f_string_empty_s; } else { @@ -125,13 +125,13 @@ extern "C" { } } - if (main->parameters.array[fss_embedded_list_write_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_write_parameter_help_e].result & f_console_result_found_e) { setting->flag |= fss_embedded_list_write_main_flag_help_e; return; } - if (main->parameters.array[fss_embedded_list_write_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_write_parameter_version_e].result & f_console_result_found_e) { setting->flag |= fss_embedded_list_write_main_flag_version_e; return; @@ -144,7 +144,7 @@ extern "C" { f_string_static_t * const args = main->parameters.arguments.array; - if (main->parameters.array[fss_embedded_list_write_parameter_strip_invalid_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_write_parameter_strip_invalid_e].result & f_console_result_found_e) { setting->flag |= fss_embedded_list_write_main_flag_strip_invalid_e; } } diff --git a/level_3/fss_embedded_list_write/c/common.h b/level_3/fss_embedded_list_write/c/common.h index 3b2ac52..d41f27d 100644 --- a/level_3/fss_embedded_list_write/c/common.h +++ b/level_3/fss_embedded_list_write/c/common.h @@ -181,28 +181,28 @@ extern "C" { #define fss_embedded_list_write_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \ \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_write_short_file_s.string, fss_embedded_list_write_long_file_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_write_short_content_s.string, fss_embedded_list_write_long_content_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_write_short_double_s.string, fss_embedded_list_write_long_double_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_write_short_ignore_s.string, fss_embedded_list_write_long_ignore_s.string, 0, 2, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_write_short_object_s.string, fss_embedded_list_write_long_object_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_write_short_partial_s.string, fss_embedded_list_write_long_partial_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_write_short_prepend_s.string, fss_embedded_list_write_long_prepend_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_write_short_single_s.string, fss_embedded_list_write_long_single_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_embedded_list_write_short_trim_s.string, fss_embedded_list_write_long_trim_s.string, 0, 0, f_console_type_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_embedded_list_write_short_file_s.string, fss_embedded_list_write_long_file_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_embedded_list_write_short_content_s.string, fss_embedded_list_write_long_content_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_embedded_list_write_short_double_s.string, fss_embedded_list_write_long_double_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_embedded_list_write_short_ignore_s.string, fss_embedded_list_write_long_ignore_s.string, 0, 2, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_embedded_list_write_short_object_s.string, fss_embedded_list_write_long_object_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_embedded_list_write_short_partial_s.string, fss_embedded_list_write_long_partial_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_embedded_list_write_short_prepend_s.string, fss_embedded_list_write_long_prepend_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_embedded_list_write_short_single_s.string, fss_embedded_list_write_long_single_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_embedded_list_write_short_trim_s.string, fss_embedded_list_write_long_trim_s.string, 0, 0, f_console_flag_normal_e), \ } #define fss_embedded_list_write_total_parameters_d 21 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 3dedfc8..494ffb9 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 @@ -64,13 +64,13 @@ extern "C" { status = F_none; - if (main->parameters.array[fss_embedded_list_write_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_write_parameter_help_e].result & f_console_result_found_e) { fss_embedded_list_write_print_help(setting, main->message); return status; } - if (main->parameters.array[fss_embedded_list_write_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_write_parameter_version_e].result & f_console_result_found_e) { fll_program_print_version(main->message, fss_embedded_list_write_program_version_s); return status; @@ -83,13 +83,13 @@ 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.array[fss_embedded_list_write_parameter_file_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_embedded_list_write_parameter_file_e].result & f_console_result_value_e) { if (main->parameters.array[fss_embedded_list_write_parameter_file_e].values.used > 1) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_file_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_write_long_file_s, main->error.notable); fl_print_format("%[' may only be specified once.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -109,8 +109,8 @@ extern "C" { } } } - else if (main->parameters.array[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); + else if (main->parameters.array[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_normal_s, fss_embedded_list_write_long_file_s); status = F_status_set_error(F_parameter); } } @@ -119,28 +119,28 @@ extern "C" { if (main->parameters.array[fss_embedded_list_write_parameter_object_e].locations.used || main->parameters.array[fss_embedded_list_write_parameter_content_e].locations.used) { if (main->parameters.array[fss_embedded_list_write_parameter_object_e].locations.used) { if (main->parameters.array[fss_embedded_list_write_parameter_object_e].locations.used != main->parameters.array[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); + fss_embedded_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_normal_s, fss_embedded_list_write_long_object_s); status = F_status_set_error(F_parameter); } else if (main->parameters.array[fss_embedded_list_write_parameter_content_e].locations.used != main->parameters.array[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); + fss_embedded_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_normal_s, fss_embedded_list_write_long_content_s); status = F_status_set_error(F_parameter); } - else if (main->parameters.array[fss_embedded_list_write_parameter_object_e].locations.used != main->parameters.array[fss_embedded_list_write_parameter_content_e].locations.used && main->parameters.array[fss_embedded_list_write_parameter_partial_e].result == f_console_result_none_e) { + else if (main->parameters.array[fss_embedded_list_write_parameter_object_e].locations.used != main->parameters.array[fss_embedded_list_write_parameter_content_e].locations.used && !(main->parameters.array[fss_embedded_list_write_parameter_partial_e].result & f_console_result_found_e)) { fss_embedded_list_write_error_parameter_same_times_print(main); status = F_status_set_error(F_parameter); } else if (main->parameters.array[fss_embedded_list_write_parameter_content_e].locations.used && main->parameters.array[fss_embedded_list_write_parameter_partial_e].locations.used) { - if (main->parameters.array[fss_embedded_list_write_parameter_content_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_embedded_list_write_parameter_content_e].result & f_console_result_value_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_partial_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter only allows either the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_object_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_write_long_object_s, main->error.notable); fl_print_format("%[' parameter or the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_write_long_content_s, main->error.notable); fl_print_format("%[' parameter, but not both.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -151,7 +151,7 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_embedded_list_write_parameter_content_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_embedded_list_write_parameter_content_e].result & f_console_result_value_e) { f_array_length_t location_object = 0; f_array_length_t location_content = 0; f_array_length_t location_sub_object = 0; @@ -168,9 +168,9 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QEach '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_object_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_write_long_object_s, main->error.notable); fl_print_format("%[' parameter must be specified before a '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_write_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -186,7 +186,7 @@ extern "C" { } else if (main->parameters.array[fss_embedded_list_write_parameter_content_e].locations.used) { if (main->parameters.array[fss_embedded_list_write_parameter_content_e].locations.used != main->parameters.array[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); + fss_embedded_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_normal_s, fss_embedded_list_write_long_content_s); status = F_status_set_error(F_parameter); } else if (!main->parameters.array[fss_embedded_list_write_parameter_partial_e].locations.used) { @@ -200,9 +200,9 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThis requires either piped data or the use of the '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_object_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_write_long_object_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_write_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -212,12 +212,12 @@ extern "C" { } if (F_status_is_error_not(status) && (main->pipe & fll_program_data_pipe_input_e)) { - if (main->parameters.array[fss_embedded_list_write_parameter_partial_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_write_parameter_partial_e].result & f_console_result_found_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThis '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_partial_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter cannot be used when processing a pipe.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -229,12 +229,12 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_embedded_list_write_parameter_prepend_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_write_parameter_prepend_e].result & f_console_result_found_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_prepend_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_write_long_prepend_s, main->error.notable); fl_print_format("%[' is specified, but no value is given.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -242,7 +242,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters.array[fss_embedded_list_write_parameter_prepend_e].result == f_console_result_additional_e) { + else if (main->parameters.array[fss_embedded_list_write_parameter_prepend_e].result & f_console_result_value_e) { const f_array_length_t index = main->parameters.array[fss_embedded_list_write_parameter_prepend_e].values.array[main->parameters.array[fss_embedded_list_write_parameter_prepend_e].values.used - 1]; if (argv[index].used) { @@ -259,7 +259,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe value for the parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_prepend_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_write_long_prepend_s, main->error.notable); fl_print_format("%[' must only contain white space.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -276,7 +276,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe value for the parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_prepend_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_write_long_prepend_s, main->error.notable); fl_print_format("%[' must not be an empty string.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -288,12 +288,12 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_embedded_list_write_parameter_ignore_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_write_parameter_ignore_e].result & f_console_result_found_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_ignore_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_write_long_ignore_s, main->error.notable); fl_print_format("%[' was specified, but no values were given.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -301,7 +301,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters.array[fss_embedded_list_write_parameter_ignore_e].result == f_console_result_additional_e) { + else if (main->parameters.array[fss_embedded_list_write_parameter_ignore_e].result & f_console_result_value_e) { const f_array_length_t total_locations = main->parameters.array[fss_embedded_list_write_parameter_ignore_e].locations.used; const f_array_length_t total_arguments = main->parameters.array[fss_embedded_list_write_parameter_ignore_e].values.used; @@ -309,7 +309,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_ignore_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_write_long_ignore_s, main->error.notable); fl_print_format("%[' requires two values.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -322,14 +322,14 @@ extern "C" { f_fss_quote_t quote = f_fss_quote_type_double_e; if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_embedded_list_write_parameter_double_e].result == f_console_result_found_e) { - if (main->parameters.array[fss_embedded_list_write_parameter_single_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_write_parameter_double_e].result & f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_write_parameter_single_e].result & f_console_result_found_e) { if (main->parameters.array[fss_embedded_list_write_parameter_double_e].location < main->parameters.array[fss_embedded_list_write_parameter_single_e].location) { quote = f_fss_quote_type_single_e; } } } - else if (main->parameters.array[fss_embedded_list_write_parameter_single_e].result == f_console_result_found_e) { + else if (main->parameters.array[fss_embedded_list_write_parameter_single_e].result & f_console_result_found_e) { quote = f_fss_quote_type_single_e; } } @@ -357,9 +357,9 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_embedded_list_write_parameter_partial_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_write_parameter_partial_e].result & f_console_result_found_e) { - if (main->parameters.array[fss_embedded_list_write_parameter_object_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_embedded_list_write_parameter_object_e].result & f_console_result_value_e) { for (f_array_length_t i = 0; i < main->parameters.array[fss_embedded_list_write_parameter_object_e].values.used; ++i) { if (!((++main->signal_check) % fss_embedded_list_write_signal_check_d)) { @@ -434,7 +434,7 @@ extern "C" { f_file_stream_unlock(main->error.to); } } - else if (main->error.verbosity > f_console_verbosity_quiet_e && main->error.verbosity != f_console_verbosity_error_e && main->parameters.array[fss_embedded_list_write_parameter_file_e].result == f_console_result_none_e) { + else if (main->error.verbosity > f_console_verbosity_quiet_e && main->error.verbosity != f_console_verbosity_error_e && !(main->parameters.array[fss_embedded_list_write_parameter_file_e].result & f_console_result_found_e)) { // Ensure there is always a newline at the end, unless in quiet mode. fll_print_dynamic_raw(f_string_eol_s, main->output.to); @@ -444,7 +444,7 @@ extern "C" { macro_f_string_ranges_t_delete_simple(ignore); } - if (main->parameters.array[fss_embedded_list_write_parameter_file_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_embedded_list_write_parameter_file_e].result & f_console_result_value_e) { f_file_stream_flush(output); f_file_stream_close(&output); } diff --git a/level_3/fss_embedded_list_write/c/print.c b/level_3/fss_embedded_list_write/c/print.c index 89f184b..5cdcd1e 100644 --- a/level_3/fss_embedded_list_write/c/print.c +++ b/level_3/fss_embedded_list_write/c/print.c @@ -18,15 +18,15 @@ extern "C" { f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, fss_embedded_list_write_short_file_s, fss_embedded_list_write_long_file_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send data to."); - fll_program_print_help_option(print, fss_embedded_list_write_short_content_s, fss_embedded_list_write_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to write."); - fll_program_print_help_option(print, fss_embedded_list_write_short_double_s, fss_embedded_list_write_long_double_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); - fll_program_print_help_option(print, fss_embedded_list_write_short_ignore_s, fss_embedded_list_write_long_ignore_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content."); - fll_program_print_help_option(print, fss_embedded_list_write_short_object_s, fss_embedded_list_write_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to write."); - fll_program_print_help_option(print, fss_embedded_list_write_short_partial_s, fss_embedded_list_write_long_partial_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not write end of Object/Content character."); - fll_program_print_help_option(print, fss_embedded_list_write_short_prepend_s, fss_embedded_list_write_long_prepend_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given white space characters to the start of each multi-line Content."); - fll_program_print_help_option(print, fss_embedded_list_write_short_single_s, fss_embedded_list_write_long_single_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); - fll_program_print_help_option(print, fss_embedded_list_write_short_trim_s, fss_embedded_list_write_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names."); + fll_program_print_help_option(print, fss_embedded_list_write_short_file_s, fss_embedded_list_write_long_file_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Specify a file to send data to."); + fll_program_print_help_option(print, fss_embedded_list_write_short_content_s, fss_embedded_list_write_long_content_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "The Content to write."); + fll_program_print_help_option(print, fss_embedded_list_write_short_double_s, fss_embedded_list_write_long_double_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use double quotes (default)."); + fll_program_print_help_option(print, fss_embedded_list_write_short_ignore_s, fss_embedded_list_write_long_ignore_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Ignore a given range within a Content."); + fll_program_print_help_option(print, fss_embedded_list_write_short_object_s, fss_embedded_list_write_long_object_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " The Object to write."); + fll_program_print_help_option(print, fss_embedded_list_write_short_partial_s, fss_embedded_list_write_long_partial_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Do not write end of Object/Content character."); + fll_program_print_help_option(print, fss_embedded_list_write_short_prepend_s, fss_embedded_list_write_long_prepend_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Prepend the given white space characters to the start of each multi-line Content."); + fll_program_print_help_option(print, fss_embedded_list_write_short_single_s, fss_embedded_list_write_long_single_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use single quotes."); + fll_program_print_help_option(print, fss_embedded_list_write_short_trim_s, fss_embedded_list_write_long_trim_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Trim Object names."); f_print_dynamic_raw(f_string_eol_s, print.to); f_print_dynamic_raw(f_string_eol_s, print.to); @@ -40,14 +40,14 @@ extern "C" { fl_print_format(" or a Form Feed character '%[\\f%]' (%[U+000C%]).%r", print.to, print.set->notable, print.set->notable, print.set->notable, print.set->notable, f_string_eol_s); fl_print_format(" The end of the pipe represents the end of any Object or Content.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The FSS-0008 (Embedded List) specification does not support quoted names, therefore the parameters '%[%r%r%]'", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_single_s, print.set->notable); - fl_print_format(" and '%[%r%r%]' do nothing.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_double_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" The FSS-0008 (Embedded List) specification does not support quoted names, therefore the parameters '%[%r%r%]'", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_write_long_single_s, print.set->notable); + fl_print_format(" and '%[%r%r%]' do nothing.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_write_long_double_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter '%[%r%r%]' designates to not escape any valid nested Object or Content within some Content.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_ignore_s, print.set->notable, f_string_eol_s); + fl_print_format(" The parameter '%[%r%r%]' designates to not escape any valid nested Object or Content within some Content.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_write_long_ignore_s, print.set->notable, f_string_eol_s); fl_print_format(" This parameter requires two values.%r", print.to, f_string_eol_s); fl_print_format(" This parameter is not used for ignoring anything from the input pipe.%r", print.to, f_string_eol_s); - fl_print_format(" This parameter must be specified after a '%[%r%r%]'", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content_s, print.set->notable); - fl_print_format(" parameter and this applies only to the Content represented by that specific '%[%r%r%]' parameter.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content_s, print.set->notable, f_string_eol_s); + fl_print_format(" This parameter must be specified after a '%[%r%r%]'", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_write_long_content_s, print.set->notable); + fl_print_format(" parameter and this applies only to the Content represented by that specific '%[%r%r%]' parameter.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_embedded_list_write_long_content_s, print.set->notable, f_string_eol_s); f_print_dynamic_raw(setting->line_last, print.to); diff --git a/level_3/fss_embedded_list_write/c/private-write.c b/level_3/fss_embedded_list_write/c/private-write.c index 70f214b..f9751ca 100644 --- a/level_3/fss_embedded_list_write/c/private-write.c +++ b/level_3/fss_embedded_list_write/c/private-write.c @@ -16,11 +16,11 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QMust specify the '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_object_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_write_long_object_s, main->error.notable); fl_print_format("%[' parameter and the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_write_long_content_s, main->error.notable); fl_print_format("%[' parameter the same number of times when not specifying the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_partial_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_embedded_list_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -83,7 +83,7 @@ extern "C" { } if (content) { - if (main->parameters.array[fss_embedded_list_write_parameter_trim_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_embedded_list_write_parameter_trim_e].result & f_console_result_found_e) { complete = f_fss_complete_full_trim_e; } else { @@ -112,7 +112,7 @@ extern "C" { f_string_static_t *prepend = 0; - if (main->parameters.array[fss_embedded_list_write_parameter_prepend_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_embedded_list_write_parameter_prepend_e].result & f_console_result_value_e) { const f_array_length_t index = main->parameters.array[fss_embedded_list_write_parameter_prepend_e].values.array[main->parameters.array[fss_embedded_list_write_parameter_prepend_e].values.used - 1]; prepend = &main->parameters.arguments.array[index]; diff --git a/level_3/fss_extended_list_read/c/common.c b/level_3/fss_extended_list_read/c/common.c index abcc4ae..43bb491 100644 --- a/level_3/fss_extended_list_read/c/common.c +++ b/level_3/fss_extended_list_read/c/common.c @@ -117,14 +117,14 @@ extern "C" { } } - if (main->parameters.array[fss_extended_list_read_parameter_line_first_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_read_parameter_line_first_no_e].result & f_console_result_found_e) { setting->line_first = f_string_empty_s; } else { setting->line_first = f_string_eol_s; } - if (main->parameters.array[fss_extended_list_read_parameter_line_last_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_read_parameter_line_last_no_e].result & f_console_result_found_e) { setting->line_last = f_string_empty_s; } else { @@ -150,13 +150,13 @@ extern "C" { } } - if (main->parameters.array[fss_extended_list_read_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_read_parameter_help_e].result & f_console_result_found_e) { setting->flag |= fss_extended_list_read_main_flag_help_e; return; } - if (main->parameters.array[fss_extended_list_read_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_read_parameter_version_e].result & f_console_result_found_e) { setting->flag |= fss_extended_list_read_main_flag_version_e; return; @@ -169,7 +169,7 @@ extern "C" { f_string_static_t * const args = main->parameters.arguments.array; - if (main->parameters.array[fss_extended_list_read_parameter_strip_invalid_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_read_parameter_strip_invalid_e].result & f_console_result_found_e) { setting->flag |= fss_extended_list_read_main_flag_strip_invalid_e; } } diff --git a/level_3/fss_extended_list_read/c/common.h b/level_3/fss_extended_list_read/c/common.h index 1e3d5f4..41897f8 100644 --- a/level_3/fss_extended_list_read/c/common.h +++ b/level_3/fss_extended_list_read/c/common.h @@ -216,33 +216,33 @@ extern "C" { #define fss_extended_list_read_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \ \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_at_s.string, fss_extended_list_read_long_at_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_content_s.string, fss_extended_list_read_long_content_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_columns_s.string, fss_extended_list_read_long_columns_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_delimit_s.string, fss_extended_list_read_long_delimit_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_depth_s.string, fss_extended_list_read_long_depth_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_empty_s.string, fss_extended_list_read_long_empty_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_line_s.string, fss_extended_list_read_long_line_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_name_s.string, fss_extended_list_read_long_name_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_object_s.string, fss_extended_list_read_long_object_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_pipe_s.string, fss_extended_list_read_long_pipe_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_original_s.string, fss_extended_list_read_long_original_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_select_s.string, fss_extended_list_read_long_select_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_total_s.string, fss_extended_list_read_long_total_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_trim_s.string, fss_extended_list_read_long_trim_s.string, 0, 0, f_console_type_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_at_s.string, fss_extended_list_read_long_at_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_content_s.string, fss_extended_list_read_long_content_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_columns_s.string, fss_extended_list_read_long_columns_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_delimit_s.string, fss_extended_list_read_long_delimit_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_depth_s.string, fss_extended_list_read_long_depth_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_empty_s.string, fss_extended_list_read_long_empty_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_line_s.string, fss_extended_list_read_long_line_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_name_s.string, fss_extended_list_read_long_name_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_object_s.string, fss_extended_list_read_long_object_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_pipe_s.string, fss_extended_list_read_long_pipe_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_original_s.string, fss_extended_list_read_long_original_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_select_s.string, fss_extended_list_read_long_select_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_total_s.string, fss_extended_list_read_long_total_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_list_read_short_trim_s.string, fss_extended_list_read_long_trim_s.string, 0, 0, f_console_flag_normal_e), \ } #define fss_extended_list_read_total_parameters_d 26 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 0798799..d7100c6 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 @@ -61,13 +61,13 @@ extern "C" { status = F_none; - if (main->parameters.array[fss_extended_list_read_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_read_parameter_help_e].result & f_console_result_found_e) { fss_extended_list_read_print_help(setting, main->message); return status; } - if (main->parameters.array[fss_extended_list_read_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_read_parameter_version_e].result & f_console_result_found_e) { fll_program_print_version(main->message, fss_extended_list_read_program_version_s); return status; @@ -120,11 +120,11 @@ extern "C" { for (f_array_length_t i = 0; i < 6; ++i) { - if (main->parameters.array[parameter_code[i]].result == f_console_result_found_e) { + if (main->parameters.array[parameter_code[i]].result & f_console_result_found_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, parameter_name[i], main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, parameter_name[i], main->error.notable); fl_print_format("%[' requires a %s.%]%r", main->error.to, main->error.context, parameter_message[i], main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -136,7 +136,7 @@ extern "C" { } // for } - if (F_status_is_error_not(status) && main->parameters.array[fss_extended_list_read_parameter_columns_e].result == f_console_result_found_e) { + if (F_status_is_error_not(status) && (main->parameters.array[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_e, fss_extended_list_read_parameter_line_e, @@ -165,7 +165,7 @@ extern "C" { if (main->parameters.array[parameter_code[i]].result == parameter_match[i]) { if (main->error.verbosity > f_console_verbosity_quiet_e) { - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, fss_extended_list_read_long_columns_s, parameter_name[i]); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_extended_list_read_long_columns_s, parameter_name[i]); } status = F_status_set_error(F_parameter); @@ -175,24 +175,24 @@ extern "C" { } // for } - if (F_status_is_error_not(status) && main->parameters.array[fss_extended_list_read_parameter_pipe_e].result == f_console_result_found_e) { - if (main->parameters.array[fss_extended_list_read_parameter_total_e].result == f_console_result_found_e) { + if (F_status_is_error_not(status) && (main->parameters.array[fss_extended_list_read_parameter_pipe_e].result & f_console_result_found_e)) { + if (main->parameters.array[fss_extended_list_read_parameter_total_e].result & f_console_result_found_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, fss_extended_list_read_long_pipe_s, fss_extended_list_read_long_total_s); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_extended_list_read_long_pipe_s, fss_extended_list_read_long_total_s); } status = F_status_set_error(F_parameter); } - else if (main->parameters.array[fss_extended_list_read_parameter_line_e].result == f_console_result_additional_e) { + else if (main->parameters.array[fss_extended_list_read_parameter_line_e].result & f_console_result_value_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, fss_extended_list_read_long_pipe_s, fss_extended_list_read_long_line_s); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_extended_list_read_long_pipe_s, fss_extended_list_read_long_line_s); } status = F_status_set_error(F_parameter); } } - if (F_status_is_error_not(status) && main->parameters.array[fss_extended_list_read_parameter_delimit_e].result == f_console_result_additional_e) { + if (F_status_is_error_not(status) && main->parameters.array[fss_extended_list_read_parameter_delimit_e].result & f_console_result_value_e) { f_array_length_t index = 0; f_array_length_t length = 0; @@ -220,7 +220,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe value for the parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_delimit_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_delimit_s, main->error.notable); fl_print_format("%[' must not be empty.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -340,7 +340,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.array[fss_extended_list_read_parameter_total_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_read_parameter_total_e].result & f_console_result_found_e) { fss_extended_list_read_print_zero(main); } @@ -349,11 +349,11 @@ extern "C" { return F_none; } - if (F_status_is_error_not(status) && main->parameters.array[fss_extended_list_read_parameter_select_e].result == f_console_result_found_e) { + if (F_status_is_error_not(status) && (main->parameters.array[fss_extended_list_read_parameter_select_e].result & f_console_result_found_e)) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_select_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_select_s, main->error.notable); fl_print_format("%[' parameter requires a positive number.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); diff --git a/level_3/fss_extended_list_read/c/print.c b/level_3/fss_extended_list_read/c/print.c index 355f5aa..57396d8 100644 --- a/level_3/fss_extended_list_read/c/print.c +++ b/level_3/fss_extended_list_read/c/print.c @@ -18,20 +18,20 @@ extern "C" { f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, fss_extended_list_read_short_at_s, fss_extended_list_read_long_at_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric index."); - fll_program_print_help_option(print, fss_extended_list_read_short_content_s, fss_extended_list_read_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Content (default)."); - fll_program_print_help_option(print, fss_extended_list_read_short_columns_s, fss_extended_list_read_long_columns_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns."); - fll_program_print_help_option(print, fss_extended_list_read_short_delimit_s, fss_extended_list_read_long_delimit_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits."); - fll_program_print_help_option(print, fss_extended_list_read_short_depth_s, fss_extended_list_read_long_depth_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth."); - fll_program_print_help_option(print, fss_extended_list_read_short_empty_s, fss_extended_list_read_long_empty_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing."); - fll_program_print_help_option(print, fss_extended_list_read_short_line_s, fss_extended_list_read_long_line_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line."); - fll_program_print_help_option(print, fss_extended_list_read_short_name_s, fss_extended_list_read_long_name_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name."); - fll_program_print_help_option(print, fss_extended_list_read_short_object_s, fss_extended_list_read_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object."); - fll_program_print_help_option(print, fss_extended_list_read_short_pipe_s, fss_extended_list_read_long_pipe_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format."); - fll_program_print_help_option(print, fss_extended_list_read_short_original_s, fss_extended_list_read_long_original_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print with the original quotes and escapes."); - fll_program_print_help_option(print, fss_extended_list_read_short_select_s, fss_extended_list_read_long_select_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index."); - fll_program_print_help_option(print, fss_extended_list_read_short_total_s, fss_extended_list_read_long_total_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines."); - fll_program_print_help_option(print, fss_extended_list_read_short_trim_s, fss_extended_list_read_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print."); + fll_program_print_help_option(print, fss_extended_list_read_short_at_s, fss_extended_list_read_long_at_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select Object at this numeric index."); + fll_program_print_help_option(print, fss_extended_list_read_short_content_s, fss_extended_list_read_long_content_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the Content (default)."); + fll_program_print_help_option(print, fss_extended_list_read_short_columns_s, fss_extended_list_read_long_columns_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the total number of columns."); + fll_program_print_help_option(print, fss_extended_list_read_short_delimit_s, fss_extended_list_read_long_delimit_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Designate how to handle applying delimits."); + fll_program_print_help_option(print, fss_extended_list_read_short_depth_s, fss_extended_list_read_long_depth_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select Object at this numeric depth."); + fll_program_print_help_option(print, fss_extended_list_read_short_empty_s, fss_extended_list_read_long_empty_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Include empty Content when processing."); + fll_program_print_help_option(print, fss_extended_list_read_short_line_s, fss_extended_list_read_long_line_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print only the Content at the given line."); + fll_program_print_help_option(print, fss_extended_list_read_short_name_s, fss_extended_list_read_long_name_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select Object with this name."); + fll_program_print_help_option(print, fss_extended_list_read_short_object_s, fss_extended_list_read_long_object_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the Object."); + fll_program_print_help_option(print, fss_extended_list_read_short_pipe_s, fss_extended_list_read_long_pipe_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print using the special pipe format."); + fll_program_print_help_option(print, fss_extended_list_read_short_original_s, fss_extended_list_read_long_original_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Print with the original quotes and escapes."); + fll_program_print_help_option(print, fss_extended_list_read_short_select_s, fss_extended_list_read_long_select_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select sub-Content at this index."); + fll_program_print_help_option(print, fss_extended_list_read_short_total_s, fss_extended_list_read_long_total_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the total number of lines."); + fll_program_print_help_option(print, fss_extended_list_read_short_trim_s, fss_extended_list_read_long_trim_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Trim Object names on select or print."); f_print_dynamic_raw(f_string_eol_s, print.to); f_print_dynamic_raw(f_string_eol_s, print.to); @@ -45,47 +45,47 @@ extern "C" { fl_print_format(" All numeric positions (indexes) start at 0 instead of 1.%r", print.to, f_string_eol_s); fl_print_format(" For example, a file of 17 lines would range from 0 to 16.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" When using the %[%r%r%] option, an order of operations is enforced on the parameters.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth_s, print.set->notable, f_string_eol_s); + fl_print_format(" When using the %[%r%r%] option, an order of operations is enforced on the parameters.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_depth_s, print.set->notable, f_string_eol_s); fl_print_format(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%r", print.to, f_string_eol_s); - fl_print_format(" %[%r%r%]: An Object index at the specified depth.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_at_s, print.set->notable, f_string_eol_s); - fl_print_format(" %[%r%r%]: A new depth within the specified depth, indexed from the root.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth_s, print.set->notable, f_string_eol_s); - fl_print_format(" %[%r%r%]: An Object name at the specified depth.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" %[%r%r%]: An Object index at the specified depth.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_at_s, print.set->notable, f_string_eol_s); + fl_print_format(" %[%r%r%]: A new depth within the specified depth, indexed from the root.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_depth_s, print.set->notable, f_string_eol_s); + fl_print_format(" %[%r%r%]: An Object name at the specified depth.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%] must be in numeric order, but values in between may be skipped.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth_s, print.set->notable, f_string_eol_s); + fl_print_format(" The parameter %[%r%r%] must be in numeric order, but values in between may be skipped.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_depth_s, print.set->notable, f_string_eol_s); fl_print_format(" ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%r", print.to, f_string_eol_s); fl_print_format(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%] selects a Content column.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_select_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" The parameter %[%r%r%] selects a Content column.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_select_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" Specify both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_object_s, print.set->notable); - fl_print_format(" and the %[%r%r%] parameters to get the total objects.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_total_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" Specify both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_object_s, print.set->notable); + fl_print_format(" and the %[%r%r%] parameters to get the total objects.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_total_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" When both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_at_s, print.set->notable); - fl_print_format(" and %[%r%r%] parameters are specified (at the same depth),", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_name_s, print.set->notable); - fl_print_format(" the %[%r%r%] parameter value will be treated as a position relative to the specified", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_at_s, print.set->notable); - fl_print_format(" %[%r%r%] parameter value.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" When both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_at_s, print.set->notable); + fl_print_format(" and %[%r%r%] parameters are specified (at the same depth),", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_name_s, print.set->notable); + fl_print_format(" the %[%r%r%] parameter value will be treated as a position relative to the specified", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_at_s, print.set->notable); + fl_print_format(" %[%r%r%] parameter value.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" This program may support parameters, such as %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth_s, print.set->notable); - fl_print_format(" or %[%r%r%], even if not supported by the standard.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_select_s, print.set->notable, f_string_eol_s); + fl_print_format(" This program may support parameters, such as %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_depth_s, print.set->notable); + fl_print_format(" or %[%r%r%], even if not supported by the standard.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_select_s, print.set->notable, f_string_eol_s); fl_print_format(" This is done to help ensure consistency for scripting.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth_s, print.set->notable); + fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_depth_s, print.set->notable); fl_print_format(" if the standard doesn't support nested Content, then only a depth of 0 would be valid.%r", print.to, f_string_eol_s); - fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_select_s, print.set->notable); + fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_select_s, print.set->notable); fl_print_format(" if the standard doesn't support multiple Content groups, then only a select of 0 would be valid.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_trim_s, print.set->notable); + fl_print_format(" The parameter %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_trim_s, print.set->notable); fl_print_format(" will remove leading and trailing white spaces when selecting objects or when printing objects.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" When specifying both the %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_object_s, print.set->notable); - fl_print_format(" parameter and the %[%r%r%] parameter, the entire Object and Content are printed, including the formatting.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_content_s, print.set->notable, f_string_eol_s); + fl_print_format(" When specifying both the %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_object_s, print.set->notable); + fl_print_format(" parameter and the %[%r%r%] parameter, the entire Object and Content are printed, including the formatting.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_content_s, print.set->notable, f_string_eol_s); fl_print_format(" Both the Object and Content printed are already escaped.%r", print.to, f_string_eol_s); fl_print_format(" Both the Object and Content are separated by a New Line character '\\n' (U+000A).%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%] accepts the following:%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_delimit_s, print.set->notable, f_string_eol_s); + fl_print_format(" The parameter %[%r%r%] accepts the following:%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_delimit_s, print.set->notable, f_string_eol_s); fl_print_format(" - %[%r%]: Do not apply delimits.%r", print.to, print.set->notable, fss_extended_list_read_delimit_mode_name_none_s, print.set->notable, f_string_eol_s); fl_print_format(" - %[%r%]: (default) Apply all delimits.%r", print.to, print.set->notable, fss_extended_list_read_delimit_mode_name_all_s, print.set->notable, f_string_eol_s); fl_print_format(" - %[%r%]: Apply delimits for Objects.%r", print.to, print.set->notable, fss_extended_list_read_delimit_mode_name_object_s, print.set->notable, f_string_eol_s); @@ -93,15 +93,15 @@ extern "C" { fl_print_format(" - A number, 0 or greater, followed by a %[%r%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%r", print.to, print.set->notable, fss_extended_list_read_delimit_mode_name_greater_s, print.set->notable, f_string_eol_s, f_string_eol_s); fl_print_format(" - A number, 0 or lesser, followed by a %[%r%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%r%r", print.to, print.set->notable, fss_extended_list_read_delimit_mode_name_lesser_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" The %[%r%r%] parameter may be specified multiple times to customize the delimit behavior.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_delimit_s, print.set->notable, f_string_eol_s); + fl_print_format(" The %[%r%r%] parameter may be specified multiple times to customize the delimit behavior.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_delimit_s, print.set->notable, f_string_eol_s); - fl_print_format(" The %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_delimit_s, print.set->notable); + fl_print_format(" The %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_delimit_s, print.set->notable); fl_print_format(" values %[%r%]", print.to, print.set->notable, fss_extended_list_read_delimit_mode_name_none_s, print.set->notable); fl_print_format(" and %[%r%],", print.to, print.set->notable, fss_extended_list_read_delimit_mode_name_all_s, print.set->notable); fl_print_format(" overrule all other delimit values.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameters %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_columns_s, print.set->notable); - fl_print_format(" and %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_select_s, print.set->notable); + fl_print_format(" The parameters %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_columns_s, print.set->notable); + fl_print_format(" and %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_select_s, print.set->notable); fl_print_format(" refer to a Content column.%r", print.to, f_string_eol_s); fl_print_format(" The word \"column\" is being loosely defined to refer to a specific Content.%r", print.to, f_string_eol_s); fl_print_format(" This is not to be confused with a depth.%r", print.to, f_string_eol_s); diff --git a/level_3/fss_extended_list_read/c/private-print.c b/level_3/fss_extended_list_read/c/private-print.c index c1809d8..7404fdd 100644 --- a/level_3/fss_extended_list_read/c/private-print.c +++ b/level_3/fss_extended_list_read/c/private-print.c @@ -67,7 +67,7 @@ extern "C" { #ifndef _di_fss_extended_list_read_print_content_ignore_ void fss_extended_list_read_print_content_ignore(fll_program_data_t * const main) { - if (main->parameters.array[fss_extended_list_read_parameter_pipe_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_read_parameter_pipe_e].result & f_console_result_found_e) { f_print_dynamic_raw(fss_extended_list_read_pipe_content_ignore_s, main->output.to); } } @@ -76,7 +76,7 @@ extern "C" { #ifndef _di_fss_extended_list_read_print_object_end_ void fss_extended_list_read_print_object_end(fll_program_data_t * const main, fss_extended_list_read_data_t * const data) { - if (main->parameters.array[fss_extended_list_read_parameter_pipe_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_read_parameter_pipe_e].result & f_console_result_found_e) { f_print_dynamic_raw(fss_extended_list_read_pipe_content_start_s, main->output.to); } else { @@ -91,7 +91,7 @@ extern "C" { #ifndef _di_fss_extended_list_read_print_set_end_ void fss_extended_list_read_print_set_end(fll_program_data_t * const main, fss_extended_list_read_data_t * const data) { - if (main->parameters.array[fss_extended_list_read_parameter_pipe_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_read_parameter_pipe_e].result & f_console_result_found_e) { f_print_dynamic_raw(fss_extended_list_read_pipe_content_end_s, main->output.to); } else { diff --git a/level_3/fss_extended_list_read/c/private-read.c b/level_3/fss_extended_list_read/c/private-read.c index 1676b4b..da9a4c2 100644 --- a/level_3/fss_extended_list_read/c/private-read.c +++ b/level_3/fss_extended_list_read/c/private-read.c @@ -63,7 +63,7 @@ extern "C" { { f_array_length_t depth_size = 1; - if (main->parameters.array[fss_extended_list_read_parameter_depth_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_list_read_parameter_depth_e].result & f_console_result_value_e) { depth_size = main->parameters.array[fss_extended_list_read_parameter_depth_e].values.used; } @@ -118,7 +118,7 @@ extern "C" { } } - if (main->parameters.array[fss_extended_list_read_parameter_at_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_list_read_parameter_at_e].result & f_console_result_value_e) { for (; position_at < main->parameters.array[fss_extended_list_read_parameter_at_e].values.used; ++position_at) { if (main->parameters.array[fss_extended_list_read_parameter_at_e].values.array[position_at] < position_depth) { @@ -141,7 +141,7 @@ extern "C" { } // for } - if (main->parameters.array[fss_extended_list_read_parameter_name_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_list_read_parameter_name_e].result & f_console_result_value_e) { for (; position_name < main->parameters.array[fss_extended_list_read_parameter_name_e].values.used; ++position_name) { if (main->parameters.array[fss_extended_list_read_parameter_name_e].values.array[position_name] < position_depth) { @@ -154,7 +154,7 @@ extern "C" { data->depths.array[i].index_name = main->parameters.array[fss_extended_list_read_parameter_name_e].values.array[position_name]; - if (main->parameters.array[fss_extended_list_read_parameter_trim_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_read_parameter_trim_e].result & f_console_result_found_e) { status = fl_string_dynamic_rip(data->argv[data->depths.array[i].index_name], &data->depths.array[i].value_name); } else { @@ -162,7 +162,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), main->parameters.array[fss_extended_list_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_dynamic_rip" : "f_string_dynamic_append", F_true); + fll_error_print(main->error, F_status_set_fine(status), (main->parameters.array[fss_extended_list_read_parameter_trim_e].result & f_console_result_found_e) ? "fl_string_dynamic_rip" : "f_string_dynamic_append", F_true); return status; } @@ -191,7 +191,7 @@ extern "C" { fl_print_format("%r%[%QThe value '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); fl_print_format("%[%ul%]", main->error.to, main->error.notable, data->depths.array[i].depth, main->error.notable); fl_print_format("%[' may only be specified once for the parameter '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_depth_s, main->error.notable); fl_print_format("%['.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -204,7 +204,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_list_read_long_depth_s, main->error.notable); fl_print_format("%[' may not have the value '%]", main->error.to, main->error.context, main->error.context); fl_print_format("%[%ul%]", main->error.to, main->error.notable, data->depths.array[i].depth, main->error.notable); fl_print_format("%[' before the value '%]", main->error.to, main->error.context, main->error.context); @@ -274,7 +274,7 @@ extern "C" { #ifndef _di_fss_extended_list_read_load_number_ f_status_t fss_extended_list_read_load_number(fll_program_data_t * const main, fss_extended_list_read_data_t * const data, const f_array_length_t parameter, const f_string_static_t name, f_number_unsigned_t *number) { - if (main->parameters.array[parameter].result == f_console_result_additional_e) { + if (main->parameters.array[parameter].result & f_console_result_value_e) { const f_array_length_t index = main->parameters.array[parameter].values.array[main->parameters.array[parameter].values.used - 1]; const f_status_t status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, data->argv[index], number); @@ -300,7 +300,7 @@ extern "C" { // This standard does not support multiple content groups. if ((data->option & fss_extended_list_read_data_option_select_d) && data->select) { - if (main->parameters.array[fss_extended_list_read_parameter_total_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_read_parameter_total_e].result & f_console_result_found_e) { fss_extended_list_read_print_zero(main); } @@ -654,53 +654,53 @@ extern "C" { f_status_t status = F_none; - if (main->parameters.array[fss_extended_list_read_parameter_at_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_list_read_parameter_at_e].result & f_console_result_value_e) { data->option |= fss_extended_list_read_data_option_at_d; } - if (main->parameters.array[fss_extended_list_read_parameter_columns_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_read_parameter_columns_e].result & f_console_result_found_e) { data->option |= fss_extended_list_read_data_option_columns_d; } - if (main->parameters.array[fss_extended_list_read_parameter_content_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_read_parameter_content_e].result & f_console_result_found_e) { data->option |= fss_extended_list_read_data_option_content_d; } - if (main->parameters.array[fss_extended_list_read_parameter_empty_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_read_parameter_empty_e].result & f_console_result_found_e) { data->option |= fss_extended_list_read_data_option_empty_d; } - if (main->parameters.array[fss_extended_list_read_parameter_line_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_list_read_parameter_line_e].result & f_console_result_value_e) { data->option |= fss_extended_list_read_data_option_line_d; status = fss_extended_list_read_load_number(main, data, fss_extended_list_read_parameter_line_e, fss_extended_list_read_long_line_s, &data->line); if (F_status_is_error(status)) return status; } - if (main->parameters.array[fss_extended_list_read_parameter_name_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_list_read_parameter_name_e].result & f_console_result_value_e) { data->option |= fss_extended_list_read_data_option_name_d; } - if (main->parameters.array[fss_extended_list_read_parameter_object_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_read_parameter_object_e].result & f_console_result_found_e) { data->option |= fss_extended_list_read_data_option_object_d; } - if (main->parameters.array[fss_extended_list_read_parameter_original_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_read_parameter_original_e].result & f_console_result_found_e) { data->option |= fss_extended_list_read_data_option_original_d; } - if (main->parameters.array[fss_extended_list_read_parameter_select_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_list_read_parameter_select_e].result & f_console_result_value_e) { data->option |= fss_extended_list_read_data_option_select_d; status = fss_extended_list_read_load_number(main, data, fss_extended_list_read_parameter_select_e, fss_extended_list_read_long_select_s, &data->select); if (F_status_is_error(status)) return status; } - if (main->parameters.array[fss_extended_list_read_parameter_total_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_read_parameter_total_e].result & f_console_result_found_e) { data->option |= fss_extended_list_read_data_option_total_d; } - if (main->parameters.array[fss_extended_list_read_parameter_trim_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_read_parameter_trim_e].result & f_console_result_found_e) { data->option |= fss_extended_list_read_data_option_trim_d; } diff --git a/level_3/fss_extended_list_write/c/common.c b/level_3/fss_extended_list_write/c/common.c index b0e5c1e..dcb25d4 100644 --- a/level_3/fss_extended_list_write/c/common.c +++ b/level_3/fss_extended_list_write/c/common.c @@ -99,14 +99,14 @@ extern "C" { } } - if (main->parameters.array[fss_extended_list_write_parameter_line_first_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_write_parameter_line_first_no_e].result & f_console_result_found_e) { setting->line_first = f_string_empty_s; } else { setting->line_first = f_string_eol_s; } - if (main->parameters.array[fss_extended_list_write_parameter_line_last_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_write_parameter_line_last_no_e].result & f_console_result_found_e) { setting->line_last = f_string_empty_s; } else { @@ -132,13 +132,13 @@ extern "C" { } } - if (main->parameters.array[fss_extended_list_write_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_write_parameter_help_e].result & f_console_result_found_e) { setting->flag |= fss_extended_list_write_main_flag_help_e; return; } - if (main->parameters.array[fss_extended_list_write_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_write_parameter_version_e].result & f_console_result_found_e) { setting->flag |= fss_extended_list_write_main_flag_version_e; return; @@ -151,7 +151,7 @@ extern "C" { f_string_static_t * const args = main->parameters.arguments.array; - if (main->parameters.array[fss_extended_list_write_parameter_strip_invalid_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_write_parameter_strip_invalid_e].result & f_console_result_found_e) { setting->flag |= fss_extended_list_write_main_flag_strip_invalid_e; } } diff --git a/level_3/fss_extended_list_write/c/common.h b/level_3/fss_extended_list_write/c/common.h index 5a9b6a2..c3f858f 100644 --- a/level_3/fss_extended_list_write/c/common.h +++ b/level_3/fss_extended_list_write/c/common.h @@ -181,28 +181,28 @@ extern "C" { #define fss_extended_list_write_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \ \ - macro_f_console_parameter_t_initialize2(fss_extended_list_write_short_file_s.string, fss_extended_list_write_long_file_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_write_short_content_s.string, fss_extended_list_write_long_content_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_write_short_double_s.string, fss_extended_list_write_long_double_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_write_short_ignore_s.string, fss_extended_list_write_long_ignore_s.string, 0, 2, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_write_short_object_s.string, fss_extended_list_write_long_object_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_write_short_partial_s.string, fss_extended_list_write_long_partial_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_write_short_prepend_s.string, fss_extended_list_write_long_prepend_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_write_short_single_s.string, fss_extended_list_write_long_single_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_list_write_short_trim_s.string, fss_extended_list_write_long_trim_s.string, 0, 0, f_console_type_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_list_write_short_file_s.string, fss_extended_list_write_long_file_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_list_write_short_content_s.string, fss_extended_list_write_long_content_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_list_write_short_double_s.string, fss_extended_list_write_long_double_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_list_write_short_ignore_s.string, fss_extended_list_write_long_ignore_s.string, 0, 2, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_list_write_short_object_s.string, fss_extended_list_write_long_object_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_list_write_short_partial_s.string, fss_extended_list_write_long_partial_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_list_write_short_prepend_s.string, fss_extended_list_write_long_prepend_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_list_write_short_single_s.string, fss_extended_list_write_long_single_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_list_write_short_trim_s.string, fss_extended_list_write_long_trim_s.string, 0, 0, f_console_flag_normal_e), \ } #define fss_extended_list_write_total_parameters_d 21 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 56c946b..7cc336c 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 @@ -64,13 +64,13 @@ extern "C" { status = F_none; - if (main->parameters.array[fss_extended_list_write_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_write_parameter_help_e].result & f_console_result_found_e) { fss_extended_list_write_print_help(setting, main->message); return status; } - if (main->parameters.array[fss_extended_list_write_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_write_parameter_version_e].result & f_console_result_found_e) { fll_program_print_version(main->message, fss_extended_list_write_program_version_s); return status; @@ -83,13 +83,13 @@ 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.array[fss_extended_list_write_parameter_file_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_list_write_parameter_file_e].result & f_console_result_value_e) { if (main->parameters.array[fss_extended_list_write_parameter_file_e].values.used > 1) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_file_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_list_write_long_file_s, main->error.notable); fl_print_format("%[' may only be specified once.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -109,8 +109,8 @@ extern "C" { } } } - else if (main->parameters.array[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); + else if (main->parameters.array[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_normal_s, fss_extended_list_write_long_file_s); status = F_status_set_error(F_parameter); } } @@ -119,28 +119,28 @@ extern "C" { if (main->parameters.array[fss_extended_list_write_parameter_object_e].locations.used || main->parameters.array[fss_extended_list_write_parameter_content_e].locations.used) { if (main->parameters.array[fss_extended_list_write_parameter_object_e].locations.used) { if (main->parameters.array[fss_extended_list_write_parameter_object_e].locations.used != main->parameters.array[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); + fss_extended_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_normal_s, fss_extended_list_write_long_object_s); status = F_status_set_error(F_parameter); } else if (main->parameters.array[fss_extended_list_write_parameter_content_e].locations.used != main->parameters.array[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); + fss_extended_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_normal_s, fss_extended_list_write_long_content_s); status = F_status_set_error(F_parameter); } - else if (main->parameters.array[fss_extended_list_write_parameter_object_e].locations.used != main->parameters.array[fss_extended_list_write_parameter_content_e].locations.used && main->parameters.array[fss_extended_list_write_parameter_partial_e].result == f_console_result_none_e) { + else if (main->parameters.array[fss_extended_list_write_parameter_object_e].locations.used != main->parameters.array[fss_extended_list_write_parameter_content_e].locations.used && !(main->parameters.array[fss_extended_list_write_parameter_partial_e].result & f_console_result_found_e)) { fss_extended_list_write_error_parameter_same_times_print(main); status = F_status_set_error(F_parameter); } else if (main->parameters.array[fss_extended_list_write_parameter_content_e].locations.used && main->parameters.array[fss_extended_list_write_parameter_partial_e].locations.used) { - if (main->parameters.array[fss_extended_list_write_parameter_content_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_list_write_parameter_content_e].result & f_console_result_value_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_partial_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_list_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter only allows either the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_object_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_list_write_long_object_s, main->error.notable); fl_print_format("%[' parameter or the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_content_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_list_write_long_content_s, main->error.notable); fl_print_format("%[' parameter, but not both.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -151,7 +151,7 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_extended_list_write_parameter_content_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_list_write_parameter_content_e].result & f_console_result_value_e) { f_array_length_t location_object = 0; f_array_length_t location_content = 0; f_array_length_t location_sub_object = 0; @@ -168,9 +168,9 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QEach '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_object_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_list_write_long_object_s, main->error.notable); fl_print_format("%[' parameter must be specified before a '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_content_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_list_write_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -185,7 +185,7 @@ extern "C" { } else if (main->parameters.array[fss_extended_list_write_parameter_content_e].locations.used) { if (main->parameters.array[fss_extended_list_write_parameter_content_e].locations.used != main->parameters.array[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); + fss_extended_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_normal_s, fss_extended_list_write_long_content_s); status = F_status_set_error(F_parameter); } else if (!main->parameters.array[fss_extended_list_write_parameter_partial_e].locations.used) { @@ -199,9 +199,9 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThis requires either piped data or the use of the '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_object_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_list_write_long_object_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_content_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_list_write_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -211,12 +211,12 @@ extern "C" { } if (F_status_is_error_not(status) && (main->pipe & fll_program_data_pipe_input_e)) { - if (main->parameters.array[fss_extended_list_write_parameter_partial_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_write_parameter_partial_e].result & f_console_result_found_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThis '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_partial_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_list_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter cannot be used when processing a pipe.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -228,12 +228,12 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_extended_list_write_parameter_prepend_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_write_parameter_prepend_e].result & f_console_result_found_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_prepend_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_list_write_long_prepend_s, main->error.notable); fl_print_format("%[' is specified, but no value is given.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -241,7 +241,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters.array[fss_extended_list_write_parameter_prepend_e].result == f_console_result_additional_e) { + else if (main->parameters.array[fss_extended_list_write_parameter_prepend_e].result & f_console_result_value_e) { const f_array_length_t index = main->parameters.array[fss_extended_list_write_parameter_prepend_e].values.array[main->parameters.array[fss_extended_list_write_parameter_prepend_e].values.used - 1]; if (argv[index].used) { @@ -258,7 +258,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe value for the parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_prepend_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_list_write_long_prepend_s, main->error.notable); fl_print_format("%[' must only contain white space.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -275,7 +275,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe value for the parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_prepend_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_list_write_long_prepend_s, main->error.notable); fl_print_format("%[' must not be an empty string.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -287,12 +287,12 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_extended_list_write_parameter_ignore_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_write_parameter_ignore_e].result & f_console_result_found_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_ignore_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_list_write_long_ignore_s, main->error.notable); fl_print_format("%[' was specified, but no values were given.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -300,7 +300,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters.array[fss_extended_list_write_parameter_ignore_e].result == f_console_result_additional_e) { + else if (main->parameters.array[fss_extended_list_write_parameter_ignore_e].result & f_console_result_value_e) { const f_array_length_t total_locations = main->parameters.array[fss_extended_list_write_parameter_ignore_e].locations.used; const f_array_length_t total_arguments = main->parameters.array[fss_extended_list_write_parameter_ignore_e].values.used; @@ -308,7 +308,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_ignore_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_list_write_long_ignore_s, main->error.notable); fl_print_format("%[' requires two values.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -321,14 +321,14 @@ extern "C" { f_fss_quote_t quote = f_fss_quote_type_double_e; if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_extended_list_write_parameter_double_e].result == f_console_result_found_e) { - if (main->parameters.array[fss_extended_list_write_parameter_single_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_write_parameter_double_e].result & f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_write_parameter_single_e].result & f_console_result_found_e) { if (main->parameters.array[fss_extended_list_write_parameter_double_e].location < main->parameters.array[fss_extended_list_write_parameter_single_e].location) { quote = f_fss_quote_type_single_e; } } } - else if (main->parameters.array[fss_extended_list_write_parameter_single_e].result == f_console_result_found_e) { + else if (main->parameters.array[fss_extended_list_write_parameter_single_e].result & f_console_result_found_e) { quote = f_fss_quote_type_single_e; } } @@ -356,9 +356,9 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_extended_list_write_parameter_partial_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_write_parameter_partial_e].result & f_console_result_found_e) { - if (main->parameters.array[fss_extended_list_write_parameter_object_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_list_write_parameter_object_e].result & f_console_result_value_e) { for (f_array_length_t i = 0; i < main->parameters.array[fss_extended_list_write_parameter_object_e].values.used; ++i) { if (!((++main->signal_check) % fss_extended_list_write_signal_check_d)) { @@ -433,7 +433,7 @@ extern "C" { f_file_stream_unlock(main->error.to); } } - else if (main->error.verbosity > f_console_verbosity_quiet_e && main->error.verbosity != f_console_verbosity_error_e && main->parameters.array[fss_extended_list_write_parameter_file_e].result == f_console_result_none_e) { + else if (main->error.verbosity > f_console_verbosity_quiet_e && main->error.verbosity != f_console_verbosity_error_e && !(main->parameters.array[fss_extended_list_write_parameter_file_e].result & f_console_result_found_e)) { // Ensure there is always a newline at the end, unless in quiet mode. fll_print_dynamic_raw(f_string_eol_s, main->output.to); @@ -443,7 +443,7 @@ extern "C" { macro_f_string_ranges_t_delete_simple(ignore); } - if (main->parameters.array[fss_extended_list_write_parameter_file_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_list_write_parameter_file_e].result & f_console_result_value_e) { f_file_stream_flush(output); f_file_stream_close(&output); } diff --git a/level_3/fss_extended_list_write/c/print.c b/level_3/fss_extended_list_write/c/print.c index 001cbd0..f8c9fea 100644 --- a/level_3/fss_extended_list_write/c/print.c +++ b/level_3/fss_extended_list_write/c/print.c @@ -18,15 +18,15 @@ extern "C" { f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, fss_extended_list_write_short_file_s, fss_extended_list_write_long_file_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send data to."); - fll_program_print_help_option(print, fss_extended_list_write_short_content_s, fss_extended_list_write_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to write."); - fll_program_print_help_option(print, fss_extended_list_write_short_double_s, fss_extended_list_write_long_double_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); - fll_program_print_help_option(print, fss_extended_list_write_short_ignore_s, fss_extended_list_write_long_ignore_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content."); - fll_program_print_help_option(print, fss_extended_list_write_short_object_s, fss_extended_list_write_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to write."); - fll_program_print_help_option(print, fss_extended_list_write_short_partial_s, fss_extended_list_write_long_partial_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not write end of Object/Content character."); - fll_program_print_help_option(print, fss_extended_list_write_short_prepend_s, fss_extended_list_write_long_prepend_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given white space characters to the start of each multi-line Content."); - fll_program_print_help_option(print, fss_extended_list_write_short_single_s, fss_extended_list_write_long_single_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); - fll_program_print_help_option(print, fss_extended_list_write_short_trim_s, fss_extended_list_write_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names."); + fll_program_print_help_option(print, fss_extended_list_write_short_file_s, fss_extended_list_write_long_file_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Specify a file to send data to."); + fll_program_print_help_option(print, fss_extended_list_write_short_content_s, fss_extended_list_write_long_content_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "The Content to write."); + fll_program_print_help_option(print, fss_extended_list_write_short_double_s, fss_extended_list_write_long_double_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use double quotes (default)."); + fll_program_print_help_option(print, fss_extended_list_write_short_ignore_s, fss_extended_list_write_long_ignore_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Ignore a given range within a Content."); + fll_program_print_help_option(print, fss_extended_list_write_short_object_s, fss_extended_list_write_long_object_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " The Object to write."); + fll_program_print_help_option(print, fss_extended_list_write_short_partial_s, fss_extended_list_write_long_partial_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Do not write end of Object/Content character."); + fll_program_print_help_option(print, fss_extended_list_write_short_prepend_s, fss_extended_list_write_long_prepend_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Prepend the given white space characters to the start of each multi-line Content."); + fll_program_print_help_option(print, fss_extended_list_write_short_single_s, fss_extended_list_write_long_single_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use single quotes."); + fll_program_print_help_option(print, fss_extended_list_write_short_trim_s, fss_extended_list_write_long_trim_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Trim Object names."); f_print_dynamic_raw(f_string_eol_s, print.to); f_print_dynamic_raw(f_string_eol_s, print.to); @@ -40,14 +40,14 @@ extern "C" { fl_print_format(" or a Form Feed character '%[\\f%]' (%[U+000C%]).%r", print.to, print.set->notable, print.set->notable, print.set->notable, print.set->notable, f_string_eol_s); fl_print_format(" The end of the pipe represents the end of any Object or Content.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The FSS-0003 (Extended List) specification does not support quoted names, therefore the parameters '%[%r%r%]'", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_single_s, print.set->notable); - fl_print_format(" and '%[%r%r%]' do nothing.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_double_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" The FSS-0003 (Extended List) specification does not support quoted names, therefore the parameters '%[%r%r%]'", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_write_long_single_s, print.set->notable); + fl_print_format(" and '%[%r%r%]' do nothing.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_write_long_double_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter '%[%r%r%]' designates to not escape any valid nested Object or Content within some Content.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_ignore_s, print.set->notable, f_string_eol_s); + fl_print_format(" The parameter '%[%r%r%]' designates to not escape any valid nested Object or Content within some Content.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_write_long_ignore_s, print.set->notable, f_string_eol_s); fl_print_format(" This parameter requires two values.%r", print.to, f_string_eol_s); fl_print_format(" This parameter is not used for ignoring anything from the input pipe.%r", print.to, f_string_eol_s); - fl_print_format(" This parameter must be specified after a '%[%r%r%]'", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_content_s, print.set->notable); - fl_print_format(" parameter and this applies only to the Content represented by that specific '%[%r%r%]' parameter.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_content_s, print.set->notable, f_string_eol_s); + fl_print_format(" This parameter must be specified after a '%[%r%r%]'", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_write_long_content_s, print.set->notable); + fl_print_format(" parameter and this applies only to the Content represented by that specific '%[%r%r%]' parameter.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_list_write_long_content_s, print.set->notable, f_string_eol_s); f_print_dynamic_raw(setting->line_last, print.to); diff --git a/level_3/fss_extended_list_write/c/private-write.c b/level_3/fss_extended_list_write/c/private-write.c index f22c039..94a943f 100644 --- a/level_3/fss_extended_list_write/c/private-write.c +++ b/level_3/fss_extended_list_write/c/private-write.c @@ -14,11 +14,11 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QMust specify the '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_object_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_list_write_long_object_s, main->error.notable); fl_print_format("%[' parameter and the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_content_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_list_write_long_content_s, main->error.notable); fl_print_format("%[' parameter the same number of times when not specifying the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_partial_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_list_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -77,7 +77,7 @@ extern "C" { } if (content) { - if (main->parameters.array[fss_extended_list_write_parameter_trim_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_list_write_parameter_trim_e].result & f_console_result_found_e) { complete = f_fss_complete_full_trim_e; } else { @@ -106,7 +106,7 @@ extern "C" { const f_string_static_t *prepend = 0; - if (main->parameters.array[fss_extended_list_write_parameter_prepend_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_list_write_parameter_prepend_e].result & f_console_result_value_e) { const f_array_length_t index = main->parameters.array[fss_extended_list_write_parameter_prepend_e].values.array[main->parameters.array[fss_extended_list_write_parameter_prepend_e].values.used - 1]; prepend = &main->parameters.arguments.array[index]; diff --git a/level_3/fss_extended_read/c/common.c b/level_3/fss_extended_read/c/common.c index 9c1594a..ba3abde 100644 --- a/level_3/fss_extended_read/c/common.c +++ b/level_3/fss_extended_read/c/common.c @@ -110,14 +110,14 @@ extern "C" { } } - if (main->parameters.array[fss_extended_read_parameter_line_first_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_read_parameter_line_first_no_e].result & f_console_result_found_e) { setting->line_first = f_string_empty_s; } else { setting->line_first = f_string_eol_s; } - if (main->parameters.array[fss_extended_read_parameter_line_last_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_read_parameter_line_last_no_e].result & f_console_result_found_e) { setting->line_last = f_string_empty_s; } else { @@ -143,13 +143,13 @@ extern "C" { } } - if (main->parameters.array[fss_extended_read_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_read_parameter_help_e].result & f_console_result_found_e) { setting->flag |= fss_extended_read_main_flag_help_e; return; } - if (main->parameters.array[fss_extended_read_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_read_parameter_version_e].result & f_console_result_found_e) { setting->flag |= fss_extended_read_main_flag_version_e; return; @@ -162,7 +162,7 @@ extern "C" { f_string_static_t * const args = main->parameters.arguments.array; - if (main->parameters.array[fss_extended_read_parameter_strip_invalid_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_read_parameter_strip_invalid_e].result & f_console_result_found_e) { setting->flag |= fss_extended_read_main_flag_strip_invalid_e; } } diff --git a/level_3/fss_extended_read/c/common.h b/level_3/fss_extended_read/c/common.h index 854f477..727ac05 100644 --- a/level_3/fss_extended_read/c/common.h +++ b/level_3/fss_extended_read/c/common.h @@ -216,32 +216,32 @@ extern "C" { #define fss_extended_read_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \ \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_content_s.string, fss_extended_read_long_content_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_columns_s.string, fss_extended_read_long_columns_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_delimit_s.string, fss_extended_read_long_delimit_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_depth_s.string, fss_extended_read_long_depth_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_empty_s.string, fss_extended_read_long_empty_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_line_s.string, fss_extended_read_long_line_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_name_s.string, fss_extended_read_long_name_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_object_s.string, fss_extended_read_long_object_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_pipe_s.string, fss_extended_read_long_pipe_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_original_s.string, fss_extended_read_long_original_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_select_s.string, fss_extended_read_long_select_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_total_s.string, fss_extended_read_long_total_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_read_short_trim_s.string, fss_extended_read_long_trim_s.string, 0, 0, f_console_type_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_read_short_content_s.string, fss_extended_read_long_content_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_read_short_columns_s.string, fss_extended_read_long_columns_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_read_short_delimit_s.string, fss_extended_read_long_delimit_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_read_short_depth_s.string, fss_extended_read_long_depth_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_read_short_empty_s.string, fss_extended_read_long_empty_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_read_short_line_s.string, fss_extended_read_long_line_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_read_short_name_s.string, fss_extended_read_long_name_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_read_short_object_s.string, fss_extended_read_long_object_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_read_short_pipe_s.string, fss_extended_read_long_pipe_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_read_short_original_s.string, fss_extended_read_long_original_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_read_short_select_s.string, fss_extended_read_long_select_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_read_short_total_s.string, fss_extended_read_long_total_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_read_short_trim_s.string, fss_extended_read_long_trim_s.string, 0, 0, f_console_flag_normal_e), \ } #define fss_extended_read_total_parameters_d 26 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 ee11649..ddcc0d3 100644 --- a/level_3/fss_extended_read/c/fss_extended_read.c +++ b/level_3/fss_extended_read/c/fss_extended_read.c @@ -61,13 +61,13 @@ extern "C" { status = F_none; - if (main->parameters.array[fss_extended_read_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_read_parameter_help_e].result & f_console_result_found_e) { fss_extended_read_print_help(setting, main->message); return status; } - if (main->parameters.array[fss_extended_read_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_read_parameter_version_e].result & f_console_result_found_e) { fll_program_print_version(main->message, fss_extended_read_program_version_s); return status; @@ -120,11 +120,11 @@ extern "C" { for (f_array_length_t i = 0; i < 6; ++i) { - if (main->parameters.array[parameter_code[i]].result == f_console_result_found_e) { + if (main->parameters.array[parameter_code[i]].result & f_console_result_found_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, parameter_name[i], main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, parameter_name[i], main->error.notable); fl_print_format("%[' requires a %s.%]%r", main->error.to, main->error.context, parameter_message[i], main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -135,7 +135,7 @@ extern "C" { } // for } - if (F_status_is_error_not(status) && main->parameters.array[fss_extended_read_parameter_columns_e].result == f_console_result_found_e) { + if (F_status_is_error_not(status) && (main->parameters.array[fss_extended_read_parameter_columns_e].result & f_console_result_found_e)) { const f_array_length_t parameter_code[] = { fss_extended_read_parameter_depth_e, fss_extended_read_parameter_line_e, @@ -164,7 +164,7 @@ extern "C" { if (main->parameters.array[parameter_code[i]].result == parameter_match[i]) { if (main->error.verbosity > f_console_verbosity_quiet_e) { - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, fss_extended_read_long_columns_s, parameter_name[i]); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_extended_read_long_columns_s, parameter_name[i]); } status = F_status_set_error(F_parameter); @@ -174,24 +174,24 @@ extern "C" { } // for } - if (F_status_is_error_not(status) && main->parameters.array[fss_extended_read_parameter_pipe_e].result == f_console_result_found_e) { - if (main->parameters.array[fss_extended_read_parameter_total_e].result == f_console_result_found_e) { + if (F_status_is_error_not(status) && (main->parameters.array[fss_extended_read_parameter_pipe_e].result & f_console_result_found_e)) { + if (main->parameters.array[fss_extended_read_parameter_total_e].result & f_console_result_found_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, fss_extended_read_long_pipe_s, fss_extended_read_long_total_s); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_extended_read_long_pipe_s, fss_extended_read_long_total_s); } status = F_status_set_error(F_parameter); } - else if (main->parameters.array[fss_extended_read_parameter_line_e].result == f_console_result_additional_e) { + else if (main->parameters.array[fss_extended_read_parameter_line_e].result & f_console_result_value_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, fss_extended_read_long_pipe_s, fss_extended_read_long_line_s); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_extended_read_long_pipe_s, fss_extended_read_long_line_s); } status = F_status_set_error(F_parameter); } } - if (F_status_is_error_not(status) && main->parameters.array[fss_extended_read_parameter_delimit_e].result == f_console_result_additional_e) { + if (F_status_is_error_not(status) && main->parameters.array[fss_extended_read_parameter_delimit_e].result & f_console_result_value_e) { f_array_length_t index = 0; f_array_length_t length = 0; @@ -219,7 +219,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe value for the parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_delimit_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_read_long_delimit_s, main->error.notable); fl_print_format("%[' must not be empty.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -339,7 +339,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.array[fss_extended_read_parameter_total_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_read_parameter_total_e].result & f_console_result_found_e) { fss_extended_read_print_zero(main); } @@ -348,11 +348,11 @@ extern "C" { return F_none; } - if (F_status_is_error_not(status) && main->parameters.array[fss_extended_read_parameter_select_e].result == f_console_result_found_e) { + if (F_status_is_error_not(status) && (main->parameters.array[fss_extended_read_parameter_select_e].result & f_console_result_found_e)) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_select_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_read_long_select_s, main->error.notable); fl_print_format("%[' parameter requires a positive number.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); diff --git a/level_3/fss_extended_read/c/print.c b/level_3/fss_extended_read/c/print.c index bce41be..206d0f7 100644 --- a/level_3/fss_extended_read/c/print.c +++ b/level_3/fss_extended_read/c/print.c @@ -18,20 +18,20 @@ extern "C" { f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, fss_extended_read_short_at_s, fss_extended_read_long_at_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric index."); - fll_program_print_help_option(print, fss_extended_read_short_content_s, fss_extended_read_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Content (default)."); - fll_program_print_help_option(print, fss_extended_read_short_columns_s, fss_extended_read_long_columns_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns."); - fll_program_print_help_option(print, fss_extended_read_short_delimit_s, fss_extended_read_long_delimit_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits."); - fll_program_print_help_option(print, fss_extended_read_short_depth_s, fss_extended_read_long_depth_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth."); - fll_program_print_help_option(print, fss_extended_read_short_empty_s, fss_extended_read_long_empty_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing."); - fll_program_print_help_option(print, fss_extended_read_short_line_s, fss_extended_read_long_line_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line."); - fll_program_print_help_option(print, fss_extended_read_short_name_s, fss_extended_read_long_name_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name."); - fll_program_print_help_option(print, fss_extended_read_short_object_s, fss_extended_read_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object."); - fll_program_print_help_option(print, fss_extended_read_short_pipe_s, fss_extended_read_long_pipe_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format."); - fll_program_print_help_option(print, fss_extended_read_short_original_s, fss_extended_read_long_original_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print with the original quotes and escapes."); - fll_program_print_help_option(print, fss_extended_read_short_select_s, fss_extended_read_long_select_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index."); - fll_program_print_help_option(print, fss_extended_read_short_total_s, fss_extended_read_long_total_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines."); - fll_program_print_help_option(print, fss_extended_read_short_trim_s, fss_extended_read_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print."); + fll_program_print_help_option(print, fss_extended_read_short_at_s, fss_extended_read_long_at_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select Object at this numeric index."); + fll_program_print_help_option(print, fss_extended_read_short_content_s, fss_extended_read_long_content_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the Content (default)."); + fll_program_print_help_option(print, fss_extended_read_short_columns_s, fss_extended_read_long_columns_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the total number of columns."); + fll_program_print_help_option(print, fss_extended_read_short_delimit_s, fss_extended_read_long_delimit_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Designate how to handle applying delimits."); + fll_program_print_help_option(print, fss_extended_read_short_depth_s, fss_extended_read_long_depth_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select Object at this numeric depth."); + fll_program_print_help_option(print, fss_extended_read_short_empty_s, fss_extended_read_long_empty_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Include empty Content when processing."); + fll_program_print_help_option(print, fss_extended_read_short_line_s, fss_extended_read_long_line_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print only the Content at the given line."); + fll_program_print_help_option(print, fss_extended_read_short_name_s, fss_extended_read_long_name_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select Object with this name."); + fll_program_print_help_option(print, fss_extended_read_short_object_s, fss_extended_read_long_object_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the Object."); + fll_program_print_help_option(print, fss_extended_read_short_pipe_s, fss_extended_read_long_pipe_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print using the special pipe format."); + fll_program_print_help_option(print, fss_extended_read_short_original_s, fss_extended_read_long_original_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Print with the original quotes and escapes."); + fll_program_print_help_option(print, fss_extended_read_short_select_s, fss_extended_read_long_select_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select sub-Content at this index."); + fll_program_print_help_option(print, fss_extended_read_short_total_s, fss_extended_read_long_total_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the total number of lines."); + fll_program_print_help_option(print, fss_extended_read_short_trim_s, fss_extended_read_long_trim_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Trim Object names on select or print."); f_print_dynamic_raw(f_string_eol_s, print.to); f_print_dynamic_raw(f_string_eol_s, print.to); @@ -45,47 +45,47 @@ extern "C" { fl_print_format(" All numeric positions (indexes) start at 0 instead of 1.%r", print.to, f_string_eol_s); fl_print_format(" For example, a file of 17 lines would range from 0 to 16.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" When using the %[%r%r%] option, an order of operations is enforced on the parameters.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth_s, print.set->notable, f_string_eol_s); + fl_print_format(" When using the %[%r%r%] option, an order of operations is enforced on the parameters.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_depth_s, print.set->notable, f_string_eol_s); fl_print_format(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%r", print.to, f_string_eol_s); - fl_print_format(" %[%r%r%]: An Object index at the specified depth.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_at_s, print.set->notable, f_string_eol_s); - fl_print_format(" %[%r%r%]: A new depth within the specified depth, indexed from the root.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth_s, print.set->notable, f_string_eol_s); - fl_print_format(" %[%r%r%]: An Object name at the specified depth.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" %[%r%r%]: An Object index at the specified depth.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_at_s, print.set->notable, f_string_eol_s); + fl_print_format(" %[%r%r%]: A new depth within the specified depth, indexed from the root.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_depth_s, print.set->notable, f_string_eol_s); + fl_print_format(" %[%r%r%]: An Object name at the specified depth.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%] must be in numeric order, but values in between may be skipped.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth_s, print.set->notable, f_string_eol_s); + fl_print_format(" The parameter %[%r%r%] must be in numeric order, but values in between may be skipped.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_depth_s, print.set->notable, f_string_eol_s); fl_print_format(" ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%r", print.to, f_string_eol_s); fl_print_format(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%] selects a Content column.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_select_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" The parameter %[%r%r%] selects a Content column.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_select_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" Specify both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_object_s, print.set->notable); - fl_print_format(" and the %[%r%r%] parameters to get the total objects.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_total_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" Specify both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_object_s, print.set->notable); + fl_print_format(" and the %[%r%r%] parameters to get the total objects.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_total_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" When both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_at_s, print.set->notable); - fl_print_format(" and %[%r%r%] parameters are specified (at the same depth),", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_name_s, print.set->notable); - fl_print_format(" the %[%r%r%] parameter value will be treated as a position relative to the specified", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_at_s, print.set->notable); - fl_print_format(" %[%r%r%] parameter value.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" When both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_at_s, print.set->notable); + fl_print_format(" and %[%r%r%] parameters are specified (at the same depth),", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_name_s, print.set->notable); + fl_print_format(" the %[%r%r%] parameter value will be treated as a position relative to the specified", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_at_s, print.set->notable); + fl_print_format(" %[%r%r%] parameter value.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" This program may support parameters, such as %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth_s, print.set->notable); - fl_print_format(" or %[%r%r%], even if not supported by the standard.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_select_s, print.set->notable, f_string_eol_s); + fl_print_format(" This program may support parameters, such as %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_depth_s, print.set->notable); + fl_print_format(" or %[%r%r%], even if not supported by the standard.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_select_s, print.set->notable, f_string_eol_s); fl_print_format(" This is done to help ensure consistency for scripting.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth_s, print.set->notable); + fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_depth_s, print.set->notable); fl_print_format(" if the standard doesn't support nested Content, then only a depth of 0 would be valid.%r", print.to, f_string_eol_s); - fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_select_s, print.set->notable); + fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_select_s, print.set->notable); fl_print_format(" if the standard doesn't support multiple Content groups, then only a select of 0 would be valid.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_trim_s, print.set->notable); + fl_print_format(" The parameter %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_trim_s, print.set->notable); fl_print_format(" will remove leading and trailing white spaces when selecting objects or when printing objects.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" When specifying both the %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_object_s, print.set->notable); - fl_print_format(" parameter and the %[%r%r%] parameter, the entire Object and Content are printed, including the formatting.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_content_s, print.set->notable, f_string_eol_s); + fl_print_format(" When specifying both the %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_object_s, print.set->notable); + fl_print_format(" parameter and the %[%r%r%] parameter, the entire Object and Content are printed, including the formatting.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_content_s, print.set->notable, f_string_eol_s); fl_print_format(" Both the Object and Content printed are already escaped.%r", print.to, f_string_eol_s); fl_print_format(" Both the Object and Content are separated by a space.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%] accepts the following:%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_delimit_s, print.set->notable, f_string_eol_s); + fl_print_format(" The parameter %[%r%r%] accepts the following:%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_delimit_s, print.set->notable, f_string_eol_s); fl_print_format(" - %[%r%]: Do not apply delimits.%r", print.to, print.set->notable, fss_extended_read_delimit_mode_name_none_s, print.set->notable, f_string_eol_s); fl_print_format(" - %[%r%]: (default) Apply all delimits.%r", print.to, print.set->notable, fss_extended_read_delimit_mode_name_all_s, print.set->notable, f_string_eol_s); fl_print_format(" - %[%r%]: Apply delimits for Objects.%r", print.to, print.set->notable, fss_extended_read_delimit_mode_name_object_s, print.set->notable, f_string_eol_s); @@ -93,15 +93,15 @@ extern "C" { fl_print_format(" - A number, 0 or greater, followed by a %[%r%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%r", print.to, print.set->notable, fss_extended_read_delimit_mode_name_greater_s, print.set->notable, f_string_eol_s, f_string_eol_s); fl_print_format(" - A number, 0 or lesser, followed by a %[%r%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%r%r", print.to, print.set->notable, fss_extended_read_delimit_mode_name_lesser_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" The %[%r%r%] parameter may be specified multiple times to customize the delimit behavior.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_delimit_s, print.set->notable, f_string_eol_s); + fl_print_format(" The %[%r%r%] parameter may be specified multiple times to customize the delimit behavior.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_delimit_s, print.set->notable, f_string_eol_s); - fl_print_format(" The %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_delimit_s, print.set->notable); + fl_print_format(" The %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_delimit_s, print.set->notable); fl_print_format(" values %[%r%]", print.to, print.set->notable, fss_extended_read_delimit_mode_name_none_s, print.set->notable); fl_print_format(" and %[%r%],", print.to, print.set->notable, fss_extended_read_delimit_mode_name_all_s, print.set->notable); fl_print_format(" overrule all other delimit values.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameters %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_columns_s, print.set->notable); - fl_print_format(" and %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_read_long_select_s, print.set->notable); + fl_print_format(" The parameters %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_columns_s, print.set->notable); + fl_print_format(" and %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_read_long_select_s, print.set->notable); fl_print_format(" refer to a Content column.%r", print.to, f_string_eol_s); fl_print_format(" The word \"column\" is being loosely defined to refer to a specific Content.%r", print.to, f_string_eol_s); fl_print_format(" This is not to be confused with a depth.%r", print.to, f_string_eol_s); diff --git a/level_3/fss_extended_read/c/private-print.c b/level_3/fss_extended_read/c/private-print.c index e997847..c78d316 100644 --- a/level_3/fss_extended_read/c/private-print.c +++ b/level_3/fss_extended_read/c/private-print.c @@ -156,7 +156,7 @@ extern "C" { #ifndef _di_fss_extended_read_print_content_end_ void fss_extended_read_print_content_end(fll_program_data_t * const main) { - if (main->parameters.array[fss_extended_read_parameter_pipe_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_read_parameter_pipe_e].result & f_console_result_found_e) { f_print_dynamic_raw(fss_extended_read_pipe_content_start_s, main->output.to); } else { @@ -168,7 +168,7 @@ extern "C" { #ifndef _di_fss_extended_read_print_object_end_ void fss_extended_read_print_object_end(fll_program_data_t * const main) { - if (main->parameters.array[fss_extended_read_parameter_pipe_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_read_parameter_pipe_e].result & f_console_result_found_e) { f_print_dynamic_raw(fss_extended_read_pipe_content_end_s, main->output.to); } else { @@ -188,7 +188,7 @@ extern "C" { #ifndef _di_fss_extended_read_print_set_end_ void fss_extended_read_print_set_end(fll_program_data_t * const main) { - if (main->parameters.array[fss_extended_read_parameter_pipe_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_read_parameter_pipe_e].result & f_console_result_found_e) { f_print_dynamic_raw(fss_extended_read_pipe_content_end_s, main->output.to); } else { diff --git a/level_3/fss_extended_read/c/private-read.c b/level_3/fss_extended_read/c/private-read.c index f0796bc..cc4e942 100644 --- a/level_3/fss_extended_read/c/private-read.c +++ b/level_3/fss_extended_read/c/private-read.c @@ -67,7 +67,7 @@ extern "C" { { f_array_length_t depth_size = 1; - if (main->parameters.array[fss_extended_read_parameter_depth_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_read_parameter_depth_e].result & f_console_result_value_e) { depth_size = main->parameters.array[fss_extended_read_parameter_depth_e].values.used; } @@ -122,7 +122,7 @@ extern "C" { } } - if (main->parameters.array[fss_extended_read_parameter_at_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_read_parameter_at_e].result & f_console_result_value_e) { for (; position_at < main->parameters.array[fss_extended_read_parameter_at_e].values.used; ++position_at) { if (main->parameters.array[fss_extended_read_parameter_at_e].values.array[position_at] < position_depth) { @@ -145,7 +145,7 @@ extern "C" { } // for } - if (main->parameters.array[fss_extended_read_parameter_name_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_read_parameter_name_e].result & f_console_result_value_e) { for (; position_name < main->parameters.array[fss_extended_read_parameter_name_e].values.used; position_name++) { if (main->parameters.array[fss_extended_read_parameter_name_e].values.array[position_name] < position_depth) { @@ -158,7 +158,7 @@ extern "C" { data->depths.array[i].index_name = main->parameters.array[fss_extended_read_parameter_name_e].values.array[position_name]; - if (main->parameters.array[fss_extended_read_parameter_trim_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_read_parameter_trim_e].result & f_console_result_found_e) { status = fl_string_dynamic_rip(data->argv[data->depths.array[i].index_name], &data->depths.array[i].value_name); } else { @@ -166,7 +166,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), main->parameters.array[fss_extended_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_dynamic_rip" : "f_string_dynamic_append", F_true); + fll_error_print(main->error, F_status_set_fine(status), (main->parameters.array[fss_extended_read_parameter_trim_e].result & f_console_result_found_e) ? "fl_string_dynamic_rip" : "f_string_dynamic_append", F_true); return status; } @@ -195,7 +195,7 @@ extern "C" { fl_print_format("%r%[%QThe value '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); fl_print_format("%[%ul%]", main->error.to, main->error.notable, data->depths.array[i].depth, main->error.notable); fl_print_format("%[' may only be specified once for the parameter '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_read_long_depth_s, main->error.notable); fl_print_format("%['.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -208,7 +208,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_read_long_depth_s, main->error.notable); fl_print_format("%[' may not have the value '%]", main->error.to, main->error.context, main->error.context); fl_print_format("%[%ul%]", main->error.to, main->error.notable, data->depths.array[i].depth, main->error.notable); fl_print_format("%[' before the value '%]", main->error.to, main->error.context, main->error.context); @@ -280,7 +280,7 @@ extern "C" { #ifndef _di_fss_extended_read_load_number_ f_status_t fss_extended_read_load_number(fll_program_data_t * const main, fss_extended_read_data_t * const data, const f_array_length_t parameter, const f_string_static_t name, f_number_unsigned_t *number) { - if (main->parameters.array[parameter].result == f_console_result_additional_e) { + if (main->parameters.array[parameter].result & f_console_result_value_e) { const f_array_length_t index = main->parameters.array[parameter].values.array[main->parameters.array[parameter].values.used - 1]; const f_status_t status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, data->argv[index], number); @@ -575,53 +575,53 @@ extern "C" { f_status_t status = F_none; - if (main->parameters.array[fss_extended_read_parameter_at_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_read_parameter_at_e].result & f_console_result_value_e) { data->option |= fss_extended_read_data_option_at_d; } - if (main->parameters.array[fss_extended_read_parameter_columns_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_read_parameter_columns_e].result & f_console_result_found_e) { data->option |= fss_extended_read_data_option_columns_d; } - if (main->parameters.array[fss_extended_read_parameter_content_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_read_parameter_content_e].result & f_console_result_found_e) { data->option |= fss_extended_read_data_option_content_d; } - if (main->parameters.array[fss_extended_read_parameter_empty_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_read_parameter_empty_e].result & f_console_result_found_e) { data->option |= fss_extended_read_data_option_empty_d; } - if (main->parameters.array[fss_extended_read_parameter_line_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_read_parameter_line_e].result & f_console_result_value_e) { data->option |= fss_extended_read_data_option_line_d; status = fss_extended_read_load_number(main, data, fss_extended_read_parameter_line_e, fss_extended_read_long_line_s, &data->line); if (F_status_is_error(status)) return status; } - if (main->parameters.array[fss_extended_read_parameter_name_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_read_parameter_name_e].result & f_console_result_value_e) { data->option |= fss_extended_read_data_option_name_d; } - if (main->parameters.array[fss_extended_read_parameter_object_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_read_parameter_object_e].result & f_console_result_found_e) { data->option |= fss_extended_read_data_option_object_d; } - if (main->parameters.array[fss_extended_read_parameter_original_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_read_parameter_original_e].result & f_console_result_found_e) { data->option |= fss_extended_read_data_option_original_d; } - if (main->parameters.array[fss_extended_read_parameter_select_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_read_parameter_select_e].result & f_console_result_value_e) { data->option |= fss_extended_read_data_option_select_d; status = fss_extended_read_load_number(main, data, fss_extended_read_parameter_select_e, fss_extended_read_long_select_s, &data->select); if (F_status_is_error(status)) return status; } - if (main->parameters.array[fss_extended_read_parameter_total_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_read_parameter_total_e].result & f_console_result_found_e) { data->option |= fss_extended_read_data_option_total_d; } - if (main->parameters.array[fss_extended_read_parameter_trim_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_read_parameter_trim_e].result & f_console_result_found_e) { data->option |= fss_extended_read_data_option_trim_d; } diff --git a/level_3/fss_extended_write/c/common.c b/level_3/fss_extended_write/c/common.c index c76d7ef..389a351 100644 --- a/level_3/fss_extended_write/c/common.c +++ b/level_3/fss_extended_write/c/common.c @@ -92,14 +92,14 @@ extern "C" { } } - if (main->parameters.array[fss_extended_write_parameter_line_first_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_write_parameter_line_first_no_e].result & f_console_result_found_e) { setting->line_first = f_string_empty_s; } else { setting->line_first = f_string_eol_s; } - if (main->parameters.array[fss_extended_write_parameter_line_last_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_write_parameter_line_last_no_e].result & f_console_result_found_e) { setting->line_last = f_string_empty_s; } else { @@ -125,13 +125,13 @@ extern "C" { } } - if (main->parameters.array[fss_extended_write_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_write_parameter_help_e].result & f_console_result_found_e) { setting->flag |= fss_extended_write_main_flag_help_e; return; } - if (main->parameters.array[fss_extended_write_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_write_parameter_version_e].result & f_console_result_found_e) { setting->flag |= fss_extended_write_main_flag_version_e; return; @@ -144,7 +144,7 @@ extern "C" { f_string_static_t * const args = main->parameters.arguments.array; - if (main->parameters.array[fss_extended_write_parameter_strip_invalid_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_write_parameter_strip_invalid_e].result & f_console_result_found_e) { setting->flag |= fss_extended_write_main_flag_strip_invalid_e; } } diff --git a/level_3/fss_extended_write/c/common.h b/level_3/fss_extended_write/c/common.h index 67c6028..f3d6ef9 100644 --- a/level_3/fss_extended_write/c/common.h +++ b/level_3/fss_extended_write/c/common.h @@ -181,28 +181,28 @@ extern "C" { #define fss_extended_write_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \ \ - macro_f_console_parameter_t_initialize2(fss_extended_write_short_file_s.string, fss_extended_write_long_file_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_write_short_content_s.string, fss_extended_write_long_content_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_write_short_double_s.string, fss_extended_write_long_double_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_write_short_ignore_s.string, fss_extended_write_long_ignore_s.string, 0, 2, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_write_short_object_s.string, fss_extended_write_long_object_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_write_short_partial_s.string, fss_extended_write_long_partial_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_write_short_prepend_s.string, fss_extended_write_long_prepend_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_write_short_single_s.string, fss_extended_write_long_single_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_extended_write_short_trim_s.string, fss_extended_write_long_trim_s.string, 0, 0, f_console_type_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_write_short_file_s.string, fss_extended_write_long_file_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_write_short_content_s.string, fss_extended_write_long_content_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_write_short_double_s.string, fss_extended_write_long_double_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_write_short_ignore_s.string, fss_extended_write_long_ignore_s.string, 0, 2, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_write_short_object_s.string, fss_extended_write_long_object_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_write_short_partial_s.string, fss_extended_write_long_partial_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_write_short_prepend_s.string, fss_extended_write_long_prepend_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_write_short_single_s.string, fss_extended_write_long_single_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_extended_write_short_trim_s.string, fss_extended_write_long_trim_s.string, 0, 0, f_console_flag_normal_e), \ } #define fss_extended_write_total_parameters_d 20 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 fa47b62..af035dc 100644 --- a/level_3/fss_extended_write/c/fss_extended_write.c +++ b/level_3/fss_extended_write/c/fss_extended_write.c @@ -60,13 +60,13 @@ extern "C" { status = F_none; - if (main->parameters.array[fss_extended_write_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_write_parameter_help_e].result & f_console_result_found_e) { fss_extended_write_print_help(setting, main->message); return status; } - if (main->parameters.array[fss_extended_write_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_write_parameter_version_e].result & f_console_result_found_e) { fll_program_print_version(main->message, fss_extended_write_program_version_s); return status; @@ -79,13 +79,13 @@ 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.array[fss_extended_write_parameter_file_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_write_parameter_file_e].result & f_console_result_value_e) { if (main->parameters.array[fss_extended_write_parameter_file_e].values.used > 1) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_file_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_write_long_file_s, main->error.notable); fl_print_format("%[' may only be specified once.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -105,8 +105,8 @@ extern "C" { } } } - else if (main->parameters.array[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); + else if (main->parameters.array[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_normal_s, fss_extended_write_long_file_s); status = F_status_set_error(F_parameter); } } @@ -115,28 +115,28 @@ extern "C" { if (main->parameters.array[fss_extended_write_parameter_object_e].locations.used || main->parameters.array[fss_extended_write_parameter_content_e].locations.used) { if (main->parameters.array[fss_extended_write_parameter_object_e].locations.used) { if (main->parameters.array[fss_extended_write_parameter_object_e].locations.used != main->parameters.array[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); + fss_extended_write_error_parameter_value_missing_print(main, f_console_symbol_long_normal_s, fss_extended_write_long_object_s); status = F_status_set_error(F_parameter); } else if (main->parameters.array[fss_extended_write_parameter_content_e].locations.used != main->parameters.array[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); + fss_extended_write_error_parameter_value_missing_print(main, f_console_symbol_long_normal_s, fss_extended_write_long_content_s); status = F_status_set_error(F_parameter); } - else if (!main->parameters.array[fss_extended_write_parameter_content_e].locations.used && main->parameters.array[fss_extended_write_parameter_partial_e].result == f_console_result_none_e) { + else if (!main->parameters.array[fss_extended_write_parameter_content_e].locations.used && !(main->parameters.array[fss_extended_write_parameter_partial_e].result & f_console_result_found_e)) { fss_extended_write_error_parameter_at_least_once(main); status = F_status_set_error(F_parameter); } else if (main->parameters.array[fss_extended_write_parameter_content_e].locations.used && main->parameters.array[fss_extended_write_parameter_partial_e].locations.used) { - if (main->parameters.array[fss_extended_write_parameter_content_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_write_parameter_content_e].result & f_console_result_value_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_partial_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter only allows either the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_object_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_write_long_object_s, main->error.notable); fl_print_format("%[' parameter or the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_content_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_write_long_content_s, main->error.notable); fl_print_format("%[' parameter, but not both.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -147,7 +147,7 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_extended_write_parameter_content_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_write_parameter_content_e].result & f_console_result_value_e) { f_array_length_t location_object = main->parameters.array[fss_extended_write_parameter_object_e].locations.array[0]; f_array_length_t location_content = main->parameters.array[fss_extended_write_parameter_content_e].locations.array[0]; f_array_length_t location_sub_object = main->parameters.array[fss_extended_write_parameter_object_e].locations_sub.array[0]; @@ -158,9 +158,9 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QEach '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_object_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_write_long_object_s, main->error.notable); fl_print_format("%[' parameter must be specified before a '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_content_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_write_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -179,9 +179,9 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QEach '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_object_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_write_long_object_s, main->error.notable); fl_print_format("%[' parameter must have at least one '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_content_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_write_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -195,7 +195,7 @@ extern "C" { } else if (main->parameters.array[fss_extended_write_parameter_content_e].locations.used) { if (main->parameters.array[fss_extended_write_parameter_content_e].locations.used != main->parameters.array[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); + fss_extended_write_error_parameter_value_missing_print(main, f_console_symbol_long_normal_s, fss_extended_write_long_content_s); status = F_status_set_error(F_parameter); } else if (!main->parameters.array[fss_extended_write_parameter_partial_e].locations.used) { @@ -209,9 +209,9 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThis requires either piped data or the use of the '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_object_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_write_long_object_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_content_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_write_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -221,12 +221,12 @@ extern "C" { } if (F_status_is_error_not(status) && (main->pipe & fll_program_data_pipe_input_e)) { - if (main->parameters.array[fss_extended_write_parameter_partial_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_write_parameter_partial_e].result & f_console_result_found_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThis '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_partial_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter cannot be used when processing a pipe.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -238,12 +238,12 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_extended_write_parameter_prepend_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_write_parameter_prepend_e].result & f_console_result_found_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_prepend_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_write_long_prepend_s, main->error.notable); fl_print_format("%[' is specified, but no value is given.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -251,7 +251,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters.array[fss_extended_write_parameter_prepend_e].result == f_console_result_additional_e) { + else if (main->parameters.array[fss_extended_write_parameter_prepend_e].result & f_console_result_value_e) { const f_array_length_t index = main->parameters.array[fss_extended_write_parameter_prepend_e].values.array[main->parameters.array[fss_extended_write_parameter_prepend_e].values.used - 1]; // Even though this standard does not utilize this parameter, provide the validation for consistency. @@ -269,7 +269,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe value for the parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_prepend_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_write_long_prepend_s, main->error.notable); fl_print_format("%[' must only contain white space.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -286,7 +286,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe value for the parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_prepend_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_write_long_prepend_s, main->error.notable); fl_print_format("%[' must not be an empty string.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -298,12 +298,12 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_extended_write_parameter_ignore_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_write_parameter_ignore_e].result & f_console_result_found_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_ignore_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_write_long_ignore_s, main->error.notable); fl_print_format("%[' was specified, but no values were given.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -311,7 +311,7 @@ extern "C" { status = F_status_set_error(F_parameter); } - else if (main->parameters.array[fss_extended_write_parameter_ignore_e].result == f_console_result_additional_e) { + else if (main->parameters.array[fss_extended_write_parameter_ignore_e].result & f_console_result_value_e) { const f_array_length_t total_locations = main->parameters.array[fss_extended_write_parameter_ignore_e].locations.used; const f_array_length_t total_arguments = main->parameters.array[fss_extended_write_parameter_ignore_e].values.used; @@ -319,7 +319,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_ignore_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_write_long_ignore_s, main->error.notable); fl_print_format("%[' requires two values.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -332,14 +332,14 @@ extern "C" { f_fss_quote_t quote = f_fss_quote_type_double_e; if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_extended_write_parameter_double_e].result == f_console_result_found_e) { - if (main->parameters.array[fss_extended_write_parameter_single_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_write_parameter_double_e].result & f_console_result_found_e) { + if (main->parameters.array[fss_extended_write_parameter_single_e].result & f_console_result_found_e) { if (main->parameters.array[fss_extended_write_parameter_double_e].location < main->parameters.array[fss_extended_write_parameter_single_e].location) { quote = f_fss_quote_type_single_e; } } } - else if (main->parameters.array[fss_extended_write_parameter_single_e].result == f_console_result_found_e) { + else if (main->parameters.array[fss_extended_write_parameter_single_e].result & f_console_result_found_e) { quote = f_fss_quote_type_single_e; } } @@ -366,8 +366,8 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_extended_write_parameter_partial_e].result == f_console_result_found_e) { - if (main->parameters.array[fss_extended_write_parameter_object_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_write_parameter_partial_e].result & f_console_result_found_e) { + if (main->parameters.array[fss_extended_write_parameter_object_e].result & f_console_result_value_e) { contents.used = 0; for (f_array_length_t i = 0; i < main->parameters.array[fss_extended_write_parameter_object_e].values.used; ++i) { @@ -487,7 +487,7 @@ extern "C" { f_file_stream_unlock(main->error.to); } } - else if (main->error.verbosity > f_console_verbosity_quiet_e && main->error.verbosity != f_console_verbosity_error_e && main->parameters.array[fss_extended_write_parameter_file_e].result == f_console_result_none_e) { + else if (main->error.verbosity > f_console_verbosity_quiet_e && main->error.verbosity != f_console_verbosity_error_e && !(main->parameters.array[fss_extended_write_parameter_file_e].result & f_console_result_found_e)) { // Ensure there is always a newline at the end, unless in quiet mode. fll_print_dynamic_raw(f_string_eol_s, main->output.to); @@ -497,7 +497,7 @@ extern "C" { f_string_dynamic_resize(0, &escaped); } - if (main->parameters.array[fss_extended_write_parameter_file_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_extended_write_parameter_file_e].result & f_console_result_value_e) { f_file_stream_flush(output); f_file_stream_close(&output); } diff --git a/level_3/fss_extended_write/c/print.c b/level_3/fss_extended_write/c/print.c index e3bbbd8..3993d46 100644 --- a/level_3/fss_extended_write/c/print.c +++ b/level_3/fss_extended_write/c/print.c @@ -18,15 +18,15 @@ extern "C" { f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, fss_extended_write_short_file_s, fss_extended_write_long_file_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send data to."); - fll_program_print_help_option(print, fss_extended_write_short_content_s, fss_extended_write_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to write."); - fll_program_print_help_option(print, fss_extended_write_short_double_s, fss_extended_write_long_double_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); - fll_program_print_help_option(print, fss_extended_write_short_ignore_s, fss_extended_write_long_ignore_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content."); - fll_program_print_help_option(print, fss_extended_write_short_object_s, fss_extended_write_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to write."); - fll_program_print_help_option(print, fss_extended_write_short_partial_s, fss_extended_write_long_partial_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not write end of Object/Content character."); - fll_program_print_help_option(print, fss_extended_write_short_prepend_s, fss_extended_write_long_prepend_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given white space characters to the start of each multi-line Content."); - fll_program_print_help_option(print, fss_extended_write_short_single_s, fss_extended_write_long_single_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); - fll_program_print_help_option(print, fss_extended_write_short_trim_s, fss_extended_write_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names."); + fll_program_print_help_option(print, fss_extended_write_short_file_s, fss_extended_write_long_file_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Specify a file to send data to."); + fll_program_print_help_option(print, fss_extended_write_short_content_s, fss_extended_write_long_content_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "The Content to write."); + fll_program_print_help_option(print, fss_extended_write_short_double_s, fss_extended_write_long_double_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use double quotes (default)."); + fll_program_print_help_option(print, fss_extended_write_short_ignore_s, fss_extended_write_long_ignore_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Ignore a given range within a Content."); + fll_program_print_help_option(print, fss_extended_write_short_object_s, fss_extended_write_long_object_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " The Object to write."); + fll_program_print_help_option(print, fss_extended_write_short_partial_s, fss_extended_write_long_partial_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Do not write end of Object/Content character."); + fll_program_print_help_option(print, fss_extended_write_short_prepend_s, fss_extended_write_long_prepend_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Prepend the given white space characters to the start of each multi-line Content."); + fll_program_print_help_option(print, fss_extended_write_short_single_s, fss_extended_write_long_single_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use single quotes."); + fll_program_print_help_option(print, fss_extended_write_short_trim_s, fss_extended_write_long_trim_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Trim Object names."); f_print_dynamic_raw(f_string_eol_s, print.to); f_print_dynamic_raw(f_string_eol_s, print.to); @@ -40,10 +40,10 @@ extern "C" { fl_print_format(" or a Form Feed character '%[\\f%]' (%[U+000C%]).%r", print.to, print.set->notable, print.set->notable, print.set->notable, print.set->notable, f_string_eol_s); fl_print_format(" The end of the pipe represents the end of any Object or Content.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The FSS-0001 (Extended) specification does not support multi-line Content, therefore the parameter '%[%r%r%]'", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_write_long_prepend_s, print.set->notable); + fl_print_format(" The FSS-0001 (Extended) specification does not support multi-line Content, therefore the parameter '%[%r%r%]'", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_write_long_prepend_s, print.set->notable); fl_print_format(" does nothing.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" This program does not use the parameter '%[%r%r%]', which therefore does nothing.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_extended_write_long_ignore_s, print.set->notable, f_string_eol_s); + fl_print_format(" This program does not use the parameter '%[%r%r%]', which therefore does nothing.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_extended_write_long_ignore_s, print.set->notable, f_string_eol_s); fl_print_format(" This parameter requires two values.%r", print.to, f_string_eol_s); f_print_dynamic_raw(setting->line_last, print.to); diff --git a/level_3/fss_extended_write/c/private-write.c b/level_3/fss_extended_write/c/private-write.c index 72c3873..0482c33 100644 --- a/level_3/fss_extended_write/c/private-write.c +++ b/level_3/fss_extended_write/c/private-write.c @@ -16,11 +16,11 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QMust specify the '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_object_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_write_long_object_s, main->error.notable); fl_print_format("%[' parameter and the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_content_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_write_long_content_s, main->error.notable); fl_print_format("%[' parameter the same number of times when not specifying the '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_partial_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_extended_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -83,7 +83,7 @@ extern "C" { } if (contents && contents->used) { - if (main->parameters.array[fss_extended_write_parameter_trim_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_extended_write_parameter_trim_e].result & f_console_result_found_e) { complete = f_fss_complete_full_trim_e; } else { diff --git a/level_3/fss_identify/c/common.c b/level_3/fss_identify/c/common.c index 0bca6e3..c932d9c 100644 --- a/level_3/fss_identify/c/common.c +++ b/level_3/fss_identify/c/common.c @@ -77,14 +77,14 @@ extern "C" { } } - if (main->parameters.array[fss_identify_parameter_line_first_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_identify_parameter_line_first_no_e].result & f_console_result_found_e) { setting->line_first = f_string_empty_s; } else { setting->line_first = f_string_eol_s; } - if (main->parameters.array[fss_identify_parameter_line_last_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_identify_parameter_line_last_no_e].result & f_console_result_found_e) { setting->line_last = f_string_empty_s; } else { @@ -110,13 +110,13 @@ extern "C" { } } - if (main->parameters.array[fss_identify_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_identify_parameter_help_e].result & f_console_result_found_e) { setting->flag |= fss_identify_main_flag_help_e; return; } - if (main->parameters.array[fss_identify_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_identify_parameter_version_e].result & f_console_result_found_e) { setting->flag |= fss_identify_main_flag_version_e; return; @@ -129,7 +129,7 @@ extern "C" { f_string_static_t * const args = main->parameters.arguments.array; - if (main->parameters.array[fss_identify_parameter_strip_invalid_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_identify_parameter_strip_invalid_e].result & f_console_result_found_e) { setting->flag |= fss_identify_main_flag_strip_invalid_e; } } diff --git a/level_3/fss_identify/c/common.h b/level_3/fss_identify/c/common.h index e0dd4c2..4758941 100644 --- a/level_3/fss_identify/c/common.h +++ b/level_3/fss_identify/c/common.h @@ -129,24 +129,24 @@ extern "C" { #define fss_identify_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \ \ - macro_f_console_parameter_t_initialize2(fss_identify_short_content_s.string, fss_identify_long_content_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_identify_short_line_s.string, fss_identify_long_line_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_identify_short_name_s.string, fss_identify_long_name_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_identify_short_object_s.string, fss_identify_long_object_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_identify_short_total_s.string, fss_identify_long_total_s.string, 0, 0, f_console_type_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_identify_short_content_s.string, fss_identify_long_content_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_identify_short_line_s.string, fss_identify_long_line_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_identify_short_name_s.string, fss_identify_long_name_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_identify_short_object_s.string, fss_identify_long_object_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_identify_short_total_s.string, fss_identify_long_total_s.string, 0, 0, f_console_flag_normal_e), \ } #define fss_identify_total_parameters_d 17 diff --git a/level_3/fss_identify/c/fss_identify.c b/level_3/fss_identify/c/fss_identify.c index fe85174..34f830c 100644 --- a/level_3/fss_identify/c/fss_identify.c +++ b/level_3/fss_identify/c/fss_identify.c @@ -60,13 +60,13 @@ extern "C" { status = F_none; - if (main->parameters.array[fss_identify_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_identify_parameter_help_e].result & f_console_result_found_e) { fss_identify_print_help(setting, main->message); return F_none; } - if (main->parameters.array[fss_identify_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_identify_parameter_version_e].result & f_console_result_found_e) { fll_program_print_version(main->message, fss_identify_program_version_s); return F_none; @@ -77,18 +77,18 @@ extern "C" { data.argv = main->parameters.arguments.array; if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_identify_parameter_line_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_identify_parameter_line_e].result & f_console_result_found_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_line_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_identify_long_line_s, main->error.notable); fl_print_format("%[' requires a positive number.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); status = F_status_set_error(F_parameter); } - else if (main->parameters.array[fss_identify_parameter_line_e].result == f_console_result_additional_e) { + else if (main->parameters.array[fss_identify_parameter_line_e].result & f_console_result_value_e) { const f_array_length_t index = main->parameters.array[fss_identify_parameter_line_e].values.array[main->parameters.array[fss_identify_parameter_line_e].values.used - 1]; status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, data.argv[index], &data.line); @@ -99,17 +99,17 @@ extern "C" { } } - if (F_status_is_error_not(status) && main->parameters.array[fss_identify_parameter_total_e].result == f_console_result_found_e) { - if (main->parameters.array[fss_identify_parameter_object_e].result == f_console_result_found_e) { + if (F_status_is_error_not(status) && (main->parameters.array[fss_identify_parameter_total_e].result & f_console_result_found_e)) { + if (main->parameters.array[fss_identify_parameter_object_e].result & f_console_result_found_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, fss_identify_long_object_s, fss_identify_long_total_s); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_identify_long_object_s, fss_identify_long_total_s); } status = F_status_set_error(F_parameter); } - else if (main->parameters.array[fss_identify_parameter_content_e].result == f_console_result_found_e) { + else if (main->parameters.array[fss_identify_parameter_content_e].result & f_console_result_found_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, fss_identify_long_content_s, fss_identify_long_total_s); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_identify_long_content_s, fss_identify_long_total_s); } status = F_status_set_error(F_parameter); @@ -117,18 +117,18 @@ extern "C" { } if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_identify_parameter_name_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_identify_parameter_name_e].result & f_console_result_found_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_name_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_identify_long_name_s, main->error.notable); fl_print_format("%[' requires a string.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); status = F_status_set_error(F_parameter); } - else if (main->parameters.array[fss_identify_parameter_name_e].result == f_console_result_additional_e) { + else if (main->parameters.array[fss_identify_parameter_name_e].result & f_console_result_value_e) { const f_array_length_t index = main->parameters.array[fss_identify_parameter_name_e].values.array[main->parameters.array[fss_identify_parameter_name_e].values.used - 1]; const f_array_length_t length = data.argv[index].used; const f_string_range_t range = macro_f_string_range_t_initialize2(length); @@ -137,7 +137,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_name_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_identify_long_name_s, main->error.notable); fl_print_format("%[' does not allow zero length strings.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -169,7 +169,7 @@ extern "C" { fl_print_format("%r%[%QThe value '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); fl_print_format("%[%Q%]", main->error.to, main->error.notable, data.argv[index], main->error.notable); fl_print_format("%[' for the parameter '%]", main->error.to, main->error.context, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_name_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_identify_long_name_s, main->error.notable); fl_print_format("%[' may only contain word characters or the dash (minus)y character.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -216,7 +216,7 @@ extern "C" { main->signal_check = 0; } - if (main->parameters.array[fss_identify_parameter_line_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_identify_parameter_line_e].result & f_console_result_value_e) { if (data.current > data.line) break; } @@ -247,7 +247,7 @@ extern "C" { f_string_dynamic_resize(0, &buffer); if (F_status_is_error_not(status)) { - if (main->parameters.array[fss_identify_parameter_total_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_identify_parameter_total_e].result & f_console_result_found_e) { fll_print_format("%ul%r", main->output.to, data.total, f_string_eol_s); } } diff --git a/level_3/fss_identify/c/print.c b/level_3/fss_identify/c/print.c index d24c68d..52982c8 100644 --- a/level_3/fss_identify/c/print.c +++ b/level_3/fss_identify/c/print.c @@ -18,28 +18,28 @@ extern "C" { f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, fss_identify_short_content_s, fss_identify_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print the Identifier content (the 4-digit hexidecimal type code)."); - fll_program_print_help_option(print, fss_identify_short_object_s, fss_identify_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Identifier object (the name)."); + fll_program_print_help_option(print, fss_identify_short_content_s, fss_identify_long_content_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Print the Identifier content (the 4-digit hexidecimal type code)."); + fll_program_print_help_option(print, fss_identify_short_object_s, fss_identify_long_object_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the Identifier object (the name)."); f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, fss_identify_short_line_s, fss_identify_long_line_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Identifier at the given line."); - fll_program_print_help_option(print, fss_identify_short_name_s, fss_identify_long_name_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select FSS using this full or partial type name or code."); - fll_program_print_help_option(print, fss_identify_short_total_s, fss_identify_long_total_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print the total Identifiers found."); + fll_program_print_help_option(print, fss_identify_short_line_s, fss_identify_long_line_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print only the Identifier at the given line."); + fll_program_print_help_option(print, fss_identify_short_name_s, fss_identify_long_name_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select FSS using this full or partial type name or code."); + fll_program_print_help_option(print, fss_identify_short_total_s, fss_identify_long_total_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Print the total Identifiers found."); f_print_dynamic_raw(f_string_eol_s, print.to); f_print_dynamic_raw(f_string_eol_s, print.to); fll_program_print_help_usage(print, fss_identify_program_name_s, fll_program_parameter_filenames_s); - fl_print_format("%r The %[%r%r%] parameter refers to the file lines and not the lines in a given file.%r%r", print.to, f_string_eol_s, print.set->notable, f_console_symbol_long_enable_s, fss_identify_long_line_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format("%r The %[%r%r%] parameter refers to the file lines and not the lines in a given file.%r%r", print.to, f_string_eol_s, print.set->notable, f_console_symbol_long_normal_s, fss_identify_long_line_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" If neither the %[%r%r%] nor", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_identify_long_object_s, print.set->notable); - fl_print_format(" %[%r%r%] are specified, then the default behavior is to print both.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_identify_long_content_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" If neither the %[%r%r%] nor", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_identify_long_object_s, print.set->notable); + fl_print_format(" %[%r%r%] are specified, then the default behavior is to print both.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_identify_long_content_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" When specifying the %[%r%r%] parameter, neither the", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_identify_long_total_s, print.set->notable); - fl_print_format(" %[%r%r%] nor the", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_identify_long_object_s, print.set->notable); - fl_print_format(" %[%r%r%] parameter may be specified.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_identify_long_content_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" When specifying the %[%r%r%] parameter, neither the", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_identify_long_total_s, print.set->notable); + fl_print_format(" %[%r%r%] nor the", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_identify_long_object_s, print.set->notable); + fl_print_format(" %[%r%r%] parameter may be specified.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_identify_long_content_s, print.set->notable, f_string_eol_s, f_string_eol_s); fl_print_format(" An FSS file is identified by the following format: '%[# Object-Content%]'", print.to, print.set->notable, print.set->notable); fl_print_format(" where the Object, is a machine-name representing the name and may only consist of \"word\" characters and the Content is a 4-digit hexidecimal number representing a particular variant of the Object.%r", print.to, f_string_eol_s); diff --git a/level_3/fss_identify/c/private-identify.c b/level_3/fss_identify/c/private-identify.c index 2fa7c04..30f9a76 100644 --- a/level_3/fss_identify/c/private-identify.c +++ b/level_3/fss_identify/c/private-identify.c @@ -100,7 +100,7 @@ extern "C" { } // for } - if (main->parameters.array[fss_identify_parameter_line_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_identify_parameter_line_e].result & f_console_result_value_e) { for (i = 0; i < ids.used; ++i, ++data->current) { if (data->current == data->line) { @@ -108,7 +108,7 @@ extern "C" { if (fss_identify_process_name_compare(data, ids.array[i], mode) != F_equal_to) continue; } - if (main->parameters.array[fss_identify_parameter_total_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_identify_parameter_total_e].result & f_console_result_found_e) { ++data->total; } else { @@ -121,7 +121,7 @@ extern "C" { } } // for } - else if (main->parameters.array[fss_identify_parameter_total_e].result == f_console_result_found_e) { + else if (main->parameters.array[fss_identify_parameter_total_e].result & f_console_result_found_e) { if (data->name.used) { for (i = 0; i < ids.used; ++i, ++data->current) { diff --git a/level_3/fss_identify/c/private-print.c b/level_3/fss_identify/c/private-print.c index 6e193f9..4b320e8 100644 --- a/level_3/fss_identify/c/private-print.c +++ b/level_3/fss_identify/c/private-print.c @@ -11,15 +11,15 @@ extern "C" { f_file_stream_lock(main->output.to); - if (main->parameters.array[fss_identify_parameter_object_e].result == f_console_result_found_e || main->parameters.array[fss_identify_parameter_content_e].result != f_console_result_found_e) { + if ((main->parameters.array[fss_identify_parameter_object_e].result & f_console_result_found_e) || main->parameters.array[fss_identify_parameter_content_e].result != f_console_result_found_e) { f_print((const f_string_t) id.name, id.used, main->output.to); - if (main->parameters.array[fss_identify_parameter_object_e].result != f_console_result_found_e || main->parameters.array[fss_identify_parameter_content_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_identify_parameter_object_e].result != f_console_result_found_e || (main->parameters.array[fss_identify_parameter_content_e].result & f_console_result_found_e)) { f_print_dynamic_raw(f_fss_type_header_part5_s, main->output.to); } } - if (main->parameters.array[fss_identify_parameter_object_e].result != f_console_result_found_e || main->parameters.array[fss_identify_parameter_content_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_identify_parameter_object_e].result != f_console_result_found_e || (main->parameters.array[fss_identify_parameter_content_e].result & f_console_result_found_e)) { fl_print_format("%04_ui", main->output.to, id.type); } diff --git a/level_3/fss_payload_read/c/common.c b/level_3/fss_payload_read/c/common.c index 3c3f94b..4a537f9 100644 --- a/level_3/fss_payload_read/c/common.c +++ b/level_3/fss_payload_read/c/common.c @@ -111,14 +111,14 @@ extern "C" { } } - if (main->parameters.array[fss_payload_read_parameter_line_first_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_line_first_no_e].result & f_console_result_found_e) { setting->line_first = f_string_empty_s; } else { setting->line_first = f_string_eol_s; } - if (main->parameters.array[fss_payload_read_parameter_line_last_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_line_last_no_e].result & f_console_result_found_e) { setting->line_last = f_string_empty_s; } else { @@ -144,13 +144,13 @@ extern "C" { } } - if (main->parameters.array[fss_payload_read_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_help_e].result & f_console_result_found_e) { setting->flag |= fss_payload_read_main_flag_help_e; return; } - if (main->parameters.array[fss_payload_read_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_version_e].result & f_console_result_found_e) { setting->flag |= fss_payload_read_main_flag_version_e; return; @@ -163,7 +163,7 @@ extern "C" { f_string_static_t * const args = main->parameters.arguments.array; - if (main->parameters.array[fss_payload_read_parameter_strip_invalid_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_strip_invalid_e].result & f_console_result_found_e) { setting->flag |= fss_payload_read_main_flag_strip_invalid_e; } } diff --git a/level_3/fss_payload_read/c/common.h b/level_3/fss_payload_read/c/common.h index d5465e0..703efb1 100644 --- a/level_3/fss_payload_read/c/common.h +++ b/level_3/fss_payload_read/c/common.h @@ -210,33 +210,33 @@ extern "C" { #define fss_payload_read_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \ \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_at_s.string, fss_payload_read_long_at_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_content_s.string, fss_payload_read_long_content_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_columns_s.string, fss_payload_read_long_columns_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_delimit_s.string, fss_payload_read_long_delimit_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_depth_s.string, fss_payload_read_long_depth_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_empty_s.string, fss_payload_read_long_empty_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_line_s.string, fss_payload_read_long_line_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_name_s.string, fss_payload_read_long_name_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_object_s.string, fss_payload_read_long_object_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_pipe_s.string, fss_payload_read_long_pipe_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_original_s.string, fss_payload_read_long_original_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_select_s.string, fss_payload_read_long_select_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_total_s.string, fss_payload_read_long_total_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_payload_read_short_trim_s.string, fss_payload_read_long_trim_s.string, 0, 0, f_console_type_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_payload_read_short_at_s.string, fss_payload_read_long_at_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_payload_read_short_content_s.string, fss_payload_read_long_content_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_payload_read_short_columns_s.string, fss_payload_read_long_columns_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_payload_read_short_delimit_s.string, fss_payload_read_long_delimit_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_payload_read_short_depth_s.string, fss_payload_read_long_depth_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_payload_read_short_empty_s.string, fss_payload_read_long_empty_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_payload_read_short_line_s.string, fss_payload_read_long_line_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_payload_read_short_name_s.string, fss_payload_read_long_name_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_payload_read_short_object_s.string, fss_payload_read_long_object_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_payload_read_short_pipe_s.string, fss_payload_read_long_pipe_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_payload_read_short_original_s.string, fss_payload_read_long_original_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_payload_read_short_select_s.string, fss_payload_read_long_select_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_payload_read_short_total_s.string, fss_payload_read_long_total_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_payload_read_short_trim_s.string, fss_payload_read_long_trim_s.string, 0, 0, f_console_flag_normal_e), \ } #define fss_payload_read_total_parameters_d 26 diff --git a/level_3/fss_payload_read/c/fss_payload_read.c b/level_3/fss_payload_read/c/fss_payload_read.c index 40523ef..105460a 100644 --- a/level_3/fss_payload_read/c/fss_payload_read.c +++ b/level_3/fss_payload_read/c/fss_payload_read.c @@ -61,13 +61,13 @@ extern "C" { status = F_none; - if (main->parameters.array[fss_payload_read_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_help_e].result & f_console_result_found_e) { fss_payload_read_print_help(setting, main->message); return status; } - if (main->parameters.array[fss_payload_read_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_version_e].result & f_console_result_found_e) { fll_program_print_version(main->message, fss_payload_read_program_version_s); return status; @@ -120,11 +120,11 @@ extern "C" { for (f_array_length_t i = 0; i < 6; ++i) { - if (main->parameters.array[parameter_code[i]].result == f_console_result_found_e) { + if (main->parameters.array[parameter_code[i]].result & f_console_result_found_e) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, parameter_name[i], main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, parameter_name[i], main->error.notable); fl_print_format("%[' requires a %s.%]%r", main->error.to, main->error.context, parameter_message[i], main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -135,7 +135,7 @@ extern "C" { } // for } - if (F_status_is_error_not(status) && main->parameters.array[fss_payload_read_parameter_columns_e].result == f_console_result_found_e) { + if (F_status_is_error_not(status) && (main->parameters.array[fss_payload_read_parameter_columns_e].result & f_console_result_found_e)) { const f_array_length_t parameter_code[] = { fss_payload_read_parameter_depth_e, fss_payload_read_parameter_line_e, @@ -164,7 +164,7 @@ extern "C" { if (main->parameters.array[parameter_code[i]].result == parameter_match[i]) { if (main->error.verbosity > f_console_verbosity_quiet_e) { - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, fss_payload_read_long_columns_s, parameter_name[i]); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_payload_read_long_columns_s, parameter_name[i]); } status = F_status_set_error(F_parameter); @@ -174,24 +174,24 @@ extern "C" { } // for } - if (F_status_is_error_not(status) && main->parameters.array[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) { - if (main->parameters.array[fss_payload_read_parameter_total_e].result == f_console_result_found_e) { + if (F_status_is_error_not(status) && (main->parameters.array[fss_payload_read_parameter_pipe_e].result & f_console_result_found_e)) { + if (main->parameters.array[fss_payload_read_parameter_total_e].result & f_console_result_found_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, fss_payload_read_long_pipe_s, fss_payload_read_long_total_s); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_payload_read_long_pipe_s, fss_payload_read_long_total_s); } status = F_status_set_error(F_parameter); } - else if (main->parameters.array[fss_payload_read_parameter_line_e].result == f_console_result_additional_e) { + else if (main->parameters.array[fss_payload_read_parameter_line_e].result & f_console_result_value_e) { if (main->error.verbosity > f_console_verbosity_quiet_e) { - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, fss_payload_read_long_pipe_s, fss_payload_read_long_line_s); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_payload_read_long_pipe_s, fss_payload_read_long_line_s); } status = F_status_set_error(F_parameter); } } - if (F_status_is_error_not(status) && main->parameters.array[fss_payload_read_parameter_delimit_e].result == f_console_result_additional_e) { + if (F_status_is_error_not(status) && main->parameters.array[fss_payload_read_parameter_delimit_e].result & f_console_result_value_e) { f_array_length_t index = 0; f_array_length_t length = 0; @@ -219,7 +219,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe value for the parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_payload_read_long_delimit_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_payload_read_long_delimit_s, main->error.notable); fl_print_format("%[' must not be empty.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); @@ -351,7 +351,7 @@ extern "C" { } // for if (data.depth_max > 1) { - if (main->parameters.array[fss_payload_read_parameter_total_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_total_e].result & f_console_result_found_e) { fss_payload_read_print_zero(main); } @@ -361,11 +361,11 @@ extern "C" { } } - if (F_status_is_error_not(status) && main->parameters.array[fss_payload_read_parameter_select_e].result == f_console_result_found_e) { + if (F_status_is_error_not(status) && (main->parameters.array[fss_payload_read_parameter_select_e].result & f_console_result_found_e)) { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_payload_read_long_select_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_payload_read_long_select_s, main->error.notable); fl_print_format("%[' parameter requires a positive number.%]%r", main->error.to, main->error.context, main->error.context, f_string_eol_s); f_file_stream_unlock(main->error.to); diff --git a/level_3/fss_payload_read/c/print.c b/level_3/fss_payload_read/c/print.c index f18e2ac..e137488 100644 --- a/level_3/fss_payload_read/c/print.c +++ b/level_3/fss_payload_read/c/print.c @@ -18,20 +18,20 @@ extern "C" { f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, fss_payload_read_short_at_s, fss_payload_read_long_at_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric index."); - fll_program_print_help_option(print, fss_payload_read_short_content_s, fss_payload_read_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Content (default)."); - fll_program_print_help_option(print, fss_payload_read_short_columns_s, fss_payload_read_long_columns_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns."); - fll_program_print_help_option(print, fss_payload_read_short_delimit_s, fss_payload_read_long_delimit_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits."); - fll_program_print_help_option(print, fss_payload_read_short_depth_s, fss_payload_read_long_depth_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth."); - fll_program_print_help_option(print, fss_payload_read_short_empty_s, fss_payload_read_long_empty_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing."); - fll_program_print_help_option(print, fss_payload_read_short_line_s, fss_payload_read_long_line_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line."); - fll_program_print_help_option(print, fss_payload_read_short_name_s, fss_payload_read_long_name_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name."); - fll_program_print_help_option(print, fss_payload_read_short_object_s, fss_payload_read_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object."); - fll_program_print_help_option(print, fss_payload_read_short_pipe_s, fss_payload_read_long_pipe_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format."); - fll_program_print_help_option(print, fss_payload_read_short_original_s, fss_payload_read_long_original_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print with the original quotes and escapes."); - fll_program_print_help_option(print, fss_payload_read_short_select_s, fss_payload_read_long_select_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index."); - fll_program_print_help_option(print, fss_payload_read_short_total_s, fss_payload_read_long_total_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines."); - fll_program_print_help_option(print, fss_payload_read_short_trim_s, fss_payload_read_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print."); + fll_program_print_help_option(print, fss_payload_read_short_at_s, fss_payload_read_long_at_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select Object at this numeric index."); + fll_program_print_help_option(print, fss_payload_read_short_content_s, fss_payload_read_long_content_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the Content (default)."); + fll_program_print_help_option(print, fss_payload_read_short_columns_s, fss_payload_read_long_columns_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the total number of columns."); + fll_program_print_help_option(print, fss_payload_read_short_delimit_s, fss_payload_read_long_delimit_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Designate how to handle applying delimits."); + fll_program_print_help_option(print, fss_payload_read_short_depth_s, fss_payload_read_long_depth_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select Object at this numeric depth."); + fll_program_print_help_option(print, fss_payload_read_short_empty_s, fss_payload_read_long_empty_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Include empty Content when processing."); + fll_program_print_help_option(print, fss_payload_read_short_line_s, fss_payload_read_long_line_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print only the Content at the given line."); + fll_program_print_help_option(print, fss_payload_read_short_name_s, fss_payload_read_long_name_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select Object with this name."); + fll_program_print_help_option(print, fss_payload_read_short_object_s, fss_payload_read_long_object_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the Object."); + fll_program_print_help_option(print, fss_payload_read_short_pipe_s, fss_payload_read_long_pipe_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print using the special pipe format."); + fll_program_print_help_option(print, fss_payload_read_short_original_s, fss_payload_read_long_original_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Print with the original quotes and escapes."); + fll_program_print_help_option(print, fss_payload_read_short_select_s, fss_payload_read_long_select_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select sub-Content at this index."); + fll_program_print_help_option(print, fss_payload_read_short_total_s, fss_payload_read_long_total_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the total number of lines."); + fll_program_print_help_option(print, fss_payload_read_short_trim_s, fss_payload_read_long_trim_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Trim Object names on select or print."); f_print_dynamic_raw(f_string_eol_s, print.to); f_print_dynamic_raw(f_string_eol_s, print.to); @@ -45,47 +45,47 @@ extern "C" { fl_print_format(" All numeric positions (indexes) start at 0 instead of 1.%r", print.to, f_string_eol_s); fl_print_format(" For example, a file of 17 lines would range from 0 to 16.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" When using the %[%r%r%] option, an order of operations is enforced on the parameters.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_depth_s, print.set->notable, f_string_eol_s); + fl_print_format(" When using the %[%r%r%] option, an order of operations is enforced on the parameters.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_depth_s, print.set->notable, f_string_eol_s); fl_print_format(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%r", print.to, f_string_eol_s); - fl_print_format(" %[%r%r%]: An Object index at the specified depth.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_at_s, print.set->notable, f_string_eol_s); - fl_print_format(" %[%r%r%]: A new depth within the specified depth, indexed from the root.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_depth_s, print.set->notable, f_string_eol_s); - fl_print_format(" %[%r%r%]: An Object name at the specified depth.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" %[%r%r%]: An Object index at the specified depth.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_at_s, print.set->notable, f_string_eol_s); + fl_print_format(" %[%r%r%]: A new depth within the specified depth, indexed from the root.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_depth_s, print.set->notable, f_string_eol_s); + fl_print_format(" %[%r%r%]: An Object name at the specified depth.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%] must be in numeric order, but values in between may be skipped.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_depth_s, print.set->notable, f_string_eol_s); + fl_print_format(" The parameter %[%r%r%] must be in numeric order, but values in between may be skipped.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_depth_s, print.set->notable, f_string_eol_s); fl_print_format(" ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%r", print.to, f_string_eol_s); fl_print_format(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%] selects a Content column.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_select_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" The parameter %[%r%r%] selects a Content column.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_select_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" Specify both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_object_s, print.set->notable); - fl_print_format(" and the %[%r%r%] parameters to get the total objects.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_total_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" Specify both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_object_s, print.set->notable); + fl_print_format(" and the %[%r%r%] parameters to get the total objects.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_total_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" When both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_at_s, print.set->notable); - fl_print_format(" and %[%r%r%] parameters are specified (at the same depth),", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_name_s, print.set->notable); - fl_print_format(" the %[%r%r%] parameter value will be treated as a position relative to the specified", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_at_s, print.set->notable); - fl_print_format(" %[%r%r%] parameter value.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" When both %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_at_s, print.set->notable); + fl_print_format(" and %[%r%r%] parameters are specified (at the same depth),", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_name_s, print.set->notable); + fl_print_format(" the %[%r%r%] parameter value will be treated as a position relative to the specified", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_at_s, print.set->notable); + fl_print_format(" %[%r%r%] parameter value.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_name_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" This program may support parameters, such as %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_depth_s, print.set->notable); - fl_print_format(" or %[%r%r%], even if not supported by the standard.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_select_s, print.set->notable, f_string_eol_s); + fl_print_format(" This program may support parameters, such as %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_depth_s, print.set->notable); + fl_print_format(" or %[%r%r%], even if not supported by the standard.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_select_s, print.set->notable, f_string_eol_s); fl_print_format(" This is done to help ensure consistency for scripting.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_depth_s, print.set->notable); + fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_depth_s, print.set->notable); fl_print_format(" if the standard doesn't support nested Content, then only a depth of 0 would be valid.%r", print.to, f_string_eol_s); - fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_select_s, print.set->notable); + fl_print_format(" For parameters like %[%r%r%],", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_select_s, print.set->notable); fl_print_format(" if the standard doesn't support multiple Content groups, then only a select of 0 would be valid.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_trim_s, print.set->notable); + fl_print_format(" The parameter %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_trim_s, print.set->notable); fl_print_format(" will remove leading and trailing white spaces when selecting objects or when printing objects.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" When specifying both the %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_object_s, print.set->notable); - fl_print_format(" parameter and the %[%r%r%] parameter, the entire Object and Content are printed, including the formatting.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_content_s, print.set->notable, f_string_eol_s); + fl_print_format(" When specifying both the %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_object_s, print.set->notable); + fl_print_format(" parameter and the %[%r%r%] parameter, the entire Object and Content are printed, including the formatting.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_content_s, print.set->notable, f_string_eol_s); fl_print_format(" Both the Object and Content printed are already escaped.%r", print.to, f_string_eol_s); fl_print_format(" Both the Object and Content are separated by a New Line character '\\n' (U+000A).%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameter %[%r%r%] accepts the following:%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_delimit_s, print.set->notable, f_string_eol_s); + fl_print_format(" The parameter %[%r%r%] accepts the following:%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_delimit_s, print.set->notable, f_string_eol_s); fl_print_format(" - %[%r%]: Do not apply delimits.%r", print.to, print.set->notable, fss_payload_read_delimit_mode_name_none_s, print.set->notable, f_string_eol_s); fl_print_format(" - %[%r%]: (default) Apply all delimits.%r", print.to, print.set->notable, fss_payload_read_delimit_mode_name_all_s, print.set->notable, f_string_eol_s); fl_print_format(" - %[%r%]: Apply delimits for Objects.%r", print.to, print.set->notable, fss_payload_read_delimit_mode_name_object_s, print.set->notable, f_string_eol_s); @@ -93,20 +93,20 @@ extern "C" { fl_print_format(" - A number, 0 or greater, followed by a %[%r%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%r", print.to, print.set->notable, fss_payload_read_delimit_mode_name_greater_s, print.set->notable, f_string_eol_s, f_string_eol_s); fl_print_format(" - A number, 0 or lesser, followed by a %[%r%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%r%r", print.to, print.set->notable, fss_payload_read_delimit_mode_name_lesser_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" The %[%r%r%] parameter may be specified multiple times to customize the delimit behavior.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_delimit_s, print.set->notable, f_string_eol_s); + fl_print_format(" The %[%r%r%] parameter may be specified multiple times to customize the delimit behavior.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_delimit_s, print.set->notable, f_string_eol_s); - fl_print_format(" The %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_delimit_s, print.set->notable); + fl_print_format(" The %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_delimit_s, print.set->notable); fl_print_format(" values %[%r%]", print.to, print.set->notable, fss_payload_read_delimit_mode_name_none_s, print.set->notable); fl_print_format(" and %[%r%],", print.to, print.set->notable, fss_payload_read_delimit_mode_name_all_s, print.set->notable); fl_print_format(" overrule all other delimit values.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The parameters %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_columns_s, print.set->notable); - fl_print_format(" and %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_select_s, print.set->notable); + fl_print_format(" The parameters %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_columns_s, print.set->notable); + fl_print_format(" and %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_select_s, print.set->notable); fl_print_format(" refer to a Content column.%r", print.to, f_string_eol_s); fl_print_format(" The word \"column\" is being loosely defined to refer to a specific Content.%r", print.to, f_string_eol_s); fl_print_format(" This is not to be confused with a depth.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" As an exceptional case, a %[%r%r%] of", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_depth_s, print.set->notable); + fl_print_format(" As an exceptional case, a %[%r%r%] of", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_depth_s, print.set->notable); fl_print_format(" %[1%] applies only to the explicit Object of", print.to, print.set->notable, print.set->notable); fl_print_format(" '%[%r%]'.%r", print.to, print.set->notable, f_fss_string_header_s, print.set->notable, f_string_eol_s); fl_print_format(" Content at this depth is processed as FSS-0001 Extended.%r%r", print.to, f_string_eol_s, f_string_eol_s); @@ -114,7 +114,7 @@ extern "C" { fl_print_format(" The Content of the explicit Object of", print.to); fl_print_format(" '%[%r%]'", print.to, print.set->notable, f_fss_string_payload_s, print.set->notable, f_string_eol_s); fl_print_format(" will not contain any Content close pipe control codes when using", print.to); - fl_print_format(" %[%r%r%].%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_read_long_pipe_s, print.set->notable, f_string_eol_s); + fl_print_format(" %[%r%r%].%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_read_long_pipe_s, print.set->notable, f_string_eol_s); f_print_dynamic_raw(setting->line_last, print.to); diff --git a/level_3/fss_payload_read/c/private-print.c b/level_3/fss_payload_read/c/private-print.c index f1d635c..6f90110 100644 --- a/level_3/fss_payload_read/c/private-print.c +++ b/level_3/fss_payload_read/c/private-print.c @@ -222,7 +222,7 @@ extern "C" { #ifndef _di_fss_payload_read_print_content_end_extended_ void fss_payload_read_print_content_end_extended(fll_program_data_t * const main) { - if (main->parameters.array[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_pipe_e].result & f_console_result_found_e) { f_print_dynamic_raw(fss_payload_read_pipe_content_start_s, main->output.to); } else { @@ -234,7 +234,7 @@ extern "C" { #ifndef _di_fss_payload_read_print_content_ignore_ void fss_payload_read_print_content_ignore(fll_program_data_t * const main) { - if (main->parameters.array[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_pipe_e].result & f_console_result_found_e) { f_print_dynamic_raw(fss_payload_read_pipe_content_ignore_s, main->output.to); } } @@ -243,11 +243,11 @@ extern "C" { #ifndef _di_fss_payload_read_print_object_end_ void fss_payload_read_print_object_end(fll_program_data_t * const main) { - if (main->parameters.array[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_pipe_e].result & f_console_result_found_e) { f_print_dynamic_raw(fss_payload_read_pipe_content_start_s, main->output.to); } else { - if (main->parameters.array[fss_payload_read_parameter_content_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_content_e].result & f_console_result_found_e) { f_print_dynamic_raw(f_fss_basic_list_open_s, main->output.to); f_print_dynamic_raw(f_fss_basic_list_open_end_s, main->output.to); } @@ -261,7 +261,7 @@ extern "C" { #ifndef _di_fss_payload_read_print_object_end_extended_ void fss_payload_read_print_object_end_extended(fll_program_data_t * const main) { - if (main->parameters.array[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_pipe_e].result & f_console_result_found_e) { f_print_dynamic_raw(fss_payload_read_pipe_content_end_s, main->output.to); } else { @@ -273,7 +273,7 @@ extern "C" { #ifndef _di_fss_payload_read_print_set_end_ void fss_payload_read_print_set_end(fll_program_data_t * const main) { - if (main->parameters.array[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_pipe_e].result & f_console_result_found_e) { f_print_dynamic_raw(fss_payload_read_pipe_content_end_s, main->output.to); } } @@ -282,7 +282,7 @@ extern "C" { #ifndef _di_fss_payload_read_print_set_end_extended_ void fss_payload_read_print_set_end_extended(fll_program_data_t * const main) { - if (main->parameters.array[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_pipe_e].result & f_console_result_found_e) { f_print_dynamic_raw(fss_payload_read_pipe_content_end_s, main->output.to); } else { diff --git a/level_3/fss_payload_read/c/private-read.c b/level_3/fss_payload_read/c/private-read.c index 069f61b..42dbd5e 100644 --- a/level_3/fss_payload_read/c/private-read.c +++ b/level_3/fss_payload_read/c/private-read.c @@ -63,7 +63,7 @@ extern "C" { { f_array_length_t depth_size = 1; - if (main->parameters.array[fss_payload_read_parameter_depth_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_payload_read_parameter_depth_e].result & f_console_result_value_e) { depth_size = main->parameters.array[fss_payload_read_parameter_depth_e].values.used; } @@ -118,7 +118,7 @@ extern "C" { } } - if (main->parameters.array[fss_payload_read_parameter_at_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_payload_read_parameter_at_e].result & f_console_result_value_e) { for (; position_at < main->parameters.array[fss_payload_read_parameter_at_e].values.used; ++position_at) { if (main->parameters.array[fss_payload_read_parameter_at_e].values.array[position_at] < position_depth) { @@ -141,7 +141,7 @@ extern "C" { } // for } - if (main->parameters.array[fss_payload_read_parameter_name_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_payload_read_parameter_name_e].result & f_console_result_value_e) { for (; position_name < main->parameters.array[fss_payload_read_parameter_name_e].values.used; ++position_name) { if (main->parameters.array[fss_payload_read_parameter_name_e].values.array[position_name] < position_depth) { @@ -154,7 +154,7 @@ extern "C" { data->depths.array[i].index_name = main->parameters.array[fss_payload_read_parameter_name_e].values.array[position_name]; - if (main->parameters.array[fss_payload_read_parameter_trim_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_trim_e].result & f_console_result_found_e) { status = fl_string_dynamic_rip(data->argv[data->depths.array[i].index_name], &data->depths.array[i].value_name); } else { @@ -162,7 +162,7 @@ extern "C" { } if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), main->parameters.array[fss_payload_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_dynamic_rip" : "f_string_dynamic_append", F_true); + fll_error_print(main->error, F_status_set_fine(status), (main->parameters.array[fss_payload_read_parameter_trim_e].result & f_console_result_found_e) ? "fl_string_dynamic_rip" : "f_string_dynamic_append", F_true); return status; } @@ -188,7 +188,7 @@ extern "C" { if (main->error.verbosity < f_console_verbosity_normal_e) { fss_payload_read_print_line_first(setting, main->error, F_true); - fll_program_print_error_parameter_must_specify_once_value(main->error, f_console_symbol_long_enable_s, fss_payload_read_long_depth_s, data->depths.array[i].depth); + fll_program_print_error_parameter_must_specify_once_value(main->error, f_console_symbol_long_normal_s, fss_payload_read_long_depth_s, data->depths.array[i].depth); } return F_status_set_error(F_parameter); @@ -198,7 +198,7 @@ extern "C" { f_file_stream_lock(main->error.to); fl_print_format("%r%[%QThe parameter '%]", main->error.to, f_string_eol_s, main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_enable_s, fss_payload_read_long_depth_s, main->error.notable); + fl_print_format("%[%r%r%]", main->error.to, main->error.notable, f_console_symbol_long_normal_s, fss_payload_read_long_depth_s, main->error.notable); fl_print_format("%[' may not have the value '%]", main->error.to, main->error.context, main->error.context); fl_print_format("%[%ul%]", main->error.to, main->error.notable, data->depths.array[i].depth, main->error.notable); fl_print_format("%[' before the value '%]", main->error.to, main->error.context, main->error.context); @@ -301,7 +301,7 @@ extern "C" { #ifndef _di_fss_payload_read_load_number_ f_status_t fss_payload_read_load_number(fll_program_data_t * const main, fss_payload_read_data_t * const data, const f_array_length_t parameter, const f_string_static_t name, f_number_unsigned_t *number) { - if (main->parameters.array[parameter].result == f_console_result_additional_e) { + if (main->parameters.array[parameter].result & f_console_result_value_e) { const f_array_length_t index = main->parameters.array[parameter].values.array[main->parameters.array[parameter].values.used - 1]; const f_status_t status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, data->argv[index], number); @@ -328,7 +328,7 @@ extern "C" { // This standard does not support multiple content groups, except for "headers" FSS-0001 Extended at depth 1. if (!(data->option & fss_payload_read_data_option_extended_d)) { if ((data->option & fss_payload_read_data_option_select_d) && data->select) { - if (main->parameters.array[fss_payload_read_parameter_total_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_total_e].result & f_console_result_found_e) { f_file_stream_lock(main->output.to); fss_payload_read_print_zero(main); @@ -356,7 +356,7 @@ extern "C" { if (fl_string_dynamic_partial_compare_string(F_fss_string_header_s, data->buffer, F_fss_string_header_s_length, data->objects.array[i]) == F_equal_to) { if (names[i]) break; - if (main->parameters.array[fss_payload_read_parameter_total_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_total_e].result & f_console_result_found_e) { f_file_stream_lock(main->output.to); fss_payload_read_print_zero(main); @@ -980,53 +980,53 @@ extern "C" { f_status_t status = F_none; - if (main->parameters.array[fss_payload_read_parameter_at_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_payload_read_parameter_at_e].result & f_console_result_value_e) { data->option |= fss_payload_read_data_option_at_d; } - if (main->parameters.array[fss_payload_read_parameter_columns_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_columns_e].result & f_console_result_found_e) { data->option |= fss_payload_read_data_option_columns_d; } - if (main->parameters.array[fss_payload_read_parameter_content_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_content_e].result & f_console_result_found_e) { data->option |= fss_payload_read_data_option_content_d; } - if (main->parameters.array[fss_payload_read_parameter_empty_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_empty_e].result & f_console_result_found_e) { data->option |= fss_payload_read_data_option_empty_d; } - if (main->parameters.array[fss_payload_read_parameter_line_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_payload_read_parameter_line_e].result & f_console_result_value_e) { data->option |= fss_payload_read_data_option_line_d; status = fss_payload_read_load_number(main, data, fss_payload_read_parameter_line_e, fss_payload_read_long_line_s, &data->line); if (F_status_is_error(status)) return status; } - if (main->parameters.array[fss_payload_read_parameter_name_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_payload_read_parameter_name_e].result & f_console_result_value_e) { data->option |= fss_payload_read_data_option_name_d; } - if (main->parameters.array[fss_payload_read_parameter_object_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_object_e].result & f_console_result_found_e) { data->option |= fss_payload_read_data_option_object_d; } - if (main->parameters.array[fss_payload_read_parameter_original_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_original_e].result & f_console_result_found_e) { data->option |= fss_payload_read_data_option_original_d; } - if (main->parameters.array[fss_payload_read_parameter_select_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_payload_read_parameter_select_e].result & f_console_result_value_e) { data->option |= fss_payload_read_data_option_select_d; status = fss_payload_read_load_number(main, data, fss_payload_read_parameter_select_e, fss_payload_read_long_select_s, &data->select); if (F_status_is_error(status)) return status; } - if (main->parameters.array[fss_payload_read_parameter_total_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_total_e].result & f_console_result_found_e) { data->option |= fss_payload_read_data_option_total_d; } - if (main->parameters.array[fss_payload_read_parameter_trim_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_read_parameter_trim_e].result & f_console_result_found_e) { data->option |= fss_payload_read_data_option_trim_d; } diff --git a/level_3/fss_payload_write/c/common.c b/level_3/fss_payload_write/c/common.c index 1c7d3f0..59bb985 100644 --- a/level_3/fss_payload_write/c/common.c +++ b/level_3/fss_payload_write/c/common.c @@ -102,14 +102,14 @@ extern "C" { } } - if (main->parameters.array[fss_payload_write_parameter_line_first_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_write_parameter_line_first_no_e].result & f_console_result_found_e) { setting->line_first = f_string_empty_s; } else { setting->line_first = f_string_eol_s; } - if (main->parameters.array[fss_payload_write_parameter_line_last_no_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_write_parameter_line_last_no_e].result & f_console_result_found_e) { setting->line_last = f_string_empty_s; } else { @@ -133,13 +133,13 @@ extern "C" { } } - if (main->parameters.array[fss_payload_write_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_write_parameter_help_e].result & f_console_result_found_e) { setting->flag |= fss_payload_write_main_flag_help_e; return; } - if (main->parameters.array[fss_payload_write_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_write_parameter_version_e].result & f_console_result_found_e) { setting->flag |= fss_payload_write_main_flag_version_e; return; @@ -150,12 +150,12 @@ extern "C" { main->output.to.stream = F_type_output_d; main->output.to.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d; - if (main->parameters.array[fss_payload_write_parameter_file_e].result == f_console_result_additional_e && main->parameters.array[fss_payload_write_parameter_file_e].values.used) { + if (main->parameters.array[fss_payload_write_parameter_file_e].result & f_console_result_value_e && main->parameters.array[fss_payload_write_parameter_file_e].values.used) { if (main->parameters.array[fss_payload_write_parameter_file_e].values.used > 1) { setting->status = F_status_set_error(F_parameter); fss_payload_write_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_must_specify_once(main->error, f_console_symbol_long_enable_s, fss_payload_write_long_file_s); + fll_program_print_error_parameter_must_specify_once(main->error, f_console_symbol_long_normal_s, fss_payload_write_long_file_s); fss_payload_write_print_line_last_locked(setting, main->error); return; @@ -176,17 +176,17 @@ extern "C" { setting->flag |= fss_payload_write_main_flag_file_to_e; } - else if (main->parameters.array[fss_payload_write_parameter_file_e].result == f_console_result_found_e) { + else if (main->parameters.array[fss_payload_write_parameter_file_e].result & f_console_result_found_e) { setting->status = F_status_set_error(F_parameter); fss_payload_write_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_enable_s, fss_payload_write_long_file_s); + fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, fss_payload_write_long_file_s); fss_payload_write_print_line_last_locked(setting, main->error); return; } - if (main->parameters.array[fss_payload_write_parameter_object_e].result == f_console_result_additional_e && main->parameters.array[fss_payload_write_parameter_object_e].values.used) { + if (main->parameters.array[fss_payload_write_parameter_object_e].result & f_console_result_value_e && main->parameters.array[fss_payload_write_parameter_object_e].values.used) { f_array_lengths_t * const values = &main->parameters.array[fss_payload_write_parameter_object_e].values; setting->objects.used = 0; @@ -211,17 +211,17 @@ extern "C" { setting->flag |= fss_payload_write_main_flag_object_e; } - else if (main->parameters.array[fss_payload_write_parameter_object_e].result == f_console_result_found_e) { + else if (main->parameters.array[fss_payload_write_parameter_object_e].result & f_console_result_found_e) { setting->status = F_status_set_error(F_parameter); fss_payload_write_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_enable_s, fss_payload_write_long_object_s); + fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, fss_payload_write_long_object_s); fss_payload_write_print_line_last_locked(setting, main->error); return; } - if (main->parameters.array[fss_payload_write_parameter_content_e].result == f_console_result_additional_e && main->parameters.array[fss_payload_write_parameter_content_e].values.used) { + if (main->parameters.array[fss_payload_write_parameter_content_e].result & f_console_result_value_e && main->parameters.array[fss_payload_write_parameter_content_e].values.used) { f_array_lengths_t * const values = &main->parameters.array[fss_payload_write_parameter_content_e].values; setting->contents.used = 0; @@ -246,17 +246,17 @@ extern "C" { setting->flag |= fss_payload_write_main_flag_content_e; } - else if (main->parameters.array[fss_payload_write_parameter_content_e].result == f_console_result_found_e) { + else if (main->parameters.array[fss_payload_write_parameter_content_e].result & f_console_result_found_e) { setting->status = F_status_set_error(F_parameter); fss_payload_write_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_enable_s, fss_payload_write_long_content_s); + fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, fss_payload_write_long_content_s); fss_payload_write_print_line_last_locked(setting, main->error); return; } - if (main->parameters.array[fss_payload_write_parameter_prepend_e].result == f_console_result_additional_e && main->parameters.array[fss_payload_write_parameter_prepend_e].values.used) { + if (main->parameters.array[fss_payload_write_parameter_prepend_e].result & f_console_result_value_e && main->parameters.array[fss_payload_write_parameter_prepend_e].values.used) { const f_array_length_t index = main->parameters.array[fss_payload_write_parameter_prepend_e].values.array[main->parameters.array[fss_payload_write_parameter_prepend_e].values.used - 1]; setting->prepend.used = 0; @@ -295,23 +295,23 @@ extern "C" { setting->flag |= fss_payload_write_main_flag_prepend_e; } - else if (main->parameters.array[fss_payload_write_parameter_prepend_e].result == f_console_result_found_e) { + else if (main->parameters.array[fss_payload_write_parameter_prepend_e].result & f_console_result_found_e) { setting->status = F_status_set_error(F_parameter); fss_payload_write_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_enable_s, fss_payload_write_long_prepend_s); + fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, fss_payload_write_long_prepend_s); fss_payload_write_print_line_last_locked(setting, main->error); return; } - if (main->parameters.array[fss_payload_write_parameter_ignore_e].result == f_console_result_additional_e && main->parameters.array[fss_payload_write_parameter_ignore_e].values.used) { + if (main->parameters.array[fss_payload_write_parameter_ignore_e].result & f_console_result_value_e && main->parameters.array[fss_payload_write_parameter_ignore_e].values.used) { if (main->parameters.array[fss_payload_write_parameter_ignore_e].values.used % 2 != 0) { setting->status = F_status_set_error(F_parameter); fss_payload_write_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_missing_value_requires_amount(main->error, f_console_symbol_long_enable_s, fss_payload_write_long_ignore_s, fss_payload_write_string_two_s); + fll_program_print_error_parameter_missing_value_requires_amount(main->error, f_console_symbol_long_normal_s, fss_payload_write_long_ignore_s, fss_payload_write_string_two_s); fss_payload_write_print_line_last_locked(setting, main->error); return; @@ -337,7 +337,7 @@ extern "C" { if (F_status_is_error(setting->status)) { fss_payload_write_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_integer_not(main->error, f_console_symbol_long_enable_s, fss_payload_write_long_ignore_s, main->parameters.arguments.array[index]); + fll_program_print_error_parameter_integer_not(main->error, f_console_symbol_long_normal_s, fss_payload_write_long_ignore_s, main->parameters.arguments.array[index]); fss_payload_write_print_line_last_locked(setting, main->error); return; @@ -349,7 +349,7 @@ extern "C" { if (F_status_is_error(setting->status)) { fss_payload_write_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_integer_not(main->error, f_console_symbol_long_enable_s, fss_payload_write_long_ignore_s, main->parameters.arguments.array[index]); + fll_program_print_error_parameter_integer_not(main->error, f_console_symbol_long_normal_s, fss_payload_write_long_ignore_s, main->parameters.arguments.array[index]); fss_payload_write_print_line_last_locked(setting, main->error); return; @@ -359,7 +359,7 @@ extern "C" { setting->status = F_status_set_error(F_parameter); fss_payload_write_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_range_start_before_stop(main->error, f_console_symbol_long_enable_s, fss_payload_write_long_ignore_s, main->parameters.arguments.array[main->parameters.array[fss_payload_write_parameter_ignore_e].values.array[i]], main->parameters.arguments.array[index]); + fll_program_print_error_parameter_range_start_before_stop(main->error, f_console_symbol_long_normal_s, fss_payload_write_long_ignore_s, main->parameters.arguments.array[main->parameters.array[fss_payload_write_parameter_ignore_e].values.array[i]], main->parameters.arguments.array[index]); fss_payload_write_print_line_last_locked(setting, main->error); return; @@ -370,17 +370,17 @@ extern "C" { setting->flag |= fss_payload_write_main_flag_ignore_e; } - else if (main->parameters.array[fss_payload_write_parameter_ignore_e].result == f_console_result_found_e) { + else if (main->parameters.array[fss_payload_write_parameter_ignore_e].result & f_console_result_found_e) { setting->status = F_status_set_error(F_parameter); fss_payload_write_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_enable_s, fss_payload_write_long_ignore_s); + fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, fss_payload_write_long_ignore_s); fss_payload_write_print_line_last_locked(setting, main->error); return; } - if (main->parameters.array[fss_payload_write_parameter_partial_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_write_parameter_partial_e].result & f_console_result_found_e) { setting->flag |= fss_payload_write_main_flag_partial_e; } @@ -390,7 +390,7 @@ extern "C" { setting->status = F_status_set_error(F_parameter); fss_payload_write_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_enable_s, fss_payload_write_long_object_s); + fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, fss_payload_write_long_object_s); fss_payload_write_print_line_last_locked(setting, main->error); return; @@ -400,7 +400,7 @@ extern "C" { setting->status = F_status_set_error(F_parameter); fss_payload_write_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_enable_s, fss_payload_write_long_content_s); + fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, fss_payload_write_long_content_s); fss_payload_write_print_line_last_locked(setting, main->error); return; @@ -410,18 +410,18 @@ extern "C" { setting->status = F_status_set_error(F_parameter); fss_payload_write_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_both_specified_same_amount_without(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, fss_payload_write_long_object_s, fss_payload_write_long_content_s, fss_payload_write_long_partial_s); + fll_program_print_error_parameter_both_specified_same_amount_without(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_payload_write_long_object_s, fss_payload_write_long_content_s, fss_payload_write_long_partial_s); fss_payload_write_print_line_last_locked(setting, main->error); return; } if ((setting->flag & fss_payload_write_main_flag_content_e) && (setting->flag & fss_payload_write_main_flag_partial_e)) { - if (main->parameters.array[fss_payload_write_parameter_content_e].result == f_console_result_additional_e) { + if (main->parameters.array[fss_payload_write_parameter_content_e].result & f_console_result_value_e) { setting->status = F_status_set_error(F_parameter); fss_payload_write_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_cannot_use_with_xor(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, fss_payload_write_long_partial_s, fss_payload_write_long_object_s, fss_payload_write_long_content_s); + fll_program_print_error_parameter_cannot_use_with_xor(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_payload_write_long_partial_s, fss_payload_write_long_object_s, fss_payload_write_long_content_s); fss_payload_write_print_line_last_locked(setting, main->error); return; @@ -457,18 +457,18 @@ extern "C" { setting->quote = f_fss_quote_double_s; - if (main->parameters.array[fss_payload_write_parameter_double_e].result == f_console_result_found_e) { - if (main->parameters.array[fss_payload_write_parameter_single_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_write_parameter_double_e].result & f_console_result_found_e) { + if (main->parameters.array[fss_payload_write_parameter_single_e].result & f_console_result_found_e) { if (main->parameters.array[fss_payload_write_parameter_double_e].location < main->parameters.array[fss_payload_write_parameter_single_e].location) { setting->quote = f_fss_quote_single_s; } } } - else if (main->parameters.array[fss_payload_write_parameter_single_e].result == f_console_result_found_e) { + else if (main->parameters.array[fss_payload_write_parameter_single_e].result & f_console_result_found_e) { setting->quote = f_fss_quote_single_s; } - if (main->parameters.array[fss_payload_write_parameter_trim_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_write_parameter_trim_e].result & f_console_result_found_e) { setting->flag |= fss_payload_write_main_flag_trim_e; } diff --git a/level_3/fss_payload_write/c/common.h b/level_3/fss_payload_write/c/common.h index 8d62e02..72a9596 100644 --- a/level_3/fss_payload_write/c/common.h +++ b/level_3/fss_payload_write/c/common.h @@ -187,28 +187,28 @@ extern "C" { #define fss_payload_write_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \ \ - macro_f_console_parameter_t_initialize2(fss_payload_write_short_file_s.string, fss_payload_write_long_file_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_payload_write_short_content_s.string, fss_payload_write_long_content_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_payload_write_short_double_s.string, fss_payload_write_long_double_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_payload_write_short_ignore_s.string, fss_payload_write_long_ignore_s.string, 0, 2, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_payload_write_short_object_s.string, fss_payload_write_long_object_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_payload_write_short_partial_s.string, fss_payload_write_long_partial_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_payload_write_short_prepend_s.string, fss_payload_write_long_prepend_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_payload_write_short_single_s.string, fss_payload_write_long_single_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(fss_payload_write_short_trim_s.string, fss_payload_write_long_trim_s.string, 0, 0, f_console_type_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_payload_write_short_file_s.string, fss_payload_write_long_file_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_payload_write_short_content_s.string, fss_payload_write_long_content_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_payload_write_short_double_s.string, fss_payload_write_long_double_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_payload_write_short_ignore_s.string, fss_payload_write_long_ignore_s.string, 0, 2, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_payload_write_short_object_s.string, fss_payload_write_long_object_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_payload_write_short_partial_s.string, fss_payload_write_long_partial_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_payload_write_short_prepend_s.string, fss_payload_write_long_prepend_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_payload_write_short_single_s.string, fss_payload_write_long_single_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(fss_payload_write_short_trim_s.string, fss_payload_write_long_trim_s.string, 0, 0, f_console_flag_normal_e), \ } #define fss_payload_write_total_parameters_d 21 diff --git a/level_3/fss_payload_write/c/print.c b/level_3/fss_payload_write/c/print.c index 609e78c..bc795f8 100644 --- a/level_3/fss_payload_write/c/print.c +++ b/level_3/fss_payload_write/c/print.c @@ -39,9 +39,9 @@ extern "C" { f_file_stream_lock(print.to); fl_print_format("%r%[%QEach '%]", print.to, f_string_eol_s, print.set->error, print.prefix, print.set->error); - fl_print_format("%[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_write_long_object_s, print.set->notable); + fl_print_format("%[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_write_long_object_s, print.set->notable); fl_print_format("%[' parameter must be specified before a '%]", print.to, print.set->error, print.set->error); - fl_print_format("%[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_write_long_content_s, print.set->notable); + fl_print_format("%[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_write_long_content_s, print.set->notable); fl_print_format("%[' parameter.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s); f_file_stream_unlock(print.to); @@ -69,7 +69,7 @@ extern "C" { f_file_stream_lock(print.to); fl_print_format("%r%[%QThe value for the parameter '%]", print.to, f_string_eol_s, print.set->error, print.prefix, print.set->error); - fl_print_format("%[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_write_long_prepend_s, print.set->notable); + fl_print_format("%[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_write_long_prepend_s, print.set->notable); fl_print_format("%[' must only contain white space.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s); f_file_stream_unlock(print.to); @@ -110,15 +110,15 @@ extern "C" { f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, fss_payload_write_short_file_s, fss_payload_write_long_file_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send data to."); - fll_program_print_help_option(print, fss_payload_write_short_content_s, fss_payload_write_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to write."); - fll_program_print_help_option(print, fss_payload_write_short_double_s, fss_payload_write_long_double_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); - fll_program_print_help_option(print, fss_payload_write_short_ignore_s, fss_payload_write_long_ignore_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content."); - fll_program_print_help_option(print, fss_payload_write_short_object_s, fss_payload_write_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to write."); - fll_program_print_help_option(print, fss_payload_write_short_partial_s, fss_payload_write_long_partial_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not write end of Object/Content character."); - fll_program_print_help_option(print, fss_payload_write_short_prepend_s, fss_payload_write_long_prepend_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given white space characters to the start of each multi-line Content."); - fll_program_print_help_option(print, fss_payload_write_short_single_s, fss_payload_write_long_single_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); - fll_program_print_help_option(print, fss_payload_write_short_trim_s, fss_payload_write_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names."); + fll_program_print_help_option(print, fss_payload_write_short_file_s, fss_payload_write_long_file_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Specify a file to send data to."); + fll_program_print_help_option(print, fss_payload_write_short_content_s, fss_payload_write_long_content_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "The Content to write."); + fll_program_print_help_option(print, fss_payload_write_short_double_s, fss_payload_write_long_double_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use double quotes (default)."); + fll_program_print_help_option(print, fss_payload_write_short_ignore_s, fss_payload_write_long_ignore_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Ignore a given range within a Content."); + fll_program_print_help_option(print, fss_payload_write_short_object_s, fss_payload_write_long_object_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " The Object to write."); + fll_program_print_help_option(print, fss_payload_write_short_partial_s, fss_payload_write_long_partial_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Do not write end of Object/Content character."); + fll_program_print_help_option(print, fss_payload_write_short_prepend_s, fss_payload_write_long_prepend_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Prepend the given white space characters to the start of each multi-line Content."); + fll_program_print_help_option(print, fss_payload_write_short_single_s, fss_payload_write_long_single_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use single quotes."); + fll_program_print_help_option(print, fss_payload_write_short_trim_s, fss_payload_write_long_trim_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Trim Object names."); f_print_dynamic_raw(f_string_eol_s, print.to); f_print_dynamic_raw(f_string_eol_s, print.to); @@ -132,10 +132,10 @@ extern "C" { fl_print_format(" or a Form Feed character '%[\\f%]' (%[U+000C%]).%r", print.to, print.set->notable, print.set->notable, print.set->notable, print.set->notable, f_string_eol_s); fl_print_format(" The end of the pipe represents the end of any Object or Content.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The FSS-000E (Payload) specification does not support quoted names, therefore the parameters '%[%r%r%]'", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_write_long_single_s, print.set->notable); - fl_print_format(" and '%[%r%r%]' do nothing.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_write_long_double_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" The FSS-000E (Payload) specification does not support quoted names, therefore the parameters '%[%r%r%]'", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_write_long_single_s, print.set->notable); + fl_print_format(" and '%[%r%r%]' do nothing.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_write_long_double_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" This program does not use the parameter '%[%r%r%]', which therefore does nothing.%r", print.to, print.set->notable, f_console_symbol_long_enable_s, fss_payload_write_long_ignore_s, print.set->notable, f_string_eol_s); + fl_print_format(" This program does not use the parameter '%[%r%r%]', which therefore does nothing.%r", print.to, print.set->notable, f_console_symbol_long_normal_s, fss_payload_write_long_ignore_s, print.set->notable, f_string_eol_s); fl_print_format(" This parameter requires two values.%r", print.to, f_string_eol_s); f_print_dynamic_raw(setting->line_last, print.to); diff --git a/level_3/fss_payload_write/c/private-write.c b/level_3/fss_payload_write/c/private-write.c index bcef629..db87e09 100644 --- a/level_3/fss_payload_write/c/private-write.c +++ b/level_3/fss_payload_write/c/private-write.c @@ -51,7 +51,7 @@ extern "C" { } if (content) { - if (main->parameters.array[fss_payload_write_parameter_trim_e].result == f_console_result_found_e) { + if (main->parameters.array[fss_payload_write_parameter_trim_e].result & f_console_result_found_e) { complete = f_fss_complete_full_trim_e; } else { diff --git a/level_3/iki_read/c/common.c b/level_3/iki_read/c/common.c index c315595..d74fa6d 100644 --- a/level_3/iki_read/c/common.c +++ b/level_3/iki_read/c/common.c @@ -111,14 +111,14 @@ extern "C" { } } - if (main->parameters.array[iki_read_parameter_line_first_no_e].result == f_console_result_found_e) { + if (main->parameters.array[iki_read_parameter_line_first_no_e].result & f_console_result_found_e) { setting->line_first = f_string_empty_s; } else { setting->line_first = f_string_eol_s; } - if (main->parameters.array[iki_read_parameter_line_last_no_e].result == f_console_result_found_e) { + if (main->parameters.array[iki_read_parameter_line_last_no_e].result & f_console_result_found_e) { setting->line_last = f_string_empty_s; } else { @@ -142,13 +142,13 @@ extern "C" { } } - if (main->parameters.array[iki_read_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[iki_read_parameter_help_e].result & f_console_result_found_e) { setting->flag |= iki_read_main_flag_help_e; return; } - if (main->parameters.array[iki_read_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[iki_read_parameter_version_e].result & f_console_result_found_e) { setting->flag |= iki_read_main_flag_version_e; return; @@ -165,12 +165,12 @@ extern "C" { return; } - if (main->parameters.array[iki_read_parameter_at_e].result == f_console_result_additional_e) { - if (main->parameters.array[iki_read_parameter_whole_e].result == f_console_result_found_e) { + if (main->parameters.array[iki_read_parameter_at_e].result & f_console_result_value_e) { + if (main->parameters.array[iki_read_parameter_whole_e].result & f_console_result_found_e) { setting->status = F_status_set_error(F_parameter); iki_read_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, iki_read_long_at_s, iki_read_long_whole_s); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_at_s, iki_read_long_whole_s); iki_read_print_line_last_locked(setting, main->error); return; @@ -186,7 +186,7 @@ extern "C" { setting->status = F_status_set_error(F_parameter); iki_read_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_integer_not(main->error, f_console_symbol_long_enable_s, iki_read_long_at_s, main->parameters.arguments.array[index]); + fll_program_print_error_parameter_integer_not(main->error, f_console_symbol_long_normal_s, iki_read_long_at_s, main->parameters.arguments.array[index]); iki_read_print_line_last_locked(setting, main->error); return; @@ -194,17 +194,17 @@ extern "C" { setting->flag |= iki_read_main_flag_at_e; } - else if (main->parameters.array[iki_read_parameter_at_e].result == f_console_result_found_e) { + else if (main->parameters.array[iki_read_parameter_at_e].result & f_console_result_found_e) { setting->status = F_status_set_error(F_parameter); iki_read_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_enable_s, iki_read_long_at_s); + fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, iki_read_long_at_s); iki_read_print_line_last_locked(setting, main->error); return; } - if (main->parameters.array[iki_read_parameter_line_e].result == f_console_result_additional_e) { + if (main->parameters.array[iki_read_parameter_line_e].result & f_console_result_value_e) { const f_array_length_t index = main->parameters.array[iki_read_parameter_line_e].values.array[main->parameters.array[iki_read_parameter_line_e].values.used - 1]; setting->line = 0; @@ -215,7 +215,7 @@ extern "C" { setting->status = F_status_set_error(F_parameter); iki_read_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_integer_not(main->error, f_console_symbol_long_enable_s, iki_read_long_line_s, main->parameters.arguments.array[index]); + fll_program_print_error_parameter_integer_not(main->error, f_console_symbol_long_normal_s, iki_read_long_line_s, main->parameters.arguments.array[index]); iki_read_print_line_last_locked(setting, main->error); return; @@ -223,17 +223,17 @@ extern "C" { setting->flag |= iki_read_main_flag_line_e; } - else if (main->parameters.array[iki_read_parameter_line_e].result == f_console_result_found_e) { + else if (main->parameters.array[iki_read_parameter_line_e].result & f_console_result_found_e) { setting->status = F_status_set_error(F_parameter); iki_read_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_enable_s, iki_read_long_line_s); + fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, iki_read_long_line_s); iki_read_print_line_last_locked(setting, main->error); return; } - if (main->parameters.array[iki_read_parameter_name_e].result == f_console_result_additional_e) { + if (main->parameters.array[iki_read_parameter_name_e].result & f_console_result_value_e) { setting->names.used = 0; setting->status = f_string_dynamics_increase_by(main->parameters.array[iki_read_parameter_name_e].values.used, &setting->names); @@ -277,22 +277,22 @@ extern "C" { setting->flag |= iki_read_main_flag_name_e; } - else if (main->parameters.array[iki_read_parameter_name_e].result == f_console_result_found_e) { + else if (main->parameters.array[iki_read_parameter_name_e].result & f_console_result_found_e) { setting->status = F_status_set_error(F_parameter); iki_read_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_enable_s, iki_read_long_name_s); + fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, iki_read_long_name_s); iki_read_print_line_last_locked(setting, main->error); return; } if (main->parameters.array[iki_read_parameter_replace_e].result != f_console_result_none_e) { - if (main->parameters.array[iki_read_parameter_replace_e].result == f_console_result_found_e || main->parameters.array[iki_read_parameter_replace_e].values.used % 2 != 0) { + if ((main->parameters.array[iki_read_parameter_replace_e].result & f_console_result_found_e) || main->parameters.array[iki_read_parameter_replace_e].values.used % 2 != 0) { setting->status = F_status_set_error(F_parameter); iki_read_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_missing_value_requires_amount(main->error, f_console_symbol_long_enable_s, iki_read_long_replace_s, iki_read_string_two_s); + fll_program_print_error_parameter_missing_value_requires_amount(main->error, f_console_symbol_long_normal_s, iki_read_long_replace_s, iki_read_string_two_s); iki_read_print_line_last_locked(setting, main->error); return; @@ -373,11 +373,11 @@ extern "C" { if (F_status_is_error(setting->status)) return; if (main->parameters.array[iki_read_parameter_wrap_e].result != f_console_result_none_e) { - if (main->parameters.array[iki_read_parameter_wrap_e].result == f_console_result_found_e || main->parameters.array[iki_read_parameter_wrap_e].values.used % 3 != 0) { + if ((main->parameters.array[iki_read_parameter_wrap_e].result & f_console_result_found_e) || main->parameters.array[iki_read_parameter_wrap_e].values.used % 3 != 0) { setting->status = F_status_set_error(F_parameter); iki_read_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_missing_value_requires_amount(main->error, f_console_symbol_long_enable_s, iki_read_long_wrap_s, iki_read_string_three_s); + fll_program_print_error_parameter_missing_value_requires_amount(main->error, f_console_symbol_long_normal_s, iki_read_long_wrap_s, iki_read_string_three_s); iki_read_print_line_last_locked(setting, main->error); return; @@ -455,7 +455,7 @@ extern "C" { setting->flag |= iki_read_main_flag_wrap_e; } - if (main->parameters.array[iki_read_parameter_literal_e].result == f_console_result_found_e) { + if (main->parameters.array[iki_read_parameter_literal_e].result & f_console_result_found_e) { const uint8_t ids[3] = { iki_read_parameter_object_e, iki_read_parameter_content_e, @@ -470,11 +470,11 @@ extern "C" { for (uint8_t i = 0; i < 3; ++i) { - if (main->parameters.array[ids[i]].result == f_console_result_found_e) { + if (main->parameters.array[ids[i]].result & f_console_result_found_e) { setting->status = F_status_set_error(F_parameter); iki_read_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, iki_read_long_literal_s, names[i]); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_literal_s, names[i]); iki_read_print_line_last_locked(setting, main->error); return; @@ -483,7 +483,7 @@ extern "C" { setting->flag |= iki_read_main_flag_literal_e; } - else if (main->parameters.array[iki_read_parameter_object_e].result == f_console_result_found_e) { + else if (main->parameters.array[iki_read_parameter_object_e].result & f_console_result_found_e) { const uint8_t ids[2] = { iki_read_parameter_content_e, iki_read_parameter_total_e, @@ -496,11 +496,11 @@ extern "C" { for (uint8_t i = 0; i < 2; ++i) { - if (main->parameters.array[ids[i]].result == f_console_result_found_e) { + if (main->parameters.array[ids[i]].result & f_console_result_found_e) { setting->status = F_status_set_error(F_parameter); iki_read_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, iki_read_long_object_s, names[i]); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_object_s, names[i]); iki_read_print_line_last_locked(setting, main->error); return; @@ -509,12 +509,12 @@ extern "C" { setting->flag |= iki_read_main_flag_object_e; } - else if (main->parameters.array[iki_read_parameter_content_e].result == f_console_result_found_e) { - if (main->parameters.array[iki_read_parameter_total_e].result == f_console_result_found_e) { + else if (main->parameters.array[iki_read_parameter_content_e].result & f_console_result_found_e) { + if (main->parameters.array[iki_read_parameter_total_e].result & f_console_result_found_e) { setting->status = F_status_set_error(F_parameter); iki_read_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, iki_read_long_content_s, iki_read_long_total_s); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_content_s, iki_read_long_total_s); iki_read_print_line_last_locked(setting, main->error); return; @@ -522,12 +522,12 @@ extern "C" { setting->flag |= iki_read_main_flag_content_e; } - else if (main->parameters.array[iki_read_parameter_total_e].result == f_console_result_found_e) { - if (main->parameters.array[iki_read_parameter_whole_e].result == f_console_result_found_e) { + else if (main->parameters.array[iki_read_parameter_total_e].result & f_console_result_found_e) { + if (main->parameters.array[iki_read_parameter_whole_e].result & f_console_result_found_e) { setting->status = F_status_set_error(F_parameter); iki_read_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, iki_read_long_total_s, iki_read_long_wrap_s); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_total_s, iki_read_long_wrap_s); iki_read_print_line_last_locked(setting, main->error); return; @@ -541,7 +541,7 @@ extern "C" { setting->flag |= iki_read_main_flag_content_e; } - if (main->parameters.array[iki_read_parameter_whole_e].result == f_console_result_found_e) { + if (main->parameters.array[iki_read_parameter_whole_e].result & f_console_result_found_e) { setting->flag |= iki_read_main_flag_whole_e; } @@ -594,13 +594,13 @@ extern "C" { #ifndef _di_iki_read_setting_load_parameter_substitution_ f_status_t iki_read_setting_load_parameter_substitution(fll_program_data_t * const main, iki_read_setting_t * const setting, const f_console_parameter_t parameter, const f_string_static_t name, f_string_triples_t *triple) { - if (parameter.result == f_console_result_none_e) return F_false; + if (!(parameter.result & f_console_result_found_e)) return F_false; - if (parameter.result == f_console_result_found_e || parameter.values.used % 3 != 0) { + if ((parameter.result & f_console_result_found_e) || parameter.values.used % 3 != 0) { setting->status = F_status_set_error(F_parameter); iki_read_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_missing_value_requires_amount(main->error, f_console_symbol_long_enable_s, name, iki_read_string_three_s); + fll_program_print_error_parameter_missing_value_requires_amount(main->error, f_console_symbol_long_normal_s, name, iki_read_string_three_s); iki_read_print_line_last_locked(setting, main->error); return F_false; diff --git a/level_3/iki_read/c/common.h b/level_3/iki_read/c/common.h index e887b2b..87c3732 100644 --- a/level_3/iki_read/c/common.h +++ b/level_3/iki_read/c/common.h @@ -192,31 +192,31 @@ extern "C" { #define iki_read_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \ \ - macro_f_console_parameter_t_initialize2(iki_read_short_at_s.string, iki_read_long_at_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(iki_read_short_content_s.string, iki_read_long_content_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(iki_read_short_line_s.string, iki_read_long_line_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(iki_read_short_literal_s.string, iki_read_long_literal_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(iki_read_short_name_s.string, iki_read_long_name_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(iki_read_short_object_s.string, iki_read_long_object_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(iki_read_short_reassign_s.string, iki_read_long_reassign_s.string, 0, 3, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(iki_read_short_replace_s.string, iki_read_long_replace_s.string, 0, 2, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(iki_read_short_substitute_s.string, iki_read_long_substitute_s.string, 0, 3, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(iki_read_short_total_s.string, iki_read_long_total_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(iki_read_short_whole_s.string, iki_read_long_whole_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(iki_read_short_wrap_s.string, iki_read_long_wrap_s.string, 0, 3, f_console_type_normal_e), \ + macro_f_console_parameter_t_initialize2(iki_read_short_at_s.string, iki_read_long_at_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(iki_read_short_content_s.string, iki_read_long_content_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(iki_read_short_line_s.string, iki_read_long_line_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(iki_read_short_literal_s.string, iki_read_long_literal_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(iki_read_short_name_s.string, iki_read_long_name_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(iki_read_short_object_s.string, iki_read_long_object_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(iki_read_short_reassign_s.string, iki_read_long_reassign_s.string, 0, 3, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(iki_read_short_replace_s.string, iki_read_long_replace_s.string, 0, 2, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(iki_read_short_substitute_s.string, iki_read_long_substitute_s.string, 0, 3, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(iki_read_short_total_s.string, iki_read_long_total_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(iki_read_short_whole_s.string, iki_read_long_whole_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(iki_read_short_wrap_s.string, iki_read_long_wrap_s.string, 0, 3, f_console_flag_normal_e), \ } #define iki_read_total_parameters_d 24 diff --git a/level_3/iki_read/c/print.c b/level_3/iki_read/c/print.c index ee85919..ff17c23 100644 --- a/level_3/iki_read/c/print.c +++ b/level_3/iki_read/c/print.c @@ -52,24 +52,24 @@ extern "C" { f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, iki_read_short_at_s, iki_read_long_at_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select variable at this numeric index."); - fll_program_print_help_option(print, iki_read_short_line_s, iki_read_long_line_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the variables at the given line within the file."); - fll_program_print_help_option(print, iki_read_short_name_s, iki_read_long_name_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select variables with this name."); - fll_program_print_help_option(print, iki_read_short_whole_s, iki_read_long_whole_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print all of the data instead of just the IKI variable data."); + fll_program_print_help_option(print, iki_read_short_at_s, iki_read_long_at_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select variable at this numeric index."); + fll_program_print_help_option(print, iki_read_short_line_s, iki_read_long_line_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print only the variables at the given line within the file."); + fll_program_print_help_option(print, iki_read_short_name_s, iki_read_long_name_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Select variables with this name."); + fll_program_print_help_option(print, iki_read_short_whole_s, iki_read_long_whole_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Print all of the data instead of just the IKI variable data."); f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, iki_read_short_content_s, iki_read_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print the variable value (aka: content) (default)"); - fll_program_print_help_option(print, iki_read_short_literal_s, iki_read_long_literal_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print the entire variable (aka: object, content, and syntax)."); - fll_program_print_help_option(print, iki_read_short_object_s, iki_read_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the variable name (aka: object)."); - fll_program_print_help_option(print, iki_read_short_total_s, iki_read_long_total_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of variables."); + fll_program_print_help_option(print, iki_read_short_content_s, iki_read_long_content_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Print the variable value (aka: content) (default)"); + fll_program_print_help_option(print, iki_read_short_literal_s, iki_read_long_literal_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Print the entire variable (aka: object, content, and syntax)."); + fll_program_print_help_option(print, iki_read_short_object_s, iki_read_long_object_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the variable name (aka: object)."); + fll_program_print_help_option(print, iki_read_short_total_s, iki_read_long_total_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print the total number of variables."); f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, iki_read_short_reassign_s, iki_read_long_reassign_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Re-assign the variable for the given name and matching content value with the given string."); - fll_program_print_help_option(print, iki_read_short_replace_s, iki_read_long_replace_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Simple substitution, replacing the variable for the given name with the given string."); - fll_program_print_help_option(print, iki_read_short_substitute_s, iki_read_long_substitute_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Substitute the variable for the given name and matching content value with the given string."); - fll_program_print_help_option(print, iki_read_short_wrap_s, iki_read_long_wrap_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Prepend and append strings for the given name."); + fll_program_print_help_option(print, iki_read_short_reassign_s, iki_read_long_reassign_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Re-assign the variable for the given name and matching content value with the given string."); + fll_program_print_help_option(print, iki_read_short_replace_s, iki_read_long_replace_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Simple substitution, replacing the variable for the given name with the given string."); + fll_program_print_help_option(print, iki_read_short_substitute_s, iki_read_long_substitute_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Substitute the variable for the given name and matching content value with the given string."); + fll_program_print_help_option(print, iki_read_short_wrap_s, iki_read_long_wrap_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Prepend and append strings for the given name."); f_print_dynamic_raw(f_string_eol_s, print.to); f_print_dynamic_raw(f_string_eol_s, print.to); @@ -79,7 +79,7 @@ extern "C" { fl_print_format("%r %[Notes:%]%r", print.to, f_string_eol_s, print.set->important, print.set->important, f_string_eol_s); fl_print_format(" This program will find and print variables, vocabularies, or content following the IKI standard, without focusing on any particular vocabulary specification.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The %[%r%r%] option requires 2 additional parameters:", print.to, print.set->notable, f_console_symbol_long_enable_s, iki_read_long_replace_s, print.set->notable); + fl_print_format(" The %[%r%r%] option requires 2 additional parameters:", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_replace_s, print.set->notable); fl_print_format(" %[<%]%r%[>%]", print.to, print.set->notable, print.set->notable, iki_read_substitution_vocabulary_s, print.set->notable, print.set->notable); fl_print_format(" %[<%]%r%[>%].%r", print.to, print.set->notable, print.set->notable, iki_read_substitution_with_s, print.set->notable, print.set->notable, f_string_eol_s); @@ -88,8 +88,8 @@ extern "C" { fl_print_format(" The vocabulary is case-sensitive and must exactly match.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The %[%r%r%] and the", print.to, print.set->notable, f_console_symbol_long_enable_s, iki_read_long_reassign_s, print.set->notable); - fl_print_format(" %[%r%r%] options require 3 additional parameters:", print.to, print.set->notable, f_console_symbol_long_enable_s, iki_read_long_substitute_s, print.set->notable); + fl_print_format(" The %[%r%r%] and the", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_reassign_s, print.set->notable); + fl_print_format(" %[%r%r%] options require 3 additional parameters:", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_substitute_s, print.set->notable); fl_print_format(" %[<%]%r%[>%]", print.to, print.set->notable, print.set->notable, iki_read_substitution_vocabulary_s, print.set->notable, print.set->notable); fl_print_format(" %[<%]%r%[>%]", print.to, print.set->notable, print.set->notable, iki_read_substitution_replace_s, print.set->notable, print.set->notable); fl_print_format(" %[<%]%r%[>%].%r", print.to, print.set->notable, print.set->notable, iki_read_substitution_with_s, print.set->notable, print.set->notable, f_string_eol_s); @@ -100,7 +100,7 @@ extern "C" { fl_print_format(" The vocabulary and replacement are case-sensitive and must exactly match.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The %[%r%r%] option requires 3 additional parameters:", print.to, print.set->notable, f_console_symbol_long_enable_s, iki_read_long_wrap_s, print.set->notable); + fl_print_format(" The %[%r%r%] option requires 3 additional parameters:", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_wrap_s, print.set->notable); fl_print_format(" %[<%]%r%[>%]", print.to, print.set->notable, print.set->notable, iki_read_substitution_vocabulary_s, print.set->notable, print.set->notable); fl_print_format(" %[<%]%r%[>%]", print.to, print.set->notable, print.set->notable, iki_read_substitution_before_s, print.set->notable, print.set->notable); fl_print_format(" %[<%]%r%[>%].%r", print.to, print.set->notable, print.set->notable, iki_read_substitution_after_s, print.set->notable, print.set->notable, f_string_eol_s); @@ -111,17 +111,17 @@ extern "C" { fl_print_format(" The vocabulary is case-sensitive and must exactly match.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" The difference between %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, iki_read_long_replace_s, print.set->notable); - fl_print_format(" and %[%r%r%] is that the", print.to, print.set->notable, f_console_symbol_long_enable_s, iki_read_long_substitute_s, print.set->notable); - fl_print_format(" %[%r%r%] option substitutes all matching vocabulary names and the", print.to, print.set->notable, f_console_symbol_long_enable_s, iki_read_long_replace_s, print.set->notable); - fl_print_format(" %[%r%r%] option substitutes all matching vocabulary names that must also have the given matching content.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, iki_read_long_substitute_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" The difference between %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_replace_s, print.set->notable); + fl_print_format(" and %[%r%r%] is that the", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_substitute_s, print.set->notable); + fl_print_format(" %[%r%r%] option substitutes all matching vocabulary names and the", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_replace_s, print.set->notable); + fl_print_format(" %[%r%r%] option substitutes all matching vocabulary names that must also have the given matching content.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_substitute_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" The %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, iki_read_long_reassign_s, print.set->notable); - fl_print_format(" option is identical to the %[%r%r%] option", print.to, print.set->notable, f_console_symbol_long_enable_s, iki_read_long_substitute_s, print.set->notable); - fl_print_format(" except that the %[%r%r%] option is ignored (not applied).%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, iki_read_long_wrap_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" The %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_reassign_s, print.set->notable); + fl_print_format(" option is identical to the %[%r%r%] option", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_substitute_s, print.set->notable); + fl_print_format(" except that the %[%r%r%] option is ignored (not applied).%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_wrap_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" The %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, iki_read_long_substitute_s, print.set->notable); - fl_print_format(" option takes priority over the %[%r%r%] option when matching the same variable.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, iki_read_long_replace_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" The %[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_substitute_s, print.set->notable); + fl_print_format(" option takes priority over the %[%r%r%] option when matching the same variable.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_read_long_replace_s, print.set->notable, f_string_eol_s, f_string_eol_s); fl_print_format(" The default behavior is to only display content portion of the IKI variable.%r", print.to, f_string_eol_s); diff --git a/level_3/iki_read/c/private-read.c b/level_3/iki_read/c/private-read.c index b25f2c6..89eea4a 100644 --- a/level_3/iki_read/c/private-read.c +++ b/level_3/iki_read/c/private-read.c @@ -408,7 +408,7 @@ extern "C" { setting->buffer.string[setting->data.delimits.array[i]] = f_iki_syntax_placeholder_s.string[0]; } // for - if (main->parameters.array[iki_read_parameter_name_e].result == f_console_result_additional_e) { + if (main->parameters.array[iki_read_parameter_name_e].result & f_console_result_value_e) { f_string_dynamic_t name = f_string_dynamic_t_initialize; f_array_length_t index = 0; @@ -462,7 +462,7 @@ extern "C" { } // If the "at" position is within the actual total, then the total at the given position is 1, otherwise is 0. - if (main->parameters.array[iki_read_parameter_at_e].result == f_console_result_additional_e) { + if (main->parameters.array[iki_read_parameter_at_e].result & f_console_result_value_e) { if (setting->at < total) { total = 1; } diff --git a/level_3/iki_write/c/common.c b/level_3/iki_write/c/common.c index d1e1704..74b6b67 100644 --- a/level_3/iki_write/c/common.c +++ b/level_3/iki_write/c/common.c @@ -85,14 +85,14 @@ extern "C" { } } - if (main->parameters.array[iki_write_parameter_line_first_no_e].result == f_console_result_found_e) { + if (main->parameters.array[iki_write_parameter_line_first_no_e].result & f_console_result_found_e) { setting->line_first = f_string_empty_s; } else { setting->line_first = f_string_eol_s; } - if (main->parameters.array[iki_write_parameter_line_last_no_e].result == f_console_result_found_e) { + if (main->parameters.array[iki_write_parameter_line_last_no_e].result & f_console_result_found_e) { setting->line_last = f_string_empty_s; } else { @@ -116,13 +116,13 @@ extern "C" { } } - if (main->parameters.array[iki_write_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[iki_write_parameter_help_e].result & f_console_result_found_e) { setting->flag |= iki_write_main_flag_help_e; return; } - if (main->parameters.array[iki_write_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[iki_write_parameter_version_e].result & f_console_result_found_e) { setting->flag |= iki_write_main_flag_version_e; return; @@ -133,12 +133,12 @@ extern "C" { main->output.to.stream = F_type_output_d; main->output.to.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d; - if (main->parameters.array[iki_write_parameter_file_e].result == f_console_result_additional_e && main->parameters.array[iki_write_parameter_file_e].values.used) { + if (main->parameters.array[iki_write_parameter_file_e].result & f_console_result_value_e && main->parameters.array[iki_write_parameter_file_e].values.used) { if (main->parameters.array[iki_write_parameter_file_e].values.used > 1) { setting->status = F_status_set_error(F_parameter); iki_write_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_must_specify_once(main->error, f_console_symbol_long_enable_s, iki_write_long_file_s); + fll_program_print_error_parameter_must_specify_once(main->error, f_console_symbol_long_normal_s, iki_write_long_file_s); iki_write_print_line_last_locked(setting, main->error); return; @@ -161,17 +161,17 @@ extern "C" { setting->flag |= iki_write_main_flag_file_to_e; } - else if (main->parameters.array[iki_write_parameter_file_e].result == f_console_result_found_e) { + else if (main->parameters.array[iki_write_parameter_file_e].result & f_console_result_found_e) { setting->status = F_status_set_error(F_parameter); iki_write_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_enable_s, iki_write_long_file_s); + fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, iki_write_long_file_s); iki_write_print_line_last_locked(setting, main->error); return; } - if (main->parameters.array[iki_write_parameter_object_e].result == f_console_result_additional_e) { + if (main->parameters.array[iki_write_parameter_object_e].result & f_console_result_value_e) { f_array_lengths_t * const values = &main->parameters.array[iki_write_parameter_object_e].values; setting->objects.used = 0; @@ -196,17 +196,17 @@ extern "C" { setting->flag |= iki_write_main_flag_object_e; } - else if (main->parameters.array[iki_write_parameter_object_e].result == f_console_result_found_e) { + else if (main->parameters.array[iki_write_parameter_object_e].result & f_console_result_found_e) { setting->status = F_status_set_error(F_parameter); iki_write_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_enable_s, iki_write_long_object_s); + fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, iki_write_long_object_s); iki_write_print_line_last_locked(setting, main->error); return; } - if (main->parameters.array[iki_write_parameter_content_e].result == f_console_result_additional_e) { + if (main->parameters.array[iki_write_parameter_content_e].result & f_console_result_value_e) { f_array_lengths_t * const values = &main->parameters.array[iki_write_parameter_content_e].values; setting->contents.used = 0; @@ -231,11 +231,11 @@ extern "C" { setting->flag |= iki_write_main_flag_content_e; } - else if (main->parameters.array[iki_write_parameter_content_e].result == f_console_result_found_e) { + else if (main->parameters.array[iki_write_parameter_content_e].result & f_console_result_found_e) { setting->status = F_status_set_error(F_parameter); iki_write_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_enable_s, iki_write_long_content_s); + fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, iki_write_long_content_s); iki_write_print_line_last_locked(setting, main->error); return; @@ -253,14 +253,14 @@ extern "C" { setting->quote = f_iki_syntax_quote_double_s; - if (main->parameters.array[iki_write_parameter_double_e].result == f_console_result_found_e) { - if (main->parameters.array[iki_write_parameter_single_e].result == f_console_result_found_e) { + if (main->parameters.array[iki_write_parameter_double_e].result & f_console_result_found_e) { + if (main->parameters.array[iki_write_parameter_single_e].result & f_console_result_found_e) { if (main->parameters.array[iki_write_parameter_double_e].location < main->parameters.array[iki_write_parameter_single_e].location) { setting->quote = f_iki_syntax_quote_single_s; } } } - else if (main->parameters.array[iki_write_parameter_single_e].result == f_console_result_found_e) { + else if (main->parameters.array[iki_write_parameter_single_e].result & f_console_result_found_e) { setting->quote = f_iki_syntax_quote_single_s; } } diff --git a/level_3/iki_write/c/common.h b/level_3/iki_write/c/common.h index af62de9..ea6d1d2 100644 --- a/level_3/iki_write/c/common.h +++ b/level_3/iki_write/c/common.h @@ -140,24 +140,24 @@ extern "C" { #define iki_write_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \ \ - macro_f_console_parameter_t_initialize2(iki_write_short_file_s.string, iki_write_long_file_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(iki_write_short_content_s.string, iki_write_long_content_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(iki_write_short_double_s.string, iki_write_long_double_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(iki_write_short_object_s.string, iki_write_long_object_s.string, 0, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(iki_write_short_single_s.string, iki_write_long_single_s.string, 0, 0, f_console_type_normal_e), \ + macro_f_console_parameter_t_initialize2(iki_write_short_file_s.string, iki_write_long_file_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(iki_write_short_content_s.string, iki_write_long_content_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(iki_write_short_double_s.string, iki_write_long_double_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(iki_write_short_object_s.string, iki_write_long_object_s.string, 0, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(iki_write_short_single_s.string, iki_write_long_single_s.string, 0, 0, f_console_flag_normal_e), \ } #define iki_write_total_parameters_d 17 diff --git a/level_3/iki_write/c/print.c b/level_3/iki_write/c/print.c index ca2cb3b..63784f1 100644 --- a/level_3/iki_write/c/print.c +++ b/level_3/iki_write/c/print.c @@ -51,9 +51,9 @@ extern "C" { f_file_stream_lock(print.to); fl_print_format("%[%QNo main provided, either pipe the main data or use the '%]", print.to, print.set->error, print.prefix, print.set->error); - fl_print_format("%[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, iki_write_long_object_s, print.set->notable); + fl_print_format("%[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_write_long_object_s, print.set->notable); fl_print_format("%[' and the '%]", print.to, print.set->error, print.set->error); - fl_print_format("%[%r%r%]", print.to, print.set->notable, f_console_symbol_long_enable_s, iki_write_long_content_s, print.set->notable); + fl_print_format("%[%r%r%]", print.to, print.set->notable, f_console_symbol_long_normal_s, iki_write_long_content_s, print.set->notable); fl_print_format("%[' parameters.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s); f_file_stream_unlock(print.to); @@ -96,24 +96,24 @@ extern "C" { fll_program_print_help_header(print, iki_write_program_name_long_s, iki_write_program_version_s); - fll_program_print_help_option(print, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); - fll_program_print_help_option(print, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); - fll_program_print_help_option(print, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds."); - fll_program_print_help_option(print, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not print using color."); - fll_program_print_help_option(print, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, silencing most output."); - fll_program_print_help_option(print, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity, using only error output."); - fll_program_print_help_option(print, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal."); - fll_program_print_help_option(print, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output."); - fll_program_print_help_option(print, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, significantly increasing verbosity beyond normal output."); - fll_program_print_help_option(print, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); + fll_program_print_help_option(print, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print this help message."); + fll_program_print_help_option(print, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Output using colors that show up better on dark backgrounds."); + fll_program_print_help_option(print, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Output using colors that show up better on light backgrounds."); + fll_program_print_help_option(print, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "Do not print using color."); + fll_program_print_help_option(print, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Decrease verbosity, silencing most output."); + fll_program_print_help_option(print, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Decrease verbosity, using only error output."); + fll_program_print_help_option(print, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Set verbosity to normal."); + fll_program_print_help_option(print, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Increase verbosity beyond normal output."); + fll_program_print_help_option(print, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Enable debugging, significantly increasing verbosity beyond normal output."); + fll_program_print_help_option(print, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Print only the version number."); f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, iki_write_short_file_s, iki_write_long_file_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send data to."); - fll_program_print_help_option(print, iki_write_short_content_s, iki_write_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to write."); - fll_program_print_help_option(print, iki_write_short_double_s, iki_write_long_double_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); - fll_program_print_help_option(print, iki_write_short_object_s, iki_write_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to write."); - fll_program_print_help_option(print, iki_write_short_single_s, iki_write_long_single_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); + fll_program_print_help_option(print, iki_write_short_file_s, iki_write_long_file_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Specify a file to send data to."); + fll_program_print_help_option(print, iki_write_short_content_s, iki_write_long_content_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "The Content to write."); + fll_program_print_help_option(print, iki_write_short_double_s, iki_write_long_double_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use double quotes (default)."); + fll_program_print_help_option(print, iki_write_short_object_s, iki_write_long_object_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " The Object to write."); + fll_program_print_help_option(print, iki_write_short_single_s, iki_write_long_single_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use single quotes."); f_print_dynamic_raw(f_string_eol_s, print.to); f_print_dynamic_raw(f_string_eol_s, print.to); diff --git a/level_3/status_code/c/common.c b/level_3/status_code/c/common.c index a062703..1d23a13 100644 --- a/level_3/status_code/c/common.c +++ b/level_3/status_code/c/common.c @@ -85,14 +85,14 @@ extern "C" { } } - if (main->parameters.array[status_code_parameter_line_first_no_e].result == f_console_result_found_e) { + if (main->parameters.array[status_code_parameter_line_first_no_e].result & f_console_result_found_e) { setting->line_first = f_string_empty_s; } else { setting->line_first = f_string_eol_s; } - if (main->parameters.array[status_code_parameter_line_last_no_e].result == f_console_result_found_e) { + if (main->parameters.array[status_code_parameter_line_last_no_e].result & f_console_result_found_e) { setting->line_last = f_string_empty_s; } else { @@ -116,32 +116,32 @@ extern "C" { } } - if (main->parameters.array[status_code_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[status_code_parameter_help_e].result & f_console_result_found_e) { setting->flag |= status_code_main_flag_help_e; return; } - if (main->parameters.array[status_code_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[status_code_parameter_version_e].result & f_console_result_found_e) { setting->flag |= status_code_main_flag_version_e; return; } } - if (main->parameters.array[status_code_parameter_error_e].result == f_console_result_found_e) { + if (main->parameters.array[status_code_parameter_error_e].result & f_console_result_found_e) { setting->flag |= status_code_main_flag_error_e; } - if (main->parameters.array[status_code_parameter_fine_e].result == f_console_result_found_e) { + if (main->parameters.array[status_code_parameter_fine_e].result & f_console_result_found_e) { setting->flag |= status_code_main_flag_fine_e; } - if (main->parameters.array[status_code_parameter_warning_e].result == f_console_result_found_e) { + if (main->parameters.array[status_code_parameter_warning_e].result & f_console_result_found_e) { setting->flag |= status_code_main_flag_warning_e; } - if (main->parameters.array[status_code_parameter_number_e].result == f_console_result_found_e) { + if (main->parameters.array[status_code_parameter_number_e].result & f_console_result_found_e) { setting->flag |= status_code_main_flag_number_e; } @@ -162,7 +162,7 @@ extern "C" { setting->status = F_status_set_error(F_parameter); status_code_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, status_code_long_error_s, status_code_long_fine_s); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, status_code_long_error_s, status_code_long_fine_s); status_code_print_line_last_locked(setting, main->error); return; @@ -172,7 +172,7 @@ extern "C" { setting->status = F_status_set_error(F_parameter); status_code_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_enable_s, f_console_symbol_long_enable_s, status_code_long_warning_s, status_code_long_fine_s); + fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, status_code_long_warning_s, status_code_long_fine_s); status_code_print_line_last_locked(setting, main->error); return; diff --git a/level_3/status_code/c/common.h b/level_3/status_code/c/common.h index 2fc55de..4f2c414 100644 --- a/level_3/status_code/c/common.h +++ b/level_3/status_code/c/common.h @@ -169,23 +169,23 @@ extern "C" { #define status_code_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \ \ - macro_f_console_parameter_t_initialize2(status_code_short_fine_s.string, status_code_long_fine_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(status_code_short_warning_s.string, status_code_long_warning_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(status_code_short_error_s.string, status_code_long_error_s.string, 0, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize2(status_code_short_number_s.string, status_code_long_number_s.string, 0, 0, f_console_type_normal_e), \ + macro_f_console_parameter_t_initialize2(status_code_short_fine_s.string, status_code_long_fine_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(status_code_short_warning_s.string, status_code_long_warning_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(status_code_short_error_s.string, status_code_long_error_s.string, 0, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize2(status_code_short_number_s.string, status_code_long_number_s.string, 0, 0, f_console_flag_normal_e), \ } #define status_code_total_parameters_d 16 diff --git a/level_3/status_code/c/print.c b/level_3/status_code/c/print.c index 0fd0a03..4b1c474 100644 --- a/level_3/status_code/c/print.c +++ b/level_3/status_code/c/print.c @@ -35,11 +35,11 @@ extern "C" { f_file_stream_lock(print.to); fl_print_format("%[%QCannot specify the '%]", print.to, print.context, print.prefix, print.context); - fl_print_format("%[%r%r%]", print.to, print.notable, f_console_symbol_long_enable_s, status_code_long_error_s, print.notable); + fl_print_format("%[%r%r%]", print.to, print.notable, f_console_symbol_long_normal_s, status_code_long_error_s, print.notable); fl_print_format("%[' parameter with the '%]", print.to, print.context, print.context); - fl_print_format("%[%r%r%]", print.to, print.notable, f_console_symbol_long_enable_s, status_code_long_warning_s, print.notable); + fl_print_format("%[%r%r%]", print.to, print.notable, f_console_symbol_long_normal_s, status_code_long_warning_s, print.notable); fl_print_format("%[' parameter when not also specifying the '%]", print.to, print.context, print.context); - fl_print_format("%[%r%r%]", print.to, print.notable, f_console_symbol_long_enable_s, status_code_long_number_s, print.notable); + fl_print_format("%[%r%r%]", print.to, print.notable, f_console_symbol_long_normal_s, status_code_long_number_s, print.notable); fl_print_format("%[' parameter.%]%r", print.to, print.context, print.context, f_string_eol_s); f_file_stream_unlock(print.to); @@ -97,10 +97,10 @@ extern "C" { f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, status_code_short_fine_s, status_code_long_fine_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true or F_false if status code is neither an error nor a warning or print number with neither the error code nor the warning code bits set."); - fll_program_print_help_option(print, status_code_short_warning_s, status_code_long_warning_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print F_true or F_false if status code is a warning or print number with warning code bit set."); - fll_program_print_help_option(print, status_code_short_error_s, status_code_long_error_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true or F_false if status code is an error or print number with error code bit set."); - fll_program_print_help_option(print, status_code_short_number_s, status_code_long_number_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Convert status code name to number."); + fll_program_print_help_option(print, status_code_short_fine_s, status_code_long_fine_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print F_true or F_false if status code is neither an error nor a warning or print number with neither the error code nor the warning code bits set."); + fll_program_print_help_option(print, status_code_short_warning_s, status_code_long_warning_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Print F_true or F_false if status code is a warning or print number with warning code bit set."); + fll_program_print_help_option(print, status_code_short_error_s, status_code_long_error_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print F_true or F_false if status code is an error or print number with error code bit set."); + fll_program_print_help_option(print, status_code_short_number_s, status_code_long_number_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Convert status code name to number."); f_print_dynamic_raw(f_string_eol_s, print.to); f_print_dynamic_raw(f_string_eol_s, print.to); diff --git a/level_3/utf8/c/common.c b/level_3/utf8/c/common.c index ecc7b81..a6e0cca 100644 --- a/level_3/utf8/c/common.c +++ b/level_3/utf8/c/common.c @@ -124,14 +124,14 @@ extern "C" { } } - if (main->parameters.array[utf8_parameter_line_first_no_e].result == f_console_result_found_e) { + if (main->parameters.array[utf8_parameter_line_first_no_e].result & f_console_result_found_e) { setting->line_first = f_string_empty_s; } else { setting->line_first = f_string_eol_s; } - if (main->parameters.array[utf8_parameter_line_last_no_e].result == f_console_result_found_e) { + if (main->parameters.array[utf8_parameter_line_last_no_e].result & f_console_result_found_e) { setting->line_last = f_string_empty_s; } else { @@ -155,13 +155,13 @@ extern "C" { } } - if (main->parameters.array[utf8_parameter_help_e].result == f_console_result_found_e) { + if (main->parameters.array[utf8_parameter_help_e].result & f_console_result_found_e) { setting->flag |= utf8_main_flag_help_e; return; } - if (main->parameters.array[utf8_parameter_version_e].result == f_console_result_found_e) { + if (main->parameters.array[utf8_parameter_version_e].result & f_console_result_found_e) { setting->flag |= utf8_main_flag_version_e; return; @@ -252,7 +252,7 @@ extern "C" { } // --to_width may be specified with --to_combining. - if (main->parameters.array[utf8_parameter_to_width_e].result == f_console_result_found_e) { + if (main->parameters.array[utf8_parameter_to_width_e].result & f_console_result_found_e) { setting->mode |= utf8_mode_to_width_e; } @@ -268,7 +268,7 @@ extern "C" { } // --to_width may be specified with --to_combining. - if (main->parameters.array[utf8_parameter_to_combining_e].result == f_console_result_found_e) { + if (main->parameters.array[utf8_parameter_to_combining_e].result & f_console_result_found_e) { setting->mode |= utf8_mode_to_combining_e; } @@ -277,7 +277,7 @@ extern "C" { } } - if (main->parameters.array[utf8_parameter_to_file_e].result == f_console_result_additional_e) { + if (main->parameters.array[utf8_parameter_to_file_e].result & f_console_result_value_e) { if (main->parameters.array[utf8_parameter_to_file_e].values.used > 1) { setting->status = F_status_set_error(F_parameter); @@ -330,11 +330,11 @@ extern "C" { return; } } - else if (main->parameters.array[utf8_parameter_to_file_e].result == f_console_result_found_e) { + else if (main->parameters.array[utf8_parameter_to_file_e].result & f_console_result_found_e) { setting->status = F_status_set_error(F_parameter); utf8_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_enable_s, utf8_long_to_file_s); + fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, utf8_long_to_file_s); utf8_print_line_last_locked(setting, main->error); return; @@ -347,7 +347,7 @@ extern "C" { } } - if (main->parameters.array[utf8_parameter_from_file_e].result == f_console_result_additional_e) { + if (main->parameters.array[utf8_parameter_from_file_e].result & f_console_result_value_e) { setting->path_files_from.used = 0; setting->status = f_string_dynamics_increase_by(main->parameters.array[utf8_parameter_from_file_e].values.used, &setting->path_files_from); @@ -403,11 +403,11 @@ extern "C" { setting->flag |= utf8_main_flag_file_from_e; } - else if (main->parameters.array[utf8_parameter_from_file_e].result == f_console_result_found_e) { + else if (main->parameters.array[utf8_parameter_from_file_e].result & f_console_result_found_e) { setting->status = F_status_set_error(F_parameter); utf8_print_line_first_locked(setting, main->error); - fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_enable_s, utf8_long_from_file_s); + fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, utf8_long_from_file_s); utf8_print_line_last_locked(setting, main->error); return; @@ -440,7 +440,7 @@ extern "C" { } // for } - if (main->parameters.array[utf8_parameter_from_file_e].result == f_console_result_none_e && !((main->pipe & fll_program_data_pipe_input_e) || main->parameters.remaining.used)) { + if (!(main->parameters.array[utf8_parameter_from_file_e].result & f_console_result_found_e) && !((main->pipe & fll_program_data_pipe_input_e) || main->parameters.remaining.used)) { setting->status = F_status_set_error(F_parameter); utf8_print_line_first_locked(setting, main->error); @@ -451,7 +451,7 @@ extern "C" { } if (!(setting->mode & utf8_mode_to_bytesequence_e)) { - if (main->parameters.array[utf8_parameter_separate_e].result == f_console_result_found_e || main->parameters.array[utf8_parameter_headers_e].result == f_console_result_found_e) { + if ((main->parameters.array[utf8_parameter_separate_e].result & f_console_result_found_e) || (main->parameters.array[utf8_parameter_headers_e].result & f_console_result_found_e)) { setting->prepend = utf8_string_prepend_padding_s; setting->append = f_string_eol_s; } @@ -460,15 +460,15 @@ extern "C" { } } - if (main->parameters.array[utf8_parameter_headers_e].result == f_console_result_found_e) { + if (main->parameters.array[utf8_parameter_headers_e].result & f_console_result_found_e) { setting->flag |= utf8_main_flag_header_e; } - if (main->parameters.array[utf8_parameter_separate_e].result == f_console_result_found_e) { + if (main->parameters.array[utf8_parameter_separate_e].result & f_console_result_found_e) { setting->flag |= utf8_main_flag_separate_e; } - if (main->parameters.array[utf8_parameter_strip_invalid_e].result == f_console_result_found_e) { + if (main->parameters.array[utf8_parameter_strip_invalid_e].result & f_console_result_found_e) { setting->flag |= utf8_main_flag_strip_invalid_e; } diff --git a/level_3/utf8/c/common.h b/level_3/utf8/c/common.h index c7a9c74..a0d6e83 100644 --- a/level_3/utf8/c/common.h +++ b/level_3/utf8/c/common.h @@ -270,31 +270,31 @@ extern "C" { #define utf8_console_parameter_t_initialize \ { \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_type_inverse_e), \ - macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_type_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \ \ - macro_f_console_parameter_t_initialize4(utf8_short_from_bytesequence_s, utf8_long_from_bytesequence_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(utf8_short_from_codepoint_s, utf8_long_from_codepoint_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(utf8_short_from_file_s, utf8_long_from_file_s, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(utf8_short_headers_s, utf8_long_headers_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(utf8_short_separate_s, utf8_long_separate_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(utf8_short_strip_invalid_s, utf8_long_strip_invalid_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(utf8_short_to_bytesequence_s, utf8_long_to_bytesequence_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(utf8_short_to_codepoint_s, utf8_long_to_codepoint_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(utf8_short_to_combining_s, utf8_long_to_combining_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(utf8_short_to_file_s, utf8_long_to_file_s, 1, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(utf8_short_to_width_s, utf8_long_to_width_s, 0, f_console_type_normal_e), \ - macro_f_console_parameter_t_initialize4(utf8_short_verify_s, utf8_long_verify_s, 0, f_console_type_normal_e), \ + macro_f_console_parameter_t_initialize4(utf8_short_from_bytesequence_s, utf8_long_from_bytesequence_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(utf8_short_from_codepoint_s, utf8_long_from_codepoint_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(utf8_short_from_file_s, utf8_long_from_file_s, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(utf8_short_headers_s, utf8_long_headers_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(utf8_short_separate_s, utf8_long_separate_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(utf8_short_strip_invalid_s, utf8_long_strip_invalid_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(utf8_short_to_bytesequence_s, utf8_long_to_bytesequence_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(utf8_short_to_codepoint_s, utf8_long_to_codepoint_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(utf8_short_to_combining_s, utf8_long_to_combining_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(utf8_short_to_file_s, utf8_long_to_file_s, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(utf8_short_to_width_s, utf8_long_to_width_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize4(utf8_short_verify_s, utf8_long_verify_s, 0, f_console_flag_normal_e), \ } #define utf8_total_parameters_d 24 diff --git a/level_3/utf8/c/print.c b/level_3/utf8/c/print.c index 7d791dd..e0b3fa8 100644 --- a/level_3/utf8/c/print.c +++ b/level_3/utf8/c/print.c @@ -300,24 +300,24 @@ extern "C" { f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, utf8_short_from_bytesequence_s, utf8_long_from_bytesequence_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The expected input format is byte sequence (character data)."); - fll_program_print_help_option(print, utf8_short_from_codepoint_s, utf8_long_from_codepoint_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The expected input format is codepoint (such as U+0000)."); - fll_program_print_help_option(print, utf8_short_from_file_s, utf8_long_from_file_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use the given print.to as the input source."); + fll_program_print_help_option(print, utf8_short_from_bytesequence_s, utf8_long_from_bytesequence_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "The expected input format is byte sequence (character data)."); + fll_program_print_help_option(print, utf8_short_from_codepoint_s, utf8_long_from_codepoint_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " The expected input format is codepoint (such as U+0000)."); + fll_program_print_help_option(print, utf8_short_from_file_s, utf8_long_from_file_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use the given print.to as the input source."); f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, utf8_short_to_bytesequence_s, utf8_long_to_bytesequence_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The print.to format is byte sequence (character data)."); - fll_program_print_help_option(print, utf8_short_to_codepoint_s, utf8_long_to_codepoint_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The print.to format is codepoint (such as U+0000)."); - fll_program_print_help_option(print, utf8_short_to_combining_s, utf8_long_to_combining_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The print.to format is to print whether or not character is combining or not."); - fll_program_print_help_option(print, utf8_short_to_file_s, utf8_long_to_file_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use the given print.to as the print.to destination."); - fll_program_print_help_option(print, utf8_short_to_width_s, utf8_long_to_width_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The print.to format is to print the width of a character (either 0, 1, or 2)."); + fll_program_print_help_option(print, utf8_short_to_bytesequence_s, utf8_long_to_bytesequence_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "The print.to format is byte sequence (character data)."); + fll_program_print_help_option(print, utf8_short_to_codepoint_s, utf8_long_to_codepoint_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " The print.to format is codepoint (such as U+0000)."); + fll_program_print_help_option(print, utf8_short_to_combining_s, utf8_long_to_combining_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " The print.to format is to print whether or not character is combining or not."); + fll_program_print_help_option(print, utf8_short_to_file_s, utf8_long_to_file_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use the given print.to as the print.to destination."); + fll_program_print_help_option(print, utf8_short_to_width_s, utf8_long_to_width_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " The print.to format is to print the width of a character (either 0, 1, or 2)."); f_print_dynamic_raw(f_string_eol_s, print.to); - fll_program_print_help_option(print, utf8_short_headers_s, utf8_long_headers_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print headers for each section (pipe, file, or parameter)."); - fll_program_print_help_option(print, utf8_short_separate_s, utf8_long_separate_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Separate characters by newlines (implied when printing headers)."); - fll_program_print_help_option(print, utf8_short_strip_invalid_s, utf8_long_strip_invalid_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Strip invalid Unicode characters (do not print invalid sequences)."); - fll_program_print_help_option(print, utf8_short_verify_s, utf8_long_verify_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Only perform verification of valid sequences."); + fll_program_print_help_option(print, utf8_short_headers_s, utf8_long_headers_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print headers for each section (pipe, file, or parameter)."); + fll_program_print_help_option(print, utf8_short_separate_s, utf8_long_separate_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Separate characters by newlines (implied when printing headers)."); + fll_program_print_help_option(print, utf8_short_strip_invalid_s, utf8_long_strip_invalid_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Strip invalid Unicode characters (do not print invalid sequences)."); + fll_program_print_help_option(print, utf8_short_verify_s, utf8_long_verify_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Only perform verification of valid sequences."); f_print_dynamic_raw(f_string_eol_s, print.to); f_print_dynamic_raw(f_string_eol_s, print.to); @@ -328,10 +328,10 @@ extern "C" { fl_print_format(" Multiple input sources are allowed but only a single print.to destination is allowed.%r%r", print.to, f_string_eol_s, f_string_eol_s); - fl_print_format(" When using the parameter '%[%r%r%]', no data is printed and 0 is returned if valid or 1 is returned if invalid.%r%r", print.to, print.set->notable, f_console_symbol_long_enable_s, utf8_long_verify_s, print.set->notable, f_string_eol_s, f_string_eol_s); + fl_print_format(" When using the parameter '%[%r%r%]', no data is printed and 0 is returned if valid or 1 is returned if invalid.%r%r", print.to, print.set->notable, f_console_symbol_long_normal_s, utf8_long_verify_s, print.set->notable, f_string_eol_s, f_string_eol_s); - fl_print_format(" When using the parameter '%[%r%r%]' with the parameter ", print.to, print.set->notable, f_console_symbol_long_enable_s, utf8_long_to_combining_s, print.set->notable); - fl_print_format("'%[%r%r%]', the ", print.to, print.set->notable, f_console_symbol_long_enable_s, utf8_long_to_width_s, print.set->notable); + fl_print_format(" When using the parameter '%[%r%r%]' with the parameter ", print.to, print.set->notable, f_console_symbol_long_normal_s, utf8_long_to_combining_s, print.set->notable); + fl_print_format("'%[%r%r%]', the ", print.to, print.set->notable, f_console_symbol_long_normal_s, utf8_long_to_width_s, print.set->notable); fl_print_format("'%[%r%]' character is printed to represent the combining and the digits are used to represent widths.%r", print.to, print.set->notable, utf8_string_combining_is_s, print.set->notable, f_string_eol_s); fl_print_format(" The combining characters should be considered 1-width by themselves or 0-width when combined.%r", print.to, f_string_eol_s); -- 1.8.3.1