From 5ee1fcb244c4d301f3de61621e9769be31a59ef0 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Fri, 8 May 2020 22:17:03 -0500 Subject: [PATCH] Refactor: f_string_location to f_string_range (and related) I am now favoring the term "range" over "location". --- level_0/f_conversion/c/conversion.c | 116 ++++++++-------- level_0/f_conversion/c/conversion.h | 68 ++++----- level_0/f_fss/c/fss.h | 38 +++--- level_0/f_print/c/print.c | 14 +- level_0/f_print/c/print.h | 6 +- level_0/f_string/c/string.h | 34 ++--- level_0/f_utf/c/utf.h | 44 +++--- level_1/fl_console/c/console.c | 16 +-- level_1/fl_file/c/file.c | 2 +- level_1/fl_file/c/file.h | 2 +- level_1/fl_fss/c/fss.c | 152 ++++++++++----------- level_1/fl_fss/c/fss.h | 42 +++--- level_1/fl_fss/c/fss_basic.c | 14 +- level_1/fl_fss/c/fss_basic.h | 8 +- level_1/fl_fss/c/fss_basic_list.c | 12 +- level_1/fl_fss/c/fss_basic_list.h | 8 +- level_1/fl_fss/c/fss_extended.c | 12 +- level_1/fl_fss/c/fss_extended.h | 8 +- level_1/fl_fss/c/fss_extended_list.c | 12 +- level_1/fl_fss/c/fss_extended_list.h | 8 +- level_1/fl_print/c/print.c | 46 +++---- level_1/fl_print/c/print.h | 12 +- level_1/fl_serialized/c/private-serialized.c | 2 +- level_1/fl_serialized/c/private-serialized.h | 2 +- level_1/fl_serialized/c/serialized.c | 18 +-- level_1/fl_serialized/c/serialized.h | 4 +- level_1/fl_string/c/string.c | 48 +++---- level_1/fl_string/c/string.h | 48 +++---- level_1/fl_utf/c/utf.c | 48 +++---- level_1/fl_utf/c/utf.h | 50 +++---- level_1/fl_utf_file/c/utf_file.c | 2 +- level_1/fl_utf_file/c/utf_file.h | 2 +- level_2/fll_fss/c/fss_basic.c | 36 ++--- level_2/fll_fss/c/fss_basic.h | 2 +- level_2/fll_fss/c/fss_basic_list.c | 16 +-- level_2/fll_fss/c/fss_basic_list.h | 2 +- level_2/fll_fss/c/fss_extended.c | 16 +-- level_2/fll_fss/c/fss_extended.h | 2 +- level_2/fll_fss/c/fss_extended_list.c | 16 +-- level_2/fll_fss/c/fss_extended_list.h | 2 +- level_3/firewall/c/firewall.c | 2 +- level_3/firewall/c/private-firewall.c | 38 +++--- level_3/firewall/c/private-firewall.h | 2 +- .../c/private-fss_basic_list_read.c | 4 +- .../fss_basic_list_write/c/fss_basic_list_write.c | 18 +-- level_3/fss_basic_read/c/private-fss_basic_read.c | 4 +- level_3/fss_basic_write/c/fss_basic_write.c | 18 +-- .../c/private-fss_extended_list_read.c | 12 +- .../c/private-fss_extended_read.c | 4 +- level_3/fss_extended_write/c/fss_extended_write.c | 22 +-- level_3/init/c/private-init.c | 4 +- 51 files changed, 559 insertions(+), 559 deletions(-) diff --git a/level_0/f_conversion/c/conversion.c b/level_0/f_conversion/c/conversion.c index cc75cd8..35140d1 100644 --- a/level_0/f_conversion/c/conversion.c +++ b/level_0/f_conversion/c/conversion.c @@ -205,19 +205,19 @@ extern "C" { #endif // _di_f_conversion_character_to_octal_ #ifndef _di_f_conversion_string_to_binary_signed_ - f_return_status f_conversion_string_to_binary_signed(const f_string string, f_number_signed *number, const f_string_location location, const bool negative) { + f_return_status f_conversion_string_to_binary_signed(const f_string string, f_number_signed *number, const f_string_range range, const bool negative) { #ifndef _di_level_0_parameter_checking_ if (string == 0) return f_status_set_error(f_invalid_parameter); if (number == 0) return f_status_set_error(f_invalid_parameter); - if (location.start < 0) return f_status_set_error(f_invalid_parameter); - if (location.stop < location.start) return f_status_set_error(f_invalid_parameter); + if (range.start < 0) return f_status_set_error(f_invalid_parameter); + if (range.stop < range.start) return f_status_set_error(f_invalid_parameter); #endif // _di_level_0_parameter_checking_ uint8_t scale = 0; f_number_unsigned digit = 0; f_number_unsigned converted = 0; - for (f_string_length i = location.start; i <= location.stop; i++) { + for (f_string_length i = range.start; i <= range.stop; i++) { if (f_conversion_character_to_binary(string[i], &digit) == f_none) { if (scale) { scale++; @@ -261,19 +261,19 @@ extern "C" { #endif // _di_f_conversion_string_to_binary_signed_ #ifndef _di_f_conversion_string_to_binary_unsigned_ - f_return_status f_conversion_string_to_binary_unsigned(const f_string string, f_number_unsigned *number, const f_string_location location) { + f_return_status f_conversion_string_to_binary_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range) { #ifndef _di_level_0_parameter_checking_ if (string == 0) return f_status_set_error(f_invalid_parameter); if (number == 0) return f_status_set_error(f_invalid_parameter); - if (location.start < 0) return f_status_set_error(f_invalid_parameter); - if (location.stop < location.start) return f_status_set_error(f_invalid_parameter); + if (range.start < 0) return f_status_set_error(f_invalid_parameter); + if (range.stop < range.start) return f_status_set_error(f_invalid_parameter); #endif // _di_level_0_parameter_checking_ uint8_t scale = 0; f_number_unsigned digit = 0; f_number_unsigned converted = 0; - for (f_string_length i = location.start; i <= location.stop; i++) { + for (f_string_length i = range.start; i <= range.stop; i++) { if (f_conversion_character_to_binary(string[i], &digit) == f_none) { if (scale) { scale++; @@ -301,19 +301,19 @@ extern "C" { #endif // _di_f_conversion_string_to_binary_unsigned_ #ifndef _di_f_conversion_string_to_decimal_signed_ - f_return_status f_conversion_string_to_decimal_signed(const f_string string, f_number_signed *number, const f_string_location location, const bool negative) { + f_return_status f_conversion_string_to_decimal_signed(const f_string string, f_number_signed *number, const f_string_range range, const bool negative) { #ifndef _di_level_0_parameter_checking_ if (string == 0) return f_status_set_error(f_invalid_parameter); if (number == 0) return f_status_set_error(f_invalid_parameter); - if (location.start < 0) return f_status_set_error(f_invalid_parameter); - if (location.stop < location.start) return f_status_set_error(f_invalid_parameter); + if (range.start < 0) return f_status_set_error(f_invalid_parameter); + if (range.stop < range.start) return f_status_set_error(f_invalid_parameter); #endif // _di_level_0_parameter_checking_ uint8_t scale = 0; f_number_unsigned digit = 0; f_number_unsigned converted = 0; - for (f_string_length i = location.start; i <= location.stop; i++) { + for (f_string_length i = range.start; i <= range.stop; i++) { if (f_conversion_character_to_decimal(string[i], &digit) == f_none) { if (scale) { @@ -362,19 +362,19 @@ extern "C" { #endif // _di_f_conversion_string_to_decimal_signed_ #ifndef _di_f_conversion_string_to_decimal_unsigned_ - f_return_status f_conversion_string_to_decimal_unsigned(const f_string string, f_number_unsigned *number, const f_string_location location) { + f_return_status f_conversion_string_to_decimal_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range) { #ifndef _di_level_0_parameter_checking_ if (string == 0) return f_status_set_error(f_invalid_parameter); if (number == 0) return f_status_set_error(f_invalid_parameter); - if (location.start < 0) return f_status_set_error(f_invalid_parameter); - if (location.stop < location.start) return f_status_set_error(f_invalid_parameter); + if (range.start < 0) return f_status_set_error(f_invalid_parameter); + if (range.stop < range.start) return f_status_set_error(f_invalid_parameter); #endif // _di_level_0_parameter_checking_ uint8_t scale = 0; f_number_unsigned digit = 0; f_number_unsigned converted = 0; - for (f_string_length i = location.start; i <= location.stop; i++) { + for (f_string_length i = range.start; i <= range.stop; i++) { if (f_conversion_character_to_decimal(string[i], &digit) == f_none) { if (scale) { @@ -405,19 +405,19 @@ extern "C" { #endif // _di_f_conversion_string_to_decimal_unsigned_ #ifndef _di_f_conversion_string_to_duodecimal_signed_ - f_return_status f_conversion_string_to_duodecimal_signed(const f_string string, f_number_signed *number, const f_string_location location, const bool negative) { + f_return_status f_conversion_string_to_duodecimal_signed(const f_string string, f_number_signed *number, const f_string_range range, const bool negative) { #ifndef _di_level_0_parameter_checking_ if (string == 0) return f_status_set_error(f_invalid_parameter); if (number == 0) return f_status_set_error(f_invalid_parameter); - if (location.start < 0) return f_status_set_error(f_invalid_parameter); - if (location.stop < location.start) return f_status_set_error(f_invalid_parameter); + if (range.start < 0) return f_status_set_error(f_invalid_parameter); + if (range.stop < range.start) return f_status_set_error(f_invalid_parameter); #endif // _di_level_0_parameter_checking_ uint8_t scale = 0; f_number_unsigned digit = 0; f_number_unsigned converted = 0; - for (f_string_length i = location.start; i <= location.stop; i++) { + for (f_string_length i = range.start; i <= range.stop; i++) { if (f_conversion_character_to_duodecimal(string[i], &digit) == f_none) { if (scale) { @@ -466,19 +466,19 @@ extern "C" { #endif // _di_f_conversion_string_to_duodecimal_signed_ #ifndef _di_f_conversion_string_to_duodecimal_unsigned_ - f_return_status f_conversion_string_to_duodecimal_unsigned(const f_string string, f_number_unsigned *number, const f_string_location location) { + f_return_status f_conversion_string_to_duodecimal_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range) { #ifndef _di_level_0_parameter_checking_ if (string == 0) return f_status_set_error(f_invalid_parameter); if (number == 0) return f_status_set_error(f_invalid_parameter); - if (location.start < 0) return f_status_set_error(f_invalid_parameter); - if (location.stop < location.start) return f_status_set_error(f_invalid_parameter); + if (range.start < 0) return f_status_set_error(f_invalid_parameter); + if (range.stop < range.start) return f_status_set_error(f_invalid_parameter); #endif // _di_level_0_parameter_checking_ uint8_t scale = 0; f_number_unsigned digit = 0; f_number_unsigned converted = 0; - for (f_string_length i = location.start; i <= location.stop; i++) { + for (f_string_length i = range.start; i <= range.stop; i++) { if (f_conversion_character_to_duodecimal(string[i], &digit) == f_none) { if (scale) { @@ -509,19 +509,19 @@ extern "C" { #endif // _di_f_conversion_string_to_duodecimal_unsigned_ #ifndef _di_f_conversion_string_to_hexidecimal_signed_ - f_return_status f_conversion_string_to_hexidecimal_signed(const f_string string, f_number_signed *number, const f_string_location location, const bool negative) { + f_return_status f_conversion_string_to_hexidecimal_signed(const f_string string, f_number_signed *number, const f_string_range range, const bool negative) { #ifndef _di_level_0_parameter_checking_ if (string == 0) return f_status_set_error(f_invalid_parameter); if (number == 0) return f_status_set_error(f_invalid_parameter); - if (location.start < 0) return f_status_set_error(f_invalid_parameter); - if (location.stop < location.start) return f_status_set_error(f_invalid_parameter); + if (range.start < 0) return f_status_set_error(f_invalid_parameter); + if (range.stop < range.start) return f_status_set_error(f_invalid_parameter); #endif // _di_level_0_parameter_checking_ uint8_t scale = 0; f_number_unsigned digit = 0; f_number_unsigned converted = 0; - for (f_string_length i = location.start; i <= location.stop; i++) { + for (f_string_length i = range.start; i <= range.stop; i++) { if (f_conversion_character_to_hexidecimal(string[i], &digit) == f_none) { if (scale) { @@ -570,19 +570,19 @@ extern "C" { #endif // _di_f_conversion_string_to_hexidecimal_signed_ #ifndef _di_f_conversion_string_to_hexidecimal_unsigned_ - f_return_status f_conversion_string_to_hexidecimal_unsigned(const f_string string, f_number_unsigned *number, const f_string_location location) { + f_return_status f_conversion_string_to_hexidecimal_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range) { #ifndef _di_level_0_parameter_checking_ if (string == 0) return f_status_set_error(f_invalid_parameter); if (number == 0) return f_status_set_error(f_invalid_parameter); - if (location.start < 0) return f_status_set_error(f_invalid_parameter); - if (location.stop < location.start) return f_status_set_error(f_invalid_parameter); + if (range.start < 0) return f_status_set_error(f_invalid_parameter); + if (range.stop < range.start) return f_status_set_error(f_invalid_parameter); #endif // _di_level_0_parameter_checking_ uint8_t scale = 0; f_number_unsigned digit = 0; f_number_unsigned converted = 0; - for (f_string_length i = location.start; i <= location.stop; i++) { + for (f_string_length i = range.start; i <= range.stop; i++) { if (f_conversion_character_to_hexidecimal(string[i], &digit) == f_none) { if (scale) { @@ -613,19 +613,19 @@ extern "C" { #endif // _di_f_conversion_string_to_hexidecimal_unsigned_ #ifndef _di_f_conversion_string_to_octal_signed_ - f_return_status f_conversion_string_to_octal_signed(const f_string string, f_number_signed *number, const f_string_location location, const bool negative) { + f_return_status f_conversion_string_to_octal_signed(const f_string string, f_number_signed *number, const f_string_range range, const bool negative) { #ifndef _di_level_0_parameter_checking_ if (string == 0) return f_status_set_error(f_invalid_parameter); if (number == 0) return f_status_set_error(f_invalid_parameter); - if (location.start < 0) return f_status_set_error(f_invalid_parameter); - if (location.stop < location.start) return f_status_set_error(f_invalid_parameter); + if (range.start < 0) return f_status_set_error(f_invalid_parameter); + if (range.stop < range.start) return f_status_set_error(f_invalid_parameter); #endif // _di_level_0_parameter_checking_ uint8_t scale = 0; f_number_unsigned digit = 0; f_number_unsigned converted = 0; - for (f_string_length i = location.start; i <= location.stop; i++) { + for (f_string_length i = range.start; i <= range.stop; i++) { if (f_conversion_character_to_octal(string[i], &digit) == f_none) { if (scale) { @@ -674,19 +674,19 @@ extern "C" { #endif // _di_f_conversion_string_to_octal_signed_ #ifndef _di_f_conversion_string_to_octal_unsigned_ - f_return_status f_conversion_string_to_octal_unsigned(const f_string string, f_number_unsigned *number, const f_string_location location) { + f_return_status f_conversion_string_to_octal_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range) { #ifndef _di_level_0_parameter_checking_ if (string == 0) return f_status_set_error(f_invalid_parameter); if (number == 0) return f_status_set_error(f_invalid_parameter); - if (location.start < 0) return f_status_set_error(f_invalid_parameter); - if (location.stop < location.start) return f_status_set_error(f_invalid_parameter); + if (range.start < 0) return f_status_set_error(f_invalid_parameter); + if (range.stop < range.start) return f_status_set_error(f_invalid_parameter); #endif // _di_level_0_parameter_checking_ uint8_t scale = 0; f_number_unsigned digit = 0; f_number_unsigned converted = 0; - for (f_string_length i = location.start; i <= location.stop; i++) { + for (f_string_length i = range.start; i <= range.stop; i++) { if (f_conversion_character_to_octal(string[i], &digit) == f_none) { if (scale) { @@ -717,12 +717,12 @@ extern "C" { #endif // _di_f_conversion_string_to_octal_unsigned_ #ifndef _di_f_conversion_string_to_number_signed_ - f_return_status f_conversion_string_to_number_signed(const f_string string, f_number_signed *number, const f_string_location location) { + f_return_status f_conversion_string_to_number_signed(const f_string string, f_number_signed *number, const f_string_range range) { #ifndef _di_level_0_parameter_checking_ if (string == 0) return f_status_set_error(f_invalid_parameter); if (number == 0) return f_status_set_error(f_invalid_parameter); - if (location.start < 0) return f_status_set_error(f_invalid_parameter); - if (location.stop < location.start) return f_status_set_error(f_invalid_parameter); + if (range.start < 0) return f_status_set_error(f_invalid_parameter); + if (range.stop < range.start) return f_status_set_error(f_invalid_parameter); #endif // _di_level_0_parameter_checking_ if (string[0] == '\0') { @@ -737,7 +737,7 @@ extern "C" { f_string_length offset = 0; f_status status = f_none; - for (f_string_length i = location.start; i <= location.stop; i++) { + for (f_string_length i = range.start; i <= range.stop; i++) { width = f_macro_utf_byte_width_is(string[i]); if (width == 0) { @@ -752,7 +752,7 @@ extern "C" { } else { if (mode == 0 && vector == 0) { - width_max = (location.stop - i) + 1; + width_max = (range.stop - i) + 1; status = f_utf_is_whitespace(string + i, width_max); @@ -777,7 +777,7 @@ extern "C" { j = i + 1; // Immediate next value must be either a number, 'x', 'X', 'd', 'D', 'o', 'O', 'b', or 'B'. - if (j > location.stop) { + if (j > range.stop) { *number = 0; return f_none; } @@ -841,9 +841,9 @@ extern "C" { return f_status_set_error(f_number_invalid); } - f_string_location location_offset = f_string_location_initialize; - location_offset.start = location.start + offset; - location_offset.stop = location.stop; + f_string_range location_offset = f_string_range_initialize; + location_offset.start = range.start + offset; + location_offset.stop = range.stop; if (mode == 10) { return f_conversion_string_to_decimal_signed(string, number, location_offset, vector == -1); @@ -866,12 +866,12 @@ extern "C" { #endif // _di_f_conversion_string_to_number_signed_ #ifndef _di_f_conversion_string_to_number_unsigned_ - f_return_status f_conversion_string_to_number_unsigned(const f_string string, f_number_unsigned *number, const f_string_location location) { + f_return_status f_conversion_string_to_number_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range) { #ifndef _di_level_0_parameter_checking_ if (string == 0) return f_status_set_error(f_invalid_parameter); if (number == 0) return f_status_set_error(f_invalid_parameter); - if (location.start < 0) return f_status_set_error(f_invalid_parameter); - if (location.stop < location.start) return f_status_set_error(f_invalid_parameter); + if (range.start < 0) return f_status_set_error(f_invalid_parameter); + if (range.stop < range.start) return f_status_set_error(f_invalid_parameter); #endif // _di_level_0_parameter_checking_ if (string[0] == '\0') { @@ -886,7 +886,7 @@ extern "C" { f_status status = f_none; int8_t sign_found = 0; - for (f_string_length i = location.start; i <= location.stop; i++) { + for (f_string_length i = range.start; i <= range.stop; i++) { width = f_macro_utf_byte_width_is(string[i]); if (width == 0) { @@ -901,7 +901,7 @@ extern "C" { } else { if (mode == 0) { - width_max = (location.stop - i) + 1; + width_max = (range.stop - i) + 1; status = f_utf_is_whitespace(string + i, width_max); @@ -926,7 +926,7 @@ extern "C" { j = i + 1; // Immediate next value must be either a number, 'x', 'X', 'd', 'D', 'o', 'O', 'b', or 'B'. - if (j > location.stop) { + if (j > range.stop) { *number = 0; return f_none; } @@ -978,9 +978,9 @@ extern "C" { return f_status_set_error(f_number_invalid); } - f_string_location location_offset = f_string_location_initialize; - location_offset.start = location.start + offset; - location_offset.stop = location.stop; + f_string_range location_offset = f_string_range_initialize; + location_offset.start = range.start + offset; + location_offset.stop = range.stop; if (mode == 10) { status = f_conversion_string_to_decimal_unsigned(string, number, location_offset); diff --git a/level_0/f_conversion/c/conversion.h b/level_0/f_conversion/c/conversion.h index eaa8770..3c3fbd5 100644 --- a/level_0/f_conversion/c/conversion.h +++ b/level_0/f_conversion/c/conversion.h @@ -267,13 +267,13 @@ extern "C" { * f_number_underflow (with error bit) on integer underflow. */ #ifndef _di_f_conversion_string_to_binary_signed_ - extern f_return_status f_conversion_string_to_binary_signed(const f_string string, f_number_signed *number, const f_string_location location, const bool negative); + extern f_return_status f_conversion_string_to_binary_signed(const f_string string, f_number_signed *number, const f_string_range range, const bool negative); #endif // _di_f_conversion_string_to_binary_signed_ /** * Convert a series of positive binary number characters into a f_number_unsigned. * - * This will stop at one of the following: location.stop or a non-digit. + * This will stop at one of the following: range.stop or a non-digit. * This will ignore NULL values. * This will not process signed statuses (+/-). * @@ -282,7 +282,7 @@ extern "C" { * @param number * This will store the value of the converted string. * This value is only changed on success. - * @param location + * @param range * The start/stop range to convert. * * @return @@ -292,13 +292,13 @@ extern "C" { * f_number_overflow (with error bit) on integer overflow. */ #ifndef _di_f_conversion_string_to_binary_unsigned_ - extern f_return_status f_conversion_string_to_binary_unsigned(const f_string string, f_number_unsigned *number, const f_string_location location); + extern f_return_status f_conversion_string_to_binary_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range); #endif // _di_f_conversion_string_to_binary_unsigned_ /** * Convert a series of positive or negative decimal number characters into an f_number_signed. * - * This will stop at one of the following: location.stop or a non-digit. + * This will stop at one of the following: range.stop or a non-digit. * This will ignore NULL values. * This will not process signed statuses (+/-). * @@ -307,7 +307,7 @@ extern "C" { * @param number * This will store the value of the converted string. * This value is only changed on success. - * @param location + * @param range * The start/stop range to convert. * @param negative * Set to 0 to treat string as a positive number, 1 for as a negative number. @@ -320,13 +320,13 @@ extern "C" { * f_number_underflow (with error bit) on integer underflow. */ #ifndef _di_f_conversion_string_to_decimal_signed_ - extern f_return_status f_conversion_string_to_decimal_signed(const f_string string, f_number_signed *number, const f_string_location location, const bool negative); + extern f_return_status f_conversion_string_to_decimal_signed(const f_string string, f_number_signed *number, const f_string_range range, const bool negative); #endif // _di_f_conversion_string_to_decimal_signed_ /** * Convert a series of positive decimal number characters into an f_number_unsigned. * - * This will stop at one of the following: location.stop or a non-digit. + * This will stop at one of the following: range.stop or a non-digit. * This will ignore NULL values. * This will not process signed statuses (+/-). * @@ -335,7 +335,7 @@ extern "C" { * @param number * This will store the value of the converted string. * This value is only changed on success. - * @param location + * @param range * The start/stop range to convert. * * @return @@ -345,13 +345,13 @@ extern "C" { * f_number_overflow (with error bit) on integer overflow. */ #ifndef _di_f_conversion_string_to_decimal_unsigned_ - extern f_return_status f_conversion_string_to_decimal_unsigned(const f_string string, f_number_unsigned *number, const f_string_location location); + extern f_return_status f_conversion_string_to_decimal_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range); #endif // _di_f_conversion_string_to_decimal_unsigned_ /** * Convert a series of positive or negative duodecimal number characters into an f_number_signed. * - * This will stop at one of the following: location.stop or a non-digit. + * This will stop at one of the following: range.stop or a non-digit. * This will ignore NULL values. * This will not process signed statuses (+/-). * @@ -360,7 +360,7 @@ extern "C" { * @param number * This will store the value of the converted string. * This value is only changed on success. - * @param location + * @param range * The start/stop range to convert. * @param negative * Set to 0 to treat string as a positive number, 1 for as a negative number. @@ -373,13 +373,13 @@ extern "C" { * f_number_underflow (with error bit) on integer underflow. */ #ifndef _di_f_conversion_string_to_duodecimal_signed_ - extern f_return_status f_conversion_string_to_duodecimal_signed(const f_string string, f_number_signed *number, const f_string_location location, const bool negative); + extern f_return_status f_conversion_string_to_duodecimal_signed(const f_string string, f_number_signed *number, const f_string_range range, const bool negative); #endif // _di_f_conversion_string_to_duodecimal_signed_ /** * Convert a series of positive duodecimal number characters into an f_number_unsigned. * - * This will stop at one of the following: location.stop or a non-digit. + * This will stop at one of the following: range.stop or a non-digit. * This will ignore NULL values. * This will not process signed statuses (+/-). * @@ -388,7 +388,7 @@ extern "C" { * @param number * This will store the value of the converted string. * This value is only changed on success. - * @param location + * @param range * The start/stop range to convert. * * @return @@ -398,13 +398,13 @@ extern "C" { * f_number_overflow (with error bit) on integer overflow. */ #ifndef _di_f_conversion_string_to_duodecimal_unsigned_ - extern f_return_status f_conversion_string_to_duodecimal_unsigned(const f_string string, f_number_unsigned *number, const f_string_location location); + extern f_return_status f_conversion_string_to_duodecimal_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range); #endif // _di_f_conversion_string_to_duodecimal_unsigned_ /** * Convert a series of positive or negative hexidecimal number characters into an f_number_signed. * - * This will stop at one of the following: location.stop or a non-digit. + * This will stop at one of the following: range.stop or a non-digit. * This will ignore NULL values. * This will not process signed statuses (+/-). * @@ -413,7 +413,7 @@ extern "C" { * @param number * This will store the value of the converted string. * This value is only changed on success. - * @param location + * @param range * The start/stop range to convert. * @param negative * Set to 0 to treat string as a positive number, 1 for as a negative number. @@ -426,13 +426,13 @@ extern "C" { * f_number_underflow (with error bit) on integer underflow. */ #ifndef _di_f_conversion_string_to_hexidecimal_signed_ - extern f_return_status f_conversion_string_to_hexidecimal_signed(const f_string string, f_number_signed *number, const f_string_location location, const bool negative); + extern f_return_status f_conversion_string_to_hexidecimal_signed(const f_string string, f_number_signed *number, const f_string_range range, const bool negative); #endif // _di_f_conversion_string_to_hexidecimal_signed_ /** * Convert a series of positive hexidecimal number characters into an f_number_unsigned. * - * This will stop at one of the following: location.stop or a non-digit. + * This will stop at one of the following: range.stop or a non-digit. * This will ignore NULL values. * This will not process signed statuses (+/-). * @@ -441,7 +441,7 @@ extern "C" { * @param number * This will store the value of the converted string. * This value is only changed on success. - * @param location + * @param range * The start/stop range to convert. * * @return @@ -451,13 +451,13 @@ extern "C" { * f_number_overflow (with error bit) on integer overflow. */ #ifndef _di_f_conversion_string_to_hexidecimal_unsigned_ - extern f_return_status f_conversion_string_to_hexidecimal_unsigned(const f_string string, f_number_unsigned *number, const f_string_location location); + extern f_return_status f_conversion_string_to_hexidecimal_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range); #endif // _di_f_conversion_string_to_hexidecimal_unsigned_ /** * Convert a series of positive or negative octal number characters into an f_number_signed. * - * This will stop at one of the following: location.stop or a non-digit. + * This will stop at one of the following: range.stop or a non-digit. * This will ignore NULL values. * This will not process signed statuses (+/-). * @@ -466,7 +466,7 @@ extern "C" { * @param number * This will store the value of the converted string. * This value is only changed on success. - * @param location + * @param range * The start/stop range to convert. * @param negative * Set to 0 to treat string as a positive number, 1 for as a negative number. @@ -478,13 +478,13 @@ extern "C" { * f_number_overflow (with error bit) on integer overflow. */ #ifndef _di_f_conversion_string_to_octal_signed_ - extern f_return_status f_conversion_string_to_octal_signed(const f_string string, f_number_signed *number, const f_string_location location, const bool negative); + extern f_return_status f_conversion_string_to_octal_signed(const f_string string, f_number_signed *number, const f_string_range range, const bool negative); #endif // _di_f_conversion_string_to_octal_signed_ /** * Convert a series of positive octal number characters into an f_number_unsigned. * - * This will stop at one of the following: location.stop or a non-digit. + * This will stop at one of the following: range.stop or a non-digit. * This will ignore NULL values. * This will not process signed statuses (+/-). * @@ -493,7 +493,7 @@ extern "C" { * @param number * This will store the value of the converted string. * This value is only changed on success. - * @param location + * @param range * The start/stop range to convert. * * @return @@ -503,13 +503,13 @@ extern "C" { * f_number_overflow (with error bit) on integer overflow. */ #ifndef _di_f_conversion_string_to_octal_unsigned_ - extern f_return_status f_conversion_string_to_octal_unsigned(const f_string string, f_number_unsigned *number, const f_string_location location); + extern f_return_status f_conversion_string_to_octal_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range); #endif // _di_f_conversion_string_to_octal_unsigned_ /** * Convert a series of positive or negative number characters into an f_number_signed. * - * This will stop at one of the following: location.stop or a non-digit. + * This will stop at one of the following: range.stop or a non-digit. * This will ignore NULL values. * This will process signed statuses (+/-). * This will detect based types as follows: @@ -530,7 +530,7 @@ extern "C" { * @param number * This will store the value of the converted string. * This value is only changed on success. - * @param location + * @param range * The start/stop range to convert. * * @return @@ -545,13 +545,13 @@ extern "C" { * @see strtoll() */ #ifndef _di_f_conversion_string_to_number_signed_ - extern f_return_status f_conversion_string_to_number_signed(const f_string string, f_number_signed *number, const f_string_location location); + extern f_return_status f_conversion_string_to_number_signed(const f_string string, f_number_signed *number, const f_string_range range); #endif // _di_f_conversion_string_to_number_signed_ /** * Convert a series of positive number characters into an f_number_unsigned. * - * This will stop at one of the following: location.stop or a non-digit. + * This will stop at one of the following: range.stop or a non-digit. * This will ignore NULL values. * This will not process signed statuses (+/-). * This will detect based types as follows: @@ -573,7 +573,7 @@ extern "C" { * @param number * This will store the value of the converted string. * This value is only changed on success. - * @param location + * @param range * The start/stop range to convert. * * @return @@ -589,7 +589,7 @@ extern "C" { * @see strtoull() */ #ifndef _di_f_conversion_string_to_number_unsigned_ - extern f_return_status f_conversion_string_to_number_unsigned(const f_string string, f_number_unsigned *number, const f_string_location location); + extern f_return_status f_conversion_string_to_number_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range); #endif // _di_f_conversion_string_to_number_unsigned_ #ifdef __cplusplus diff --git a/level_0/f_fss/c/fss.h b/level_0/f_fss/c/fss.h index 045fc32..8d17a75 100644 --- a/level_0/f_fss/c/fss.h +++ b/level_0/f_fss/c/fss.h @@ -109,21 +109,21 @@ extern "C" { * An array of string locations representing where a delimit was applied or is to be applied with respect to some string. */ #ifndef _di_f_fss_delimits_ - typedef f_string_locations f_fss_delimits; + typedef f_string_ranges f_fss_delimits; - #define f_fss_delimits_initialize f_string_locations_initialize + #define f_fss_delimits_initialize f_string_ranges_initialize #define f_macro_fss_delimits_clear(delimits) f_macro_memory_structure_clear(delimits) - #define f_macro_fss_delimits_new(status, delimits) f_macro_string_locations_new(status, delimits) - #define f_macro_fss_delimits_delete(status, delimits) f_macro_string_locations_delete(status, delimits) - #define f_macro_fss_delimits_destroy(status, delimits) f_macro_string_locations_destroy(status, delimits) + #define f_macro_fss_delimits_new(status, delimits) f_macro_string_ranges_new(status, delimits) + #define f_macro_fss_delimits_delete(status, delimits) f_macro_string_ranges_delete(status, delimits) + #define f_macro_fss_delimits_destroy(status, delimits) f_macro_string_ranges_destroy(status, delimits) - #define f_macro_fss_delimits_delete_simple(delimits) f_macro_string_locations_delete_simple(delimits) - #define f_macro_fss_delimits_destroy_simple(delimits) f_macro_string_locations_destroy_simple(delimits) + #define f_macro_fss_delimits_delete_simple(delimits) f_macro_string_ranges_delete_simple(delimits) + #define f_macro_fss_delimits_destroy_simple(delimits) f_macro_string_ranges_destroy_simple(delimits) - #define f_macro_fss_delimits_resize(status, delimits, new_length) f_macro_string_locations_resize(status, delimits, new_length) - #define f_macro_fss_delimits_adjust(status, delimits, new_length) f_macro_string_locations_adjust(status, delimits, new_length) + #define f_macro_fss_delimits_resize(status, delimits, new_length) f_macro_string_ranges_resize(status, delimits, new_length) + #define f_macro_fss_delimits_adjust(status, delimits, new_length) f_macro_string_ranges_adjust(status, delimits, new_length) #endif // _di_f_fss_delimits_ /** @@ -178,9 +178,9 @@ extern "C" { * This is a location that represents an object. */ #ifndef _di_fss_object_ - typedef f_string_location f_fss_object; + typedef f_string_range f_fss_object; - #define f_fss_object_initialize f_string_location_initialize + #define f_fss_object_initialize f_string_range_initialize #define f_macro_fss_object_new(status, object, length) status = f_memory_new((void **) & object, sizeof(f_fss_object), length) @@ -239,7 +239,7 @@ extern "C" { */ #ifndef _di_fss_content_ typedef struct { - f_string_location *array; + f_string_range *array; f_array_length size; f_array_length used; @@ -249,16 +249,16 @@ extern "C" { #define f_macro_fss_content_clear(content) f_macro_memory_structure_new(content) - #define f_macro_fss_content_new(status, content, length) f_macro_memory_structure_new(status, content, f_string_location, length) + #define f_macro_fss_content_new(status, content, length) f_macro_memory_structure_new(status, content, f_string_range, length) - #define f_macro_fss_content_delete(status, content) f_macro_memory_structure_delete(status, content, f_string_location) - #define f_macro_fss_content_destroy(status, content) f_macro_memory_structure_destroy(status, content, f_string_location) + #define f_macro_fss_content_delete(status, content) f_macro_memory_structure_delete(status, content, f_string_range) + #define f_macro_fss_content_destroy(status, content) f_macro_memory_structure_destroy(status, content, f_string_range) - #define f_macro_fss_content_delete_simple(content) f_macro_memory_structure_delete_simple(content, f_string_location) - #define f_macro_fss_content_destroy_simple(content) f_macro_memory_structure_destroy_simple(content, f_string_location) + #define f_macro_fss_content_delete_simple(content) f_macro_memory_structure_delete_simple(content, f_string_range) + #define f_macro_fss_content_destroy_simple(content) f_macro_memory_structure_destroy_simple(content, f_string_range) - #define f_macro_fss_content_resize(status, content, new_length) f_macro_memory_structure_resize(status, content, f_string_location, new_length) - #define f_macro_fss_content_adjust(status, content, new_length) f_macro_memory_structure_adjust(status, content, f_string_location, new_length) + #define f_macro_fss_content_resize(status, content, new_length) f_macro_memory_structure_resize(status, content, f_string_range, new_length) + #define f_macro_fss_content_adjust(status, content, new_length) f_macro_memory_structure_adjust(status, content, f_string_range, new_length) #endif // _di_fss_content_ /** diff --git a/level_0/f_print/c/print.c b/level_0/f_print/c/print.c index df01b6c..cf2a552 100644 --- a/level_0/f_print/c/print.c +++ b/level_0/f_print/c/print.c @@ -46,18 +46,18 @@ extern "C" { #endif // _di_f_print_string_dynamic_ #ifndef _di_f_print_string_dynamic_partial_ - f_return_status f_print_string_dynamic_partial(FILE *output, const f_string_dynamic buffer, const f_string_location location) { + f_return_status f_print_string_dynamic_partial(FILE *output, const f_string_dynamic buffer, const f_string_range range) { #ifndef _di_level_0_parameter_checking_ - if (location.start < 0) return f_status_set_error(f_invalid_parameter); - if (location.stop < location.start) return f_status_set_error(f_invalid_parameter); + if (range.start < 0) return f_status_set_error(f_invalid_parameter); + if (range.stop < range.start) return f_status_set_error(f_invalid_parameter); if (buffer.used <= 0) return f_status_set_error(f_invalid_parameter); - if (location.start >= buffer.used) return f_status_set_error(f_invalid_parameter); - if (location.stop >= buffer.used) return f_status_set_error(f_invalid_parameter); + if (range.start >= buffer.used) return f_status_set_error(f_invalid_parameter); + if (range.stop >= buffer.used) return f_status_set_error(f_invalid_parameter); #endif // _di_level_0_parameter_checking_ - register f_string_length i = location.start; + register f_string_length i = range.start; - for (; i <= location.stop; i++) { + for (; i <= range.stop; i++) { if (buffer.string[i] != f_string_eos) { if (fputc(buffer.string[i], output) == 0) { return f_status_set_error(f_error_output); diff --git a/level_0/f_print/c/print.h b/level_0/f_print/c/print.h index c3ee408..618cbc9 100644 --- a/level_0/f_print/c/print.h +++ b/level_0/f_print/c/print.h @@ -81,13 +81,13 @@ extern "C" { * * Will not stop at \0. * Will not print \0. - * Will print the only the buffer range specified by location. + * Will print the only the buffer range specified by range. * * @param output * The file to output to, including standard streams such as stdout and stderr. * @param buffer * The string to output. - * @param location + * @param range * The range within the provided string to print. * * @return @@ -96,7 +96,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_f_print_string_dynamic_partial_ - extern f_return_status f_print_string_dynamic_partial(FILE *output, const f_string_dynamic buffer, const f_string_location location); + extern f_return_status f_print_string_dynamic_partial(FILE *output, const f_string_dynamic buffer, const f_string_range range); #endif // _di_f_print_string_dynamic_partial_ #ifdef __cplusplus diff --git a/level_0/f_string/c/string.h b/level_0/f_string/c/string.h index b93b4b3..5fc1b8d 100644 --- a/level_0/f_string/c/string.h +++ b/level_0/f_string/c/string.h @@ -163,14 +163,14 @@ extern "C" { * start: the start position. * stop: the stop position. */ -#ifndef _di_f_string_location_ +#ifndef _di_f_string_range_ typedef struct { f_string_length start; f_string_length stop; - } f_string_location; + } f_string_range; - #define f_string_location_initialize { 1, 0 } -#endif // _di_f_string_location_ + #define f_string_range_initialize { 1, 0 } +#endif // _di_f_string_range_ /** * An array of string locations. @@ -179,29 +179,29 @@ extern "C" { * size: total amount of allocated space. * used: total number of allocated spaces used. */ -#ifndef _di_f_string_locations_ +#ifndef _di_f_string_ranges_ typedef struct { - f_string_location *array; + f_string_range *array; f_array_length size; f_array_length used; - } f_string_locations; + } f_string_ranges; - #define f_string_locations_initialize {0, 0, 0} + #define f_string_ranges_initialize {0, 0, 0} - #define f_macro_string_locations_clear(locations) f_macro_memory_structure_clear(locations) + #define f_macro_string_ranges_clear(locations) f_macro_memory_structure_clear(locations) - #define f_macro_string_locations_new(status, locations, length) f_macro_memory_structure_new(status, locations, f_string_location, length) + #define f_macro_string_ranges_new(status, locations, length) f_macro_memory_structure_new(status, locations, f_string_range, length) - #define f_macro_string_locations_delete(status, locations) f_macro_memory_structure_delete(status, locations, f_string_location) - #define f_macro_string_locations_destroy(status, locations) f_macro_memory_structure_destroy(status, locations, f_string_location) + #define f_macro_string_ranges_delete(status, locations) f_macro_memory_structure_delete(status, locations, f_string_range) + #define f_macro_string_ranges_destroy(status, locations) f_macro_memory_structure_destroy(status, locations, f_string_range) - #define f_macro_string_locations_delete_simple(locations) f_macro_memory_structure_delete_simple(locations, f_string_location) - #define f_macro_string_locations_destroy_simple(locations) f_macro_memory_structure_destroy_simple(locations, f_string_location) + #define f_macro_string_ranges_delete_simple(locations) f_macro_memory_structure_delete_simple(locations, f_string_range) + #define f_macro_string_ranges_destroy_simple(locations) f_macro_memory_structure_destroy_simple(locations, f_string_range) - #define f_macro_string_locations_resize(status, locations, new_length) f_macro_memory_structure_resize(status, locations, f_string_location, new_length) - #define f_macro_string_locations_adjust(status, locations, new_length) f_macro_memory_structure_adjust(status, locations, f_string_location, new_length) -#endif // _di_f_string_locations_ + #define f_macro_string_ranges_resize(status, locations, new_length) f_macro_memory_structure_resize(status, locations, f_string_range, new_length) + #define f_macro_string_ranges_adjust(status, locations, new_length) f_macro_memory_structure_adjust(status, locations, f_string_range, new_length) +#endif // _di_f_string_ranges_ /** * A string that supports contains a size attribute to handle dynamic allocations and deallocations. diff --git a/level_0/f_utf/c/utf.h b/level_0/f_utf/c/utf.h index a4f9ad0..a866d32 100644 --- a/level_0/f_utf/c/utf.h +++ b/level_0/f_utf/c/utf.h @@ -210,24 +210,24 @@ extern "C" { * Designates a start and stop position that represents a sub-string inside of some parent string. * use this to avoid resizing, restructuring, and reallocating the parent string to separate the sub-string. */ -#ifndef _di_f_utf_string_location_ +#ifndef _di_f_utf_string_range_ typedef struct { f_utf_string_length start; f_utf_string_length stop; - } f_utf_string_location; + } f_utf_string_range; - #define f_utf_string_location_initialize { 1, 0 } + #define f_utf_string_range_initialize { 1, 0 } - #define f_macro_utf_string_location_new(status, utf_string_location, length) status = f_memory_new((void **) & utf_string_location, sizeof(f_utf_string_location), length) - #define f_macro_utf_string_location_delete(status, utf_string_location, size) status = f_memory_delete((void **) & utf_string_location, sizeof(f_utf_string_location), size) - #define f_macro_utf_string_location_destroy(status, utf_string_location, size) status = f_memory_destroy((void **) & utf_string_location, sizeof(f_utf_string_location), size) + #define f_macro_utf_string_range_new(status, utf_string_range, length) status = f_memory_new((void **) & utf_string_range, sizeof(f_utf_string_range), length) + #define f_macro_utf_string_range_delete(status, utf_string_range, size) status = f_memory_delete((void **) & utf_string_range, sizeof(f_utf_string_range), size) + #define f_macro_utf_string_range_destroy(status, utf_string_range, size) status = f_memory_destroy((void **) & utf_string_range, sizeof(f_utf_string_range), size) - #define f_macro_utf_string_location_resize(status, utf_string_location, old_length, new_length) \ - status = f_memory_resize((void **) & utf_string_location, sizeof(f_utf_string_location), old_length, new_length) + #define f_macro_utf_string_range_resize(status, utf_string_range, old_length, new_length) \ + status = f_memory_resize((void **) & utf_string_range, sizeof(f_utf_string_range), old_length, new_length) - #define f_macro_utf_string_location_adjust(status, utf_string_location, old_length, new_length) \ - status = f_memory_adjust((void **) & utf_string_location, sizeof(f_utf_string_location), old_length, new_length) -#endif // _di_f_utf_string_location_ + #define f_macro_utf_string_range_adjust(status, utf_string_range, old_length, new_length) \ + status = f_memory_adjust((void **) & utf_string_range, sizeof(f_utf_string_range), old_length, new_length) +#endif // _di_f_utf_string_range_ /** * An array of string locations. @@ -235,26 +235,26 @@ extern "C" { * size: total amount of allocated space. * used: total number of allocated spaces used. */ -#ifndef _di_f_utf_string_locations_ +#ifndef _di_f_utf_string_ranges_ typedef struct { - f_utf_string_location *array; + f_utf_string_range *array; f_array_length size; f_array_length used; - } f_utf_string_locations; + } f_utf_string_ranges; - #define f_utf_string_locations_initialize {0, 0, 0} + #define f_utf_string_ranges_initialize {0, 0, 0} - #define f_clear_utf_string_locations(locations) f_macro_memory_structure_clear(locations) + #define f_clear_utf_string_ranges(locations) f_macro_memory_structure_clear(locations) - #define f_macro_utf_string_location_news(status, locations, length) f_macro_memory_structure_new(status, locations, f_utf_string_location, length) + #define f_macro_utf_string_range_news(status, locations, length) f_macro_memory_structure_new(status, locations, f_utf_string_range, length) - #define f_macro_utf_string_location_deletes(status, locations) f_macro_memory_structure_delete(status, locations, f_utf_string_location) - #define f_macro_utf_string_location_destroys(status, locations) f_macro_memory_structure_destroy(status, locations, f_utf_string_location) + #define f_macro_utf_string_range_deletes(status, locations) f_macro_memory_structure_delete(status, locations, f_utf_string_range) + #define f_macro_utf_string_range_destroys(status, locations) f_macro_memory_structure_destroy(status, locations, f_utf_string_range) - #define f_macro_utf_string_location_resizes(status, locations, new_length) f_macro_memory_structure_resize(status, locations, f_utf_string_location, new_length) - #define f_macro_utf_string_location_adjusts(status, locations, new_length) f_macro_memory_structure_adjust(status, locations, f_utf_string_location, new_length) -#endif // _di_f_utf_string_locations_ + #define f_macro_utf_string_range_resizes(status, locations, new_length) f_macro_memory_structure_resize(status, locations, f_utf_string_range, new_length) + #define f_macro_utf_string_range_adjusts(status, locations, new_length) f_macro_memory_structure_adjust(status, locations, f_utf_string_range, new_length) +#endif // _di_f_utf_string_ranges_ /** * A string that supports contains a size attribute to handle dynamic allocations and deallocations. diff --git a/level_1/fl_console/c/console.c b/level_1/fl_console/c/console.c index 3fdcac4..08a0e99 100644 --- a/level_1/fl_console/c/console.c +++ b/level_1/fl_console/c/console.c @@ -165,11 +165,11 @@ extern "C" { return f_status_set_error(f_no_data); } - f_string_location location = f_string_location_initialize; - location.start = 0; - location.stop = strlen(argument) - 1; + f_string_range range = f_string_range_initialize; + range.start = 0; + range.stop = strlen(argument) - 1; - return f_conversion_string_to_number_signed(argument, number, location); + return f_conversion_string_to_number_signed(argument, number, range); } #endif // _fl_console_parameter_to_number_signed_ @@ -183,11 +183,11 @@ extern "C" { return f_status_set_error(f_no_data); } - f_string_location location = f_string_location_initialize; - location.start = 0; - location.stop = strlen(argument) - 1; + f_string_range range = f_string_range_initialize; + range.start = 0; + range.stop = strlen(argument) - 1; - return f_conversion_string_to_number_unsigned(argument, number, location); + return f_conversion_string_to_number_unsigned(argument, number, range); } #endif // _fl_console_parameter_to_number_unsigned_ diff --git a/level_1/fl_file/c/file.c b/level_1/fl_file/c/file.c index 2517a3e..d162729 100644 --- a/level_1/fl_file/c/file.c +++ b/level_1/fl_file/c/file.c @@ -115,7 +115,7 @@ extern "C" { #endif // _di_fl_file_write_ #ifndef _di_fl_file_write_position_ - f_return_status fl_file_write_position(f_file *file, const f_string_dynamic buffer, const f_string_location position) { + f_return_status fl_file_write_position(f_file *file, const f_string_dynamic buffer, const f_string_range position) { #ifndef _di_level_1_parameter_checking_ if (file == 0) return f_status_set_error(f_invalid_parameter); if (position.start < position.stop) return f_status_set_error(f_invalid_parameter); diff --git a/level_1/fl_file/c/file.h b/level_1/fl_file/c/file.h index e3a6bf1..64306e9 100644 --- a/level_1/fl_file/c/file.h +++ b/level_1/fl_file/c/file.h @@ -100,7 +100,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_file_write_position_ - extern f_return_status fl_file_write_position(f_file *file, const f_string_dynamic buffer, const f_string_location position); + extern f_return_status fl_file_write_position(f_file *file, const f_string_dynamic buffer, const f_string_range position); #endif // _di_fl_file_write_position_ #ifdef __cplusplus diff --git a/level_1/fl_fss/c/fss.c b/level_1/fl_fss/c/fss.c index e0f37d2..08b1a24 100644 --- a/level_1/fl_fss/c/fss.c +++ b/level_1/fl_fss/c/fss.c @@ -5,7 +5,7 @@ extern "C" { #endif #ifndef _di_fl_fss_decrement_buffer_ - f_return_status fl_fss_decrement_buffer(const f_string_dynamic buffer, f_string_location *location, const f_string_length step) { + f_return_status fl_fss_decrement_buffer(const f_string_dynamic buffer, f_string_range *location, const f_string_length step) { #ifndef _di_level_1_parameter_checking_ if (buffer.used <= 0) return f_status_set_error(f_invalid_parameter); if (location->start < 0) return f_status_set_error(f_invalid_parameter); @@ -84,7 +84,7 @@ extern "C" { if (f_conversion_character_is_hexidecimal(buffer.string[i]) == f_true) { i++; - f_string_location length = f_string_location_initialize; + f_string_range length = f_string_range_initialize; length.start = i - 4; length.stop = i; @@ -140,7 +140,7 @@ extern "C" { if (f_conversion_character_is_hexidecimal(buffer.string[i]) == f_true) { i++; - f_string_location length = f_string_location_initialize; + f_string_range length = f_string_range_initialize; length.start = i - 4; length.stop = i; @@ -213,7 +213,7 @@ extern "C" { #endif // _di_fl_fss_identify_file_ #ifndef _di_fl_fss_increment_buffer_ - f_return_status fl_fss_increment_buffer(const f_string_dynamic buffer, f_string_location *location, const f_string_length step) { + f_return_status fl_fss_increment_buffer(const f_string_dynamic buffer, f_string_range *location, const f_string_length step) { #ifndef _di_level_1_parameter_checking_ if (buffer.used <= 0) return f_status_set_error(f_invalid_parameter); if (location->start < 0) return f_status_set_error(f_invalid_parameter); @@ -254,79 +254,79 @@ extern "C" { #endif // _di_fl_fss_increment_buffer_ #ifndef _di_fl_fss_is_graph_ - f_return_status fl_fss_is_graph(const f_string_dynamic buffer, const f_string_location location) { + f_return_status fl_fss_is_graph(const f_string_dynamic buffer, const f_string_range range) { #ifndef _di_level_1_parameter_checking_ if (buffer.used <= 0) return f_status_set_error(f_invalid_parameter); - if (location.start < 0) return f_status_set_error(f_invalid_parameter); - if (location.stop < location.start) return f_status_set_error(f_invalid_parameter); - if (location.start >= buffer.used) return f_status_set_error(f_invalid_parameter); + if (range.start < 0) return f_status_set_error(f_invalid_parameter); + if (range.stop < range.start) return f_status_set_error(f_invalid_parameter); + if (range.start >= buffer.used) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ - f_string_length width_max = (location.stop - location.start) + 1; + f_string_length width_max = (range.stop - range.start) + 1; - if (width_max > buffer.used - location.start) { - width_max = buffer.used - location.start; + if (width_max > buffer.used - range.start) { + width_max = buffer.used - range.start; } // @todo update to check against zero-width space. - return f_utf_is_graph(buffer.string + location.start, width_max); + return f_utf_is_graph(buffer.string + range.start, width_max); } #endif // _di_fl_fss_is_graph_ #ifndef _di_fl_fss_is_space_ - f_return_status fl_fss_is_space(const f_string_dynamic buffer, const f_string_location location) { + f_return_status fl_fss_is_space(const f_string_dynamic buffer, const f_string_range range) { #ifndef _di_level_1_parameter_checking_ if (buffer.used <= 0) return f_status_set_error(f_invalid_parameter); - if (location.start < 0) return f_status_set_error(f_invalid_parameter); - if (location.stop < location.start) return f_status_set_error(f_invalid_parameter); - if (location.start >= buffer.used) return f_status_set_error(f_invalid_parameter); + if (range.start < 0) return f_status_set_error(f_invalid_parameter); + if (range.stop < range.start) return f_status_set_error(f_invalid_parameter); + if (range.start >= buffer.used) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ - f_string_length width_max = (location.stop - location.start) + 1; + f_string_length width_max = (range.stop - range.start) + 1; - if (width_max > buffer.used - location.start) { - width_max = buffer.used - location.start; + if (width_max > buffer.used - range.start) { + width_max = buffer.used - range.start; } // @todo update to check against control characters and zero-width space. - return f_utf_is_whitespace(buffer.string + location.start, width_max); + return f_utf_is_whitespace(buffer.string + range.start, width_max); } #endif // _di_fl_fss_is_space_ #ifndef _di_fl_fss_skip_past_space_ - f_return_status fl_fss_skip_past_space(const f_string_dynamic buffer, f_string_location *location) { + f_return_status fl_fss_skip_past_space(const f_string_dynamic buffer, f_string_range *range) { #ifndef _di_level_1_parameter_checking_ if (buffer.used <= 0) return f_status_set_error(f_invalid_parameter); - if (location == 0) return f_status_set_error(f_invalid_parameter); - if (location->start < 0) return f_status_set_error(f_invalid_parameter); - if (location->stop < location->start) return f_status_set_error(f_invalid_parameter); - if (location->start >= buffer.used) return f_status_set_error(f_invalid_parameter); + if (range == 0) return f_status_set_error(f_invalid_parameter); + if (range->start < 0) return f_status_set_error(f_invalid_parameter); + if (range->stop < range->start) return f_status_set_error(f_invalid_parameter); + if (range->start >= buffer.used) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ f_status status = f_none; unsigned short width = 0; - f_string_length width_max = (location->stop - location->start) + 1; + f_string_length width_max = (range->stop - range->start) + 1; - if (width_max > buffer.used - location->start) { - width_max = buffer.used - location->start; + if (width_max > buffer.used - range->start) { + width_max = buffer.used - range->start; } for (;;) { - if (buffer.string[location->start] != f_string_placeholder) { - status = f_utf_is_whitespace(buffer.string + location->start, width_max); + if (buffer.string[range->start] != f_string_placeholder) { + status = f_utf_is_whitespace(buffer.string + range->start, width_max); if (status == f_false) { - status = f_utf_is_control(buffer.string + location->start, width_max); + status = f_utf_is_control(buffer.string + range->start, width_max); if (status == f_false) { - status = f_utf_is_zero_width(buffer.string + location->start, width_max); + status = f_utf_is_zero_width(buffer.string + range->start, width_max); if (status == f_true) { f_string_length next_width_max = 0; - for (f_string_length next = location->start + 1; next < buffer.used && next <= location->stop; next += f_macro_utf_byte_width_is(buffer.string[next])) { - next_width_max = (location->stop - next) + 1; + for (f_string_length next = range->start + 1; next < buffer.used && next <= range->stop; next += f_macro_utf_byte_width_is(buffer.string[next])) { + next_width_max = (range->stop - next) + 1; status = f_utf_is_whitespace(buffer.string + next, width_max); if (status == f_true) { @@ -368,9 +368,9 @@ extern "C" { else if (f_status_is_error(status)) return status; } - if (buffer.string[location->start] == f_string_eol) return f_none_on_eol; + if (buffer.string[range->start] == f_string_eol) return f_none_on_eol; - width = f_macro_utf_byte_width_is(buffer.string[location->start]); + width = f_macro_utf_byte_width_is(buffer.string[range->start]); if (width == 0) { width = 1; @@ -380,19 +380,19 @@ extern "C" { return f_status_set_error(f_incomplete_utf); } else { - if (location->start + width >= buffer.used) return f_status_set_error(f_incomplete_utf_on_eos); - if (location->start + width > location->stop) return f_status_set_error(f_incomplete_utf_on_stop); + if (range->start + width >= buffer.used) return f_status_set_error(f_incomplete_utf_on_eos); + if (range->start + width > range->stop) return f_status_set_error(f_incomplete_utf_on_stop); } - location->start += width; + range->start += width; - if (location->start >= buffer.used) return f_none_on_eos; - if (location->start > location->stop) return f_none_on_stop; + if (range->start >= buffer.used) return f_none_on_eos; + if (range->start > range->stop) return f_none_on_stop; - width_max = (location->stop - location->start) + 1; + width_max = (range->stop - range->start) + 1; - if (width_max > buffer.used - location->start) { - width_max = buffer.used - location->start; + if (width_max > buffer.used - range->start) { + width_max = buffer.used - range->start; } } // for @@ -405,40 +405,40 @@ extern "C" { #endif // _di_fl_fss_skip_past_space_ #ifndef _di_fl_fss_skip_past_non_graph_ - f_return_status fl_fss_skip_past_non_graph(const f_string_dynamic buffer, f_string_location *location) { + f_return_status fl_fss_skip_past_non_graph(const f_string_dynamic buffer, f_string_range *range) { #ifndef _di_level_1_parameter_checking_ if (buffer.used <= 0) return f_status_set_error(f_invalid_parameter); - if (location == 0) return f_status_set_error(f_invalid_parameter); - if (location->start < 0) return f_status_set_error(f_invalid_parameter); - if (location->stop < location->start) return f_status_set_error(f_invalid_parameter); - if (location->start >= buffer.used) return f_status_set_error(f_invalid_parameter); + if (range == 0) return f_status_set_error(f_invalid_parameter); + if (range->start < 0) return f_status_set_error(f_invalid_parameter); + if (range->stop < range->start) return f_status_set_error(f_invalid_parameter); + if (range->start >= buffer.used) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ f_status status = f_none; unsigned short width = 0; - f_string_length width_max = (location->stop - location->start) + 1; + f_string_length width_max = (range->stop - range->start) + 1; - if (width_max > buffer.used - location->start) { - width_max = buffer.used - location->start; + if (width_max > buffer.used - range->start) { + width_max = buffer.used - range->start; } for (;;) { - if (buffer.string[location->start] != f_string_placeholder) { - status = f_utf_is_graph(buffer.string + location->start, width_max); + if (buffer.string[range->start] != f_string_placeholder) { + status = f_utf_is_graph(buffer.string + range->start, width_max); if (status == f_true) { // stop at a graph. break; } else if (status == f_false) { - status = f_utf_is_zero_width(buffer.string + location->start, width_max); + status = f_utf_is_zero_width(buffer.string + range->start, width_max); if (status == f_true) { f_string_length next_width_max = 0; - for (f_string_length next = location->start + 1; next < buffer.used && next <= location->stop; next += f_macro_utf_byte_width_is(buffer.string[next])) { - next_width_max = (location->stop - next) + 1; + for (f_string_length next = range->start + 1; next < buffer.used && next <= range->stop; next += f_macro_utf_byte_width_is(buffer.string[next])) { + next_width_max = (range->stop - next) + 1; status = f_utf_is_graph(buffer.string + next, width_max); if (status == f_true) { @@ -472,7 +472,7 @@ extern "C" { if (f_status_is_error(status)) return status; - width = f_macro_utf_byte_width_is(buffer.string[location->start]); + width = f_macro_utf_byte_width_is(buffer.string[range->start]); if (width == 0) { width = 1; @@ -482,19 +482,19 @@ extern "C" { return f_status_set_error(f_incomplete_utf); } else { - if (location->start + width >= buffer.used) return f_status_set_error(f_incomplete_utf_on_eos); - if (location->start + width > location->stop) return f_status_set_error(f_incomplete_utf_on_stop); + if (range->start + width >= buffer.used) return f_status_set_error(f_incomplete_utf_on_eos); + if (range->start + width > range->stop) return f_status_set_error(f_incomplete_utf_on_stop); } - location->start += width; + range->start += width; - if (location->start >= buffer.used) return f_none_on_eos; - if (location->start > location->stop) return f_none_on_stop; + if (range->start >= buffer.used) return f_none_on_eos; + if (range->start > range->stop) return f_none_on_stop; - width_max = (location->stop - location->start) + 1; + width_max = (range->stop - range->start) + 1; - if (width_max > buffer.used - location->start) { - width_max = buffer.used - location->start; + if (width_max > buffer.used - range->start) { + width_max = buffer.used - range->start; } } // for @@ -507,12 +507,12 @@ extern "C" { #endif // _di_fl_fss_skip_past_non_graph_ #ifndef _di_fl_fss_shift_delimiters_ - f_return_status fl_fss_shift_delimiters(f_string_dynamic *buffer, const f_string_location location) { + f_return_status fl_fss_shift_delimiters(f_string_dynamic *buffer, const f_string_range range) { #ifndef _di_level_1_parameter_checking_ if (buffer->used <= 0) return f_status_set_error(f_invalid_parameter); - if (location.start < 0) return f_status_set_error(f_invalid_parameter); - if (location.stop < location.start) return f_status_set_error(f_invalid_parameter); - if (location.start >= buffer->used) return f_status_set_error(f_invalid_parameter); + if (range.start < 0) return f_status_set_error(f_invalid_parameter); + if (range.stop < range.start) return f_status_set_error(f_invalid_parameter); + if (range.start >= buffer->used) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ f_string_length position = 0; @@ -520,22 +520,22 @@ extern "C" { unsigned short utf_width = 0; unsigned short i = 0; - position = location.start; + position = range.start; - while (position < buffer->used && position <= location.stop) { + while (position < buffer->used && position <= range.stop) { if (buffer->string[position] == f_fss_delimit_placeholder) { distance++; } // do not waste time trying to process what is only going to be replaced with a delimit placeholder - if (position + distance >= buffer->used || position + distance > location.stop) { + if (position + distance >= buffer->used || position + distance > range.stop) { break; } utf_width = f_macro_utf_byte_width_is(buffer->string[position]); if (utf_width > 1) { - // not enough space in buffer or in location range to process UTF-8 character. - if (position + utf_width >= buffer->used || position + utf_width > location.stop) { + // not enough space in buffer or in range range to process UTF-8 character. + if (position + utf_width >= buffer->used || position + utf_width > range.stop) { return f_status_set_error(f_invalid_utf); } @@ -558,7 +558,7 @@ extern "C" { } if (distance > 0) { - while (position < buffer->used + distance && position <= location.stop) { + while (position < buffer->used + distance && position <= range.stop) { buffer->string[position] = f_fss_delimit_placeholder; position++; } diff --git a/level_1/fl_fss/c/fss.h b/level_1/fl_fss/c/fss.h index 2c4efbb..605ac10 100644 --- a/level_1/fl_fss/c/fss.h +++ b/level_1/fl_fss/c/fss.h @@ -35,7 +35,7 @@ extern "C" { * * @param buffer * The string to process. - * @param location + * @param range * The start and stop positions to be incremented. * The start position will be incremented by step. * @param step @@ -47,14 +47,14 @@ extern "C" { * * @return * f_none on success. - * f_none_on_stop if the stop location is reached before all steps are completed. + * f_none_on_stop if the stop range is reached before all steps are completed. * f_none_on_eos if the end of buffer is reached before all steps are completed. * f_invalid_parameter (with error bit) if a parameter is invalid. - * f_incomplete_utf_on_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed. + * f_incomplete_utf_on_stop (with error bit) if the stop range is reached before the complete UTF-8 character can be processed. * f_incomplete_utf_on_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed. */ #ifndef _di_fl_fss_decrement_buffer_ - extern f_return_status fl_fss_decrement_buffer(const f_string_dynamic buffer, f_string_location *location, const f_string_length step); + extern f_return_status fl_fss_decrement_buffer(const f_string_dynamic buffer, f_string_range *range, const f_string_length step); #endif // _di_fl_fss_decrement_buffer_ /** @@ -104,7 +104,7 @@ extern "C" { * * @param buffer * The string to process. - * @param location + * @param range * The start and stop positions to be incremented. * The start position will be incremented by step. * @param step @@ -116,14 +116,14 @@ extern "C" { * * @return * f_none on success. - * f_none_on_stop if the stop location is reached before all steps are completed. + * f_none_on_stop if the stop range is reached before all steps are completed. * f_none_on_eos if the end of buffer is reached before all steps are completed. * f_invalid_parameter (with error bit) if a parameter is invalid. - * f_incomplete_utf_on_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed. + * f_incomplete_utf_on_stop (with error bit) if the stop range is reached before the complete UTF-8 character can be processed. * f_incomplete_utf_on_eos (with error bit) if the end of buffer is reached before the complete UTF-8 character can be processed. */ #ifndef _di_fl_fss_increment_buffer_ - extern f_return_status fl_fss_increment_buffer(const f_string_dynamic buffer, f_string_location *location, const f_string_length step); + extern f_return_status fl_fss_increment_buffer(const f_string_dynamic buffer, f_string_range *range, const f_string_length step); #endif // _di_fl_fss_increment_buffer_ /** @@ -131,7 +131,7 @@ extern "C" { * * @param buffer * The string to process. - * @param location + * @param range * The character at the start position will be checked against the graph. * @param header * The header data to populate with results of this function. @@ -144,7 +144,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_fss_is_graph_ - extern f_return_status fl_fss_is_graph(const f_string_dynamic buffer, const f_string_location location); + extern f_return_status fl_fss_is_graph(const f_string_dynamic buffer, const f_string_range range); #endif // _di_fl_fss_is_graph_ /** @@ -152,7 +152,7 @@ extern "C" { * * @param buffer * The string to process. - * @param location + * @param range * The character at the start position will be checked against the graph. * @param header * The header data to populate with results of this function. @@ -165,7 +165,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_fss_is_space_ - extern f_return_status fl_fss_is_space(const f_string_dynamic buffer, const f_string_location location); + extern f_return_status fl_fss_is_space(const f_string_dynamic buffer, const f_string_range range); #endif // _di_fl_fss_is_space_ /** @@ -177,16 +177,16 @@ extern "C" { * @param buffer * The string to process. * This gets updated. - * @param location + * @param range * A restriction on where within the buffer the shifting happens. * * @return * f_none on success. - * f_invalid_utf (with error bit) if UTF-8 cannot be fully processed (buffer or location range not long enough). + * f_invalid_utf (with error bit) if UTF-8 cannot be fully processed (buffer or range range not long enough). * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_fss_shift_delimiters_ - extern f_return_status fl_fss_shift_delimiters(f_string_dynamic *buffer, const f_string_location location); + extern f_return_status fl_fss_shift_delimiters(f_string_dynamic *buffer, const f_string_range range); #endif // _di_fl_fss_shift_delimiters_ /** @@ -197,16 +197,16 @@ extern "C" { * * @param buffer * The string to process. - * @param location + * @param range * The start and stop positions in the buffer being processed. - * This increments location->start. + * This increments range->start. * * @return * f_none on success. * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_fss_skip_past_space_ - extern f_return_status fl_fss_skip_past_space(const f_string_dynamic buffer, f_string_location *location); + extern f_return_status fl_fss_skip_past_space(const f_string_dynamic buffer, f_string_range *range); #endif // _di_fl_fss_skip_past_space_ /** @@ -217,16 +217,16 @@ extern "C" { * * @param buffer * The string to process. - * @param location + * @param range * The start and stop positions in the buffer being processed. - * This increments location->start. + * This increments range->start. * * @return * f_none on success. * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_fss_skip_past_non_graph_ - extern f_return_status fl_fss_skip_past_non_graph(const f_string_dynamic buffer, f_string_location *location); + extern f_return_status fl_fss_skip_past_non_graph(const f_string_dynamic buffer, f_string_range *range); #endif // _di_fl_fss_skip_past_non_graph_ #ifdef __cplusplus diff --git a/level_1/fl_fss/c/fss_basic.c b/level_1/fl_fss/c/fss_basic.c index bcc22cb..c085443 100644 --- a/level_1/fl_fss/c/fss_basic.c +++ b/level_1/fl_fss/c/fss_basic.c @@ -5,7 +5,7 @@ extern "C" { #endif #ifndef _di_fl_fss_basic_object_read_ - f_return_status fl_fss_basic_object_read(f_string_dynamic *buffer, f_string_location *location, f_fss_object *found) { + f_return_status fl_fss_basic_object_read(f_string_dynamic *buffer, f_string_range *location, f_fss_object *found) { #ifndef _di_level_1_parameter_checking_ if (buffer == 0) return f_status_set_error(f_invalid_parameter); if (location == 0) return f_status_set_error(f_invalid_parameter); @@ -369,7 +369,7 @@ extern "C" { #endif // _di_fl_fss_basic_object_read_ #ifndef _di_fl_fss_basic_content_read_ - f_return_status fl_fss_basic_content_read(f_string_dynamic *buffer, f_string_location *location, f_fss_content *found) { + f_return_status fl_fss_basic_content_read(f_string_dynamic *buffer, f_string_range *location, f_fss_content *found) { #ifndef _di_level_1_parameter_checking_ if (buffer == 0) return f_status_set_error(f_invalid_parameter); if (location == 0) return f_status_set_error(f_invalid_parameter); @@ -419,7 +419,7 @@ extern "C" { #endif // _di_fl_fss_basic_content_read_ #ifndef _di_fl_fss_basic_object_write_ - f_return_status fl_fss_basic_object_write(f_string_dynamic *buffer, const f_string_dynamic object, f_string_location *location) { + f_return_status fl_fss_basic_object_write(f_string_dynamic *buffer, const f_string_dynamic object, f_string_range *location) { #ifndef _di_level_1_parameter_checking_ if (buffer == 0) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ @@ -427,7 +427,7 @@ extern "C" { f_status status = f_none; bool quoted = f_false; - f_string_location buffer_position = f_string_location_initialize; + f_string_range buffer_position = f_string_range_initialize; f_string_length start_position = f_string_initialize; f_string_length pre_allocate_size = 0; @@ -658,15 +658,15 @@ extern "C" { #endif // _di_fl_fss_basic_object_write_ #ifndef _di_fl_fss_basic_content_write_ - f_return_status fl_fss_basic_content_write(f_string_dynamic *buffer, const f_string_dynamic content, f_string_location *location) { + f_return_status fl_fss_basic_content_write(f_string_dynamic *buffer, const f_string_dynamic content, f_string_range *location) { #ifndef _di_level_1_parameter_checking_ if (buffer == 0) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ f_status status = f_none; - f_string_location input_position = f_string_location_initialize; - f_string_location buffer_position = f_string_location_initialize; + f_string_range input_position = f_string_range_initialize; + f_string_range buffer_position = f_string_range_initialize; f_string_length pre_allocate_size = 0; // add an additional 1 to ensure that there is room for the terminating newline. diff --git a/level_1/fl_fss/c/fss_basic.h b/level_1/fl_fss/c/fss_basic.h index 88eda87..50b7afb 100644 --- a/level_1/fl_fss/c/fss_basic.h +++ b/level_1/fl_fss/c/fss_basic.h @@ -63,7 +63,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_fss_basic_object_read_ - extern f_return_status fl_fss_basic_object_read(f_string_dynamic *buffer, f_string_location *location, f_fss_object *found); + extern f_return_status fl_fss_basic_object_read(f_string_dynamic *buffer, f_string_range *location, f_fss_object *found); #endif // _di_fl_fss_basic_object_read_ /** @@ -98,7 +98,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_fss_basic_content_read_ - extern f_return_status fl_fss_basic_content_read(f_string_dynamic *buffer, f_string_location *location, f_fss_content *found); + extern f_return_status fl_fss_basic_content_read(f_string_dynamic *buffer, f_string_range *location, f_fss_content *found); #endif // _di_fl_fss_basic_content_read_ /** @@ -128,7 +128,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_fss_basic_object_write_ - extern f_return_status fl_fss_basic_object_write(f_string_dynamic *buffer, const f_string_dynamic object, f_string_location *location); + extern f_return_status fl_fss_basic_object_write(f_string_dynamic *buffer, const f_string_dynamic object, f_string_range *location); #endif // _di_fl_fss_basic_object_write_ /** @@ -157,7 +157,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_fss_basic_content_write_ - extern f_return_status fl_fss_basic_content_write(f_string_dynamic *buffer, const f_string_dynamic content, f_string_location *location); + extern f_return_status fl_fss_basic_content_write(f_string_dynamic *buffer, const f_string_dynamic content, f_string_range *location); #endif // _di_fl_fss_basic_content_write_ #ifdef __cplusplus diff --git a/level_1/fl_fss/c/fss_basic_list.c b/level_1/fl_fss/c/fss_basic_list.c index 576e42b..f8a1c6c 100644 --- a/level_1/fl_fss/c/fss_basic_list.c +++ b/level_1/fl_fss/c/fss_basic_list.c @@ -5,7 +5,7 @@ extern "C" { #endif #ifndef _di_fl_fss_basic_list_object_read_ - f_return_status fl_fss_basic_list_object_read(f_string_dynamic *buffer, f_string_location *location, f_fss_object *found) { + f_return_status fl_fss_basic_list_object_read(f_string_dynamic *buffer, f_string_range *location, f_fss_object *found) { #ifndef _di_level_1_parameter_checking_ if (buffer == 0) return f_status_set_error(f_invalid_parameter); if (location == 0) return f_status_set_error(f_invalid_parameter); @@ -179,7 +179,7 @@ extern "C" { #endif // _di_fl_fss_basic_list_object_read_ #ifndef _di_fl_fss_basic_list_content_read_ - f_return_status fl_fss_basic_list_content_read(f_string_dynamic *buffer, f_string_location *location, f_fss_content *found) { + f_return_status fl_fss_basic_list_content_read(f_string_dynamic *buffer, f_string_range *location, f_fss_content *found) { #ifndef _di_level_1_parameter_checking_ if (buffer == 0) return f_status_set_error(f_invalid_parameter); if (location == 0) return f_status_set_error(f_invalid_parameter); @@ -380,14 +380,14 @@ extern "C" { #endif // _di_fl_fss_basic_list_content_read_ #ifndef _di_fl_fss_basic_list_object_write_ - f_return_status fl_fss_basic_list_object_write(const f_string_dynamic object, f_string_location *location, f_string_dynamic *buffer) { + f_return_status fl_fss_basic_list_object_write(const f_string_dynamic object, f_string_range *location, f_string_dynamic *buffer) { #ifndef _di_level_1_parameter_checking_ if (buffer == 0) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ f_status status = f_none; - f_string_location buffer_position = f_string_location_initialize; + f_string_range buffer_position = f_string_range_initialize; f_string_length start_position = f_string_initialize; f_string_length pre_allocate_size = 0; f_string_length start_buffer = 0; @@ -516,7 +516,7 @@ extern "C" { #endif // _di_fl_fss_basic_list_object_write_ #ifndef _di_fl_fss_basic_list_content_write_ - f_return_status fl_fss_basic_list_content_write(const f_string_dynamic content, f_string_location *location, f_string_dynamic *buffer) { + f_return_status fl_fss_basic_list_content_write(const f_string_dynamic content, f_string_range *location, f_string_dynamic *buffer) { #ifndef _di_level_1_parameter_checking_ if (buffer == 0) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ @@ -525,7 +525,7 @@ extern "C" { bool is_comment = f_false; bool has_graph = f_false; - f_string_location buffer_position = f_string_location_initialize; + f_string_range buffer_position = f_string_range_initialize; f_string_length start_position = f_string_initialize; f_string_length pre_allocate_size = 0; diff --git a/level_1/fl_fss/c/fss_basic_list.h b/level_1/fl_fss/c/fss_basic_list.h index d562cb0..a1ca700 100644 --- a/level_1/fl_fss/c/fss_basic_list.h +++ b/level_1/fl_fss/c/fss_basic_list.h @@ -64,7 +64,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_fss_basic_list_object_read_ - extern f_return_status fl_fss_basic_list_object_read(f_string_dynamic *buffer, f_string_location *location, f_fss_object *found); + extern f_return_status fl_fss_basic_list_object_read(f_string_dynamic *buffer, f_string_range *location, f_fss_object *found); #endif // _di_fl_fss_basic_list_object_read_ /** @@ -99,7 +99,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_fss_basic_list_content_read_ - extern f_return_status fl_fss_basic_list_content_read(f_string_dynamic *buffer, f_string_location *location, f_fss_content *found); + extern f_return_status fl_fss_basic_list_content_read(f_string_dynamic *buffer, f_string_range *location, f_fss_content *found); #endif // _di_fl_fss_basic_list_content_read_ /** @@ -130,7 +130,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_fss_basic_list_object_write_ - extern f_return_status fl_fss_basic_list_object_write(const f_string_dynamic object, f_string_location *location, f_string_dynamic *buffer); + extern f_return_status fl_fss_basic_list_object_write(const f_string_dynamic object, f_string_range *location, f_string_dynamic *buffer); #endif // _di_fl_fss_basic_list_object_write_ /** @@ -159,7 +159,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_fss_basic_list_content_write_ - extern f_return_status fl_fss_basic_list_content_write(const f_string_dynamic content, f_string_location *location, f_string_dynamic *buffer); + extern f_return_status fl_fss_basic_list_content_write(const f_string_dynamic content, f_string_range *location, f_string_dynamic *buffer); #endif // _di_fl_fss_basic_list_content_write_ #ifdef __cplusplus diff --git a/level_1/fl_fss/c/fss_extended.c b/level_1/fl_fss/c/fss_extended.c index 189b94f..945c732 100644 --- a/level_1/fl_fss/c/fss_extended.c +++ b/level_1/fl_fss/c/fss_extended.c @@ -5,7 +5,7 @@ extern "C" { #endif #ifndef _di_fl_fss_extended_object_read_ - f_return_status fl_fss_extended_object_read(f_string_dynamic *buffer, f_string_location *location, f_fss_object *found) { + f_return_status fl_fss_extended_object_read(f_string_dynamic *buffer, f_string_range *location, f_fss_object *found) { #ifndef _di_level_1_parameter_checking_ if (buffer == 0) return f_status_set_error(f_invalid_parameter); if (location == 0) return f_status_set_error(f_invalid_parameter); @@ -361,7 +361,7 @@ extern "C" { #endif // _di_fl_fss_extended_object_read_ #ifndef _di_fl_fss_extended_content_read_ - f_return_status fl_fss_extended_content_read(f_string_dynamic *buffer, f_string_location *location, f_fss_content *found) { + f_return_status fl_fss_extended_content_read(f_string_dynamic *buffer, f_string_range *location, f_fss_content *found) { #ifndef _di_level_1_parameter_checking_ if (buffer == 0) return f_status_set_error(f_invalid_parameter); if (location == 0) return f_status_set_error(f_invalid_parameter); @@ -777,7 +777,7 @@ extern "C" { #endif // _di_fl_fss_extended_content_read_ #ifndef _di_fl_fss_extended_object_write_ - f_return_status fl_fss_extended_object_write(const f_string_dynamic object, f_string_location *location, f_string_dynamic *buffer) { + f_return_status fl_fss_extended_object_write(const f_string_dynamic object, f_string_range *location, f_string_dynamic *buffer) { #ifndef _di_level_1_parameter_checking_ if (buffer == 0) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ @@ -785,7 +785,7 @@ extern "C" { f_status status = f_none; bool quoted = f_false; - f_string_location buffer_position = f_string_location_initialize; + f_string_range buffer_position = f_string_range_initialize; f_string_length start_position = f_string_initialize; f_string_length pre_allocate_size = 0; @@ -1033,7 +1033,7 @@ extern "C" { #endif // _di_fl_fss_extended_object_write_ #ifndef _di_fl_fss_extended_content_write_ - f_return_status fl_fss_extended_content_write(const f_string_dynamic content, f_string_location *location, f_string_dynamic *buffer) { + f_return_status fl_fss_extended_content_write(const f_string_dynamic content, f_string_range *location, f_string_dynamic *buffer) { #ifndef _di_level_1_parameter_checking_ if (buffer == 0) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ @@ -1041,7 +1041,7 @@ extern "C" { f_status status = f_none; int8_t quoted = f_string_eos; - f_string_location buffer_position = f_string_location_initialize; + f_string_range buffer_position = f_string_range_initialize; f_string_length start_position = 0; f_string_length pre_allocate_size = 0; diff --git a/level_1/fl_fss/c/fss_extended.h b/level_1/fl_fss/c/fss_extended.h index c461dce..a65d67d 100644 --- a/level_1/fl_fss/c/fss_extended.h +++ b/level_1/fl_fss/c/fss_extended.h @@ -63,7 +63,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_fss_extended_object_read_ - extern f_return_status fl_fss_extended_object_read(f_string_dynamic *buffer, f_string_location *location, f_fss_object *found); + extern f_return_status fl_fss_extended_object_read(f_string_dynamic *buffer, f_string_range *location, f_fss_object *found); #endif // _di_fl_fss_extended_object_read_ /** @@ -98,7 +98,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_fss_extended_content_read_ - extern f_return_status fl_fss_extended_content_read(f_string_dynamic *buffer, f_string_location *location, f_fss_content *found); + extern f_return_status fl_fss_extended_content_read(f_string_dynamic *buffer, f_string_range *location, f_fss_content *found); #endif // _di_fl_fss_extended_content_read_ /** @@ -128,7 +128,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_fss_extended_object_write_ - extern f_return_status fl_fss_extended_object_write(const f_string_dynamic object, f_string_location *location, f_string_dynamic *buffer); + extern f_return_status fl_fss_extended_object_write(const f_string_dynamic object, f_string_range *location, f_string_dynamic *buffer); #endif // _di_fl_fss_extended_object_write_ /** @@ -157,7 +157,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_fss_extended_content_write_ - extern f_return_status fl_fss_extended_content_write(const f_string_dynamic content, f_string_location *location, f_string_dynamic *buffer); + extern f_return_status fl_fss_extended_content_write(const f_string_dynamic content, f_string_range *location, f_string_dynamic *buffer); #endif // _di_fl_fss_extended_content_write_ #ifdef __cplusplus diff --git a/level_1/fl_fss/c/fss_extended_list.c b/level_1/fl_fss/c/fss_extended_list.c index 87415e2..40e1390 100644 --- a/level_1/fl_fss/c/fss_extended_list.c +++ b/level_1/fl_fss/c/fss_extended_list.c @@ -5,7 +5,7 @@ extern "C" { #endif #ifndef _di_fl_fss_extended_list_object_read_ - f_return_status fl_fss_extended_list_object_read(f_string_dynamic *buffer, f_string_location *location, f_fss_object *found) { + f_return_status fl_fss_extended_list_object_read(f_string_dynamic *buffer, f_string_range *location, f_fss_object *found) { #ifndef _di_level_1_parameter_checking_ if (buffer == 0) return f_status_set_error(f_invalid_parameter); if (location == 0) return f_status_set_error(f_invalid_parameter); @@ -181,7 +181,7 @@ extern "C" { #endif // _di_fl_fss_extended_list_object_read_ #ifndef _di_fl_fss_extended_list_content_read_ - f_return_status fl_fss_extended_list_content_read(f_string_dynamic *buffer, f_string_location *location, f_fss_nest *found) { + f_return_status fl_fss_extended_list_content_read(f_string_dynamic *buffer, f_string_range *location, f_fss_nest *found) { #ifndef _di_level_1_parameter_checking_ if (buffer == 0) return f_status_set_error(f_invalid_parameter); if (location == 0) return f_status_set_error(f_invalid_parameter); @@ -757,14 +757,14 @@ extern "C" { #endif // _di_fl_fss_extended_list_content_read_ #ifndef _di_fl_fss_extended_list_object_write_ - f_return_status fl_fss_extended_list_object_write(const f_string_dynamic object, f_string_location *location, f_string_dynamic *buffer) { + f_return_status fl_fss_extended_list_object_write(const f_string_dynamic object, f_string_range *location, f_string_dynamic *buffer) { #ifndef _di_level_1_parameter_checking_ if (buffer == 0) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ f_status status = f_none; - f_string_location buffer_position = f_string_location_initialize; + f_string_range buffer_position = f_string_range_initialize; f_string_length start_position = f_string_initialize; f_string_length pre_allocate_size = 0; f_string_length start_buffer = 0; @@ -903,7 +903,7 @@ extern "C" { #endif // _di_fl_fss_extended_list_object_write_ #ifndef _di_fl_fss_extended_list_content_write_ - f_return_status fl_fss_extended_list_content_write(const f_string_dynamic content, f_string_location *location, f_string_dynamic *buffer) { + f_return_status fl_fss_extended_list_content_write(const f_string_dynamic content, f_string_range *location, f_string_dynamic *buffer) { #ifndef _di_level_1_parameter_checking_ if (buffer == 0) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ @@ -914,7 +914,7 @@ extern "C" { bool is_comment = f_false; bool has_graph = f_false; - f_string_location buffer_position = f_string_location_initialize; + f_string_range buffer_position = f_string_range_initialize; f_string_length start_position = f_string_initialize; f_string_length pre_allocate_size = 0; diff --git a/level_1/fl_fss/c/fss_extended_list.h b/level_1/fl_fss/c/fss_extended_list.h index ff5064d..5765e0b 100644 --- a/level_1/fl_fss/c/fss_extended_list.h +++ b/level_1/fl_fss/c/fss_extended_list.h @@ -64,7 +64,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_fss_extended_list_object_read_ - extern f_return_status fl_fss_extended_list_object_read(f_string_dynamic *buffer, f_string_location *location, f_fss_object *found); + extern f_return_status fl_fss_extended_list_object_read(f_string_dynamic *buffer, f_string_range *location, f_fss_object *found); #endif // _di_fl_fss_extended_list_object_read_ /** @@ -103,7 +103,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_fss_extended_list_content_read_ - extern f_return_status fl_fss_extended_list_content_read(f_string_dynamic *buffer, f_string_location *location, f_fss_nest *found); + extern f_return_status fl_fss_extended_list_content_read(f_string_dynamic *buffer, f_string_range *location, f_fss_nest *found); #endif // _di_fl_fss_extended_list_content_read_ /** @@ -134,7 +134,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_fss_extended_list_object_write_ - extern f_return_status fl_fss_extended_list_object_write(const f_string_dynamic object, f_string_location *location, f_string_dynamic *buffer); + extern f_return_status fl_fss_extended_list_object_write(const f_string_dynamic object, f_string_range *location, f_string_dynamic *buffer); #endif // _di_fl_fss_extended_list_object_write_ /** @@ -163,7 +163,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_fss_extended_list_content_write_ - extern f_return_status fl_fss_extended_list_content_write(const f_string_dynamic content, f_string_location *location, f_string_dynamic *buffer); + extern f_return_status fl_fss_extended_list_content_write(const f_string_dynamic content, f_string_range *location, f_string_dynamic *buffer); #endif // _di_fl_fss_extended_list_content_write_ #ifdef __cplusplus diff --git a/level_1/fl_print/c/print.c b/level_1/fl_print/c/print.c index 3c26540..931411d 100644 --- a/level_1/fl_print/c/print.c +++ b/level_1/fl_print/c/print.c @@ -178,22 +178,22 @@ extern "C" { #endif // _di_fl_print_trim_string_dynamic_ #ifndef _di_fl_print_trim_string_dynamic_partial_ - f_return_status fl_print_trim_string_dynamic_partial(FILE *output, const f_string_dynamic buffer, const f_string_location location) { + f_return_status fl_print_trim_string_dynamic_partial(FILE *output, const f_string_dynamic buffer, const f_string_range range) { #ifndef _di_level_1_parameter_checking_ - if (location.start < 0) return f_status_set_error(f_invalid_parameter); - if (location.stop < location.start) return f_status_set_error(f_invalid_parameter); + if (range.start < 0) return f_status_set_error(f_invalid_parameter); + if (range.stop < range.start) return f_status_set_error(f_invalid_parameter); if (buffer.used <= 0) return f_status_set_error(f_invalid_parameter); - if (location.start >= buffer.used) return f_status_set_error(f_invalid_parameter); - if (location.stop >= buffer.used) return f_status_set_error(f_invalid_parameter); + if (range.start >= buffer.used) return f_status_set_error(f_invalid_parameter); + if (range.stop >= buffer.used) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ - register f_string_length i = location.start; + register f_string_length i = range.start; f_status status = f_none; uint8_t width_max = 0; - for (; i <= location.stop; i += f_macro_utf_byte_width(buffer.string[i])) { - width_max = (location.stop - i) + 1; + for (; i <= range.stop; i += f_macro_utf_byte_width(buffer.string[i])) { + width_max = (range.stop - i) + 1; status = f_utf_is_whitespace(buffer.string + i, width_max); if (f_status_is_error(status)) { @@ -207,14 +207,14 @@ extern "C" { if (status == f_false) break; } // for - for (uint8_t width_i = f_macro_utf_byte_width(buffer.string[i]); i <= location.stop; i += width_i) { + for (uint8_t width_i = f_macro_utf_byte_width(buffer.string[i]); i <= range.stop; i += width_i) { if (buffer.string[i] == f_string_eos) { width_i = 1; continue; } width_i = f_macro_utf_byte_width(buffer.string[i]); - width_max = (location.stop - i) + 1; + width_max = (range.stop - i) + 1; status = f_utf_is_whitespace(buffer.string + i, width_max); if (f_status_is_error(status)) { @@ -228,13 +228,13 @@ extern "C" { if (status == f_true) { f_string_length j = i + width_i; - if (j == location.stop) { + if (j == range.stop) { return f_none; } - for (uint8_t width_j = f_macro_utf_byte_width(buffer.string[j]); j <= location.stop; j += width_j) { + for (uint8_t width_j = f_macro_utf_byte_width(buffer.string[j]); j <= range.stop; j += width_j) { width_j = f_macro_utf_byte_width(buffer.string[j]); - width_max = (location.stop - j) + 1; + width_max = (range.stop - j) + 1; status = f_utf_is_whitespace(buffer.string + j, width_max); if (f_status_is_error(status)) { @@ -448,19 +448,19 @@ extern "C" { #endif // _di_fl_print_trim_utf_string_dynamic_ #ifndef _di_fl_print_trim_utf_string_dynamic_partial_ - f_return_status fl_print_trim_utf_string_dynamic_partial(FILE *output, const f_utf_string_dynamic buffer, const f_utf_string_location location) { + f_return_status fl_print_trim_utf_string_dynamic_partial(FILE *output, const f_utf_string_dynamic buffer, const f_utf_string_range range) { #ifndef _di_level_1_parameter_checking_ - if (location.start < 0) return f_status_set_error(f_invalid_parameter); - if (location.stop < location.start) return f_status_set_error(f_invalid_parameter); + if (range.start < 0) return f_status_set_error(f_invalid_parameter); + if (range.stop < range.start) return f_status_set_error(f_invalid_parameter); if (buffer.used <= 0) return f_status_set_error(f_invalid_parameter); - if (location.start >= buffer.used) return f_status_set_error(f_invalid_parameter); - if (location.stop >= buffer.used) return f_status_set_error(f_invalid_parameter); + if (range.start >= buffer.used) return f_status_set_error(f_invalid_parameter); + if (range.stop >= buffer.used) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ - register f_string_length i = location.start; + register f_string_length i = range.start; f_status status = f_none; - for (; i <= location.stop; i++) { + for (; i <= range.stop; i++) { status = f_utf_character_is_whitespace(buffer.string[i]); if (f_status_is_error(status)) { @@ -474,7 +474,7 @@ extern "C" { if (status == f_false) break; } // for - for (; i <= location.stop; i++) { + for (; i <= range.stop; i++) { if (buffer.string[i] == f_string_eos) continue; status = f_utf_character_is_whitespace(buffer.string[i]); @@ -490,11 +490,11 @@ extern "C" { if (status == f_true) { f_string_length j = i + 1; - if (j == location.stop) { + if (j == range.stop) { return f_none; } - for (; j <= location.stop; j++) { + for (; j <= range.stop; j++) { status = f_utf_character_is_whitespace(buffer.string[j]); if (f_status_is_error(status)) { diff --git a/level_1/fl_print/c/print.h b/level_1/fl_print/c/print.h index 4a83b27..f0675e3 100644 --- a/level_1/fl_print/c/print.h +++ b/level_1/fl_print/c/print.h @@ -86,13 +86,13 @@ extern "C" { * * Will not stop at \0. * Will not print \0. - * Will print the only the buffer range specified by location, except for leading/trailing whitespace. + * Will print the only the buffer range specified by range, except for leading/trailing whitespace. * * @param output * The file to output to, including standard streams such as stdout and stderr. * @param buffer * The string to output. - * @param location + * @param range * The range within the provided string to print. * * @return @@ -103,7 +103,7 @@ extern "C" { * f_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment. */ #ifndef _di_fl_print_trim_string_dynamic_partial_ - extern f_return_status fl_print_trim_string_dynamic_partial(FILE *output, const f_string_dynamic buffer, const f_string_location location); + extern f_return_status fl_print_trim_string_dynamic_partial(FILE *output, const f_string_dynamic buffer, const f_string_range range); #endif // _di_fl_print_trim_string_dynamic_partial_ /** @@ -164,13 +164,13 @@ extern "C" { * * Will not stop at \0. * Will not print \0. - * Will print the only the buffer range specified by location, except for leading/trailing whitespace. + * Will print the only the buffer range specified by range, except for leading/trailing whitespace. * * @param output * The file to output to, including standard streams such as stdout and stderr. * @param buffer * The string to output. - * @param location + * @param range * The range within the provided string to print. * * @return @@ -181,7 +181,7 @@ extern "C" { * f_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment. */ #ifndef _di_fl_print_trim_utf_string_dynamic_partial_ - extern f_return_status fl_print_trim_utf_string_dynamic_partial(FILE *output, const f_utf_string_dynamic buffer, const f_utf_string_location location); + extern f_return_status fl_print_trim_utf_string_dynamic_partial(FILE *output, const f_utf_string_dynamic buffer, const f_utf_string_range range); #endif // _di_fl_print_trim_utf_string_dynamic_partial_ #ifdef __cplusplus diff --git a/level_1/fl_serialized/c/private-serialized.c b/level_1/fl_serialized/c/private-serialized.c index 46982b4..857505d 100644 --- a/level_1/fl_serialized/c/private-serialized.c +++ b/level_1/fl_serialized/c/private-serialized.c @@ -6,7 +6,7 @@ extern "C" { #endif #if !defined(_di_fl_unserialize_simple_find_) || !defined(_di_fl_unserialize_simple_get_) - f_return_status private_fl_unserialize_simple_find(const f_string_dynamic serialized, const f_array_length index, f_string_location *location) { + f_return_status private_fl_unserialize_simple_find(const f_string_dynamic serialized, const f_array_length index, f_string_range *location) { f_status status = f_none; f_array_length i = 0; diff --git a/level_1/fl_serialized/c/private-serialized.h b/level_1/fl_serialized/c/private-serialized.h index cd61998..be6ff5b 100644 --- a/level_1/fl_serialized/c/private-serialized.h +++ b/level_1/fl_serialized/c/private-serialized.h @@ -35,7 +35,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. */ #if !defined(_di_fl_unserialize_simple_find_) || !defined(_di_fl_unserialize_simple_get_) - extern f_return_status private_fl_unserialize_simple_find(const f_string_dynamic serialized, const f_array_length index, f_string_location *location) f_gcc_attribute_visibility_internal; + extern f_return_status private_fl_unserialize_simple_find(const f_string_dynamic serialized, const f_array_length index, f_string_range *location) f_gcc_attribute_visibility_internal; #endif // !defined(_di_fl_unserialize_simple_find_) || !defined(_di_fl_unserialize_simple_get_) #ifdef __cplusplus diff --git a/level_1/fl_serialized/c/serialized.c b/level_1/fl_serialized/c/serialized.c index 10aae56..7541421 100644 --- a/level_1/fl_serialized/c/serialized.c +++ b/level_1/fl_serialized/c/serialized.c @@ -104,7 +104,7 @@ extern "C" { #endif // _di_fl_unserialize_simple_ #ifndef _di_fl_unserialize_simple_map_ - f_return_status fl_unserialize_simple_map(const f_string_dynamic serialized, f_string_locations *locations) { + f_return_status fl_unserialize_simple_map(const f_string_dynamic serialized, f_string_ranges *locations) { #ifndef _di_level_0_parameter_checking_ if (serialized.used == 0) return f_status_set_error(f_invalid_parameter); if (locations == 0) return f_status_set_error(f_invalid_parameter); @@ -122,7 +122,7 @@ extern "C" { if (serialized.string[i] == f_serialized_simple_splitter || i + 1 >= serialized.used) { if (locations->used >= locations->size) { - f_macro_string_locations_resize(status, (*locations), locations->size + f_serialized_default_allocation_step); + f_macro_string_ranges_resize(status, (*locations), locations->size + f_serialized_default_allocation_step); if (f_status_is_error(status)) return status; } @@ -162,13 +162,13 @@ extern "C" { #endif // _di_fl_unserialize_simple_map_ #ifndef _di_fl_unserialize_simple_find_ - f_return_status fl_unserialize_simple_find(const f_string_dynamic serialized, const f_array_length index, f_string_location *location) { + f_return_status fl_unserialize_simple_find(const f_string_dynamic serialized, const f_array_length index, f_string_range *range) { #ifndef _di_level_0_parameter_checking_ if (serialized.used == 0) return f_status_set_error(f_invalid_parameter); - if (location == 0) return f_status_set_error(f_invalid_parameter); + if (range == 0) return f_status_set_error(f_invalid_parameter); #endif // _di_level_0_parameter_checking_ - return private_fl_unserialize_simple_find(serialized, index, location); + return private_fl_unserialize_simple_find(serialized, index, range); } #endif // _di_fl_unserialize_simple_find_ @@ -179,9 +179,9 @@ extern "C" { if (dynamic == 0) return f_status_set_error(f_invalid_parameter); #endif // _di_level_0_parameter_checking_ - f_string_location location = f_string_location_initialize; + f_string_range range = f_string_range_initialize; - f_status status = private_fl_unserialize_simple_find(serialized, index, &location); + f_status status = private_fl_unserialize_simple_find(serialized, index, &range); if (f_status_is_error(status)) return status; @@ -190,7 +190,7 @@ extern "C" { return status; } - f_string_length total = (location.stop - location.start) + 1; + f_string_length total = (range.stop - range.start) + 1; if (total >= dynamic->size) { f_status status_allocation = f_none; @@ -200,7 +200,7 @@ extern "C" { if (f_status_is_error(status_allocation)) return status_allocation; } - memcpy(dynamic->string, serialized.string + location.start, total); + memcpy(dynamic->string, serialized.string + range.start, total); dynamic->used = total; return status; diff --git a/level_1/fl_serialized/c/serialized.h b/level_1/fl_serialized/c/serialized.h index f2e4185..3a338b9 100644 --- a/level_1/fl_serialized/c/serialized.h +++ b/level_1/fl_serialized/c/serialized.h @@ -97,7 +97,7 @@ extern "C" { * f_error_reallocation (with error bit) on memory reallocation error. */ #ifndef _di_fl_unserialize_simple_map_ - extern f_return_status fl_unserialize_simple_map(const f_string_dynamic serialized, f_string_locations *locations); + extern f_return_status fl_unserialize_simple_map(const f_string_dynamic serialized, f_string_ranges *locations); #endif // _di_fl_unserialize_simple_map_ /** @@ -125,7 +125,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_unserialize_simple_find_ - extern f_return_status fl_unserialize_simple_find(const f_string_dynamic serialized, const f_array_length index, f_string_location *location); + extern f_return_status fl_unserialize_simple_find(const f_string_dynamic serialized, const f_array_length index, f_string_range *location); #endif // _di_fl_unserialize_simple_find_ /** diff --git a/level_1/fl_string/c/string.c b/level_1/fl_string/c/string.c index 59e650e..c178b3f 100644 --- a/level_1/fl_string/c/string.c +++ b/level_1/fl_string/c/string.c @@ -150,7 +150,7 @@ extern "C" { #endif // _di_fl_string_dynamic_mish_nulless_ #ifndef _di_fl_string_dynamic_partial_append_ - f_return_status fl_string_dynamic_partial_append(const f_string_dynamic source, const f_string_location range, f_string_dynamic *destination) { + f_return_status fl_string_dynamic_partial_append(const f_string_dynamic source, const f_string_range range, f_string_dynamic *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.stop) return f_status_set_error(f_invalid_parameter); if (destination == 0) return f_status_set_error(f_invalid_parameter); @@ -164,7 +164,7 @@ extern "C" { #endif // _di_fl_string_dynamic_partial_append_ #ifndef _di_fl_string_dynamic_partial_append_nulless_ - f_return_status fl_string_dynamic_partial_append_nulless(const f_string_dynamic source, const f_string_location range, f_string_dynamic *destination) { + f_return_status fl_string_dynamic_partial_append_nulless(const f_string_dynamic source, const f_string_range range, f_string_dynamic *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.stop) return f_status_set_error(f_invalid_parameter); if (destination == 0) return f_status_set_error(f_invalid_parameter); @@ -178,7 +178,7 @@ extern "C" { #endif // _di_fl_string_dynamic_append_nulless_ #ifndef _di_fl_string_dynamic_partial_compare_ - f_return_status fl_string_dynamic_partial_compare(const f_string_dynamic string1, const f_string_dynamic string2, const f_string_location range1, const f_string_location range2) { + f_return_status fl_string_dynamic_partial_compare(const f_string_dynamic string1, const f_string_dynamic string2, const f_string_range range1, const f_string_range range2) { #ifndef _di_level_1_parameter_checking_ if (string1.used <= range1.stop) return f_status_set_error(f_invalid_parameter); if (string2.used <= range2.stop) return f_status_set_error(f_invalid_parameter); @@ -189,7 +189,7 @@ extern "C" { #endif // _di_fl_string_dynamic_partial_compare_ #ifndef _di_fl_string_dynamic_partial_compare_trim_ - f_return_status fl_string_dynamic_partial_compare_trim(const f_string_dynamic string1, const f_string_dynamic string2, const f_string_location range1, const f_string_location range2) { + f_return_status fl_string_dynamic_partial_compare_trim(const f_string_dynamic string1, const f_string_dynamic string2, const f_string_range range1, const f_string_range range2) { #ifndef _di_level_1_parameter_checking_ if (string1.used <= range1.stop) return f_status_set_error(f_invalid_parameter); if (string2.used <= range2.stop) return f_status_set_error(f_invalid_parameter); @@ -200,7 +200,7 @@ extern "C" { #endif // _di_fl_string_dynamic_partial_compare_trim_ #ifndef _di_fl_string_dynamic_partial_mash_ - f_return_status fl_string_dynamic_partial_mash(const f_string glue, const f_string_length glue_length, const f_string_dynamic source, const f_string_location range, f_string_dynamic *destination) { + f_return_status fl_string_dynamic_partial_mash(const f_string glue, const f_string_length glue_length, const f_string_dynamic source, const f_string_range range, f_string_dynamic *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.stop) return f_status_set_error(f_invalid_parameter); if (destination == 0) return f_status_set_error(f_invalid_parameter); @@ -220,7 +220,7 @@ extern "C" { #endif // _di_fl_string_dynamic_partial_mash_ #ifndef _di_fl_string_dynamic_partial_mash_nulless_ - f_return_status fl_string_dynamic_partial_mash_nulless(const f_string glue, const f_string_length glue_length, const f_string_dynamic source, const f_string_location range, f_string_dynamic *destination) { + f_return_status fl_string_dynamic_partial_mash_nulless(const f_string glue, const f_string_length glue_length, const f_string_dynamic source, const f_string_range range, f_string_dynamic *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.stop) return f_status_set_error(f_invalid_parameter); if (destination == 0) return f_status_set_error(f_invalid_parameter); @@ -240,7 +240,7 @@ extern "C" { #endif // _di_fl_string_dynamic_partial_mash_nulless_ #ifndef _di_fl_string_dynamic_partial_mish_ - f_return_status fl_string_partial_dynamic_mish(const f_string glue, const f_string_length glue_length, const f_string_dynamic source, const f_string_location range, f_string_dynamic *destination) { + f_return_status fl_string_partial_dynamic_mish(const f_string glue, const f_string_length glue_length, const f_string_dynamic source, const f_string_range range, f_string_dynamic *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.stop) return f_status_set_error(f_invalid_parameter); if (destination == 0) return f_status_set_error(f_invalid_parameter); @@ -260,7 +260,7 @@ extern "C" { #endif // _di_fl_string_dynamic_partial_mish_ #ifndef _di_fl_string_dynamic_partial_mish_nulless_ - f_return_status fl_string_dynamic_partial_mish_nulless(const f_string glue, const f_string_length glue_length, const f_string_dynamic source, const f_string_location range, f_string_dynamic *destination) { + f_return_status fl_string_dynamic_partial_mish_nulless(const f_string glue, const f_string_length glue_length, const f_string_dynamic source, const f_string_range range, f_string_dynamic *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.stop) return f_status_set_error(f_invalid_parameter); if (destination == 0) return f_status_set_error(f_invalid_parameter); @@ -280,7 +280,7 @@ extern "C" { #endif // _di_fl_string_dynamic_partial_mish_nulless_ #ifndef _di_fl_string_dynamic_partial_prepend_ - f_return_status fl_string_dynamic_partial_prepend(const f_string_dynamic source, const f_string_location range, f_string_dynamic *destination) { + f_return_status fl_string_dynamic_partial_prepend(const f_string_dynamic source, const f_string_range range, f_string_dynamic *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.stop) return f_status_set_error(f_invalid_parameter); if (destination == 0) return f_status_set_error(f_invalid_parameter); @@ -294,7 +294,7 @@ extern "C" { #endif // _di_fl_string_dynamic_partial_prepend_ #ifndef _di_fl_string_dynamic_partial_prepend_nulless_ - f_return_status fl_string_dynamic_partial_prepend_nulless(const f_string_dynamic source, const f_string_location range, f_string_dynamic *destination) { + f_return_status fl_string_dynamic_partial_prepend_nulless(const f_string_dynamic source, const f_string_range range, f_string_dynamic *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.stop) return f_status_set_error(f_invalid_parameter); if (destination == 0) return f_status_set_error(f_invalid_parameter); @@ -332,7 +332,7 @@ extern "C" { #endif // _di_fl_string_dynamic_prepend_nulless_ #ifndef _di_fl_string_dynamic_rip_ - f_return_status fl_string_dynamic_rip(const f_string_dynamic source, const f_string_location range, f_string_dynamic *destination) { + f_return_status fl_string_dynamic_rip(const f_string_dynamic source, const f_string_range range, f_string_dynamic *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.start) return f_status_set_error(f_invalid_parameter); if (source.used <= range.stop) return f_status_set_error(f_invalid_parameter); @@ -347,7 +347,7 @@ extern "C" { #endif // _di_fl_string_dynamic_rip_ #ifndef _di_fl_string_dynamic_rip_nulless_ - f_return_status fl_string_dynamic_rip_nulless(const f_string_dynamic source, const f_string_location range, f_string_dynamic *destination) { + f_return_status fl_string_dynamic_rip_nulless(const f_string_dynamic source, const f_string_range range, f_string_dynamic *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.start) return f_status_set_error(f_invalid_parameter); if (source.used <= range.stop) return f_status_set_error(f_invalid_parameter); @@ -362,7 +362,7 @@ extern "C" { #endif // _di_fl_string_dynamic_rip_nulless_ #ifndef _di_fl_string_dynamic_seek_line_to_ - f_return_status fl_string_dynamic_seek_line_to(const f_string_dynamic buffer, f_string_location *range, const int8_t seek_to_this) { + f_return_status fl_string_dynamic_seek_line_to(const f_string_dynamic buffer, f_string_range *range, const int8_t seek_to_this) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); if (buffer.used <= range->start) return f_status_set_error(f_invalid_parameter); @@ -386,7 +386,7 @@ extern "C" { #endif // _di_fl_string_dynamic_seek_line_to_ #ifndef _di_fl_string_dynamic_seek_line_to_utf_character_ - f_return_status fl_string_dynamic_seek_line_to_utf_character(const f_string_dynamic buffer, f_string_location *range, const f_utf_character seek_to_this) { + f_return_status fl_string_dynamic_seek_line_to_utf_character(const f_string_dynamic buffer, f_string_range *range, const f_utf_character seek_to_this) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); if (buffer.used <= range->start) return f_status_set_error(f_invalid_parameter); @@ -449,7 +449,7 @@ extern "C" { #endif // _di_fl_string_dynamic_seek_line_to_utf_character_ #ifndef _di_fl_string_dynamic_seek_line_until_graph_ - f_return_status fl_string_dynamic_seek_line_until_graph(const f_string_dynamic buffer, f_string_location *range, const int8_t placeholder) { + f_return_status fl_string_dynamic_seek_line_until_graph(const f_string_dynamic buffer, f_string_range *range, const int8_t placeholder) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); if (buffer.used <= range->start) return f_status_set_error(f_invalid_parameter); @@ -505,7 +505,7 @@ extern "C" { #endif // _di_fl_string_dynamic_seek_line_until_graph_ #ifndef _di_fl_string_dynamic_seek_line_until_non_graph_ - f_return_status fl_string_dynamic_seek_line_until_non_graph(const f_string_dynamic buffer, f_string_location *range, const int8_t placeholder) { + f_return_status fl_string_dynamic_seek_line_until_non_graph(const f_string_dynamic buffer, f_string_range *range, const int8_t placeholder) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); if (buffer.used <= range->start) return f_status_set_error(f_invalid_parameter); @@ -561,7 +561,7 @@ extern "C" { #endif // _di_fl_string_dynamic_seek_line_until_non_graph_ #ifndef _di_fl_string_dynamic_seek_to_ - f_return_status fl_string_dynamic_seek_to(const f_string_dynamic buffer, f_string_location *range, const int8_t seek_to_this) { + f_return_status fl_string_dynamic_seek_to(const f_string_dynamic buffer, f_string_range *range, const int8_t seek_to_this) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); if (buffer.used <= range->start) return f_status_set_error(f_invalid_parameter); @@ -583,7 +583,7 @@ extern "C" { #endif // _di_fl_string_dynamic_seek_to_ #ifndef _di_fl_string_dynamic_seek_to_utf_character_ - f_return_status fl_string_dynamic_seek_to_utf_character(const f_string_dynamic buffer, f_string_location *range, const f_utf_character seek_to_this) { + f_return_status fl_string_dynamic_seek_to_utf_character(const f_string_dynamic buffer, f_string_range *range, const f_utf_character seek_to_this) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); if (buffer.used <= range->start) return f_status_set_error(f_invalid_parameter); @@ -807,7 +807,7 @@ extern "C" { #endif // _di_fl_string_rip_nulless_ #ifndef _di_fl_string_seek_line_to_ - f_return_status fl_string_seek_line_to(const f_string string, f_string_location *range, const int8_t seek_to_this) { + f_return_status fl_string_seek_line_to(const f_string string, f_string_range *range, const int8_t seek_to_this) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ @@ -827,7 +827,7 @@ extern "C" { #endif // _di_fl_string_seek_line_to_ #ifndef _di_fl_string_seek_line_to_utf_character_ - f_return_status fl_string_seek_line_to_utf_character(const f_string string, f_string_location *range, const f_utf_character seek_to_this) { + f_return_status fl_string_seek_line_to_utf_character(const f_string string, f_string_range *range, const f_utf_character seek_to_this) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ @@ -878,7 +878,7 @@ extern "C" { #endif // _di_fl_string_seek_line_to_utf_character_ #ifndef _di_fl_string_seek_line_until_graph_ - f_return_status fl_string_seek_line_until_graph(const f_string string, f_string_location *range, const int8_t placeholder) { + f_return_status fl_string_seek_line_until_graph(const f_string string, f_string_range *range, const int8_t placeholder) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ @@ -921,7 +921,7 @@ extern "C" { #endif // _di_fl_string_seek_line_until_graph_ #ifndef _di_fl_string_seek_line_until_non_graph_ - f_return_status fl_string_seek_line_until_non_graph(const f_string string, f_string_location *range, const int8_t placeholder) { + f_return_status fl_string_seek_line_until_non_graph(const f_string string, f_string_range *range, const int8_t placeholder) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ @@ -967,7 +967,7 @@ extern "C" { #endif // _di_fl_string_seek_line_until_non_graph_ #ifndef _di_fl_string_seek_to_ - f_return_status fl_string_seek_to(const f_string string, f_string_location *range, const int8_t seek_to_this) { + f_return_status fl_string_seek_to(const f_string string, f_string_range *range, const int8_t seek_to_this) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ @@ -985,7 +985,7 @@ extern "C" { #endif // _di_fl_string_seek_to_ #ifndef _di_fl_string_seek_to_utf_character_ - f_return_status fl_string_seek_to_utf_character(const f_string string, f_string_location *range, const f_utf_character seek_to_this) { + f_return_status fl_string_seek_to_utf_character(const f_string string, f_string_range *range, const f_utf_character seek_to_this) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ diff --git a/level_1/fl_string/c/string.h b/level_1/fl_string/c/string.h index c33de73..5aa479a 100644 --- a/level_1/fl_string/c/string.h +++ b/level_1/fl_string/c/string.h @@ -377,7 +377,7 @@ extern "C" { * @see fl_string_dynamic_partial_append_nulless() */ #ifndef _di_fl_string_dynamic_partial_append_ - extern f_return_status fl_string_dynamic_partial_append(const f_string_dynamic source, const f_string_location range, f_string_dynamic *destination); + extern f_return_status fl_string_dynamic_partial_append(const f_string_dynamic source, const f_string_range range, f_string_dynamic *destination); #endif // _di_fl_string_dynamic_partial_append_ /** @@ -403,7 +403,7 @@ extern "C" { * @see fl_string_dynamic_partial_append() */ #ifndef _di_fl_string_dynamic_partial_append_nulless_ - extern f_return_status fl_string_dynamic_partial_append_nulless(const f_string_dynamic source, const f_string_location range, f_string_dynamic *destination); + extern f_return_status fl_string_dynamic_partial_append_nulless(const f_string_dynamic source, const f_string_range range, f_string_dynamic *destination); #endif // _di_fl_string_dynamic_partial_append_nulless_ /** @@ -432,7 +432,7 @@ extern "C" { * @see fl_string_dynamic_compare_trim() */ #ifndef _di_fl_string_dynamic_partial_compare_ - extern f_return_status fl_string_dynamic_partial_compare(const f_string_dynamic string1, const f_string_dynamic string2, const f_string_location range1, const f_string_location range2); + extern f_return_status fl_string_dynamic_partial_compare(const f_string_dynamic string1, const f_string_dynamic string2, const f_string_range range1, const f_string_range range2); #endif // _di_fl_string_dynamic_partial_compare_ /** @@ -462,7 +462,7 @@ extern "C" { * @see fl_string_dynamic_compare_trim() */ #ifndef _di_fl_string_dynamic_partial_compare_trim_ - extern f_return_status fl_string_dynamic_partial_compare_trim(const f_string_dynamic string1, const f_string_dynamic string2, const f_string_location range1, const f_string_location range2); + extern f_return_status fl_string_dynamic_partial_compare_trim(const f_string_dynamic string1, const f_string_dynamic string2, const f_string_range range1, const f_string_range range2); #endif // _di_fl_string_dynamic_partial_compare_trim_ /** @@ -492,7 +492,7 @@ extern "C" { * @see fl_string_dynamic_partial_mash_nulless() */ #ifndef _di_fl_string_dynamic_partial_mash_ - extern f_return_status fl_string_dynamic_partial_mash(const f_string glue, const f_string_length glue_length, const f_string_dynamic source, const f_string_location range, f_string_dynamic *destination); + extern f_return_status fl_string_dynamic_partial_mash(const f_string glue, const f_string_length glue_length, const f_string_dynamic source, const f_string_range range, f_string_dynamic *destination); #endif // _di_fl_string_dynamic_partial_mash_ /** @@ -524,7 +524,7 @@ extern "C" { * @see fl_string_dynamic_partial_mash() */ #ifndef _di_fl_string_dynamic_partial_mash_nulless_ - extern f_return_status fl_string_dynamic_partial_mash_nulless(const f_string glue, const f_string_length glue_length, const f_string_dynamic source, const f_string_location range, f_string_dynamic *destination); + extern f_return_status fl_string_dynamic_partial_mash_nulless(const f_string glue, const f_string_length glue_length, const f_string_dynamic source, const f_string_range range, f_string_dynamic *destination); #endif // _di_fl_string_dynamic_partial_mash_nulless_ /** @@ -554,7 +554,7 @@ extern "C" { * @see fl_string_dynamic_partial_mish_nulless() */ #ifndef _di_fl_string_dynamic_partial_mish_ - extern f_return_status fl_string_dynamic_partial_mish(const f_string glue, const f_string_length glue_length, const f_string_dynamic source, const f_string_location range, f_string_dynamic *destination); + extern f_return_status fl_string_dynamic_partial_mish(const f_string glue, const f_string_length glue_length, const f_string_dynamic source, const f_string_range range, f_string_dynamic *destination); #endif // _di_fl_string_dynamic_partial_mish_ /** @@ -586,7 +586,7 @@ extern "C" { * @see fl_string_dynamic_partial_mish() */ #ifndef _di_fl_string_dynamic_partial_mish_nulless_ - extern f_return_status fl_string_dynamic_partial_mish_nulless(const f_string glue, const f_string_length glue_length, const f_string_dynamic source, const f_string_location range, f_string_dynamic *destination); + extern f_return_status fl_string_dynamic_partial_mish_nulless(const f_string glue, const f_string_length glue_length, const f_string_dynamic source, const f_string_range range, f_string_dynamic *destination); #endif // _di_fl_string_dynamic_partial_mish_nulless_ /** @@ -612,7 +612,7 @@ extern "C" { * @see fl_string_dynamic_partial_prepend_nulless() */ #ifndef _di_fl_string_dynamic_partial_prepend_ - extern f_return_status fl_string_dynamic_partial_prepend(const f_string_dynamic source, const f_string_location range, f_string_dynamic *destination); + extern f_return_status fl_string_dynamic_partial_prepend(const f_string_dynamic source, const f_string_range range, f_string_dynamic *destination); #endif // _di_fl_string_dynamic_partial_prepend_ /** @@ -638,7 +638,7 @@ extern "C" { * @see fl_string_dynamic_partial_prepend() */ #ifndef _di_fl_string_dynamic_partial_prepend_nulless_ - extern f_return_status fl_string_dynamic_partial_prepend_nulless(const f_string_dynamic source, const f_string_location range, f_string_dynamic *destination); + extern f_return_status fl_string_dynamic_partial_prepend_nulless(const f_string_dynamic source, const f_string_range range, f_string_dynamic *destination); #endif // _di_fl_string_dynamic_partial_prepend_nulless_ /** @@ -712,7 +712,7 @@ extern "C" { * @see fl_string_dynamic_rip_nulless() */ #ifndef _di_fl_string_dynamic_rip_ - extern f_return_status fl_string_dynamic_rip(const f_string_dynamic source, const f_string_location range, f_string_dynamic *destination); + extern f_return_status fl_string_dynamic_rip(const f_string_dynamic source, const f_string_range range, f_string_dynamic *destination); #endif // _di_fl_string_dynamic_rip_ /** @@ -740,7 +740,7 @@ extern "C" { * @see fl_string_dynamic_rip() */ #ifndef _di_fl_string_dynamic_rip_nulless_ - extern f_return_status fl_string_dynamic_rip_nulless(const f_string_dynamic source, const f_string_location range, f_string_dynamic *destination); + extern f_return_status fl_string_dynamic_rip_nulless(const f_string_dynamic source, const f_string_range range, f_string_dynamic *destination); #endif // _di_fl_string_dynamic_rip_nulless_ /** @@ -765,7 +765,7 @@ extern "C" { * @see fl_string_seek_line_to_utf_character() */ #ifndef _di_fl_string_dynamic_seek_line_to_ - extern f_return_status fl_string_dynamic_seek_line_to(const f_string_dynamic buffer, f_string_location *range, const int8_t seek_to_this); + extern f_return_status fl_string_dynamic_seek_line_to(const f_string_dynamic buffer, f_string_range *range, const int8_t seek_to_this); #endif // _di_fl_string_dynamic_seek_line_to_ /** @@ -793,7 +793,7 @@ extern "C" { * @see fl_string_seek_line_to() */ #ifndef _di_fl_string_dynamic_seek_line_to_utf_character_ - extern f_return_status fl_string_dynamic_seek_line_to_utf_character(const f_string_dynamic buffer, f_string_location *range, const f_utf_character seek_to_this); + extern f_return_status fl_string_dynamic_seek_line_to_utf_character(const f_string_dynamic buffer, f_string_range *range, const f_utf_character seek_to_this); #endif // _di_fl_string_dynamic_seek_line_to_utf_character_ /** @@ -820,7 +820,7 @@ extern "C" { * @see fl_string_seek_line_until_graph() */ #ifndef _di_fl_string_dynamic_seek_line_until_graph_ - extern f_return_status fl_string_dynamic_seek_line_until_graph(const f_string_dynamic buffer, f_string_location *range, const int8_t placeholder); + extern f_return_status fl_string_dynamic_seek_line_until_graph(const f_string_dynamic buffer, f_string_range *range, const int8_t placeholder); #endif // _di_fl_string_dynamic_seek_line_until_graph_ /** @@ -848,7 +848,7 @@ extern "C" { * @see fl_string_seek_line_until_non_graph() */ #ifndef _di_fl_string_dynamic_seek_line_until_non_graph_ - extern f_return_status fl_string_dynamic_seek_line_until_non_graph(const f_string_dynamic buffer, f_string_location *range, const int8_t placeholder); + extern f_return_status fl_string_dynamic_seek_line_until_non_graph(const f_string_dynamic buffer, f_string_range *range, const int8_t placeholder); #endif // _di_fl_string_dynamic_seek_line_until_non_graph_ /** @@ -876,7 +876,7 @@ extern "C" { * @see fl_string_seek_to_utf_character() */ #ifndef _di_fl_string_dynamic_seek_to_ - extern f_return_status fl_string_dynamic_seek_to(const f_string_dynamic buffer, f_string_location *range, const int8_t seek_to_this); + extern f_return_status fl_string_dynamic_seek_to(const f_string_dynamic buffer, f_string_range *range, const int8_t seek_to_this); #endif // _di_fl_string_dynamic_seek_to_ /** @@ -905,7 +905,7 @@ extern "C" { * @see fl_string_seek_to_character() */ #ifndef _di_fl_string_dynamic_seek_to_utf_character_ - extern f_return_status fl_string_dynamic_seek_to_utf_character(const f_string_dynamic buffer, f_string_location *range, const f_utf_character seek_to_this); + extern f_return_status fl_string_dynamic_seek_to_utf_character(const f_string_dynamic buffer, f_string_range *range, const f_utf_character seek_to_this); #endif // _di_fl_string_dynamic_seek_to_utf_character_ /** @@ -1183,7 +1183,7 @@ extern "C" { * @see fl_string_seek_line_to_utf_character() */ #ifndef _di_fl_string_seek_line_to_ - extern f_return_status fl_string_seek_line_to(const f_string string, f_string_location *range, const int8_t seek_to_this); + extern f_return_status fl_string_seek_line_to(const f_string string, f_string_range *range, const int8_t seek_to_this); #endif // _di_fl_string_seek_line_to_ /** @@ -1209,7 +1209,7 @@ extern "C" { * @see fl_string_seek_line_to() */ #ifndef _di_fl_string_seek_line_to_utf_character_ - extern f_return_status fl_string_seek_line_to_utf_character(const f_string string, f_string_location *range, const f_utf_character seek_to_this); + extern f_return_status fl_string_seek_line_to_utf_character(const f_string string, f_string_range *range, const f_utf_character seek_to_this); #endif // _di_fl_string_seek_line_to_utf_character_ /** @@ -1235,7 +1235,7 @@ extern "C" { * @see fl_string_dynamic_seek_line_until_graph() */ #ifndef _di_fl_string_seek_line_until_graph_ - extern f_return_status fl_string_seek_line_until_graph(const f_string string, f_string_location *range, const int8_t placeholder); + extern f_return_status fl_string_seek_line_until_graph(const f_string string, f_string_range *range, const int8_t placeholder); #endif // _di_fl_string_seek_line_until_graph_ /** @@ -1262,7 +1262,7 @@ extern "C" { * @see fl_string_dynamic_seek_line_until_non_graph() */ #ifndef _di_fl_string_seek_line_until_non_graph_ - extern f_return_status fl_string_seek_line_until_non_graph(const f_string string, f_string_location *range, const int8_t placeholder); + extern f_return_status fl_string_seek_line_until_non_graph(const f_string string, f_string_range *range, const int8_t placeholder); #endif // _di_fl_string_seek_line_until_non_graph_ /** @@ -1288,7 +1288,7 @@ extern "C" { * @see fl_string_seek_to_utf_character() */ #ifndef _di_fl_string_seek_to_ - extern f_return_status fl_string_seek_to(const f_string string, f_string_location *range, const int8_t seek_to_this); + extern f_return_status fl_string_seek_to(const f_string string, f_string_range *range, const int8_t seek_to_this); #endif // _di_fl_string_seek_to_ /** @@ -1315,7 +1315,7 @@ extern "C" { * @see fl_string_seek_to() */ #ifndef _di_fl_string_seek_to_utf_character_ - extern f_return_status fl_string_seek_to_utf_character(const f_string string, f_string_location *range, const f_utf_character seek_to_this); + extern f_return_status fl_string_seek_to_utf_character(const f_string string, f_string_range *range, const f_utf_character seek_to_this); #endif // _di_fl_string_seek_to_utf_character_ #ifdef __cplusplus diff --git a/level_1/fl_utf/c/utf.c b/level_1/fl_utf/c/utf.c index e508797..a9140ca 100644 --- a/level_1/fl_utf/c/utf.c +++ b/level_1/fl_utf/c/utf.c @@ -168,7 +168,7 @@ extern "C" { #endif // _di_f_utf_string_dynamic_compare_trim_ #ifndef _di_fl_utf_string_dynamic_partial_append_ - f_return_status fl_utf_string_dynamic_partial_append(const f_utf_string_dynamic source, const f_utf_string_location range, f_utf_string_dynamic *destination) { + f_return_status fl_utf_string_dynamic_partial_append(const f_utf_string_dynamic source, const f_utf_string_range range, f_utf_string_dynamic *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.stop) return f_status_set_error(f_invalid_parameter); if (destination == 0) return f_status_set_error(f_invalid_parameter); @@ -182,7 +182,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_partial_append_ #ifndef _di_fl_utf_string_dynamic_partial_append_nulless_ - f_return_status fl_utf_string_dynamic_partial_append_nulless(const f_utf_string_dynamic source, const f_utf_string_location range, f_utf_string_dynamic *destination) { + f_return_status fl_utf_string_dynamic_partial_append_nulless(const f_utf_string_dynamic source, const f_utf_string_range range, f_utf_string_dynamic *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.stop) return f_status_set_error(f_invalid_parameter); if (destination == 0) return f_status_set_error(f_invalid_parameter); @@ -196,7 +196,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_partial_append_nulless_ #ifndef _di_fl_utf_string_dynamic_partial_compare_ - f_return_status fl_utf_string_dynamic_partial_compare(const f_utf_string_dynamic string1, const f_utf_string_dynamic string2, const f_utf_string_location range1, const f_utf_string_location range2) { + f_return_status fl_utf_string_dynamic_partial_compare(const f_utf_string_dynamic string1, const f_utf_string_dynamic string2, const f_utf_string_range range1, const f_utf_string_range range2) { #ifndef _di_level_1_parameter_checking_ if (string1.used <= range1.stop) return f_status_set_error(f_invalid_parameter); if (string2.used <= range2.stop) return f_status_set_error(f_invalid_parameter); @@ -207,7 +207,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_partial_compare_ #ifndef _di_fl_utf_string_dynamic_partial_compare_trim_ - f_return_status fl_utf_string_dynamic_partial_comparetrim(const f_utf_string_dynamic string1, const f_utf_string_dynamic string2, const f_utf_string_location range1, const f_utf_string_location range2) { + f_return_status fl_utf_string_dynamic_partial_comparetrim(const f_utf_string_dynamic string1, const f_utf_string_dynamic string2, const f_utf_string_range range1, const f_utf_string_range range2) { #ifndef _di_level_1_parameter_checking_ if (string1.used <= range1.stop) return f_status_set_error(f_invalid_parameter); if (string2.used <= range2.stop) return f_status_set_error(f_invalid_parameter); @@ -218,7 +218,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_partial_compare_trim_ #ifndef _di_fl_utf_string_dynamic_partial_mash_ - f_return_status fl_utf_string_dynamic_partial_mash(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_dynamic source, const f_utf_string_location range, f_utf_string_dynamic *destination) { + f_return_status fl_utf_string_dynamic_partial_mash(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_dynamic source, const f_utf_string_range range, f_utf_string_dynamic *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.stop) return f_status_set_error(f_invalid_parameter); if (destination == 0) return f_status_set_error(f_invalid_parameter); @@ -240,7 +240,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_partial_mash_ #ifndef _di_fl_utf_string_dynamic_partial_mash_nulless_ - f_return_status fl_utf_string_dynamic_partial_mash_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_dynamic source, const f_utf_string_location range, f_utf_string_dynamic *destination) { + f_return_status fl_utf_string_dynamic_partial_mash_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_dynamic source, const f_utf_string_range range, f_utf_string_dynamic *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.stop) return f_status_set_error(f_invalid_parameter); if (destination == 0) return f_status_set_error(f_invalid_parameter); @@ -262,7 +262,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_partial_mash_nulless_ #ifndef _di_fl_utf_string_dynamic_partial_mish_ - f_return_status fl_utf_string_dynamic_partial_mish(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_dynamic source, const f_utf_string_location range, f_utf_string_dynamic *destination) { + f_return_status fl_utf_string_dynamic_partial_mish(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_dynamic source, const f_utf_string_range range, f_utf_string_dynamic *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.stop) return f_status_set_error(f_invalid_parameter); if (destination == 0) return f_status_set_error(f_invalid_parameter); @@ -284,7 +284,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_partial_mish_ #ifndef _di_fl_utf_string_dynamic_partial_mish_nulless_ - f_return_status fl_utf_string_dynamic_partial_mish_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_dynamic source, const f_utf_string_location range, f_utf_string_dynamic *destination) { + f_return_status fl_utf_string_dynamic_partial_mish_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_dynamic source, const f_utf_string_range range, f_utf_string_dynamic *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.stop) return f_status_set_error(f_invalid_parameter); if (destination == 0) return f_status_set_error(f_invalid_parameter); @@ -306,7 +306,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_partial_mish_nulless_ #ifndef _di_fl_utf_string_dynamic_partial_prepend_ - f_return_status fl_utf_string_dynamic_partial_prepend(const f_utf_string_dynamic source, const f_utf_string_location range, f_utf_string_dynamic *destination) { + f_return_status fl_utf_string_dynamic_partial_prepend(const f_utf_string_dynamic source, const f_utf_string_range range, f_utf_string_dynamic *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.stop) return f_status_set_error(f_invalid_parameter); if (destination == 0) return f_status_set_error(f_invalid_parameter); @@ -320,7 +320,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_partial_prepend_ #ifndef _di_fl_utf_string_dynamic_partial_prepend_nulless_ - f_return_status fl_utf_string_dynamic_partial_prepend_nulless(const f_utf_string_dynamic source, const f_utf_string_location range, f_utf_string_dynamic *destination) { + f_return_status fl_utf_string_dynamic_partial_prepend_nulless(const f_utf_string_dynamic source, const f_utf_string_range range, f_utf_string_dynamic *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.stop) return f_status_set_error(f_invalid_parameter); if (destination == 0) return f_status_set_error(f_invalid_parameter); @@ -358,7 +358,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_prepend_nulless_ #ifndef _di_fl_utf_string_dynamic_rip_ - f_return_status fl_utf_string_dynamic_rip(const f_utf_string_dynamic source, const f_utf_string_location range, f_utf_string_dynamic *destination) { + f_return_status fl_utf_string_dynamic_rip(const f_utf_string_dynamic source, const f_utf_string_range range, f_utf_string_dynamic *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.start) return f_status_set_error(f_invalid_parameter); if (source.used <= range.stop) return f_status_set_error(f_invalid_parameter); @@ -373,7 +373,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_rip_ #ifndef _di_fl_utf_string_dynamic_rip_nulless_ - f_return_status fl_utf_string_dynamic_rip_nulless(const f_utf_string_dynamic source, const f_utf_string_location range, f_utf_string_dynamic *destination) { + f_return_status fl_utf_string_dynamic_rip_nulless(const f_utf_string_dynamic source, const f_utf_string_range range, f_utf_string_dynamic *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.start) return f_status_set_error(f_invalid_parameter); if (source.used <= range.stop) return f_status_set_error(f_invalid_parameter); @@ -388,7 +388,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_rip_nulless_ #ifndef _di_fl_utf_string_dynamic_seek_line_to_ - f_return_status fl_utf_string_dynamic_seek_line_to(const f_utf_string_dynamic buffer, f_utf_string_location *range, const f_utf_character seek_to_this) { + f_return_status fl_utf_string_dynamic_seek_line_to(const f_utf_string_dynamic buffer, f_utf_string_range *range, const f_utf_character seek_to_this) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); if (buffer.used <= range->start) return f_status_set_error(f_invalid_parameter); @@ -420,7 +420,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_seek_line_to_ #ifndef _di_fl_utf_string_dynamic_seek_line_to_char_ - f_return_status fl_utf_string_dynamic_seek_line_to_char(const f_utf_string_dynamic buffer, f_utf_string_location *range, const int8_t seek_to_this) { + f_return_status fl_utf_string_dynamic_seek_line_to_char(const f_utf_string_dynamic buffer, f_utf_string_range *range, const int8_t seek_to_this) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); if (buffer.used <= range->start) return f_status_set_error(f_invalid_parameter); @@ -454,7 +454,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_seek_line_to_character_ #ifndef _di_fl_utf_string_dynamic_seek_line_until_graph_ - f_return_status fl_utf_string_dynamic_seek_line_until_graph(const f_utf_string_dynamic buffer, f_utf_string_location *range, const f_utf_character placeholder) { + f_return_status fl_utf_string_dynamic_seek_line_until_graph(const f_utf_string_dynamic buffer, f_utf_string_range *range, const f_utf_character placeholder) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); if (buffer.used <= range->start) return f_status_set_error(f_invalid_parameter); @@ -496,7 +496,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_seek_line_until_graph_ #ifndef _di_fl_utf_string_dynamic_seek_line_until_non_graph_ - f_return_status fl_utf_string_dynamic_seek_line_until_non_graph(const f_utf_string_dynamic buffer, f_utf_string_location *range, const f_utf_character placeholder) { + f_return_status fl_utf_string_dynamic_seek_line_until_non_graph(const f_utf_string_dynamic buffer, f_utf_string_range *range, const f_utf_character placeholder) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); if (buffer.used <= range->start) return f_status_set_error(f_invalid_parameter); @@ -538,7 +538,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_seek_line_until_non_graph_ #ifndef _di_fl_utf_string_dynamic_seek_to_ - f_return_status fl_utf_string_dynamic_seek_to(const f_utf_string_dynamic buffer, f_utf_string_location *range, const f_utf_character seek_to_this) { + f_return_status fl_utf_string_dynamic_seek_to(const f_utf_string_dynamic buffer, f_utf_string_range *range, const f_utf_character seek_to_this) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); if (buffer.used <= range->start) return f_status_set_error(f_invalid_parameter); @@ -568,7 +568,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_seek_to_ #ifndef _di_fl_utf_string_dynamic_seek_to_char_ - f_return_status fl_utf_string_dynamic_seek_to_char(const f_utf_string_dynamic buffer, f_utf_string_location *range, const int8_t seek_to_this) { + f_return_status fl_utf_string_dynamic_seek_to_char(const f_utf_string_dynamic buffer, f_utf_string_range *range, const int8_t seek_to_this) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); if (buffer.used <= range->start) return f_status_set_error(f_invalid_parameter); @@ -771,7 +771,7 @@ extern "C" { #endif // _di_fl_utf_string_rip_nulless_ #ifndef _di_fl_utf_string_seek_line_to_ - f_return_status fl_utf_string_seek_line_to(const f_utf_string string, f_utf_string_location *range, const f_utf_character seek_to_this) { + f_return_status fl_utf_string_seek_line_to(const f_utf_string string, f_utf_string_range *range, const f_utf_character seek_to_this) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ @@ -799,7 +799,7 @@ extern "C" { #endif // _di_fl_utf_string_seek_line_to_ #ifndef _di_fl_utf_string_seek_line_to_char_ - f_return_status fl_utf_string_seek_line_to_char(const f_utf_string string, f_utf_string_location *range, const int8_t seek_to_this) { + f_return_status fl_utf_string_seek_line_to_char(const f_utf_string string, f_utf_string_range *range, const int8_t seek_to_this) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ @@ -824,7 +824,7 @@ extern "C" { #endif // _di_fl_utf_string_seek_line_to_char_ #ifndef _di_fl_utf_string_seek_line_until_graph_ - f_return_status fl_utf_string_seek_line_until_graph(const f_utf_string string, f_utf_string_location *range, const f_utf_character placeholder) { + f_return_status fl_utf_string_seek_line_until_graph(const f_utf_string string, f_utf_string_range *range, const f_utf_character placeholder) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ @@ -862,7 +862,7 @@ extern "C" { #endif // _di_fl_utf_string_seek_line_until_graph_ #ifndef _di_fl_utf_string_seek_line_until_non_graph_ - f_return_status fl_utf_string_seek_line_until_non_graph(const f_utf_string string, f_utf_string_location *range, const f_utf_character placeholder) { + f_return_status fl_utf_string_seek_line_until_non_graph(const f_utf_string string, f_utf_string_range *range, const f_utf_character placeholder) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ @@ -900,7 +900,7 @@ extern "C" { #endif // _di_fl_utf_string_seek_line_until_non_graph_ #ifndef _di_fl_utf_string_seek_to_ - f_return_status fl_utf_string_seek_to(const f_utf_string string, f_utf_string_location *range, const f_utf_character seek_to_this) { + f_return_status fl_utf_string_seek_to(const f_utf_string string, f_utf_string_range *range, const f_utf_character seek_to_this) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ @@ -926,7 +926,7 @@ extern "C" { #endif // _di_fl_utf_string_seek_to_ #ifndef _di_fl_utf_string_seek_to_char_ - f_return_status fl_utf_string_seek_to_char(const f_utf_string string, f_utf_string_location *range, const int8_t seek_to_this) { + f_return_status fl_utf_string_seek_to_char(const f_utf_string string, f_utf_string_range *range, const int8_t seek_to_this) { #ifndef _di_level_1_parameter_checking_ if (range == 0) return f_status_set_error(f_invalid_parameter); #endif // _di_level_1_parameter_checking_ diff --git a/level_1/fl_utf/c/utf.h b/level_1/fl_utf/c/utf.h index de8d5bd..3b14cd2 100644 --- a/level_1/fl_utf/c/utf.h +++ b/level_1/fl_utf/c/utf.h @@ -389,7 +389,7 @@ extern "C" { * @see fl_utf_string_dynamic_partial_append_nulless() */ #ifndef _di_fl_utf_string_dynamic_partial_append_ - extern f_return_status fl_utf_string_dynamic_partial_append(const f_utf_string_dynamic source, const f_utf_string_location range, f_utf_string_dynamic *destination); + extern f_return_status fl_utf_string_dynamic_partial_append(const f_utf_string_dynamic source, const f_utf_string_range range, f_utf_string_dynamic *destination); #endif // _di_fl_utf_string_dynamic_partial_append_ /** @@ -415,7 +415,7 @@ extern "C" { * @see fl_utf_string_dynamic_partial_append() */ #ifndef _di_fl_utf_string_dynamic_partial_append_nulless_ - extern f_return_status fl_utf_string_dynamic_partial_append_nulless(const f_utf_string_dynamic source, const f_utf_string_location range, f_utf_string_dynamic *destination); + extern f_return_status fl_utf_string_dynamic_partial_append_nulless(const f_utf_string_dynamic source, const f_utf_string_range range, f_utf_string_dynamic *destination); #endif // _di_fl_utf_string_dynamic_partial_append_nulless_ /** @@ -445,7 +445,7 @@ extern "C" { * @see fl_utf_string_dynamic_compare_trim() */ #ifndef _di_fl_utf_string_dynamic_partial_compare_ - extern f_return_status fl_utf_string_dynamic_partial_compare(const f_utf_string_dynamic string1, const f_utf_string_dynamic string2, const f_utf_string_location range1, const f_utf_string_location range2); + extern f_return_status fl_utf_string_dynamic_partial_compare(const f_utf_string_dynamic string1, const f_utf_string_dynamic string2, const f_utf_string_range range1, const f_utf_string_range range2); #endif // _di_fl_utf_string_dynamic_partial_compare_ /** @@ -476,7 +476,7 @@ extern "C" { * @see fl_utf_string_dynamic_compare_trim() */ #ifndef _di_fl_utf_string_dynamic_partial_compare_trim_ - extern f_return_status fl_utf_string_dynamic_partial_compare_trim(const f_utf_string_dynamic string1, const f_utf_string_dynamic string2, const f_utf_string_location range1, const f_utf_string_location range2); + extern f_return_status fl_utf_string_dynamic_partial_compare_trim(const f_utf_string_dynamic string1, const f_utf_string_dynamic string2, const f_utf_string_range range1, const f_utf_string_range range2); #endif // _di_fl_utf_string_dynamic_partial_compare_trim_ /** @@ -506,7 +506,7 @@ extern "C" { * @see fl_utf_string_dynamic_mash_nulless() */ #ifndef _di_fl_utf_string_dynamic_partial_mash_ - extern f_return_status fl_utf_string_dynamic_partial_mash(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_dynamic source, const f_utf_string_location range, f_utf_string_dynamic *destination); + extern f_return_status fl_utf_string_dynamic_partial_mash(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_dynamic source, const f_utf_string_range range, f_utf_string_dynamic *destination); #endif // _di_fl_utf_string_dynamic_partial_mash_ /** @@ -538,7 +538,7 @@ extern "C" { * @see fl_utf_string_dynamic_partial_mash() */ #ifndef _di_fl_utf_string_dynamic_partial_mash_nulless_ - extern f_return_status fl_utf_string_dynamic_partial_mash_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_dynamic source, const f_utf_string_location range, f_utf_string_dynamic *destination); + extern f_return_status fl_utf_string_dynamic_partial_mash_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_dynamic source, const f_utf_string_range range, f_utf_string_dynamic *destination); #endif // _di_fl_utf_string_dynamic_partial_mash_nulless_ /** @@ -568,7 +568,7 @@ extern "C" { * @see fl_utf_string_dynamic_partial_mish_nulless() */ #ifndef _di_fl_utf_string_dynamic_partial_mish_ - extern f_return_status fl_utf_string_dynamic_partial_mish(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_dynamic source, const f_utf_string_location range, f_utf_string_dynamic *destination); + extern f_return_status fl_utf_string_dynamic_partial_mish(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_dynamic source, const f_utf_string_range range, f_utf_string_dynamic *destination); #endif // _di_fl_utf_string_dynamic_partial_mish_ /** @@ -600,7 +600,7 @@ extern "C" { * @see fl_utf_string_dynamic_partial_mish() */ #ifndef _di_fl_utf_string_dynamic_partial_mish_nulless_ - extern f_return_status fl_utf_string_dynamic_partial_mish_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_dynamic source, const f_utf_string_location range, f_utf_string_dynamic *destination); + extern f_return_status fl_utf_string_dynamic_partial_mish_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_dynamic source, const f_utf_string_range range, f_utf_string_dynamic *destination); #endif // _di_fl_utf_string_dynamic_partial_mish_nulless_ /** @@ -626,7 +626,7 @@ extern "C" { * @see fl_utf_string_dynamic_partial_prepend_nulless() */ #ifndef _di_fl_utf_string_dynamic_partial_prepend_ - extern f_return_status fl_utf_string_dynamic_partial_prepend(const f_utf_string_dynamic source, const f_utf_string_location range, f_utf_string_dynamic *destination); + extern f_return_status fl_utf_string_dynamic_partial_prepend(const f_utf_string_dynamic source, const f_utf_string_range range, f_utf_string_dynamic *destination); #endif // _di_fl_utf_string_dynamic_partial_prepend_ /** @@ -652,7 +652,7 @@ extern "C" { * @see fl_utf_string_dynamic_partial_prepend() */ #ifndef _di_fl_utf_string_dynamic_partial_prepend_nulless_ - extern f_return_status fl_utf_string_dynamic_partial_prepend_nulless(const f_utf_string_dynamic source, const f_utf_string_location range, f_utf_string_dynamic *destination); + extern f_return_status fl_utf_string_dynamic_partial_prepend_nulless(const f_utf_string_dynamic source, const f_utf_string_range range, f_utf_string_dynamic *destination); #endif // _di_fl_utf_string_dynamic_partial_prepend_nulless_ /** @@ -726,7 +726,7 @@ extern "C" { * @see fl_utf_string_dynamic_rip_nulless() */ #ifndef _di_fl_utf_string_dynamic_rip_ - extern f_return_status fl_utf_string_dynamic_rip(const f_utf_string_dynamic source, const f_utf_string_location range, f_utf_string_dynamic *destination); + extern f_return_status fl_utf_string_dynamic_rip(const f_utf_string_dynamic source, const f_utf_string_range range, f_utf_string_dynamic *destination); #endif // _di_fl_utf_string_dynamic_rip_ /** @@ -754,7 +754,7 @@ extern "C" { * @see fl_utf_string_dynamic_rip() */ #ifndef _di_fl_utf_string_dynamic_rip_nulless_ - extern f_return_status fl_utf_string_dynamic_rip_nulless(const f_utf_string_dynamic source, const f_utf_string_location range, f_utf_string_dynamic *destination); + extern f_return_status fl_utf_string_dynamic_rip_nulless(const f_utf_string_dynamic source, const f_utf_string_range range, f_utf_string_dynamic *destination); #endif // _di_fl_utf_string_dynamic_rip_nulless_ /** @@ -780,7 +780,7 @@ extern "C" { * @see fl_utf_string_seek_line_to_char() */ #ifndef _di_fl_utf_string_dynamic_seek_line_to_ - extern f_return_status fl_utf_string_dynamic_seek_line_to(const f_utf_string_dynamic buffer, f_utf_string_location *range, const f_utf_character seek_to_this); + extern f_return_status fl_utf_string_dynamic_seek_line_to(const f_utf_string_dynamic buffer, f_utf_string_range *range, const f_utf_character seek_to_this); #endif // _di_fl_utf_string_dynamic_seek_line_to_ /** @@ -805,7 +805,7 @@ extern "C" { * @see fl_utf_string_seek_line_to() */ #ifndef _di_fl_utf_string_seek_line_to_char_ - extern f_return_status fl_utf_string_dynamic_seek_line_to_char(const f_utf_string_dynamic buffer, f_utf_string_location *range, const int8_t seek_to_this); + extern f_return_status fl_utf_string_dynamic_seek_line_to_char(const f_utf_string_dynamic buffer, f_utf_string_range *range, const int8_t seek_to_this); #endif // _di_fl_utf_string_seek_line_to_char_ /** @@ -828,7 +828,7 @@ extern "C" { * @see fl_utf_string_seek_line_until_graph() */ #ifndef _di_fl_utf_string_dynamic_seek_line_until_graph_ - extern f_return_status fl_utf_string_dynamic_seek_line_until_graph(const f_utf_string_dynamic buffer, f_utf_string_location *range, const f_utf_character placeholder); + extern f_return_status fl_utf_string_dynamic_seek_line_until_graph(const f_utf_string_dynamic buffer, f_utf_string_range *range, const f_utf_character placeholder); #endif // _di_fl_utf_string_dynamic_seek_line_until_graph_ /** @@ -852,7 +852,7 @@ extern "C" { * @see fl_utf_string_seek_line_until_non_graph() */ #ifndef _di_fl_utf_string_dynamic_seek_line_until_non_graph_ - extern f_return_status fl_utf_string_dynamic_seek_line_until_non_graph(const f_utf_string_dynamic buffer, f_utf_string_location *range, const f_utf_character placeholder); + extern f_return_status fl_utf_string_dynamic_seek_line_until_non_graph(const f_utf_string_dynamic buffer, f_utf_string_range *range, const f_utf_character placeholder); #endif // _di_fl_utf_string_dynamic_seek_line_until_non_graph_ /** @@ -878,7 +878,7 @@ extern "C" { * @see fl_utf_string_seek_to_char() */ #ifndef _di_fl_utf_string_dynamic_seek_to_ - extern f_return_status fl_utf_string_dynamic_seek_to(const f_utf_string_dynamic buffer, f_utf_string_location *range, const f_utf_character seek_to_this); + extern f_return_status fl_utf_string_dynamic_seek_to(const f_utf_string_dynamic buffer, f_utf_string_range *range, const f_utf_character seek_to_this); #endif // _di_fl_utf_string_dynamic_seek_to_ /** @@ -904,7 +904,7 @@ extern "C" { * @see fl_utf_string_seek_to_char() */ #ifndef _di_fl_utf_string_dynamic_seek_to_char_ - extern f_return_status fl_utf_string_dynamic_seek_to_char(const f_utf_string_dynamic buffer, f_utf_string_location *range, const int8_t seek_to_this); + extern f_return_status fl_utf_string_dynamic_seek_to_char(const f_utf_string_dynamic buffer, f_utf_string_range *range, const int8_t seek_to_this); #endif // _di_fl_utf_string_dynamic_seek_to_char_ /** @@ -933,7 +933,7 @@ extern "C" { * @see fl_utf_string_seek_to_character() */ #ifndef _di_fl_utf_string_dynamic_seek_to_utf_character_ - extern f_return_status fl_utf_string_dynamic_seek_to_utf_character(const f_utf_string_dynamic buffer, f_utf_string_location *range, const f_utf_character seek_to_this); + extern f_return_status fl_utf_string_dynamic_seek_to_utf_character(const f_utf_string_dynamic buffer, f_utf_string_range *range, const f_utf_character seek_to_this); #endif // _di_fl_utf_string_dynamic_seek_to_utf_character_ /** @@ -1227,7 +1227,7 @@ extern "C" { * @see fl_utf_string_seek_line_to_char() */ #ifndef _di_fl_utf_string_seek_line_to_ - extern f_return_status fl_utf_string_seek_line_to(const f_utf_string string, f_utf_string_location *range, const f_utf_character seek_to_this); + extern f_return_status fl_utf_string_seek_line_to(const f_utf_string string, f_utf_string_range *range, const f_utf_character seek_to_this); #endif // _di_fl_utf_string_seek_line_to_ /** @@ -1251,7 +1251,7 @@ extern "C" { * @see fl_utf_string_seek_line_to() */ #ifndef _di_fl_utf_string_seek_line_to_char_ - extern f_return_status fl_utf_string_seek_line_to_char(const f_utf_string string, f_utf_string_location *range, const int8_t seek_to_this); + extern f_return_status fl_utf_string_seek_line_to_char(const f_utf_string string, f_utf_string_range *range, const int8_t seek_to_this); #endif // _di_fl_utf_string_seek_line_to_char_ /** @@ -1278,7 +1278,7 @@ extern "C" { * @see fl_utf_string_dynamic_seek_line_until_graph() */ #ifndef _di_fl_utf_string_seek_line_until_graph_ - extern f_return_status fl_utf_string_seek_line_until_graph(const f_utf_string string, f_utf_string_location *range, const f_utf_character placeholder); + extern f_return_status fl_utf_string_seek_line_until_graph(const f_utf_string string, f_utf_string_range *range, const f_utf_character placeholder); #endif // _di_fl_utf_string_seek_line_until_graph_ /** @@ -1306,7 +1306,7 @@ extern "C" { * @see fl_utf_string_dynamic_seek_line_until_non_graph() */ #ifndef _di_fl_utf_string_seek_line_until_non_graph_ - extern f_return_status fl_utf_string_seek_line_until_non_graph(const f_utf_string string, f_utf_string_location *range, const f_utf_character placeholder); + extern f_return_status fl_utf_string_seek_line_until_non_graph(const f_utf_string string, f_utf_string_range *range, const f_utf_character placeholder); #endif // _di_fl_utf_string_seek_line_until_non_graph_ /** @@ -1332,7 +1332,7 @@ extern "C" { * @see fl_utf_string_seek_to_char() */ #ifndef _di_fl_utf_string_seek_to_ - extern f_return_status fl_utf_string_seek_to(const f_utf_string string, f_utf_string_location *range, const f_utf_character seek_to_this); + extern f_return_status fl_utf_string_seek_to(const f_utf_string string, f_utf_string_range *range, const f_utf_character seek_to_this); #endif // _di_fl_utf_string_seek_to_ /** @@ -1358,7 +1358,7 @@ extern "C" { * @see fl_utf_string_seek_to() */ #ifndef _di_fl_utf_string_seek_to_character_ - extern f_return_status fl_utf_string_seek_to_char(const f_utf_string string, f_utf_string_location *range, const int8_t seek_to_this); + extern f_return_status fl_utf_string_seek_to_char(const f_utf_string string, f_utf_string_range *range, const int8_t seek_to_this); #endif // _di_fl_utf_string__seek_to_character_ #ifdef __cplusplus diff --git a/level_1/fl_utf_file/c/utf_file.c b/level_1/fl_utf_file/c/utf_file.c index 7118745..61adf45 100644 --- a/level_1/fl_utf_file/c/utf_file.c +++ b/level_1/fl_utf_file/c/utf_file.c @@ -224,7 +224,7 @@ extern "C" { #endif // _di_fl_utf_file_write_ #ifndef _di_fl_utf_file_write_position_ - f_return_status fl_utf_file_write_position(f_file *file, const f_utf_string_dynamic buffer, const f_utf_string_location position) { + f_return_status fl_utf_file_write_position(f_file *file, const f_utf_string_dynamic buffer, const f_utf_string_range position) { #ifndef _di_level_1_parameter_checking_ if (file == 0) return f_status_set_error(f_invalid_parameter); if (position.start < position.stop) return f_status_set_error(f_invalid_parameter); diff --git a/level_1/fl_utf_file/c/utf_file.h b/level_1/fl_utf_file/c/utf_file.h index 94e9f86..3a4d20c 100644 --- a/level_1/fl_utf_file/c/utf_file.h +++ b/level_1/fl_utf_file/c/utf_file.h @@ -114,7 +114,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_utf_file_write_position_ - extern f_return_status fl_utf_file_write_position(f_file *file, const f_utf_string_dynamic buffer, const f_utf_string_location position); + extern f_return_status fl_utf_file_write_position(f_file *file, const f_utf_string_dynamic buffer, const f_utf_string_range position); #endif // _di_fl_utf_file_write_position_ #ifdef __cplusplus diff --git a/level_2/fll_fss/c/fss_basic.c b/level_2/fll_fss/c/fss_basic.c index 1f99ec3..bd891a2 100644 --- a/level_2/fll_fss/c/fss_basic.c +++ b/level_2/fll_fss/c/fss_basic.c @@ -5,10 +5,10 @@ extern "C" { #endif #ifndef _di_fll_fss_basic_read_ - f_return_status fll_fss_basic_read(f_string_dynamic *buffer, f_string_location *location, f_fss_objects *objects, f_fss_contents *contents) { + f_return_status fll_fss_basic_read(f_string_dynamic *buffer, f_string_range *range, f_fss_objects *objects, f_fss_contents *contents) { #ifndef _di_level_2_parameter_checking_ if (buffer == 0) return f_status_set_error(f_invalid_parameter); - if (location == 0) return f_status_set_error(f_invalid_parameter); + if (range == 0) return f_status_set_error(f_invalid_parameter); if (objects == 0) return f_status_set_error(f_invalid_parameter); if (contents == 0) return f_status_set_error(f_invalid_parameter); #endif // _di_level_2_parameter_checking_ @@ -33,13 +33,13 @@ extern "C" { } do { - status = fl_fss_basic_object_read(buffer, location, &objects->array[objects->used]); + status = fl_fss_basic_object_read(buffer, range, &objects->array[objects->used]); if (f_status_is_error(status)) { return status; } - if (location->start >= location->stop || location->start >= buffer->used) { + if (range->start >= range->stop || range->start >= buffer->used) { if (status == fl_fss_found_object || status == fl_fss_found_object_no_content) { objects->used++; @@ -59,14 +59,14 @@ extern "C" { } if (found_data) { - if (location->start >= buffer->used) { + if (range->start >= buffer->used) { return f_none_on_eos; } return f_none_on_stop; } else { - if (location->start >= buffer->used) { + if (range->start >= buffer->used) { return f_no_data_on_eos; } @@ -76,7 +76,7 @@ extern "C" { if (status == fl_fss_found_object) { found_data = f_true; - status = fl_fss_basic_content_read(buffer, location, &contents->array[contents->used]); + status = fl_fss_basic_content_read(buffer, range, &contents->array[contents->used]); if (f_status_is_error(status)) { return status; @@ -120,14 +120,14 @@ extern "C" { else if (status != fl_fss_found_object && status != fl_fss_found_content && status != fl_fss_found_no_content && status != fl_fss_found_object_no_content) { return status; } - // When content is found, the location->start is incremented, if content is found at location->stop, then location->start will be > location.stop. - else if (location->start >= location->stop || location->start >= buffer->used) { + // When content is found, the range->start is incremented, if content is found at range->stop, then range->start will be > range.stop. + else if (range->start >= range->stop || range->start >= buffer->used) { if (status == fl_fss_found_object || status == fl_fss_found_content || status == fl_fss_found_no_content || status == fl_fss_found_object_no_content) { objects->used++; contents->used++; } - if (location->start >= buffer->used) { + if (range->start >= buffer->used) { return f_none_on_eos; } @@ -136,7 +136,7 @@ extern "C" { objects->used++; contents->used++; - } while (location->start < f_string_max_size); + } while (range->start < f_string_max_size); return f_status_is_error(f_number_overflow); } @@ -151,12 +151,12 @@ extern "C" { f_status status = 0; f_array_length current = 0; - f_string_location location = f_string_location_initialize; + f_string_range range = f_string_range_initialize; - location.start = 0; - location.stop = object.used - 1; + range.start = 0; + range.stop = object.used - 1; - status = fl_fss_basic_object_write(buffer, object, &location); + status = fl_fss_basic_object_write(buffer, object, &range); if (f_status_is_error(status) || status == f_no_data_on_stop || status == f_no_data_on_eos) { return status; @@ -164,9 +164,9 @@ extern "C" { if (status == f_none || status == f_none_on_stop || status == f_none_on_eos || status == f_none_on_eol) { if (contents.used > 0) { - location.start = 0; - location.stop = contents.array[0].used - 1; - status = fl_fss_basic_content_write(buffer, contents.array[0], &location); + range.start = 0; + range.stop = contents.array[0].used - 1; + status = fl_fss_basic_content_write(buffer, contents.array[0], &range); if (f_status_is_error(status)) { return status; diff --git a/level_2/fll_fss/c/fss_basic.h b/level_2/fll_fss/c/fss_basic.h index 18fe0ca..e2b0a96 100644 --- a/level_2/fll_fss/c/fss_basic.h +++ b/level_2/fll_fss/c/fss_basic.h @@ -54,7 +54,7 @@ extern "C" { * f_number_overflow (with error bit) if the maximimum buffer size is reached. */ #ifndef _di_fll_fss_basic_read_ - extern f_return_status fll_fss_basic_read(f_string_dynamic *buffer, f_string_location *location, f_fss_objects *objects, f_fss_contents *contents); + extern f_return_status fll_fss_basic_read(f_string_dynamic *buffer, f_string_range *location, f_fss_objects *objects, f_fss_contents *contents); #endif // _di_fll_fss_basic_read_ /** diff --git a/level_2/fll_fss/c/fss_basic_list.c b/level_2/fll_fss/c/fss_basic_list.c index 9c22ed3..977b92d 100644 --- a/level_2/fll_fss/c/fss_basic_list.c +++ b/level_2/fll_fss/c/fss_basic_list.c @@ -5,7 +5,7 @@ extern "C" { #endif #ifndef _di_fll_fss_basic_list_read_ - f_return_status fll_fss_basic_list_read(f_string_dynamic *buffer, f_string_location *location, f_fss_objects *objects, f_fss_contents *contents) { + f_return_status fll_fss_basic_list_read(f_string_dynamic *buffer, f_string_range *location, f_fss_objects *objects, f_fss_contents *contents) { #ifndef _di_level_2_parameter_checking_ if (buffer == 0) return f_status_set_error(f_invalid_parameter); if (location == 0) return f_status_set_error(f_invalid_parameter); @@ -151,12 +151,12 @@ extern "C" { f_status status = 0; f_array_length current = 0; - f_string_location location = f_string_location_initialize; + f_string_range range = f_string_range_initialize; - location.start = 0; - location.stop = object.used - 1; + range.start = 0; + range.stop = object.used - 1; - status = fl_fss_basic_list_object_write(object, &location, buffer); + status = fl_fss_basic_list_object_write(object, &range, buffer); if (f_status_is_error(status) || status == f_no_data_on_stop || status == f_no_data_on_eos) { return status; @@ -164,9 +164,9 @@ extern "C" { if (status == f_none || status == f_none_on_stop || status == f_none_on_eos || status == f_none_on_eol) { if (contents.used > 0) { - location.start = 0; - location.stop = contents.array[0].used - 1; - status = fl_fss_basic_list_content_write(contents.array[0], &location, buffer); + range.start = 0; + range.stop = contents.array[0].used - 1; + status = fl_fss_basic_list_content_write(contents.array[0], &range, buffer); if (f_status_is_error(status) || status == f_no_data_on_stop || status == f_no_data_on_eos) { return status; diff --git a/level_2/fll_fss/c/fss_basic_list.h b/level_2/fll_fss/c/fss_basic_list.h index f43eedd..db56e0d 100644 --- a/level_2/fll_fss/c/fss_basic_list.h +++ b/level_2/fll_fss/c/fss_basic_list.h @@ -53,7 +53,7 @@ extern "C" { * f_number_overflow (with error bit) if the maximimum buffer size is reached. */ #ifndef _di_fll_fss_basic_list_read_ - extern f_return_status fll_fss_basic_list_read(f_string_dynamic *buffer, f_string_location *location, f_fss_objects *objects, f_fss_contents *contents); + extern f_return_status fll_fss_basic_list_read(f_string_dynamic *buffer, f_string_range *location, f_fss_objects *objects, f_fss_contents *contents); #endif // _di_fll_fss_basic_list_read_ /** diff --git a/level_2/fll_fss/c/fss_extended.c b/level_2/fll_fss/c/fss_extended.c index a792572..81e9e38 100644 --- a/level_2/fll_fss/c/fss_extended.c +++ b/level_2/fll_fss/c/fss_extended.c @@ -5,7 +5,7 @@ extern "C" { #endif #ifndef _di_fll_fss_extended_read_ - f_return_status fll_fss_extended_read(f_string_dynamic *buffer, f_string_location *location, f_fss_objects *objects, f_fss_contents *contents) { + f_return_status fll_fss_extended_read(f_string_dynamic *buffer, f_string_range *location, f_fss_objects *objects, f_fss_contents *contents) { #ifndef _di_level_2_parameter_checking_ if (buffer == 0) return f_status_set_error(f_invalid_parameter); if (location == 0) return f_status_set_error(f_invalid_parameter); @@ -151,12 +151,12 @@ extern "C" { f_status status = 0; f_array_length current = 0; - f_string_location location = f_string_location_initialize; + f_string_range range = f_string_range_initialize; - location.start = 0; - location.stop = object.used - 1; + range.start = 0; + range.stop = object.used - 1; - status = fl_fss_extended_object_write(object, &location, buffer); + status = fl_fss_extended_object_write(object, &range, buffer); if (f_status_is_error(status) || status == f_no_data_on_stop || status == f_no_data_on_eos) { return status; @@ -164,9 +164,9 @@ extern "C" { if (status == f_none || status == f_none_on_stop || status == f_none_on_eos || status == f_none_on_eol) { while (current < contents.used) { - location.start = 0; - location.stop = contents.array[current].used - 1; - status = fl_fss_extended_content_write(contents.array[current], &location, buffer); + range.start = 0; + range.stop = contents.array[current].used - 1; + status = fl_fss_extended_content_write(contents.array[current], &range, buffer); if (f_status_is_error(status) || status == f_no_data_on_stop || status == f_no_data_on_eos) { return status; diff --git a/level_2/fll_fss/c/fss_extended.h b/level_2/fll_fss/c/fss_extended.h index 940f14a..9cd2434 100644 --- a/level_2/fll_fss/c/fss_extended.h +++ b/level_2/fll_fss/c/fss_extended.h @@ -53,7 +53,7 @@ extern "C" { * f_number_overflow (with error bit) if the maximimum buffer size is reached. */ #ifndef _di_fll_fss_extended_read_ - extern f_return_status fll_fss_extended_read(f_string_dynamic *buffer, f_string_location *location, f_fss_objects *objects, f_fss_contents *contents); + extern f_return_status fll_fss_extended_read(f_string_dynamic *buffer, f_string_range *location, f_fss_objects *objects, f_fss_contents *contents); #endif // _di_fll_fss_extended_read_ /** diff --git a/level_2/fll_fss/c/fss_extended_list.c b/level_2/fll_fss/c/fss_extended_list.c index 7278918..3015bc1 100644 --- a/level_2/fll_fss/c/fss_extended_list.c +++ b/level_2/fll_fss/c/fss_extended_list.c @@ -5,7 +5,7 @@ extern "C" { #endif #ifndef _di_fll_fss_extended_list_read_ - f_return_status fll_fss_extended_list_read(f_string_dynamic *buffer, f_string_location *location, f_fss_nest *nest) { + f_return_status fll_fss_extended_list_read(f_string_dynamic *buffer, f_string_range *location, f_fss_nest *nest) { #ifndef _di_level_3_parameter_checking_ if (buffer == 0) return f_status_set_error(f_invalid_parameter); if (location == 0) return f_status_set_error(f_invalid_parameter); @@ -121,12 +121,12 @@ extern "C" { f_status status = 0; f_array_length current = 0; - f_string_location location = f_string_location_initialize; + f_string_range range = f_string_range_initialize; - location.start = 0; - location.stop = object.used - 1; + range.start = 0; + range.stop = object.used - 1; - status = fl_fss_extended_list_object_write(object, &location, buffer); + status = fl_fss_extended_list_object_write(object, &range, buffer); if (f_status_is_error(status) || status == f_no_data_on_stop || status == f_no_data_on_eos) { return status; @@ -134,9 +134,9 @@ extern "C" { if (status == f_none || status == f_none_on_stop || status == f_none_on_eos || status == f_none_on_eol) { if (contents.used > 0) { - location.start = 0; - location.stop = contents.array[0].used - 1; - status = fl_fss_extended_list_content_write(contents.array[0], &location, buffer); + range.start = 0; + range.stop = contents.array[0].used - 1; + status = fl_fss_extended_list_content_write(contents.array[0], &range, buffer); if (f_status_is_error(status) || status == f_no_data_on_stop || status == f_no_data_on_eos) { return status; diff --git a/level_2/fll_fss/c/fss_extended_list.h b/level_2/fll_fss/c/fss_extended_list.h index 46c7239..009d1cf 100644 --- a/level_2/fll_fss/c/fss_extended_list.h +++ b/level_2/fll_fss/c/fss_extended_list.h @@ -58,7 +58,7 @@ extern "C" { * f_number_overflow (with error bit) if the maximimum buffer size is reached. */ #ifndef _di_fll_fss_extended_list_read_ - extern f_return_status fll_fss_extended_list_read(f_string_dynamic *buffer, f_string_location *location, f_fss_nest *nest); + extern f_return_status fll_fss_extended_list_read(f_string_dynamic *buffer, f_string_range *location, f_fss_nest *nest); #endif // _di_fll_fss_extended_list_read_ /** diff --git a/level_3/firewall/c/firewall.c b/level_3/firewall/c/firewall.c index 552ba4f..ccd9858 100644 --- a/level_3/firewall/c/firewall.c +++ b/level_3/firewall/c/firewall.c @@ -140,7 +140,7 @@ extern "C" { if (found_command) { firewall_local_data local = firewall_local_data_initialize; firewall_reserved_chains reserved = firewall_reserved_chains_initialize; - f_string_location input = f_string_location_initialize; + f_string_range input = f_string_range_initialize; if (command == firewall_parameter_command_show) { // Warning: these are hardcoded print commands (I am not certain how I am going to implement external 'show' rules as the default-firewall setting file is the wrong place to put this) diff --git a/level_3/firewall/c/private-firewall.c b/level_3/firewall/c/private-firewall.c index 3649d41..473338b 100644 --- a/level_3/firewall/c/private-firewall.c +++ b/level_3/firewall/c/private-firewall.c @@ -652,7 +652,7 @@ f_return_status firewall_perform_commands(const firewall_local_data local, const } else { { - f_string_location input = f_string_location_initialize; + f_string_range input = f_string_range_initialize; input.stop = local_buffer.used - 1; @@ -867,7 +867,7 @@ f_return_status firewall_create_custom_chains(firewall_reserved_chains *reserved f_array_length j = 0; f_string_length length = 0; - f_string_location location = f_string_location_initialize; + f_string_range range = f_string_range_initialize; f_string_dynamics arguments = f_string_dynamics_initialize; f_string_dynamic fixed_string = f_string_dynamic_initialize; @@ -917,44 +917,44 @@ f_return_status firewall_create_custom_chains(firewall_reserved_chains *reserved j = 0; // skip globally reserved chain name: main - location.start = 0; - location.stop = firewall_group_main_length - 1; + range.start = 0; + range.stop = firewall_group_main_length - 1; fixed_string.string = firewall_group_main; fixed_string.used = firewall_group_main_length; - if (fl_string_dynamic_partial_compare(local->buffer, fixed_string, local->chain_objects.array[i], location) == f_equal_to) { + if (fl_string_dynamic_partial_compare(local->buffer, fixed_string, local->chain_objects.array[i], range) == f_equal_to) { new_chain = f_false; reserved->has_main = f_true; reserved->main_at = i; } // skip globally reserved chain name: stop - location.start = 0; - location.stop = firewall_group_stop_length - 1; + range.start = 0; + range.stop = firewall_group_stop_length - 1; fixed_string.string = firewall_group_stop; fixed_string.used = firewall_group_stop_length; - if (fl_string_dynamic_partial_compare(local->buffer, fixed_string, local->chain_objects.array[i], location) == f_equal_to) { + if (fl_string_dynamic_partial_compare(local->buffer, fixed_string, local->chain_objects.array[i], range) == f_equal_to) { new_chain = f_false; reserved->has_stop = f_true; reserved->stop_at = i; } // skip globally reserved chain name: lock - location.start = 0; - location.stop = firewall_group_lock_length - 1; + range.start = 0; + range.stop = firewall_group_lock_length - 1; fixed_string.string = firewall_group_lock; fixed_string.used = firewall_group_lock_length; - if (fl_string_dynamic_partial_compare(local->buffer, fixed_string, local->chain_objects.array[i], location) == f_equal_to) { + if (fl_string_dynamic_partial_compare(local->buffer, fixed_string, local->chain_objects.array[i], range) == f_equal_to) { new_chain = f_false; reserved->has_lock = f_true; reserved->lock_at = i; } // skip globally reserved chain name: none - location.start = 0; - location.stop = firewall_group_lock_length - 1; + range.start = 0; + range.stop = firewall_group_lock_length - 1; fixed_string.string = firewall_chain_none; fixed_string.used = firewall_chain_none_length; - if (fl_string_dynamic_partial_compare(local->buffer, fixed_string, local->chain_objects.array[i], location) == f_equal_to) { + if (fl_string_dynamic_partial_compare(local->buffer, fixed_string, local->chain_objects.array[i], range) == f_equal_to) { new_chain = f_false; } @@ -962,10 +962,10 @@ f_return_status firewall_create_custom_chains(firewall_reserved_chains *reserved if (new_chain) { while (j < data->chains.used) { - location.start = 0; - location.stop = data->chains.array[j].used - 1; + range.start = 0; + range.stop = data->chains.array[j].used - 1; - if (fl_string_dynamic_partial_compare(local->buffer, data->chains.array[j], local->chain_objects.array[i], location) == f_equal_to) { + if (fl_string_dynamic_partial_compare(local->buffer, data->chains.array[j], local->chain_objects.array[i], range) == f_equal_to) { new_chain = f_false; local->chain_ids.array[i] = j; @@ -1409,7 +1409,7 @@ f_return_status firewall_buffer_rules(const f_string filename, const bool option return status; } else { - f_string_location input = f_string_location_initialize; + f_string_range input = f_string_range_initialize; input.stop = local->buffer.used - 1; @@ -1438,7 +1438,7 @@ f_return_status firewall_buffer_rules(const f_string filename, const bool option return status; } -f_return_status firewall_process_rules(f_string_location *input, firewall_local_data *local, firewall_data *data) { +f_return_status firewall_process_rules(f_string_range *input, firewall_local_data *local, firewall_data *data) { f_status status = f_none; status = fll_fss_extended_read(&local->buffer, input, &local->rule_objects, &local->rule_contents); diff --git a/level_3/firewall/c/private-firewall.h b/level_3/firewall/c/private-firewall.h index e426759..b3bda84 100644 --- a/level_3/firewall/c/private-firewall.h +++ b/level_3/firewall/c/private-firewall.h @@ -131,7 +131,7 @@ f_return_status firewall_buffer_rules(const f_string filename, const bool option /** * Process buffered rules. */ -f_return_status firewall_process_rules(f_string_location *input, firewall_local_data *local, firewall_data *data) f_gcc_attribute_visibility_internal; +f_return_status firewall_process_rules(f_string_range *input, firewall_local_data *local, firewall_data *data) f_gcc_attribute_visibility_internal; /** * Delete allocated data. diff --git a/level_3/fss_basic_list_read/c/private-fss_basic_list_read.c b/level_3/fss_basic_list_read/c/private-fss_basic_list_read.c index c5e9a03..a22daa9 100644 --- a/level_3/fss_basic_list_read/c/private-fss_basic_list_read.c +++ b/level_3/fss_basic_list_read/c/private-fss_basic_list_read.c @@ -242,7 +242,7 @@ extern "C" { f_status status = f_none; { - f_string_location input = f_string_location_initialize; + f_string_range input = f_string_range_initialize; input.start = 0; input.stop = data->buffer.used - 1; @@ -389,7 +389,7 @@ extern "C" { return f_none; } - f_return_status (*print_object)(FILE *, const f_string_dynamic, const f_string_location) = &f_print_string_dynamic_partial; + f_return_status (*print_object)(FILE *, const f_string_dynamic, const f_string_range) = &f_print_string_dynamic_partial; if (data->parameters[fss_basic_list_read_parameter_trim].result == f_console_result_found) { print_object = &fl_print_trim_string_dynamic_partial; 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 74f59a4..57e5dd3 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 @@ -56,7 +56,7 @@ extern "C" { bool object = (data->parameters[fss_basic_list_write_parameter_object].result == f_console_result_found); f_string_dynamic buffer = f_string_dynamic_initialize; - f_string_location location = f_string_location_initialize; + f_string_range range = f_string_range_initialize; if (data->process_pipe) { f_file file = f_file_initialize; @@ -90,18 +90,18 @@ extern "C" { return f_status_set_error(status); } - location.start = 0; - location.stop = input.used - 1; + range.start = 0; + range.stop = input.used - 1; if (object) { - status = fl_fss_basic_list_object_write(input, &location, &buffer); + status = fl_fss_basic_list_object_write(input, &range, &buffer); if (f_status_is_error(status) || status == f_no_data_on_stop || status == f_no_data_on_eos || status == f_no_data_on_eol) { return f_status_set_error(status); } } else { - status = fl_fss_basic_list_content_write(input, &location, &buffer); + status = fl_fss_basic_list_content_write(input, &range, &buffer); if (f_status_is_error(status) || status == f_no_data_on_stop || status == f_no_data_on_eos || status == f_no_data_on_eol) { return f_status_set_error(status); @@ -116,18 +116,18 @@ extern "C" { input.string = arguments.argv[data->parameters[fss_basic_list_write_parameter_string].additional.array[0]]; input.used = strlen(input.string); - location.start = 0; - location.stop = input.used - 1; + range.start = 0; + range.stop = input.used - 1; if (object) { - status = fl_fss_basic_list_object_write(input, &location, &buffer); + status = fl_fss_basic_list_object_write(input, &range, &buffer); if (f_status_is_error(status) || status == f_no_data_on_stop || status == f_no_data_on_eos || status == f_no_data_on_eol) { return f_status_set_error(status); } } else { - status = fl_fss_basic_list_content_write(input, &location, &buffer); + status = fl_fss_basic_list_content_write(input, &range, &buffer); if (f_status_is_error(status) || status == f_no_data_on_stop || status == f_no_data_on_eos || status == f_no_data_on_eol) { return f_status_set_error(status); diff --git a/level_3/fss_basic_read/c/private-fss_basic_read.c b/level_3/fss_basic_read/c/private-fss_basic_read.c index b163a0a..a792303 100644 --- a/level_3/fss_basic_read/c/private-fss_basic_read.c +++ b/level_3/fss_basic_read/c/private-fss_basic_read.c @@ -242,7 +242,7 @@ extern "C" { f_status status = f_none; { - f_string_location input = f_string_location_initialize; + f_string_range input = f_string_range_initialize; input.start = 0; input.stop = data->buffer.used - 1; @@ -389,7 +389,7 @@ extern "C" { return f_none; } - f_return_status (*print_object)(FILE *, const f_string_dynamic, const f_string_location) = &f_print_string_dynamic_partial; + f_return_status (*print_object)(FILE *, const f_string_dynamic, const f_string_range) = &f_print_string_dynamic_partial; if (data->parameters[fss_basic_read_parameter_trim].result == f_console_result_found) { print_object = &fl_print_trim_string_dynamic_partial; 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 dc93fde..9d93e92 100644 --- a/level_3/fss_basic_write/c/fss_basic_write.c +++ b/level_3/fss_basic_write/c/fss_basic_write.c @@ -56,7 +56,7 @@ extern "C" { bool object = (data->parameters[fss_basic_write_parameter_object].result == f_console_result_found); f_string_dynamic buffer = f_string_dynamic_initialize; - f_string_location location = f_string_location_initialize; + f_string_range range = f_string_range_initialize; if (data->process_pipe) { f_file file = f_file_initialize; @@ -90,18 +90,18 @@ extern "C" { return f_status_set_error(status); } - location.start = 0; - location.stop = input.used - 1; + range.start = 0; + range.stop = input.used - 1; if (object) { - status = fl_fss_basic_object_write(&buffer, input, &location); + status = fl_fss_basic_object_write(&buffer, input, &range); if (f_status_is_error(status) || status == f_no_data_on_stop || status == f_no_data_on_eos) { return f_status_set_error(status); } } else { - status = fl_fss_basic_content_write(&buffer, input, &location); + status = fl_fss_basic_content_write(&buffer, input, &range); if (f_status_is_error(status) || status == f_no_data_on_stop || status == f_no_data_on_eos) { return f_status_set_error(status); @@ -116,18 +116,18 @@ extern "C" { input.string = arguments.argv[data->parameters[fss_basic_write_parameter_string].additional.array[0]]; input.used = strlen(input.string); - location.start = 0; - location.stop = input.used - 1; + range.start = 0; + range.stop = input.used - 1; if (object) { - status = fl_fss_basic_object_write(&buffer, input, &location); + status = fl_fss_basic_object_write(&buffer, input, &range); if (f_status_is_error(status) || status == f_no_data_on_stop || status == f_no_data_on_eos) { return f_status_set_error(status); } } else { - status = fl_fss_basic_content_write(&buffer, input, &location); + status = fl_fss_basic_content_write(&buffer, input, &range); if (f_status_is_error(status) || status == f_no_data_on_stop || status == f_no_data_on_eos) { return f_status_set_error(status); diff --git a/level_3/fss_extended_list_read/c/private-fss_extended_list_read.c b/level_3/fss_extended_list_read/c/private-fss_extended_list_read.c index d8d86f9..d210161 100644 --- a/level_3/fss_extended_list_read/c/private-fss_extended_list_read.c +++ b/level_3/fss_extended_list_read/c/private-fss_extended_list_read.c @@ -242,7 +242,7 @@ extern "C" { f_status status = f_none; { - f_string_location input = f_string_location_initialize; + f_string_range input = f_string_range_initialize; input.start = 0; input.stop = data->buffer.used - 1; @@ -352,19 +352,19 @@ extern "C" { if (depth_setting.index_name > 0) { memset(names, 0, sizeof(bool) * items->used); - f_string_location value_location = f_string_location_initialize; - value_location.stop = depth_setting.value_name.used - 1; + f_string_range value_range = f_string_range_initialize; + value_range.stop = depth_setting.value_name.used - 1; if (data->parameters[fss_extended_list_read_parameter_trim].result == f_console_result_found) { for (f_string_length i = 0; i < items->used; i++) { - if (fl_string_dynamic_partial_compare_trim(data->buffer, depth_setting.value_name, items->array[i].object, value_location) == f_equal_to) { + if (fl_string_dynamic_partial_compare_trim(data->buffer, depth_setting.value_name, items->array[i].object, value_range) == f_equal_to) { names[i] = 1; } } // for } else { for (f_string_length i = 0; i < items->used; i++) { - if (fl_string_dynamic_partial_compare(data->buffer, depth_setting.value_name, items->array[i].object, value_location) == f_equal_to) { + if (fl_string_dynamic_partial_compare(data->buffer, depth_setting.value_name, items->array[i].object, value_range) == f_equal_to) { names[i] = 1; } } // for @@ -412,7 +412,7 @@ extern "C" { return f_none; } - f_return_status (*print_object)(FILE *, const f_string_dynamic, const f_string_location) = &f_print_string_dynamic_partial; + f_return_status (*print_object)(FILE *, const f_string_dynamic, const f_string_range) = &f_print_string_dynamic_partial; if (data->parameters[fss_extended_list_read_parameter_trim].result == f_console_result_found) { print_object = &fl_print_trim_string_dynamic_partial; diff --git a/level_3/fss_extended_read/c/private-fss_extended_read.c b/level_3/fss_extended_read/c/private-fss_extended_read.c index 2dca09c..17100f4 100644 --- a/level_3/fss_extended_read/c/private-fss_extended_read.c +++ b/level_3/fss_extended_read/c/private-fss_extended_read.c @@ -242,7 +242,7 @@ extern "C" { f_status status = f_none; { - f_string_location input = f_string_location_initialize; + f_string_range input = f_string_range_initialize; input.start = 0; input.stop = data->buffer.used - 1; @@ -384,7 +384,7 @@ extern "C" { return f_none; } - f_return_status (*print_object)(FILE *, const f_string_dynamic, const f_string_location) = &f_print_string_dynamic_partial; + f_return_status (*print_object)(FILE *, const f_string_dynamic, const f_string_range) = &f_print_string_dynamic_partial; if (data->parameters[fss_extended_read_parameter_trim].result == f_console_result_found) { print_object = &fl_print_trim_string_dynamic_partial; 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 f71b3ca..2552c29 100644 --- a/level_3/fss_extended_write/c/fss_extended_write.c +++ b/level_3/fss_extended_write/c/fss_extended_write.c @@ -83,7 +83,7 @@ extern "C" { bool object = (data->parameters[fss_extended_write_parameter_object].result == f_console_result_found); f_string_dynamic buffer = f_string_dynamic_initialize; - f_string_location location = f_string_location_initialize; + f_string_range range = f_string_range_initialize; if (data->process_pipe) { f_file file = f_file_initialize; @@ -117,18 +117,18 @@ extern "C" { return f_status_set_error(status); } - location.start = 0; - location.stop = input.used - 1; + range.start = 0; + range.stop = input.used - 1; if (object) { - status = fl_fss_extended_object_write(input, &location, &buffer); + status = fl_fss_extended_object_write(input, &range, &buffer); if (f_status_is_error(status) || status == f_no_data_on_stop || status == f_no_data_on_eos) { return f_status_set_error(status); } } else { - status = fl_fss_extended_content_write(input, &location, &buffer); + status = fl_fss_extended_content_write(input, &range, &buffer); if (f_status_is_error(status) || status == f_no_data_on_stop || status == f_no_data_on_eos) { return f_status_set_error(status); @@ -157,10 +157,10 @@ extern "C" { input.string = arguments.argv[data->parameters[fss_extended_write_parameter_string].additional.array[0]]; input.used = strlen(input.string); - location.start = 0; - location.stop = input.used - 1; + range.start = 0; + range.stop = input.used - 1; - status = fl_fss_extended_object_write(input, &location, &buffer); + status = fl_fss_extended_object_write(input, &range, &buffer); if (f_status_is_error(status) || status == f_no_data_on_stop || status == f_no_data_on_eos) { return f_status_set_error(status); @@ -173,10 +173,10 @@ extern "C" { input.string = arguments.argv[data->parameters[fss_extended_write_parameter_string].additional.array[i]]; input.used = strlen(input.string); - location.start = 0; - location.stop = input.used - 1; + range.start = 0; + range.stop = input.used - 1; - status = fl_fss_extended_content_write(input, &location, &buffer); + status = fl_fss_extended_content_write(input, &range, &buffer); if (f_status_is_error(status) || status == f_no_data_on_stop || status == f_no_data_on_eos) { return f_status_set_error(status); diff --git a/level_3/init/c/private-init.c b/level_3/init/c/private-init.c index deaaa92..7d43bbe 100644 --- a/level_3/init/c/private-init.c +++ b/level_3/init/c/private-init.c @@ -66,7 +66,7 @@ return f_status_set_error(status); } else { - f_string_location input = f_string_location_initialize; + f_string_range input = f_string_range_initialize; input.stop = buffer->used - 1; @@ -483,7 +483,7 @@ f_return_status init_process_main_rule(const init_data data, f_string_dynamic *buffer, init_data *settings) { f_status status = f_none; f_string_dynamic buffer = f_string_dynamic_initialize; - f_string_location location = f_string_location_initialize; + f_string_range range = f_string_range_initialize; f_fss_objects objects = f_fss_objects_initialize; f_fss_contents contents = f_fss_contents_initialize; f_string_length position = 0; -- 1.8.3.1