From: Kevin Day Date: Sat, 3 Oct 2020 03:32:10 +0000 (-0500) Subject: Progress: FSS related changes and improvements to console related. X-Git-Tag: 0.5.1~47 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=29b15597d9fac2fbe81b58474998dbb1f3a77806;p=fll Progress: FSS related changes and improvements to console related. Finish/Fix the basic object write private function. It seems that I was so hasty to get this wrapped up last night that I missed quite a lot of conditions/cases and logic. I discovered a case where the FSS basic read function might b incorrect: '"\\"\\\"'. If the parts inside the single quotes are used as an object, then it should detect that there is no closing quote. The basic read is not yet fixed, but the basic write should not produce this invalid object. Minor tweaks to f_console and related console functions. The f_true and f_false are still being used in the console initialization and should no longer be. There are some has_additional settings that are set incorrectly. The console parameter locations and similar should be array locations and not string locations. --- diff --git a/level_0/f_console/c/console-common.h b/level_0/f_console/c/console-common.h index 57a7176..e5a0945 100644 --- a/level_0/f_console/c/console-common.h +++ b/level_0/f_console/c/console-common.h @@ -232,15 +232,15 @@ extern "C" { const uint8_t type; uint8_t result; - uint8_t total; + uint8_t total; // @todo locations.used could instead be used to represent the total. - f_string_length_t location; - f_string_length_t location_sub; - f_string_lengths_t locations; - f_string_lengths_t additional; + f_array_length_t location; + f_string_length_t location_sub; + f_array_lengths_t locations; + f_array_lengths_t additional; } f_console_parameter_t; - #define f_console_parameter_t_initialize(symbol_short, symbol_long, symbol_other, has_additional, type_value) { symbol_short, symbol_long, symbol_other, has_additional, type_value, f_console_result_none, 0, 0, 0, f_string_lengths_t_initialize, f_string_lengths_t_initialize } + #define f_console_parameter_t_initialize(symbol_short, symbol_long, symbol_other, has_additional, type_value) { symbol_short, symbol_long, symbol_other, has_additional, type_value, f_console_result_none, 0, 0, 0, f_array_lengths_t_initialize, f_array_lengths_t_initialize } #define f_macro_console_parameter_t_initialize(symbol_short, symbol_long, symbol_other, has_additional, type_value, result, total, location, location_sub, locations, additional) { symbol_short, symbol_long, symbol_other, has_additional, type_value, result, total, location, location_sub, locations, additional } #endif // _di_f_console_parameter_t_ diff --git a/level_0/f_console/c/console.c b/level_0/f_console/c/console.c index 451deae..5559d53 100644 --- a/level_0/f_console/c/console.c +++ b/level_0/f_console/c/console.c @@ -58,10 +58,13 @@ extern "C" { bool found = F_false; unsigned long location = 1; // Parameter 0 represents the program name so skip it. + f_string_length_t sub_location = 0; f_string_length_t increment_by = 0; - f_string_length_t string_length = 0; + f_string_length_t argument_length = 0; + f_array_length_t i = 0; + f_array_length_t additional = 0; uint8_t console_short = f_console_none; uint8_t console_long = f_console_none; @@ -78,8 +81,8 @@ extern "C" { if (needs_additional.used > 0) { i = needs_additional.array[0]; - if (parameters.parameter[i].additional.used == parameters.parameter[i].additional.size) { - f_macro_string_lengths_t_resize(status, parameters.parameter[i].additional, parameters.parameter[i].additional.size + f_console_default_allocation_step); + if (parameters.parameter[i].additional.used + 1 > parameters.parameter[i].additional.size) { + f_macro_array_lengths_t_resize(status, parameters.parameter[i].additional, parameters.parameter[i].additional.size + f_console_default_allocation_step); if (F_status_is_error(status)) { f_macro_string_lengths_t_delete_simple(needs_additional); @@ -88,8 +91,7 @@ extern "C" { } parameters.parameter[i].result = f_console_result_additional; - parameters.parameter[i].additional.array[parameters.parameter[i].additional.used] = location; - parameters.parameter[i].additional.used++; + parameters.parameter[i].additional.array[parameters.parameter[i].additional.used++] = location; needs_additional.used--; @@ -104,7 +106,7 @@ extern "C" { f_console_identify(arguments.argv[location], &result); - string_length = strnlen(arguments.argv[location], f_console_length_size); + argument_length = strnlen(arguments.argv[location], f_console_length_size); // process the current parameter. if (result == f_console_short_enable || result == f_console_short_disable) { @@ -112,11 +114,11 @@ extern "C" { sub_location = 1; } else if (result == f_console_long_enable || result == f_console_long_disable) { - increment_by = string_length; + increment_by = argument_length; sub_location = 2; } else { - increment_by = string_length; + increment_by = argument_length; sub_location = 0; } @@ -138,7 +140,7 @@ extern "C" { if (console_short != f_console_none) { // The sub_location is used on a per increment basis (such as 'tar -xcf', the '-' would have an increment of 1, therefore x, c, and f would all be three separate parameters). - while (sub_location < string_length) { + while (sub_location < argument_length) { for (i = 0; i < parameters.used; i++) { @@ -160,7 +162,7 @@ extern "C" { f_utf_character_t character_argument_utf = 0; f_utf_character_t character_console_utf = 0; - f_number_unsigned_t width_max = string_length - sub_location; + f_number_unsigned_t width_max = argument_length - sub_location; status = f_utf_char_to_character(arguments.argv[location] + sub_location, width_max, &character_argument_utf); @@ -196,7 +198,7 @@ extern "C" { continue; } - if (parameters.parameter[i].locations.used == parameters.parameter[i].locations.size) { + if (parameters.parameter[i].locations.used + 1 > parameters.parameter[i].locations.size) { f_macro_string_lengths_t_resize(status, parameters.parameter[i].locations, parameters.parameter[i].locations.size + f_console_default_allocation_step); if (F_status_is_error(status)) { @@ -205,8 +207,7 @@ extern "C" { } } - parameters.parameter[i].locations.array[parameters.parameter[i].locations.used] = location; - parameters.parameter[i].locations.used++; + parameters.parameter[i].locations.array[parameters.parameter[i].locations.used++] = location; parameters.parameter[i].result = f_console_result_found; parameters.parameter[i].location = location; @@ -227,9 +228,8 @@ extern "C" { } } - for (f_array_length_t additional = 0; additional < parameters.parameter[i].has_additional; additional++) { - needs_additional.array[needs_additional.used] = i; - needs_additional.used++; + for (additional = 0; additional < parameters.parameter[i].has_additional; additional++) { + needs_additional.array[needs_additional.used++] = i; } // for } @@ -248,7 +248,7 @@ extern "C" { if (!parameters.parameter[i].symbol_other) continue; - if (strncmp(arguments.argv[location], parameters.parameter[i].symbol_other, string_length + 1) != 0) continue; + if (strncmp(arguments.argv[location], parameters.parameter[i].symbol_other, argument_length + 1) != 0) continue; if (parameters.parameter[i].locations.used == parameters.parameter[i].locations.size) { f_macro_string_lengths_t_resize(status, parameters.parameter[i].locations, parameters.parameter[i].locations.size + f_console_default_allocation_step); @@ -259,8 +259,7 @@ extern "C" { } } - parameters.parameter[i].locations.array[parameters.parameter[i].locations.used] = location; - parameters.parameter[i].locations.used++; + parameters.parameter[i].locations.array[parameters.parameter[i].locations.used++] = location; parameters.parameter[i].result = f_console_result_found; parameters.parameter[i].location = location; @@ -277,9 +276,8 @@ extern "C" { } } - for (f_array_length_t additional = 0; additional < parameters.parameter[i].has_additional; additional++) { - needs_additional.array[needs_additional.used] = i; - needs_additional.used++; + for (additional = 0; additional < parameters.parameter[i].has_additional; additional++) { + needs_additional.array[needs_additional.used++] = i; } // for } @@ -298,8 +296,7 @@ extern "C" { } } - remaining->array[remaining->used] = location; - remaining->used++; + remaining->array[remaining->used++] = location; } } diff --git a/level_0/f_console/c/console.h b/level_0/f_console/c/console.h index 105f232..041a1d2 100644 --- a/level_0/f_console/c/console.h +++ b/level_0/f_console/c/console.h @@ -15,6 +15,7 @@ // fll-0 includes #include +#include #include #include #include diff --git a/level_0/f_fss/c/fss_nest.h b/level_0/f_fss/c/fss_nest.h index 72262c4..2dc4f02 100644 --- a/level_0/f_fss/c/fss_nest.h +++ b/level_0/f_fss/c/fss_nest.h @@ -35,7 +35,7 @@ extern "C" { f_array_length_t parent; } f_fss_item_t; - #define f_fss_item_t_initialize { f_fss_object_t_initialize, f_fss_content_t_initialize, f_array_length_t_initialize } + #define f_fss_item_t_initialize { f_fss_object_t_initialize, f_fss_content_t_initialize, 0 } /** * Reset a fss item stucture to 0 (clear all values). diff --git a/level_1/fl_fss/c/fss_basic.h b/level_1/fl_fss/c/fss_basic.h index d543e60..e19a35c 100644 --- a/level_1/fl_fss/c/fss_basic.h +++ b/level_1/fl_fss/c/fss_basic.h @@ -153,6 +153,8 @@ extern "C" { * F_none_eol (with error bit) after reaching an EOL, which is not supported by the standard. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if appended string length is too large to store in the destination. + * + * Errors (with error bit) from: f_fss_is_space(). */ #ifndef _di_fl_fss_basic_object_write_ extern f_return_status fl_fss_basic_object_write(const f_string_static_t object, const f_fss_quote_t quote, const uint8_t complete, f_string_range_t *range, f_string_dynamic_t *destination); diff --git a/level_1/fl_fss/c/fss_extended.h b/level_1/fl_fss/c/fss_extended.h index 5df0c61..49aa5f2 100644 --- a/level_1/fl_fss/c/fss_extended.h +++ b/level_1/fl_fss/c/fss_extended.h @@ -156,6 +156,8 @@ extern "C" { * F_none_eol (with error bit) after reaching an EOL, which is not supported by the standard. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if appended string length is too large to store in the destination. + * + * Errors (with error bit) from: f_fss_is_space(). */ #ifndef _di_fl_fss_extended_object_write_ extern f_return_status fl_fss_extended_object_write(const f_string_static_t object, const f_fss_quote_t quote, const uint8_t complete, f_string_range_t *range, f_string_dynamic_t *destination); @@ -193,6 +195,8 @@ extern "C" { * F_none_eol (with error bit) after reaching an EOL, which is not supported by the standard. * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if appended string length is too large to store in the destination. + * + * Errors (with error bit) from: f_fss_is_space(). */ #ifndef _di_fl_fss_extended_content_write_ extern f_return_status fl_fss_extended_content_write(const f_string_static_t content, const f_fss_quote_t quote, const uint8_t complete, f_string_range_t *range, f_string_dynamic_t *destination); diff --git a/level_1/fl_fss/c/private-fss.c b/level_1/fl_fss/c/private-fss.c index 45964e7..290dec8 100644 --- a/level_1/fl_fss/c/private-fss.c +++ b/level_1/fl_fss/c/private-fss.c @@ -518,8 +518,8 @@ extern "C" { bool quoted = F_false; - f_string_length_t slash_total = 0; - f_string_length_t slash_first = 0; + f_string_length_t item_first = 0; + f_string_length_t item_total = 0; f_string_length_t quote_start = 0; f_string_length_t i = 0; @@ -535,28 +535,58 @@ extern "C" { for (; range->start <= range->stop && range->start < object.used; range->start++) { if (object.string[range->start] == f_fss_delimit_slash) { - slash_first = range->start; - slash_total = 1; + item_first = range->start++; + item_total = 1; - for (range->start++; range->start <= range->stop && range->start < object.used; range->start++) { + for (; range->start <= range->stop && range->start < object.used; range->start++) { if (object.string[range->start] == f_fss_delimit_slash) { - slash_total++; + item_total++; } else if (object.string[range->start] != f_fss_delimit_placeholder) { break; } } // for - if (range->start > range->stop || range->start >= object.used || object.string[range->start] == f_fss_eol) { - for (i = 0; i < slash_total; i++) { + if (range->start > range->stop || range->start >= object.used) { + if (quoted) { + + // slashes before the final quote must be escaped when quoted, add the delimit slashes. + if (item_first == input_start) { + destination->string[destination->used++] = f_fss_delimit_slash; + } + else { + for (i = 0; i < item_total; i++) { + destination->string[destination->used++] = f_fss_delimit_slash; + } // for + } + } + + for (i = 0; i < item_total; i++) { destination->string[destination->used++] = f_fss_delimit_slash; } // for break; } + else if (object.string[range->start] == f_fss_eol) { + status = F_status_set_error(F_none_eol); + break; + } if (object.string[range->start] == quote) { + item_first = range->start++; + + fl_macro_fss_skip_past_delimit_placeholders(object, (*range)); + + if (range->start > range->stop || range->start >= object.used) { + for (i = 0; i < item_total; i++) { + destination->string[destination->used++] = f_fss_delimit_slash; + } // for + + destination->string[destination->used++] = quote; + + break; + } // if any space is found after a quote after a slash, then this must be delimited and quoted. status = f_fss_is_space(object, *range); @@ -565,46 +595,68 @@ extern "C" { if (status == F_true) { quoted = F_true; - status = private_fl_fss_destination_increase_by(slash_total, destination); + status = private_fl_fss_destination_increase_by(item_total, destination); if (F_status_is_error(status)) break; // add the slashes that delimit the slashes. - for (i = 0; i < slash_total; i++) { - destination->string[destination->used++] = f_fss_delimit_slash; - } // for - - // add the slashed that get delimited. - for (i = 0; i < slash_total; i++) { + if (item_first == input_start) { destination->string[destination->used++] = f_fss_delimit_slash; - } // for - } - else if (slash_first == input_start) { - destination->string[used_start + 1] = f_fss_delimit_slash; + } + else { + for (i = 0; i < item_total; i++) { + destination->string[destination->used++] = f_fss_delimit_slash; + } // for + } } + + for (i = 0; i < item_total; i++) { + destination->string[destination->used++] = f_fss_delimit_slash; + } // for + + destination->string[destination->used++] = quote; + destination->string[destination->used++] = object.string[range->start]; } else { + // if any space is found, then this must be quoted. + status = f_fss_is_space(object, *range); + if (F_status_is_error(status)) break; + + if (status == F_true) { + quoted = F_true; + } + // there is nothing to delimit, so all slashes should be printed as is. - for (i = 0; i < slash_total; i++) { + for (i = 0; i < item_total; i++) { destination->string[destination->used++] = f_fss_delimit_slash; } // for + + destination->string[destination->used++] = object.string[range->start]; } } else if (object.string[range->start] == quote) { - for (; range->start <= range->stop && range->start < object.used; range->start++) { - if (object.string[range->start] != f_fss_delimit_placeholder) break; - } // for + item_first = range->start++; - if (range->start > range->stop || range->start >= object.used) { - status = private_fl_fss_destination_increase(destination); - if (F_status_is_error(status)) break; + // the very first quote, must be escaped, when quoting is disabled. + if (item_first == input_start) { + destination->string[used_start + 1] = f_fss_delimit_slash; + } + + fl_macro_fss_skip_past_delimit_placeholders(object, (*range)); - destination->string[destination->used++] = f_fss_delimit_slash; + if (range->start > range->stop || range->start >= object.used) { destination->string[destination->used++] = quote; - quoted = F_true; break; } + if (object.string[range->start] == quote) { + destination->string[destination->used++] = quote; + + // the next quote must also be checked. + range->start--; + continue; + } + // if any space is found, then this must be quoted. status = f_fss_is_space(object, *range); if (F_status_is_error(status)) break; @@ -613,12 +665,31 @@ extern "C" { status = private_fl_fss_destination_increase(destination); if (F_status_is_error(status)) break; - destination->string[destination->used++] = f_fss_delimit_slash; - destination->string[destination->used++] = quote; + if (item_first != input_start) { + destination->string[destination->used++] = f_fss_delimit_slash; + } + quoted = F_true; } + + destination->string[destination->used++] = quote; + destination->string[destination->used++] = object.string[range->start]; + } + else if (object.string[range->start] == f_fss_eol) { + status = F_status_set_error(F_none_eol); + break; } else if (object.string[range->start] != f_fss_delimit_placeholder) { + + if (!quoted) { + status = f_fss_is_space(object, *range); + if (F_status_is_error(status)) break; + + if (status == F_true) { + quoted = F_true; + } + } + destination->string[destination->used++] = object.string[range->start]; } } // for @@ -632,8 +703,29 @@ extern "C" { destination->string[used_start] = quote; destination->string[destination->used++] = quote; - if (object.string[input_start] == quote) { - destination->string[used_start + 1] = f_fss_delimit_slash; + // The start quote may or may not need to be delimited in this case. + if (destination->string[input_start] == quote) { + for (i = input_start + 1; i <= range->stop && i < object.used; i++) { + if (object.string[i] != f_fss_delimit_placeholder) break; + } // for + + // only when followed by a space must the start quote be delimited. + if (i <= range->stop && i < object.used) { + f_string_range_t range_i = *range; + + range_i.start = i; + + status = f_fss_is_space(object, range_i); + + if (F_status_is_error(status)) { + destination->used = used_start; + return status; + } + + if (status == F_false) { + destination->string[used_start + 1] = f_fss_delimit_placeholder; + } + } } } @@ -641,12 +733,7 @@ extern "C" { return F_none_stop; } - if (range->start >= object.used) { - return F_none_eos; - } - - // the only way to make it here should be if stopped at EOL. - return F_status_set_error(F_none_eol); + return F_none_eos; } #endif // !defined(_di_fl_fss_basic_object_write_) || !defined(_di_fl_fss_extended_object_write_) || !defined(_di_fl_fss_extended_content_write_) diff --git a/level_3/fss_basic_list_read/c/fss_basic_list_read.h b/level_3/fss_basic_list_read/c/fss_basic_list_read.h index ce8525e..34cd893 100644 --- a/level_3/fss_basic_list_read/c/fss_basic_list_read.h +++ b/level_3/fss_basic_list_read/c/fss_basic_list_read.h @@ -106,24 +106,24 @@ extern "C" { #define fss_basic_list_read_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(fss_basic_list_read_short_at, fss_basic_list_read_long_at, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_read_short_depth, fss_basic_list_read_long_depth, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_read_short_empty, fss_basic_list_read_long_empty, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_read_short_line, fss_basic_list_read_long_line, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_read_short_name, fss_basic_list_read_long_name, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_read_short_object, fss_basic_list_read_long_object, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_read_short_select, fss_basic_list_read_long_select, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_read_short_total, fss_basic_list_read_long_total, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_read_short_trim, fss_basic_list_read_long_trim, 0, F_false, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(fss_basic_list_read_short_at, fss_basic_list_read_long_at, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_read_short_depth, fss_basic_list_read_long_depth, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_read_short_empty, fss_basic_list_read_long_empty, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_read_short_line, fss_basic_list_read_long_line, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_read_short_name, fss_basic_list_read_long_name, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_read_short_object, fss_basic_list_read_long_object, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_read_short_select, fss_basic_list_read_long_select, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_read_short_total, fss_basic_list_read_long_total, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_read_short_trim, fss_basic_list_read_long_trim, 0, 0, f_console_type_normal), \ } #define fss_basic_list_read_total_parameters 18 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 d579a82..f767619 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 @@ -297,8 +297,6 @@ extern "C" { status = fss_basic_list_write_process(*data, output, object, content, quoted, &buffer); if (F_status_is_error(status)) break; - fprintf(output.stream, "%c", f_string_eol[0]); - // restore the range, positioned after the newline. range.start = range.stop + 2; range.stop = buffer.used - 1; @@ -379,8 +377,6 @@ extern "C" { status = fss_basic_list_write_process(*data, output, object, content, quoted, &buffer); if (F_status_is_error(status)) break; - fprintf(output.stream, "%c", f_string_eol[0]); - object_ended = F_false; } else { @@ -432,8 +428,6 @@ extern "C" { status = fss_basic_list_write_process(*data, output, object, content, quoted, &buffer); if (F_status_is_error(status)) break; - - fprintf(output.stream, "%c", f_string_eol[0]); } // for } else { @@ -447,8 +441,6 @@ extern "C" { status = fss_basic_list_write_process(*data, output, object, content, quoted, &buffer); if (F_status_is_error(status)) break; - - fprintf(output.stream, "%c", f_string_eol[0]); } // for } } @@ -465,8 +457,6 @@ extern "C" { status = fss_basic_list_write_process(*data, output, object, content, quoted, &buffer); if (F_status_is_error(status)) break; - - fprintf(output.stream, "%c", f_string_eol[0]); } // for } diff --git a/level_3/fss_basic_read/c/fss_basic_read.h b/level_3/fss_basic_read/c/fss_basic_read.h index ba6af6e..fcd6351 100644 --- a/level_3/fss_basic_read/c/fss_basic_read.h +++ b/level_3/fss_basic_read/c/fss_basic_read.h @@ -106,24 +106,24 @@ extern "C" { #define fss_basic_read_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(fss_basic_read_short_at, fss_basic_read_long_at, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_depth, fss_basic_read_long_depth, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_empty, fss_basic_read_long_empty, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_line, fss_basic_read_long_line, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_name, fss_basic_read_long_name, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_object, fss_basic_read_long_object, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_select, fss_basic_read_long_select, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_total, fss_basic_read_long_total, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_trim, fss_basic_read_long_trim, 0, F_false, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(fss_basic_read_short_at, fss_basic_read_long_at, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_read_short_depth, fss_basic_read_long_depth, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_read_short_empty, fss_basic_read_long_empty, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_read_short_line, fss_basic_read_long_line, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_read_short_name, fss_basic_read_long_name, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_read_short_object, fss_basic_read_long_object, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_read_short_select, fss_basic_read_long_select, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_read_short_total, fss_basic_read_long_total, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_read_short_trim, fss_basic_read_long_trim, 0, 0, f_console_type_normal), \ } #define fss_basic_read_total_parameters 18 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 e72bf60..a9419ff 100644 --- a/level_3/fss_basic_write/c/fss_basic_write.c +++ b/level_3/fss_basic_write/c/fss_basic_write.c @@ -297,8 +297,6 @@ extern "C" { status = fss_basic_write_process(*data, output, object, content, quote, &buffer); if (F_status_is_error(status)) break; - fprintf(output.stream, "%c", f_string_eol[0]); - // restore the range, positioned after the newline. range.start = range.stop + 2; range.stop = buffer.used - 1; @@ -379,8 +377,6 @@ extern "C" { status = fss_basic_write_process(*data, output, object, content, quote, &buffer); if (F_status_is_error(status)) break; - fprintf(output.stream, "%c", f_string_eol[0]); - object_ended = F_false; } else { @@ -432,8 +428,6 @@ extern "C" { status = fss_basic_write_process(*data, output, object, content, quote, &buffer); if (F_status_is_error(status)) break; - - fprintf(output.stream, "%c", f_string_eol[0]); } // for } else { @@ -447,8 +441,6 @@ extern "C" { status = fss_basic_write_process(*data, output, object, content, quote, &buffer); if (F_status_is_error(status)) break; - - fprintf(output.stream, "%c", f_string_eol[0]); } // for } } @@ -465,8 +457,6 @@ extern "C" { status = fss_basic_write_process(*data, output, object, content, quote, &buffer); if (F_status_is_error(status)) break; - - fprintf(output.stream, "%c", f_string_eol[0]); } // for } diff --git a/level_3/fss_basic_write/c/fss_basic_write.h b/level_3/fss_basic_write/c/fss_basic_write.h index 1ba6c04..8f82db6 100644 --- a/level_3/fss_basic_write/c/fss_basic_write.h +++ b/level_3/fss_basic_write/c/fss_basic_write.h @@ -90,21 +90,21 @@ extern "C" { #define fss_basic_write_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(fss_basic_write_short_file, fss_basic_write_long_file, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_write_short_content, fss_basic_write_long_content, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_write_short_double, fss_basic_write_long_double, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_write_short_object, fss_basic_write_long_object, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_write_short_partial, fss_basic_write_long_partial, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_write_short_single, fss_basic_write_long_single, 0, F_true, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(fss_basic_write_short_file, fss_basic_write_long_file, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_write_short_content, fss_basic_write_long_content, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_write_short_double, fss_basic_write_long_double, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_write_short_object, fss_basic_write_long_object, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_write_short_partial, fss_basic_write_long_partial, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_write_short_single, fss_basic_write_long_single, 0, 0, f_console_type_normal), \ } #define fss_basic_write_total_parameters 15 diff --git a/level_3/fss_extended_list_read/c/fss_extended_list_read.h b/level_3/fss_extended_list_read/c/fss_extended_list_read.h index eeb4d51..291e1a7 100644 --- a/level_3/fss_extended_list_read/c/fss_extended_list_read.h +++ b/level_3/fss_extended_list_read/c/fss_extended_list_read.h @@ -106,24 +106,24 @@ extern "C" { #define fss_extended_list_read_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_at, fss_extended_list_read_long_at, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_depth, fss_extended_list_read_long_depth, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_empty, fss_extended_list_read_long_empty, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_line, fss_extended_list_read_long_line, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_name, fss_extended_list_read_long_name, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_object, fss_extended_list_read_long_object, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_select, fss_extended_list_read_long_select, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_total, fss_extended_list_read_long_total, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_trim, fss_extended_list_read_long_trim, 0, F_false, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_at, fss_extended_list_read_long_at, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_depth, fss_extended_list_read_long_depth, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_empty, fss_extended_list_read_long_empty, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_line, fss_extended_list_read_long_line, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_name, fss_extended_list_read_long_name, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_object, fss_extended_list_read_long_object, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_select, fss_extended_list_read_long_select, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_total, fss_extended_list_read_long_total, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_trim, fss_extended_list_read_long_trim, 0, 0, f_console_type_normal), \ } #define fss_extended_list_read_total_parameters 18 diff --git a/level_3/fss_extended_read/c/fss_extended_read.h b/level_3/fss_extended_read/c/fss_extended_read.h index b9bdce5..53ce420 100644 --- a/level_3/fss_extended_read/c/fss_extended_read.h +++ b/level_3/fss_extended_read/c/fss_extended_read.h @@ -106,24 +106,24 @@ extern "C" { #define fss_extended_read_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(fss_extended_read_short_at, fss_extended_read_long_at, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_depth, fss_extended_read_long_depth, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_empty, fss_extended_read_long_empty, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_line, fss_extended_read_long_line, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_name, fss_extended_read_long_name, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_object, fss_extended_read_long_object, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_select, fss_extended_read_long_select, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_total, fss_extended_read_long_total, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_trim, fss_extended_read_long_trim, 0, F_false, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(fss_extended_read_short_at, fss_extended_read_long_at, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_read_short_depth, fss_extended_read_long_depth, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_read_short_empty, fss_extended_read_long_empty, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_read_short_line, fss_extended_read_long_line, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_read_short_name, fss_extended_read_long_name, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_read_short_object, fss_extended_read_long_object, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_read_short_select, fss_extended_read_long_select, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_read_short_total, fss_extended_read_long_total, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_read_short_trim, fss_extended_read_long_trim, 0, 0, f_console_type_normal), \ } #define fss_extended_read_total_parameters 18 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 6663771..306415f 100644 --- a/level_3/fss_extended_write/c/fss_extended_write.c +++ b/level_3/fss_extended_write/c/fss_extended_write.c @@ -297,8 +297,6 @@ extern "C" { status = fss_extended_write_process(*data, output, object, content, quote, &buffer); if (F_status_is_error(status)) break; - fprintf(output.stream, "%c", f_string_eol[0]); - // restore the range, positioned after the newline. range.start = range.stop + 2; range.stop = buffer.used - 1; @@ -379,8 +377,6 @@ extern "C" { status = fss_extended_write_process(*data, output, object, content, quote, &buffer); if (F_status_is_error(status)) break; - fprintf(output.stream, "%c", f_string_eol[0]); - object_ended = F_false; } else { @@ -432,8 +428,6 @@ extern "C" { status = fss_extended_write_process(*data, output, object, content, quote, &buffer); if (F_status_is_error(status)) break; - - fprintf(output.stream, "%c", f_string_eol[0]); } // for } else { @@ -447,8 +441,6 @@ extern "C" { status = fss_extended_write_process(*data, output, object, content, quote, &buffer); if (F_status_is_error(status)) break; - - fprintf(output.stream, "%c", f_string_eol[0]); } // for } } @@ -465,8 +457,6 @@ extern "C" { status = fss_extended_write_process(*data, output, object, content, quote, &buffer); if (F_status_is_error(status)) break; - - fprintf(output.stream, "%c", f_string_eol[0]); } // for } diff --git a/level_3/fss_extended_write/c/fss_extended_write.h b/level_3/fss_extended_write/c/fss_extended_write.h index fc69d49..f3e4033 100644 --- a/level_3/fss_extended_write/c/fss_extended_write.h +++ b/level_3/fss_extended_write/c/fss_extended_write.h @@ -89,21 +89,21 @@ extern "C" { #define fss_extended_write_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(fss_extended_write_short_file, fss_extended_write_long_file, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_write_short_content, fss_extended_write_long_content, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_write_short_double, fss_extended_write_long_double, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_write_short_object, fss_extended_write_long_object, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_write_short_partial, fss_extended_write_long_partial, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_write_short_single, fss_extended_write_long_single, 0, F_true, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_write_short_file, fss_extended_write_long_file, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_write_short_content, fss_extended_write_long_content, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_write_short_double, fss_extended_write_long_double, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_write_short_object, fss_extended_write_long_object, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_write_short_partial, fss_extended_write_long_partial, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_write_short_single, fss_extended_write_long_single, 0, 0, f_console_type_normal), \ } #define fss_extended_write_total_parameters 15 diff --git a/level_3/fss_status_code/c/fss_status_code.h b/level_3/fss_status_code/c/fss_status_code.h index 8b522ab..cf937ca 100644 --- a/level_3/fss_status_code/c/fss_status_code.h +++ b/level_3/fss_status_code/c/fss_status_code.h @@ -84,19 +84,19 @@ extern "C" { #define fss_status_code_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(fss_status_code_short_is_fine, fss_status_code_long_is_fine, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_status_code_short_is_warning, fss_status_code_long_is_warning, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_status_code_short_is_error, fss_status_code_long_is_error, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_status_code_short_number, fss_status_code_long_number, 0, F_false, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(fss_status_code_short_is_fine, fss_status_code_long_is_fine, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_status_code_short_is_warning, fss_status_code_long_is_warning, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_status_code_short_is_error, fss_status_code_long_is_error, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_status_code_short_number, fss_status_code_long_number, 0, 0, f_console_type_normal), \ } #define fss_status_code_total_parameters 13 diff --git a/level_3/init/c/init.h b/level_3/init/c/init.h index 7f3a944..b10c6e9 100644 --- a/level_3/init/c/init.h +++ b/level_3/init/c/init.h @@ -196,33 +196,33 @@ extern "C" { #ifdef _en_init_debug_ #define init_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(init_parameter_runlevel_short_name, init_parameter_runlevel_long_name, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(init_parameter_no_prepare_short_name, init_parameter_no_prepare_long_name, 0, F_true, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(init_parameter_runlevel_short_name, init_parameter_runlevel_long_name, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(init_parameter_no_prepare_short_name, init_parameter_no_prepare_long_name, 0, 1, f_console_type_normal), \ } #define init_total_parameters 11 #else #define init_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(init_parameter_runlevel_short_name, init_parameter_runlevel_long_name, 0, F_true, f_console_type_normal), \ - f_console_parameter_t_initialize(init_parameter_no_prepare_short_name, init_parameter_no_prepare_long_name, 0, F_true, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(init_parameter_runlevel_short_name, init_parameter_runlevel_long_name, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(init_parameter_no_prepare_short_name, init_parameter_no_prepare_long_name, 0, 1, f_console_type_normal), \ } #define init_total_parameters 10 diff --git a/level_3/status_code/c/status_code.h b/level_3/status_code/c/status_code.h index b1a9894..fbf2d30 100644 --- a/level_3/status_code/c/status_code.h +++ b/level_3/status_code/c/status_code.h @@ -83,19 +83,19 @@ extern "C" { #define status_code_console_parameter_t_initialize \ { \ - f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_normal, f_console_standard_long_normal, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(status_code_short_is_fine, status_code_long_is_fine, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(status_code_short_is_warning, status_code_long_is_warning, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(status_code_short_is_error, status_code_long_is_error, 0, F_false, f_console_type_normal), \ - f_console_parameter_t_initialize(status_code_short_number, status_code_long_number, 0, F_false, f_console_type_normal), \ + f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \ + f_console_parameter_t_initialize(status_code_short_is_fine, status_code_long_is_fine, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(status_code_short_is_warning, status_code_long_is_warning, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(status_code_short_is_error, status_code_long_is_error, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(status_code_short_number, status_code_long_number, 0, 0, f_console_type_normal), \ } #define status_code_total_parameters 13