From: Kevin Day Date: Sat, 6 Mar 2021 21:55:17 +0000 (-0600) Subject: Update: replace f_string_length_t (and related) and miscellaneous cleanus & fixes. X-Git-Tag: 0.5.3~101 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=95dad24409cf8ee000d879d7176ca80ad56e2264;p=fll Update: replace f_string_length_t (and related) and miscellaneous cleanus & fixes. The f_string_length_t, f_string_lengths_t, etc.. types are somewhat redundant. Simplify the code (reducing binary size as well) and just stick with the f_array_length_t types. Miscellaneous documentation cleanups. --- diff --git a/level_0/f_account/c/account.c b/level_0/f_account/c/account.c index 436b064..ee90aff 100644 --- a/level_0/f_account/c/account.c +++ b/level_0/f_account/c/account.c @@ -377,7 +377,7 @@ extern "C" { return F_exist_not; } - const f_string_length_t name_length = strnlen(password.pw_name, length); + const f_array_length_t name_length = strnlen(password.pw_name, length); f_macro_string_dynamic_t_resize(status, (*name), name_length + 1); if (F_status_is_error(status)) return status; @@ -412,7 +412,7 @@ extern "C" { return F_exist_not; } - const f_string_length_t name_length = strnlen(password.pw_name, length); + const f_array_length_t name_length = strnlen(password.pw_name, length); f_macro_string_dynamic_t_resize(status, (*name), name_length + 1); if (F_status_is_error(status)) return status; diff --git a/level_0/f_account/c/private-account.c b/level_0/f_account/c/private-account.c index 424e178..d553ed1 100644 --- a/level_0/f_account/c/private-account.c +++ b/level_0/f_account/c/private-account.c @@ -6,7 +6,7 @@ extern "C" { #endif #if !defined(_di_f_account_by_name_) || !defined(_di_f_account_by_id_) - f_status_t private_f_account_from_passwd(const struct passwd password, const f_string_length_t password_length, f_account_t *account) { + f_status_t private_f_account_from_passwd(const struct passwd password, const f_array_length_t password_length, f_account_t *account) { f_status_t status = F_none; @@ -16,7 +16,7 @@ extern "C" { // account home directory. - f_string_length_t string_length = strnlen(password.pw_dir, password_length); + f_array_length_t string_length = strnlen(password.pw_dir, password_length); f_macro_string_dynamic_t_resize(status, account->home, string_length + 1); if (F_status_is_error(status)) return status; diff --git a/level_0/f_account/c/private-account.h b/level_0/f_account/c/private-account.h index 7f3166a..cc6f433 100644 --- a/level_0/f_account/c/private-account.h +++ b/level_0/f_account/c/private-account.h @@ -39,7 +39,7 @@ extern "C" { * @see f_macro_string_dynamic_t_resize() */ #if !defined(_di_f_account_by_name_) || !defined(_di_f_account_by_id_) - extern f_status_t private_f_account_from_passwd(const struct passwd password, const f_string_length_t password_length, f_account_t *account) f_gcc_attribute_visibility_internal; + extern f_status_t private_f_account_from_passwd(const struct passwd password, const f_array_length_t password_length, f_account_t *account) f_gcc_attribute_visibility_internal; #endif // !defined(_di_f_account_by_name_) || !defined(_di_f_account_by_id_) #ifdef __cplusplus diff --git a/level_0/f_capability/c/capability.c b/level_0/f_capability/c/capability.c index 9cf1884..187d2ad 100644 --- a/level_0/f_capability/c/capability.c +++ b/level_0/f_capability/c/capability.c @@ -417,12 +417,12 @@ extern "C" { char *result = cap_to_name(code); if (result) { - const f_string_length_t length = strlen(result); + const f_array_length_t length = strlen(result); f_status_t status = F_none; if (name->used + length + 1 > name->size) { - if (name->used + length + 1 > f_string_length_t_size) { + if (name->used + length + 1 > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } @@ -457,7 +457,7 @@ extern "C" { if (!text) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - f_string_length_t length = 0; + f_array_length_t length = 0; char *result = cap_to_text(capability, &length); @@ -465,7 +465,7 @@ extern "C" { f_status_t status = F_none; if (text->used + length + 1> text->size) { - if (text->used + length + 1 > f_string_length_t_size) { + if (text->used + length + 1 > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } diff --git a/level_0/f_console/c/console-common.h b/level_0/f_console/c/console-common.h index 7321b99..47d55f4 100644 --- a/level_0/f_console/c/console-common.h +++ b/level_0/f_console/c/console-common.h @@ -167,10 +167,10 @@ extern "C" { #endif // _di_f_console_standard_s_ /** - * The maximum size for a single parameter. + * The maximum size for a single parameter (the length of the string representing the parameter). */ #ifndef _di_f_console_length_size_ - #define f_console_length_size f_string_length_t_size + #define f_console_parameter_size f_array_length_t_size #endif // _di_f_console_length_size_ /** @@ -247,7 +247,7 @@ extern "C" { f_array_length_t result; f_array_length_t location; - f_string_length_t location_sub; + f_array_length_t location_sub; f_array_lengths_t locations; f_array_lengths_t locations_sub; f_array_lengths_t values; diff --git a/level_0/f_console/c/console.c b/level_0/f_console/c/console.c index 98f8961..2b38dc6 100644 --- a/level_0/f_console/c/console.c +++ b/level_0/f_console/c/console.c @@ -10,7 +10,7 @@ extern "C" { if (!result) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_f - const f_string_length_t length = strnlen(input, 3); + const f_array_length_t length = strnlen(input, 3); if (!length) { *result = f_console_none; @@ -48,7 +48,7 @@ extern "C" { #endif // _di_f_console_identify_ #ifndef _di_f_console_parameter_process_ - f_status_t f_console_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, f_string_lengths_t *remaining) { + f_status_t f_console_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, f_array_lengths_t *remaining) { #ifndef _di_level_0_parameter_checking_ if (!remaining) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -59,9 +59,9 @@ extern "C" { unsigned long location = 1; // Parameter 0 represents the program name so skip it. - f_string_length_t sub_location = 0; - f_string_length_t increment_by = 0; - f_string_length_t argument_length = 0; + f_array_length_t sub_location = 0; + f_array_length_t increment_by = 0; + f_array_length_t argument_length = 0; f_array_length_t i = 0; f_array_length_t values = 0; @@ -70,7 +70,7 @@ extern "C" { uint8_t console_long = f_console_none; uint8_t console_type = f_console_type_normal; - f_string_lengths_t needs_value = f_string_lengths_t_initialize; + f_array_lengths_t needs_value = f_array_lengths_t_initialize; uint8_t width = 0; @@ -84,7 +84,7 @@ extern "C" { f_macro_array_lengths_t_increase(status, parameters.parameter[i].values) if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(needs_value); + f_macro_array_lengths_t_delete_simple(needs_value); return status; } @@ -94,7 +94,7 @@ extern "C" { needs_value.used--; // Pop the matched parameter off of the top of the needs_value array. - for (f_string_length_t i = 0; i < needs_value.used; ++i) { + for (f_array_length_t i = 0; i < needs_value.used; ++i) { needs_value.array[i] = needs_value.array[i + 1]; } // for @@ -104,7 +104,7 @@ extern "C" { f_console_identify(arguments.argv[location], &result); - argument_length = strnlen(arguments.argv[location], f_console_length_size); + argument_length = strnlen(arguments.argv[location], f_console_parameter_size); // process the current parameter. if (result == f_console_short_enable || result == f_console_short_disable) { @@ -165,7 +165,7 @@ extern "C" { status = f_utf_char_to_character(arguments.argv[location] + sub_location, width_max, &character_argument_utf); if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(needs_value); + f_macro_array_lengths_t_delete_simple(needs_value); return status; } @@ -174,7 +174,7 @@ extern "C" { status = f_utf_char_to_character((f_string_t) parameters.parameter[i].symbol_short, width_max, &character_console_utf); if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(needs_value); + f_macro_array_lengths_t_delete_simple(needs_value); return status; } @@ -196,17 +196,17 @@ extern "C" { continue; } - f_macro_string_lengths_t_increase(status, parameters.parameter[i].locations) + f_macro_array_lengths_t_increase(status, parameters.parameter[i].locations) if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(needs_value); + f_macro_array_lengths_t_delete_simple(needs_value); return status; } - f_macro_string_lengths_t_increase(status, parameters.parameter[i].locations_sub) + f_macro_array_lengths_t_increase(status, parameters.parameter[i].locations_sub) if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(needs_value); + f_macro_array_lengths_t_delete_simple(needs_value); return status; } @@ -226,10 +226,10 @@ extern "C" { if (parameters.parameter[i].has_values) { if (needs_value.used + parameters.parameter[i].has_values > needs_value.size) { - f_macro_string_lengths_t_resize(status, needs_value, needs_value.used + parameters.parameter[i].has_values); + f_macro_array_lengths_t_resize(status, needs_value, needs_value.used + parameters.parameter[i].has_values); if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(needs_value); + f_macro_array_lengths_t_delete_simple(needs_value); return status; } } @@ -256,17 +256,17 @@ extern "C" { if (strncmp(arguments.argv[location], parameters.parameter[i].symbol_other, argument_length + 1) != 0) continue; - f_macro_string_lengths_t_increase(status, parameters.parameter[i].locations) + f_macro_array_lengths_t_increase(status, parameters.parameter[i].locations) if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(needs_value); + f_macro_array_lengths_t_delete_simple(needs_value); return status; } - f_macro_string_lengths_t_increase(status, parameters.parameter[i].locations_sub) + f_macro_array_lengths_t_increase(status, parameters.parameter[i].locations_sub) if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(needs_value); + f_macro_array_lengths_t_delete_simple(needs_value); return status; } @@ -279,10 +279,10 @@ extern "C" { if (parameters.parameter[i].has_values) { if (needs_value.used + parameters.parameter[i].has_values > needs_value.size) { - f_macro_string_lengths_t_resize(status, needs_value, needs_value.used + parameters.parameter[i].has_values); + f_macro_array_lengths_t_resize(status, needs_value, needs_value.used + parameters.parameter[i].has_values); if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(needs_value); + f_macro_array_lengths_t_delete_simple(needs_value); return status; } } @@ -300,9 +300,9 @@ extern "C" { // populate list of remaining parameters.parameter not associated with anything. if (remaining->used == remaining->size) { - f_macro_memory_structure_macro_increment(status, (*remaining), 1, f_memory_default_allocation_step, f_macro_string_lengths_t_resize, F_array_too_large); + f_macro_memory_structure_macro_increment(status, (*remaining), 1, f_memory_default_allocation_step, f_macro_array_lengths_t_resize, F_array_too_large); if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(needs_value); + f_macro_array_lengths_t_delete_simple(needs_value); return status; } } @@ -321,7 +321,7 @@ extern "C" { status = F_none; } - f_macro_string_lengths_t_delete_simple(needs_value); + f_macro_array_lengths_t_delete_simple(needs_value); return status; } diff --git a/level_0/f_console/c/console.h b/level_0/f_console/c/console.h index 1d1e7f1..824d38f 100644 --- a/level_0/f_console/c/console.h +++ b/level_0/f_console/c/console.h @@ -84,7 +84,7 @@ extern "C" { * F_utf (with error bit) if character is an invalid UTF-8 character, when processing arguments. */ #ifndef _di_f_console_parameter_process_ - extern f_status_t f_console_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, f_string_lengths_t *remaining); + extern f_status_t f_console_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, f_array_lengths_t *remaining); #endif // _di_f_console_parameter_process_ /** diff --git a/level_0/f_conversion/c/conversion.c b/level_0/f_conversion/c/conversion.c index 8508679..3f98210 100644 --- a/level_0/f_conversion/c/conversion.c +++ b/level_0/f_conversion/c/conversion.c @@ -232,7 +232,7 @@ extern "C" { negative = F_true; } - f_string_length_t total = 0; + f_array_length_t total = 0; for (register f_number_signed_t work = current; work; total++) { work /= base; @@ -345,7 +345,7 @@ extern "C" { return F_none; } - f_string_length_t total = 0; + f_array_length_t total = 0; for (register f_number_unsigned_t work = number; work; total++) { work /= base; diff --git a/level_0/f_directory/c/directory.c b/level_0/f_directory/c/directory.c index 60e6718..ddd2c66 100644 --- a/level_0/f_directory/c/directory.c +++ b/level_0/f_directory/c/directory.c @@ -131,7 +131,7 @@ extern "C" { struct dirent **listing = 0; size_t i = 0; - f_string_length_t size = 0; + f_array_length_t size = 0; f_status_t status = F_none; const size_t length = scandir(path, &listing, filter, sort); diff --git a/level_0/f_environment/c/environment-common.h b/level_0/f_environment/c/environment-common.h index 09e101e..ac0af36 100644 --- a/level_0/f_environment/c/environment-common.h +++ b/level_0/f_environment/c/environment-common.h @@ -20,7 +20,7 @@ extern "C" { * Environment related defines. */ #ifndef _di_f_environment_defines_ - #define f_environment_max_length f_string_length_t_size + #define f_environment_max_length f_array_length_t_size #endif // _di_f_environment_defines_ #ifdef __cplusplus diff --git a/level_0/f_environment/c/private-environment.c b/level_0/f_environment/c/private-environment.c index c102d37..1d92b47 100644 --- a/level_0/f_environment/c/private-environment.c +++ b/level_0/f_environment/c/private-environment.c @@ -13,7 +13,7 @@ extern "C" { return F_exist_not; } - const f_string_length_t size = strnlen(result, f_environment_max_length); + const f_array_length_t size = strnlen(result, f_environment_max_length); if (size) { if (value->used + size > f_environment_max_length) { diff --git a/level_0/f_file/c/file.c b/level_0/f_file/c/file.c index 2638c49..6782240 100644 --- a/level_0/f_file/c/file.c +++ b/level_0/f_file/c/file.c @@ -943,7 +943,7 @@ extern "C" { mode_umask |= f_file_mode_t_block_world & f_file_mode_t_mask_bit_execute; } - for (f_string_length_t i = 0; syntax && string[i]; i++) { + for (f_array_length_t i = 0; syntax && string[i]; i++) { if (string[i] == f_string_ascii_o_s[0]) { on |= 1; @@ -1069,7 +1069,7 @@ extern "C" { // 1 = add, 2 = replace, 3 = subtract. uint8_t how = 0; - f_string_length_t i = 0; + f_array_length_t i = 0; *replace = 0; @@ -1100,7 +1100,7 @@ extern "C" { } if (string[i]) { - f_string_length_t j = 0; + f_array_length_t j = 0; for (; string[i + j] && j < 4; j++) { @@ -1280,7 +1280,7 @@ extern "C" { #endif // _di_f_file_mode_to_mode_ #ifndef _di_f_file_name_base_ - f_status_t f_file_name_base(const f_string_t path, const f_string_length_t length, f_string_dynamic_t *name_base) { + f_status_t f_file_name_base(const f_string_t path, const f_array_length_t length, f_string_dynamic_t *name_base) { #ifndef _di_level_0_parameter_checking_ if (!path) return F_status_set_error(F_parameter); if (!name_base) return F_status_set_error(F_parameter); @@ -1295,10 +1295,10 @@ extern "C" { path_to_name = basename(path_argument); - f_string_length_t size = strnlen(path_to_name, length); + f_array_length_t size = strnlen(path_to_name, length); if (name_base->used + size > name_base->size) { - if (name_base->used + size > f_string_length_t_size) { + if (name_base->used + size > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } @@ -1316,7 +1316,7 @@ extern "C" { #endif // _di_f_file_name_base_ #ifndef _di_f_file_name_directory_ - f_status_t f_file_name_directory(const f_string_t path, const f_string_length_t length, f_string_dynamic_t *name_directory) { + f_status_t f_file_name_directory(const f_string_t path, const f_array_length_t length, f_string_dynamic_t *name_directory) { #ifndef _di_level_0_parameter_checking_ if (!path) return F_status_set_error(F_parameter); if (!name_directory) return F_status_set_error(F_parameter); @@ -1331,10 +1331,10 @@ extern "C" { path_to_name = dirname(path_argument); - f_string_length_t size = strnlen(path_to_name, length); + f_array_length_t size = strnlen(path_to_name, length); if (name_directory->used + size > name_directory->size) { - if (name_directory->used + size > f_string_length_t_size) { + if (name_directory->used + size > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } @@ -1409,7 +1409,7 @@ extern "C" { for (f_string_t buffer_read = 0; ; ) { if (buffer->used + file.size_read > buffer->size) { - if (buffer->size + file.size_read > f_string_length_t_size) { + if (buffer->size + file.size_read > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } @@ -1457,7 +1457,7 @@ extern "C" { f_string_t buffer_read = 0; if (buffer->used + file.size_read > buffer->size) { - if (buffer->size + file.size_read > f_string_length_t_size) { + if (buffer->size + file.size_read > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } @@ -1494,7 +1494,7 @@ extern "C" { #endif // _di_f_file_read_block_ #ifndef _di_f_file_read_until_ - f_status_t f_file_read_until(const f_file_t file, const f_string_length_t total, f_string_dynamic_t *buffer) { + f_status_t f_file_read_until(const f_file_t file, const f_array_length_t total, f_string_dynamic_t *buffer) { #ifndef _di_level_0_parameter_checking_ if (!file.size_read) return F_status_set_error(F_parameter); if (buffer->used > buffer->size) return F_status_set_error(F_parameter); @@ -1502,8 +1502,8 @@ extern "C" { if (file.id == -1) return F_status_set_error(F_file_closed); - f_string_length_t buffer_size = file.size_read; - f_string_length_t buffer_count = 0; + f_array_length_t buffer_size = file.size_read; + f_array_length_t buffer_count = 0; f_status_t status = F_none; ssize_t size_read = 0; @@ -1515,7 +1515,7 @@ extern "C" { } if (buffer->used + buffer_size > buffer->size) { - if (buffer->size + buffer_size > f_string_length_t_size) { + if (buffer->size + buffer_size > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } @@ -1703,7 +1703,7 @@ extern "C" { #endif // _di_f_file_role_change_at_ #ifndef _di_f_file_seek_ - f_status_t f_file_seek(const int id, const int whence, const f_string_length_t offset, f_string_length_t *seeked) { + f_status_t f_file_seek(const int id, const int whence, const f_array_length_t offset, f_array_length_t *seeked) { #ifndef _di_level_0_parameter_checking_ if (id <= 0) return F_status_set_error(F_parameter); if (whence < 0) return F_status_set_error(F_parameter); @@ -1726,7 +1726,7 @@ extern "C" { #endif // _di_f_file_seek_ #ifndef _di_f_file_size_ - f_status_t f_file_size(const f_string_t path, const bool dereference, f_string_length_t *size) { + f_status_t f_file_size(const f_string_t path, const bool dereference, f_array_length_t *size) { #ifndef _di_level_0_parameter_checking_ if (!path) return F_status_set_error(F_parameter); if (!size) return F_status_set_error(F_parameter); @@ -1747,7 +1747,7 @@ extern "C" { #endif // _di_f_file_size_ #ifndef _di_f_file_size_at_ - f_status_t f_file_size_at(const int at_id, const f_string_t path, const bool dereference, f_string_length_t *size) { + f_status_t f_file_size_at(const int at_id, const f_string_t path, const bool dereference, f_array_length_t *size) { #ifndef _di_level_0_parameter_checking_ if (!path) return F_status_set_error(F_parameter); if (at_id <= 0) return F_status_set_error(F_parameter); @@ -1769,7 +1769,7 @@ extern "C" { #endif // _di_f_file_size_at_ #ifndef _di_f_file_size_by_id_ - f_status_t f_file_size_by_id(const int id, f_string_length_t *size) { + f_status_t f_file_size_by_id(const int id, f_array_length_t *size) { #ifndef _di_level_0_parameter_checking_ if (id <= 0) return F_status_set_error(F_parameter); if (!size) return F_status_set_error(F_parameter); @@ -1939,7 +1939,7 @@ extern "C" { #endif // _di_f_file_stream_open_ #ifndef _di_f_file_stream_read_ - f_status_t f_file_stream_read(const f_file_t file, const f_string_length_t amount, f_string_dynamic_t *buffer) { + f_status_t f_file_stream_read(const f_file_t file, const f_array_length_t amount, f_string_dynamic_t *buffer) { #ifndef _di_level_0_parameter_checking_ if (!file.size_read) return F_status_set_error(F_parameter); if (amount < 1) return F_status_set_error(F_parameter); @@ -1954,7 +1954,7 @@ extern "C" { for (;;) { if (buffer->used + file.size_read > buffer->size) { - if (buffer->size + file.size_read > f_string_length_t_size) { + if (buffer->size + file.size_read > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } @@ -1988,7 +1988,7 @@ extern "C" { #endif // _di_f_file_stream_read_ #ifndef _di_f_file_stream_read_block_ - f_status_t f_file_stream_read_block(const f_file_t file, const f_string_length_t amount, f_string_dynamic_t *buffer) { + f_status_t f_file_stream_read_block(const f_file_t file, const f_array_length_t amount, f_string_dynamic_t *buffer) { #ifndef _di_level_0_parameter_checking_ if (!file.size_read) return F_status_set_error(F_parameter); if (amount < 1) return F_status_set_error(F_parameter); @@ -1997,13 +1997,13 @@ extern "C" { if (!file.stream) return F_status_set_error(F_file_closed); - const f_string_length_t buffer_size = file.size_read * amount; + const f_array_length_t buffer_size = file.size_read * amount; f_status_t status = F_none; ssize_t size_read = 0; if (buffer->used + buffer_size > buffer->size) { - if (buffer->size + buffer_size > f_string_length_t_size) { + if (buffer->size + buffer_size > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } @@ -2036,7 +2036,7 @@ extern "C" { #endif // _di_f_file_stream_read_block_ #ifndef _di_f_file_stream_read_until_ - f_status_t f_file_stream_read_until(const f_file_t file, const f_string_length_t amount, const f_string_length_t total, f_string_dynamic_t *buffer) { + f_status_t f_file_stream_read_until(const f_file_t file, const f_array_length_t amount, const f_array_length_t total, f_string_dynamic_t *buffer) { #ifndef _di_level_0_parameter_checking_ if (!file.size_read) return F_status_set_error(F_parameter); if (amount < 1) return F_status_set_error(F_parameter); @@ -2045,8 +2045,8 @@ extern "C" { if (!file.stream) return F_status_set_error(F_file_closed); - f_string_length_t buffer_size = file.size_read; - f_string_length_t buffer_count = 0; + f_array_length_t buffer_size = file.size_read; + f_array_length_t buffer_count = 0; f_status_t status = F_none; ssize_t size_read = 0; @@ -2058,7 +2058,7 @@ extern "C" { } if (buffer->used + buffer_size > buffer->size) { - if (buffer->size + buffer_size > f_string_length_t_size) { + if (buffer->size + buffer_size > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } @@ -2138,7 +2138,7 @@ extern "C" { #endif // _di_f_file_stream_reopen_ #ifndef _di_f_file_stream_write_ - f_status_t f_file_stream_write(const f_file_t file, const f_string_static_t buffer, const f_string_length_t amount, f_string_length_t *written) { + f_status_t f_file_stream_write(const f_file_t file, const f_string_static_t buffer, const f_array_length_t amount, f_array_length_t *written) { #ifndef _di_level_0_parameter_checking_ if (!file.size_write) return F_status_set_error(F_parameter); if (buffer.used > buffer.size) return F_status_set_error(F_parameter); @@ -2160,7 +2160,7 @@ extern "C" { if (status == F_none && *written == buffer.used) return F_none_eos; } else { - f_string_length_t written_local = 0; + f_array_length_t written_local = 0; private_f_file_stream_write_until(file, buffer.string, amount, buffer.used, &written_local); @@ -2174,7 +2174,7 @@ extern "C" { #endif // _di_f_file_stream_write_ #ifndef _di_f_file_stream_write_block_ - f_status_t f_file_stream_write_block(const f_file_t file, const f_string_static_t buffer, const f_string_length_t amount, f_string_length_t *written) { + f_status_t f_file_stream_write_block(const f_file_t file, const f_string_static_t buffer, const f_array_length_t amount, f_array_length_t *written) { #ifndef _di_level_0_parameter_checking_ if (!file.size_write) return F_status_set_error(F_parameter); if (buffer.used > buffer.size) return F_status_set_error(F_parameter); @@ -2188,7 +2188,7 @@ extern "C" { return F_data_not; } - f_string_length_t write_max = file.size_write; + f_array_length_t write_max = file.size_write; if (write_max > buffer.used) { write_max = buffer.used; @@ -2205,7 +2205,7 @@ extern "C" { } } else { - f_string_length_t written_local = 0; + f_array_length_t written_local = 0; private_f_file_stream_write_until(file, buffer.string, amount, write_max, &written_local); @@ -2220,7 +2220,7 @@ extern "C" { #endif // _di_f_file_stream_write_block_ #ifndef _di_f_file_stream_write_until_ - f_status_t f_file_stream_write_until(const f_file_t file, const f_string_static_t buffer, const f_string_length_t amount, const f_string_length_t total, f_string_length_t *written) { + f_status_t f_file_stream_write_until(const f_file_t file, const f_string_static_t buffer, const f_array_length_t amount, const f_array_length_t total, f_array_length_t *written) { #ifndef _di_level_0_parameter_checking_ if (!file.size_write) return F_status_set_error(F_parameter); if (buffer.used > buffer.size) return F_status_set_error(F_parameter); @@ -2235,7 +2235,7 @@ extern "C" { return F_data_not; } - f_string_length_t write_max = total; + f_array_length_t write_max = total; if (write_max > buffer.used) { write_max = buffer.used; @@ -2252,7 +2252,7 @@ extern "C" { } } else { - f_string_length_t written_local = 0; + f_array_length_t written_local = 0; private_f_file_stream_write_until(file, buffer.string, amount, buffer.used, &written_local); @@ -2267,7 +2267,7 @@ extern "C" { #endif // _di_f_file_stream_write_until_ #ifndef _di_f_file_stream_write_range_ - f_status_t f_file_stream_write_range(const f_file_t file, const f_string_static_t buffer, const f_string_length_t amount, const f_string_range_t range, f_string_length_t *written) { + f_status_t f_file_stream_write_range(const f_file_t file, const f_string_static_t buffer, const f_array_length_t amount, const f_string_range_t range, f_array_length_t *written) { #ifndef _di_level_0_parameter_checking_ if (!file.size_write) return F_status_set_error(F_parameter); if (buffer.used > buffer.size) return F_status_set_error(F_parameter); @@ -2283,8 +2283,8 @@ extern "C" { return F_data_not; } - const f_string_length_t total = (range.stop - range.start) + 1; - f_string_length_t write_max = total; + const f_array_length_t total = (range.stop - range.start) + 1; + f_array_length_t write_max = total; if (write_max > buffer.used) { write_max = buffer.used; @@ -2301,7 +2301,7 @@ extern "C" { } } else { - f_string_length_t written_local = 0; + f_array_length_t written_local = 0; private_f_file_stream_write_until(file, buffer.string + range.start, amount, write_max, &written_local); @@ -2457,7 +2457,7 @@ extern "C" { #endif // _di_f_file_type_at_ #ifndef _di_f_file_write_ - f_status_t f_file_write(const f_file_t file, const f_string_static_t buffer, f_string_length_t *written) { + f_status_t f_file_write(const f_file_t file, const f_string_static_t buffer, f_array_length_t *written) { #ifndef _di_level_0_parameter_checking_ if (!file.size_write) return F_status_set_error(F_parameter); if (buffer.used > buffer.size) return F_status_set_error(F_parameter); @@ -2478,7 +2478,7 @@ extern "C" { if (status == F_none && *written == buffer.used) return F_none_eos; } else { - f_string_length_t written_local = 0; + f_array_length_t written_local = 0; private_f_file_write_until(file, buffer.string, buffer.used, &written_local); @@ -2492,7 +2492,7 @@ extern "C" { #endif // _di_f_file_write_ #ifndef _di_f_file_write_block_ - f_status_t f_file_write_block(const f_file_t file, const f_string_static_t buffer, f_string_length_t *written) { + f_status_t f_file_write_block(const f_file_t file, const f_string_static_t buffer, f_array_length_t *written) { #ifndef _di_level_0_parameter_checking_ if (!file.size_write) return F_status_set_error(F_parameter); if (buffer.used > buffer.size) return F_status_set_error(F_parameter); @@ -2505,7 +2505,7 @@ extern "C" { return F_data_not; } - f_string_length_t write_max = file.size_write; + f_array_length_t write_max = file.size_write; if (write_max > buffer.used) { write_max = buffer.used; @@ -2522,7 +2522,7 @@ extern "C" { } } else { - f_string_length_t written_local = 0; + f_array_length_t written_local = 0; private_f_file_write_until(file, buffer.string, write_max, &written_local); @@ -2537,7 +2537,7 @@ extern "C" { #endif // _di_f_file_write_block_ #ifndef _di_f_file_write_until_ - f_status_t f_file_write_until(const f_file_t file, const f_string_static_t buffer, const f_string_length_t total, f_string_length_t *written) { + f_status_t f_file_write_until(const f_file_t file, const f_string_static_t buffer, const f_array_length_t total, f_array_length_t *written) { #ifndef _di_level_0_parameter_checking_ if (!file.size_write) return F_status_set_error(F_parameter); if (buffer.used > buffer.size) return F_status_set_error(F_parameter); @@ -2551,7 +2551,7 @@ extern "C" { return F_data_not; } - f_string_length_t write_max = total; + f_array_length_t write_max = total; if (write_max > buffer.used) { write_max = buffer.used; @@ -2568,7 +2568,7 @@ extern "C" { } } else { - f_string_length_t written_local = 0; + f_array_length_t written_local = 0; private_f_file_write_until(file, buffer.string, buffer.used, &written_local); @@ -2583,7 +2583,7 @@ extern "C" { #endif // _di_f_file_write_until_ #ifndef _di_f_file_write_range_ - f_status_t f_file_write_range(const f_file_t file, const f_string_static_t buffer, const f_string_range_t range, f_string_length_t *written) { + f_status_t f_file_write_range(const f_file_t file, const f_string_static_t buffer, const f_string_range_t range, f_array_length_t *written) { #ifndef _di_level_0_parameter_checking_ if (!file.size_write) return F_status_set_error(F_parameter); if (buffer.used > buffer.size) return F_status_set_error(F_parameter); @@ -2598,8 +2598,8 @@ extern "C" { return F_data_not; } - const f_string_length_t total = (range.stop - range.start) + 1; - f_string_length_t write_max = total; + const f_array_length_t total = (range.stop - range.start) + 1; + f_array_length_t write_max = total; if (write_max > buffer.used) { write_max = buffer.used; @@ -2616,7 +2616,7 @@ extern "C" { } } else { - f_string_length_t written_local = 0; + f_array_length_t written_local = 0; private_f_file_write_until(file, buffer.string + range.start, write_max, &written_local); diff --git a/level_0/f_file/c/file.h b/level_0/f_file/c/file.h index e4a09b3..95161ec 100644 --- a/level_0/f_file/c/file.h +++ b/level_0/f_file/c/file.h @@ -1166,7 +1166,7 @@ extern "C" { * @see basename() */ #ifndef _di_f_file_name_base_ - extern f_status_t f_file_name_base(const f_string_t path, const f_string_length_t length, f_string_dynamic_t *name_base); + extern f_status_t f_file_name_base(const f_string_t path, const f_array_length_t length, f_string_dynamic_t *name_base); #endif // _di_f_file_name_base_ /** @@ -1190,7 +1190,7 @@ extern "C" { * @see dirname() */ #ifndef _di_f_file_name_directory_ - extern f_status_t f_file_name_directory(const f_string_t path, const f_string_length_t length, f_string_dynamic_t *name_directory); + extern f_status_t f_file_name_directory(const f_string_t path, const f_array_length_t length, f_string_dynamic_t *name_directory); #endif // _di_f_file_name_directory_ /** @@ -1381,7 +1381,7 @@ extern "C" { * @see read() */ #ifndef _di_f_file_read_until_ - extern f_status_t f_file_read_until(const f_file_t file, const f_string_length_t total, f_string_dynamic_t *buffer); + extern f_status_t f_file_read_until(const f_file_t file, const f_array_length_t total, f_string_dynamic_t *buffer); #endif // _di_f_file_read_until_ /** @@ -1643,7 +1643,7 @@ extern "C" { * @see lseek */ #ifndef _di_f_file_seek_ - extern f_status_t f_file_seek(const int id, const int whence, const f_string_length_t offset, f_string_length_t *seeked); + extern f_status_t f_file_seek(const int id, const int whence, const f_array_length_t offset, f_array_length_t *seeked); #endif // _di_f_file_seek_ /** @@ -1671,7 +1671,7 @@ extern "C" { * @see f_file_stat() */ #ifndef _di_f_file_size_ - extern f_status_t f_file_size(const f_string_t path, const bool dereference, f_string_length_t *size); + extern f_status_t f_file_size(const f_string_t path, const bool dereference, f_array_length_t *size); #endif // _di_f_file_size_ /** @@ -1701,7 +1701,7 @@ extern "C" { * @see f_file_stat_at() */ #ifndef _di_f_file_size_at_ - extern f_status_t f_file_size_at(const int at_id, const f_string_t path, const bool dereference, f_string_length_t *size); + extern f_status_t f_file_size_at(const int at_id, const f_string_t path, const bool dereference, f_array_length_t *size); #endif // _di_f_file_size_at_ /** @@ -1726,7 +1726,7 @@ extern "C" { * @see f_file_stat_by_id() */ #ifndef _di_f_file_size_by_id_ - extern f_status_t f_file_size_by_id(const int id, f_string_length_t *size); + extern f_status_t f_file_size_by_id(const int id, f_array_length_t *size); #endif // _di_f_file_size_by_id_ /** @@ -1951,7 +1951,7 @@ extern "C" { * @see fread() */ #ifndef _di_f_file_stream_read_ - extern f_status_t f_file_stream_read(const f_file_t file, const f_string_length_t amount, f_string_dynamic_t *buffer); + extern f_status_t f_file_stream_read(const f_file_t file, const f_array_length_t amount, f_string_dynamic_t *buffer); #endif // _di_f_file_stream_read_ /** @@ -1984,7 +1984,7 @@ extern "C" { * @see fread() */ #ifndef _di_f_file_stream_read_block_ - extern f_status_t f_file_stream_read_block(const f_file_t file, const f_string_length_t amount, f_string_dynamic_t *buffer); + extern f_status_t f_file_stream_read_block(const f_file_t file, const f_array_length_t amount, f_string_dynamic_t *buffer); #endif // _di_f_file_stream_read_block_ /** @@ -2023,7 +2023,7 @@ extern "C" { * @see fread() */ #ifndef _di_f_file_stream_read_until_ - extern f_status_t f_file_stream_read_until(const f_file_t file, const f_string_length_t amount, const f_string_length_t total, f_string_dynamic_t *buffer); + extern f_status_t f_file_stream_read_until(const f_file_t file, const f_array_length_t amount, const f_array_length_t total, f_string_dynamic_t *buffer); #endif // _di_f_file_stream_read_until_ /** @@ -2102,7 +2102,7 @@ extern "C" { * @see fwrite() */ #ifndef _di_f_file_stream_write_ - extern f_status_t f_file_stream_write(const f_file_t file, const f_string_static_t buffer, const f_string_length_t amount, f_string_length_t *written); + extern f_status_t f_file_stream_write(const f_file_t file, const f_string_static_t buffer, const f_array_length_t amount, f_array_length_t *written); #endif // _di_f_file_stream_write_ /** @@ -2137,7 +2137,7 @@ extern "C" { * @see fwrite() */ #ifndef _di_f_file_stream_write_block_ - extern f_status_t f_file_stream_write_block(const f_file_t file, const f_string_static_t buffer, const f_string_length_t amount, f_string_length_t *written); + extern f_status_t f_file_stream_write_block(const f_file_t file, const f_string_static_t buffer, const f_array_length_t amount, f_array_length_t *written); #endif // _di_f_file_stream_write_block_ /** @@ -2173,7 +2173,7 @@ extern "C" { * @see fwrite() */ #ifndef _di_f_file_stream_write_until_ - extern f_status_t f_file_stream_write_until(const f_file_t file, const f_string_static_t buffer, const f_string_length_t amount, const f_string_length_t total, f_string_length_t *written); + extern f_status_t f_file_stream_write_until(const f_file_t file, const f_string_static_t buffer, const f_array_length_t amount, const f_array_length_t total, f_array_length_t *written); #endif // _di_f_file_stream_write_until_ /** @@ -2208,7 +2208,7 @@ extern "C" { * @see fwrite() */ #ifndef _di_f_file_stream_write_range_ - extern f_status_t f_file_stream_write_range(const f_file_t file, const f_string_static_t buffer, const f_string_length_t amount, const f_string_range_t range, f_string_length_t *written); + extern f_status_t f_file_stream_write_range(const f_file_t file, const f_string_static_t buffer, const f_array_length_t amount, const f_string_range_t range, f_array_length_t *written); #endif // _di_f_file_stream_write_range_ @@ -2379,7 +2379,7 @@ extern "C" { * @see write() */ #ifndef _di_f_file_write_ - extern f_status_t f_file_write(const f_file_t file, const f_string_static_t buffer, f_string_length_t *written); + extern f_status_t f_file_write(const f_file_t file, const f_string_static_t buffer, f_array_length_t *written); #endif // _di_f_file_write_ /** @@ -2411,7 +2411,7 @@ extern "C" { * @see write() */ #ifndef _di_f_file_write_block_ - extern f_status_t f_file_write_block(const f_file_t file, const f_string_static_t buffer, f_string_length_t *written); + extern f_status_t f_file_write_block(const f_file_t file, const f_string_static_t buffer, f_array_length_t *written); #endif // _di_f_file_write_block_ /** @@ -2444,7 +2444,7 @@ extern "C" { * @see write() */ #ifndef _di_f_file_write_until_ - extern f_status_t f_file_write_until(const f_file_t file, const f_string_static_t buffer, const f_string_length_t total, f_string_length_t *written); + extern f_status_t f_file_write_until(const f_file_t file, const f_string_static_t buffer, const f_array_length_t total, f_array_length_t *written); #endif // _di_f_file_write_until_ /** @@ -2476,7 +2476,7 @@ extern "C" { * @see write() */ #ifndef _di_f_file_write_range_ - extern f_status_t f_file_write_range(const f_file_t file, const f_string_static_t buffer, const f_string_range_t range, f_string_length_t *written); + extern f_status_t f_file_write_range(const f_file_t file, const f_string_static_t buffer, const f_string_range_t range, f_array_length_t *written); #endif // _di_f_file_write_range_ #ifdef __cplusplus diff --git a/level_0/f_file/c/private-file.c b/level_0/f_file/c/private-file.c index f90491c..7e0bbb9 100644 --- a/level_0/f_file/c/private-file.c +++ b/level_0/f_file/c/private-file.c @@ -384,7 +384,7 @@ extern "C" { f_status_t private_f_file_link_read(const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target) { // create a NULL terminated string based on file stat. if (link_stat.st_size + 1 > target->size) { - if (link_stat.st_size + 1 > f_string_length_t_size) { + if (link_stat.st_size + 1 > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } @@ -420,7 +420,7 @@ extern "C" { f_status_t private_f_file_link_read_at(const int at_id, const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target) { // create a NULL terminated string based on file stat. if (link_stat.st_size + 1 > target->size) { - if (link_stat.st_size + 1 > f_string_length_t_size) { + if (link_stat.st_size + 1 > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } @@ -751,13 +751,13 @@ extern "C" { #endif // !defined(_di_f_file_stream_descriptor_) || !defined(_di_f_file_stream_open_) || !defined(_di_f_file_stream_reopen_) #if !defined(f_file_stream_write) || !defined(_di_f_file_stream_write_block_) || !defined(f_file_stream_write_until) || !defined(f_file_stream_write_range) - f_status_t private_f_file_stream_write_until(const f_file_t file, const f_string_t string, const f_string_length_t amount, const f_string_length_t total, f_string_length_t *written) { + f_status_t private_f_file_stream_write_until(const f_file_t file, const f_string_t string, const f_array_length_t amount, const f_array_length_t total, f_array_length_t *written) { *written = 0; f_status_t status = F_none; - f_string_length_t write_amount = amount; - f_string_length_t write_size = file.size_write; - f_string_length_t write_max = total; + f_array_length_t write_amount = amount; + f_array_length_t write_size = file.size_write; + f_array_length_t write_max = total; ssize_t size_write = 0; @@ -800,12 +800,12 @@ extern "C" { #endif // !defined(f_file_stream_write) || !defined(_di_f_file_stream_write_block_) || !defined(f_file_stream_write_until) || !defined(f_file_stream_write_range) #if !defined(f_file_write) || !defined(_di_f_file_write_block_) || !defined(f_file_write_until) || !defined(f_file_write_range) - f_status_t private_f_file_write_until(const f_file_t file, const f_string_t string, const f_string_length_t total, f_string_length_t *written) { + f_status_t private_f_file_write_until(const f_file_t file, const f_string_t string, const f_array_length_t total, f_array_length_t *written) { *written = 0; f_status_t status = F_none; - f_string_length_t write_size = file.size_write; - f_string_length_t write_max = total; + f_array_length_t write_size = file.size_write; + f_array_length_t write_max = total; ssize_t size_write = 0; diff --git a/level_0/f_file/c/private-file.h b/level_0/f_file/c/private-file.h index 0150666..2bfe943 100644 --- a/level_0/f_file/c/private-file.h +++ b/level_0/f_file/c/private-file.h @@ -915,7 +915,7 @@ extern "C" { * @see f_file_stream_write_until() */ #if !defined(f_file_stream_write) || !defined(_di_f_file_stream_write_block_) || !defined(f_file_stream_write_until) || !defined(f_file_stream_write_range) - extern f_status_t private_f_file_stream_write_until(const f_file_t file, const f_string_t string, const f_string_length_t amount, const f_string_length_t total, f_string_length_t *written) f_gcc_attribute_visibility_internal; + extern f_status_t private_f_file_stream_write_until(const f_file_t file, const f_string_t string, const f_array_length_t amount, const f_array_length_t total, f_array_length_t *written) f_gcc_attribute_visibility_internal; #endif // !defined(f_file_stream_write) || !defined(_di_f_file_stream_write_block_) || !defined(f_file_stream_write_until) || !defined(f_file_stream_write_range) /** @@ -952,7 +952,7 @@ extern "C" { * @see f_file_write_until() */ #if !defined(f_file_write) || !defined(_di_f_file_write_block_) || !defined(f_file_write_until) || !defined(f_file_write_range) - extern f_status_t private_f_file_write_until(const f_file_t file, const f_string_t string, const f_string_length_t total, f_string_length_t *written) f_gcc_attribute_visibility_internal; + extern f_status_t private_f_file_write_until(const f_file_t file, const f_string_t string, const f_array_length_t total, f_array_length_t *written) f_gcc_attribute_visibility_internal; #endif // !defined(f_file_write) || !defined(_di_f_file_write_block_) || !defined(f_file_write_until) || !defined(f_file_write_range) #ifdef __cplusplus diff --git a/level_0/f_fss/c/fss-common.h b/level_0/f_fss/c/fss-common.h index 586c2fc..efe9bfc 100644 --- a/level_0/f_fss/c/fss-common.h +++ b/level_0/f_fss/c/fss-common.h @@ -159,7 +159,7 @@ extern "C" { typedef struct { f_fss_id_t type; - f_string_length_t length; + f_array_length_t length; } f_fss_header_t; #define f_fss_header_initialize { 0, 0 } @@ -176,8 +176,8 @@ extern "C" { typedef struct { f_fss_header_t *array; - f_string_length_t size; - f_string_length_t used; + f_array_length_t size; + f_array_length_t used; } f_fss_headers_t; #define f_fss_headers_t_initialize { 0, 0, 0 } diff --git a/level_0/f_fss/c/fss.c b/level_0/f_fss/c/fss.c index 0dde80a..c4a263b 100644 --- a/level_0/f_fss/c/fss.c +++ b/level_0/f_fss/c/fss.c @@ -53,7 +53,7 @@ extern "C" { #endif // _di_fl_fss_apply_delimit_between_ #ifndef _di_f_fss_count_lines_ - f_status_t f_fss_count_lines(const f_string_static_t buffer, const f_string_length_t before, f_string_length_t *line) { + f_status_t f_fss_count_lines(const f_string_static_t buffer, const f_array_length_t before, f_array_length_t *line) { #ifndef _di_level_0_parameter_checking_ if (!line) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -62,7 +62,7 @@ extern "C" { return F_none; } - for (f_string_length_t i = before; i > 0; i--) { + for (f_array_length_t i = before; i > 0; i--) { if (buffer.string[i] == f_fss_eol) { (*line)++; } @@ -77,7 +77,7 @@ extern "C" { #endif // _di_f_fss_count_lines_ #ifndef _di_f_fss_count_lines_range_ - f_status_t f_fss_count_lines_range(const f_string_static_t buffer, const f_string_range_t range, const f_string_length_t before, f_string_length_t *line) { + f_status_t f_fss_count_lines_range(const f_string_static_t buffer, const f_string_range_t range, const f_array_length_t before, f_array_length_t *line) { #ifndef _di_level_0_parameter_checking_ if (!line) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -86,7 +86,7 @@ extern "C" { return F_none; } - for (f_string_length_t i = before; i > range.start; i--) { + for (f_array_length_t i = before; i > range.start; i--) { if (buffer.string[i] == f_fss_eol) { (*line)++; } @@ -107,7 +107,7 @@ extern "C" { return F_false; } - f_string_length_t width_max = (range.stop - range.start) + 1; + f_array_length_t width_max = (range.stop - range.start) + 1; if (width_max > buffer.used - range.start) { width_max = buffer.used - range.start; @@ -124,7 +124,7 @@ extern "C" { return F_false; } - f_string_length_t width_max = (range.stop - range.start) + 1; + f_array_length_t width_max = (range.stop - range.start) + 1; if (width_max > buffer.used - range.start) { width_max = buffer.used - range.start; @@ -157,7 +157,7 @@ extern "C" { return F_false; } - f_string_length_t width_max = (range.stop - range.start) + 1; + f_array_length_t width_max = (range.stop - range.start) + 1; if (width_max > buffer.used - range.start) { width_max = buffer.used - range.start; @@ -193,8 +193,8 @@ extern "C" { return F_none; } - f_string_length_t position = 0; - f_string_length_t distance = 0; + f_array_length_t position = 0; + f_array_length_t distance = 0; uint8_t utf_width = 0; uint8_t i = 0; @@ -286,7 +286,7 @@ extern "C" { f_status_t status = F_none; uint8_t width = 0; - f_string_length_t width_max = (range->stop - range->start) + 1; + f_array_length_t width_max = (range->stop - range->start) + 1; if (width_max > buffer.used - range->start) { width_max = buffer.used - range->start; @@ -382,9 +382,9 @@ extern "C" { f_status_t status = F_none; uint8_t width = 0; - f_string_length_t width_max = (range->stop - range->start) + 1; - f_string_length_t next = 0; - f_string_length_t next_width_max = 0; + f_array_length_t width_max = (range->stop - range->start) + 1; + f_array_length_t next = 0; + f_array_length_t next_width_max = 0; if (width_max > buffer.used - range->start) { width_max = buffer.used - range->start; diff --git a/level_0/f_fss/c/fss.h b/level_0/f_fss/c/fss.h index 819202e..e94fdd4 100644 --- a/level_0/f_fss/c/fss.h +++ b/level_0/f_fss/c/fss.h @@ -93,7 +93,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_f_fss_count_lines_ - extern f_status_t f_fss_count_lines(const f_string_static_t buffer, const f_string_length_t before, f_string_length_t *line); + extern f_status_t f_fss_count_lines(const f_string_static_t buffer, const f_array_length_t before, f_array_length_t *line); #endif // _di_f_fss_count_lines_ /** @@ -117,7 +117,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_f_fss_count_lines_range_ - extern f_status_t f_fss_count_lines_range(const f_string_static_t buffer, const f_string_range_t range, const f_string_length_t before, f_string_length_t *line); + extern f_status_t f_fss_count_lines_range(const f_string_static_t buffer, const f_string_range_t range, const f_array_length_t before, f_array_length_t *line); #endif // _di_f_fss_count_lines_range_ /** diff --git a/level_0/f_fss/c/fss_delimit.h b/level_0/f_fss/c/fss_delimit.h index 078f0c9..e6c6a5c 100644 --- a/level_0/f_fss/c/fss_delimit.h +++ b/level_0/f_fss/c/fss_delimit.h @@ -20,7 +20,7 @@ extern "C" { * Designate an fss delimit location. */ #ifndef _di_f_fss_delimit_t_ - typedef f_string_length_t f_fss_delimit_t; + typedef f_array_length_t f_fss_delimit_t; #endif // _di_f_fss_delimit_t_ /** @@ -31,22 +31,22 @@ extern "C" { * used: total number of allocated spaces used. */ #ifndef _di_f_fss_delimits_t_ - typedef f_string_lengths_t f_fss_delimits_t; + typedef f_array_lengths_t f_fss_delimits_t; - #define f_fss_delimits_t_initialize f_string_lengths_t_initialize + #define f_fss_delimits_t_initialize f_array_lengths_t_initialize - #define f_macro_fss_delimits_t_clear(delimits) f_macro_string_lengths_t_clear(delimits) + #define f_macro_fss_delimits_t_clear(delimits) f_macro_array_lengths_t_clear(delimits) - #define f_macro_fss_delimits_t_resize(status, delimits, length) f_macro_string_lengths_t_resize(status, delimits, length) - #define f_macro_fss_delimits_t_adjust(status, delimits, length) f_macro_string_lengths_t_adjust(status, delimits, length) + #define f_macro_fss_delimits_t_resize(status, delimits, length) f_macro_array_lengths_t_resize(status, delimits, length) + #define f_macro_fss_delimits_t_adjust(status, delimits, length) f_macro_array_lengths_t_adjust(status, delimits, length) - #define f_macro_fss_delimits_t_delete_simple(delimits) f_macro_string_lengths_t_delete_simple(delimits) - #define f_macro_fss_delimits_t_destroy_simple(delimits) f_macro_string_lengths_t_destroy_simple(delimits) + #define f_macro_fss_delimits_t_delete_simple(delimits) f_macro_array_lengths_t_delete_simple(delimits) + #define f_macro_fss_delimits_t_destroy_simple(delimits) f_macro_array_lengths_t_destroy_simple(delimits) - #define f_macro_fss_delimits_t_increase(status, delimits) f_macro_string_lengths_t_increase(status, delimits) - #define f_macro_fss_delimits_t_increase_by(status, delimits, amount) f_macro_string_lengths_t_increase_by(status, delimits, amount) - #define f_macro_fss_delimits_t_decrease_by(status, delimits, amount) f_macro_string_lengths_t_decrease_by(status, delimits, amount) - #define f_macro_fss_delimits_t_decimate_by(status, delimits, amount) f_macro_string_lengths_t_decimate_by(status, delimits, amount) + #define f_macro_fss_delimits_t_increase(status, delimits) f_macro_array_lengths_t_increase(status, delimits) + #define f_macro_fss_delimits_t_increase_by(status, delimits, amount) f_macro_array_lengths_t_increase_by(status, delimits, amount) + #define f_macro_fss_delimits_t_decrease_by(status, delimits, amount) f_macro_array_lengths_t_decrease_by(status, delimits, amount) + #define f_macro_fss_delimits_t_decimate_by(status, delimits, amount) f_macro_array_lengths_t_decimate_by(status, delimits, amount) #endif // _di_f_fss_delimits_t_ /** @@ -57,22 +57,22 @@ extern "C" { * used: total number of allocated spaces used. */ #ifndef _di_f_fss_delimitss_t_ - typedef f_string_lengthss_t f_fss_delimitss_t; + typedef f_array_lengthss_t f_fss_delimitss_t; - #define f_fss_delimitss_t_initialize f_string_lengthss_t_initialize + #define f_fss_delimitss_t_initialize f_array_lengthss_t_initialize - #define f_macro_fss_delimitss_t_clear(delimitss) f_macro_string_lengthss_t_clear(delimitss) + #define f_macro_fss_delimitss_t_clear(delimitss) f_macro_array_lengthss_t_clear(delimitss) - #define f_macro_fss_delimitss_t_resize(status, delimitss, length) f_macro_string_lengthss_t_resize(status, delimitss, length) - #define f_macro_fss_delimitss_t_adjust(status, delimitss, length) f_macro_string_lengthss_t_adjust(status, delimitss, length) + #define f_macro_fss_delimitss_t_resize(status, delimitss, length) f_macro_array_lengthss_t_resize(status, delimitss, length) + #define f_macro_fss_delimitss_t_adjust(status, delimitss, length) f_macro_array_lengthss_t_adjust(status, delimitss, length) - #define f_macro_fss_delimitss_t_delete_simple(delimitss) f_macro_string_lengthss_t_delete_simple(delimitss) - #define f_macro_fss_delimitss_t_destroy_simple(delimitss) f_macro_string_lengthss_t_destroy_simple(delimitss) + #define f_macro_fss_delimitss_t_delete_simple(delimitss) f_macro_array_lengthss_t_delete_simple(delimitss) + #define f_macro_fss_delimitss_t_destroy_simple(delimitss) f_macro_array_lengthss_t_destroy_simple(delimitss) - #define f_macro_fss_delimitss_t_increase(status, delimitss) f_macro_string_lengthss_t_increase(status, delimitss) - #define f_macro_fss_delimitss_t_increase_by(status, delimitss, amount) f_macro_string_lengthss_t_increase_by(status, delimitss, amount) - #define f_macro_fss_delimitss_t_decrease_by(status, delimitss, amount) f_macro_string_lengthss_t_decrease_by(status, delimitss, amount) - #define f_macro_fss_delimitss_t_decimate_by(status, delimitss, amount) f_macro_string_lengthss_t_decimate_by(status, delimitss, amount) + #define f_macro_fss_delimitss_t_increase(status, delimitss) f_macro_array_lengthss_t_increase(status, delimitss) + #define f_macro_fss_delimitss_t_increase_by(status, delimitss, amount) f_macro_array_lengthss_t_increase_by(status, delimitss, amount) + #define f_macro_fss_delimitss_t_decrease_by(status, delimitss, amount) f_macro_array_lengthss_t_decrease_by(status, delimitss, amount) + #define f_macro_fss_delimitss_t_decimate_by(status, delimitss, amount) f_macro_array_lengthss_t_decimate_by(status, delimitss, amount) #endif // _di_f_fss_delimitss_t_ #ifdef __cplusplus diff --git a/level_0/f_fss/c/fss_named.c b/level_0/f_fss/c/fss_named.c index 770cdf6..4c6134d 100644 --- a/level_0/f_fss/c/fss_named.c +++ b/level_0/f_fss/c/fss_named.c @@ -6,7 +6,7 @@ extern "C" { #endif #ifndef _di_f_fss_named_adjust_ - f_status_t f_fss_named_adjust(const f_string_length_t length, f_fss_named_t *named) { + f_status_t f_fss_named_adjust(const f_array_length_t length, f_fss_named_t *named) { #ifndef _di_level_0_parameter_checking_ if (!named) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -89,7 +89,7 @@ extern "C" { #endif // _di_f_fss_named_increase_by_ #ifndef _di_f_fss_named_resize_ - f_status_t f_fss_named_resize(const f_string_length_t length, f_fss_named_t *named) { + f_status_t f_fss_named_resize(const f_array_length_t length, f_fss_named_t *named) { #ifndef _di_level_0_parameter_checking_ if (!named) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -99,7 +99,7 @@ extern "C" { #endif // _di_f_fss_named_resize_ #ifndef _di_f_fss_nameds_adjust_ - f_status_t f_fss_nameds_adjust(const f_string_length_t length, f_fss_nameds_t *nameds) { + f_status_t f_fss_nameds_adjust(const f_array_length_t length, f_fss_nameds_t *nameds) { #ifndef _di_level_0_parameter_checking_ if (!nameds) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -182,7 +182,7 @@ extern "C" { #endif // _di_f_fss_nameds_increase_by_ #ifndef _di_f_fss_nameds_resize_ - f_status_t f_fss_nameds_resize(const f_string_length_t length, f_fss_nameds_t *nameds) { + f_status_t f_fss_nameds_resize(const f_array_length_t length, f_fss_nameds_t *nameds) { #ifndef _di_level_0_parameter_checking_ if (!nameds) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ diff --git a/level_0/f_fss/c/fss_nest.c b/level_0/f_fss/c/fss_nest.c index 221cdb9..b0fd227 100644 --- a/level_0/f_fss/c/fss_nest.c +++ b/level_0/f_fss/c/fss_nest.c @@ -6,7 +6,7 @@ extern "C" { #endif #ifndef _di_f_fss_items_adjust_ - f_status_t f_fss_items_adjust(const f_string_length_t length, f_fss_items_t *items) { + f_status_t f_fss_items_adjust(const f_array_length_t length, f_fss_items_t *items) { #ifndef _di_level_0_parameter_checking_ if (!items) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -89,7 +89,7 @@ extern "C" { #endif // _di_f_fss_items_increase_by_ #ifndef _di_f_fss_items_resize_ - f_status_t f_fss_items_resize(const f_string_length_t length, f_fss_items_t *items) { + f_status_t f_fss_items_resize(const f_array_length_t length, f_fss_items_t *items) { #ifndef _di_level_0_parameter_checking_ if (!items) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -99,7 +99,7 @@ extern "C" { #endif // _di_f_fss_items_resize_ #ifndef _di_f_fss_nest_adjust_ - f_status_t f_fss_nest_adjust(const f_string_length_t length, f_fss_nest_t *nest) { + f_status_t f_fss_nest_adjust(const f_array_length_t length, f_fss_nest_t *nest) { #ifndef _di_level_0_parameter_checking_ if (!nest) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -182,7 +182,7 @@ extern "C" { #endif // _di_f_fss_nest_increase_by_ #ifndef _di_f_fss_nest_resize_ - f_status_t f_fss_nest_resize(const f_string_length_t length, f_fss_nest_t *nest) { + f_status_t f_fss_nest_resize(const f_array_length_t length, f_fss_nest_t *nest) { #ifndef _di_level_0_parameter_checking_ if (!nest) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -192,7 +192,7 @@ extern "C" { #endif // _di_f_fss_nest_resize_ #ifndef _di_f_fss_nests_adjust_ - f_status_t f_fss_nests_adjust(const f_string_length_t length, f_fss_nests_t *nests) { + f_status_t f_fss_nests_adjust(const f_array_length_t length, f_fss_nests_t *nests) { #ifndef _di_level_0_parameter_checking_ if (!nests) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -275,7 +275,7 @@ extern "C" { #endif // _di_f_fss_nests_increase_by_ #ifndef _di_f_fss_nests_resize_ - f_status_t f_fss_nests_resize(const f_string_length_t length, f_fss_nests_t *nests) { + f_status_t f_fss_nests_resize(const f_array_length_t length, f_fss_nests_t *nests) { #ifndef _di_level_0_parameter_checking_ if (!nests) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ diff --git a/level_0/f_fss/c/fss_set.c b/level_0/f_fss/c/fss_set.c index d6d5201..249fa3a 100644 --- a/level_0/f_fss/c/fss_set.c +++ b/level_0/f_fss/c/fss_set.c @@ -6,7 +6,7 @@ extern "C" { #endif #ifndef _di_f_fss_set_adjust_ - f_status_t f_fss_set_adjust(const f_string_length_t length, f_fss_set_t *set) { + f_status_t f_fss_set_adjust(const f_array_length_t length, f_fss_set_t *set) { #ifndef _di_level_0_parameter_checking_ if (!set) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -89,7 +89,7 @@ extern "C" { #endif // _di_f_fss_set_increase_by_ #ifndef _di_f_fss_set_resize_ - f_status_t f_fss_set_resize(const f_string_length_t length, f_fss_set_t *set) { + f_status_t f_fss_set_resize(const f_array_length_t length, f_fss_set_t *set) { #ifndef _di_level_0_parameter_checking_ if (!set) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -99,7 +99,7 @@ extern "C" { #endif // _di_f_fss_set_resize_ #ifndef _di_f_fss_set_quote_adjust_ - f_status_t f_fss_set_quote_adjust(const f_string_length_t length, f_fss_set_quote_t *set_quote) { + f_status_t f_fss_set_quote_adjust(const f_array_length_t length, f_fss_set_quote_t *set_quote) { #ifndef _di_level_0_parameter_checking_ if (!set_quote) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -182,7 +182,7 @@ extern "C" { #endif // _di_f_fss_set_quote_increase_by_ #ifndef _di_f_fss_set_quote_resize_ - f_status_t f_fss_set_quote_resize(const f_string_length_t length, f_fss_set_quote_t *set_quote) { + f_status_t f_fss_set_quote_resize(const f_array_length_t length, f_fss_set_quote_t *set_quote) { #ifndef _di_level_0_parameter_checking_ if (!set_quote) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -192,7 +192,7 @@ extern "C" { #endif // _di_f_fss_set_quote_resize_ #ifndef _di_f_fss_set_quotes_adjust_ - f_status_t f_fss_set_quotes_adjust(const f_string_length_t length, f_fss_set_quotes_t *set_quotes) { + f_status_t f_fss_set_quotes_adjust(const f_array_length_t length, f_fss_set_quotes_t *set_quotes) { #ifndef _di_level_0_parameter_checking_ if (!set_quotes) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -275,7 +275,7 @@ extern "C" { #endif // _di_f_fss_set_quotes_increase_by_ #ifndef _di_f_fss_set_quotes_resize_ - f_status_t f_fss_set_quotes_resize(const f_string_length_t length, f_fss_set_quotes_t *set_quotes) { + f_status_t f_fss_set_quotes_resize(const f_array_length_t length, f_fss_set_quotes_t *set_quotes) { #ifndef _di_level_0_parameter_checking_ if (!set_quotes) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -285,7 +285,7 @@ extern "C" { #endif // _di_f_fss_set_quotes_resize_ #ifndef _di_f_fss_sets_adjust_ - f_status_t f_fss_sets_adjust(const f_string_length_t length, f_fss_sets_t *sets) { + f_status_t f_fss_sets_adjust(const f_array_length_t length, f_fss_sets_t *sets) { #ifndef _di_level_0_parameter_checking_ if (!sets) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -368,7 +368,7 @@ extern "C" { #endif // _di_f_fss_sets_increase_by_ #ifndef _di_f_fss_sets_resize_ - f_status_t f_fss_sets_resize(const f_string_length_t length, f_fss_sets_t *sets) { + f_status_t f_fss_sets_resize(const f_array_length_t length, f_fss_sets_t *sets) { #ifndef _di_level_0_parameter_checking_ if (!sets) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ diff --git a/level_0/f_iki/c/iki-common.h b/level_0/f_iki/c/iki-common.h index 96ff488..13b0cd5 100644 --- a/level_0/f_iki/c/iki-common.h +++ b/level_0/f_iki/c/iki-common.h @@ -201,16 +201,16 @@ extern "C" { #define f_macro_iki_allocate_delimits_if_necessary(status, delimits) \ status = F_none; \ if (delimits.used == delimits.size) { \ - if (delimits.used + f_iki_default_allocation_step > f_string_length_t_size) { \ - if (delimits.used == f_string_length_t_size) { \ + if (delimits.used + f_iki_default_allocation_step > f_array_length_t_size) { \ + if (delimits.used == f_array_length_t_size) { \ status = F_status_set_error(F_string_too_large); \ } \ else { \ - f_macro_string_lengths_t_resize(status, delimits, delimits.size + 1); \ + f_macro_array_lengths_t_resize(status, delimits, delimits.size + 1); \ } \ } \ else { \ - f_macro_string_lengths_t_resize(status, delimits, delimits.size + f_iki_default_allocation_step); \ + f_macro_array_lengths_t_resize(status, delimits, delimits.size + f_iki_default_allocation_step); \ } \ } #endif // _di_f_macro_iki_allocate_delimits_if_necessary_ @@ -225,8 +225,8 @@ extern "C" { #define f_macro_iki_allocate_ranges_if_necessary(status, ranges) \ status = F_none; \ if (ranges.used == ranges.size) { \ - if (ranges.used + f_iki_default_allocation_step > f_string_length_t_size) { \ - if (ranges.used == f_string_length_t_size) { \ + if (ranges.used + f_iki_default_allocation_step > f_array_length_t_size) { \ + if (ranges.used == f_array_length_t_size) { \ status = F_status_set_error(F_string_too_large); \ } \ else { \ diff --git a/level_0/f_iki/c/iki.c b/level_0/f_iki/c/iki.c index 69632cf..a7e3230 100644 --- a/level_0/f_iki/c/iki.c +++ b/level_0/f_iki/c/iki.c @@ -79,7 +79,7 @@ extern "C" { f_status_t status = F_none; - f_string_length_t width_max = 0; + f_array_length_t width_max = 0; if (width_max > buffer->used - range->start) { width_max = buffer->used - range->start; @@ -99,11 +99,11 @@ extern "C" { } f_string_range_t found_vocabulary = f_string_range_t_initialize; - f_string_length_t found_content = 0; + f_array_length_t found_content = 0; found_vocabulary.start = range->start; - f_string_length_t vocabulary_slash_first = range->start; + f_array_length_t vocabulary_slash_first = range->start; uint8_t quote = 0; @@ -111,7 +111,7 @@ extern "C" { bool find_next = F_false; // delimits must only be applied once a valid object is found. - f_string_lengths_t delimits = f_string_lengths_t_initialize; + f_array_lengths_t delimits = f_array_lengths_t_initialize; do { @@ -128,7 +128,7 @@ extern "C" { status = f_utf_buffer_increment(*buffer, range, 1); if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(delimits); + f_macro_array_lengths_t_delete_simple(delimits); return status; } @@ -143,7 +143,7 @@ extern "C" { } while (F_status_is_fine(status) && buffer->string[range->start] == f_iki_syntax_placeholder); if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(delimits); + f_macro_array_lengths_t_delete_simple(delimits); return status; } @@ -157,7 +157,7 @@ extern "C" { // this is not a valid vocabulary name so seek until a non-word, non-dash, or non-plus character. f_macro_iki_seek_word_dash_plus(status, buffer, range, width_max, F_false); if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(delimits); + f_macro_array_lengths_t_delete_simple(delimits); return status; } @@ -200,7 +200,7 @@ extern "C" { status = f_utf_buffer_increment(*buffer, range, 1); if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(delimits); + f_macro_array_lengths_t_delete_simple(delimits); return status; } } // while @@ -213,7 +213,7 @@ extern "C" { status = f_utf_is_word_dash_plus(buffer->string + range->start, width_max, F_false); if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(delimits); + f_macro_array_lengths_t_delete_simple(delimits); return status; } @@ -222,15 +222,15 @@ extern "C" { f_macro_iki_seek_word_dash_plus(status, buffer, range, width_max, F_true); if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(delimits); + f_macro_array_lengths_t_delete_simple(delimits); return status; } else if (range->start > range->stop) { - f_macro_string_lengths_t_delete_simple(delimits); + f_macro_array_lengths_t_delete_simple(delimits); return F_data_not_stop; } else if (range->start >= buffer->used) { - f_macro_string_lengths_t_delete_simple(delimits); + f_macro_array_lengths_t_delete_simple(delimits); return F_data_not_eos; } @@ -241,7 +241,7 @@ extern "C" { status = f_utf_buffer_increment(*buffer, range, 1); if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(delimits); + f_macro_array_lengths_t_delete_simple(delimits); return status; } } // while @@ -264,7 +264,7 @@ extern "C" { f_macro_iki_allocate_delimits_if_necessary(status, delimits); if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(delimits); + f_macro_array_lengths_t_delete_simple(delimits); return status; } @@ -290,7 +290,7 @@ extern "C" { } if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(delimits); + f_macro_array_lengths_t_delete_simple(delimits); return status; } @@ -310,7 +310,7 @@ extern "C" { buffer->string[delimits.array[i]] = f_iki_syntax_placeholder; } // for - f_macro_string_lengths_t_delete_simple(delimits); + f_macro_array_lengths_t_delete_simple(delimits); if (F_status_is_error(status)) return status; range->start++; @@ -327,7 +327,7 @@ extern "C" { } } else if (buffer->string[range->start] == f_iki_syntax_slash) { - f_string_length_t content_slash_first = range->start; + f_array_length_t content_slash_first = range->start; f_array_length_t content_slash_total = 0; while (range->start <= range->stop && range->start < buffer->used) { @@ -347,15 +347,15 @@ extern "C" { } if (delimits.used + content_slash_delimits > delimits.size) { - if (delimits.used + content_slash_delimits > f_string_length_t_size) { + if (delimits.used + content_slash_delimits > f_array_length_t_size) { status = F_status_set_error(F_string_too_large); } else { - f_macro_string_lengths_t_resize(status, delimits, delimits.used + content_slash_delimits); + f_macro_array_lengths_t_resize(status, delimits, delimits.used + content_slash_delimits); } if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(delimits); + f_macro_array_lengths_t_delete_simple(delimits); return status; } } @@ -375,7 +375,7 @@ extern "C" { status = f_utf_buffer_increment(*buffer, (&content_range), 1); if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(delimits); + f_macro_array_lengths_t_delete_simple(delimits); return status; } } // while @@ -388,7 +388,7 @@ extern "C" { f_macro_iki_allocate_delimits_if_necessary(status, delimits); if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(delimits); + f_macro_array_lengths_t_delete_simple(delimits); return status; } @@ -417,7 +417,7 @@ extern "C" { } if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(delimits); + f_macro_array_lengths_t_delete_simple(delimits); return status; } @@ -437,7 +437,7 @@ extern "C" { buffer->string[delimits.array[i]] = f_iki_syntax_placeholder; } // for - f_macro_string_lengths_t_delete_simple(delimits); + f_macro_array_lengths_t_delete_simple(delimits); if (F_status_is_error(status)) return status; range->start++; @@ -465,7 +465,7 @@ extern "C" { status = f_utf_buffer_increment(*buffer, range, 1); if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(delimits); + f_macro_array_lengths_t_delete_simple(delimits); return status; } } // while @@ -474,7 +474,7 @@ extern "C" { status = f_utf_buffer_increment(*buffer, range, 1); if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(delimits); + f_macro_array_lengths_t_delete_simple(delimits); return status; } } // while @@ -496,7 +496,7 @@ extern "C" { buffer->string[delimits.array[i]] = f_iki_syntax_placeholder; } // for - f_macro_string_lengths_t_delete_simple(delimits); + f_macro_array_lengths_t_delete_simple(delimits); if (F_status_is_error(status)) return status; if (range->start > range->stop) { diff --git a/level_0/f_iki/c/iki.h b/level_0/f_iki/c/iki.h index 8a1611d..8ffb35e 100644 --- a/level_0/f_iki/c/iki.h +++ b/level_0/f_iki/c/iki.h @@ -21,6 +21,7 @@ #include #include #include +#include #include #include diff --git a/level_0/f_iki/c/private-iki.c b/level_0/f_iki/c/private-iki.c index 118247b..529f81c 100644 --- a/level_0/f_iki/c/private-iki.c +++ b/level_0/f_iki/c/private-iki.c @@ -7,9 +7,9 @@ extern "C" { #if !defined(_di_f_iki_content_is_) || !defined(_di_f_iki_content_partial_is_) f_status_t private_f_iki_content_partial_is(const f_string_static_t buffer, const f_string_range_t range, const uint8_t quote) { - f_string_length_t delimits = 0; + f_array_length_t delimits = 0; - for (f_string_length_t i = 0; i < buffer.used; i++) { + for (f_array_length_t i = 0; i < buffer.used; i++) { if (buffer.string[i] == quote) { if (delimits && delimits % 2) { @@ -35,7 +35,7 @@ extern "C" { f_status_t private_f_iki_object_partial_is(const f_string_static_t buffer, const f_string_range_t range) { f_status_t status = F_none; - for (f_string_length_t i = 0; i < buffer.used; i++) { + for (f_array_length_t i = 0; i < buffer.used; i++) { status = f_utf_is_word(buffer.string + i, buffer.used - i, F_false); if (F_status_is_error(status)) return status; diff --git a/level_0/f_path/c/path.c b/level_0/f_path/c/path.c index 18bd1b3..59cbbd3 100644 --- a/level_0/f_path/c/path.c +++ b/level_0/f_path/c/path.c @@ -73,7 +73,7 @@ extern "C" { return private_f_path_real(buffer, path); } - const f_string_length_t length = strnlen(buffer, f_path_length_max); + const f_array_length_t length = strnlen(buffer, f_path_length_max); if (length + 1 > path->size) { f_status_t status = F_none; @@ -93,12 +93,12 @@ extern "C" { #endif // _di_f_path_current_ #ifndef _di_f_path_is_ - f_status_t f_path_is(const f_string_t path, const f_string_length_t length) { + f_status_t f_path_is(const f_string_t path, const f_array_length_t length) { if (!path || !length) { return F_false; } - for (f_string_length_t i = 0; i < length; i++) { + for (f_array_length_t i = 0; i < length; i++) { if (path[i] == f_path_separator_s[0]) { return F_true; diff --git a/level_0/f_path/c/path.h b/level_0/f_path/c/path.h index 96a0aae..3f17c56 100644 --- a/level_0/f_path/c/path.h +++ b/level_0/f_path/c/path.h @@ -127,7 +127,7 @@ extern "C" { * F_false if this string is not a path string. */ #ifndef _di_f_path_is_ - extern f_status_t f_path_is(const f_string_t path, const f_string_length_t length); + extern f_status_t f_path_is(const f_string_t path, const f_array_length_t length); #endif // _di_f_path_is_ /** diff --git a/level_0/f_path/c/private-path.c b/level_0/f_path/c/private-path.c index 3550f39..a2b69ab 100644 --- a/level_0/f_path/c/private-path.c +++ b/level_0/f_path/c/private-path.c @@ -22,7 +22,7 @@ extern "C" { return F_status_set_error(F_failure); } - const f_string_length_t length = strnlen(buffer, f_path_length_max); + const f_array_length_t length = strnlen(buffer, f_path_length_max); if (length + 1 > real->size) { f_status_t status = F_none; diff --git a/level_0/f_print/c/print.c b/level_0/f_print/c/print.c index 2230c8a..e198601 100644 --- a/level_0/f_print/c/print.c +++ b/level_0/f_print/c/print.c @@ -6,7 +6,7 @@ extern "C" { #endif #ifndef _di_f_print_ - f_status_t f_print(FILE *output, const f_string_t string, const f_string_length_t length) { + f_status_t f_print(FILE *output, const f_string_t string, const f_array_length_t length) { #ifndef _di_level_0_parameter_checking_ if (!output) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -37,7 +37,7 @@ extern "C" { if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not; - f_string_length_t length = (range.stop - range.start) + 1; + f_array_length_t length = (range.stop - range.start) + 1; if (length + range.start > buffer.used) { length = buffer.used - range.start; @@ -48,7 +48,7 @@ extern "C" { #endif // _di_f_print_dynamic_partial_ #ifndef _di_f_print_except_ - f_status_t f_print_except(FILE *output, const f_string_t string, const f_string_length_t length, const f_string_lengths_t except) { + f_status_t f_print_except(FILE *output, const f_string_t string, const f_array_length_t length, const f_array_lengths_t except) { #ifndef _di_level_0_parameter_checking_ if (!output) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -60,7 +60,7 @@ extern "C" { #endif // _di_f_print_except_ #ifndef _di_f_print_except_dynamic_ - f_status_t f_print_except_dynamic(FILE *output, const f_string_static_t buffer, const f_string_lengths_t except) { + f_status_t f_print_except_dynamic(FILE *output, const f_string_static_t buffer, const f_array_lengths_t except) { #ifndef _di_level_0_parameter_checking_ if (!output) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -72,14 +72,14 @@ extern "C" { #endif // _di_f_print_except_dynamic_ #ifndef _di_f_print_except_dynamic_partial_ - f_status_t f_print_except_dynamic_partial(FILE *output, const f_string_static_t buffer, const f_string_range_t range, const f_string_lengths_t except) { + f_status_t f_print_except_dynamic_partial(FILE *output, const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except) { #ifndef _di_level_0_parameter_checking_ if (!output) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not; - f_string_length_t length = (range.stop - range.start) + 1; + f_array_length_t length = (range.stop - range.start) + 1; if (length + range.start > buffer.used) { length = buffer.used - range.start; @@ -90,7 +90,7 @@ extern "C" { #endif // _di_f_print_except_dynamic_partial_ #ifndef _di_f_print_to_ - f_status_t f_print_to(const int id, const f_string_t string, const f_string_length_t length) { + f_status_t f_print_to(const int id, const f_string_t string, const f_array_length_t length) { #ifndef _di_level_0_parameter_checking_ if (id == -1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -121,7 +121,7 @@ extern "C" { if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not; - f_string_length_t length = (range.stop - range.start) + 1; + f_array_length_t length = (range.stop - range.start) + 1; if (length + range.start > buffer.used) { length = buffer.used - range.start; @@ -132,7 +132,7 @@ extern "C" { #endif // _di_f_print_to_dynamic_partial_ #ifndef _di_f_print_to_except_ - f_status_t f_print_to_except(const int id, const f_string_t string, const f_string_length_t length, const f_string_lengths_t except) { + f_status_t f_print_to_except(const int id, const f_string_t string, const f_array_length_t length, const f_array_lengths_t except) { #ifndef _di_level_0_parameter_checking_ if (id == -1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -144,7 +144,7 @@ extern "C" { #endif // _di_f_print_to_except_ #ifndef _di_f_print_to_except_dynamic_ - f_status_t f_print_to_except_dynamic(const int id, const f_string_static_t buffer, const f_string_lengths_t except) { + f_status_t f_print_to_except_dynamic(const int id, const f_string_static_t buffer, const f_array_lengths_t except) { #ifndef _di_level_0_parameter_checking_ if (id == -1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -156,14 +156,14 @@ extern "C" { #endif // _di_f_print_to_except_dynamic_ #ifndef _di_f_print_to_except_dynamic_partial_ - f_status_t f_print_to_except_dynamic_partial(const int id, const f_string_static_t buffer, const f_string_range_t range, const f_string_lengths_t except) { + f_status_t f_print_to_except_dynamic_partial(const int id, const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except) { #ifndef _di_level_0_parameter_checking_ if (id == -1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not; - f_string_length_t length = (range.stop - range.start) + 1; + f_array_length_t length = (range.stop - range.start) + 1; if (length + range.start > buffer.used) { length = buffer.used - range.start; diff --git a/level_0/f_print/c/print.h b/level_0/f_print/c/print.h index 86b5d60..fb79af8 100644 --- a/level_0/f_print/c/print.h +++ b/level_0/f_print/c/print.h @@ -52,7 +52,7 @@ extern "C" { * @see fputc() */ #ifndef _di_f_print_ - extern f_status_t f_print(FILE *output, const f_string_t string, const f_string_length_t length); + extern f_status_t f_print(FILE *output, const f_string_t string, const f_array_length_t length); #endif // _di_f_print_ /** @@ -132,7 +132,7 @@ extern "C" { * @see fputc() */ #ifndef _di_f_print_except_ - extern f_status_t f_print_except(FILE *output, const f_string_t string, const f_string_length_t length, const f_string_lengths_t except); + extern f_status_t f_print_except(FILE *output, const f_string_t string, const f_array_length_t length, const f_array_lengths_t except); #endif // _di_f_print_except_ /** @@ -160,7 +160,7 @@ extern "C" { * @see fputc() */ #ifndef _di_f_print_except_dynamic_ - extern f_status_t f_print_except_dynamic(FILE *output, const f_string_static_t buffer, const f_string_lengths_t except); + extern f_status_t f_print_except_dynamic(FILE *output, const f_string_static_t buffer, const f_array_lengths_t except); #endif // _di_f_print_except_dynamic_ /** @@ -190,7 +190,7 @@ extern "C" { * @see fputc() */ #ifndef _di_f_print_dynamic_except_partial_ - extern f_status_t f_print_except_dynamic_partial(FILE *output, const f_string_static_t buffer, const f_string_range_t range, const f_string_lengths_t except); + extern f_status_t f_print_except_dynamic_partial(FILE *output, const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except); #endif // _di_f_print_except_dynamic_partial_ @@ -223,7 +223,7 @@ extern "C" { * @see write() */ #ifndef _di_f_print_to_ - extern f_status_t f_print_to(const int id, const f_string_t string, const f_string_length_t length); + extern f_status_t f_print_to(const int id, const f_string_t string, const f_array_length_t length); #endif // _di_f_print_to_ /** @@ -323,7 +323,7 @@ extern "C" { * @see write() */ #ifndef _di_f_print_to_except_ - extern f_status_t f_print_to_except(const int id, const f_string_t string, const f_string_length_t length, const f_string_lengths_t except); + extern f_status_t f_print_to_except(const int id, const f_string_t string, const f_array_length_t length, const f_array_lengths_t except); #endif // _di_f_print_to_except_ /** @@ -359,7 +359,7 @@ extern "C" { * @see write() */ #ifndef _di_f_print_to_except_dynamic_ - extern f_status_t f_print_to_except_dynamic(const int id, const f_string_static_t buffer, const f_string_lengths_t except); + extern f_status_t f_print_to_except_dynamic(const int id, const f_string_static_t buffer, const f_array_lengths_t except); #endif // _di_f_print_to_except_dynamic_ /** @@ -397,7 +397,7 @@ extern "C" { * @see write() */ #ifndef _di_f_print_to_except_dynamic_partial_ - extern f_status_t f_print_to_except_dynamic_partial(const int id, const f_string_static_t buffer, const f_string_range_t range, const f_string_lengths_t except); + extern f_status_t f_print_to_except_dynamic_partial(const int id, const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except); #endif // _di_f_print_to_except_dynamic_partial_ #ifdef __cplusplus diff --git a/level_0/f_print/c/private-print.c b/level_0/f_print/c/private-print.c index 938bfcc..b13b502 100644 --- a/level_0/f_print/c/private-print.c +++ b/level_0/f_print/c/private-print.c @@ -6,8 +6,8 @@ extern "C" { #endif #if !defined(_di_f_print_) || !defined(_di_f_print_dynamic_) || !defined(_di_f_print_dynamic_partial_) - f_status_t private_f_print(FILE *output, const f_string_t string, const f_string_length_t length) { - for (register f_string_length_t i = 0; i < length; ++i) { + f_status_t private_f_print(FILE *output, const f_string_t string, const f_array_length_t length) { + for (register f_array_length_t i = 0; i < length; ++i) { if (string[i]) { if (!fputc(string[i], output)) { @@ -21,10 +21,10 @@ extern "C" { #endif // !defined(_di_f_print_) || !defined(_di_f_print_dynamic_) || !defined(_di_f_print_dynamic_partial_) #if !defined(_di_f_print_except_) || !defined(_di_f_print_except_dynamic_) || !defined(_di_f_print_except_dynamic_partial_) - f_status_t private_f_print_except(FILE *output, const f_string_t string, const f_string_length_t offset, const f_string_length_t stop, const f_string_lengths_t except) { - f_string_length_t j = 0; + f_status_t private_f_print_except(FILE *output, const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except) { + f_array_length_t j = 0; - for (register f_string_length_t i = offset; i < stop; ++i) { + for (register f_array_length_t i = offset; i < stop; ++i) { for (; j < except.used && except.array[j] < i; ++j) { // do nothing. @@ -44,11 +44,11 @@ extern "C" { #endif // !defined(_di_f_print_except_) || !defined(_di_f_print_except_dynamic_) || !defined(_di_f_print_except_dynamic_partial_) #if !defined(_di_f_print_to_) || !defined(_di_f_print_dynamic_to_) || !defined(_di_f_print_dynamic_partial_to_) - f_status_t private_f_print_to(const int id, const f_string_t string, const f_string_length_t length) { - register f_string_length_t i = 0; + f_status_t private_f_print_to(const int id, const f_string_t string, const f_array_length_t length) { + register f_array_length_t i = 0; - f_string_length_t start = 0; - f_string_length_t total = 0; + f_array_length_t start = 0; + f_array_length_t total = 0; for (; i < length; ++i) { @@ -94,12 +94,12 @@ extern "C" { #endif // !defined(_di_f_print_to_) || !defined(_di_f_print_dynamic_to_) || !defined(_di_f_print_dynamic_partial_to_) #if !defined(_di_f_print_to_except_) || !defined(_di_f_print_to_except_dynamic_) || !defined(_di_f_print_to_except_dynamic_partial_) - f_status_t private_f_print_to_except(const int id, const f_string_t string, const f_string_length_t offset, const f_string_length_t stop, const f_string_lengths_t except) { - register f_string_length_t i = offset; + f_status_t private_f_print_to_except(const int id, const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except) { + register f_array_length_t i = offset; - f_string_length_t j = 0; - f_string_length_t start = offset; - f_string_length_t total = 0; + f_array_length_t j = 0; + f_array_length_t start = offset; + f_array_length_t total = 0; for (; i < stop; ++i) { diff --git a/level_0/f_print/c/private-print.h b/level_0/f_print/c/private-print.h index 0e6305d..36a8619 100644 --- a/level_0/f_print/c/private-print.h +++ b/level_0/f_print/c/private-print.h @@ -38,7 +38,7 @@ extern "C" { * @see f_print_dynamic_partial() */ #if !defined(_di_f_print_) || !defined(_di_f_print_dynamic_) || !defined(_di_f_print_dynamic_partial_) - extern f_status_t private_f_print(FILE *output, const f_string_t string, const f_string_length_t length) f_gcc_attribute_visibility_internal; + extern f_status_t private_f_print(FILE *output, const f_string_t string, const f_array_length_t length) f_gcc_attribute_visibility_internal; #endif // !defined(_di_f_print_) || !defined(_di_f_print_dynamic_) || !defined(_di_f_print_dynamic_partial_) /** @@ -69,7 +69,7 @@ extern "C" { * @see f_print_except_dynamic_partial() */ #if !defined(_di_f_print_except_) || !defined(_di_f_print_except_dynamic_) || !defined(_di_f_print_except_dynamic_partial_) - extern f_status_t private_f_print_except(FILE *output, const f_string_t string, const f_string_length_t offset, const f_string_length_t stop, const f_string_lengths_t except) f_gcc_attribute_visibility_internal; + extern f_status_t private_f_print_except(FILE *output, const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except) f_gcc_attribute_visibility_internal; #endif // !defined(_di_f_print_except_) || !defined(_di_f_print_except_dynamic_) || !defined(_di_f_print_except_dynamic_partial_) /** @@ -101,7 +101,7 @@ extern "C" { * @see f_print_to_dynamic_partial() */ #if !defined(_di_f_print_to_) || !defined(_di_f_print_to_dynamic_) || !defined(_di_f_print_to_dynamic_partial_) - extern f_status_t private_f_print_to(const int id, const f_string_t string, const f_string_length_t length) f_gcc_attribute_visibility_internal; + extern f_status_t private_f_print_to(const int id, const f_string_t string, const f_array_length_t length) f_gcc_attribute_visibility_internal; #endif // !defined(_di_f_print_to_) || !defined(_di_f_print_to_dynamic_) || !defined(_di_f_print_to_dynamic_partial_) /** @@ -138,7 +138,7 @@ extern "C" { * @see f_print_to_except_dynamic_partial() */ #if !defined(_di_f_print_to_except_) || !defined(_di_f_print_to_except_dynamic_) || !defined(_di_f_print_to_except_dynamic_partial_) - extern f_status_t private_f_print_to_except(const int id, const f_string_t string, const f_string_length_t offset, const f_string_length_t stop, const f_string_lengths_t except) f_gcc_attribute_visibility_internal; + extern f_status_t private_f_print_to_except(const int id, const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except) f_gcc_attribute_visibility_internal; #endif // !defined(_di_f_print_to_except_) || !defined(_di_f_print_to_except_dynamic_) || !defined(_di_f_print_to_except_dynamic_partial_) #ifdef __cplusplus diff --git a/level_0/f_serialize/c/serialize.c b/level_0/f_serialize/c/serialize.c index 37e6724..8749bc5 100644 --- a/level_0/f_serialize/c/serialize.c +++ b/level_0/f_serialize/c/serialize.c @@ -58,7 +58,7 @@ extern "C" { strings->used++; } else { - f_string_length_t total; + f_array_length_t total; if (i + 1 >= serialize.used) { total = (i - start) + 1; @@ -180,7 +180,7 @@ extern "C" { return status; } - f_string_length_t total = (range.stop - range.start) + 1; + f_array_length_t total = (range.stop - range.start) + 1; if (total >= dynamic->size) { f_status_t status_allocation = F_none; diff --git a/level_0/f_string/c/private-string.c b/level_0/f_string/c/private-string.c index e3ef695..27333b6 100644 --- a/level_0/f_string/c/private-string.c +++ b/level_0/f_string/c/private-string.c @@ -6,7 +6,7 @@ extern "C" { #endif #if !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_mash_) - f_status_t private_f_string_append(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) { + f_status_t private_f_string_append(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { if (destination->used + length > destination->size) { const f_status_t status = private_f_string_dynamic_increase_by(length, destination); @@ -21,17 +21,17 @@ extern "C" { #endif // !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_mash_) #if !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_mash_nulless_) - f_status_t private_f_string_append_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) { + f_status_t private_f_string_append_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { - if (destination->used + length > f_string_length_t_size) { + if (destination->used + length > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } f_status_t status = F_none; - f_string_length_t i = 0; - f_string_length_t first = 0; - f_string_length_t size = 0; + f_array_length_t i = 0; + f_array_length_t first = 0; + f_array_length_t size = 0; for (; i < length; i++) { @@ -73,7 +73,7 @@ extern "C" { #endif // !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_mash_nulless_) #if !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_) - f_status_t private_f_string_dynamic_adjust(const f_string_length_t length, f_string_dynamic_t *dynamic) { + f_status_t private_f_string_dynamic_adjust(const f_array_length_t length, f_string_dynamic_t *dynamic) { f_status_t status = f_memory_adjust(dynamic->size, length, sizeof(f_string_t), (void **) & dynamic->string); @@ -90,10 +90,10 @@ extern "C" { #endif // !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_) #if !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_) - f_status_t private_f_string_dynamic_increase_by(const f_string_length_t amount, f_string_dynamic_t *dynamic) { + f_status_t private_f_string_dynamic_increase_by(const f_array_length_t amount, f_string_dynamic_t *dynamic) { if (dynamic->used + amount > dynamic->size) { - if (dynamic->used + amount > f_string_length_t_size) { + if (dynamic->used + amount > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } @@ -105,7 +105,7 @@ extern "C" { #endif // !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_) #if !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_) - f_status_t private_f_string_dynamic_resize(const f_string_length_t length, f_string_dynamic_t *dynamic) { + f_status_t private_f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t *dynamic) { const f_status_t status = f_memory_resize(dynamic->size, length, sizeof(f_string_t), (void **) & dynamic->string); @@ -276,9 +276,9 @@ extern "C" { #endif // !defined(_di_f_string_maps_decrease_by_) || !defined(_di_f_string_maps_increase_) || !defined(_di_f_string_maps_increase_by_) || !defined(_di_f_string_maps_terminate_) || !defined(_di_f_string_maps_terminate_after_) #if !defined(_di_f_string_dynamic_mish_) || !defined(_di_f_string_dynamic_partial_mish_) || !defined(_di_f_string_dynamic_partial_prepend_assure_) || !defined(_di_f_string_dynamic_partial_prepend_) || !defined(_di_f_string_dynamic_prepend_assure_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_mish_) || !defined(_di_f_string_prepend_assure_) || !defined(_di_f_string_prepend_) - f_status_t private_f_string_prepend(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) { + f_status_t private_f_string_prepend(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { - if (destination->used + length > f_string_length_t_size) { + if (destination->used + length > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } @@ -301,20 +301,20 @@ extern "C" { #endif // !defined(_di_f_string_dynamic_mish_) || !defined(_di_f_string_dynamic_partial_mish_) || !defined(_di_f_string_dynamic_partial_prepend_assure_) || !defined(_di_f_string_dynamic_partial_prepend_) || !defined(_di_f_string_dynamic_prepend_assure_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_mish_) || !defined(_di_f_string_prepend_assure_) || !defined(_di_f_string_prepend_) #if !defined(_di_f_string_dynamic_mish_nulless_) || !defined(_di_f_string_dynamic_partial_mish_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_mish_nulless_) || !defined(_di_f_string_prepend_assure_nulless_) || !defined(_di_f_string_prepend_nulless_) - f_status_t private_f_string_prepend_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) { + f_status_t private_f_string_prepend_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { - if (destination->used + length > f_string_length_t_size) { + if (destination->used + length > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } f_status_t status = F_none; - f_string_length_t first = 0; - f_string_length_t offset = 0; + f_array_length_t first = 0; + f_array_length_t offset = 0; - f_string_length_t size = 0; + f_array_length_t size = 0; - for (f_string_length_t i = 0; i <= length; i++) { + for (f_array_length_t i = 0; i <= length; i++) { if (i == length) { if (i > first) { diff --git a/level_0/f_string/c/private-string.h b/level_0/f_string/c/private-string.h index 58f068c..21549c7 100644 --- a/level_0/f_string/c/private-string.h +++ b/level_0/f_string/c/private-string.h @@ -49,7 +49,7 @@ extern "C" { * @see private_f_string_dynamic_increase_by() */ #if !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_mash_) - extern f_status_t private_f_string_append(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal; + extern f_status_t private_f_string_append(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal; #endif // !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_mash_) /** @@ -80,7 +80,7 @@ extern "C" { * @see private_f_string_dynamic_increase_by() */ #if !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_mash_nulless_) - extern f_status_t private_f_string_append_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal; + extern f_status_t private_f_string_append_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal; #endif // !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_mash_nulless_) /** @@ -103,7 +103,7 @@ extern "C" { * @see f_string_dynamic_decimate_by() */ #if !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_) - extern f_status_t private_f_string_dynamic_adjust(const f_string_length_t length, f_string_dynamic_t *string) f_gcc_attribute_visibility_internal; + extern f_status_t private_f_string_dynamic_adjust(const f_array_length_t length, f_string_dynamic_t *string) f_gcc_attribute_visibility_internal; #endif // !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_) /** @@ -140,7 +140,7 @@ extern "C" { * @see f_string_prepend_nulless() */ #if !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_) - extern f_status_t private_f_string_dynamic_increase_by(const f_string_length_t amount, f_string_dynamic_t *string) f_gcc_attribute_visibility_internal; + extern f_status_t private_f_string_dynamic_increase_by(const f_array_length_t amount, f_string_dynamic_t *string) f_gcc_attribute_visibility_internal; #endif // !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_) /** @@ -166,7 +166,7 @@ extern "C" { * @see f_string_dynamic_terminate_after() */ #if !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_) - extern f_status_t private_f_string_dynamic_resize(const f_string_length_t length, f_string_dynamic_t *string) f_gcc_attribute_visibility_internal; + extern f_status_t private_f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t *string) f_gcc_attribute_visibility_internal; #endif // !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_) /** @@ -364,7 +364,7 @@ extern "C" { * @see private_f_string_dynamic_increase_by() */ #if !defined(_di_f_string_dynamic_mish_) || !defined(_di_f_string_dynamic_partial_mish_) || !defined(_di_f_string_dynamic_partial_prepend_assure_) || !defined(_di_f_string_dynamic_partial_prepend_) || !defined(_di_f_string_dynamic_prepend_assure_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_mish_) || !defined(_di_f_string_prepend_assure_) || !defined(_di_f_string_prepend_) - extern f_status_t private_f_string_prepend(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal; + extern f_status_t private_f_string_prepend(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal; #endif // !defined(_di_f_string_dynamic_mish_) || !defined(_di_f_string_dynamic_partial_mish_) || !defined(_di_f_string_dynamic_partial_prepend_assure_) || !defined(_di_f_string_dynamic_partial_prepend_) || !defined(_di_f_string_dynamic_prepend_assure_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_mish_) || !defined(_di_f_string_prepend_assure_) || !defined(_di_f_string_prepend_) /** @@ -401,7 +401,7 @@ extern "C" { * @see private_f_string_dynamic_increase_by() */ #if !defined(_di_f_string_dynamic_mish_nulless_) || !defined(_di_f_string_dynamic_partial_mish_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_mish_nulless_) || !defined(_di_f_string_prepend_assure_nulless_) || !defined(_di_f_string_prepend_nulless_) - extern f_status_t private_f_string_prepend_nulless(const f_string_t source, f_string_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal; + extern f_status_t private_f_string_prepend_nulless(const f_string_t source, f_array_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal; #endif // !defined(_di_f_string_dynamic_mish_nulless_) || !defined(_di_f_string_dynamic_partial_mish_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_mish_nulless_) || !defined(_di_f_string_prepend_assure_nulless_) || !defined(_di_f_string_prepend_nulless_) /** diff --git a/level_0/f_string/c/string-common.h b/level_0/f_string/c/string-common.h index 743893f..f05f164 100644 --- a/level_0/f_string/c/string-common.h +++ b/level_0/f_string/c/string-common.h @@ -43,78 +43,6 @@ extern "C" { #define f_macro_string_t_destroy_simple(string, length) f_memory_adjust(length, 0, sizeof(f_string_t), (void **) & string); #endif // _di_f_string_t_ -#ifndef _di_f_string_length_t_ - typedef f_number_unsigned_t f_string_length_t; - - // string size is set to (size - 4) to compensate for UTF-8 4-byte character such that it can easily act as a (size - 1) regardless of UTF-8. - #define f_string_length_t_size 0xfffffffffffffffb - #define f_string_length_t_size_max f_number_t_size_max_unsigned - - #define f_string_length_t_printf string_format_long_integer -#endif // _di_f_string_length_t_ - -/** - * A structure containing an array of string lengths. - * - * array: the array of string lengths. - * size: total amount of allocated space. - * used: total number of allocated spaces used. - */ -#ifndef _di_f_string_lengths_t_ - typedef struct { - f_string_length_t *array; - - f_array_length_t size; - f_array_length_t used; - } f_string_lengths_t; - - #define f_string_lengths_t_initialize { 0, 0, 0 } - - #define f_macro_string_lengths_t_clear(string_lengths) f_macro_memory_structures_clear(string_lengths) - - #define f_macro_string_lengths_t_resize(status, string_lengths, length) f_macro_memory_structure_resize(status, string_lengths, f_string_length_t, length) - #define f_macro_string_lengths_t_adjust(status, string_lengths, length) f_macro_memory_structure_adjust(status, string_lengths, f_string_length_t, length) - - #define f_macro_string_lengths_t_delete_simple(string_lengths) f_macro_memory_structure_delete_simple(string_lengths, f_string_length_t) - #define f_macro_string_lengths_t_destroy_simple(string_lengths) f_macro_memory_structure_destroy_simple(string_lengths, f_string_length_t) - - #define f_macro_string_lengths_t_increase(status, string_lengths) f_macro_memory_structure_increase(status, string_lengths, f_string_length_t) - #define f_macro_string_lengths_t_increase_by(status, string_lengths, amount) f_macro_memory_structure_increase_by(status, string_lengths, f_string_length_t, amount) - #define f_macro_string_lengths_t_decrease_by(status, string_lengths, amount) f_macro_memory_structure_decrease_by(status, string_lengths, f_string_length_t, amount) - #define f_macro_string_lengths_t_decimate_by(status, string_lengths, amount) f_macro_memory_structure_decimate_by(status, string_lengths, f_string_length_t, amount) -#endif // _di_f_string_lengths_t_ - -/** - * This holds an array of f_string_lengths_t. - * - * array: the array of string lenths arrays. - * size: total amount of allocated space. - * used: total number of allocated spaces used. - */ -#ifndef _di_f_string_lengthss_t_ - typedef struct { - f_string_lengths_t *array; - - f_array_length_t size; - f_array_length_t used; - } f_string_lengthss_t; - - #define f_string_lengthss_t_initialize { 0, 0, 0 } - - #define f_macro_string_lengthss_t_clear(lengthss) f_macro_memory_structures_clear(lengthss) - - #define f_macro_string_lengthss_t_resize(status, lengthss, length) f_macro_memory_structures_resize(status, lengthss, f_string_length_t, f_string_lengths_t, length, f_array_length_t) - #define f_macro_string_lengthss_t_adjust(status, lengthss, length) f_macro_memory_structures_adjust(status, lengthss, f_string_length_t, f_string_lengths_t, length, f_array_length_t) - - #define f_macro_string_lengthss_t_delete_simple(lengthss) f_macro_memory_structures_delete_simple(lengthss, f_string_length_t, f_string_lengths_t) - #define f_macro_string_lengthss_t_destroy_simple(lengthss) f_macro_memory_structures_destroy_simple(lengthss, f_string_length_t, f_string_lengths_t) - - #define f_macro_string_lengthss_t_increase(status, string_lengths) f_macro_memory_structures_increase(status, string_lengths, f_string_length_t, f_array_length_t) - #define f_macro_string_lengthss_t_increase_by(status, string_lengths, amount) f_macro_memory_structures_increase_by(status, string_lengths, f_string_length_t, f_array_length_t, amount) - #define f_macro_string_lengthss_t_decrease_by(status, string_lengths, amount) f_macro_memory_structures_decrease_by(status, string_lengths, f_string_length_t, f_string_lengths_t, f_array_length_t, amount) - #define f_macro_string_lengthss_t_decimate_by(status, string_lengths, amount) f_macro_memory_structures_decimate_by(status, string_lengths, f_string_length_t, f_string_lengths_t, f_array_length_t, amount) -#endif // _di_f_string_lengthss_t_ - /** * Define the end of line character. * FLL forbids '\r' and '\r\n' as end of line characters, \r will be silently ignored. diff --git a/level_0/f_string/c/string.c b/level_0/f_string/c/string.c index f4cdff3..b76558e 100644 --- a/level_0/f_string/c/string.c +++ b/level_0/f_string/c/string.c @@ -6,7 +6,7 @@ extern "C" { #endif #ifndef _di_f_string_append_ - f_status_t f_string_append(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) { + f_status_t f_string_append(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -18,7 +18,7 @@ extern "C" { #endif // _di_f_string_append_ #ifndef _di_f_string_append_assure_ - f_status_t f_string_append_assure(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) { + f_status_t f_string_append_assure(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -26,8 +26,8 @@ extern "C" { if (!length) return F_data_not_eos; if (destination->used < length) return private_f_string_append(source, length, destination); - f_string_length_t i = 1; - f_string_length_t j = 1; + f_array_length_t i = 1; + f_array_length_t j = 1; while (i <= length && j <= destination->used) { if (!source[length - i]) { @@ -53,7 +53,7 @@ extern "C" { #endif // _di_f_string_append_assure_ #ifndef _di_f_string_append_assure_nulless_ - f_status_t f_string_append_assure_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) { + f_status_t f_string_append_assure_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -64,8 +64,8 @@ extern "C" { return private_f_string_append_nulless(source, length, destination); } - f_string_length_t i = 1; - f_string_length_t j = 1; + f_array_length_t i = 1; + f_array_length_t j = 1; while (i <= length && j <= destination->used) { if (!source[length - i]) { @@ -91,7 +91,7 @@ extern "C" { #endif // _di_f_string_append_assure_nulless_ #ifndef _di_f_string_append_nulless_ - f_status_t f_string_append_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) { + f_status_t f_string_append_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -126,8 +126,8 @@ extern "C" { return private_f_string_append(source.string, source.used, destination); } - f_string_length_t i = 1; - f_string_length_t j = 1; + f_array_length_t i = 1; + f_array_length_t j = 1; while (i <= source.used && j <= destination->used) { if (!source.string[source.used - i]) { @@ -164,8 +164,8 @@ extern "C" { return private_f_string_append_nulless(source.string, source.used, destination); } - f_string_length_t i = 1; - f_string_length_t j = 1; + f_array_length_t i = 1; + f_array_length_t j = 1; while (i <= source.used && j <= destination->used) { if (!source.string[source.used - i]) { @@ -203,7 +203,7 @@ extern "C" { #endif // _di_f_string_dynamic_append_nulless_ #ifndef _di_f_string_dynamic_mash_ - f_status_t f_string_dynamic_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) { + f_status_t f_string_dynamic_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -220,7 +220,7 @@ extern "C" { #endif // _di_f_string_dynamic_mash_ #ifndef _di_f_string_dynamic_mash_nulless_ - f_status_t f_string_dynamic_mash_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) { + f_status_t f_string_dynamic_mash_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -237,7 +237,7 @@ extern "C" { #endif // _di_f_string_dynamic_mash_nulless_ #ifndef _di_f_string_dynamic_mish_ - f_status_t f_string_dynamic_mish(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) { + f_status_t f_string_dynamic_mish(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -254,7 +254,7 @@ extern "C" { #endif // _di_f_string_dynamic_mish_ #ifndef _di_f_string_dynamic_mish_nulless_ - f_status_t f_string_dynamic_mish_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) { + f_status_t f_string_dynamic_mish_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -294,14 +294,14 @@ extern "C" { if (!source.used) return F_data_not_eos; if (range.start > range.stop) return F_data_not_stop; - const f_string_length_t length = (range.stop - range.start) + 1; + const f_array_length_t length = (range.stop - range.start) + 1; if (destination->used < length) { return private_f_string_append(source.string + range.start, length, destination); } - f_string_length_t i = 1; - f_string_length_t j = 1; + f_array_length_t i = 1; + f_array_length_t j = 1; while (i <= length && j <= destination->used) { if (!source.string[range.stop - i]) { @@ -334,14 +334,14 @@ extern "C" { if (!source.used) return F_data_not_eos; if (range.start > range.stop) return F_data_not_stop; - const f_string_length_t length = (range.stop - range.start) + 1; + const f_array_length_t length = (range.stop - range.start) + 1; if (destination->used < length) { return private_f_string_append_nulless(source.string + range.start, length, destination); } - f_string_length_t i = 1; - f_string_length_t j = 1; + f_array_length_t i = 1; + f_array_length_t j = 1; while (i <= length && j <= destination->used) { if (!source.string[range.stop - i]) { @@ -379,7 +379,7 @@ extern "C" { #endif // _di_f_string_dynamic_partial_append_nulless_ #ifndef _di_f_string_dynamic_partial_mash_ - f_status_t f_string_dynamic_partial_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) { + f_status_t f_string_dynamic_partial_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.stop) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); @@ -398,7 +398,7 @@ extern "C" { #endif // _di_f_string_dynamic_partial_mash_ #ifndef _di_f_string_dynamic_partial_mash_nulless_ - f_status_t f_string_dynamic_partial_mash_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) { + f_status_t f_string_dynamic_partial_mash_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.stop) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); @@ -417,7 +417,7 @@ extern "C" { #endif // _di_f_string_dynamic_partial_mash_nulless_ #ifndef _di_f_string_dynamic_partial_mish_ - f_status_t f_string_partial_dynamic_mish(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) { + f_status_t f_string_partial_dynamic_mish(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.stop) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); @@ -436,7 +436,7 @@ extern "C" { #endif // _di_f_string_dynamic_partial_mish_ #ifndef _di_f_string_dynamic_partial_mish_nulless_ - f_status_t f_string_dynamic_partial_mish_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) { + f_status_t f_string_dynamic_partial_mish_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.stop) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); @@ -478,14 +478,14 @@ extern "C" { if (!source.used) return F_data_not_eos; if (range.start > range.stop) return F_data_not_stop; - const f_string_length_t length = (range.stop - range.start) + 1; + const f_array_length_t length = (range.stop - range.start) + 1; if (destination->used < length) { return private_f_string_prepend(source.string + range.start, length, destination); } - f_string_length_t i = 0; - f_string_length_t j = 0; + f_array_length_t i = 0; + f_array_length_t j = 0; while (i < length && j < destination->used) { if (!source.string[i + range.start]) { @@ -520,14 +520,14 @@ extern "C" { if (!source.used) return F_data_not_eos; if (range.start > range.stop) return F_data_not_stop; - const f_string_length_t length = (range.stop - range.start) + 1; + const f_array_length_t length = (range.stop - range.start) + 1; if (destination->used < length) { return private_f_string_prepend_nulless(source.string + range.start, length, destination); } - f_string_length_t i = 0; - f_string_length_t j = 0; + f_array_length_t i = 0; + f_array_length_t j = 0; while (i < length && j < destination->used) { if (!source.string[i + range.start]) { @@ -590,8 +590,8 @@ extern "C" { return private_f_string_prepend(source.string, source.used, destination); } - f_string_length_t i = 0; - f_string_length_t j = 0; + f_array_length_t i = 0; + f_array_length_t j = 0; while (i < source.used && j < destination->used) { if (!source.string[i]) { @@ -628,8 +628,8 @@ extern "C" { return private_f_string_prepend_nulless(source.string, source.used, destination); } - f_string_length_t i = 0; - f_string_length_t j = 0; + f_array_length_t i = 0; + f_array_length_t j = 0; while (i < source.used && j < destination->used) { if (!source.string[i]) { @@ -737,11 +737,11 @@ extern "C" { return F_none; } - if (destination->used == f_string_length_t_size) { + if (destination->used == f_array_length_t_size) { return F_status_set_error(F_string_too_large); } - const f_string_length_t total = destination->used + 1; + const f_array_length_t total = destination->used + 1; if (total > destination->size) { const f_status_t status = private_f_string_dynamic_resize(total, destination); @@ -769,11 +769,11 @@ extern "C" { } // for } - if (destination->used == f_string_length_t_size) { + if (destination->used == f_array_length_t_size) { return F_status_set_error(F_string_too_large); } - const f_string_length_t total = destination->used + 1; + const f_array_length_t total = destination->used + 1; if (total > destination->size) { const f_status_t status = private_f_string_dynamic_resize(total, destination); @@ -788,7 +788,7 @@ extern "C" { #endif // _di_f_string_dynamic_terminate_after_ #ifndef _di_f_string_mash_ - f_status_t f_string_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) { + f_status_t f_string_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -805,7 +805,7 @@ extern "C" { #endif // _di_f_string_mash_ #ifndef _di_f_string_mash_nulless_ - f_status_t f_string_mash_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) { + f_status_t f_string_mash_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -822,7 +822,7 @@ extern "C" { #endif // _di_f_string_mash_nulless_ #ifndef _di_f_string_mish_ - f_status_t f_string_mish(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) { + f_status_t f_string_mish(const f_string_t glue, const f_array_length_t glue_length, const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -839,7 +839,7 @@ extern "C" { #endif // _di_f_string_mish_ #ifndef _di_f_string_mish_nulless_ - f_status_t f_string_mish_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) { + f_status_t f_string_mish_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -856,7 +856,7 @@ extern "C" { #endif // _di_f_string_mish_nulless_ #ifndef _di_f_string_prepend_ - f_status_t f_string_prepend(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) { + f_status_t f_string_prepend(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -868,7 +868,7 @@ extern "C" { #endif // _di_f_string_prepend_ #ifndef _di_f_string_prepend_assure_ - f_status_t f_string_prepend_assure(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) { + f_status_t f_string_prepend_assure(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -876,8 +876,8 @@ extern "C" { if (!length) return F_data_not_eos; if (destination->used < length) return private_f_string_prepend(source, length, destination); - f_string_length_t i = 0; - f_string_length_t j = 0; + f_array_length_t i = 0; + f_array_length_t j = 0; while (i < length && j < destination->used) { if (!source[i]) { @@ -901,7 +901,7 @@ extern "C" { #endif // _di_f_string_prepend_assure_ #ifndef _di_f_string_prepend_assure_nulless_ - f_status_t f_string_prepend_assure_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) { + f_status_t f_string_prepend_assure_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -909,8 +909,8 @@ extern "C" { if (!length) return F_data_not_eos; if (destination->used < length) return private_f_string_prepend_nulless(source, length, destination); - f_string_length_t i = 0; - f_string_length_t j = 0; + f_array_length_t i = 0; + f_array_length_t j = 0; while (i < length && j < destination->used) { if (!source[i]) { @@ -934,7 +934,7 @@ extern "C" { #endif // _di_f_string_prepend_assure_nulless_ #ifndef _di_f_string_prepend_nulless_ - f_status_t f_string_prepend_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) { + f_status_t f_string_prepend_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ diff --git a/level_0/f_string/c/string.h b/level_0/f_string/c/string.h index bf260b4..ea7e8ef 100644 --- a/level_0/f_string/c/string.h +++ b/level_0/f_string/c/string.h @@ -7,8 +7,8 @@ * * Provides string capabilities. * - * It is highly recommended that all string arrays are set to a max size of f_string_length_t_size. - * Any calculations against the length (aka: string.used) can always perform (A < B) operators such that the B is f_string_length_t_size + 1 without integer overflow. + * It is highly recommended that all string arrays are set to a max size of f_array_length_t_size. + * Any calculations against the length (aka: string.used) can always perform (A < B) operators such that the B is f_array_length_t_size + 1 without integer overflow. */ #ifndef _F_string_h #define _F_string_h @@ -51,7 +51,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_string_append_ - extern f_status_t f_string_append(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination); + extern f_status_t f_string_append(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination); #endif // _di_f_string_append_ /** @@ -74,7 +74,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_string_append_assure_ - extern f_status_t f_string_append_assure(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination); + extern f_status_t f_string_append_assure(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination); #endif // _di_f_string_append_assure_ /** @@ -98,7 +98,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_string_append_assure_nulless_ - extern f_status_t f_string_append_assure_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination); + extern f_status_t f_string_append_assure_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination); #endif // _di_f_string_append_assure_nulless_ /** @@ -121,7 +121,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_string_append_nulless_ - extern f_status_t f_string_append_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination); + extern f_status_t f_string_append_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination); #endif // _di_f_string_append_nulless_ /** @@ -226,7 +226,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_string_dynamic_mash_ - extern f_status_t f_string_dynamic_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination); + extern f_status_t f_string_dynamic_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination); #endif // _di_f_string_dynamic_mash_ /** @@ -253,7 +253,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_string_dynamic_mash_nulless_ - extern f_status_t f_string_dynamic_mash_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination); + extern f_status_t f_string_dynamic_mash_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination); #endif // _di_f_string_dynamic_mash_nulless_ /** @@ -278,7 +278,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_string_dynamic_mish_ - extern f_status_t f_string_dynamic_mish(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination); + extern f_status_t f_string_dynamic_mish(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination); #endif // _di_f_string_dynamic_mish_ /** @@ -305,7 +305,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_string_dynamic_mish_nulless_ - extern f_status_t f_string_dynamic_mish_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination); + extern f_status_t f_string_dynamic_mish_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination); #endif // _di_f_string_dynamic_mish_nulless_ /** @@ -429,7 +429,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_string_dynamic_partial_mash_ - extern f_status_t f_string_dynamic_partial_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination); + extern f_status_t f_string_dynamic_partial_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination); #endif // _di_f_string_dynamic_partial_mash_ /** @@ -459,7 +459,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_string_dynamic_partial_mash_nulless_ - extern f_status_t f_string_dynamic_partial_mash_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination); + extern f_status_t f_string_dynamic_partial_mash_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination); #endif // _di_f_string_dynamic_partial_mash_nulless_ /** @@ -487,7 +487,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_string_dynamic_partial_mish_ - extern f_status_t f_string_dynamic_partial_mish(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination); + extern f_status_t f_string_dynamic_partial_mish(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination); #endif // _di_f_string_dynamic_partial_mish_ /** @@ -517,7 +517,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_string_dynamic_partial_mish_nulless_ - extern f_status_t f_string_dynamic_partial_mish_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination); + extern f_status_t f_string_dynamic_partial_mish_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination); #endif // _di_f_string_dynamic_partial_mish_nulless_ /** @@ -847,7 +847,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_string_mash_ - extern f_status_t f_string_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination); + extern f_status_t f_string_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination); #endif // _di_f_string_mash_ /** @@ -876,7 +876,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_string_mash_nulless_ - extern f_status_t f_string_mash_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination); + extern f_status_t f_string_mash_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination); #endif // _di_f_string_mash_nulless_ /** @@ -903,7 +903,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_string_mish_ - extern f_status_t f_string_mish(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination); + extern f_status_t f_string_mish(const f_string_t glue, const f_array_length_t glue_length, const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination); #endif // _di_f_string_mish_ /** @@ -932,7 +932,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_string_mish_nulless_ - extern f_status_t f_string_mish_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination); + extern f_status_t f_string_mish_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination); #endif // _di_f_string_mish_nulless_ /** @@ -955,7 +955,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_string_prepend_ - extern f_status_t f_string_prepend(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination); + extern f_status_t f_string_prepend(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination); #endif // _di_f_string_prepend_ /** @@ -980,7 +980,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_string_prepend_assure_ - extern f_status_t f_string_prepend_assure(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination); + extern f_status_t f_string_prepend_assure(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination); #endif // _di_f_string_prepend_assure_ /** @@ -1006,7 +1006,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_string_prepend_assure_nulless_ - extern f_status_t f_string_prepend_assure_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination); + extern f_status_t f_string_prepend_assure_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination); #endif // _di_f_string_prepend_assure_nulless_ /** @@ -1032,7 +1032,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_string_prepend_nulless_ - extern f_status_t f_string_prepend_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination); + extern f_status_t f_string_prepend_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination); #endif // _di_f_string_prepend_nulless_ /** diff --git a/level_0/f_string/c/string_dynamic.c b/level_0/f_string/c/string_dynamic.c index bc9bf5d..d956528 100644 --- a/level_0/f_string/c/string_dynamic.c +++ b/level_0/f_string/c/string_dynamic.c @@ -10,7 +10,7 @@ extern "C" { #endif // _di_f_string_static_empty_s_ #ifndef _di_f_string_dynamic_adjust_ - f_status_t f_string_dynamic_adjust(const f_string_length_t length, f_string_dynamic_t *dynamic) { + f_status_t f_string_dynamic_adjust(const f_array_length_t length, f_string_dynamic_t *dynamic) { #ifndef _di_level_0_parameter_checking_ if (!dynamic) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -20,7 +20,7 @@ extern "C" { #endif // _di_f_string_dynamic_adjust_ #ifndef _di_f_string_dynamic_decimate_by_ - f_status_t f_string_dynamic_decimate_by(const f_string_length_t amount, f_string_dynamic_t *dynamic) { + f_status_t f_string_dynamic_decimate_by(const f_array_length_t amount, f_string_dynamic_t *dynamic) { #ifndef _di_level_0_parameter_checking_ if (!amount) return F_status_set_error(F_parameter); if (!dynamic) return F_status_set_error(F_parameter); @@ -35,7 +35,7 @@ extern "C" { #endif // _di_f_string_dynamic_decimate_by_ #ifndef _di_f_string_dynamic_decrease_by_ - f_status_t f_string_dynamic_decrease_by(const f_string_length_t amount, f_string_dynamic_t *dynamic) { + f_status_t f_string_dynamic_decrease_by(const f_array_length_t amount, f_string_dynamic_t *dynamic) { #ifndef _di_level_0_parameter_checking_ if (!amount) return F_status_set_error(F_parameter); if (!dynamic) return F_status_set_error(F_parameter); @@ -58,12 +58,12 @@ extern "C" { if (dynamic->used + 1 > dynamic->size) { f_array_length_t size = dynamic->used + f_memory_default_allocation_step; - if (size > f_string_length_t_size) { - if (dynamic->used + 1 > f_string_length_t_size) { + if (size > f_array_length_t_size) { + if (dynamic->used + 1 > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } - size = f_string_length_t_size; + size = f_array_length_t_size; } return private_f_string_dynamic_resize(size, dynamic); @@ -74,7 +74,7 @@ extern "C" { #endif // _di_f_string_dynamic_increase_ #ifndef _di_f_string_dynamic_increase_by_ - f_status_t f_string_dynamic_increase_by(const f_string_length_t amount, f_string_dynamic_t *dynamic) { + f_status_t f_string_dynamic_increase_by(const f_array_length_t amount, f_string_dynamic_t *dynamic) { #ifndef _di_level_0_parameter_checking_ if (!dynamic) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -84,7 +84,7 @@ extern "C" { #endif // _di_f_string_dynamic_increase_by_ #ifndef _di_f_string_dynamic_resize_ - f_status_t f_string_dynamic_resize(const f_string_length_t length, f_string_dynamic_t *dynamic) { + f_status_t f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t *dynamic) { #ifndef _di_level_0_parameter_checking_ if (!dynamic) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ diff --git a/level_0/f_string/c/string_dynamic.h b/level_0/f_string/c/string_dynamic.h index ca2f92c..dd56a51 100644 --- a/level_0/f_string/c/string_dynamic.h +++ b/level_0/f_string/c/string_dynamic.h @@ -31,8 +31,8 @@ extern "C" { typedef struct { f_string_t string; - f_string_length_t size; - f_string_length_t used; + f_array_length_t size; + f_array_length_t used; } f_string_static_t; #define f_string_static_t_initialize { 0, 0, 0 } @@ -144,7 +144,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_f_string_dynamic_adjust_ - extern f_status_t f_string_dynamic_adjust(const f_string_length_t length, f_string_dynamic_t *dynamic); + extern f_status_t f_string_dynamic_adjust(const f_array_length_t length, f_string_dynamic_t *dynamic); #endif // _di_f_string_dynamic_adjust_ /** @@ -167,14 +167,14 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_f_string_dynamic_decrease_by_ - extern f_status_t f_string_dynamic_decrease_by(const f_string_length_t amount, f_string_dynamic_t *dynamic); + extern f_status_t f_string_dynamic_decrease_by(const f_array_length_t amount, f_string_dynamic_t *dynamic); #endif // _di_f_string_dynamic_decrease_by_ /** * Resize the dynamic string to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_string_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -198,7 +198,7 @@ extern "C" { * Resize the dynamic string to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_string_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -215,7 +215,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_string_dynamic_increase_by_ - extern f_status_t f_string_dynamic_increase_by(const f_string_length_t amount, f_string_dynamic_t *dynamic); + extern f_status_t f_string_dynamic_increase_by(const f_array_length_t amount, f_string_dynamic_t *dynamic); #endif // _di_f_string_dynamic_increase_by_ /** @@ -233,7 +233,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_f_string_dynamic_resize_ - extern f_status_t f_string_dynamic_resize(const f_string_length_t length, f_string_dynamic_t *dynamic); + extern f_status_t f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t *dynamic); #endif // _di_f_string_dynamic_resize_ /** @@ -242,7 +242,7 @@ extern "C" { * @param length * The new size to use. * @param dynamics - * The string array to resize. + * The array to resize. * * @return * F_none on success. @@ -264,7 +264,7 @@ extern "C" { * @param amount * A positive number representing how much to decimate the size by. * @param dynamics - * The string array to resize. + * The array to resize. * * @return * F_none on success. @@ -287,7 +287,7 @@ extern "C" { * @param amount * A positive number representing how much to decrease the size by. * @param dynamics - * The string array to resize. + * The array to resize. * * @return * F_none on success. @@ -307,7 +307,7 @@ extern "C" { * If already set to the maximum buffer size, then the resize will fail. * * @param dynamics - * The string array to resize. + * The array to resize. * * @return * F_none on success. @@ -324,14 +324,14 @@ extern "C" { /** * Resize the dynamic string array to a larger size. * - * This will resize making the string larger based on the given length. + * This will resize making the array larger based on the given length. * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). * If already set to the maximum buffer size, then the resize will fail. * * @param amount * A positive number representing how much to increase the size by. * @param dynamics - * The string array to resize. + * The array to resize. * * @return * F_none on success. @@ -351,7 +351,7 @@ extern "C" { * @param length * The new size to use. * @param dynamics - * The string array to resize. + * The array to resize. * * @return * F_none on success. diff --git a/level_0/f_string/c/string_quantity.h b/level_0/f_string/c/string_quantity.h index 045cc22..4ef2731 100644 --- a/level_0/f_string/c/string_quantity.h +++ b/level_0/f_string/c/string_quantity.h @@ -30,8 +30,8 @@ extern "C" { */ #ifndef _di_f_string_quantity_t_ typedef struct { - f_string_length_t start; - f_string_length_t total; + f_array_length_t start; + f_array_length_t total; } f_string_quantity_t; #define f_string_quantity_t_initialize { 0, 0 } diff --git a/level_0/f_string/c/string_range.h b/level_0/f_string/c/string_range.h index 1d62878..2e35d3c 100644 --- a/level_0/f_string/c/string_range.h +++ b/level_0/f_string/c/string_range.h @@ -30,8 +30,8 @@ extern "C" { */ #ifndef _di_f_string_range_t_ typedef struct { - f_string_length_t start; - f_string_length_t stop; + f_array_length_t start; + f_array_length_t stop; } f_string_range_t; #define f_string_range_t_initialize { 1, 0 } diff --git a/level_0/f_thread/c/thread-common.h b/level_0/f_thread/c/thread-common.h index 38ddb14..57ac64b 100644 --- a/level_0/f_thread/c/thread-common.h +++ b/level_0/f_thread/c/thread-common.h @@ -155,7 +155,7 @@ extern "C" { #ifndef _di_f_thread_condition_t_ typedef pthread_cond_t f_thread_condition_t; - #define f_thread_condition_t_initialize PTHREAD_COND_INITIALIZER; + #define f_thread_condition_t_initialize PTHREAD_COND_INITIALIZER #define f_macro_thread_condition_t_clear(condition) condition = 0; diff --git a/level_0/f_utf/c/private-utf.c b/level_0/f_utf/c/private-utf.c index 5dd5878..f03f6ba 100644 --- a/level_0/f_utf/c/private-utf.c +++ b/level_0/f_utf/c/private-utf.c @@ -2213,7 +2213,7 @@ extern "C" { #endif // !defined(_di_f_utf_character_is_zero_width_) || !defined(_di_f_utf_is_zero_width_) #if !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_mash_) - f_status_t private_f_utf_string_append(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) { + f_status_t private_f_utf_string_append(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) { if (destination->used + length > destination->size) { const f_status_t status = private_f_utf_string_dynamic_increase_by(length, destination); @@ -2228,17 +2228,17 @@ extern "C" { #endif // !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_mash_) #if !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_mash_nulless_) - f_status_t private_f_utf_string_append_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) { + f_status_t private_f_utf_string_append_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) { - if (destination->used + length > f_string_length_t_size) { + if (destination->used + length > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } f_status_t status = F_none; - f_string_length_t i = 0; - f_string_length_t first = 0; - f_string_length_t size = 0; + f_array_length_t i = 0; + f_array_length_t first = 0; + f_array_length_t size = 0; for (; i < length; i++) { @@ -2280,7 +2280,7 @@ extern "C" { #endif // !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_mash_nulless_) #if !defined(_di_f_utf_string_dynamic_adjust_) || !defined(_di_f_utf_string_dynamic_decimate_by_) - f_status_t private_f_utf_string_dynamic_adjust(const f_string_length_t length, f_utf_string_dynamic_t *dynamic) { + f_status_t private_f_utf_string_dynamic_adjust(const f_array_length_t length, f_utf_string_dynamic_t *dynamic) { f_status_t status = f_memory_adjust(dynamic->size, length, sizeof(f_utf_string_t), (void **) & dynamic->string); @@ -2297,10 +2297,10 @@ extern "C" { #endif // !defined(_di_f_utf_string_dynamic_adjust_) || !defined(_di_f_utf_string_dynamic_decimate_by_) #if !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) - f_status_t private_f_utf_string_dynamic_increase_by(const f_string_length_t amount, f_utf_string_dynamic_t *dynamic) { + f_status_t private_f_utf_string_dynamic_increase_by(const f_array_length_t amount, f_utf_string_dynamic_t *dynamic) { if (dynamic->used + amount > dynamic->size) { - if (dynamic->used + amount > f_string_length_t_size) { + if (dynamic->used + amount > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } @@ -2312,7 +2312,7 @@ extern "C" { #endif // !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) #if !defined(_di_f_utf_string_dynamic_decrease_by_) || !defined(_di_f_utf_string_dynamic_increase_) || !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_dynamic_terminate_) || !defined(_di_f_utf_string_dynamic_terminate_after_) - f_status_t private_f_utf_string_dynamic_resize(const f_string_length_t length, f_utf_string_dynamic_t *dynamic) { + f_status_t private_f_utf_string_dynamic_resize(const f_array_length_t length, f_utf_string_dynamic_t *dynamic) { const f_status_t status = f_memory_resize(dynamic->size, length, sizeof(f_utf_string_t), (void **) & dynamic->string); @@ -2483,9 +2483,9 @@ extern "C" { #endif // !defined(_di_f_utf_string_maps_decrease_by_) || !defined(_di_f_utf_string_maps_increase_) || !defined(_di_f_utf_string_maps_increase_by_) || !defined(_di_f_utf_string_maps_terminate_) || !defined(_di_f_utf_string_maps_terminate_after_) #if !defined(_di_f_utf_string_dynamic_mish_) || !defined(_di_f_utf_string_dynamic_partial_mish_) || !defined(_di_f_utf_string_dynamic_partial_prepend_assure_) || !defined(_di_f_utf_string_dynamic_partial_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_assure_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_mish_) || !defined(_di_f_utf_string_prepend_assure_) || !defined(_di_f_utf_string_prepend_) - f_status_t private_f_utf_string_prepend(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) { + f_status_t private_f_utf_string_prepend(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) { - if (destination->used + length > f_string_length_t_size) { + if (destination->used + length > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } @@ -2508,20 +2508,20 @@ extern "C" { #endif // !defined(_di_f_utf_string_dynamic_mish_) || !defined(_di_f_utf_string_dynamic_partial_mish_) || !defined(_di_f_utf_string_dynamic_partial_prepend_assure_) || !defined(_di_f_utf_string_dynamic_partial_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_assure_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_mish_) || !defined(_di_f_utf_string_prepend_assure_) || !defined(_di_f_utf_string_prepend_) #if !defined(_di_f_utf_string_dynamic_mish_nulless_) || !defined(_di_f_utf_string_dynamic_partial_mish_nulless_) || !defined(_di_f_utf_string_dynamic_partial_prepend_assure_nulless_) || !defined(_di_f_utf_string_dynamic_partial_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_assure_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) || !defined(_di_f_utf_string_mish_nulless_) || !defined(_di_f_utf_string_prepend_assure_nulless_) || !defined(_di_f_utf_string_prepend_nulless_) - f_status_t private_f_utf_string_prepend_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) { + f_status_t private_f_utf_string_prepend_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) { - if (destination->used + length > f_string_length_t_size) { + if (destination->used + length > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } f_status_t status = F_none; - f_string_length_t first = 0; - f_string_length_t offset = 0; + f_array_length_t first = 0; + f_array_length_t offset = 0; - f_string_length_t size = 0; + f_array_length_t size = 0; - for (f_string_length_t i = 0; i <= length; i++) { + for (f_array_length_t i = 0; i <= length; i++) { if (i == length) { if (i > first) { diff --git a/level_0/f_utf/c/private-utf.h b/level_0/f_utf/c/private-utf.h index 690c2e5..a002da5 100644 --- a/level_0/f_utf/c/private-utf.h +++ b/level_0/f_utf/c/private-utf.h @@ -569,7 +569,7 @@ extern "C" { * @see private_f_utf_string_dynamic_increase_by() */ #if !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_mash_) - extern f_status_t private_f_utf_string_append(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal; + extern f_status_t private_f_utf_string_append(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal; #endif // !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_mash_) /** @@ -600,7 +600,7 @@ extern "C" { * @see private_f_utf_string_dynamic_increase_by() */ #if !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_mash_nulless_) - extern f_status_t private_f_utf_string_append_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal; + extern f_status_t private_f_utf_string_append_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal; #endif // !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_mash_nulless_) /** @@ -623,7 +623,7 @@ extern "C" { * @see f_utf_string_dynamic_decimate_by() */ #if !defined(_di_f_utf_string_dynamic_adjust_) || !defined(_di_f_utf_string_dynamic_decimate_by_) - extern f_status_t private_f_utf_string_dynamic_adjust(const f_string_length_t length, f_utf_string_dynamic_t *string) f_gcc_attribute_visibility_internal; + extern f_status_t private_f_utf_string_dynamic_adjust(const f_array_length_t length, f_utf_string_dynamic_t *string) f_gcc_attribute_visibility_internal; #endif // !defined(_di_f_utf_string_dynamic_adjust_) || !defined(_di_f_utf_string_dynamic_decimate_by_) /** @@ -660,7 +660,7 @@ extern "C" { * @see f_utf_string_prepend_nulless() */ #if !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) - extern f_status_t private_f_utf_string_dynamic_increase_by(const f_string_length_t amount, f_utf_string_dynamic_t *string) f_gcc_attribute_visibility_internal; + extern f_status_t private_f_utf_string_dynamic_increase_by(const f_array_length_t amount, f_utf_string_dynamic_t *string) f_gcc_attribute_visibility_internal; #endif // !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) /** @@ -686,7 +686,7 @@ extern "C" { * @see f_utf_string_dynamic_terminate_after() */ #if !defined(_di_f_utf_string_dynamic_decrease_by_) || !defined(_di_f_utf_string_dynamic_increase_) || !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_dynamic_terminate_) || !defined(_di_f_utf_string_dynamic_terminate_after_) - extern f_status_t private_f_utf_string_dynamic_resize(const f_string_length_t length, f_utf_string_dynamic_t *string) f_gcc_attribute_visibility_internal; + extern f_status_t private_f_utf_string_dynamic_resize(const f_array_length_t length, f_utf_string_dynamic_t *string) f_gcc_attribute_visibility_internal; #endif // !defined(_di_f_utf_string_dynamic_decrease_by_) || !defined(_di_f_utf_string_dynamic_increase_) || !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_dynamic_terminate_) || !defined(_di_f_utf_string_dynamic_terminate_after_) /** @@ -884,7 +884,7 @@ extern "C" { * @see private_f_utf_string_dynamic_increase_by() */ #if !defined(_di_f_utf_string_dynamic_mish_) || !defined(_di_f_utf_string_dynamic_partial_mish_) || !defined(_di_f_utf_string_dynamic_partial_prepend_assure_) || !defined(_di_f_utf_string_dynamic_partial_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_assure_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_mish_) || !defined(_di_f_utf_string_prepend_assure_) || !defined(_di_f_utf_string_prepend_) - extern f_status_t private_f_utf_string_prepend(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal; + extern f_status_t private_f_utf_string_prepend(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal; #endif // !defined(_di_f_utf_string_dynamic_mish_) || !defined(_di_f_utf_string_dynamic_partial_mish_) || !defined(_di_f_utf_string_dynamic_partial_prepend_assure_) || !defined(_di_f_utf_string_dynamic_partial_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_assure_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_mish_) || !defined(_di_f_utf_string_prepend_assure_) || !defined(_di_f_utf_string_prepend_) /** @@ -921,7 +921,7 @@ extern "C" { * @see private_f_utf_string_dynamic_increase_by() */ #if !defined(_di_f_utf_string_dynamic_mish_nulless_) || !defined(_di_f_utf_string_dynamic_partial_mish_nulless_) || !defined(_di_f_utf_string_dynamic_partial_prepend_assure_nulless_) || !defined(_di_f_utf_string_dynamic_partial_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_assure_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) || !defined(_di_f_utf_string_mish_nulless_) || !defined(_di_f_utf_string_prepend_assure_nulless_) || !defined(_di_f_utf_string_prepend_nulless_) - extern f_status_t private_f_utf_string_prepend_nulless(const f_utf_string_t source, f_string_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal; + extern f_status_t private_f_utf_string_prepend_nulless(const f_utf_string_t source, f_array_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal; #endif // !defined(_di_f_utf_string_dynamic_mish_nulless_) || !defined(_di_f_utf_string_dynamic_partial_mish_nulless_) || !defined(_di_f_utf_string_dynamic_partial_prepend_assure_nulless_) || !defined(_di_f_utf_string_dynamic_partial_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_assure_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) || !defined(_di_f_utf_string_mish_nulless_) || !defined(_di_f_utf_string_prepend_assure_nulless_) || !defined(_di_f_utf_string_prepend_nulless_) /** diff --git a/level_0/f_utf/c/utf.c b/level_0/f_utf/c/utf.c index 205c3a7..bf30fc6 100644 --- a/level_0/f_utf/c/utf.c +++ b/level_0/f_utf/c/utf.c @@ -6,7 +6,7 @@ extern "C" { #endif #ifndef _di_f_utf_buffer_decrement_ - f_status_t f_utf_buffer_decrement(const f_string_static_t buffer, f_string_range_t *range, const f_string_length_t step) { + f_status_t f_utf_buffer_decrement(const f_string_static_t buffer, f_string_range_t *range, const f_array_length_t step) { #ifndef _di_level_0_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (step < 1) return F_status_set_error(F_parameter); @@ -14,7 +14,7 @@ extern "C" { if (!buffer.used || range->start > range->stop || range->start >= buffer.used) return F_data_not; - f_string_length_t i = 0; + f_array_length_t i = 0; uint8_t width = 0; do { @@ -37,7 +37,7 @@ extern "C" { #endif // _di_f_utf_buffer_decrement_ #ifndef _di_f_utf_buffer_increment_ - f_status_t f_utf_buffer_increment(const f_string_static_t buffer, f_string_range_t *range, const f_string_length_t step) { + f_status_t f_utf_buffer_increment(const f_string_static_t buffer, f_string_range_t *range, const f_array_length_t step) { #ifndef _di_level_0_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (step < 1) return F_status_set_error(F_parameter); @@ -45,7 +45,7 @@ extern "C" { if (!buffer.used || range->start > range->stop || range->start >= buffer.used) return F_data_not; - f_string_length_t i = 0; + f_array_length_t i = 0; uint8_t width = 0; do { @@ -616,7 +616,7 @@ extern "C" { #endif // _di_f_utf_character_is_zero_width_ #ifndef _di_f_utf_character_to_char_ - f_status_t f_utf_character_to_char(const f_utf_character_t utf_character, f_string_t *character, f_string_length_t *width_max) { + f_status_t f_utf_character_to_char(const f_utf_character_t utf_character, f_string_t *character, f_array_length_t *width_max) { #ifndef _di_level_0_parameter_checking_ if (!utf_character) return F_status_set_error(F_parameter); if (!width_max && *character) return F_status_set_error(F_parameter); @@ -685,7 +685,7 @@ extern "C" { #endif // _di_f_utf_is_big_endian_ #ifndef _di_f_utf_is_ - f_status_t f_utf_is(const f_string_t character, const f_string_length_t width_max) { + f_status_t f_utf_is(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -705,7 +705,7 @@ extern "C" { #endif // _di_f_utf_is_ #ifndef _di_f_utf_is_alpha_ - f_status_t f_utf_is_alpha(const f_string_t character, const f_string_length_t width_max) { + f_status_t f_utf_is_alpha(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -739,7 +739,7 @@ extern "C" { #endif // _di_f_utf_is_alpha_ #ifndef _di_f_utf_is_alpha_digit_ - f_status_t f_utf_is_alpha_digit(const f_string_t character, const f_string_length_t width_max) { + f_status_t f_utf_is_alpha_digit(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -773,7 +773,7 @@ extern "C" { #endif // _di_f_utf_is_alpha_digit_ #ifndef _di_f_utf_is_alpha_numeric_ - f_status_t f_utf_is_alpha_numeric(const f_string_t character, const f_string_length_t width_max) { + f_status_t f_utf_is_alpha_numeric(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -807,7 +807,7 @@ extern "C" { #endif // _di_f_utf_is_alpha_numeric_ #ifndef _di_f_utf_is_ascii_ - f_status_t f_utf_is_ascii(const f_string_t character, const f_string_length_t width_max) { + f_status_t f_utf_is_ascii(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -833,7 +833,7 @@ extern "C" { #endif // _di_f_utf_is_ascii_ #ifndef _di_f_utf_is_combining_ - f_status_t f_utf_is_combining(const f_string_t character, const f_string_length_t width_max) { + f_status_t f_utf_is_combining(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -864,7 +864,7 @@ extern "C" { #endif // _di_f_utf_is_combining_ #ifndef _di_f_utf_is_control_ - f_status_t f_utf_is_control(const f_string_t character, const f_string_length_t width_max) { + f_status_t f_utf_is_control(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -898,7 +898,7 @@ extern "C" { #endif // _di_f_utf_is_control_ #ifndef _di_f_utf_is_control_picture_ - f_status_t f_utf_is_control_picture(const f_string_t character, const f_string_length_t width_max) { + f_status_t f_utf_is_control_picture(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -929,7 +929,7 @@ extern "C" { #endif // _di_f_utf_is_control_picture_ #ifndef _di_f_utf_is_digit_ - f_status_t f_utf_is_digit(const f_string_t character, const f_string_length_t width_max) { + f_status_t f_utf_is_digit(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -963,7 +963,7 @@ extern "C" { #endif // _di_f_utf_is_digit_ #ifndef _di_f_utf_is_emoji_ - f_status_t f_utf_is_emoji(const f_string_t character, const f_string_length_t width_max) { + f_status_t f_utf_is_emoji(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -997,7 +997,7 @@ extern "C" { #endif // _di_f_utf_is_emoji_ #ifndef _di_f_utf_is_fragment_ - f_status_t f_utf_is_fragment(const f_string_t character, const f_string_length_t width_max) { + f_status_t f_utf_is_fragment(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1013,7 +1013,7 @@ extern "C" { #endif // _di_f_utf_is_fragment_ #ifndef _di_f_utf_is_graph_ - f_status_t f_utf_is_graph(const f_string_t character, const f_string_length_t width_max) { + f_status_t f_utf_is_graph(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1060,7 +1060,7 @@ extern "C" { #endif // _di_f_utf_is_graph_ #ifndef _di_f_utf_is_numeric_ - f_status_t f_utf_is_numeric(const f_string_t character, const f_string_length_t width_max) { + f_status_t f_utf_is_numeric(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1094,7 +1094,7 @@ extern "C" { #endif // _di_f_utf_is_numeric_ #ifndef _di_f_utf_is_phonetic_ - f_status_t f_utf_is_phonetic(const f_string_t character, const f_string_length_t width_max) { + f_status_t f_utf_is_phonetic(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1125,7 +1125,7 @@ extern "C" { #endif // _di_f_utf_is_phonetic_ #ifndef _di_f_utf_is_private_ - f_status_t f_utf_is_private(const f_string_t character, const f_string_length_t width_max) { + f_status_t f_utf_is_private(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1156,7 +1156,7 @@ extern "C" { #endif // _di_f_utf_is_private_ #ifndef _di_f_utf_is_punctuation_ - f_status_t f_utf_is_punctuation(const f_string_t character, const f_string_length_t width_max) { + f_status_t f_utf_is_punctuation(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1217,7 +1217,7 @@ extern "C" { #endif // _di_f_utf_is_punctuation_ #ifndef _di_f_utf_is_symbol_ - f_status_t f_utf_is_symbol(const f_string_t character, const f_string_length_t width_max) { + f_status_t f_utf_is_symbol(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1263,7 +1263,7 @@ extern "C" { #endif // _di_f_utf_is_symbol_ #ifndef _di_f_utf_is_unassigned_ - f_status_t f_utf_is_unassigned(const f_string_t character, const f_string_length_t width_max) { + f_status_t f_utf_is_unassigned(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1289,7 +1289,7 @@ extern "C" { #endif // _di_f_utf_is_unassigned_ #ifndef _di_f_utf_is_valid_ - f_status_t f_utf_is_valid(const f_string_t character, const f_string_length_t width_max) { + f_status_t f_utf_is_valid(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1315,7 +1315,7 @@ extern "C" { #endif // _di_f_utf_is_valid_ #ifndef _di_f_utf_is_whitespace_ - f_status_t f_utf_is_whitespace(const f_string_t character, const f_string_length_t width_max) { + f_status_t f_utf_is_whitespace(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1349,7 +1349,7 @@ extern "C" { #endif // _di_f_utf_is_whitespace_ #ifndef _di_f_utf_is_whitespace_modifier_ - f_status_t f_utf_is_whitespace_modifier(const f_string_t character, const f_string_length_t width_max) { + f_status_t f_utf_is_whitespace_modifier(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1381,7 +1381,7 @@ extern "C" { #endif // _di_f_utf_is_whitespace_modifier_ #ifndef _di_f_utf_is_whitespace_other_ - f_status_t f_utf_is_whitespace_other(const f_string_t character, const f_string_length_t width_max) { + f_status_t f_utf_is_whitespace_other(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1413,7 +1413,7 @@ extern "C" { #endif // _di_f_utf_is_whitespace_other_ #ifndef _di_f_utf_is_word_ - f_status_t f_utf_is_word(const f_string_t character, const f_string_length_t width_max, const bool strict) { + f_status_t f_utf_is_word(const f_string_t character, const f_array_length_t width_max, const bool strict) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1447,7 +1447,7 @@ extern "C" { #endif // _di_f_utf_is_word_ #ifndef _di_f_utf_is_word_dash_ - f_status_t f_utf_is_word_dash(const f_string_t character, const f_string_length_t width_max, const bool strict) { + f_status_t f_utf_is_word_dash(const f_string_t character, const f_array_length_t width_max, const bool strict) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1481,7 +1481,7 @@ extern "C" { #endif // _di_f_utf_is_word_dash_ #ifndef _di_f_utf_is_word_dash_plus_ - f_status_t f_utf_is_word_dash_plus(const f_string_t character, const f_string_length_t width_max, const bool strict) { + f_status_t f_utf_is_word_dash_plus(const f_string_t character, const f_array_length_t width_max, const bool strict) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1515,7 +1515,7 @@ extern "C" { #endif // _di_f_utf_is_word_dash_plus_ #ifndef _di_f_utf_is_zero_width_ - f_status_t f_utf_is_zero_width(const f_string_t character, const f_string_length_t width_max) { + f_status_t f_utf_is_zero_width(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1557,7 +1557,7 @@ extern "C" { #endif // _di_f_utf_is_zero_width_ #ifndef _di_f_utf_char_to_character_ - f_status_t f_utf_char_to_character(const f_string_t character, const f_string_length_t width_max, f_utf_character_t *character_utf) { + f_status_t f_utf_char_to_character(const f_string_t character, const f_array_length_t width_max, f_utf_character_t *character_utf) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); if (!character_utf) return F_status_set_error(F_parameter); @@ -1602,7 +1602,7 @@ extern "C" { #endif // _di_f_utf_char_to_character_ #ifndef _di_f_utf_string_append_ - f_status_t f_utf_string_append(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) { + f_status_t f_utf_string_append(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) { #ifndef _di_level_0_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1614,7 +1614,7 @@ extern "C" { #endif // _di_f_utf_string_append_ #ifndef _di_f_utf_string_append_assure_ - f_status_t f_utf_string_append_assure(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) { + f_status_t f_utf_string_append_assure(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) { #ifndef _di_level_0_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1622,8 +1622,8 @@ extern "C" { if (!length) return F_data_not_eos; if (destination->used < length) return private_f_utf_string_append(source, length, destination); - f_string_length_t i = 1; - f_string_length_t j = 1; + f_array_length_t i = 1; + f_array_length_t j = 1; while (i <= length && j <= destination->used) { if (!source[length - i]) { @@ -1649,7 +1649,7 @@ extern "C" { #endif // _di_f_utf_string_append_assure_ #ifndef _di_f_utf_string_append_assure_nulless_ - f_status_t f_utf_string_append_assure_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) { + f_status_t f_utf_string_append_assure_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) { #ifndef _di_level_0_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1660,8 +1660,8 @@ extern "C" { return private_f_utf_string_append_nulless(source, length, destination); } - f_string_length_t i = 1; - f_string_length_t j = 1; + f_array_length_t i = 1; + f_array_length_t j = 1; while (i <= length && j <= destination->used) { if (!source[length - i]) { @@ -1687,7 +1687,7 @@ extern "C" { #endif // _di_f_utf_string_append_assure_nulless_ #ifndef _di_f_utf_string_append_nulless_ - f_status_t f_utf_string_append_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) { + f_status_t f_utf_string_append_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) { #ifndef _di_level_0_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1722,8 +1722,8 @@ extern "C" { return private_f_utf_string_append(source.string, source.used, destination); } - f_string_length_t i = 1; - f_string_length_t j = 1; + f_array_length_t i = 1; + f_array_length_t j = 1; while (i <= source.used && j <= destination->used) { if (!source.string[source.used - i]) { @@ -1760,8 +1760,8 @@ extern "C" { return private_f_utf_string_append_nulless(source.string, source.used, destination); } - f_string_length_t i = 1; - f_string_length_t j = 1; + f_array_length_t i = 1; + f_array_length_t j = 1; while (i <= source.used && j <= destination->used) { if (!source.string[source.used - i]) { @@ -1799,7 +1799,7 @@ extern "C" { #endif // _di_f_utf_string_dynamic_append_nulless_ #ifndef _di_f_utf_string_dynamic_mash_ - f_status_t f_utf_string_dynamic_mash(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) { + f_status_t f_utf_string_dynamic_mash(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) { #ifndef _di_level_0_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1816,7 +1816,7 @@ extern "C" { #endif // _di_f_utf_string_dynamic_mash_ #ifndef _di_f_utf_string_dynamic_mash_nulless_ - f_status_t f_utf_string_dynamic_mash_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) { + f_status_t f_utf_string_dynamic_mash_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) { #ifndef _di_level_0_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1833,7 +1833,7 @@ extern "C" { #endif // _di_f_utf_string_dynamic_mash_nulless_ #ifndef _di_f_utf_string_dynamic_mish_ - f_status_t f_utf_string_dynamic_mish(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) { + f_status_t f_utf_string_dynamic_mish(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) { #ifndef _di_level_0_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1850,7 +1850,7 @@ extern "C" { #endif // _di_f_utf_string_dynamic_mish_ #ifndef _di_f_utf_string_dynamic_mish_nulless_ - f_status_t f_utf_string_dynamic_mish_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) { + f_status_t f_utf_string_dynamic_mish_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) { #ifndef _di_level_0_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -1890,14 +1890,14 @@ extern "C" { if (!source.used) return F_data_not_eos; if (range.start > range.stop) return F_data_not_stop; - const f_string_length_t length = (range.stop - range.start) + 1; + const f_array_length_t length = (range.stop - range.start) + 1; if (destination->used < length) { return private_f_utf_string_append(source.string + range.start, length, destination); } - f_string_length_t i = 1; - f_string_length_t j = 1; + f_array_length_t i = 1; + f_array_length_t j = 1; while (i <= length && j <= destination->used) { if (!source.string[range.stop - i]) { @@ -1930,14 +1930,14 @@ extern "C" { if (!source.used) return F_data_not_eos; if (range.start > range.stop) return F_data_not_stop; - const f_string_length_t length = (range.stop - range.start) + 1; + const f_array_length_t length = (range.stop - range.start) + 1; if (destination->used < length) { return private_f_utf_string_append_nulless(source.string + range.start, length, destination); } - f_string_length_t i = 1; - f_string_length_t j = 1; + f_array_length_t i = 1; + f_array_length_t j = 1; while (i <= length && j <= destination->used) { if (!source.string[range.stop - i]) { @@ -1975,7 +1975,7 @@ extern "C" { #endif // _di_f_utf_string_dynamic_partial_append_nulless_ #ifndef _di_f_utf_string_dynamic_partial_mash_ - f_status_t f_utf_string_dynamic_partial_mash(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) { + f_status_t f_utf_string_dynamic_partial_mash(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) { #ifndef _di_level_0_parameter_checking_ if (source.used <= range.stop) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); @@ -1994,7 +1994,7 @@ extern "C" { #endif // _di_f_utf_string_dynamic_partial_mash_ #ifndef _di_f_utf_string_dynamic_partial_mash_nulless_ - f_status_t f_utf_string_dynamic_partial_mash_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) { + f_status_t f_utf_string_dynamic_partial_mash_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) { #ifndef _di_level_0_parameter_checking_ if (source.used <= range.stop) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); @@ -2013,7 +2013,7 @@ extern "C" { #endif // _di_f_utf_string_dynamic_partial_mash_nulless_ #ifndef _di_f_utf_string_dynamic_partial_mish_ - f_status_t f_utf_string_dynamic_partial_mish(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) { + f_status_t f_utf_string_dynamic_partial_mish(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) { #ifndef _di_level_0_parameter_checking_ if (source.used <= range.stop) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); @@ -2032,7 +2032,7 @@ extern "C" { #endif // _di_f_utf_string_dynamic_partial_mish_ #ifndef _di_f_utf_string_dynamic_partial_mish_nulless_ - f_status_t f_utf_string_dynamic_partial_mish_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) { + f_status_t f_utf_string_dynamic_partial_mish_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) { #ifndef _di_level_0_parameter_checking_ if (source.used <= range.stop) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); @@ -2074,14 +2074,14 @@ extern "C" { if (!source.used) return F_data_not_eos; if (range.start > range.stop) return F_data_not_stop; - const f_string_length_t length = (range.stop - range.start) + 1; + const f_array_length_t length = (range.stop - range.start) + 1; if (destination->used < length) { return private_f_utf_string_prepend(source.string + range.start, length, destination); } - f_string_length_t i = 0; - f_string_length_t j = 0; + f_array_length_t i = 0; + f_array_length_t j = 0; while (i < length && j < destination->used) { if (!source.string[i + range.start]) { @@ -2116,14 +2116,14 @@ extern "C" { if (!source.used) return F_data_not_eos; if (range.start > range.stop) return F_data_not_stop; - const f_string_length_t length = (range.stop - range.start) + 1; + const f_array_length_t length = (range.stop - range.start) + 1; if (destination->used < length) { return private_f_utf_string_prepend_nulless(source.string + range.start, length, destination); } - f_string_length_t i = 0; - f_string_length_t j = 0; + f_array_length_t i = 0; + f_array_length_t j = 0; while (i < length && j < destination->used) { if (!source.string[i + range.start]) { @@ -2186,8 +2186,8 @@ extern "C" { return private_f_utf_string_prepend(source.string, source.used, destination); } - f_string_length_t i = 0; - f_string_length_t j = 0; + f_array_length_t i = 0; + f_array_length_t j = 0; while (i < source.used && j < destination->used) { if (!source.string[i]) { @@ -2224,8 +2224,8 @@ extern "C" { return private_f_utf_string_prepend_nulless(source.string, source.used, destination); } - f_string_length_t i = 0; - f_string_length_t j = 0; + f_array_length_t i = 0; + f_array_length_t j = 0; while (i < source.used && j < destination->used) { if (!source.string[i]) { @@ -2334,11 +2334,11 @@ extern "C" { return F_none; } - if (destination->used == f_string_length_t_size) { + if (destination->used == f_array_length_t_size) { return F_status_set_error(F_string_too_large); } - const f_string_length_t total = destination->used + 1; + const f_array_length_t total = destination->used + 1; if (total > destination->size) { const f_status_t status = private_f_utf_string_dynamic_resize(total, destination); @@ -2366,11 +2366,11 @@ extern "C" { } // for } - if (destination->used == f_string_length_t_size) { + if (destination->used == f_array_length_t_size) { return F_status_set_error(F_string_too_large); } - const f_string_length_t total = destination->used + 1; + const f_array_length_t total = destination->used + 1; if (total > destination->size) { const f_status_t status = private_f_utf_string_dynamic_resize(total, destination); @@ -2385,7 +2385,7 @@ extern "C" { #endif // _di_f_utf_string_dynamic_terminate_after_ #ifndef _di_f_utf_string_mash_ - f_status_t f_utf_string_mash(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) { + f_status_t f_utf_string_mash(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) { #ifndef _di_level_0_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -2402,7 +2402,7 @@ extern "C" { #endif // _di_f_utf_string_mash_ #ifndef _di_f_utf_string_mash_nulless_ - f_status_t f_utf_string_mash_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) { + f_status_t f_utf_string_mash_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) { #ifndef _di_level_0_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -2419,7 +2419,7 @@ extern "C" { #endif // _di_f_utf_string_mash_nulless_ #ifndef _di_f_utf_string_mish_ - f_status_t f_utf_string_mish(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) { + f_status_t f_utf_string_mish(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) { #ifndef _di_level_0_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -2436,7 +2436,7 @@ extern "C" { #endif // _di_f_utf_string_mish_ #ifndef _di_f_utf_string_mish_nulless_ - f_status_t f_utf_string_mish_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) { + f_status_t f_utf_string_mish_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) { #ifndef _di_level_0_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -2453,7 +2453,7 @@ extern "C" { #endif // _di_f_utf_string_mish_nulless_ #ifndef _di_f_utf_string_prepend_ - f_status_t f_utf_string_prepend(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) { + f_status_t f_utf_string_prepend(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) { #ifndef _di_level_0_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -2465,7 +2465,7 @@ extern "C" { #endif // _di_f_utf_string_prepend_ #ifndef _di_f_utf_string_prepend_assure_ - f_status_t f_utf_string_prepend_assure(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) { + f_status_t f_utf_string_prepend_assure(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) { #ifndef _di_level_0_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -2473,8 +2473,8 @@ extern "C" { if (!length) return F_data_not_eos; if (destination->used < length) return private_f_utf_string_prepend(source, length, destination); - f_string_length_t i = 0; - f_string_length_t j = 0; + f_array_length_t i = 0; + f_array_length_t j = 0; while (i < length && j < destination->used) { if (!source[i]) { @@ -2498,7 +2498,7 @@ extern "C" { #endif // _di_f_utf_string_prepend_assure_ #ifndef _di_f_utf_string_prepend_assure_nulless_ - f_status_t f_utf_string_prepend_assure_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) { + f_status_t f_utf_string_prepend_assure_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) { #ifndef _di_level_0_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -2506,8 +2506,8 @@ extern "C" { if (!length) return F_data_not_eos; if (destination->used < length) return private_f_utf_string_prepend_nulless(source, length, destination); - f_string_length_t i = 0; - f_string_length_t j = 0; + f_array_length_t i = 0; + f_array_length_t j = 0; while (i < length && j < destination->used) { if (!source[i]) { @@ -2531,7 +2531,7 @@ extern "C" { #endif // _di_f_utf_string_prepend_assure_nulless_ #ifndef _di_f_utf_string_prepend_nulless_ - f_status_t f_utf_string_prepend_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) { + f_status_t f_utf_string_prepend_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) { #ifndef _di_level_0_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ diff --git a/level_0/f_utf/c/utf.h b/level_0/f_utf/c/utf.h index 7fd91fe..dcbc2f0 100644 --- a/level_0/f_utf/c/utf.h +++ b/level_0/f_utf/c/utf.h @@ -86,7 +86,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_f_utf_buffer_decrement_ - extern f_status_t f_utf_buffer_decrement(const f_string_static_t buffer, f_string_range_t *range, const f_string_length_t step); + extern f_status_t f_utf_buffer_decrement(const f_string_static_t buffer, f_string_range_t *range, const f_array_length_t step); #endif // _di_f_utf_buffer_decrement_ /** @@ -118,7 +118,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_f_utf_buffer_increment_ - extern f_status_t f_utf_buffer_increment(const f_string_static_t buffer, f_string_range_t *range, const f_string_length_t step); + extern f_status_t f_utf_buffer_increment(const f_string_static_t buffer, f_string_range_t *range, const f_array_length_t step); #endif // _di_f_utf_buffer_increment_ /** @@ -668,7 +668,7 @@ extern "C" { * F_failure (with error bit) if width is not long enough to convert. */ #ifndef _di_f_utf_character_to_char_ - extern f_status_t f_utf_character_to_char(const f_utf_character_t utf_character, f_string_t *character, f_string_length_t *width_max); + extern f_status_t f_utf_character_to_char(const f_utf_character_t utf_character, f_string_t *character, f_array_length_t *width_max); #endif // _di_f_utf_character_to_char_ /** @@ -703,7 +703,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_f_utf_is_ - extern f_status_t f_utf_is(const f_string_t character, const f_string_length_t width_max); + extern f_status_t f_utf_is(const f_string_t character, const f_array_length_t width_max); #endif // _di_f_utf_is_ /** @@ -724,7 +724,7 @@ extern "C" { * @see isalpha() */ #ifndef _di_f_utf_is_alpha_ - extern f_status_t f_utf_is_alpha(const f_string_t character, const f_string_length_t width_max); + extern f_status_t f_utf_is_alpha(const f_string_t character, const f_array_length_t width_max); #endif // _di_f_utf_is_alpha_ /** @@ -749,7 +749,7 @@ extern "C" { * @see isalnum() */ #ifndef _di_f_utf_is_alpha_digit_ - extern f_status_t f_utf_is_alpha_digit(const f_string_t character, const f_string_length_t width_max); + extern f_status_t f_utf_is_alpha_digit(const f_string_t character, const f_array_length_t width_max); #endif // _di_f_utf_is_alpha_digit_ /** @@ -772,7 +772,7 @@ extern "C" { * @see isalnum() */ #ifndef _di_f_utf_is_alpha_numeric_ - extern f_status_t f_utf_is_alpha_numeric(const f_string_t character, const f_string_length_t width_max); + extern f_status_t f_utf_is_alpha_numeric(const f_string_t character, const f_array_length_t width_max); #endif // _di_f_utf_is_alpha_numeric_ /** @@ -791,7 +791,7 @@ extern "C" { * F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment. */ #ifndef _di_f_utf_is_ascii_ - extern f_status_t f_utf_is_ascii(const f_string_t character, const f_string_length_t width_max); + extern f_status_t f_utf_is_ascii(const f_string_t character, const f_array_length_t width_max); #endif // _di_f_utf_is_ascii_ /** @@ -810,7 +810,7 @@ extern "C" { * F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment. */ #ifndef _di_f_utf_is_combining_ - extern f_status_t f_utf_is_combining(const f_string_t character, const f_string_length_t width_max); + extern f_status_t f_utf_is_combining(const f_string_t character, const f_array_length_t width_max); #endif // _di_f_utf_is_combining_ /** @@ -831,7 +831,7 @@ extern "C" { * @see iscntrl() */ #ifndef _di_f_utf_is_control_ - extern f_status_t f_utf_is_control(const f_string_t character, const f_string_length_t width_max); + extern f_status_t f_utf_is_control(const f_string_t character, const f_array_length_t width_max); #endif // _di_f_utf_is_control_ /** @@ -852,7 +852,7 @@ extern "C" { * F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment. */ #ifndef _di_f_utf_is_control_picture_ - extern f_status_t f_utf_is_control_picture(const f_string_t character, const f_string_length_t width_max); + extern f_status_t f_utf_is_control_picture(const f_string_t character, const f_array_length_t width_max); #endif // _di_f_utf_is_control_picture_ /** @@ -873,7 +873,7 @@ extern "C" { * @see isdigit() */ #ifndef _di_f_utf_is_digit_ - extern f_status_t f_utf_is_digit(const f_string_t character, const f_string_length_t width_max); + extern f_status_t f_utf_is_digit(const f_string_t character, const f_array_length_t width_max); #endif // _di_f_utf_is_digit_ /** @@ -894,7 +894,7 @@ extern "C" { * F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment. */ #ifndef _di_f_utf_is_emoji_ - extern f_status_t f_utf_is_emoji(const f_string_t character, const f_string_length_t width_max); + extern f_status_t f_utf_is_emoji(const f_string_t character, const f_array_length_t width_max); #endif // _di_f_utf_is_emoji_ /** @@ -928,7 +928,7 @@ extern "C" { * F_false if not a UTF-8 character. */ #ifndef _di_f_utf_is_fragment_ - extern f_status_t f_utf_is_fragment(const f_string_t character, const f_string_length_t width_max); + extern f_status_t f_utf_is_fragment(const f_string_t character, const f_array_length_t width_max); #endif // _di_f_utf_is_fragment_ /** @@ -951,7 +951,7 @@ extern "C" { * @see isgraph() */ #ifndef _di_f_utf_is_graph_ - extern f_status_t f_utf_is_graph(const f_string_t character, const f_string_length_t width_max); + extern f_status_t f_utf_is_graph(const f_string_t character, const f_array_length_t width_max); #endif // _di_f_utf_is_graph_ /** @@ -974,7 +974,7 @@ extern "C" { * @see isdigit() */ #ifndef _di_f_utf_is_numeric_ - extern f_status_t f_utf_is_numeric(const f_string_t character, const f_string_length_t width_max); + extern f_status_t f_utf_is_numeric(const f_string_t character, const f_array_length_t width_max); #endif // _di_f_utf_is_numeric_ /** @@ -993,7 +993,7 @@ extern "C" { * F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment. */ #ifndef _di_f_utf_is_phonetic_ - extern f_status_t f_utf_is_phonetic(const f_string_t character, const f_string_length_t width_max); + extern f_status_t f_utf_is_phonetic(const f_string_t character, const f_array_length_t width_max); #endif // _di_f_utf_is_phonetic_ /** @@ -1012,7 +1012,7 @@ extern "C" { * F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment. */ #ifndef _di_f_utf_is_private_ - extern f_status_t f_utf_is_private(const f_string_t character, const f_string_length_t width_max); + extern f_status_t f_utf_is_private(const f_string_t character, const f_array_length_t width_max); #endif // _di_f_utf_is_private_ /** @@ -1033,7 +1033,7 @@ extern "C" { * F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment. */ #ifndef _di_f_utf_is_punctuation_ - extern f_status_t f_utf_is_punctuation(const f_string_t character, const f_string_length_t width_max); + extern f_status_t f_utf_is_punctuation(const f_string_t character, const f_array_length_t width_max); #endif // _di_f_utf_is_punctuation_ /** @@ -1054,7 +1054,7 @@ extern "C" { * F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment. */ #ifndef _di_f_utf_is_symbol_ - extern f_status_t f_utf_is_symbol(const f_string_t character, const f_string_length_t width_max); + extern f_status_t f_utf_is_symbol(const f_string_t character, const f_array_length_t width_max); #endif // _di_f_utf_is_symbol_ /** @@ -1076,7 +1076,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is inunassigned. */ #ifndef _di_f_utf_is_unassigned_ - extern f_status_t f_utf_is_unassigned(const f_string_t character, const f_string_length_t width_max); + extern f_status_t f_utf_is_unassigned(const f_string_t character, const f_array_length_t width_max); #endif // _di_f_utf_is_unassigned_ /** @@ -1101,7 +1101,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_f_utf_is_valid_ - extern f_status_t f_utf_is_valid(const f_string_t character, const f_string_length_t width_max); + extern f_status_t f_utf_is_valid(const f_string_t character, const f_array_length_t width_max); #endif // _di_f_utf_is_valid_ /** @@ -1132,7 +1132,7 @@ extern "C" { * @see isspace() */ #ifndef _di_f_utf_is_whitespace_ - extern f_status_t f_utf_is_whitespace(const f_string_t character, const f_string_length_t width_max); + extern f_status_t f_utf_is_whitespace(const f_string_t character, const f_array_length_t width_max); #endif // _di_f_utf_is_whitespace_ /** @@ -1158,7 +1158,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_f_utf_is_whitespace_modifier_ - extern f_status_t f_utf_is_whitespace_modifier(const f_string_t character, const f_string_length_t width_max); + extern f_status_t f_utf_is_whitespace_modifier(const f_string_t character, const f_array_length_t width_max); #endif // _di_f_utf_is_whitespace_modifier_ /** @@ -1181,7 +1181,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_f_utf_is_whitespace_other_ - extern f_status_t f_utf_is_whitespace_other(const f_string_t character, const f_string_length_t width_max); + extern f_status_t f_utf_is_whitespace_other(const f_string_t character, const f_array_length_t width_max); #endif // _di_f_utf_is_whitespace_other_ /** @@ -1210,7 +1210,7 @@ extern "C" { * @see isalnum() */ #ifndef _di_f_utf_is_word_ - extern f_status_t f_utf_is_word(const f_string_t character, const f_string_length_t width_max, const bool strict); + extern f_status_t f_utf_is_word(const f_string_t character, const f_array_length_t width_max, const bool strict); #endif // _di_f_utf_is_word_ /** @@ -1244,7 +1244,7 @@ extern "C" { * @see isalnum() */ #ifndef _di_f_utf_is_word_dash_ - extern f_status_t f_utf_is_word_dash(const f_string_t character, const f_string_length_t width_max, const bool strict); + extern f_status_t f_utf_is_word_dash(const f_string_t character, const f_array_length_t width_max, const bool strict); #endif // _di_f_utf_is_word_dash_ /** @@ -1278,7 +1278,7 @@ extern "C" { * @see isalnum() */ #ifndef _di_f_utf_is_word_dash_plus_ - extern f_status_t f_utf_is_word_dash_plus(const f_string_t character, const f_string_length_t width_max, const bool strict); + extern f_status_t f_utf_is_word_dash_plus(const f_string_t character, const f_array_length_t width_max, const bool strict); #endif // _di_f_utf_is_word_dash_plus_ /** @@ -1301,7 +1301,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_f_utf_is_zero_width_ - extern f_status_t f_utf_is_zero_width(const f_string_t character, const f_string_length_t width_max); + extern f_status_t f_utf_is_zero_width(const f_string_t character, const f_array_length_t width_max); #endif // _di_f_utf_is_zero_width_ /** @@ -1324,7 +1324,7 @@ extern "C" { * F_utf (with error bit) if character is an invalid UTF-8 character. */ #ifndef _di_f_utf_char_to_character_ - extern f_status_t f_utf_char_to_character(const f_string_t character, const f_string_length_t width_max, f_utf_character_t *character_utf); + extern f_status_t f_utf_char_to_character(const f_string_t character, const f_array_length_t width_max, f_utf_character_t *character_utf); #endif // _di_f_utf_char_to_character_ /** @@ -1345,7 +1345,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_utf_string_append_ - extern f_status_t f_utf_string_append(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination); + extern f_status_t f_utf_string_append(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination); #endif // _di_f_utf_string_append_ /** @@ -1368,7 +1368,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_utf_string_append_assure_ - extern f_status_t f_utf_string_append_assure(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination); + extern f_status_t f_utf_string_append_assure(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination); #endif // _di_f_utf_string_append_assure_ /** @@ -1392,7 +1392,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_utf_string_append_assure_nulless_ - extern f_status_t f_utf_string_append_assure_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination); + extern f_status_t f_utf_string_append_assure_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination); #endif // _di_f_utf_string_append_assure_nulless_ /** @@ -1415,7 +1415,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_utf_string_append_nulless_ - extern f_status_t f_utf_string_append_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination); + extern f_status_t f_utf_string_append_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination); #endif // _di_f_utf_string_append_nulless_ /** @@ -1520,7 +1520,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_utf_string_dynamic_mash_ - extern f_status_t f_utf_string_dynamic_mash(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination); + extern f_status_t f_utf_string_dynamic_mash(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination); #endif // _di_f_utf_string_dynamic_mash_ /** @@ -1547,7 +1547,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_utf_string_dynamic_mash_nulless_ - extern f_status_t f_utf_string_dynamic_mash_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination); + extern f_status_t f_utf_string_dynamic_mash_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination); #endif // _di_f_utf_string_dynamic_mash_nulless_ /** @@ -1572,7 +1572,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_utf_string_dynamic_mish_ - extern f_status_t f_utf_string_dynamic_mish(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination); + extern f_status_t f_utf_string_dynamic_mish(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination); #endif // _di_f_utf_string_dynamic_mish_ /** @@ -1599,7 +1599,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_utf_string_dynamic_mish_nulless_ - extern f_status_t f_utf_string_dynamic_mish_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination); + extern f_status_t f_utf_string_dynamic_mish_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination); #endif // _di_f_utf_string_dynamic_mish_nulless_ /** @@ -1723,7 +1723,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_utf_string_dynamic_partial_mash_ - extern f_status_t f_utf_string_dynamic_partial_mash(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination); + extern f_status_t f_utf_string_dynamic_partial_mash(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination); #endif // _di_f_utf_string_dynamic_partial_mash_ /** @@ -1753,7 +1753,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_utf_string_dynamic_partial_mash_nulless_ - extern f_status_t f_utf_string_dynamic_partial_mash_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination); + extern f_status_t f_utf_string_dynamic_partial_mash_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination); #endif // _di_f_utf_string_dynamic_partial_mash_nulless_ /** @@ -1781,7 +1781,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_utf_string_dynamic_partial_mish_ - extern f_status_t f_utf_string_dynamic_partial_mish(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination); + extern f_status_t f_utf_string_dynamic_partial_mish(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination); #endif // _di_f_utf_string_dynamic_partial_mish_ /** @@ -1811,7 +1811,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_utf_string_dynamic_partial_mish_nulless_ - extern f_status_t f_utf_string_dynamic_partial_mish_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination); + extern f_status_t f_utf_string_dynamic_partial_mish_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination); #endif // _di_f_utf_string_dynamic_partial_mish_nulless_ /** @@ -2123,7 +2123,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_utf_string_mash_ - extern f_status_t f_utf_string_mash(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination); + extern f_status_t f_utf_string_mash(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination); #endif // _di_f_utf_string_mash_ /** @@ -2152,7 +2152,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_utf_string_mash_nulless_ - extern f_status_t f_utf_string_mash_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination); + extern f_status_t f_utf_string_mash_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination); #endif // _di_f_utf_string_mash_nulless_ /** @@ -2179,7 +2179,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_utf_string_mish_ - extern f_status_t f_utf_string_mish(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination); + extern f_status_t f_utf_string_mish(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination); #endif // _di_f_utf_string_mish_ /** @@ -2208,7 +2208,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_utf_string_mish_nulless_ - extern f_status_t f_utf_string_mish_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination); + extern f_status_t f_utf_string_mish_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination); #endif // _di_f_utf_string_mish_nulless_ /** @@ -2231,7 +2231,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_utf_string_prepend_ - extern f_status_t f_utf_string_prepend(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination); + extern f_status_t f_utf_string_prepend(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination); #endif // _di_f_utf_string_prepend_ /** @@ -2256,7 +2256,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_utf_string_prepend_assure_ - extern f_status_t f_utf_string_prepend_assure(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination); + extern f_status_t f_utf_string_prepend_assure(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination); #endif // _di_f_utf_string_prepend_assure_ /** @@ -2282,7 +2282,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_utf_string_prepend_assure_nulless_ - extern f_status_t f_utf_string_prepend_assure_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination); + extern f_status_t f_utf_string_prepend_assure_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination); #endif // _di_f_utf_string_prepend_assure_nulless_ /** @@ -2308,7 +2308,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_utf_string_prepend_nulless_ - extern f_status_t f_utf_string_prepend_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination); + extern f_status_t f_utf_string_prepend_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination); #endif // _di_f_utf_string_prepend_nulless_ /** diff --git a/level_0/f_utf/c/utf_dynamic.c b/level_0/f_utf/c/utf_dynamic.c index 9e406cf..9bde3ca 100644 --- a/level_0/f_utf/c/utf_dynamic.c +++ b/level_0/f_utf/c/utf_dynamic.c @@ -10,7 +10,7 @@ extern "C" { #endif // _di_f_utf_string_static_empty_s_ #ifndef _di_f_utf_string_dynamic_adjust_ - f_status_t f_utf_string_dynamic_adjust(const f_string_length_t length, f_utf_string_dynamic_t *dynamic) { + f_status_t f_utf_string_dynamic_adjust(const f_array_length_t length, f_utf_string_dynamic_t *dynamic) { #ifndef _di_level_0_parameter_checking_ if (!dynamic) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -20,7 +20,7 @@ extern "C" { #endif // _di_f_utf_string_dynamic_adjust_ #ifndef _di_f_utf_string_dynamic_decimate_by_ - f_status_t f_utf_string_dynamic_decimate_by(const f_string_length_t amount, f_utf_string_dynamic_t *dynamic) { + f_status_t f_utf_string_dynamic_decimate_by(const f_array_length_t amount, f_utf_string_dynamic_t *dynamic) { #ifndef _di_level_0_parameter_checking_ if (!amount) return F_status_set_error(F_parameter); if (!dynamic) return F_status_set_error(F_parameter); @@ -35,7 +35,7 @@ extern "C" { #endif // _di_f_utf_string_dynamic_decimate_by_ #ifndef _di_f_utf_string_dynamic_decrease_by_ - f_status_t f_utf_string_dynamic_decrease_by(const f_string_length_t amount, f_utf_string_dynamic_t *dynamic) { + f_status_t f_utf_string_dynamic_decrease_by(const f_array_length_t amount, f_utf_string_dynamic_t *dynamic) { #ifndef _di_level_0_parameter_checking_ if (!amount) return F_status_set_error(F_parameter); if (!dynamic) return F_status_set_error(F_parameter); @@ -58,12 +58,12 @@ extern "C" { if (dynamic->used + 1 > dynamic->size) { f_array_length_t size = dynamic->used + f_memory_default_allocation_step; - if (size > f_string_length_t_size) { - if (dynamic->used + 1 > f_string_length_t_size) { + if (size > f_array_length_t_size) { + if (dynamic->used + 1 > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } - size = f_string_length_t_size; + size = f_array_length_t_size; } return private_f_utf_string_dynamic_resize(size, dynamic); @@ -74,7 +74,7 @@ extern "C" { #endif // _di_f_utf_string_dynamic_increase_ #ifndef _di_f_utf_string_dynamic_increase_by_ - f_status_t f_utf_string_dynamic_increase_by(const f_string_length_t amount, f_utf_string_dynamic_t *dynamic) { + f_status_t f_utf_string_dynamic_increase_by(const f_array_length_t amount, f_utf_string_dynamic_t *dynamic) { #ifndef _di_level_0_parameter_checking_ if (!dynamic) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -84,7 +84,7 @@ extern "C" { #endif // _di_f_utf_string_dynamic_increase_by_ #ifndef _di_f_utf_string_dynamic_resize_ - f_status_t f_utf_string_dynamic_resize(const f_string_length_t length, f_utf_string_dynamic_t *dynamic) { + f_status_t f_utf_string_dynamic_resize(const f_array_length_t length, f_utf_string_dynamic_t *dynamic) { #ifndef _di_level_0_parameter_checking_ if (!dynamic) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ diff --git a/level_0/f_utf/c/utf_dynamic.h b/level_0/f_utf/c/utf_dynamic.h index f61613c..9723ec3 100644 --- a/level_0/f_utf/c/utf_dynamic.h +++ b/level_0/f_utf/c/utf_dynamic.h @@ -31,8 +31,8 @@ extern "C" { typedef struct { f_utf_string_t string; - f_string_length_t size; - f_string_length_t used; + f_array_length_t size; + f_array_length_t used; } f_utf_string_static_t; #define f_utf_string_static_t_initialize { 0, 0, 0 } @@ -167,14 +167,14 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_f_utf_string_dynamic_decrease_by_ - extern f_status_t f_utf_string_dynamic_decrease_by(const f_string_length_t amount, f_utf_string_dynamic_t *dynamic); + extern f_status_t f_utf_string_dynamic_decrease_by(const f_array_length_t amount, f_utf_string_dynamic_t *dynamic); #endif // _di_f_utf_string_dynamic_decrease_by_ /** * Resize the dynamic string to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_string_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -198,7 +198,7 @@ extern "C" { * Resize the dynamic string to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_string_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -215,7 +215,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_f_utf_string_dynamic_increase_by_ - extern f_status_t f_utf_string_dynamic_increase_by(const f_string_length_t amount, f_utf_string_dynamic_t *dynamic); + extern f_status_t f_utf_string_dynamic_increase_by(const f_array_length_t amount, f_utf_string_dynamic_t *dynamic); #endif // _di_f_utf_string_dynamic_increase_by_ /** @@ -242,7 +242,7 @@ extern "C" { * @param length * The new size to use. * @param dynamics - * The string array to resize. + * The array to resize. * * @return * F_none on success. @@ -264,7 +264,7 @@ extern "C" { * @param amount * A positive number representing how much to decimate the size by. * @param dynamics - * The string array to resize. + * The array to resize. * * @return * F_none on success. @@ -287,7 +287,7 @@ extern "C" { * @param amount * A positive number representing how much to decrease the size by. * @param dynamics - * The string array to resize. + * The array to resize. * * @return * F_none on success. @@ -307,7 +307,7 @@ extern "C" { * If already set to the maximum buffer size, then the resize will fail. * * @param dynamics - * The string array to resize. + * The array to resize. * * @return * F_none on success. @@ -324,14 +324,14 @@ extern "C" { /** * Resize the dynamic string array to a larger size. * - * This will resize making the string larger based on the given length. + * This will resize making the array larger based on the given length. * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). * If already set to the maximum buffer size, then the resize will fail. * * @param amount * A positive number representing how much to increase the size by. * @param dynamics - * The string array to resize. + * The array to resize. * * @return * F_none on success. @@ -351,7 +351,7 @@ extern "C" { * @param length * The new size to use. * @param dynamics - * The string array to resize. + * The array to resize. * * @return * F_none on success. diff --git a/level_0/f_utf/c/utf_quantity.h b/level_0/f_utf/c/utf_quantity.h index 58b651c..c012938 100644 --- a/level_0/f_utf/c/utf_quantity.h +++ b/level_0/f_utf/c/utf_quantity.h @@ -30,8 +30,8 @@ extern "C" { */ #ifndef _di_f_utf_string_quantity_t_ typedef struct { - f_string_length_t start; - f_string_length_t total; + f_array_length_t start; + f_array_length_t total; } f_utf_string_quantity_t; #define f_utf_string_quantity_t_initialize { 0, 0 } diff --git a/level_0/f_utf/c/utf_range.h b/level_0/f_utf/c/utf_range.h index 30ee1ae..a5c1bed 100644 --- a/level_0/f_utf/c/utf_range.h +++ b/level_0/f_utf/c/utf_range.h @@ -30,8 +30,8 @@ extern "C" { */ #ifndef _di_f_utf_string_range_t_ typedef struct { - f_string_length_t start; - f_string_length_t stop; + f_array_length_t start; + f_array_length_t stop; } f_utf_string_range_t; #define f_utf_string_range_t_initialize { 1, 0 } diff --git a/level_1/fl_color/c/color.c b/level_1/fl_color/c/color.c index df9fbdc..ab87d96 100644 --- a/level_1/fl_color/c/color.c +++ b/level_1/fl_color/c/color.c @@ -60,7 +60,7 @@ extern "C" { if (!color4 && color5 != 0) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - f_string_length_t string_size = strnlen(format.begin, f_color_max_size) + strnlen(format.end, f_color_max_size) + 1; + f_array_length_t string_size = strnlen(format.begin, f_color_max_size) + strnlen(format.end, f_color_max_size) + 1; if (!color2) string_size += strnlen(color1, f_color_max_size); else if (!color3) string_size += strnlen(color1, f_color_max_size) + strnlen(color2, f_color_max_size); diff --git a/level_1/fl_console/c/console.c b/level_1/fl_console/c/console.c index 47addbc..61b0c15 100644 --- a/level_1/fl_console/c/console.c +++ b/level_1/fl_console/c/console.c @@ -11,7 +11,7 @@ extern "C" { #endif // _di_level_1_parameter_checking_ f_status_t status = F_none; - f_string_length_t length = strlen(argument); + f_array_length_t length = strlen(argument); if (!length) { directory->used = 0; @@ -24,7 +24,7 @@ extern "C" { } // while if (argument[0] == f_path_separator_s[0]) { - f_string_length_t begin = 1; + f_array_length_t begin = 1; while (begin < length && argument[begin] == f_path_separator_s[0]) { begin++; @@ -57,7 +57,7 @@ extern "C" { } } else if (length > 3 && argument[0] == f_path_separator_current_s[0] && argument[1] == f_path_separator_current_s[0] && argument[2] == f_path_separator_s[0]) { - f_string_length_t begin = 3; + f_array_length_t begin = 3; while (begin < length && argument[begin] == f_path_separator_s[0]) { begin++; @@ -94,7 +94,7 @@ extern "C" { } } else if (length > 2 && argument[0] == f_path_separator_current_s[0] && argument[1] == f_path_separator_s[0]) { - f_string_length_t begin = 2; + f_array_length_t begin = 2; while (begin < length && argument[begin] == f_path_separator_s[0]) { begin++; diff --git a/level_1/fl_control_group/c/control_group.c b/level_1/fl_control_group/c/control_group.c index 955e389..34a7388 100644 --- a/level_1/fl_control_group/c/control_group.c +++ b/level_1/fl_control_group/c/control_group.c @@ -23,7 +23,7 @@ extern "C" { f_file_t file = f_macro_file_t_initialize2(0, -1, f_file_flag_write_only); f_status_t status = F_none; - f_string_length_t length = 0; + f_array_length_t length = 0; for (f_array_length_t i = 0; i < control_group.groups.used; ++i) { diff --git a/level_1/fl_conversion/c/conversion.c b/level_1/fl_conversion/c/conversion.c index 0c0ff2c..aafe145 100644 --- a/level_1/fl_conversion/c/conversion.c +++ b/level_1/fl_conversion/c/conversion.c @@ -20,7 +20,7 @@ extern "C" { f_number_unsigned_t digit = 0; f_number_unsigned_t converted = 0; - for (f_string_length_t i = range.start; i <= range.stop; i++) { + for (f_array_length_t i = range.start; i <= range.stop; i++) { if (f_conversion_character_to_binary(string[i], &digit) == F_none) { if (digits) { @@ -80,7 +80,7 @@ extern "C" { f_number_unsigned_t digit = 0; f_number_unsigned_t converted = 0; - for (f_string_length_t i = range.start; i <= range.stop; i++) { + for (f_array_length_t i = range.start; i <= range.stop; i++) { if (f_conversion_character_to_binary(string[i], &digit) == F_none) { if (digits) { @@ -124,7 +124,7 @@ extern "C" { f_number_unsigned_t digit = 0; f_number_unsigned_t converted = 0; - for (f_string_length_t i = range.start; i <= range.stop; i++) { + for (f_array_length_t i = range.start; i <= range.stop; i++) { if (f_conversion_character_to_decimal(string[i], &digit) == F_none) { @@ -189,7 +189,7 @@ extern "C" { f_number_unsigned_t digit = 0; f_number_unsigned_t converted = 0; - for (f_string_length_t i = range.start; i <= range.stop; i++) { + for (f_array_length_t i = range.start; i <= range.stop; i++) { if (f_conversion_character_to_decimal(string[i], &digit) == F_none) { @@ -236,7 +236,7 @@ extern "C" { f_number_unsigned_t digit = 0; f_number_unsigned_t converted = 0; - for (f_string_length_t i = range.start; i <= range.stop; i++) { + for (f_array_length_t i = range.start; i <= range.stop; i++) { if (f_conversion_character_to_duodecimal(string[i], &digit) == F_none) { @@ -301,7 +301,7 @@ extern "C" { f_number_unsigned_t digit = 0; f_number_unsigned_t converted = 0; - for (f_string_length_t i = range.start; i <= range.stop; i++) { + for (f_array_length_t i = range.start; i <= range.stop; i++) { if (f_conversion_character_to_duodecimal(string[i], &digit) == F_none) { @@ -348,7 +348,7 @@ extern "C" { f_number_unsigned_t digit = 0; f_number_unsigned_t converted = 0; - for (f_string_length_t i = range.start; i <= range.stop; i++) { + for (f_array_length_t i = range.start; i <= range.stop; i++) { if (f_conversion_character_to_hexidecimal(string[i], &digit) == F_none) { @@ -413,7 +413,7 @@ extern "C" { f_number_unsigned_t digit = 0; f_number_unsigned_t converted = 0; - for (f_string_length_t i = range.start; i <= range.stop; i++) { + for (f_array_length_t i = range.start; i <= range.stop; i++) { if (f_conversion_character_to_hexidecimal(string[i], &digit) == F_none) { @@ -460,7 +460,7 @@ extern "C" { f_number_unsigned_t digit = 0; f_number_unsigned_t converted = 0; - for (f_string_length_t i = range.start; i <= range.stop; i++) { + for (f_array_length_t i = range.start; i <= range.stop; i++) { if (f_conversion_character_to_octal(string[i], &digit) == F_none) { @@ -525,7 +525,7 @@ extern "C" { f_number_unsigned_t digit = 0; f_number_unsigned_t converted = 0; - for (f_string_length_t i = range.start; i <= range.stop; i++) { + for (f_array_length_t i = range.start; i <= range.stop; i++) { if (f_conversion_character_to_octal(string[i], &digit) == F_none) { @@ -572,11 +572,11 @@ extern "C" { uint8_t width_max = 0; uint8_t mode = 0; int8_t vector = 0; // 0 for assumed positive, 1 for explicit positive, -1 for negative. - f_string_length_t j = 0; - f_string_length_t offset = 0; + f_array_length_t j = 0; + f_array_length_t offset = 0; f_status_t status = F_none; - for (f_string_length_t i = range.start; i <= range.stop; i++) { + for (f_array_length_t i = range.start; i <= range.stop; i++) { width = f_macro_utf_byte_width_is(string[i]); if (!width) { @@ -727,12 +727,12 @@ extern "C" { uint8_t width = 0; uint8_t width_max = 0; uint8_t mode = 0; - f_string_length_t j = 0; - f_string_length_t offset = 0; + f_array_length_t j = 0; + f_array_length_t offset = 0; f_status_t status = F_none; int8_t sign_found = 0; - for (f_string_length_t i = range.start; i <= range.stop; i++) { + for (f_array_length_t i = range.start; i <= range.stop; i++) { width = f_macro_utf_byte_width_is(string[i]); if (!width) { diff --git a/level_1/fl_directory/c/directory.c b/level_1/fl_directory/c/directory.c index 2a6fa42..bce412e 100644 --- a/level_1/fl_directory/c/directory.c +++ b/level_1/fl_directory/c/directory.c @@ -6,7 +6,7 @@ extern "C" { #endif #ifndef _di_fl_directory_create_ - f_status_t fl_directory_create(const f_string_t path, const f_string_length_t length, const mode_t mode) { + f_status_t fl_directory_create(const f_string_t path, const f_array_length_t length, const mode_t mode) { #ifndef _di_level_1_parameter_checking_ if (!path) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -21,8 +21,8 @@ extern "C" { if (status == F_true) return F_directory_found; { - f_string_length_t at_tree = 0; - f_string_length_t at_path = 0; + f_array_length_t at_tree = 0; + f_array_length_t at_path = 0; char tree[length]; @@ -50,7 +50,7 @@ extern "C" { #endif // _di_fl_directory_create_ #ifndef _di_fl_directory_clone_ - f_status_t fl_directory_clone(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const bool role, const fl_directory_recurse_t recurse) { + f_status_t fl_directory_clone(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const bool role, const fl_directory_recurse_t recurse) { #ifndef _di_level_1_parameter_checking_ if (!source) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); @@ -94,7 +94,7 @@ extern "C" { // do not allow null termination or trailing path separators in the string's length calculation. { - f_string_length_t i = source_length; + f_array_length_t i = source_length; for (; i > 0; i--, static_source.used--) { @@ -128,7 +128,7 @@ extern "C" { #endif // _di_fl_directory_clone_ #ifndef _di_fl_directory_clone_content_ - f_status_t fl_directory_clone_content(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const bool role, const fl_directory_recurse_t recurse) { + f_status_t fl_directory_clone_content(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const bool role, const fl_directory_recurse_t recurse) { #ifndef _di_level_1_parameter_checking_ if (!source) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); @@ -148,7 +148,7 @@ extern "C" { // do not allow null termination or trailing path separators in the string's length calculation. { - f_string_length_t i = source_length; + f_array_length_t i = source_length; for (; i > 0; i--, static_source.used--) { @@ -184,7 +184,7 @@ extern "C" { #endif // _di_fl_directory_clone_content_ #ifndef _di_fl_directory_copy_ - f_status_t fl_directory_copy(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const f_mode_t mode, const fl_directory_recurse_t recurse) { + f_status_t fl_directory_copy(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const f_mode_t mode, const fl_directory_recurse_t recurse) { #ifndef _di_level_1_parameter_checking_ if (!source) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); @@ -216,7 +216,7 @@ extern "C" { // do not allow null termination or trailing path separators in the string's length calculation. { - f_string_length_t i = source_length; + f_array_length_t i = source_length; for (; i > 0; i--, static_source.used--) { @@ -250,7 +250,7 @@ extern "C" { #endif // _di_fl_directory_copy_ #ifndef _di_fl_directory_copy_content_ - f_status_t fl_directory_copy_content(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const f_mode_t mode, const fl_directory_recurse_t recurse) { + f_status_t fl_directory_copy_content(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const f_mode_t mode, const fl_directory_recurse_t recurse) { #ifndef _di_level_1_parameter_checking_ if (!source) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); @@ -270,7 +270,7 @@ extern "C" { // do not allow null termination or trailing path separators in the string's length calculation. { - f_string_length_t i = source_length; + f_array_length_t i = source_length; for (; i > 0; i--, static_source.used--) { @@ -327,8 +327,8 @@ extern "C" { const bool null_terminated = path->string[path->used] == 0; bool first_nulless = F_false; - f_string_length_t i = path->used - 1; - f_string_length_t j = 0; + f_array_length_t i = path->used - 1; + f_array_length_t j = 0; f_status_t status = F_none; @@ -387,7 +387,7 @@ extern "C" { #endif // _di_fl_directory_path_pop_ #ifndef _di_fl_directory_path_push_ - f_status_t fl_directory_path_push(const f_string_t source, f_string_length_t length, f_string_dynamic_t *destination) { + f_status_t fl_directory_path_push(const f_string_t source, f_array_length_t length, f_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (!source) return F_status_set_error(F_parameter); if (destination->used > destination->size) return F_status_set_error(F_parameter); diff --git a/level_1/fl_directory/c/directory.h b/level_1/fl_directory/c/directory.h index da76935..243b6af 100644 --- a/level_1/fl_directory/c/directory.h +++ b/level_1/fl_directory/c/directory.h @@ -122,7 +122,7 @@ extern "C" { * @see f_directory_create() */ #ifndef _di_fl_directory_create_ - extern f_status_t fl_directory_create(const f_string_t path, const f_string_length_t length, const mode_t mode); + extern f_status_t fl_directory_create(const f_string_t path, const f_array_length_t length, const mode_t mode); #endif // _di_fl_directory_create_ /** @@ -165,7 +165,7 @@ extern "C" { * @see f_file_clone() */ #ifndef _di_fl_directory_clone_ - extern f_status_t fl_directory_clone(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const bool role, const fl_directory_recurse_t recurse); + extern f_status_t fl_directory_clone(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const bool role, const fl_directory_recurse_t recurse); #endif // _di_fl_directory_clone_ /** @@ -206,7 +206,7 @@ extern "C" { * @see f_file_clone() */ #ifndef _di_fl_directory_clone_content_ - extern f_status_t fl_directory_clone_content(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const bool role, const fl_directory_recurse_t recurse); + extern f_status_t fl_directory_clone_content(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const bool role, const fl_directory_recurse_t recurse); #endif // _di_fl_directory_clone_content_ /** @@ -247,7 +247,7 @@ extern "C" { * @see f_file_copy() */ #ifndef _di_fl_directory_copy_ - extern f_status_t fl_directory_copy(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const f_mode_t mode, const fl_directory_recurse_t recurse); + extern f_status_t fl_directory_copy(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const f_mode_t mode, const fl_directory_recurse_t recurse); #endif // _di_fl_directory_copy_ /** @@ -286,7 +286,7 @@ extern "C" { * @see f_file_copy() */ #ifndef _di_fl_directory_copy_content_ - extern f_status_t fl_directory_copy_content(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const f_mode_t mode, const fl_directory_recurse_t recurse); + extern f_status_t fl_directory_copy_content(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const f_mode_t mode, const fl_directory_recurse_t recurse); #endif // _di_fl_directory_copy_content_ /** @@ -383,7 +383,7 @@ extern "C" { * Errors (with error bit) from: f_utf_is_control(). */ #ifndef _di_fl_directory_path_push_ - extern f_status_t fl_directory_path_push(const f_string_t source, f_string_length_t length, f_string_dynamic_t *destination); + extern f_status_t fl_directory_path_push(const f_string_t source, f_array_length_t length, f_string_dynamic_t *destination); #endif // _di_fl_directory_path_push_ /** diff --git a/level_1/fl_directory/c/private-directory.c b/level_1/fl_directory/c/private-directory.c index ae4c833..12ec86a 100644 --- a/level_1/fl_directory/c/private-directory.c +++ b/level_1/fl_directory/c/private-directory.c @@ -20,7 +20,7 @@ extern "C" { status = F_none; int directory_fd = 0; - f_string_length_t failures_used = recurse.failures ? recurse.failures->used : 0; + f_array_length_t failures_used = recurse.failures ? recurse.failures->used : 0; { f_string_dynamics_t * const list[] = { @@ -162,7 +162,7 @@ extern "C" { if (F_status_is_error(status)) return status; f_directory_status_t failure = f_directory_status_t_initialize; - f_string_length_t size = 0; + f_array_length_t size = 0; // identify if failure was because of source or destination. struct stat source_stat; @@ -172,7 +172,7 @@ extern "C" { status = f_file_stat(source.string, F_false, &source_stat); if (F_status_is_error(status)) { if (status == F_status_set_error(F_string_too_large)) { - size = f_string_length_t_size - 1; + size = f_array_length_t_size - 1; } else { size = source.used + file.used + 1; @@ -186,7 +186,7 @@ extern "C" { } else { if (status == F_status_set_error(F_string_too_large)) { - size = f_string_length_t_size - 1; + size = f_array_length_t_size - 1; } else { size = destination.used + file.used + 1; @@ -231,7 +231,7 @@ extern "C" { status = F_none; int directory_fd = 0; - f_string_length_t failures_used = recurse.failures ? recurse.failures->used : 0; + f_array_length_t failures_used = recurse.failures ? recurse.failures->used : 0; { f_string_dynamics_t * const list[] = { @@ -358,7 +358,7 @@ extern "C" { if (F_status_is_error(status)) return status; f_directory_status_t failure = f_directory_status_t_initialize; - f_string_length_t size = 0; + f_array_length_t size = 0; // identify if failure was because of source or destination. struct stat source_stat; @@ -369,7 +369,7 @@ extern "C" { if (F_status_is_error(status)) { if (status == F_status_set_error(F_string_too_large)) { - size = f_string_length_t_size - 1; + size = f_array_length_t_size - 1; } else { size = source.used + file.used + 1; @@ -383,7 +383,7 @@ extern "C" { } else { if (status == F_status_set_error(F_string_too_large)) { - size = f_string_length_t_size - 1; + size = f_array_length_t_size - 1; } else { size = destination.used + file.used + 1; @@ -417,7 +417,7 @@ extern "C" { f_status_t private_fl_directory_list(const f_string_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t *listing) { struct dirent **entity = 0; - f_string_length_t size = 0; + f_array_length_t size = 0; f_status_t status = F_none; DIR *parent = opendir(path); @@ -473,7 +473,7 @@ extern "C" { } f_string_dynamics_t *names = 0; - f_string_length_t total = 0; + f_array_length_t total = 0; struct stat file_stat; int mode = 0; size_t i = 0; @@ -530,7 +530,7 @@ extern "C" { if (F_status_is_error(status)) break; if (names->array[names->used].used > 0 && names->array[names->used].string[names->array[names->used].used - 1] != 0) { - if (names->array[names->used].used == f_string_length_t_size) { + if (names->array[names->used].used == f_array_length_t_size) { status = F_status_set_error(F_string_too_large); break; } @@ -570,19 +570,19 @@ extern "C" { #endif // !defined(_di_fl_directory_list_) #if !defined(_di_fl_directory_path_push_) || !defined(_di_fl_directory_path_push_dynamic_) - f_status_t private_fl_directory_path_push(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) { + f_status_t private_fl_directory_path_push(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { bool terminated_null = F_false; bool separator_prepend = F_false; bool separator_append = F_false; - f_string_length_t total = 0; - f_string_length_t start = 0; - f_string_length_t length_truncated = length; + f_array_length_t total = 0; + f_array_length_t start = 0; + f_array_length_t length_truncated = length; f_status_t status = F_none; { - f_string_length_t i = 0; - f_string_length_t j = 0; + f_array_length_t i = 0; + f_array_length_t j = 0; if (destination->used > 0) { if (!destination->string[destination->used - 1]) { @@ -739,7 +739,7 @@ extern "C" { total += length_truncated - start; if (destination->used + total > destination->size) { - if (destination->used + total > f_string_length_t_size) { + if (destination->used + total > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } diff --git a/level_1/fl_directory/c/private-directory.h b/level_1/fl_directory/c/private-directory.h index 06f4bbd..1653df8 100644 --- a/level_1/fl_directory/c/private-directory.h +++ b/level_1/fl_directory/c/private-directory.h @@ -202,7 +202,7 @@ extern "C" { * @see fl_directory_path_push_dynamic() */ #if !defined(_di_fl_directory_path_push_) || !defined(_di_fl_directory_path_push_dynamic_) - extern f_status_t private_fl_directory_path_push(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal; + extern f_status_t private_fl_directory_path_push(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal; #endif // !defined(_di_fl_directory_path_push_) || !defined(_di_fl_directory_path_push_dynamic_) #ifdef __cplusplus diff --git a/level_1/fl_environment/c/environment.c b/level_1/fl_environment/c/environment.c index 9df21a1..7ea91a4 100644 --- a/level_1/fl_environment/c/environment.c +++ b/level_1/fl_environment/c/environment.c @@ -5,7 +5,7 @@ extern "C" { #endif #ifndef _di_fl_environment_load_name_ - f_status_t fl_environment_load_name(const f_string_t name, const f_string_length_t length, f_string_maps_t *environment) { + f_status_t fl_environment_load_name(const f_string_t name, const f_array_length_t length, f_string_maps_t *environment) { #ifndef _di_level_2_parameter_checking_ if (!name) return F_status_set_error(F_parameter); if (!environment) return F_status_set_error(F_parameter); @@ -92,7 +92,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ f_status_t status = F_none; - const f_string_length_t length = strnlen(path, PATH_MAX); + const f_array_length_t length = strnlen(path, PATH_MAX); if (!length) { @@ -107,9 +107,9 @@ extern "C" { return F_none; } - f_string_length_t i = length; - f_string_length_t first = 0; - f_string_length_t total = 0; + f_array_length_t i = length; + f_array_length_t first = 0; + f_array_length_t total = 0; for (i = 0; i <= length; i++) { @@ -183,10 +183,10 @@ extern "C" { return F_none; } - f_string_length_t i = 0; - f_string_length_t j = 0; - f_string_length_t first = 0; - f_string_length_t total = 0; + f_array_length_t i = 0; + f_array_length_t j = 0; + f_array_length_t first = 0; + f_array_length_t total = 0; f_string_dynamic_t part = f_string_dynamic_t_initialize; @@ -247,7 +247,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ f_status_t status = F_none; - const f_string_length_t length = strnlen(path, PATH_MAX); + const f_array_length_t length = strnlen(path, PATH_MAX); if (!length) { @@ -263,10 +263,10 @@ extern "C" { return F_none; } - f_string_length_t i = length; - f_string_length_t j = length; - f_string_length_t last = length; - f_string_length_t total = 0; + f_array_length_t i = length; + f_array_length_t j = length; + f_array_length_t last = length; + f_array_length_t total = 0; f_string_dynamic_t part = f_string_dynamic_t_initialize; @@ -358,11 +358,11 @@ extern "C" { return F_none; } - f_string_length_t i = path.used; - f_string_length_t j = path.used; - f_string_length_t k = 0; - f_string_length_t last = path.used; - f_string_length_t total = 0; + f_array_length_t i = path.used; + f_array_length_t j = path.used; + f_array_length_t k = 0; + f_array_length_t last = path.used; + f_array_length_t total = 0; f_string_dynamic_t part = f_string_dynamic_t_initialize; diff --git a/level_1/fl_environment/c/environment.h b/level_1/fl_environment/c/environment.h index 229f0b2..43da3d8 100644 --- a/level_1/fl_environment/c/environment.h +++ b/level_1/fl_environment/c/environment.h @@ -54,7 +54,7 @@ extern "C" { * @see f_string_maps_increase_by() */ #ifndef _di_fl_environment_load_name_ - extern f_status_t fl_environment_load_name(const f_string_t name, const f_string_length_t length, f_string_maps_t *environment); + extern f_status_t fl_environment_load_name(const f_string_t name, const f_array_length_t length, f_string_maps_t *environment); #endif // _di_fl_environment_load_name_ /** diff --git a/level_1/fl_fss/c/fss_basic.c b/level_1/fl_fss/c/fss_basic.c index b2738aa..c199e7d 100644 --- a/level_1/fl_fss/c/fss_basic.c +++ b/level_1/fl_fss/c/fss_basic.c @@ -84,7 +84,7 @@ extern "C" { if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - const f_string_length_t destination_used = destination->used; + const f_array_length_t destination_used = destination->used; f_status_t status = private_fl_fss_basic_write(F_true, object, quote ? quote : f_fss_delimit_quote_double, range, destination); @@ -167,7 +167,7 @@ extern "C" { status = f_string_dynamic_increase_by(destination->used + (range->stop - range->start) + 1, destination); if (F_status_is_error(status)) return status; - const f_string_length_t destination_used = destination->used; + const f_array_length_t destination_used = destination->used; for (; range->start <= range->stop && range->start < content.used; range->start++) { diff --git a/level_1/fl_fss/c/fss_basic_list.c b/level_1/fl_fss/c/fss_basic_list.c index bc39242..3ef5b55 100644 --- a/level_1/fl_fss/c/fss_basic_list.c +++ b/level_1/fl_fss/c/fss_basic_list.c @@ -58,10 +58,10 @@ extern "C" { return FL_fss_found_object_not; } - f_string_length_t slash_first = 0; - f_string_length_t slash_count = 0; - f_string_length_t start = 0; - f_string_length_t stop = 0; + f_array_length_t slash_first = 0; + f_array_length_t slash_count = 0; + f_array_length_t start = 0; + f_array_length_t stop = 0; bool graph_first = F_true; @@ -252,11 +252,11 @@ extern "C" { found->array[found->used].start = range->start; - f_string_length_t newline_last = range->start; - f_string_length_t slash_first = 0; - f_string_length_t slash_count = 0; - f_string_length_t start = 0; - f_string_length_t comment_delimit = 0; + f_array_length_t newline_last = range->start; + f_array_length_t slash_first = 0; + f_array_length_t slash_count = 0; + f_array_length_t start = 0; + f_array_length_t comment_delimit = 0; uint8_t graph_first = 0x1; // 0x0 = false, 0x1 = true, 0x2 = false, but there is a delimited comment, comment_delimit is set. @@ -494,11 +494,11 @@ extern "C" { status = f_string_dynamic_increase_by(destination->used + (range->stop - range->start) + 3, destination); if (F_status_is_error(status)) return status; - const f_string_length_t input_start = range->start; - const f_string_length_t used_start = destination->used; + const f_array_length_t input_start = range->start; + const f_array_length_t used_start = destination->used; - f_string_length_t i = 0; - f_string_length_t slash_count = 0; + f_array_length_t i = 0; + f_array_length_t slash_count = 0; f_string_range_t range_next = f_string_range_t_initialize; @@ -679,16 +679,16 @@ extern "C" { status = f_string_dynamic_increase_by(destination->used + (range->stop - range->start) + 2, destination); if (F_status_is_error(status)) return status; - const f_string_length_t input_start = range->start; - const f_string_length_t used_start = destination->used; + const f_array_length_t input_start = range->start; + const f_array_length_t used_start = destination->used; bool is_comment = F_false; bool has_graph = F_false; bool do_prepend = F_true; - f_string_length_t i = 0; - f_string_length_t slash_count = 0; - f_string_length_t start = 0; + f_array_length_t i = 0; + f_array_length_t slash_count = 0; + f_array_length_t start = 0; uint8_t width = 0; diff --git a/level_1/fl_fss/c/fss_embedded_list.c b/level_1/fl_fss/c/fss_embedded_list.c index 31f3631..acdc7df 100644 --- a/level_1/fl_fss/c/fss_embedded_list.c +++ b/level_1/fl_fss/c/fss_embedded_list.c @@ -70,10 +70,10 @@ extern "C" { return FL_fss_found_object_not; } - f_string_length_t start = 0; - f_string_length_t stop = 0; - f_string_length_t slash_first = 0; - f_string_length_t slash_count = 0; + f_array_length_t start = 0; + f_array_length_t stop = 0; + f_array_length_t slash_first = 0; + f_array_length_t slash_count = 0; bool graph_first = F_true; @@ -269,10 +269,10 @@ extern "C" { f_macro_fss_nest_t_increase(status, (*found)); if (F_status_is_error(status)) return status; - f_string_lengths_t positions_start = f_string_lengths_t_initialize; + f_array_lengths_t positions_start = f_array_lengths_t_initialize; - f_macro_string_lengths_t_clear(positions_start) - f_macro_string_lengths_t_resize(status, positions_start, f_fss_default_allocation_step) + f_macro_array_lengths_t_clear(positions_start) + f_macro_array_lengths_t_resize(status, positions_start, f_fss_default_allocation_step) if (F_status_is_error(status)) return status; f_fss_objects_t objects = f_fss_objects_t_initialize; @@ -281,7 +281,7 @@ extern "C" { f_macro_fss_objects_t_resize(status, objects, f_fss_default_allocation_step) if (F_status_is_error(status)) { - f_macro_string_lengths_t_delete_simple(positions_start); + f_macro_array_lengths_t_delete_simple(positions_start); return status; } @@ -292,16 +292,16 @@ extern "C" { f_array_length_t depth = 0; f_array_length_t position = 0; - f_string_length_t position_previous = range->start; - f_string_length_t line_start = range->start; - f_string_length_t newline_last = range->start; - f_string_length_t comment_delimit = 0; + f_array_length_t position_previous = range->start; + f_array_length_t line_start = range->start; + f_array_length_t newline_last = range->start; + f_array_length_t comment_delimit = 0; - f_string_length_t slash_first = 0; - f_string_length_t slash_last = 0; - f_string_length_t slash_count = 0; + f_array_length_t slash_first = 0; + f_array_length_t slash_last = 0; + f_array_length_t slash_count = 0; - f_string_length_t before_list_open = position_previous; + f_array_length_t before_list_open = position_previous; bool is_open = F_false; @@ -474,7 +474,7 @@ extern "C" { depth++; if (depth > positions_start.size) { - f_macro_string_lengths_t_resize(status, positions_start, positions_start.size + f_fss_default_allocation_step); + f_macro_array_lengths_t_resize(status, positions_start, positions_start.size + f_fss_default_allocation_step); if (F_status_is_error(status)) break; } @@ -544,7 +544,7 @@ extern "C" { depth++; if (depth >= positions_start.size) { - f_macro_string_lengths_t_resize(status, positions_start, positions_start.size + f_fss_default_allocation_step); + f_macro_array_lengths_t_resize(status, positions_start, positions_start.size + f_fss_default_allocation_step); if (F_status_is_error(status)) break; f_macro_fss_objects_t_resize(status, objects, objects.size + f_fss_default_allocation_step); @@ -698,7 +698,7 @@ extern "C" { private_fl_macro_fss_nest_return_on_overflow_delimited((buffer), (*range), (*found), positions_start, objects, F_none_eos, F_none_stop) - f_macro_string_lengths_t_delete_simple(positions_start); + f_macro_array_lengths_t_delete_simple(positions_start); f_macro_fss_objects_t_delete_simple(objects); return FL_fss_found_content; @@ -797,7 +797,7 @@ extern "C" { if (F_status_is_error(status)) break; } // while - f_macro_string_lengths_t_delete_simple(positions_start); + f_macro_array_lengths_t_delete_simple(positions_start); f_macro_fss_objects_t_delete_simple(objects); delimits->used = delimits_used; @@ -858,11 +858,11 @@ extern "C" { status = f_string_dynamic_increase_by(destination->used + (range->stop - range->start) + 3, destination); if (F_status_is_error(status)) return status; - const f_string_length_t input_start = range->start; - const f_string_length_t used_start = destination->used; + const f_array_length_t input_start = range->start; + const f_array_length_t used_start = destination->used; - f_string_length_t i = 0; - f_string_length_t slash_count = 0; + f_array_length_t i = 0; + f_array_length_t slash_count = 0; f_string_range_t range_next = f_string_range_t_initialize; @@ -1062,17 +1062,17 @@ extern "C" { status = f_string_dynamic_increase_by(destination->used + (range->stop - range->start) + 3, destination); if (F_status_is_error(status)) return status; - const f_string_length_t input_start = range->start; - const f_string_length_t used_start = destination->used; + const f_array_length_t input_start = range->start; + const f_array_length_t used_start = destination->used; bool is_comment = F_false; bool ends_on_eol = F_false; bool has_graph = F_false; bool do_prepend = F_true; - f_string_length_t i = 0; - f_string_length_t slash_count = 0; - f_string_length_t start = 0; + f_array_length_t i = 0; + f_array_length_t slash_count = 0; + f_array_length_t start = 0; f_array_length_t r = 0; diff --git a/level_1/fl_fss/c/fss_extended.c b/level_1/fl_fss/c/fss_extended.c index 5d59a86..ccfff3a 100644 --- a/level_1/fl_fss/c/fss_extended.c +++ b/level_1/fl_fss/c/fss_extended.c @@ -146,7 +146,7 @@ f_status_t fl_fss_extended_object_write_string(const f_string_static_t object, c if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - const f_string_length_t used_start = destination->used; + const f_array_length_t used_start = destination->used; f_status_t status = private_fl_fss_basic_write(F_true, object, quote ? quote : f_fss_delimit_quote_double, range, destination); diff --git a/level_1/fl_fss/c/fss_extended_list.c b/level_1/fl_fss/c/fss_extended_list.c index 4016f74..5ff8449 100644 --- a/level_1/fl_fss/c/fss_extended_list.c +++ b/level_1/fl_fss/c/fss_extended_list.c @@ -70,10 +70,10 @@ extern "C" { return FL_fss_found_object_not; } - f_string_length_t start = 0; - f_string_length_t stop = 0; - f_string_length_t slash_first = 0; - f_string_length_t slash_count = 0; + f_array_length_t start = 0; + f_array_length_t stop = 0; + f_array_length_t slash_first = 0; + f_array_length_t slash_count = 0; bool graph_first = F_true; @@ -270,10 +270,10 @@ extern "C" { found->array[found->used].start = range->start; - f_string_length_t newline_last = range->start; - f_string_length_t slash_first = 0; - f_string_length_t slash_count = 0; - f_string_length_t start = 0; + f_array_length_t newline_last = range->start; + f_array_length_t slash_first = 0; + f_array_length_t slash_count = 0; + f_array_length_t start = 0; // identify where the content ends. while (range->start <= range->stop && range->start < buffer.used) { @@ -448,11 +448,11 @@ extern "C" { status = f_string_dynamic_increase_by(destination->used + (range->stop - range->start) + 3, destination); if (F_status_is_error(status)) return status; - const f_string_length_t input_start = range->start; - const f_string_length_t used_start = destination->used; + const f_array_length_t input_start = range->start; + const f_array_length_t used_start = destination->used; - f_string_length_t i = 0; - f_string_length_t slash_count = 0; + f_array_length_t i = 0; + f_array_length_t slash_count = 0; f_string_range_t range_next = f_string_range_t_initialize; @@ -652,17 +652,17 @@ extern "C" { status = f_string_dynamic_increase_by(destination->used + (range->stop - range->start) + 3, destination); if (F_status_is_error(status)) return status; - const f_string_length_t input_start = range->start; - const f_string_length_t used_start = destination->used; + const f_array_length_t input_start = range->start; + const f_array_length_t used_start = destination->used; bool is_comment = F_false; bool ends_on_eol = F_false; bool has_graph = F_false; bool do_prepend = F_true; - f_string_length_t i = 0; - f_string_length_t slash_count = 0; - f_string_length_t start = 0; + f_array_length_t i = 0; + f_array_length_t slash_count = 0; + f_array_length_t start = 0; f_array_length_t r = 0; diff --git a/level_1/fl_fss/c/private-fss.c b/level_1/fl_fss/c/private-fss.c index 912c2d7..d490b6b 100644 --- a/level_1/fl_fss/c/private-fss.c +++ b/level_1/fl_fss/c/private-fss.c @@ -7,10 +7,10 @@ extern "C" { #endif #if !defined(_di_fl_fss_basic_object_write_string_) || !defined(_di_fl_fss_extended_object_write_string_) - f_status_t private_fl_fss_basic_write_object_trim(const f_fss_quote_t quote, const f_string_length_t used_start, f_string_dynamic_t *destination) { + f_status_t private_fl_fss_basic_write_object_trim(const f_fss_quote_t quote, const f_array_length_t used_start, f_string_dynamic_t *destination) { f_status_t status = F_none; f_string_range_t destination_range = f_macro_string_range_t_initialize(destination->used); - f_string_length_t i = 0; + f_array_length_t i = 0; uint8_t width = 0; @@ -20,7 +20,7 @@ extern "C" { } // for if (destination->string[destination_range.start] == quote) { - const f_string_length_t front = destination_range.start; + const f_array_length_t front = destination_range.start; for (destination_range.start++; destination_range.start < destination->used; destination_range.start++) { @@ -52,7 +52,7 @@ extern "C" { } } // for - const f_string_length_t rear = destination_range.start + 1; + const f_array_length_t rear = destination_range.start + 1; for (; destination_range.start > front; destination_range.start--) { @@ -122,10 +122,10 @@ extern "C" { #endif // !defined(_di_fl_fss_basic_list_content_write_string_) || !defined(_di_fl_fss_extended_list_content_write_string_) || !defined(_di_fl_fss_embedded_list_content_write_string_) #if !defined(_di_fl_fss_basic_list_object_write_string_) || !defined(_di_fl_fss_extended_list_object_write_string_) - f_status_t private_fl_fss_basic_list_write_object_trim(const f_string_length_t used_start, f_string_dynamic_t *destination) { + f_status_t private_fl_fss_basic_list_write_object_trim(const f_array_length_t used_start, f_string_dynamic_t *destination) { f_status_t status = F_none; f_string_range_t destination_range = f_macro_string_range_t_initialize(destination->used); - f_string_length_t i = 0; + f_array_length_t i = 0; uint8_t width = 0; @@ -240,7 +240,7 @@ extern "C" { // identify where the object begins. if (buffer.string[range->start] == f_fss_delimit_slash) { - f_string_length_t first_slash = range->start; + f_array_length_t first_slash = range->start; found->start = range->start; @@ -348,9 +348,9 @@ extern "C" { return FL_fss_found_object; } else { - f_string_length_t first_slash = 0; - f_string_length_t slash_count = 0; - f_string_length_t location = 0; + f_array_length_t first_slash = 0; + f_array_length_t slash_count = 0; + f_array_length_t location = 0; while (range->start <= range->stop && range->start < buffer.used) { @@ -680,16 +680,16 @@ extern "C" { status = f_string_dynamic_increase_by(destination->used + (range->stop - range->start) + 4, destination); if (F_status_is_error(status)) return status; - const f_string_length_t input_start = range->start; - const f_string_length_t used_start = destination->used; + const f_array_length_t input_start = range->start; + const f_array_length_t used_start = destination->used; bool quoted = F_false; bool commented = F_false; - f_string_length_t item_first = 0; - f_string_length_t item_total = 0; - f_string_length_t quote_start = 0; - f_string_length_t i = 0; + f_array_length_t item_first = 0; + f_array_length_t item_total = 0; + f_array_length_t quote_start = 0; + f_array_length_t i = 0; // use placeholders for potential quote and potential delimited quote to avoid doing things such as memmove(). destination->string[destination->used++] = f_fss_delimit_placeholder; diff --git a/level_1/fl_fss/c/private-fss.h b/level_1/fl_fss/c/private-fss.h index f2e2809..dd8e7d4 100644 --- a/level_1/fl_fss/c/private-fss.h +++ b/level_1/fl_fss/c/private-fss.h @@ -35,7 +35,7 @@ extern "C" { * @see fl_fss_extended_object_write_string() */ #if !defined(_di_fl_fss_basic_object_write_string_) || !defined(_di_fl_fss_extended_object_write_string_) - extern f_status_t private_fl_fss_basic_write_object_trim(const f_fss_quote_t quote, const f_string_length_t used_start, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal; + extern f_status_t private_fl_fss_basic_write_object_trim(const f_fss_quote_t quote, const f_array_length_t used_start, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal; #endif // !defined(_di_fl_fss_basic_object_write_string_) || !defined(_di_fl_fss_extended_object_write_string_) /** @@ -79,7 +79,7 @@ extern "C" { * @see fl_fss_extended_list_object_write_string() */ #if !defined(_di_fl_fss_basic_list_object_write_string_) || !defined(_di_fl_fss_extended_list_object_write_string_) - extern f_status_t private_fl_fss_basic_list_write_object_trim(const f_string_length_t used_start, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal; + extern f_status_t private_fl_fss_basic_list_write_object_trim(const f_array_length_t used_start, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal; #endif // !defined(_di_fl_fss_basic_list_object_write_string_) || !defined(_di_fl_fss_extended_list_object_write_string_) /** diff --git a/level_1/fl_fss/c/private-fss_macro.h b/level_1/fl_fss/c/private-fss_macro.h index cdaf7e3..4449fda 100644 --- a/level_1/fl_fss/c/private-fss_macro.h +++ b/level_1/fl_fss/c/private-fss_macro.h @@ -87,14 +87,14 @@ extern "C" { if (range.start >= buffer.used) { \ delimits.used = delimits_used; \ comments.used = comments_used; \ - f_macro_string_lengths_t_delete_simple(positions); \ + f_macro_array_lengths_t_delete_simple(positions); \ f_macro_fss_objects_t_delete_simple(objects); \ return eos_status; \ } \ else if (range.start > range.stop) { \ delimits.used = delimits_used; \ comments.used = comments_used; \ - f_macro_string_lengths_t_delete_simple(positions); \ + f_macro_array_lengths_t_delete_simple(positions); \ f_macro_fss_objects_t_delete_simple(objects); \ return stop_status; \ } @@ -103,12 +103,12 @@ extern "C" { #ifndef _di_fl_macro_fss_nest_return_on_overflow_delimited_ #define private_fl_macro_fss_nest_return_on_overflow_delimited(buffer, range, found, positions, objects, eos_status, stop_status) \ if (range.start >= buffer.used) { \ - f_macro_string_lengths_t_delete_simple(positions); \ + f_macro_array_lengths_t_delete_simple(positions); \ f_macro_fss_objects_t_delete_simple(objects); \ return eos_status; \ } \ else if (range.start > range.stop) { \ - f_macro_string_lengths_t_delete_simple(positions); \ + f_macro_array_lengths_t_delete_simple(positions); \ f_macro_fss_objects_t_delete_simple(objects); \ return stop_status; \ } diff --git a/level_1/fl_print/c/print.c b/level_1/fl_print/c/print.c index f1e77b2..70cf3f4 100644 --- a/level_1/fl_print/c/print.c +++ b/level_1/fl_print/c/print.c @@ -6,7 +6,7 @@ extern "C" { #endif #ifndef _di_fl_print_trim_except_ - f_status_t fl_print_trim_except(FILE *output, const f_string_t string, const f_string_length_t length, const f_string_lengths_t except) { + f_status_t fl_print_trim_except(FILE *output, const f_string_t string, const f_array_length_t length, const f_array_lengths_t except) { #ifndef _di_level_1_parameter_checking_ if (!output) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -18,7 +18,7 @@ extern "C" { #endif // _di_fl_print_trim_except_ #ifndef _di_fl_print_trim_except_dynamic_ - f_status_t fl_print_trim_except_dynamic(FILE *output, const f_string_static_t buffer, const f_string_lengths_t except) { + f_status_t fl_print_trim_except_dynamic(FILE *output, const f_string_static_t buffer, const f_array_lengths_t except) { #ifndef _di_level_1_parameter_checking_ if (!output) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -30,14 +30,14 @@ extern "C" { #endif // _di_fl_print_trim_except_dynamic_ #ifndef _di_fl_print_trim_except_dynamic_partial_ - f_status_t fl_print_trim_except_dynamic_partial(FILE *output, const f_string_static_t buffer, const f_string_range_t range, const f_string_lengths_t except) { + f_status_t fl_print_trim_except_dynamic_partial(FILE *output, const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except) { #ifndef _di_level_1_parameter_checking_ if (!output) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not; - f_string_length_t length = (range.stop - range.start) + 1; + f_array_length_t length = (range.stop - range.start) + 1; if (length + range.start > buffer.used) { length = buffer.used - range.start; @@ -48,7 +48,7 @@ extern "C" { #endif // _di_fl_print_trim_except_dynamic_partial_ #ifndef _di_fl_print_trim_except_utf_ - f_status_t fl_print_trim_except_utf(FILE *output, const f_utf_string_t string, const f_string_length_t length, const f_string_lengths_t except) { + f_status_t fl_print_trim_except_utf(FILE *output, const f_utf_string_t string, const f_array_length_t length, const f_array_lengths_t except) { #ifndef _di_level_1_parameter_checking_ if (!output) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -60,7 +60,7 @@ extern "C" { #endif // _di_fl_print_trim_except_utf_ #ifndef _di_fl_print_trim_except_utf_dynamic_ - f_status_t fl_print_trim_except_utf_dynamic(FILE *output, const f_utf_string_static_t buffer, const f_string_lengths_t except) { + f_status_t fl_print_trim_except_utf_dynamic(FILE *output, const f_utf_string_static_t buffer, const f_array_lengths_t except) { #ifndef _di_level_1_parameter_checking_ if (!output) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -72,14 +72,14 @@ extern "C" { #endif // _di_fl_print_trim_except_utf_dynamic_ #ifndef _di_fl_print_trim_except_utf_dynamic_partial_ - f_status_t fl_print_trim_except_utf_dynamic_partial(FILE *output, const f_utf_string_static_t buffer, const f_utf_string_range_t range, const f_string_lengths_t except) { + f_status_t fl_print_trim_except_utf_dynamic_partial(FILE *output, const f_utf_string_static_t buffer, const f_utf_string_range_t range, const f_array_lengths_t except) { #ifndef _di_level_1_parameter_checking_ if (!output) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not; - f_string_length_t length = (range.stop - range.start) + 1; + f_array_length_t length = (range.stop - range.start) + 1; if (length + range.start > buffer.used) { length = buffer.used - range.start; @@ -90,7 +90,7 @@ extern "C" { #endif // _di_fl_print_trim_except_utf_dynamic_partial_ #ifndef _di_fl_print_trim_ - f_status_t fl_print_trim(FILE *output, const f_string_t string, const f_string_length_t length) { + f_status_t fl_print_trim(FILE *output, const f_string_t string, const f_array_length_t length) { #ifndef _di_level_1_parameter_checking_ if (!output) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -121,7 +121,7 @@ extern "C" { if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not; - f_string_length_t length = (range.stop - range.start) + 1; + f_array_length_t length = (range.stop - range.start) + 1; if (length + range.start > buffer.used) { length = buffer.used - range.start; @@ -132,7 +132,7 @@ extern "C" { #endif // _di_fl_print_trim_dynamic_partial_ #ifndef _di_fl_print_trim_utf_ - f_status_t fl_print_trim_utf(FILE *output, const f_utf_string_t string, const f_string_length_t length) { + f_status_t fl_print_trim_utf(FILE *output, const f_utf_string_t string, const f_array_length_t length) { #ifndef _di_level_1_parameter_checking_ if (!output) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -163,7 +163,7 @@ extern "C" { if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not; - f_string_length_t length = (range.stop - range.start) + 1; + f_array_length_t length = (range.stop - range.start) + 1; if (length + range.start > buffer.used) { length = buffer.used - range.start; diff --git a/level_1/fl_print/c/print.h b/level_1/fl_print/c/print.h index ed4129b..30bd721 100644 --- a/level_1/fl_print/c/print.h +++ b/level_1/fl_print/c/print.h @@ -54,7 +54,7 @@ extern "C" { * Errors (with error bit) from: f_utf_is_whitespace(). */ #ifndef _di_fl_print_trim_except_ - extern f_status_t fl_print_trim_except(FILE *output, const f_string_t string, const f_string_length_t length, const f_string_lengths_t except); + extern f_status_t fl_print_trim_except(FILE *output, const f_string_t string, const f_array_length_t length, const f_array_lengths_t except); #endif // _di_fl_print_trim_except_ /** @@ -86,7 +86,7 @@ extern "C" { * Errors (with error bit) from: f_utf_is_whitespace(). */ #ifndef _di_fl_print_trim_except_dynamic_ - extern f_status_t fl_print_trim_except_dynamic(FILE *output, const f_string_static_t buffer, const f_string_lengths_t except); + extern f_status_t fl_print_trim_except_dynamic(FILE *output, const f_string_static_t buffer, const f_array_lengths_t except); #endif // _di_fl_print_trim_except_dynamic_ /** @@ -120,7 +120,7 @@ extern "C" { * Errors (with error bit) from: f_utf_is_whitespace(). */ #ifndef _di_fl_print_trim_except_dynamic_partial_ - extern f_status_t fl_print_trim_except_dynamic_partial(FILE *output, const f_string_static_t buffer, const f_string_range_t range, const f_string_lengths_t except); + extern f_status_t fl_print_trim_except_dynamic_partial(FILE *output, const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except); #endif // _di_fl_print_trim_except_dynamic_partial_ /** @@ -153,7 +153,7 @@ extern "C" { * Errors (with error bit) from: f_utf_character_is_whitespace(). */ #ifndef _di_fl_print_trim_except_utf_ - extern f_status_t fl_print_trim_except_utf(FILE *output, const f_utf_string_t string, const f_string_length_t length, const f_string_lengths_t except); + extern f_status_t fl_print_trim_except_utf(FILE *output, const f_utf_string_t string, const f_array_length_t length, const f_array_lengths_t except); #endif // _di_fl_print_trim_except_utf_ /** @@ -185,7 +185,7 @@ extern "C" { * Errors (with error bit) from: f_utf_character_is_whitespace(). */ #ifndef _di_fl_print_trim_except_utf_dynamic_ - extern f_status_t fl_print_trim_except_utf_dynamic(FILE *output, const f_utf_string_static_t buffer, const f_string_lengths_t except); + extern f_status_t fl_print_trim_except_utf_dynamic(FILE *output, const f_utf_string_static_t buffer, const f_array_lengths_t except); #endif // _di_fl_print_trim_except_utf_dynamic_ /** @@ -219,7 +219,7 @@ extern "C" { * Errors (with error bit) from: f_utf_character_is_whitespace(). */ #ifndef _di_fl_print_trim_except_utf_dynamic_partial_ - extern f_status_t fl_print_trim_except_utf_dynamic_partial(FILE *output, const f_utf_string_static_t buffer, const f_utf_string_range_t range, const f_string_lengths_t except); + extern f_status_t fl_print_trim_except_utf_dynamic_partial(FILE *output, const f_utf_string_static_t buffer, const f_utf_string_range_t range, const f_array_lengths_t except); #endif // _di_fl_print_trim_except_utf_dynamic_partial_ /** @@ -248,7 +248,7 @@ extern "C" { * Errors (with error bit) from: f_utf_is_whitespace(). */ #ifndef _di_fl_print_trim_ - extern f_status_t fl_print_trim(FILE *output, const f_string_t string, const f_string_length_t length); + extern f_status_t fl_print_trim(FILE *output, const f_string_t string, const f_array_length_t length); #endif // _di_fl_print_trim_ /** @@ -335,7 +335,7 @@ extern "C" { * Errors (with error bit) from: f_utf_character_is_whitespace(). */ #ifndef _di_fl_print_trim_utf_ - extern f_status_t fl_print_trim_utf(FILE *output, const f_utf_string_t string, const f_string_length_t length); + extern f_status_t fl_print_trim_utf(FILE *output, const f_utf_string_t string, const f_array_length_t length); #endif // _di_fl_print_trim_utf_ /** diff --git a/level_1/fl_print/c/private-print.c b/level_1/fl_print/c/private-print.c index e4428ef..13df33d 100644 --- a/level_1/fl_print/c/private-print.c +++ b/level_1/fl_print/c/private-print.c @@ -6,12 +6,12 @@ extern "C" { #endif #if !defined(_di_fl_print_trim_except_) || !defined(_di_fl_print_trim_except_dynamic_) || !defined(_di_fl_print_trim_except_dynamic_partial_) - f_status_t private_fl_print_trim_except(FILE *output, const f_string_t string, const f_string_length_t start, const f_string_length_t stop, const f_string_lengths_t except) { - register f_string_length_t i = start; + f_status_t private_fl_print_trim_except(FILE *output, const f_string_t string, const f_array_length_t start, const f_array_length_t stop, const f_array_lengths_t except) { + register f_array_length_t i = start; - f_string_length_t j = 0; - f_string_length_t e = 0; - f_string_length_t ej = 0; + f_array_length_t j = 0; + f_array_length_t e = 0; + f_array_length_t ej = 0; f_status_t status = F_none; uint8_t width_max = 0; @@ -129,12 +129,12 @@ extern "C" { #endif // !defined(_di_fl_print_trim_except_) || !defined(_di_fl_print_trim_except_dynamic_) || !defined(_di_fl_print_trim_except_dynamic_partial_) #if !defined(_di_fl_print_trim_except_utf_) || !defined(_di_fl_print_trim_except_utf_dynamic_) || !defined(_di_fl_print_trim_except_utf_dynamic_partial_) - f_status_t private_fl_print_trim_except_utf(FILE *output, const f_utf_string_t string, const f_string_length_t start, const f_string_length_t stop, const f_string_lengths_t except) { - register f_string_length_t i = start; + f_status_t private_fl_print_trim_except_utf(FILE *output, const f_utf_string_t string, const f_array_length_t start, const f_array_length_t stop, const f_array_lengths_t except) { + register f_array_length_t i = start; - f_string_length_t j = 0; - f_string_length_t e = 0; - f_string_length_t ej = 0; + f_array_length_t j = 0; + f_array_length_t e = 0; + f_array_length_t ej = 0; f_status_t status = F_none; @@ -230,10 +230,10 @@ extern "C" { #endif // !defined(_di_fl_print_trim_except_utf_) || !defined(_di_fl_print_trim_except_utf_dynamic_) || !defined(_di_fl_print_trim_except_utf_dynamic_partial_) #if !defined(_di_fl_print_trim_) || !defined(_di_fl_print_trim_dynamic_) || !defined(_di_fl_print_trim_dynamic_partial_) - f_status_t private_fl_print_trim(FILE *output, const f_string_t string, const f_string_length_t length) { - register f_string_length_t i = 0; + f_status_t private_fl_print_trim(FILE *output, const f_string_t string, const f_array_length_t length) { + register f_array_length_t i = 0; - f_string_length_t j = 0; + f_array_length_t j = 0; f_status_t status = F_none; uint8_t width_max = 0; @@ -308,10 +308,10 @@ extern "C" { #endif // !defined(_di_fl_print_trim_) || !defined(_di_fl_print_trim_dynamic_) || !defined(_di_fl_print_trim_dynamic_partial_) #if !defined(_di_fl_print_trim_utf_) || !defined(_di_fl_print_trim_utf_dynamic_) || !defined(_di_fl_print_trim_utf_dynamic_partial_) - f_status_t private_fl_print_trim_utf(FILE *output, const f_utf_string_t string, const f_string_length_t length) { - register f_string_length_t i = 0; + f_status_t private_fl_print_trim_utf(FILE *output, const f_utf_string_t string, const f_array_length_t length) { + register f_array_length_t i = 0; - f_string_length_t j = 0; + f_array_length_t j = 0; f_status_t status = F_none; diff --git a/level_1/fl_print/c/private-print.h b/level_1/fl_print/c/private-print.h index 56f5387..d5c7a4b 100644 --- a/level_1/fl_print/c/private-print.h +++ b/level_1/fl_print/c/private-print.h @@ -47,7 +47,7 @@ extern "C" { * @see fl_print_trim_except_dynamic_partial() */ #if !defined(_di_fl_print_trim_except_) || !defined(_di_fl_print_trim_except_dynamic_) || !defined(_di_fl_print_trim_except_dynamic_partial_) - extern f_status_t private_fl_print_trim_except(FILE *output, const f_string_t string, const f_string_length_t start, const f_string_length_t stop, const f_string_lengths_t except) f_gcc_attribute_visibility_internal; + extern f_status_t private_fl_print_trim_except(FILE *output, const f_string_t string, const f_array_length_t start, const f_array_length_t stop, const f_array_lengths_t except) f_gcc_attribute_visibility_internal; #endif // !defined(_di_fl_print_trim_except_) || !defined(_di_fl_print_trim_except_dynamic_) || !defined(_di_fl_print_trim_except_dynamic_partial_) /** @@ -82,7 +82,7 @@ extern "C" { * @see fl_print_trim_except_utf_dynamic_partial() */ #if !defined(_di_fl_print_trim_except_utf_) || !defined(_di_fl_print_trim_except_utf_dynamic_) || !defined(_di_fl_print_trim_except_utf_dynamic_partial_) - extern f_status_t private_fl_print_trim_except_utf(FILE *output, const f_utf_string_t string, const f_string_length_t start, const f_string_length_t stop, const f_string_lengths_t except) f_gcc_attribute_visibility_internal; + extern f_status_t private_fl_print_trim_except_utf(FILE *output, const f_utf_string_t string, const f_array_length_t start, const f_array_length_t stop, const f_array_lengths_t except) f_gcc_attribute_visibility_internal; #endif // !defined(_di_fl_print_trim_except_utf_) || !defined(_di_fl_print_trim_except_utf_dynamic_) || !defined(_di_fl_print_trim_except_utf_dynamic_partial_) /** @@ -112,7 +112,7 @@ extern "C" { * @see fl_print_trim_dynamic_partial() */ #if !defined(_di_fl_print_trim_) || !defined(_di_fl_print_trim_dynamic_) || !defined(_di_fl_print_trim_dynamic_partial_) - extern f_status_t private_fl_print_trim(FILE *output, const f_string_t string, const f_string_length_t length) f_gcc_attribute_visibility_internal; + extern f_status_t private_fl_print_trim(FILE *output, const f_string_t string, const f_array_length_t length) f_gcc_attribute_visibility_internal; #endif // !defined(_di_fl_print_trim_) || !defined(_di_fl_print_trim_dynamic_) || !defined(_di_fl_print_trim_dynamic_partial_) /** @@ -142,7 +142,7 @@ extern "C" { * @see fl_print_trim_utf_dynamic_partial() */ #if !defined(_di_fl_print_trim_utf_) || !defined(_di_fl_print_trim_utf_dynamic_) || !defined(_di_fl_print_trim_utf_dynamic_partial_) - extern f_status_t private_fl_print_trim_utf(FILE *output, const f_utf_string_t string, const f_string_length_t length) f_gcc_attribute_visibility_internal; + extern f_status_t private_fl_print_trim_utf(FILE *output, const f_utf_string_t string, const f_array_length_t length) f_gcc_attribute_visibility_internal; #endif // !defined(_di_fl_print_trim_utf_) || !defined(_di_fl_print_trim_utf_dynamic_) || !defined(_di_fl_print_trim_utf_dynamic_partial_) #ifdef __cplusplus diff --git a/level_1/fl_string/c/private-string.c b/level_1/fl_string/c/private-string.c index 5bc1995..2a9ba11 100644 --- a/level_1/fl_string/c/private-string.c +++ b/level_1/fl_string/c/private-string.c @@ -6,9 +6,9 @@ extern "C" { #endif #if !defined(_di_fl_string_compare_) || !defined(_di_fl_string_dynamic_compare_) || !defined(_di_fl_string_dynamic_partial_compare_) - f_status_t private_fl_string_compare(const f_string_t string1, const f_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2) { - f_string_length_t i1 = offset1; - f_string_length_t i2 = offset2; + f_status_t private_fl_string_compare(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) { + f_array_length_t i1 = offset1; + f_array_length_t i2 = offset2; for (; i1 < stop1 && i2 < stop2; i1++, i2++) { @@ -37,12 +37,12 @@ extern "C" { #endif // !defined(_di_fl_string_compare_) || !defined(_di_fl_string_dynamic_compare_) || !defined(_di_fl_string_dynamic_partial_compare_) #if !defined(_di_fl_string_compare_except_) || !defined(_di_fl_string_dynamic_compare_except_) || !defined(_di_fl_string_dynamic_partial_compare_except_) - f_status_t private_fl_string_compare_except(const f_string_t string1, const f_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2, const f_string_lengths_t except1, const f_string_lengths_t except2) { - f_string_length_t i1 = offset1; - f_string_length_t i2 = offset2; + f_status_t private_fl_string_compare_except(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2, const f_array_lengths_t except1, const f_array_lengths_t except2) { + f_array_length_t i1 = offset1; + f_array_length_t i2 = offset2; - f_string_length_t e1 = 0; - f_string_length_t e2 = 0; + f_array_length_t e1 = 0; + f_array_length_t e2 = 0; while (i1 < stop1 && i2 < stop2) { @@ -98,12 +98,12 @@ extern "C" { #endif // !defined(_di_fl_string_compare_except_) || !defined(_di_fl_string_dynamic_compare_except_) || !defined(_di_fl_string_dynamic_partial_compare_except_) #if !defined(_di_fl_string_compare_except_trim_) || !defined(_di_fl_string_dynamic_compare_except_trim_) || !defined(_di_fl_string_dynamic_partial_compare_except_trim_) - f_status_t private_fl_string_compare_except_trim(const f_string_t string1, const f_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2, const f_string_lengths_t except1, const f_string_lengths_t except2) { - f_string_length_t i1 = offset1; - f_string_length_t i2 = offset2; + f_status_t private_fl_string_compare_except_trim(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2, const f_array_lengths_t except1, const f_array_lengths_t except2) { + f_array_length_t i1 = offset1; + f_array_length_t i2 = offset2; - f_string_length_t e1 = 0; - f_string_length_t e2 = 0; + f_array_length_t e1 = 0; + f_array_length_t e2 = 0; uint8_t width = 0; uint8_t width_max = 0; @@ -170,16 +170,16 @@ extern "C" { width = f_macro_utf_byte_width(string2[i2]); } // for - f_string_length_t last1 = i1; - f_string_length_t last2 = i2; + f_array_length_t last1 = i1; + f_array_length_t last2 = i2; { // size1 and size2 are to represent to total number of characters after trim that are not ignored via "except". - f_string_length_t size1 = 0; - f_string_length_t size2 = 0; + f_array_length_t size1 = 0; + f_array_length_t size2 = 0; - f_string_length_t j = 0; - f_string_length_t ej = e1; + f_array_length_t j = 0; + f_array_length_t ej = e1; // determine where the last non-whitespace is in string1. for (j = i1; j < stop1; j += width) { @@ -312,9 +312,9 @@ extern "C" { #endif // !defined(_di_fl_string_compare_except_trim_) || !defined(_di_fl_string_dynamic_compare_except_trim_) || !defined(_di_fl_string_dynamic_partial_compare_except_trim_) #if !defined(_di_fl_string_compare_trim_) || !defined(_di_fl_string_dynamic_compare_trim_) || !defined(_di_fl_string_dynamic_partial_compare_trim_) - f_status_t private_fl_string_compare_trim(const f_string_t string1, const f_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2) { - f_string_length_t i1 = offset1; - f_string_length_t i2 = offset2; + f_status_t private_fl_string_compare_trim(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) { + f_array_length_t i1 = offset1; + f_array_length_t i2 = offset2; uint8_t width = 0; uint8_t width_max = 0; @@ -366,16 +366,16 @@ extern "C" { width = f_macro_utf_byte_width(string2[i2]); } // for - f_string_length_t last1 = i1; - f_string_length_t last2 = i2; + f_array_length_t last1 = i1; + f_array_length_t last2 = i2; { // size1 and size2 are to represent to total number of characters after trim. - f_string_length_t size1 = 0; - f_string_length_t size2 = 0; + f_array_length_t size1 = 0; + f_array_length_t size2 = 0; // determine where the last non-whitespace is in string1. - for (f_string_length_t j = i1; j < stop1; j += width) { + for (f_array_length_t j = i1; j < stop1; j += width) { // skip past NULL in string1. while (j < stop1 && !string1[j]) j++; @@ -401,7 +401,7 @@ extern "C" { } // for // determine where the last non-whitespace is in string2. - for (f_string_length_t j = i2; j < stop2; j += width) { + for (f_array_length_t j = i2; j < stop2; j += width) { // skip past NULL in string2. while (j < stop2 && !string2[j]) j++; @@ -458,8 +458,8 @@ extern "C" { #endif // !defined(_di_fl_string_compare_trim_) || !defined(_di_fl_string_dynamic_compare_trim_) || !defined(_di_fl_string_dynamic_partial_compare_trim_) #if !defined(_di_fl_string_rip_) || !defined(_di_fl_string_dynamic_rip_) || !defined(_di_fl_string_rip_nulless_) || !defined(_di_fl_string_dynamic_rip_nulless_) - f_status_t private_fl_string_rip_find_range(const f_string_t source, f_string_length_t *start, f_string_length_t *stop) { - const f_string_length_t stop_original = *stop; + f_status_t private_fl_string_rip_find_range(const f_string_t source, f_array_length_t *start, f_array_length_t *stop) { + const f_array_length_t stop_original = *stop; f_status_t status = F_none; diff --git a/level_1/fl_string/c/private-string.h b/level_1/fl_string/c/private-string.h index bc4ba0f..9fa2af5 100644 --- a/level_1/fl_string/c/private-string.h +++ b/level_1/fl_string/c/private-string.h @@ -42,7 +42,7 @@ extern "C" { * @see fl_string_dynamic_partial_compare() */ #if !defined(_di_fl_string_compare_) || !defined(_di_fl_string_dynamic_compare_) || !defined(_di_fl_string_dynamic_partial_compare_) - extern f_status_t private_fl_string_compare(const f_string_t string1, const f_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2) f_gcc_attribute_visibility_internal; + extern f_status_t private_fl_string_compare(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) f_gcc_attribute_visibility_internal; #endif // !defined(_di_fl_string_compare_) || !defined(_di_fl_string_dynamic_compare_) || !defined(_di_fl_string_dynamic_partial_compare_) /** @@ -78,7 +78,7 @@ extern "C" { * @see fl_string_dynamic_partial_compare_except() */ #if !defined(_di_fl_string_compare_except_) || !defined(_di_fl_string_dynamic_compare_except_) || !defined(_di_fl_string_dynamic_partial_compare_except_) - extern f_status_t private_fl_string_compare_except(const f_string_t string1, const f_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2, const f_string_lengths_t except1, const f_string_lengths_t except2) f_gcc_attribute_visibility_internal; + extern f_status_t private_fl_string_compare_except(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2, const f_array_lengths_t except1, const f_array_lengths_t except2) f_gcc_attribute_visibility_internal; #endif // !defined(_di_fl_string_compare_except_) || !defined(_di_fl_string_dynamic_compare_except_) || !defined(_di_fl_string_dynamic_partial_compare_except_) /** @@ -118,7 +118,7 @@ extern "C" { * @see fl_string_dynamic_partial_compare_except_trim() */ #if !defined(_di_fl_string_compare_except_trim_) || !defined(_di_fl_string_dynamic_compare_except_trim_) || !defined(_di_fl_string_dynamic_partial_compare_except_trim_) - extern f_status_t private_fl_string_compare_except_trim(const f_string_t string1, const f_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2, const f_string_lengths_t except1, const f_string_lengths_t except2) f_gcc_attribute_visibility_internal; + extern f_status_t private_fl_string_compare_except_trim(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2, const f_array_lengths_t except1, const f_array_lengths_t except2) f_gcc_attribute_visibility_internal; #endif // !defined(_di_fl_string_compare_except_trim_) || !defined(_di_fl_string_dynamic_compare_except_trim_) || !defined(_di_fl_string_dynamic_partial_compare_except_trim_) /** @@ -152,7 +152,7 @@ extern "C" { * @see fl_string_dynamic_partial_compare_trim() */ #if !defined(_di_fl_string_compare_trim_) || !defined(_di_fl_string_dynamic_compare_trim_) || !defined(_di_fl_string_dynamic_partial_compare_trim_) - extern f_status_t private_fl_string_compare_trim(const f_string_t string1, const f_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2) f_gcc_attribute_visibility_internal; + extern f_status_t private_fl_string_compare_trim(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) f_gcc_attribute_visibility_internal; #endif // !defined(_di_fl_string_compare_trim_) || !defined(_di_fl_string_dynamic_compare_trim_) || !defined(_di_fl_string_dynamic_partial_compare_trim_) /** @@ -183,7 +183,7 @@ extern "C" { * @see fl_string_dynamic_rip_nulless() */ #if !defined(_di_fl_string_rip_) || !defined(_di_fl_string_dynamic_rip_) || !defined(_di_fl_string_rip_nulless_) || !defined(_di_fl_string_dynamic_rip_nulless_) - extern f_status_t private_fl_string_rip_find_range(const f_string_t source, f_string_length_t *start, f_string_length_t *stop) f_gcc_attribute_visibility_internal; + extern f_status_t private_fl_string_rip_find_range(const f_string_t source, f_array_length_t *start, f_array_length_t *stop) f_gcc_attribute_visibility_internal; #endif // !defined(_di_fl_string_rip_) || !defined(_di_fl_string_dynamic_rip_) || !defined(_di_fl_string_rip_nulless_) || !defined(_di_fl_string_dynamic_rip_nulless_) #ifdef __cplusplus diff --git a/level_1/fl_string/c/string.c b/level_1/fl_string/c/string.c index 585d299..c30ee47 100644 --- a/level_1/fl_string/c/string.c +++ b/level_1/fl_string/c/string.c @@ -6,25 +6,25 @@ extern "C" { #endif #ifndef _di_fl_string_compare_ - f_status_t fl_string_compare(const f_string_t string1, const f_string_t string2, const f_string_length_t length1, const f_string_length_t length2) { + f_status_t fl_string_compare(const f_string_t string1, const f_string_t string2, const f_array_length_t length1, const f_array_length_t length2) { return private_fl_string_compare(string1, string2, 0, 0, length1, length2); } #endif // _di_fl_string_compare_ #ifndef _di_fl_string_compare_except_ - f_status_t fl_string_compare_except(const f_string_t string1, const f_string_t string2, const f_string_length_t length1, const f_string_length_t length2, const f_string_lengths_t except1, const f_string_lengths_t except2) { + f_status_t fl_string_compare_except(const f_string_t string1, const f_string_t string2, const f_array_length_t length1, const f_array_length_t length2, const f_array_lengths_t except1, const f_array_lengths_t except2) { return private_fl_string_compare_except(string1, string2, 0, 0, length1, length2, except1, except2); } #endif // _di_fl_string_compare_except_ #ifndef _di_fl_string_compare_except_trim_ - f_status_t fl_string_compare_except_trim(const f_string_t string1, const f_string_t string2, const f_string_length_t length1, const f_string_length_t length2, const f_string_lengths_t except1, const f_string_lengths_t except2) { + f_status_t fl_string_compare_except_trim(const f_string_t string1, const f_string_t string2, const f_array_length_t length1, const f_array_length_t length2, const f_array_lengths_t except1, const f_array_lengths_t except2) { return private_fl_string_compare_except_trim(string1, string2, 0, 0, length1, length2, except1, except2); } #endif // _di_fl_string_compare_except_trim_ #ifndef _di_fl_string_compare_trim_ - f_status_t fl_string_compare_trim(const f_string_t string1, const f_string_t string2, const f_string_length_t length1, const f_string_length_t length2) { + f_status_t fl_string_compare_trim(const f_string_t string1, const f_string_t string2, const f_array_length_t length1, const f_array_length_t length2) { return private_fl_string_compare_trim(string1, string2, 0, 0, length1, length2); } #endif // _di_fl_string_compare_trim_ @@ -36,31 +36,31 @@ extern "C" { #endif // _di_fl_string_dynamic_compare_ #ifndef _di_fl_string_dynamic_compare_except_ - f_status_t fl_string_dynamic_compare_except(const f_string_static_t string1, const f_string_static_t string2, const f_string_lengths_t except1, const f_string_lengths_t except2) { + f_status_t fl_string_dynamic_compare_except(const f_string_static_t string1, const f_string_static_t string2, const f_array_lengths_t except1, const f_array_lengths_t except2) { return private_fl_string_compare_except(string1.string, string2.string, 0, 0, string1.used, string2.used, except1, except2); } #endif // _di_fl_string_dynamic_compare_except_ #ifndef _di_fl_string_dynamic_compare_except_string_ - f_status_t fl_string_dynamic_compare_except_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_lengths_t except1, const f_string_lengths_t except2) { + f_status_t fl_string_dynamic_compare_except_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_array_lengths_t except1, const f_array_lengths_t except2) { return private_fl_string_compare_except(string1, string2.string, 0, 0, length1, string2.used, except1, except2); } #endif // _di_fl_string_dynamic_compare_except_string_ #ifndef _di_fl_string_dynamic_compare_except_trim_ - f_status_t fl_string_dynamic_compare_except_trim(const f_string_static_t string1, const f_string_static_t string2, const f_string_lengths_t except1, const f_string_lengths_t except2) { + f_status_t fl_string_dynamic_compare_except_trim(const f_string_static_t string1, const f_string_static_t string2, const f_array_lengths_t except1, const f_array_lengths_t except2) { return private_fl_string_compare_except_trim(string1.string, string2.string, 0, 0, string1.used, string2.used, except1, except2); } #endif // _di_fl_string_dynamic_compare_except_trim_ #ifndef _di_fl_string_dynamic_compare_except_trim_string_ - f_status_t fl_string_dynamic_compare_except_trim_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_lengths_t except1, const f_string_lengths_t except2) { + f_status_t fl_string_dynamic_compare_except_trim_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_array_lengths_t except1, const f_array_lengths_t except2) { return private_fl_string_compare_except_trim(string1, string2.string, 0, 0, length1, string2.used, except1, except2); } #endif // _di_fl_string_dynamic_compare_except_trim_string_ #ifndef _di_fl_string_dynamic_compare_string_ - f_status_t fl_string_dynamic_compare_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1) { + f_status_t fl_string_dynamic_compare_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1) { return private_fl_string_compare(string1, string2.string, 0, 0, length1, string2.used); } #endif // _di_fl_string_dynamic_compare_string_ @@ -72,7 +72,7 @@ extern "C" { #endif // _di_fl_string_dynamic_compare_trim_ #ifndef _di_fl_string_dynamic_compare_trim_string_ - f_status_t fl_string_dynamic_compare_trim_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1) { + f_status_t fl_string_dynamic_compare_trim_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1) { return private_fl_string_compare_trim(string1, string2.string, 0, 0, length1, string2.used); } #endif // _di_fl_string_dynamic_compare_trim_string_ @@ -99,7 +99,7 @@ extern "C" { #endif // _di_fl_string_dynamic_partial_compare_dynamic_ #ifndef _di_fl_string_dynamic_partial_compare_string_ - f_status_t fl_string_dynamic_partial_compare_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_range_t range2) { + f_status_t fl_string_dynamic_partial_compare_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_string_range_t range2) { #ifndef _di_level_1_parameter_checking_ if (string2.used <= range2.stop) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -109,7 +109,7 @@ extern "C" { #endif // _di_fl_string_dynamic_partial_compare_string_ #ifndef _di_fl_string_dynamic_partial_compare_except_ - f_status_t fl_string_dynamic_partial_compare_except(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range1, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2) { + f_status_t fl_string_dynamic_partial_compare_except(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range1, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2) { #ifndef _di_level_1_parameter_checking_ if (string1.used <= range1.stop) return F_status_set_error(F_parameter); if (string2.used <= range2.stop) return F_status_set_error(F_parameter); @@ -120,7 +120,7 @@ extern "C" { #endif // _di_fl_string_dynamic_partial_compare_except_ #ifndef _di_fl_string_dynamic_partial_compare_except_dynamic_ - f_status_t fl_string_dynamic_partial_compare_except_dynamic(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2) { + f_status_t fl_string_dynamic_partial_compare_except_dynamic(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2) { #ifndef _di_level_1_parameter_checking_ if (string2.used <= range2.stop) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -130,7 +130,7 @@ extern "C" { #endif // _di_fl_string_dynamic_partial_compare_except_dynamic_ #ifndef _di_fl_string_dynamic_partial_compare_except_string_ - f_status_t fl_string_dynamic_partial_compare_except_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2) { + f_status_t fl_string_dynamic_partial_compare_except_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2) { #ifndef _di_level_1_parameter_checking_ if (string2.used <= range2.stop) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -140,7 +140,7 @@ extern "C" { #endif // _di_fl_string_dynamic_partial_compare_except_string_ #ifndef _di_fl_string_dynamic_partial_compare_except_trim_ - f_status_t fl_string_dynamic_partial_compare_except_trim(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range1, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2) { + f_status_t fl_string_dynamic_partial_compare_except_trim(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range1, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2) { #ifndef _di_level_1_parameter_checking_ if (string1.used <= range1.stop) return F_status_set_error(F_parameter); if (string2.used <= range2.stop) return F_status_set_error(F_parameter); @@ -151,7 +151,7 @@ extern "C" { #endif // _di_fl_string_dynamic_partial_compare_except_trim_ #ifndef _di_fl_string_dynamic_partial_compare_except_trim_dynamic_ - f_status_t fl_string_dynamic_partial_compare_except_trim_dynamic(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2) { + f_status_t fl_string_dynamic_partial_compare_except_trim_dynamic(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2) { #ifndef _di_level_1_parameter_checking_ if (string2.used <= range2.stop) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -161,7 +161,7 @@ extern "C" { #endif // _di_fl_string_dynamic_partial_compare_except_trim_dynamic_ #ifndef _di_fl_string_dynamic_partial_compare_except_trim_string_ - f_status_t fl_string_dynamic_partial_compare_except_trim_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2) { + f_status_t fl_string_dynamic_partial_compare_except_trim_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2) { #ifndef _di_level_1_parameter_checking_ if (string2.used <= range2.stop) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -192,7 +192,7 @@ extern "C" { #endif // _di_fl_string_dynamic_partial_compare_trim_dynamic_ #ifndef _di_fl_string_dynamic_partial_compare_trim_string_ - f_status_t fl_string_dynamic_partial_compare_trim_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_range_t range2) { + f_status_t fl_string_dynamic_partial_compare_trim_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_string_range_t range2) { #ifndef _di_level_1_parameter_checking_ if (string2.used <= range2.stop) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -212,8 +212,8 @@ extern "C" { if (!source.used) return F_data_not_eos; - f_string_length_t begin = range.start; - f_string_length_t end = range.stop; + f_array_length_t begin = range.start; + f_array_length_t end = range.stop; const f_status_t status = private_fl_string_rip_find_range(source.string, &begin, &end); @@ -238,8 +238,8 @@ extern "C" { if (!source.used) return F_data_not_eos; - f_string_length_t begin = range.start; - f_string_length_t end = range.stop; + f_array_length_t begin = range.start; + f_array_length_t end = range.stop; const f_status_t status = private_fl_string_rip_find_range(source.string, &begin, &end); @@ -268,7 +268,7 @@ extern "C" { unsigned short width = 0; - f_string_length_t width_max = 0; + f_array_length_t width_max = 0; while (range->start <= range->stop) { width_max = (range->stop - range->start) + 1; @@ -321,7 +321,7 @@ extern "C" { f_status_t status = F_none; unsigned short width = 0; - f_string_length_t width_max = (range->stop - range->start) + 1; + f_array_length_t width_max = (range->stop - range->start) + 1; while (string[range->start] == placeholder || (status = f_utf_is_graph(string + range->start, width_max)) == F_false) { @@ -366,7 +366,7 @@ extern "C" { f_status_t status = F_none; unsigned short width = 0; - f_string_length_t width_max = (range->stop - range->start) + 1; + f_array_length_t width_max = (range->stop - range->start) + 1; while (string[range->start] == placeholder || (status = f_utf_is_whitespace(string + range->start, width_max)) == F_false) { if (F_status_is_error(status)) return status; @@ -413,7 +413,7 @@ extern "C" { unsigned short width = 0; - f_string_length_t width_max = 0; + f_array_length_t width_max = 0; while (range->start <= range->stop) { width_max = (range->stop - range->start) + 1; @@ -452,15 +452,15 @@ extern "C" { #endif // _di_fl_string_dynamic_seek_to_utf_character_ #ifndef _di_fl_string_rip_ - f_status_t fl_string_rip(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) { + f_status_t fl_string_rip(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ if (!length) return F_data_not_eos; - f_string_length_t begin = 0; - f_string_length_t end = length - 1; + f_array_length_t begin = 0; + f_array_length_t end = length - 1; const f_status_t status = private_fl_string_rip_find_range(source, &begin, &end); @@ -472,15 +472,15 @@ extern "C" { #endif // _di_fl_string_rip_ #ifndef _di_fl_string_rip_nulless_ - f_status_t fl_string_rip_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) { + f_status_t fl_string_rip_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ if (!length) return F_data_not_eos; - f_string_length_t begin = 0; - f_string_length_t end = length - 1; + f_array_length_t begin = 0; + f_array_length_t end = length - 1; const f_status_t status = private_fl_string_rip_find_range(source, &begin, &end); @@ -505,7 +505,7 @@ extern "C" { unsigned short width = 0; - f_string_length_t width_max = (range->stop - range->start) + 1; + f_array_length_t width_max = (range->stop - range->start) + 1; for (; range->start <= range->stop; range->start += width) { width_max = (range->stop - range->start) + 1; @@ -553,7 +553,7 @@ extern "C" { f_status_t status = F_none; unsigned short width = 0; - f_string_length_t width_max = (range->stop - range->start) + 1; + f_array_length_t width_max = (range->stop - range->start) + 1; while (string[range->start] == placeholder || (status = f_utf_is_graph(string + range->start, width_max)) == F_false) { if (F_status_is_error(status)) return status; @@ -596,7 +596,7 @@ extern "C" { f_status_t status = F_none; unsigned short width = 0; - f_string_length_t width_max = (range->stop - range->start) + 1; + f_array_length_t width_max = (range->stop - range->start) + 1; while (string[range->start] == placeholder || (status = f_utf_is_whitespace(string + range->start, width_max)) == F_false) { if (F_status_is_error(status)) { @@ -645,7 +645,7 @@ extern "C" { unsigned short width = 0; - f_string_length_t width_max = 0; + f_array_length_t width_max = 0; for (; range->start <= range->stop; range->start += width) { width_max = (range->stop - range->start) + 1; diff --git a/level_1/fl_string/c/string.h b/level_1/fl_string/c/string.h index 1d0b7da..fba9ae4 100644 --- a/level_1/fl_string/c/string.h +++ b/level_1/fl_string/c/string.h @@ -55,7 +55,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_string_compare_ - extern f_status_t fl_string_compare(const f_string_t string1, const f_string_t string2, const f_string_length_t length1, const f_string_length_t length2); + extern f_status_t fl_string_compare(const f_string_t string1, const f_string_t string2, const f_array_length_t length1, const f_array_length_t length2); #endif // _di_fl_string_compare_ /** @@ -86,7 +86,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_string_compare_except_ - extern f_status_t fl_string_compare_except(const f_string_t string1, const f_string_t string2, const f_string_length_t length1, const f_string_length_t length2, const f_string_lengths_t except1, const f_string_lengths_t except2); + extern f_status_t fl_string_compare_except(const f_string_t string1, const f_string_t string2, const f_array_length_t length1, const f_array_length_t length2, const f_array_lengths_t except1, const f_array_lengths_t except2); #endif // _di_fl_string_compare_except_ /** @@ -122,7 +122,7 @@ extern "C" { * @see f_utf_is_whitespace() */ #ifndef _di_fl_string_compare_except_trim_ - extern f_status_t fl_string_compare_except_trim(const f_string_t string1, const f_string_t string2, const f_string_length_t length1, const f_string_length_t length2, const f_string_lengths_t except1, const f_string_lengths_t except2); + extern f_status_t fl_string_compare_except_trim(const f_string_t string1, const f_string_t string2, const f_array_length_t length1, const f_array_length_t length2, const f_array_lengths_t except1, const f_array_lengths_t except2); #endif // _di_fl_string_compare_except_trim_ /** @@ -151,7 +151,7 @@ extern "C" { * @see f_utf_is_whitespace() */ #ifndef _di_fl_string_compare_trim_ - extern f_status_t fl_string_compare_trim(const f_string_t string1, const f_string_t string2, const f_string_length_t length1, const f_string_length_t length2); + extern f_status_t fl_string_compare_trim(const f_string_t string1, const f_string_t string2, const f_array_length_t length1, const f_array_length_t length2); #endif // _di_fl_string_compare_trim_ /** @@ -198,7 +198,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_string_dynamic_compare_except_ - extern f_status_t fl_string_dynamic_compare_except(const f_string_static_t string1, const f_string_static_t string2, const f_string_lengths_t except1, const f_string_lengths_t except2); + extern f_status_t fl_string_dynamic_compare_except(const f_string_static_t string1, const f_string_static_t string2, const f_array_lengths_t except1, const f_array_lengths_t except2); #endif // _di_fl_string_dynamic_compare_except_ /** @@ -234,7 +234,7 @@ extern "C" { * @see f_utf_is_whitespace() */ #ifndef _di_fl_string_dynamic_compare_except_string_ - extern f_status_t fl_string_dynamic_compare_except_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_lengths_t except1, const f_string_lengths_t except2); + extern f_status_t fl_string_dynamic_compare_except_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_array_lengths_t except1, const f_array_lengths_t except2); #endif // _di_fl_string_dynamic_compare_except_string_ /** @@ -266,7 +266,7 @@ extern "C" { * @see f_utf_is_whitespace() */ #ifndef _di_fl_string_dynamic_compare_except_trim_ - extern f_status_t fl_string_dynamic_compare_except_trim(const f_string_static_t string1, const f_string_static_t string2, const f_string_lengths_t except1, const f_string_lengths_t except2); + extern f_status_t fl_string_dynamic_compare_except_trim(const f_string_static_t string1, const f_string_static_t string2, const f_array_lengths_t except1, const f_array_lengths_t except2); #endif // _di_fl_string_dynamic_compare_except_trim_ /** @@ -302,7 +302,7 @@ extern "C" { * @see f_utf_is_whitespace() */ #ifndef _di_fl_string_dynamic_compare_except_trim_string_ - extern f_status_t fl_string_dynamic_compare_except_trim_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_lengths_t except1, const f_string_lengths_t except2); + extern f_status_t fl_string_dynamic_compare_except_trim_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_array_lengths_t except1, const f_array_lengths_t except2); #endif // _di_fl_string_dynamic_compare_except_trim_string_ /** @@ -331,7 +331,7 @@ extern "C" { * @see f_utf_is_whitespace() */ #ifndef _di_fl_string_dynamic_compare_string_ - extern f_status_t fl_string_dynamic_compare_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1); + extern f_status_t fl_string_dynamic_compare_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1); #endif // _di_fl_string_dynamic_compare_string_ /** @@ -385,7 +385,7 @@ extern "C" { * @see f_utf_is_whitespace() */ #ifndef _di_fl_string_dynamic_compare_trim_string_ - extern f_status_t fl_string_dynamic_compare_trim_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1); + extern f_status_t fl_string_dynamic_compare_trim_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1); #endif // _di_fl_string_dynamic_compare_trim_string_ /** @@ -462,7 +462,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_string_dynamic_partial_compare_except_ - extern f_status_t fl_string_dynamic_partial_compare_except(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range1, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2); + extern f_status_t fl_string_dynamic_partial_compare_except(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range1, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2); #endif // _di_fl_string_dynamic_partial_compare_except_ /** @@ -491,7 +491,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_string_dynamic_partial_compare_except_dynamic_ - extern f_status_t fl_string_dynamic_partial_compare_except_dynamic(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2); + extern f_status_t fl_string_dynamic_partial_compare_except_dynamic(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2); #endif // _di_fl_string_dynamic_partial_compare_except_dynamic_ /** @@ -524,7 +524,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_string_dynamic_partial_compare_except_string_ - extern f_status_t fl_string_dynamic_partial_compare_except_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2); + extern f_status_t fl_string_dynamic_partial_compare_except_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2); #endif // _di_fl_string_dynamic_partial_compare_except_string_ /** @@ -560,7 +560,7 @@ extern "C" { * @see f_utf_is_whitespace() */ #ifndef _di_fl_string_dynamic_partial_compare_except_trim_ - extern f_status_t fl_string_dynamic_partial_compare_except_trim(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range1, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2); + extern f_status_t fl_string_dynamic_partial_compare_except_trim(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range1, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2); #endif // _di_fl_string_dynamic_partial_compare_except_trim_ /** @@ -594,7 +594,7 @@ extern "C" { * @see f_utf_is_whitespace() */ #ifndef _di_fl_string_dynamic_partial_compare_except_trim_dynamic_ - extern f_status_t fl_string_dynamic_partial_compare_except_trim_dynamic(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2); + extern f_status_t fl_string_dynamic_partial_compare_except_trim_dynamic(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2); #endif // _di_fl_string_dynamic_partial_compare_except_trim_dynamic_ /** @@ -632,7 +632,7 @@ extern "C" { * @see f_utf_is_whitespace() */ #ifndef _di_fl_string_dynamic_partial_compare_except_trim_string_ - extern f_status_t fl_string_dynamic_partial_compare_except_trim_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2); + extern f_status_t fl_string_dynamic_partial_compare_except_trim_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2); #endif // _di_fl_string_dynamic_partial_compare_except_trim_string_ /** @@ -658,7 +658,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_string_dynamic_partial_compare_string_ - extern f_status_t fl_string_dynamic_partial_compare_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_range_t range2); + extern f_status_t fl_string_dynamic_partial_compare_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_string_range_t range2); #endif // _di_fl_string_dynamic_partial_compare_string_ /** @@ -716,7 +716,7 @@ extern "C" { * @see f_utf_is_whitespace() */ #ifndef _di_fl_string_dynamic_partial_compare_trim_string_ - extern f_status_t fl_string_dynamic_partial_compare_trim_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_range_t range2); + extern f_status_t fl_string_dynamic_partial_compare_trim_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_string_range_t range2); #endif // _di_fl_string_dynamic_partial_compare_trim_string_ /** @@ -914,7 +914,7 @@ extern "C" { * @see f_utf_is_whitespace() */ #ifndef _di_fl_string_rip_ - extern f_status_t fl_string_rip(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination); + extern f_status_t fl_string_rip(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination); #endif // _di_fl_string_rip_ /** @@ -944,7 +944,7 @@ extern "C" { * @see f_utf_is_whitespace() */ #ifndef _di_fl_string_rip_nulless_ - extern f_status_t fl_string_rip_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination); + extern f_status_t fl_string_rip_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination); #endif // _di_fl_string_rip_nulless_ /** diff --git a/level_1/fl_utf/c/private-utf.c b/level_1/fl_utf/c/private-utf.c index 368add5..d93b3ac 100644 --- a/level_1/fl_utf/c/private-utf.c +++ b/level_1/fl_utf/c/private-utf.c @@ -6,9 +6,9 @@ extern "C" { #endif #if !defined(_di_fl_utf_string_compare_) || !defined(_di_fl_utf_string_dynamic_compare_) || !defined(_di_fl_utf_string_dynamic_partial_compare_) - f_status_t private_fl_utf_string_compare(const f_utf_string_t string1, const f_utf_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2) { - f_string_length_t i1 = offset1; - f_string_length_t i2 = offset2; + f_status_t private_fl_utf_string_compare(const f_utf_string_t string1, const f_utf_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) { + f_array_length_t i1 = offset1; + f_array_length_t i2 = offset2; for (; i1 < stop1 && i2 < stop2; i1++, i2++) { @@ -37,9 +37,9 @@ extern "C" { #endif // !defined(_di_fl_utf_string_compare_) || !defined(_di_fl_utf_string_dynamic_compare_) || !defined(_di_fl_utf_string_dynamic_partial_compare_) #if !defined(_di_fl_utf_string_compare_trim_) || !defined(_di_fl_utf_string_dynamic_compare_trim_) || !defined(_di_fl_utf_string_dynamic_partial_compare_trim_) - f_status_t private_fl_utf_string_compare_trim(const f_utf_string_t string1, const f_utf_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2) { - f_string_length_t i1 = offset1; - f_string_length_t i2 = offset2; + f_status_t private_fl_utf_string_compare_trim(const f_utf_string_t string1, const f_utf_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) { + f_array_length_t i1 = offset1; + f_array_length_t i2 = offset2; f_status_t status = F_none; @@ -81,16 +81,16 @@ extern "C" { if (status == F_false) break; } // for - f_string_length_t last1 = i1; - f_string_length_t last2 = i2; + f_array_length_t last1 = i1; + f_array_length_t last2 = i2; { // size1 and size2 are to represent to total number of characters after trim. - f_string_length_t size1 = 0; - f_string_length_t size2 = 0; + f_array_length_t size1 = 0; + f_array_length_t size2 = 0; // determine where the last non-whitespace is in string1. - for (f_string_length_t j = i1; j < stop1; j++) { + for (f_array_length_t j = i1; j < stop1; j++) { // skip past NULL in string1. while (j < stop1 && !string1[j]) j++; @@ -112,7 +112,7 @@ extern "C" { } // for // determine where the last non-whitespace is in string2. - for (f_string_length_t j = i2; j < stop2; j++) { + for (f_array_length_t j = i2; j < stop2; j++) { // skip past NULL in string2. while (j < stop2 && !string2[j]) j++; @@ -163,7 +163,7 @@ extern "C" { #endif // !defined(_di_fl_utf_string_compare_trim_) || !defined(_di_fl_utf_string_dynamic_compare_trim_) || !defined(_di_fl_utf_string_dynamic_partial_compare_trim_) #if !defined(_di_fl_utf_string_rip_) || !defined(_di_fl_utf_string_dynamic_rip_) || !defined(_di_fl_utf_string_rip_nulless_) || !defined(_di_fl_utf_string_dynamic_rip_nulless_) - f_status_t private_fl_utf_string_rip_find_range(const f_utf_string_t source, f_string_length_t *start, f_string_length_t *stop) { + f_status_t private_fl_utf_string_rip_find_range(const f_utf_string_t source, f_array_length_t *start, f_array_length_t *stop) { f_status_t status = F_none; diff --git a/level_1/fl_utf/c/private-utf.h b/level_1/fl_utf/c/private-utf.h index 7b1a06e..fd386b6 100644 --- a/level_1/fl_utf/c/private-utf.h +++ b/level_1/fl_utf/c/private-utf.h @@ -43,7 +43,7 @@ extern "C" { * @see fl_utf_string_dynamic_partial_compare() */ #if !defined(_di_fl_utfl_string_compare_) || !defined(_di_fl_utfl_string_dynamic_compare_) || !defined(_di_fl_utfl_string_dynamic_partial_compare_) - extern f_status_t private_fl_utf_string_compare(const f_utf_string_t string1, const f_utf_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2) f_gcc_attribute_visibility_internal; + extern f_status_t private_fl_utf_string_compare(const f_utf_string_t string1, const f_utf_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) f_gcc_attribute_visibility_internal; #endif // !defined(_di_fl_utfl_string_compare_) || !defined(_di_fl_utfl_string_dynamic_compare_) || !defined(_di_fl_utfl_string_dynamic_partial_compare_) /** @@ -74,7 +74,7 @@ extern "C" { * @see fl_utf_string_dynamic_partial_compare_trim() */ #if !defined(_di_fl_utf_string_compare_trim_) || !defined(_di_fl_utf_string_dynamic_compare_trim_) || !defined(_di_fl_utf_string_dynamic_partial_compare_trim_) - extern f_status_t private_fl_utf_string_compare_trim(const f_utf_string_t string1, const f_utf_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2) f_gcc_attribute_visibility_internal; + extern f_status_t private_fl_utf_string_compare_trim(const f_utf_string_t string1, const f_utf_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) f_gcc_attribute_visibility_internal; #endif // !defined(_di_fl_utf_string_compare_trim_) || !defined(_di_fl_utf_string_dynamic_compare_trim_) || !defined(_di_fl_utf_string_dynamic_partial_compare_trim_) /** @@ -101,7 +101,7 @@ extern "C" { * @see fl_utf_string_rip() */ #if !defined(_di_fl_utf_string_rip_) || !defined(_di_fl_utf_string_dynamic_rip_) || !defined(_di_fl_utf_string_rip_nulless_) || !defined(_di_fl_utf_string_dynamic_rip_nulless_) - extern f_status_t private_fl_utf_string_rip_find_range(const f_utf_string_t source, f_string_length_t *start, f_string_length_t *stop) f_gcc_attribute_visibility_internal; + extern f_status_t private_fl_utf_string_rip_find_range(const f_utf_string_t source, f_array_length_t *start, f_array_length_t *stop) f_gcc_attribute_visibility_internal; #endif // !defined(_di_fl_utf_string_rip_) || !defined(_di_fl_utf_string_dynamic_rip_) || !defined(_di_fl_utf_string_rip_nulless_) || !defined(_di_fl_utf_string_dynamic_rip_nulless_) #ifdef __cplusplus diff --git a/level_1/fl_utf/c/utf.c b/level_1/fl_utf/c/utf.c index 4a77e5a..ea2b4a3 100644 --- a/level_1/fl_utf/c/utf.c +++ b/level_1/fl_utf/c/utf.c @@ -6,13 +6,13 @@ extern "C" { #endif #ifndef _di_fl_utf_string_compare_ - f_status_t fl_utf_string_compare(const f_utf_string_t string1, const f_utf_string_t string2, const f_string_length_t length1, const f_string_length_t length2) { + f_status_t fl_utf_string_compare(const f_utf_string_t string1, const f_utf_string_t string2, const f_array_length_t length1, const f_array_length_t length2) { return private_fl_utf_string_compare(string1, string2, 0, 0, length1, length2); } #endif // _di_fl_utf_string_compare_ #ifndef _di_fl_utf_string_compare_trim_ - f_status_t fl_utf_string_compare_trim(const f_utf_string_t string1, const f_utf_string_t string2, const f_string_length_t length1, const f_string_length_t length2) { + f_status_t fl_utf_string_compare_trim(const f_utf_string_t string1, const f_utf_string_t string2, const f_array_length_t length1, const f_array_length_t length2) { return private_fl_utf_string_compare_trim(string1, string2, 0, 0, length1, length2); } #endif // _di_fl_utf_string_compare_trim_ @@ -223,15 +223,15 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_seek_to_char_ #ifndef _di_fl_utf_string_rip_ - f_status_t fl_utf_string_rip(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) { + f_status_t fl_utf_string_rip(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ if (!length) return F_data_not_eos; - f_string_length_t begin = 0; - f_string_length_t end = length - 1; + f_array_length_t begin = 0; + f_array_length_t end = length - 1; f_status_t status = private_fl_utf_string_rip_find_range(source, &begin, &end); @@ -243,15 +243,15 @@ extern "C" { #endif // _di_fl_utf_string_rip_ #ifndef _di_fl_utf_string_rip_nulless_ - f_status_t fl_utf_string_rip_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) { + f_status_t fl_utf_string_rip_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ if (!length) return F_data_not_eos; - f_string_length_t begin = 0; - f_string_length_t end = length - 1; + f_array_length_t begin = 0; + f_array_length_t end = length - 1; f_status_t status = private_fl_utf_string_rip_find_range(source, &begin, &end); diff --git a/level_1/fl_utf/c/utf.h b/level_1/fl_utf/c/utf.h index 710e70d..e9a67d2 100644 --- a/level_1/fl_utf/c/utf.h +++ b/level_1/fl_utf/c/utf.h @@ -55,7 +55,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_utf_string_compare_ - extern f_status_t fl_utf_string_compare(const f_utf_string_t string1, const f_utf_string_t string2, const f_string_length_t length1, const f_string_length_t length2); + extern f_status_t fl_utf_string_compare(const f_utf_string_t string1, const f_utf_string_t string2, const f_array_length_t length1, const f_array_length_t length2); #endif // _di_fl_utf_string_compare_ /** @@ -84,7 +84,7 @@ extern "C" { * @see f_utf_character_is_whitespace() */ #ifndef _di_fl_utf_string_compare_trim_ - extern f_status_t fl_utf_string_compare_trim(const f_utf_string_t string1, const f_utf_string_t string2, const f_string_length_t length1, const f_string_length_t length2); + extern f_status_t fl_utf_string_compare_trim(const f_utf_string_t string1, const f_utf_string_t string2, const f_array_length_t length1, const f_array_length_t length2); #endif // _di_fl_utf_string_compare_trim_ /** @@ -365,7 +365,7 @@ extern "C" { * @see f_utf_character_is_whitespace() */ #ifndef _di_fl_utf_string_rip_ - extern f_status_t fl_utf_string_rip(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination); + extern f_status_t fl_utf_string_rip(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination); #endif // _di_fl_utf_string_rip_ /** @@ -394,7 +394,7 @@ extern "C" { * @see f_utf_character_is_whitespace() */ #ifndef _di_fl_utf_string_rip_nulless_ - extern f_status_t fl_utf_string_rip_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination); + extern f_status_t fl_utf_string_rip_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination); #endif // _di_fl_utf_string_rip_nulless_ /** diff --git a/level_1/fl_utf_file/c/private-utf_file.c b/level_1/fl_utf_file/c/private-utf_file.c index f41f795..c0a2ffb 100644 --- a/level_1/fl_utf_file/c/private-utf_file.c +++ b/level_1/fl_utf_file/c/private-utf_file.c @@ -8,7 +8,7 @@ extern "C" { #if !defined(_di_fl_utf_file_read_) || !defined(_di_fl_utf_file_read_until_) || !defined(_di_fl_utf_file_read_range_) void private_fl_utf_file_process_read_buffer(const char *buffer_read, const ssize_t size_read, f_utf_string_dynamic_t *buffer, char buffer_char[], uint8_t *width, int8_t *width_last) { f_utf_character_t character = 0; - f_string_length_t i = 0; + f_array_length_t i = 0; uint8_t increment_by = 0; for (; i < size_read; i += increment_by) { @@ -70,20 +70,20 @@ extern "C" { #endif // !defined(_di_fl_utf_file_read_) || !defined(_di_fl_utf_file_read_until_) || !defined(_di_fl_utf_file_read_range_) #if !defined(_di_fl_utf_file_write_) || !defined(_di_fl_utf_file_write_until_) || !defined(fl_utf_file_write_range) - f_status_t private_fl_utf_file_write_until(const f_file_t file, const f_utf_string_t string, const f_string_length_t total, f_string_length_t *written) { + f_status_t private_fl_utf_file_write_until(const f_file_t file, const f_utf_string_t string, const f_array_length_t total, f_array_length_t *written) { *written = 0; f_status_t status = F_none; - f_string_length_t write_size = file.size_write > 4 ? file.size_write : 4; - f_string_length_t write_max = total; - f_string_length_t i = 0; + f_array_length_t write_size = file.size_write > 4 ? file.size_write : 4; + f_array_length_t write_max = total; + f_array_length_t i = 0; if (write_size > write_max) { write_size = write_max; } - f_string_length_t last = 0; - f_string_length_t used = 0; + f_array_length_t last = 0; + f_array_length_t used = 0; ssize_t size_write = 0; uint8_t buffer_write[write_size]; diff --git a/level_1/fl_utf_file/c/private-utf_file.h b/level_1/fl_utf_file/c/private-utf_file.h index a8c4a10..ef4cf07 100644 --- a/level_1/fl_utf_file/c/private-utf_file.h +++ b/level_1/fl_utf_file/c/private-utf_file.h @@ -77,7 +77,7 @@ extern "C" { * @see fl_utf_file_write_until() */ #if !defined(_di_fl_utf_file_write_) || !defined(_di_fl_utf_file_write_until_) || !defined(_di_fl_utf_file_write_range_) - extern f_status_t private_fl_utf_file_write_until(const f_file_t file, const f_utf_string_t string, const f_string_length_t total, f_string_length_t *written) f_gcc_attribute_visibility_internal; + extern f_status_t private_fl_utf_file_write_until(const f_file_t file, const f_utf_string_t string, const f_array_length_t total, f_array_length_t *written) f_gcc_attribute_visibility_internal; #endif // !defined(_di_fl_utf_file_write_) || !defined(_di_fl_utf_file_write_until_) || !defined(_di_fl_utf_file_write_range_) #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 ab516da..6295051 100644 --- a/level_1/fl_utf_file/c/utf_file.c +++ b/level_1/fl_utf_file/c/utf_file.c @@ -29,7 +29,7 @@ extern "C" { while ((size_read = read(file.id, buffer_read, file.size_read)) > 0) { if (buffer->used + size_read > buffer->size) { - if (buffer->size + size_read > f_string_length_t_size) { + if (buffer->size + size_read > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } @@ -89,7 +89,7 @@ extern "C" { if ((size_read = read(file.id, buffer_read, file.size_read)) > 0) { if (buffer->used + size_read > buffer->size) { - if (buffer->size + size_read > f_string_length_t_size) { + if (buffer->size + size_read > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } @@ -127,7 +127,7 @@ extern "C" { #endif // _di_fl_utf_file_read_block_ #ifndef _di_fl_utf_file_read_until_ - f_status_t fl_utf_file_read_until(const f_file_t file, const f_string_length_t total, f_utf_string_dynamic_t *buffer) { + f_status_t fl_utf_file_read_until(const f_file_t file, const f_array_length_t total, f_utf_string_dynamic_t *buffer) { #ifndef _di_level_1_parameter_checking_ if (!file.size_read) return F_status_set_error(F_parameter); if (buffer->used > buffer->size) return F_status_set_error(F_parameter); @@ -142,8 +142,8 @@ extern "C" { uint8_t width = 0; int8_t width_last = -1; - f_string_length_t buffer_size = file.size_read; - f_string_length_t buffer_count = 0; + f_array_length_t buffer_size = file.size_read; + f_array_length_t buffer_count = 0; if (total < buffer_size) { buffer_size = total; @@ -157,7 +157,7 @@ extern "C" { while (buffer_count < total && (size_read = read(file.id, buffer_read, buffer_size)) > 0) { if (buffer->used + size_read > buffer->size) { - if (buffer->size + size_read > f_string_length_t_size) { + if (buffer->size + size_read > f_array_length_t_size) { return F_status_set_error(F_string_too_large); } @@ -195,7 +195,7 @@ extern "C" { #endif // _di_fl_utf_file_read_until_ #ifndef _di_fl_utf_file_write_ - f_status_t fl_utf_file_write(const f_file_t file, const f_utf_string_static_t buffer, f_string_length_t *written) { + f_status_t fl_utf_file_write(const f_file_t file, const f_utf_string_static_t buffer, f_array_length_t *written) { #ifndef _di_level_0_parameter_checking_ if (!file.size_write) return F_status_set_error(F_parameter); if (buffer.used > buffer.size) return F_status_set_error(F_parameter); @@ -219,7 +219,7 @@ extern "C" { #endif // _di_fl_utf_file_write_ #ifndef _di_fl_utf_file_write_block_ - f_status_t fl_utf_file_write_block(const f_file_t file, const f_utf_string_static_t buffer, f_string_length_t *written) { + f_status_t fl_utf_file_write_block(const f_file_t file, const f_utf_string_static_t buffer, f_array_length_t *written) { #ifndef _di_level_0_parameter_checking_ if (!file.size_write) return F_status_set_error(F_parameter); if (buffer.used > buffer.size) return F_status_set_error(F_parameter); @@ -233,7 +233,7 @@ extern "C" { return F_data_not; } - f_string_length_t write_max = file.size_write; + f_array_length_t write_max = file.size_write; if (write_max > buffer.used) { write_max = buffer.used; @@ -249,7 +249,7 @@ extern "C" { #endif // _di_fl_utf_file_write_block_ #ifndef _di_fl_utf_file_write_until_ - f_status_t fl_utf_file_write_until(const f_file_t file, const f_utf_string_static_t buffer, const f_string_length_t total, f_string_length_t *written) { + f_status_t fl_utf_file_write_until(const f_file_t file, const f_utf_string_static_t buffer, const f_array_length_t total, f_array_length_t *written) { #ifndef _di_level_0_parameter_checking_ if (!file.size_write) return F_status_set_error(F_parameter); if (buffer.used > buffer.size) return F_status_set_error(F_parameter); @@ -263,7 +263,7 @@ extern "C" { return F_data_not; } - f_string_length_t write_max = file.size_write; + f_array_length_t write_max = file.size_write; if (write_max > buffer.used) { write_max = buffer.used; @@ -279,7 +279,7 @@ extern "C" { #endif // _di_fl_utf_file_write_until_ #ifndef _di_fl_utf_file_write_range_ - f_status_t fl_utf_file_write_range(const f_file_t file, const f_utf_string_static_t buffer, const f_utf_string_range_t range, f_string_length_t *written) { + f_status_t fl_utf_file_write_range(const f_file_t file, const f_utf_string_static_t buffer, const f_utf_string_range_t range, f_array_length_t *written) { #ifndef _di_level_0_parameter_checking_ if (!file.size_write) return F_status_set_error(F_parameter); if (buffer.used > buffer.size) return F_status_set_error(F_parameter); @@ -295,8 +295,8 @@ extern "C" { return F_data_not; } - const f_string_length_t total = (range.stop - range.start) + 1; - f_string_length_t write_max = total; + const f_array_length_t total = (range.stop - range.start) + 1; + f_array_length_t write_max = total; if (write_max > buffer.used) { write_max = buffer.used; diff --git a/level_1/fl_utf_file/c/utf_file.h b/level_1/fl_utf_file/c/utf_file.h index 3900ffc..a915f81 100644 --- a/level_1/fl_utf_file/c/utf_file.h +++ b/level_1/fl_utf_file/c/utf_file.h @@ -122,7 +122,7 @@ extern "C" { * @see read() */ #ifndef _di_fl_utf_file_read_until_ - extern f_status_t fl_utf_file_read_until(const f_file_t file, const f_string_length_t total, f_utf_string_dynamic_t *buffer); + extern f_status_t fl_utf_file_read_until(const f_file_t file, const f_array_length_t total, f_utf_string_dynamic_t *buffer); #endif // _di_fl_utf_file_read_until_ /** @@ -154,7 +154,7 @@ extern "C" { * @see write() */ #ifndef _di_fl_utf_file_write_ - extern f_status_t fl_utf_file_write(const f_file_t file, const f_utf_string_static_t buffer, f_string_length_t *written); + extern f_status_t fl_utf_file_write(const f_file_t file, const f_utf_string_static_t buffer, f_array_length_t *written); #endif // _di_fl_utf_file_write_ /** @@ -188,7 +188,7 @@ extern "C" { * @see write() */ #ifndef _di_fl_utf_file_write_block_ - extern f_status_t fl_utf_file_write_block(const f_file_t file, const f_utf_string_static_t buffer, f_string_length_t *written); + extern f_status_t fl_utf_file_write_block(const f_file_t file, const f_utf_string_static_t buffer, f_array_length_t *written); #endif // _di_fl_utf_file_write_block_ /** @@ -222,7 +222,7 @@ extern "C" { * @see write() */ #ifndef _di_fl_utf_file_write_until_ - extern f_status_t fl_utf_file_write_until(const f_file_t file, const f_utf_string_static_t buffer, const f_string_length_t total, f_string_length_t *written); + extern f_status_t fl_utf_file_write_until(const f_file_t file, const f_utf_string_static_t buffer, const f_array_length_t total, f_array_length_t *written); #endif // _di_fl_utf_file_write_until_ /** @@ -256,7 +256,7 @@ extern "C" { * @see write() */ #ifndef _di_fl_utf_file_write_range_ - extern f_status_t fl_utf_file_write_range(const f_file_t file, const f_utf_string_static_t buffer, const f_utf_string_range_t range, f_string_length_t *written); + extern f_status_t fl_utf_file_write_range(const f_file_t file, const f_utf_string_static_t buffer, const f_utf_string_range_t range, f_array_length_t *written); #endif // _di_fl_utf_file_write_range_ #ifdef __cplusplus diff --git a/level_2/fll_control_group/c/control_group.c b/level_2/fll_control_group/c/control_group.c index 7604981..0e99fe3 100644 --- a/level_2/fll_control_group/c/control_group.c +++ b/level_2/fll_control_group/c/control_group.c @@ -17,7 +17,7 @@ extern "C" { } } - f_string_length_t length = 0; + f_array_length_t length = 0; for (f_array_length_t i = 0; i < control_group.groups.used; ++i) { diff --git a/level_2/fll_execute/c/execute.c b/level_2/fll_execute/c/execute.c index 340e8b5..5d9565b 100644 --- a/level_2/fll_execute/c/execute.c +++ b/level_2/fll_execute/c/execute.c @@ -6,7 +6,7 @@ extern "C" { #endif #ifndef _di_fll_execute_arguments_add_ - f_status_t fll_execute_arguments_add(const f_string_t source, const f_string_length_t length, f_string_dynamics_t *arguments) { + f_status_t fll_execute_arguments_add(const f_string_t source, const f_array_length_t length, f_string_dynamics_t *arguments) { #ifndef _di_level_2_parameter_checking_ if (!arguments) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ @@ -19,7 +19,7 @@ extern "C" { #endif // _di_fll_execute_arguments_add_ #ifndef _di_fll_execute_arguments_add_parameter_ - f_status_t fll_execute_arguments_add_parameter(const f_string_t prefix, const f_string_length_t prefix_length, const f_string_t name, const f_string_length_t name_length, const f_string_t value, const f_string_length_t value_length, f_string_dynamics_t *arguments) { + f_status_t fll_execute_arguments_add_parameter(const f_string_t prefix, const f_array_length_t prefix_length, const f_string_t name, const f_array_length_t name_length, const f_string_t value, const f_array_length_t value_length, f_string_dynamics_t *arguments) { #ifndef _di_level_2_parameter_checking_ if (!arguments) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ @@ -32,7 +32,7 @@ extern "C" { #endif // _di_fll_execute_arguments_add_parameter_ #ifndef _di_fll_execute_arguments_add_parameter_set_ - f_status_t fll_execute_arguments_add_parameter_set(const f_string_t prefix[], const f_string_length_t prefix_length[], const f_string_t name[], const f_string_length_t name_length[], const f_string_t value[], const f_string_length_t value_length[], const f_array_length_t size, f_string_dynamics_t *arguments) { + f_status_t fll_execute_arguments_add_parameter_set(const f_string_t prefix[], const f_array_length_t prefix_length[], const f_string_t name[], const f_array_length_t name_length[], const f_string_t value[], const f_array_length_t value_length[], const f_array_length_t size, f_string_dynamics_t *arguments) { #ifndef _di_level_2_parameter_checking_ if (!arguments) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ @@ -50,7 +50,7 @@ extern "C" { #endif // _di_fll_execute_arguments_add_parameter_set_ #ifndef _di_fll_execute_arguments_add_set_ - f_status_t fll_execute_arguments_add_set(const f_string_t source[], const f_string_length_t length[], const f_array_length_t size, f_string_dynamics_t *arguments) { + f_status_t fll_execute_arguments_add_set(const f_string_t source[], const f_array_length_t length[], const f_array_length_t size, f_string_dynamics_t *arguments) { #ifndef _di_level_2_parameter_checking_ if (!arguments) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ @@ -140,7 +140,7 @@ extern "C" { f_string_t fixed_arguments[arguments.used + 2]; const f_string_t last_slash = strrchr(program ? program : arguments.array[0].string, f_path_separator_s[0]); - const f_string_length_t name_size = last_slash ? strnlen(last_slash, f_path_length_max) : strnlen(program ? program : arguments.array[0].string, f_path_length_max); + const f_array_length_t name_size = last_slash ? strnlen(last_slash, f_path_length_max) : strnlen(program ? program : arguments.array[0].string, f_path_length_max); char program_name[name_size + 1]; @@ -178,7 +178,7 @@ extern "C" { f_string_t fixed_arguments[arguments.used + 2]; const f_string_t last_slash = strrchr(program ? program : arguments.array[0].string, f_path_separator_s[0]); - const f_string_length_t name_size = last_slash ? strnlen(last_slash, f_path_length_max) : strnlen(program ? program : arguments.array[0].string, f_path_length_max); + const f_array_length_t name_size = last_slash ? strnlen(last_slash, f_path_length_max) : strnlen(program ? program : arguments.array[0].string, f_path_length_max); char program_name[name_size + 1]; diff --git a/level_2/fll_execute/c/execute.h b/level_2/fll_execute/c/execute.h index 4f4ccf3..702f98c 100644 --- a/level_2/fll_execute/c/execute.h +++ b/level_2/fll_execute/c/execute.h @@ -84,7 +84,7 @@ extern "C" { * @see f_string_dynamics_increase() */ #ifndef _di_fll_execute_arguments_add_ - extern f_status_t fll_execute_arguments_add(const f_string_t source, const f_string_length_t length, f_string_dynamics_t *arguments); + extern f_status_t fll_execute_arguments_add(const f_string_t source, const f_array_length_t length, f_string_dynamics_t *arguments); #endif // _di_fll_execute_arguments_add_ /** @@ -128,7 +128,7 @@ extern "C" { * @see f_string_dynamics_increase() */ #ifndef _di_fll_execute_arguments_add_parameter_ - extern f_status_t fll_execute_arguments_add_parameter(const f_string_t prefix, const f_string_length_t prefix_length, const f_string_t name, const f_string_length_t name_length, const f_string_t value, const f_string_length_t value_length, f_string_dynamics_t *arguments); + extern f_status_t fll_execute_arguments_add_parameter(const f_string_t prefix, const f_array_length_t prefix_length, const f_string_t name, const f_array_length_t name_length, const f_string_t value, const f_array_length_t value_length, f_string_dynamics_t *arguments); #endif // _di_fll_execute_arguments_add_parameter_ /** @@ -174,7 +174,7 @@ extern "C" { * @see f_string_dynamics_increase() */ #ifndef _di_fll_execute_arguments_add_parameter_set_ - extern f_status_t fll_execute_arguments_add_parameter_set(const f_string_t prefix[], const f_string_length_t prefix_length[], const f_string_t name[], const f_string_length_t name_length[], const f_string_t value[], const f_string_length_t value_length[], const f_array_length_t size, f_string_dynamics_t *arguments); + extern f_status_t fll_execute_arguments_add_parameter_set(const f_string_t prefix[], const f_array_length_t prefix_length[], const f_string_t name[], const f_array_length_t name_length[], const f_string_t value[], const f_array_length_t value_length[], const f_array_length_t size, f_string_dynamics_t *arguments); #endif // _di_fll_execute_arguments_add_parameter_set_ /** @@ -206,7 +206,7 @@ extern "C" { * @see f_string_dynamics_increase() */ #ifndef _di_fll_execute_arguments_add_set_ - extern f_status_t fll_execute_arguments_add_set(const f_string_t source[], const f_string_length_t length[], const f_array_length_t size, f_string_dynamics_t *arguments); + extern f_status_t fll_execute_arguments_add_set(const f_string_t source[], const f_array_length_t length[], const f_array_length_t size, f_string_dynamics_t *arguments); #endif // _di_fll_execute_arguments_add_set_ /** diff --git a/level_2/fll_execute/c/private-execute.c b/level_2/fll_execute/c/private-execute.c index 99e75e3..4669caa 100644 --- a/level_2/fll_execute/c/private-execute.c +++ b/level_2/fll_execute/c/private-execute.c @@ -6,7 +6,7 @@ extern "C" { #endif #if !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_) || !defined(_di_fll_execute_arguments_dynamic_add_) || !defined(_di_fll_execute_arguments_dynamic_add_set_) - f_status_t private_fll_execute_arguments_add(const f_string_t source, const f_string_length_t length, f_string_dynamics_t *arguments) { + f_status_t private_fll_execute_arguments_add(const f_string_t source, const f_array_length_t length, f_string_dynamics_t *arguments) { f_status_t status = f_string_dynamics_increase(arguments); if (F_status_is_error(status)) return status; @@ -39,7 +39,7 @@ extern "C" { #endif // !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_) || !defined(_di_fll_execute_arguments_dynamic_add_) || !defined(_di_fll_execute_arguments_dynamic_add_set_) #if !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_set_) - f_status_t private_fll_execute_arguments_add_parameter(const f_string_t prefix, const f_string_length_t prefix_length, const f_string_t name, const f_string_length_t name_length, const f_string_t value, const f_string_length_t value_length, f_string_dynamics_t *arguments) { + f_status_t private_fll_execute_arguments_add_parameter(const f_string_t prefix, const f_array_length_t prefix_length, const f_string_t name, const f_array_length_t name_length, const f_string_t value, const f_array_length_t value_length, f_string_dynamics_t *arguments) { f_status_t status = f_string_dynamics_increase(arguments); if (F_status_is_error(status)) return status; @@ -594,7 +594,7 @@ extern "C" { #endif // !defined(_di_fll_execute_program_) #if !defined(_di_fll_execute_program_) - void private_fll_execute_path_arguments_fixate(const f_string_t program_path, const f_string_statics_t arguments, const bool fixated_is, const f_string_length_t name_size, char program_name[], f_string_t fixed_arguments[]) { + void private_fll_execute_path_arguments_fixate(const f_string_t program_path, const f_string_statics_t arguments, const bool fixated_is, const f_array_length_t name_size, char program_name[], f_string_t fixed_arguments[]) { memcpy(program_name, program_path, name_size); program_name[name_size] = 0; @@ -606,7 +606,7 @@ extern "C" { fixed_arguments[0] = 0; } - f_string_length_t i = 0; + f_array_length_t i = 0; if (fixated_is) { for (i = 1; i < arguments.used; ++i) { diff --git a/level_2/fll_execute/c/private-execute.h b/level_2/fll_execute/c/private-execute.h index 2160a4c..55e6b85 100644 --- a/level_2/fll_execute/c/private-execute.h +++ b/level_2/fll_execute/c/private-execute.h @@ -45,7 +45,7 @@ extern "C" { * @see fll_execute_arguments_dynamic_add_set() */ #if !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_) || !defined(_di_fll_execute_arguments_dynamic_add_) || !defined(_di_fll_execute_arguments_dynamic_add_set_) - extern f_status_t private_fll_execute_arguments_add(const f_string_t source, const f_string_length_t length, f_string_dynamics_t *arguments) f_gcc_attribute_visibility_internal; + extern f_status_t private_fll_execute_arguments_add(const f_string_t source, const f_array_length_t length, f_string_dynamics_t *arguments) f_gcc_attribute_visibility_internal; #endif // !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_) || !defined(_di_fll_execute_arguments_dynamic_add_) || !defined(_di_fll_execute_arguments_dynamic_add_set_) /** @@ -86,7 +86,7 @@ extern "C" { * @see fll_execute_arguments_dynamic_add_parameter_set() */ #if !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_set_) - extern f_status_t private_fll_execute_arguments_add_parameter(const f_string_t prefix, const f_string_length_t prefix_length, const f_string_t name, const f_string_length_t name_length, const f_string_t value, const f_string_length_t value_length, f_string_dynamics_t *arguments) f_gcc_attribute_visibility_internal; + extern f_status_t private_fll_execute_arguments_add_parameter(const f_string_t prefix, const f_array_length_t prefix_length, const f_string_t name, const f_array_length_t name_length, const f_string_t value, const f_array_length_t value_length, f_string_dynamics_t *arguments) f_gcc_attribute_visibility_internal; #endif // !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_set_) /** @@ -338,7 +338,7 @@ extern "C" { * @see fll_execute_program() */ #if !defined(_di_fll_execute_program_) - extern void private_fll_execute_path_arguments_fixate(const f_string_t program_path, const f_string_statics_t arguments, const bool fixated_is, const f_string_length_t name_size, char program_name[], f_string_t fixed_arguments[]) f_gcc_attribute_visibility_internal; + extern void private_fll_execute_path_arguments_fixate(const f_string_t program_path, const f_string_statics_t arguments, const bool fixated_is, const f_array_length_t name_size, char program_name[], f_string_t fixed_arguments[]) f_gcc_attribute_visibility_internal; #endif // !defined(_di_fll_execute_program_) #ifdef __cplusplus diff --git a/level_2/fll_file/c/file.c b/level_2/fll_file/c/file.c index 98bedfb..c9367fe 100644 --- a/level_2/fll_file/c/file.c +++ b/level_2/fll_file/c/file.c @@ -16,7 +16,7 @@ extern "C" { #endif // _di_fll_file_mode_set_all_ #ifndef _di_fll_file_move_ - f_status_t fll_file_move(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const fl_directory_recurse_t recurse) { + f_status_t fll_file_move(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const fl_directory_recurse_t recurse) { #ifndef _di_level_2_parameter_checking_ if (!source) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); diff --git a/level_2/fll_file/c/file.h b/level_2/fll_file/c/file.h index 776c0b7..09759b3 100644 --- a/level_2/fll_file/c/file.h +++ b/level_2/fll_file/c/file.h @@ -124,7 +124,7 @@ extern "C" { * @see fl_directory_clone() */ #ifndef _di_fll_file_move_ - extern f_status_t fll_file_move(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const fl_directory_recurse_t recurse); + extern f_status_t fll_file_move(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const fl_directory_recurse_t recurse); #endif // _di_fll_file_move_ /** diff --git a/level_2/fll_file/c/private-file.c b/level_2/fll_file/c/private-file.c index dd95457..215ad92 100644 --- a/level_2/fll_file/c/private-file.c +++ b/level_2/fll_file/c/private-file.c @@ -27,7 +27,7 @@ extern "C" { status = F_none; - const f_string_length_t path_length = strnlen(path, f_path_length_max); + const f_array_length_t path_length = strnlen(path, f_path_length_max); { f_string_dynamics_t * const list[] = { @@ -47,7 +47,7 @@ extern "C" { for (j = 0; F_status_is_fine(status) && j < list[i]->used; j++) { - const f_string_length_t length = path_length + list[i]->array[j].used + 1; + const f_array_length_t length = path_length + list[i]->array[j].used + 1; char path_sub[length + 1]; @@ -68,7 +68,7 @@ extern "C" { for (f_array_length_t i = 0; F_status_is_fine(status) && i < listing.directory.used; i++) { - const f_string_length_t length = path_length + listing.directory.array[i].used + 1; + const f_array_length_t length = path_length + listing.directory.array[i].used + 1; char path_sub[length + 1]; @@ -124,7 +124,7 @@ extern "C" { status = F_none; - const f_string_length_t path_length = strnlen(path, f_path_length_max); + const f_array_length_t path_length = strnlen(path, f_path_length_max); { f_string_dynamics_t * const list[] = { @@ -144,7 +144,7 @@ extern "C" { for (j = 0; F_status_is_fine(status) && j < list[i]->used; j++) { - const f_string_length_t length = path_length + list[i]->array[j].used + 1; + const f_array_length_t length = path_length + list[i]->array[j].used + 1; char path_sub[length + 1]; @@ -163,7 +163,7 @@ extern "C" { for (f_array_length_t i = 0; F_status_is_fine(status) && i < listing.directory.used; i++) { - const f_string_length_t length = path_length + listing.directory.array[i].used + 1; + const f_array_length_t length = path_length + listing.directory.array[i].used + 1; char path_sub[length + 1]; diff --git a/level_2/fll_fss/c/fss.c b/level_2/fll_fss/c/fss.c index 8da5599..f31a9b9 100644 --- a/level_2/fll_fss/c/fss.c +++ b/level_2/fll_fss/c/fss.c @@ -26,7 +26,7 @@ extern "C" { #endif // _di_level_2_parameter_checking_ { - f_string_length_t seeked = 0; + f_array_length_t seeked = 0; if (F_status_is_error(f_file_seek(file->id, SEEK_SET, 0, &seeked))) { return F_status_set_error(F_file_seek); @@ -47,7 +47,7 @@ extern "C" { #endif // _di_fll_fss_identify_file_ #ifndef _di_fll_fss_snatch_ - f_status_t fll_fss_snatch(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_dynamic_t *values[], f_array_length_t *indexs[]) { + f_status_t fll_fss_snatch(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, f_string_dynamic_t *values[], f_array_length_t *indexs[]) { #ifndef _di_level_2_parameter_checking_ if (!size) return F_status_set_error(F_parameter); if (objects.used != contents.used) return F_status_set_error(F_parameter); @@ -59,7 +59,7 @@ extern "C" { if (!contents.used) return F_data_not; f_status_t status = F_none; - f_string_length_t length_object = 0; + f_array_length_t length_object = 0; f_array_length_t i = 0; f_array_length_t j = 0; @@ -99,7 +99,7 @@ extern "C" { #endif // _di_fll_fss_snatch_ #ifndef _di_fll_fss_snatch_apart_ - f_status_t fll_fss_snatch_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_dynamics_t *values[], f_array_lengths_t *indexs[]) { + f_status_t fll_fss_snatch_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, f_string_dynamics_t *values[], f_array_lengths_t *indexs[]) { #ifndef _di_level_2_parameter_checking_ if (!size) return F_status_set_error(F_parameter); if (objects.used != contents.used) return F_status_set_error(F_parameter); @@ -111,7 +111,7 @@ extern "C" { if (!contents.used) return F_data_not; f_status_t status = F_none; - f_string_length_t length_object = 0; + f_array_length_t length_object = 0; f_string_dynamics_t *value = 0; f_fss_content_t *content = 0; @@ -167,7 +167,7 @@ extern "C" { #endif // _di_fll_fss_snatch_apart_ #ifndef _di_fll_fss_snatch_map_ - f_status_t fll_fss_snatch_map(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_maps_t *values[], f_array_lengths_t *indexs[]) { + f_status_t fll_fss_snatch_map(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, f_string_maps_t *values[], f_array_lengths_t *indexs[]) { #ifndef _di_level_2_parameter_checking_ if (!size) return F_status_set_error(F_parameter); if (objects.used != contents.used) return F_status_set_error(F_parameter); @@ -179,7 +179,7 @@ extern "C" { if (!contents.used) return F_data_not; f_status_t status = F_none; - f_string_length_t length_name = 0; + f_array_length_t length_name = 0; f_string_dynamic_t name = f_string_dynamic_t_initialize; f_array_length_t i = 0; @@ -300,7 +300,7 @@ extern "C" { #endif // _di_fll_fss_snatch_map_ #ifndef _di_fll_fss_snatch_map_apart_ - f_status_t fll_fss_snatch_map_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_map_multis_t *values[], f_array_lengths_t *indexs[]) { + f_status_t fll_fss_snatch_map_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, f_string_map_multis_t *values[], f_array_lengths_t *indexs[]) { #ifndef _di_level_2_parameter_checking_ if (!size) return F_status_set_error(F_parameter); if (objects.used != contents.used) return F_status_set_error(F_parameter); @@ -312,7 +312,7 @@ extern "C" { if (!contents.used) return F_data_not; f_status_t status = F_none; - f_string_length_t length_object = 0; + f_array_length_t length_object = 0; f_array_length_t i = 0; f_array_length_t j = 0; @@ -372,7 +372,7 @@ extern "C" { #endif // _di_fll_fss_snatch_map_apart_ #ifndef _di_fll_fss_snatch_map_mash_ - f_status_t fll_fss_snatch_map_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_maps_t *values[], f_array_lengths_t *indexs[]) { + f_status_t fll_fss_snatch_map_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_maps_t *values[], f_array_lengths_t *indexs[]) { #ifndef _di_level_2_parameter_checking_ if (!size) return F_status_set_error(F_parameter); if (objects.used != contents.used) return F_status_set_error(F_parameter); @@ -384,7 +384,7 @@ extern "C" { if (!contents.used) return F_data_not; f_status_t status = F_none; - f_string_length_t length_object = 0; + f_array_length_t length_object = 0; f_array_length_t i = 0; f_array_length_t j = 0; @@ -439,7 +439,7 @@ extern "C" { #endif // _di_fll_fss_snatch_map_mash_ #ifndef _di_fll_fss_snatch_map_mash_apart_ - f_status_t fll_fss_snatch_map_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_map_multis_t *values[], f_array_lengths_t *indexs[]) { + f_status_t fll_fss_snatch_map_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_map_multis_t *values[], f_array_lengths_t *indexs[]) { #ifndef _di_level_2_parameter_checking_ if (!size) return F_status_set_error(F_parameter); if (objects.used != contents.used) return F_status_set_error(F_parameter); @@ -451,7 +451,7 @@ extern "C" { if (!contents.used) return F_data_not; f_status_t status = F_none; - f_string_length_t length_name = 0; + f_array_length_t length_name = 0; f_string_dynamic_t name = f_string_dynamic_t_initialize; f_array_length_t i = 0; @@ -550,7 +550,7 @@ extern "C" { #endif // _di_fll_fss_snatch_map_mash_apart_ #ifndef _di_fll_fss_snatch_map_together_ - f_status_t fll_fss_snatch_map_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_maps_t *values[], f_array_lengths_t *indexs[]) { + f_status_t fll_fss_snatch_map_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_maps_t *values[], f_array_lengths_t *indexs[]) { #ifndef _di_level_2_parameter_checking_ if (!size) return F_status_set_error(F_parameter); if (objects.used != contents.used) return F_status_set_error(F_parameter); @@ -562,7 +562,7 @@ extern "C" { if (!contents.used) return F_data_not; f_status_t status = F_none; - f_string_length_t length_name = 0; + f_array_length_t length_name = 0; f_string_dynamic_t name = f_string_dynamic_t_initialize; f_array_length_t i = 0; @@ -659,7 +659,7 @@ extern "C" { #endif // _di_fll_fss_snatch_map_together_ #ifndef _di_fll_fss_snatch_mash_ - f_status_t fll_fss_snatch_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_dynamic_t *values[], f_array_length_t *indexs[]) { + f_status_t fll_fss_snatch_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_dynamic_t *values[], f_array_length_t *indexs[]) { #ifndef _di_level_2_parameter_checking_ if (!size) return F_status_set_error(F_parameter); if (objects.used != contents.used) return F_status_set_error(F_parameter); @@ -671,7 +671,7 @@ extern "C" { if (!contents.used) return F_data_not; f_status_t status = F_none; - f_string_length_t length_object = 0; + f_array_length_t length_object = 0; f_array_length_t i = 0; f_array_length_t j = 0; @@ -712,7 +712,7 @@ extern "C" { #endif // _di_fll_fss_snatch_mash_ #ifndef _di_fll_fss_snatch_mash_apart_ - f_status_t fll_fss_snatch_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_dynamics_t *values[], f_array_lengths_t *indexs[]) { + f_status_t fll_fss_snatch_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_dynamics_t *values[], f_array_lengths_t *indexs[]) { #ifndef _di_level_2_parameter_checking_ if (!size) return F_status_set_error(F_parameter); if (objects.used != contents.used) return F_status_set_error(F_parameter); @@ -724,7 +724,7 @@ extern "C" { if (!contents.used) return F_data_not; f_status_t status = F_none; - f_string_length_t length_object = 0; + f_array_length_t length_object = 0; f_array_length_t i = 0; f_array_length_t j = 0; @@ -769,7 +769,7 @@ extern "C" { #endif // _di_fll_fss_snatch_mash_apart_ #ifndef _di_fll_fss_snatch_together_ - f_status_t fll_fss_snatch_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_dynamic_t *values[], f_array_length_t *indexs[]) { + f_status_t fll_fss_snatch_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_dynamic_t *values[], f_array_length_t *indexs[]) { #ifndef _di_level_2_parameter_checking_ if (!size) return F_status_set_error(F_parameter); if (objects.used != contents.used) return F_status_set_error(F_parameter); @@ -781,7 +781,7 @@ extern "C" { if (!contents.used) return F_data_not; f_status_t status = F_none; - f_string_length_t length_object = 0; + f_array_length_t length_object = 0; f_array_length_t i = 0; f_array_length_t j = 0; diff --git a/level_2/fll_fss/c/fss.h b/level_2/fll_fss/c/fss.h index 2de606f..91084a8 100644 --- a/level_2/fll_fss/c/fss.h +++ b/level_2/fll_fss/c/fss.h @@ -117,7 +117,7 @@ extern "C" { * @see fl_string_compare_trim() */ #ifndef _di_fll_fss_snatch_ - extern f_status_t fll_fss_snatch(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_dynamic_t *values[], f_array_length_t *indexs[]); + extern f_status_t fll_fss_snatch(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, f_string_dynamic_t *values[], f_array_length_t *indexs[]); #endif // _di_fll_fss_snatch_ /** @@ -163,7 +163,7 @@ extern "C" { * @see fl_string_compare_trim() */ #ifndef _di_fll_fss_snatch_apart_ - extern f_status_t fll_fss_snatch_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_dynamics_t *values[], f_array_lengths_t *indexs[]); + extern f_status_t fll_fss_snatch_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, f_string_dynamics_t *values[], f_array_lengths_t *indexs[]); #endif // _di_fll_fss_snatch_apart_ /** @@ -211,7 +211,7 @@ extern "C" { * @see fl_string_compare_trim() */ #ifndef _di_fll_fss_snatch_map_ - extern f_status_t fll_fss_snatch_map(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_maps_t *values[], f_array_lengths_t *indexs[]); + extern f_status_t fll_fss_snatch_map(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, f_string_maps_t *values[], f_array_lengths_t *indexs[]); #endif // _di_fll_fss_snatch_map_ /** @@ -261,7 +261,7 @@ extern "C" { * @see fl_string_compare_trim() */ #ifndef _di_fll_fss_snatch_map_apart_ - extern f_status_t fll_fss_snatch_map_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_map_multis_t *values[], f_array_lengths_t *indexs[]); + extern f_status_t fll_fss_snatch_map_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, f_string_map_multis_t *values[], f_array_lengths_t *indexs[]); #endif // _di_fll_fss_snatch_map_apart_ /** @@ -311,7 +311,7 @@ extern "C" { * Errors (with error bit) from: f_string_dynamic_partial_mash_nulless(). */ #ifndef _di_fll_fss_snatch_map_mash_ - extern f_status_t fll_fss_snatch_map_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_maps_t *values[], f_array_lengths_t *indexs[]); + extern f_status_t fll_fss_snatch_map_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_maps_t *values[], f_array_lengths_t *indexs[]); #endif // _di_fll_fss_snatch_map_mash_ /** @@ -365,7 +365,7 @@ extern "C" { * @see fl_string_compare_trim() */ #ifndef _di_fll_fss_snatch_map_mash_apart_ - extern f_status_t fll_fss_snatch_map_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_map_multis_t *values[], f_array_lengths_t *indexs[]); + extern f_status_t fll_fss_snatch_map_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_map_multis_t *values[], f_array_lengths_t *indexs[]); #endif // _di_fll_fss_snatch_map_mash_apart_ /** @@ -418,7 +418,7 @@ extern "C" { * @see fl_string_compare_trim() */ #ifndef _di_fll_fss_snatch_map_together_ - extern f_status_t fll_fss_snatch_map_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_maps_t *values[], f_array_lengths_t *indexs[]); + extern f_status_t fll_fss_snatch_map_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_maps_t *values[], f_array_lengths_t *indexs[]); #endif // _di_fll_fss_snatch_map_together_ /** @@ -465,7 +465,7 @@ extern "C" { * Errors (with error bit) from: f_string_dynamic_partial_mash_nulless(). */ #ifndef _di_fll_fss_snatch_mash_ - extern f_status_t fll_fss_snatch_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_dynamic_t *values[], f_array_length_t *indexs[]); + extern f_status_t fll_fss_snatch_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_dynamic_t *values[], f_array_length_t *indexs[]); #endif // _di_fll_fss_snatch_mash_ /** @@ -516,7 +516,7 @@ extern "C" { * @see fl_string_compare_trim() */ #ifndef _di_fll_fss_snatch_mash_apart_ - extern f_status_t fll_fss_snatch_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_dynamics_t *values[], f_array_lengths_t *indexs[]); + extern f_status_t fll_fss_snatch_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_dynamics_t *values[], f_array_lengths_t *indexs[]); #endif // _di_fll_fss_snatch_mash_apart_ /** @@ -560,7 +560,7 @@ extern "C" { * @see fl_string_compare_trim() */ #ifndef _di_fll_fss_snatch_together_ - extern f_status_t fll_fss_snatch_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_dynamic_t *values[], f_array_length_t *indexs[]); + extern f_status_t fll_fss_snatch_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_dynamic_t *values[], f_array_length_t *indexs[]); #endif // _di_fll_fss_snatch_together_ #ifdef __cplusplus diff --git a/level_2/fll_fss/c/fss_basic.c b/level_2/fll_fss/c/fss_basic.c index 644c3b6..ac840dd 100644 --- a/level_2/fll_fss/c/fss_basic.c +++ b/level_2/fll_fss/c/fss_basic.c @@ -15,7 +15,7 @@ extern "C" { f_status_t status = F_none; f_status_t status2 = F_none; - f_string_length_t initial_used = objects->used; + f_array_length_t initial_used = objects->used; bool found_data = F_false; @@ -141,7 +141,7 @@ extern "C" { if (objects_quoted) { objects_quoted->used++; } - } while (range->start < f_string_length_t_size); + } while (range->start < f_array_length_t_size); return F_status_is_error(F_number_overflow); } diff --git a/level_2/fll_fss/c/fss_basic_list.c b/level_2/fll_fss/c/fss_basic_list.c index 73f1540..a1e2722 100644 --- a/level_2/fll_fss/c/fss_basic_list.c +++ b/level_2/fll_fss/c/fss_basic_list.c @@ -15,7 +15,7 @@ extern "C" { f_status_t status = F_none; f_status_t status2 = F_none; - f_string_length_t initial_used = objects->used; + f_array_length_t initial_used = objects->used; bool found_data = F_false; @@ -119,7 +119,7 @@ extern "C" { objects->used++; contents->used++; - } while (range->start < f_string_length_t_size); + } while (range->start < f_array_length_t_size); return F_status_is_error(F_number_overflow); } diff --git a/level_2/fll_fss/c/fss_embedded_list.c b/level_2/fll_fss/c/fss_embedded_list.c index 635f8b3..9b79def 100644 --- a/level_2/fll_fss/c/fss_embedded_list.c +++ b/level_2/fll_fss/c/fss_embedded_list.c @@ -15,7 +15,7 @@ extern "C" { f_status_t status = F_none; f_status_t status2 = F_none; - f_string_length_t initial_used = 0; + f_array_length_t initial_used = 0; bool found_data = F_false; @@ -107,7 +107,7 @@ extern "C" { return F_none_stop; } - } while (range->start < f_string_length_t_size); + } while (range->start < f_array_length_t_size); return F_status_is_error(F_number_overflow); } diff --git a/level_2/fll_fss/c/fss_extended.c b/level_2/fll_fss/c/fss_extended.c index c310841..881b246 100644 --- a/level_2/fll_fss/c/fss_extended.c +++ b/level_2/fll_fss/c/fss_extended.c @@ -15,7 +15,7 @@ extern "C" { f_status_t status = F_none; f_status_t status2 = F_none; - f_string_length_t initial_used = objects->used; + f_array_length_t initial_used = objects->used; bool found_data = F_false; @@ -180,7 +180,7 @@ extern "C" { if (contents_quoted) { contents_quoted->used++; } - } while (range->start < f_string_length_t_size); + } while (range->start < f_array_length_t_size); return F_status_is_error(F_number_overflow); } diff --git a/level_2/fll_fss/c/fss_extended_list.c b/level_2/fll_fss/c/fss_extended_list.c index 0ec81ff..b64ab68 100644 --- a/level_2/fll_fss/c/fss_extended_list.c +++ b/level_2/fll_fss/c/fss_extended_list.c @@ -15,7 +15,7 @@ extern "C" { f_status_t status = F_none; f_status_t status2 = F_none; - f_string_length_t initial_used = objects->used; + f_array_length_t initial_used = objects->used; bool found_data = F_false; @@ -119,7 +119,7 @@ extern "C" { objects->used++; contents->used++; - } while (range->start < f_string_length_t_size); + } while (range->start < f_array_length_t_size); return F_status_is_error(F_number_overflow); } diff --git a/level_2/fll_fss/c/fss_status.c b/level_2/fll_fss/c/fss_status.c index 2438f3f..41a84e3 100644 --- a/level_2/fll_fss/c/fss_status.c +++ b/level_2/fll_fss/c/fss_status.c @@ -11,7 +11,7 @@ extern "C" { #endif // _di_level_2_parameter_checking_ f_status_t status = F_none; - const f_string_length_t length = strlen(string); + const f_array_length_t length = strlen(string); if (!length) { return F_data_not; diff --git a/level_2/fll_fss/c/private-fss.c b/level_2/fll_fss/c/private-fss.c index c7ef67a..7802e9e 100644 --- a/level_2/fll_fss/c/private-fss.c +++ b/level_2/fll_fss/c/private-fss.c @@ -7,7 +7,7 @@ extern "C" { #if !defined(_di_fll_fss_identify_) || !defined(_di_fll_fss_identify_file_) f_status_t private_fll_fss_identify(const f_string_static_t buffer, f_fss_header_t *header) { - register f_string_length_t i = 0; + register f_array_length_t i = 0; if (buffer.used < 10) { // "# fss-0000" is always at least 10 characters. diff --git a/level_2/fll_iki/c/private-iki.c b/level_2/fll_iki/c/private-iki.c index 685cce8..8103d81 100644 --- a/level_2/fll_iki/c/private-iki.c +++ b/level_2/fll_iki/c/private-iki.c @@ -15,9 +15,9 @@ extern "C" { if (F_status_is_error(status)) return status; } - f_string_length_t i = 0; - f_string_length_t j = 0; - f_string_length_t delimits = 0; + f_array_length_t i = 0; + f_array_length_t j = 0; + f_array_length_t delimits = 0; for (; i < content.used; i++) { @@ -79,11 +79,11 @@ extern "C" { if (F_status_is_error(status)) return status; } - f_string_length_t i = 0; - f_string_length_t j = 0; - f_string_length_t delimits = 0; + f_array_length_t i = 0; + f_array_length_t j = 0; + f_array_length_t delimits = 0; - const f_string_length_t used = unescaped->used; + const f_array_length_t used = unescaped->used; for (; i < content.used; i++) { diff --git a/level_2/fll_path/c/path.c b/level_2/fll_path/c/path.c index 9fc221d..74c2b65 100644 --- a/level_2/fll_path/c/path.c +++ b/level_2/fll_path/c/path.c @@ -11,13 +11,13 @@ extern "C" { #endif // _di_level_2_parameter_checking_ f_status_t status = F_none; - f_string_length_t at = 0; + f_array_length_t at = 0; uint8_t previous_1 = f_path_separator_s[0]; uint8_t previous_2 = 0; - f_string_length_t size_chunk = 0; - f_string_length_t position = 0; + f_array_length_t size_chunk = 0; + f_array_length_t position = 0; canonical->used = 0; diff --git a/level_2/fll_path/c/path.h b/level_2/fll_path/c/path.h index e178100..776bd0a 100644 --- a/level_2/fll_path/c/path.h +++ b/level_2/fll_path/c/path.h @@ -33,7 +33,7 @@ extern "C" { * This does not check if the path exists or not. * This processes the relative parts: './', '../', and extra '/'. * This does not process symbolic links. - * This has a max size of f_string_length_t_size. + * This has a max size of f_array_length_t_size. * * @param path * The source path to determine what the canonical path is. diff --git a/level_2/fll_program/c/program.c b/level_2/fll_program/c/program.c index e26b6b4..f8d4794 100644 --- a/level_2/fll_program/c/program.c +++ b/level_2/fll_program/c/program.c @@ -98,7 +98,7 @@ extern "C" { #endif // _di_fll_program_print_version_ #ifndef _di_fll_program_parameter_process_ - f_status_t fll_program_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, const f_console_parameter_ids_t choices, const bool right, f_string_lengths_t *remaining, f_color_context_t *context) { + f_status_t fll_program_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, const f_console_parameter_ids_t choices, const bool right, f_array_lengths_t *remaining, f_color_context_t *context) { f_status_t status = F_none; status = f_console_parameter_process(arguments, parameters, remaining); @@ -141,12 +141,12 @@ extern "C" { f_status_t status = F_none; - f_string_length_t length = 0; - const f_string_length_t start = destination->used; + f_array_length_t length = 0; + const f_array_length_t start = destination->used; - for (f_string_length_t i = 0; i < values.used; i++) { + for (f_array_length_t i = 0; i < values.used; i++) { - length = strnlen(argv[values.array[i]], f_console_length_size); + length = strnlen(argv[values.array[i]], f_console_parameter_size); if (length > 0) { f_string_dynamic_t ripped = f_string_dynamic_t_initialize; @@ -176,7 +176,7 @@ extern "C" { #endif // _di_fll_program_parameter_additional_append_ #ifndef _di_fll_program_parameter_additional_mash_ - f_status_t fll_program_parameter_additional_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_t *argv, const f_array_lengths_t values, f_string_dynamic_t *destination) { + f_status_t fll_program_parameter_additional_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_t *argv, const f_array_lengths_t values, f_string_dynamic_t *destination) { #ifndef _di_level_2_parameter_checking_ if (!argv) return F_status_set_error(F_parameter); if (glue_length < 1) return F_status_set_error(F_parameter); @@ -185,12 +185,12 @@ extern "C" { f_status_t status = F_none; - f_string_length_t length = 0; - const f_string_length_t start = destination->used; + f_array_length_t length = 0; + const f_array_length_t start = destination->used; - for (f_string_length_t i = 0; i < values.used; i++) { + for (f_array_length_t i = 0; i < values.used; i++) { - length = strnlen(argv[values.array[i]], f_console_length_size); + length = strnlen(argv[values.array[i]], f_console_parameter_size); if (length > 0) { status = f_string_mash(glue, glue_length, argv[values.array[i]], length, destination); @@ -214,12 +214,12 @@ extern "C" { #endif // _di_level_2_parameter_checking_ f_status_t status = F_none; - f_string_length_t length = 0; - const f_string_length_t start = destination->used; + f_array_length_t length = 0; + const f_array_length_t start = destination->used; - for (f_string_length_t i = 0; i < values.used; i++) { + for (f_array_length_t i = 0; i < values.used; i++) { - length = strnlen(argv[values.array[i]], f_console_length_size); + length = strnlen(argv[values.array[i]], f_console_parameter_size); if (length > 0) { f_string_dynamic_t ripped = f_string_dynamic_t_initialize; @@ -249,7 +249,7 @@ extern "C" { #endif // _di_fll_program_parameter_additional_rip_ #ifndef _di_fll_program_parameter_additional_rip_mash_ - f_status_t fll_program_parameter_additional_rip_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_t *argv, const f_array_lengths_t values, f_string_dynamic_t *destination) { + f_status_t fll_program_parameter_additional_rip_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_t *argv, const f_array_lengths_t values, f_string_dynamic_t *destination) { #ifndef _di_level_2_parameter_checking_ if (!argv) return F_status_set_error(F_parameter); if (glue_length < 1) return F_status_set_error(F_parameter); @@ -258,13 +258,13 @@ extern "C" { f_status_t status = F_none; - f_string_length_t length = 0; - const f_string_length_t start = destination->used; + f_array_length_t length = 0; + const f_array_length_t start = destination->used; f_string_dynamic_t ripped = f_string_dynamic_t_initialize; - for (f_string_length_t i = 0; i < values.used; i++) { + for (f_array_length_t i = 0; i < values.used; i++) { - length = strnlen(argv[values.array[i]], f_console_length_size); + length = strnlen(argv[values.array[i]], f_console_parameter_size); if (length > 0) { status = fl_string_rip(argv[values.array[i]], length, &ripped); diff --git a/level_2/fll_program/c/program.h b/level_2/fll_program/c/program.h index d87be09..f70eeac 100644 --- a/level_2/fll_program/c/program.h +++ b/level_2/fll_program/c/program.h @@ -202,7 +202,7 @@ extern "C" { * @see fl_color_load_context() */ #ifndef _di_fll_program_parameter_process_ - extern f_status_t fll_program_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, const f_console_parameter_ids_t choices, const bool right, f_string_lengths_t *remaining, f_color_context_t *context); + extern f_status_t fll_program_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, const f_console_parameter_ids_t choices, const bool right, f_array_lengths_t *remaining, f_color_context_t *context); #endif // _di_fll_program_parameter_process_ /** @@ -260,7 +260,7 @@ extern "C" { * @see f_string_mash() */ #ifndef _di_fll_program_parameter_additional_mash_ - extern f_status_t fll_program_parameter_additional_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_t *argv, const f_array_lengths_t values, f_string_dynamic_t *destination); + extern f_status_t fll_program_parameter_additional_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_t *argv, const f_array_lengths_t values, f_string_dynamic_t *destination); #endif // _di_fll_program_parameter_additional_mash_ /** @@ -319,7 +319,7 @@ extern "C" { * @see fl_string_rip() */ #ifndef _di_fll_program_parameter_additional_rip_mash_ - extern f_status_t fll_program_parameter_additional_rip_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_t *argv, const f_array_lengths_t values, f_string_dynamic_t *destination); + extern f_status_t fll_program_parameter_additional_rip_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_t *argv, const f_array_lengths_t values, f_string_dynamic_t *destination); #endif // _di_fll_program_parameter_additional_rip_mash_ #ifdef __cplusplus diff --git a/level_2/fll_status/c/status.c b/level_2/fll_status/c/status.c index 18f7729..066a5b0 100644 --- a/level_2/fll_status/c/status.c +++ b/level_2/fll_status/c/status.c @@ -11,7 +11,7 @@ extern "C" { #endif // _di_level_2_parameter_checking_ f_status_t status = F_none; - const f_string_length_t length = strlen(string); + const f_array_length_t length = strlen(string); if (!length) { return F_data_not; diff --git a/level_3/byte_dump/c/byte_dump.c b/level_3/byte_dump/c/byte_dump.c index 65c0944..9356eaa 100644 --- a/level_3/byte_dump/c/byte_dump.c +++ b/level_3/byte_dump/c/byte_dump.c @@ -229,7 +229,7 @@ extern "C" { return F_status_set_error(status); } else if (data->parameters[byte_dump_parameter_width].result == f_console_result_additional) { - const f_string_length_t index = data->parameters[byte_dump_parameter_width].values.array[data->parameters[byte_dump_parameter_width].values.used - 1]; + const f_array_length_t index = data->parameters[byte_dump_parameter_width].values.array[data->parameters[byte_dump_parameter_width].values.used - 1]; const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index])); f_number_unsigned_t number = 0; @@ -261,7 +261,7 @@ extern "C" { return F_status_set_error(status); } else if (data->parameters[byte_dump_parameter_first].result == f_console_result_additional) { - const f_string_length_t index = data->parameters[byte_dump_parameter_first].values.array[data->parameters[byte_dump_parameter_first].values.used - 1]; + const f_array_length_t index = data->parameters[byte_dump_parameter_first].values.array[data->parameters[byte_dump_parameter_first].values.used - 1]; const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index])); f_number_unsigned_t number = 0; @@ -293,7 +293,7 @@ extern "C" { return F_status_set_error(status); } else if (data->parameters[byte_dump_parameter_last].result == f_console_result_additional) { - const f_string_length_t index = data->parameters[byte_dump_parameter_last].values.array[data->parameters[byte_dump_parameter_last].values.used - 1]; + const f_array_length_t index = data->parameters[byte_dump_parameter_last].values.array[data->parameters[byte_dump_parameter_last].values.used - 1]; const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index])); f_number_unsigned_t number = 0; @@ -459,13 +459,13 @@ extern "C" { #ifndef _di_byte_dump_delete_data_ f_status_t byte_dump_delete_data(byte_dump_data_t *data) { - for (f_string_length_t i = 0; i < byte_dump_total_parameters; i++) { - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations); - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub); - f_macro_string_lengths_t_delete_simple(data->parameters[i].values); + for (f_array_length_t i = 0; i < byte_dump_total_parameters; i++) { + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations); + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub); + f_macro_array_lengths_t_delete_simple(data->parameters[i].values); } // for - f_macro_string_lengths_t_delete_simple(data->remaining); + f_macro_array_lengths_t_delete_simple(data->remaining); f_macro_color_context_t_delete_simple(data->context); diff --git a/level_3/byte_dump/c/byte_dump.h b/level_3/byte_dump/c/byte_dump.h index 3ed90de..f474ee3 100644 --- a/level_3/byte_dump/c/byte_dump.h +++ b/level_3/byte_dump/c/byte_dump.h @@ -211,7 +211,7 @@ extern "C" { typedef struct { f_console_parameter_t parameters[byte_dump_total_parameters]; - f_string_lengths_t remaining; + f_array_lengths_t remaining; bool process_pipe; f_file_t output; @@ -229,7 +229,7 @@ extern "C" { #define byte_dump_data_t_initialize \ { \ byte_dump_console_parameter_t_initialize, \ - f_string_lengths_t_initialize, \ + f_array_lengths_t_initialize, \ F_false, \ f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \ fll_error_print_t_initialize, \ diff --git a/level_3/byte_dump/c/private-byte_dump.c b/level_3/byte_dump/c/private-byte_dump.c index 693d070..3ed6c1a 100644 --- a/level_3/byte_dump/c/private-byte_dump.c +++ b/level_3/byte_dump/c/private-byte_dump.c @@ -27,7 +27,7 @@ extern "C" { // Store the current character data until it can be printed. f_utf_string_dynamic_t characters = f_utf_string_dynamic_t_initialize; f_utf_character_t character_array[data.width]; - f_string_length_t character_current = 0; + f_array_length_t character_current = 0; // The row starts based on the first byte starting point and how many columns of bytes are displayed per row. if (data.first > 0) { @@ -240,7 +240,7 @@ extern "C" { bool reset = F_false; - f_string_length_t character_current = characters.used - 1; + f_array_length_t character_current = characters.used - 1; if (byte_current == 1) { byte = f_macro_utf_character_t_to_char_1(characters.string[character_current]); diff --git a/level_3/control/c/control.c b/level_3/control/c/control.c index da7fa3f..843bf8c 100644 --- a/level_3/control/c/control.c +++ b/level_3/control/c/control.c @@ -135,13 +135,13 @@ extern "C" { #ifndef _di_control_delete_data_ f_status_t control_delete_data(control_data_t *data) { - for (f_string_length_t i = 0; i < control_total_parameters; i++) { - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations); - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub); - f_macro_string_lengths_t_delete_simple(data->parameters[i].values); + for (f_array_length_t i = 0; i < control_total_parameters; i++) { + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations); + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub); + f_macro_array_lengths_t_delete_simple(data->parameters[i].values); } // for - f_macro_string_lengths_t_delete_simple(data->remaining); + f_macro_array_lengths_t_delete_simple(data->remaining); f_macro_color_context_t_delete_simple(data->context); diff --git a/level_3/control/c/control.h b/level_3/control/c/control.h index da0f9ca..e6d10fd 100644 --- a/level_3/control/c/control.h +++ b/level_3/control/c/control.h @@ -86,7 +86,7 @@ extern "C" { typedef struct { f_console_parameter_t parameters[control_total_parameters]; - f_string_lengths_t remaining; + f_array_lengths_t remaining; bool process_pipe; f_file_t output; @@ -99,7 +99,7 @@ extern "C" { #define control_data_initialize \ { \ control_console_parameter_t_initialize, \ - f_string_lengths_t_initialize, \ + f_array_lengths_t_initialize, \ F_false, \ f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \ fll_error_print_t_initialize, \ diff --git a/level_3/fake/c/fake.c b/level_3/fake/c/fake.c index 388f266..547cf5a 100644 --- a/level_3/fake/c/fake.c +++ b/level_3/fake/c/fake.c @@ -182,9 +182,9 @@ extern "C" { { f_array_length_t locations[operations_length]; f_array_length_t locations_length = 0; - f_string_length_t i = 0; - f_string_length_t j = 0; - f_string_length_t k = 0; + f_array_length_t i = 0; + f_array_length_t j = 0; + f_array_length_t k = 0; for (; i < data->parameters[fake_parameter_operation_build].locations.used; i++, locations_length++) { @@ -379,13 +379,13 @@ extern "C" { #ifndef _di_fake_delete_data_ f_status_t fake_delete_data(fake_data_t *data) { - for (f_string_length_t i = 0; i < fake_total_parameters; i++) { - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations); - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub); - f_macro_string_lengths_t_delete_simple(data->parameters[i].values); + for (f_array_length_t i = 0; i < fake_total_parameters; i++) { + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations); + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub); + f_macro_array_lengths_t_delete_simple(data->parameters[i].values); } // for - f_macro_string_lengths_t_delete_simple(data->remaining); + f_macro_array_lengths_t_delete_simple(data->remaining); f_macro_string_dynamics_t_delete_simple(data->define); f_macro_string_dynamic_t_delete_simple(data->fakefile); diff --git a/level_3/fake/c/fake.h b/level_3/fake/c/fake.h index d15f95e..7999724 100644 --- a/level_3/fake/c/fake.h +++ b/level_3/fake/c/fake.h @@ -371,7 +371,7 @@ extern "C" { typedef struct { f_console_parameter_t parameters[fake_total_parameters]; - f_string_lengths_t remaining; + f_array_lengths_t remaining; bool process_pipe; f_file_t output; @@ -442,7 +442,7 @@ extern "C" { #define fake_data_t_initialize \ { \ fake_console_parameter_t_initialize, \ - f_string_lengths_t_initialize, \ + f_array_lengths_t_initialize, \ F_false, \ f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \ fll_error_print_t_initialize, \ diff --git a/level_3/fake/c/private-build.c b/level_3/fake/c/private-build.c index a7f8f7d..1bd31a8 100644 --- a/level_3/fake/c/private-build.c +++ b/level_3/fake/c/private-build.c @@ -12,7 +12,7 @@ extern "C" { void fake_build_arguments_standard_add(const fake_data_t data, const fake_build_data_t data_build, const bool is_shared, const bool is_library, f_string_dynamics_t *arguments, f_status_t *status) { if (F_status_is_error(*status)) return; - f_string_length_t build_libraries_length = fake_build_parameter_library_link_path_length + data.path_build_libraries_shared.used; + f_array_length_t build_libraries_length = fake_build_parameter_library_link_path_length + data.path_build_libraries_shared.used; char build_libraries[build_libraries_length + 1]; @@ -27,7 +27,7 @@ extern "C" { build_libraries[build_libraries_length] = 0; - f_string_length_t build_includes_length = fake_build_parameter_library_include_length + data.path_build_includes.used; + f_array_length_t build_includes_length = fake_build_parameter_library_include_length + data.path_build_includes.used; char build_includes[build_includes_length + 1]; @@ -39,7 +39,7 @@ extern "C" { build_includes, }; - const f_string_length_t lengths[] = { + const f_array_length_t lengths[] = { build_libraries_length, build_includes_length, }; @@ -50,7 +50,7 @@ extern "C" { } // for if (data.path_work.used > 0) { - f_string_length_t length = 0; + f_array_length_t length = 0; if (F_status_is_error_not(*status)) { length = fake_build_parameter_library_include_length + data.path_work_includes.used; @@ -128,7 +128,7 @@ extern "C" { } if (data.define.used) { - f_string_length_t length = 0; + f_array_length_t length = 0; f_array_length_t i = 0; for (; i < data.define.used && F_status_is_error_not(*status); i++) { @@ -138,7 +138,7 @@ extern "C" { } // for } else { - f_string_length_t length = 0; + f_array_length_t length = 0; f_array_length_t i = 0; for (; i < data_build.setting.defines_all.used && F_status_is_error_not(*status); i++) { @@ -166,7 +166,7 @@ extern "C" { #endif // _di_fake_build_arguments_standard_add_ #ifndef _di_fake_build_copy_ - void fake_build_copy(const fake_data_t data, const f_mode_t mode, const f_string_t label, const f_string_static_t source, const f_string_static_t destination, const f_string_statics_t files, const f_string_static_t file_stage, const f_string_length_t preserve, f_status_t *status) { + void fake_build_copy(const fake_data_t data, const f_mode_t mode, const f_string_t label, const f_string_static_t source, const f_string_static_t destination, const f_string_statics_t files, const f_string_static_t file_stage, const f_array_length_t preserve, f_status_t *status) { if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true || *status == F_child) return; if (fake_signal_received(data)) { @@ -264,7 +264,7 @@ extern "C" { if (F_status_is_error(*status)) { if (data.error.verbosity == f_console_verbosity_verbose) { - for (f_string_length_t j = 0; j < failures.used; j++) { + for (f_array_length_t j = 0; j < failures.used; j++) { fake_print_error_build_operation_file(data, F_status_set_fine(*status), "fl_directory_copy", "copy directory", "to", path_source.string, destination_directory.string, F_true); } // for @@ -389,7 +389,7 @@ extern "C" { } f_string_static_t path_headers = f_string_static_t_initialize; - f_string_length_t directory_headers_length = data.path_build_includes.used + data_build.setting.path_headers.used; + f_array_length_t directory_headers_length = data.path_build_includes.used + data_build.setting.path_headers.used; char directory_headers[directory_headers_length + 1]; @@ -562,7 +562,7 @@ extern "C" { f_console_symbol_short_enable_s, }; - const f_string_length_t parameters_prefix_length[] = { + const f_array_length_t parameters_prefix_length[] = { f_console_symbol_short_enable_length, f_console_symbol_short_enable_length, f_console_symbol_short_enable_length, @@ -582,7 +582,7 @@ extern "C" { fake_short_path_work, }; - const f_string_length_t parameters_name_length[] = { + const f_array_length_t parameters_name_length[] = { fake_short_define_length, fake_short_process_length, fake_short_settings_length, @@ -602,7 +602,7 @@ extern "C" { data.path_work.string, }; - const f_string_length_t parameters_value_length[] = { + const f_array_length_t parameters_value_length[] = { defines.used, data.process.used, data.settings.used, @@ -715,7 +715,7 @@ extern "C" { return status; } - f_string_length_t i = name->used; + f_array_length_t i = name->used; for (; i > 0; i--) { if (name->string[i] == f_path_extension_separator[0]) { @@ -774,7 +774,7 @@ extern "C" { path_sources = &data_build.setting.path_sources; } - f_string_length_t source_length = 0; + f_array_length_t source_length = 0; for (f_array_length_t i = 0; i < data_build.setting.build_sources_library.used; i++) { @@ -798,10 +798,10 @@ extern "C" { } } - f_string_length_t parameter_file_name_length = fake_build_parameter_library_name_prefix_length; - f_string_length_t parameter_file_name_major_length = fake_build_parameter_library_name_prefix_length; - f_string_length_t parameter_file_name_minor_length = fake_build_parameter_library_name_prefix_length; - f_string_length_t parameter_file_name_micro_length = fake_build_parameter_library_name_prefix_length; + f_array_length_t parameter_file_name_length = fake_build_parameter_library_name_prefix_length; + f_array_length_t parameter_file_name_major_length = fake_build_parameter_library_name_prefix_length; + f_array_length_t parameter_file_name_minor_length = fake_build_parameter_library_name_prefix_length; + f_array_length_t parameter_file_name_micro_length = fake_build_parameter_library_name_prefix_length; parameter_file_name_micro_length += data_build.setting.project_name.used + fake_build_parameter_library_name_suffix_shared_length; parameter_file_name_length = parameter_file_name_micro_length; @@ -871,7 +871,7 @@ extern "C" { parameter_file_name_micro[parameter_file_name_micro_length] = 0; { - f_string_length_t parameter_file_path_length = data.path_build_libraries_shared.used + parameter_file_name_micro_length; + f_array_length_t parameter_file_path_length = data.path_build_libraries_shared.used + parameter_file_name_micro_length; char parameter_file_path[parameter_file_path_length + 1]; @@ -880,7 +880,7 @@ extern "C" { parameter_file_path[parameter_file_path_length] = 0; - f_string_length_t parameter_linker_length = fake_build_parameter_library_shared_prefix_length; + f_array_length_t parameter_linker_length = fake_build_parameter_library_shared_prefix_length; if (data_build.setting.version_target == fake_build_version_type_major) { parameter_linker_length += parameter_file_name_major_length; @@ -915,7 +915,7 @@ extern "C" { parameter_file_path, }; - const f_string_length_t lengths[] = { + const f_array_length_t lengths[] = { fake_build_parameter_library_shared_length, parameter_linker_length, fake_build_parameter_library_output_length, @@ -952,7 +952,7 @@ extern "C" { } if (data_build.setting.version_target != fake_build_version_type_micro) { - f_string_length_t parameter_file_path_length = data.path_build_libraries_shared.used; + f_array_length_t parameter_file_path_length = data.path_build_libraries_shared.used; if (data_build.setting.version_target == fake_build_version_type_major) { parameter_file_path_length += parameter_file_name_major_length; @@ -997,7 +997,7 @@ extern "C" { } if (F_status_is_error_not(*status)) { - f_string_length_t parameter_file_path_length = data.path_build_libraries_shared.used + parameter_file_name_length; + f_array_length_t parameter_file_path_length = data.path_build_libraries_shared.used + parameter_file_name_length; char parameter_file_path[parameter_file_path_length + 1]; @@ -1082,7 +1082,7 @@ extern "C" { *status = fll_execute_arguments_add(fake_build_parameter_object_link_arguments, fake_build_parameter_object_link_arguments_length, &arguments); if (F_status_is_error_not(*status)) { - f_string_length_t destination_length = data.path_build_libraries_static.used + fake_build_parameter_library_name_prefix_length; + f_array_length_t destination_length = data.path_build_libraries_static.used + fake_build_parameter_library_name_prefix_length; destination_length += data_build.setting.project_name.used + fake_build_parameter_library_name_suffix_static_length; char destination[destination_length + 1]; @@ -1107,7 +1107,7 @@ extern "C" { } if (F_status_is_error_not(*status)) { - f_string_length_t source_length = 0; + f_array_length_t source_length = 0; for (f_array_length_t i = 0; i < data_build.setting.build_sources_library.used; i++) { source_path.used = 0; @@ -1220,7 +1220,7 @@ extern "C" { f_path_present_working_s }; - const f_string_length_t variables_length[] = { + const f_array_length_t variables_length[] = { f_path_environment_length, f_path_present_working_length }; @@ -1420,7 +1420,7 @@ extern "C" { fake_build_setting_name_version_target, }; - const f_string_length_t settings_length[] = { + const f_array_length_t settings_length[] = { fake_build_setting_name_build_compiler_length, fake_build_setting_name_build_indexer_length, fake_build_setting_name_build_language_length, @@ -1551,7 +1551,7 @@ extern "C" { f_string_dynamic_t settings_mode_name_dynamic[fake_build_setting_total]; f_string_t settings_mode_names[fake_build_setting_total]; - f_string_length_t setting_mode_lengths[fake_build_setting_total]; + f_array_length_t setting_mode_lengths[fake_build_setting_total]; const f_string_dynamics_t *modes = &setting->modes_default; bool found = F_false; @@ -1593,7 +1593,7 @@ extern "C" { memset(&settings_mode_name_dynamic, 0, sizeof(f_string_dynamic_t) * fake_build_setting_total); memset(&settings_mode_names, 0, sizeof(f_string_t) * fake_build_setting_total); - memset(&setting_mode_lengths, 0, sizeof(f_string_length_t) * fake_build_setting_total); + memset(&setting_mode_lengths, 0, sizeof(f_array_length_t) * fake_build_setting_total); for (j = 0; j < fake_build_setting_total; j++) { @@ -2031,7 +2031,7 @@ extern "C" { fake_build_setting_default_version, }; - const f_string_length_t lengths[] = { + const f_array_length_t lengths[] = { fake_build_setting_default_version_length, fake_build_setting_default_version_length, fake_build_setting_default_version_length, @@ -2200,7 +2200,7 @@ extern "C" { fake_build_stage_sources_settings, }; - const f_string_length_t lengths[] = { + const f_array_length_t lengths[] = { fake_build_stage_libraries_script_length, fake_build_stage_libraries_shared_length, fake_build_stage_libraries_static_length, @@ -2327,8 +2327,8 @@ extern "C" { f_string_dynamic_t file_name = f_string_dynamic_t_initialize; f_string_dynamic_t destination_path = f_string_dynamic_t_initialize; f_string_dynamics_t arguments = f_string_dynamics_t_initialize; - f_string_length_t source_length = 0; - f_string_length_t destination_length = 0; + f_array_length_t source_length = 0; + f_array_length_t destination_length = 0; const f_string_static_t *path_sources = &data.path_sources; @@ -2473,7 +2473,7 @@ extern "C" { destination, }; - const f_string_length_t lengths[] = { + const f_array_length_t lengths[] = { source_length, fake_build_parameter_object_compile_length, fake_build_parameter_object_static_length, @@ -2580,10 +2580,10 @@ extern "C" { path_sources = &data_build.setting.path_sources; } - const f_string_length_t path_sources_base_length = path_sources->used; + const f_array_length_t path_sources_base_length = path_sources->used; f_string_static_t path_headers = f_string_static_t_initialize; - f_string_length_t directory_headers_length = data->path_build_includes.used + data_build.setting.path_headers.used; + f_array_length_t directory_headers_length = data->path_build_includes.used + data_build.setting.path_headers.used; char directory_headers[directory_headers_length + 1]; @@ -2682,7 +2682,7 @@ extern "C" { path_sources = &data_build.setting.path_sources; } - f_string_length_t source_length = 0; + f_array_length_t source_length = 0; for (f_array_length_t i = 0; i < data_build.setting.build_sources_program.used; i++) { source_length = path_sources->used + data_build.setting.build_sources_program.array[i].used; @@ -2699,7 +2699,7 @@ extern "C" { } if (F_status_is_error_not(*status)) { - f_string_length_t parameter_file_name_path_length = data.path_build_programs_shared.used + data_build.setting.project_name.used; + f_array_length_t parameter_file_name_path_length = data.path_build_programs_shared.used + data_build.setting.project_name.used; char parameter_file_name_path[parameter_file_name_path_length + 1]; @@ -2712,7 +2712,7 @@ extern "C" { parameter_file_name_path, }; - const f_string_length_t lengths[] = { + const f_array_length_t lengths[] = { fake_build_parameter_library_output_length, parameter_file_name_path_length, }; @@ -2725,7 +2725,7 @@ extern "C" { // if project-specific library sources exist, then the -lproject_name needs to be added to the arguments. if (F_status_is_error_not(*status) && data_build.setting.build_sources_library.used > 0) { - f_string_length_t link_project_library_length = fake_build_parameter_library_link_file_length + data_build.setting.project_name.used; + f_array_length_t link_project_library_length = fake_build_parameter_library_link_file_length + data_build.setting.project_name.used; char link_project_library[link_project_library_length + 1]; @@ -2784,7 +2784,7 @@ extern "C" { path_sources = &data_build.setting.path_sources; } - f_string_length_t source_length = 0; + f_array_length_t source_length = 0; for (f_array_length_t i = 0; i < data_build.setting.build_sources_program.used; i++) { if (!data_build.setting.build_sources_program.array[i].used) continue; @@ -2803,7 +2803,7 @@ extern "C" { } if (F_status_is_error_not(*status)) { - f_string_length_t source_library_length = data.path_build_libraries_static.used + fake_build_parameter_library_name_prefix_length + data_build.setting.project_name.used + fake_build_parameter_library_name_suffix_static_length; + f_array_length_t source_library_length = data.path_build_libraries_static.used + fake_build_parameter_library_name_prefix_length + data_build.setting.project_name.used + fake_build_parameter_library_name_suffix_static_length; char source_library[source_library_length + 1]; @@ -2826,7 +2826,7 @@ extern "C" { source_library[source_library_length] = 0; - f_string_length_t parameter_file_name_path_length = data.path_build_programs_static.used + data_build.setting.project_name.used; + f_array_length_t parameter_file_name_path_length = data.path_build_programs_static.used + data_build.setting.project_name.used; char parameter_file_name_path[parameter_file_name_path_length + 1]; @@ -2841,7 +2841,7 @@ extern "C" { parameter_file_name_path, }; - const f_string_length_t lengths[] = { + const f_array_length_t lengths[] = { source_library_length, fake_build_parameter_library_static_length, fake_build_parameter_library_output_length, diff --git a/level_3/fake/c/private-build.h b/level_3/fake/c/private-build.h index e13d7e8..cab277a 100644 --- a/level_3/fake/c/private-build.h +++ b/level_3/fake/c/private-build.h @@ -444,7 +444,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_copy_ - extern void fake_build_copy(const fake_data_t data, const f_mode_t mode, const f_string_t label, const f_string_static_t source, const f_string_static_t destination, const f_string_statics_t files, const f_string_static_t file_stage, const f_string_length_t preserve, f_status_t *status) f_gcc_attribute_visibility_internal; + extern void fake_build_copy(const fake_data_t data, const f_mode_t mode, const f_string_t label, const f_string_static_t source, const f_string_static_t destination, const f_string_statics_t files, const f_string_static_t file_stage, const f_array_length_t preserve, f_status_t *status) f_gcc_attribute_visibility_internal; #endif // _di_fake_build_copy_ /** diff --git a/level_3/fake/c/private-fake.c b/level_3/fake/c/private-fake.c index e132de0..9d09ae7 100644 --- a/level_3/fake/c/private-fake.c +++ b/level_3/fake/c/private-fake.c @@ -95,7 +95,7 @@ extern "C" { if (status == F_true) { { - f_string_length_t size_file = 0; + f_array_length_t size_file = 0; name_function = "f_file_size"; status = f_file_size(path_file, F_true, &size_file); @@ -225,7 +225,7 @@ extern "C" { fake_path_part_script, }; - const f_string_length_t parameters_length[] = { + const f_array_length_t parameters_length[] = { fake_path_part_documents_length, fake_path_part_includes_length, fake_path_part_libraries_length, @@ -350,7 +350,7 @@ extern "C" { fake_file_readme, }; - const f_string_length_t parameters_length[] = { + const f_array_length_t parameters_length[] = { fake_path_part_script_length, fake_path_part_shared_length, fake_path_part_static_length, @@ -413,7 +413,7 @@ extern "C" { fake_path_part_programs, }; - const f_string_length_t parameters_length[] = { + const f_array_length_t parameters_length[] = { fake_path_part_includes_length, fake_path_part_libraries_length, fake_path_part_programs_length, @@ -483,7 +483,7 @@ extern "C" { fake_path_part_static, }; - const f_string_length_t parameters_length[] = { + const f_array_length_t parameters_length[] = { fake_path_part_script_length, fake_path_part_shared_length, fake_path_part_static_length, @@ -604,7 +604,7 @@ extern "C" { fake_default_settings, }; - const f_string_length_t parameter_default_lengths[] = { + const f_array_length_t parameter_default_lengths[] = { fake_default_fakefile_length, fake_default_process_length, fake_default_settings_length, @@ -634,13 +634,13 @@ extern "C" { return F_status_set_error(F_parameter); } - f_string_length_t location = data->parameters[parameters_id[i]].values.array[0]; - f_string_length_t length = strnlen(arguments.argv[location], f_console_length_size); + f_array_length_t location = data->parameters[parameters_id[i]].values.array[0]; + f_array_length_t length = strnlen(arguments.argv[location], f_console_parameter_size); if (length > 0) { if (parameters_validate_word[i]) { - f_string_length_t j = 0; - f_string_length_t width_max = 0; + f_array_length_t j = 0; + f_array_length_t width_max = 0; for (j = 0; j < length; j++) { width_max = length - j; @@ -745,7 +745,7 @@ extern "C" { fake_default_path_work, }; - const f_string_length_t parameter_default_lengths[] = { + const f_array_length_t parameter_default_lengths[] = { fake_default_path_build_length, fake_default_path_data_length, fake_default_path_sources_length, @@ -819,8 +819,8 @@ extern "C" { } f_array_length_t i = 0; - f_string_length_t j = 0; - f_string_length_t width_max = 0; + f_array_length_t j = 0; + f_array_length_t width_max = 0; for (; i < data->define.used; i++) { @@ -876,8 +876,8 @@ extern "C" { } f_array_length_t i = 0; - f_string_length_t j = 0; - f_string_length_t width_max = 0; + f_array_length_t j = 0; + f_array_length_t width_max = 0; for (; i < data->mode.used; i++) { @@ -974,7 +974,7 @@ extern "C" { fake_default_path_work, }; - const f_string_length_t parameter_default_lengths[] = { + const f_array_length_t parameter_default_lengths[] = { fake_default_path_build_length, fake_default_path_data_length, fake_default_path_work_length, diff --git a/level_3/fake/c/private-make.c b/level_3/fake/c/private-make.c index 1eb7907..96b7497 100644 --- a/level_3/fake/c/private-make.c +++ b/level_3/fake/c/private-make.c @@ -668,7 +668,7 @@ extern "C" { fake_make_setting_parameter, }; - const f_string_length_t settings_length[] = { + const f_array_length_t settings_length[] = { fake_make_setting_define_length, fake_make_setting_parameter_length, }; @@ -1062,7 +1062,7 @@ extern "C" { f_status_t status = F_none; f_mode_t mode = f_mode_t_initialize; - f_string_lengths_t section_stack = f_string_lengths_t_initialize; + f_array_lengths_t section_stack = f_array_lengths_t_initialize; fake_make_data_t data_make = fake_make_data_t_initialize; status = f_string_dynamics_increase(&data_make.path.stack); @@ -1160,7 +1160,7 @@ extern "C" { f_file_stream_close(F_true, &data_make.path.top); - f_macro_string_lengths_t_delete_simple(section_stack); + f_macro_array_lengths_t_delete_simple(section_stack); fake_macro_make_data_t_delete_simple(data_make); // signal is set with error code only to prevent further execution above, return without the error bit set. @@ -1211,7 +1211,7 @@ extern "C" { f_array_length_t used_arguments = 0; - f_string_length_t previous = 0; + f_array_length_t previous = 0; const f_string_t reserved_name[] = { fake_make_parameter_variable_build, @@ -1227,7 +1227,7 @@ extern "C" { fake_make_parameter_variable_work, }; - const f_string_length_t reserved_length[] = { + const f_array_length_t reserved_length[] = { fake_make_parameter_variable_build_length, fake_make_parameter_variable_color_length, fake_make_parameter_variable_data_length, @@ -1564,7 +1564,7 @@ extern "C" { fake_build_setting_name_version_target, }; - const f_string_length_t uint8_length[] = { + const f_array_length_t uint8_length[] = { fake_build_setting_name_build_language_length, fake_build_setting_name_version_target_length, }; @@ -1598,7 +1598,7 @@ extern "C" { fake_build_setting_name_search_static, }; - const f_string_length_t bool_length[] = { + const f_array_length_t bool_length[] = { fake_build_setting_name_build_script_length, fake_build_setting_name_build_shared_length, fake_build_setting_name_build_static_length, @@ -1658,7 +1658,7 @@ extern "C" { fake_build_setting_name_version_minor, }; - const f_string_length_t dynamic_length[] = { + const f_array_length_t dynamic_length[] = { fake_build_setting_name_build_compiler_length, fake_build_setting_name_build_indexer_length, fake_build_setting_name_path_headers_length, @@ -1732,7 +1732,7 @@ extern "C" { fake_build_setting_name_modes_default, }; - const f_string_length_t dynamics_length[] = { + const f_array_length_t dynamics_length[] = { fake_build_setting_name_build_libraries_length, fake_build_setting_name_build_sources_headers_length, fake_build_setting_name_build_sources_library_length, @@ -1889,7 +1889,7 @@ extern "C" { #endif // _di_fake_make_operate_expand_environment_ #ifndef _di_fake_make_operate_section_ - int fake_make_operate_section(const f_array_length_t id_section, fake_data_t *data, fake_make_data_t *data_make, f_string_lengths_t *section_stack, f_status_t *status) { + int fake_make_operate_section(const f_array_length_t id_section, fake_data_t *data, fake_make_data_t *data_make, f_array_lengths_t *section_stack, f_status_t *status) { if (F_status_is_error(*status) || *status == F_child) return data->child; if (fake_signal_received(*data)) { @@ -1906,15 +1906,14 @@ extern "C" { // add the operation id to the operation stack. if (section_stack->used + 1 > section_stack->size) { - f_macro_string_lengths_t_increase_by((*status), (*section_stack), f_memory_default_allocation_step); + f_macro_array_lengths_t_increase_by((*status), (*section_stack), f_memory_default_allocation_step); if (F_status_is_error(*status)) { - fll_error_print(data_make->error, F_status_set_fine(*status), "f_macro_string_lengths_t_increase_by", F_true); + fll_error_print(data_make->error, F_status_set_fine(*status), "f_macro_array_lengths_t_increase_by", F_true); return 0; } } - section_stack->array[section_stack->used] = id_section; section_stack->used++; @@ -2278,7 +2277,7 @@ extern "C" { #endif // _di_fake_make_operate_section_ #ifndef _di_fake_make_operate_process_ - int fake_make_operate_process(const f_string_range_t section_name, const uint8_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, const bool success, uint8_t *operation_if, fake_data_t *data, fake_make_data_t *data_make, f_string_lengths_t *section_stack, f_status_t *status) { + int fake_make_operate_process(const f_string_range_t section_name, const uint8_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, const bool success, uint8_t *operation_if, fake_data_t *data, fake_make_data_t *data_make, f_array_lengths_t *section_stack, f_status_t *status) { if (*status == F_child) return data->child; if (operation == fake_make_operation_type_index) { @@ -2362,7 +2361,7 @@ extern "C" { fl_directory_recurse_t recurse = fl_directory_recurse_t_initialize; - f_string_length_t destination_length = 0; + f_array_length_t destination_length = 0; if (data->error.verbosity == f_console_verbosity_verbose) { recurse.output = data->output; @@ -2462,7 +2461,7 @@ extern "C" { fl_directory_recurse_t recurse = fl_directory_recurse_t_initialize; - f_string_length_t destination_length = 0; + f_array_length_t destination_length = 0; f_mode_t mode = f_mode_t_initialize; @@ -3078,7 +3077,7 @@ extern "C" { } f_array_length_t i = 2; - f_string_length_t j = 0; + f_array_length_t j = 0; bool missed = F_true; *operation_if = fake_make_operation_if_type_true_next; @@ -3148,7 +3147,7 @@ extern "C" { bool is_negative_left = F_false; bool is_negative_right = F_false; - f_string_length_t i = 1; + f_array_length_t i = 1; const uint8_t type_if = *operation_if; @@ -3401,7 +3400,7 @@ extern "C" { fl_directory_recurse_t recurse = fl_directory_recurse_t_initialize; - f_string_length_t destination_length = 0; + f_array_length_t destination_length = 0; if (data->error.verbosity == f_console_verbosity_verbose) { recurse.output = data->output; @@ -3963,7 +3962,7 @@ extern "C" { #endif // _di_fake_make_operate_process_run_ #ifndef _di_fake_make_operate_validate_ - void fake_make_operate_validate(const fake_data_t data, const f_string_range_t section_name, const f_array_length_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, uint8_t *operation_if, fake_make_data_t *data_make, f_string_lengths_t *section_stack, f_status_t *status) { + void fake_make_operate_validate(const fake_data_t data, const f_string_range_t section_name, const f_array_length_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, uint8_t *operation_if, fake_make_data_t *data_make, f_array_lengths_t *section_stack, f_status_t *status) { if (F_status_is_error(*status)) return; if (operation == fake_make_operation_type_index || operation == fake_make_operation_type_run || operation == fake_make_operation_type_shell) { @@ -4540,7 +4539,7 @@ extern "C" { fake_make_operation_argument_if_success, }; - const f_string_length_t if_type_lengths[] = { + const f_array_length_t if_type_lengths[] = { fake_make_operation_argument_if_defined_length, fake_make_operation_argument_if_equal_length, fake_make_operation_argument_if_equal_not_length, @@ -4591,7 +4590,7 @@ extern "C" { 1, }; - f_string_length_t i = 0; + f_array_length_t i = 0; for (; i < 14; i++) { @@ -5178,7 +5177,7 @@ extern "C" { return F_false; } - for (f_string_length_t i = 0; i < name.used; i++) { + for (f_array_length_t i = 0; i < name.used; i++) { if (!(isalnum(name.string[i]) || name.string[i] == '_')) { return F_false; diff --git a/level_3/fake/c/private-make.h b/level_3/fake/c/private-make.h index e6ae583..6117754 100644 --- a/level_3/fake/c/private-make.h +++ b/level_3/fake/c/private-make.h @@ -642,7 +642,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_make_operate_section_ - int fake_make_operate_section(const f_array_length_t id_section, fake_data_t *data, fake_make_data_t *data_make, f_string_lengths_t *section_stack, f_status_t *status) f_gcc_attribute_visibility_internal; + int fake_make_operate_section(const f_array_length_t id_section, fake_data_t *data, fake_make_data_t *data_make, f_array_lengths_t *section_stack, f_status_t *status) f_gcc_attribute_visibility_internal; #endif // _di_fake_make_operate_section_ /** @@ -676,7 +676,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_make_operate_process_ - extern int fake_make_operate_process(const f_string_range_t section_name, const uint8_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, const bool success, uint8_t *operation_if, fake_data_t *data, fake_make_data_t *data_make, f_string_lengths_t *section_stack, f_status_t *status) f_gcc_attribute_visibility_internal; + extern int fake_make_operate_process(const f_string_range_t section_name, const uint8_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, const bool success, uint8_t *operation_if, fake_data_t *data, fake_make_data_t *data_make, f_array_lengths_t *section_stack, f_status_t *status) f_gcc_attribute_visibility_internal; #endif // _di_fake_make_operate_process_ /** @@ -767,7 +767,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_operate_validate_ - extern void fake_make_operate_validate(const fake_data_t data, const f_string_range_t section_name, const f_array_length_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, uint8_t *operation_if, fake_make_data_t *data_make, f_string_lengths_t *section_stack, f_status_t *status) f_gcc_attribute_visibility_internal; + extern void fake_make_operate_validate(const fake_data_t data, const f_string_range_t section_name, const f_array_length_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, uint8_t *operation_if, fake_make_data_t *data_make, f_array_lengths_t *section_stack, f_status_t *status) f_gcc_attribute_visibility_internal; #endif // _di_fake_make_operate_validate_ /** diff --git a/level_3/fake/c/private-print.c b/level_3/fake/c/private-print.c index 9142d20..e33cd90 100644 --- a/level_3/fake/c/private-print.c +++ b/level_3/fake/c/private-print.c @@ -302,7 +302,7 @@ extern "C" { void fake_print_message_section_operation_failed(const fake_data_t data, const fll_error_print_t error, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name) { if (data.error.verbosity == f_console_verbosity_quiet || !error.to.stream) return; - f_string_length_t line = 1; + f_array_length_t line = 1; f_fss_count_lines(buffer, operation_name.start, &line); @@ -369,7 +369,7 @@ extern "C" { void fake_print_message_section_operation_stack_max(const fake_data_t data, fll_error_print_t error, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name, const f_array_length_t stack_max) { if (data.error.verbosity == f_console_verbosity_quiet || !error.to.stream) return; - f_string_length_t line = 1; + f_array_length_t line = 1; f_fss_count_lines(buffer, operation_name.start, &line); @@ -398,7 +398,7 @@ extern "C" { void fake_print_message_section_operation_unknown(const fake_data_t data, const fll_error_print_t error, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name) { if (data.error.verbosity == f_console_verbosity_quiet || !error.to.stream) return; - f_string_length_t line = 1; + f_array_length_t line = 1; f_fss_count_lines(buffer, operation_name.start, &line); diff --git a/level_3/firewall/c/firewall.c b/level_3/firewall/c/firewall.c index 7dd4f67..bde3fb2 100644 --- a/level_3/firewall/c/firewall.c +++ b/level_3/firewall/c/firewall.c @@ -212,7 +212,7 @@ extern "C" { show_mangle = F_false; show_ports = F_false; - f_string_length_t counter = 0; + f_array_length_t counter = 0; for (; counter < data->remaining.used; counter++) { @@ -349,7 +349,7 @@ extern "C" { fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to perform requested %s operation:%c", fll_error_print_error, firewall_tool_iptables, f_string_eol_s[0]); fprintf(f_type_error, " "); - f_string_length_t i = 0; + f_array_length_t i = 0; fl_color_print_code(f_type_error, data->context.error); @@ -409,7 +409,7 @@ extern "C" { // remove "lo" (loopback) from the device listing { - f_string_length_t i = 0; + f_array_length_t i = 0; for (; i < data->devices.used; i++) { if (fl_string_compare((f_string_t) firewall_device_loop, data->devices.array[i].string, firewall_device_loop_length + 1, data->devices.array[i].used) == F_equal_to) { @@ -437,7 +437,7 @@ extern "C" { { f_array_length_t i = 0; - f_string_length_t length = 0; + f_array_length_t length = 0; for (; i < local.chain_objects.used; i++) { length = local.chain_objects.array[i].stop - local.chain_objects.array[i].start + 1; @@ -726,14 +726,14 @@ extern "C" { #ifndef _di_firewall_delete_data_ f_status_t firewall_delete_data(firewall_data_t *data) { - for (f_string_length_t i = 0; i < firewall_total_parameters; i++) { - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations); - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub); - f_macro_string_lengths_t_delete_simple(data->parameters[i].values); + for (f_array_length_t i = 0; i < firewall_total_parameters; i++) { + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations); + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub); + f_macro_array_lengths_t_delete_simple(data->parameters[i].values); } // for f_macro_string_dynamics_t_delete_simple(data->chains); - f_macro_string_lengths_t_delete_simple(data->remaining); + f_macro_array_lengths_t_delete_simple(data->remaining); f_macro_string_dynamics_t_delete_simple(data->devices); f_macro_color_context_t_delete_simple(data->context); diff --git a/level_3/firewall/c/firewall.h b/level_3/firewall/c/firewall.h index b0063c8..924feb6 100644 --- a/level_3/firewall/c/firewall.h +++ b/level_3/firewall/c/firewall.h @@ -268,7 +268,7 @@ extern "C" { typedef struct { f_console_parameter_t parameters[firewall_total_parameters]; - f_string_lengths_t remaining; + f_array_lengths_t remaining; bool process_pipe; f_file_t output; @@ -283,7 +283,7 @@ extern "C" { #define firewall_data_t_initialize \ { \ firewall_console_parameter_t_initialize, \ - f_string_lengths_t_initialize, \ + f_array_lengths_t_initialize, \ F_false, \ f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \ fll_error_print_t_initialize, \ diff --git a/level_3/firewall/c/private-firewall.c b/level_3/firewall/c/private-firewall.c index e8ab5a8..53fbdff 100644 --- a/level_3/firewall/c/private-firewall.c +++ b/level_3/firewall/c/private-firewall.c @@ -8,12 +8,12 @@ extern "C" { f_status_t firewall_perform_commands(const firewall_local_data_t local, const firewall_data_t data) { f_status_t status = F_none; - f_string_length_t i = 0; + f_array_length_t i = 0; f_string_dynamics_t arguments = f_string_dynamics_t_initialize; f_string_dynamic_t argument = f_string_dynamic_t_initialize; int return_code = 0; - f_string_length_t length = 0; + f_array_length_t length = 0; bool invalid = F_false; bool is_ip_list = F_false; f_string_dynamic_t ip_list = f_string_dynamic_t_initialize; @@ -29,11 +29,11 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi f_array_length_t r = 0; f_string_t current_tool = firewall_tool_iptables; - f_string_length_t current_tool_length = firewall_tool_iptables_length; + f_array_length_t current_tool_length = firewall_tool_iptables_length; - f_string_length_t direction = firewall_direction_none_id; + f_array_length_t direction = firewall_direction_none_id; f_string_dynamic_t device = f_string_dynamic_t_initialize; - f_string_length_t action = firewall_action_append_id; + f_array_length_t action = firewall_action_append_id; f_string_dynamic_t protocol = f_string_dynamic_t_initialize; if (local.is_global) { @@ -506,7 +506,7 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi // last up is the "rule" if ((!is_ip_list && local.rule_contents.array[i].used > 0) || (is_ip_list && local.rule_contents.array[i].used > 1)) { - f_string_length_t subcounter = 0; + f_array_length_t subcounter = 0; if (is_ip_list) { // skip past the chain @@ -682,8 +682,8 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi } if (F_status_is_error_not(status)) { - f_string_length_t buffer_counter = 0; - f_string_length_t ip_length = 0; + f_array_length_t buffer_counter = 0; + f_array_length_t ip_length = 0; f_string_dynamic_t ip_list_action = f_string_dynamic_t_initialize; if (ip_list_direction) { @@ -744,7 +744,7 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi fl_color_print_code(f_type_debug, data.context.warning); fprintf(f_type_debug, "%s ", current_tool); - for (f_string_length_t i = 0; i < arguments.used; i++) { + for (f_array_length_t i = 0; i < arguments.used; i++) { fprintf(f_type_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string); } // for @@ -766,7 +766,7 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi fl_color_print_code(f_type_error, data.context.error); fprintf(f_type_error, "%s ", current_tool); - for (f_string_length_t i = 0; i < arguments.used; i++) { + for (f_array_length_t i = 0; i < arguments.used; i++) { fprintf(f_type_error, "%.*s ", arguments.array[i].used, arguments.array[i].string); } // for @@ -818,7 +818,7 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi fl_color_print_code(f_type_debug, data.context.warning); fprintf(f_type_debug, "%s ", current_tool); - for (f_string_length_t i = 0; i < arguments.used; i++) { + for (f_array_length_t i = 0; i < arguments.used; i++) { fprintf(f_type_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string); } // for @@ -839,7 +839,7 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi fl_color_print_code(f_type_error, data.context.error); fprintf(f_type_error, "%s ", current_tool); - for (f_string_length_t i = 0; i < arguments.used; i++) { + for (f_array_length_t i = 0; i < arguments.used; i++) { fprintf(f_type_error, "%.*s ", arguments.array[i].used, arguments.array[i].string); } // for @@ -877,7 +877,7 @@ f_status_t firewall_create_custom_chains(firewall_reserved_chains_t *reserved, f f_array_length_t i = 0; f_array_length_t j = 0; - f_string_length_t length = 0; + f_array_length_t length = 0; f_string_range_t range = f_string_range_t_initialize; f_string_dynamics_t arguments = f_string_dynamics_t_initialize; @@ -1058,7 +1058,7 @@ f_status_t firewall_create_custom_chains(firewall_reserved_chains_t *reserved, f fl_color_print_code(f_type_debug, data->context.warning); fprintf(f_type_debug, "%s ", firewall_tool_iptables); - for (f_string_length_t i = 0; i < arguments.used; i++) { + for (f_array_length_t i = 0; i < arguments.used; i++) { fprintf(f_type_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string); } // for @@ -1079,7 +1079,7 @@ f_status_t firewall_create_custom_chains(firewall_reserved_chains_t *reserved, f fl_color_print_code(f_type_debug, data->context.warning); fprintf(f_type_debug, "%s ", firewall_tool_ip6tables); - for (f_string_length_t i = 0; i < arguments.used; i++) { + for (f_array_length_t i = 0; i < arguments.used; i++) { fprintf(f_type_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string); } // for @@ -1117,7 +1117,7 @@ f_status_t firewall_create_custom_chains(firewall_reserved_chains_t *reserved, f fprintf(f_type_error, "%s ", firewall_tool_ip6tables); } - for (f_string_length_t i = 0; i < arguments.used; i++) { + for (f_array_length_t i = 0; i < arguments.used; i++) { fprintf(f_type_error, "%.*s ", arguments.array[i].used, arguments.array[i].string); } // for @@ -1151,7 +1151,7 @@ f_status_t firewall_delete_chains(const firewall_data_t data) { const f_string_t tools[2] = { firewall_tool_iptables, firewall_tool_ip6tables }; f_status_t status = F_none; - for (f_string_length_t i = 0; i < 2; i++) { + for (f_array_length_t i = 0; i < 2; i++) { f_string_dynamics_t arguments = f_string_dynamics_t_initialize; f_string_dynamic_t argument[1] = f_string_dynamic_t_initialize; int return_code = 0; @@ -1168,7 +1168,7 @@ f_status_t firewall_delete_chains(const firewall_data_t data) { fl_color_print_code(f_type_debug, data.context.warning); fprintf(f_type_debug, "%s ", tools[i]); - for (f_string_length_t i = 0; i < arguments.used; i++) { + for (f_array_length_t i = 0; i < arguments.used; i++) { fprintf(f_type_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string); } // for @@ -1193,7 +1193,7 @@ f_status_t firewall_delete_chains(const firewall_data_t data) { fl_color_print_code(f_type_error, data.context.error); fprintf(f_type_error, "%s ", tools[i]); - for (f_string_length_t i = 0; i < arguments.used; i++) { + for (f_array_length_t i = 0; i < arguments.used; i++) { fprintf(f_type_error, "%.*s ", arguments.array[i].used, arguments.array[i].string); } // for @@ -1211,7 +1211,7 @@ f_status_t firewall_delete_chains(const firewall_data_t data) { } } // for - for (f_string_length_t i = 0; i < 2; i++) { + for (f_array_length_t i = 0; i < 2; i++) { f_string_dynamics_t arguments = f_string_dynamics_t_initialize; f_string_dynamic_t argument[1] = f_string_dynamic_t_initialize; int return_code = 0; @@ -1228,7 +1228,7 @@ f_status_t firewall_delete_chains(const firewall_data_t data) { fl_color_print_code(f_type_debug, data.context.warning); fprintf(f_type_debug, "%s ", tools[i]); - for (f_string_length_t j = 0; j < arguments.used; j++) { + for (f_array_length_t j = 0; j < arguments.used; j++) { fprintf(f_type_debug, "%.*s ", arguments.array[j].used, arguments.array[j].string); } // for @@ -1253,7 +1253,7 @@ f_status_t firewall_delete_chains(const firewall_data_t data) { fl_color_print_code(f_type_error, data.context.error); fprintf(f_type_error, "%s ", tools[i]); - for (f_string_length_t j = 0; j < arguments.used; j++) { + for (f_array_length_t j = 0; j < arguments.used; j++) { fprintf(f_type_error, "%.*s ", arguments.array[j].used, arguments.array[j].string); } // for @@ -1278,11 +1278,11 @@ f_status_t firewall_default_lock(const firewall_data_t data) { const f_string_t chains[3] = { firewall_chain_input, firewall_chain_output, firewall_chain_forward }; const f_string_t tools[2] = { firewall_tool_iptables, firewall_tool_ip6tables }; - const f_string_length_t lengths[3] = { firewall_chain_input_length, firewall_chain_output_length, firewall_chain_forward_length }; + const f_array_length_t lengths[3] = { firewall_chain_input_length, firewall_chain_output_length, firewall_chain_forward_length }; f_status_t status = F_none; - for (f_string_length_t i = 0; i < 3; i++) { + for (f_array_length_t i = 0; i < 3; i++) { f_string_dynamics_t arguments = f_string_dynamics_t_initialize; f_string_dynamic_t argument[3]; @@ -1302,7 +1302,7 @@ f_status_t firewall_default_lock(const firewall_data_t data) { arguments.array[1].size = arguments.array[1].used; arguments.array[2].size = arguments.array[2].used; - for (f_string_length_t j = 0; j < 2; j++) { + for (f_array_length_t j = 0; j < 2; j++) { int return_code = 0; // print command when debugging. @@ -1310,7 +1310,7 @@ f_status_t firewall_default_lock(const firewall_data_t data) { fl_color_print_code(f_type_debug, data.context.warning); fprintf(f_type_debug, "%s ", tools[j]); - for (f_string_length_t k = 0; k < arguments.used; k++) { + for (f_array_length_t k = 0; k < arguments.used; k++) { fprintf(f_type_debug, "%.*s ", arguments.array[k].used, arguments.array[k].string); } // for @@ -1335,7 +1335,7 @@ f_status_t firewall_default_lock(const firewall_data_t data) { fl_color_print_code(f_type_error, data.context.error); fprintf(f_type_error, "%s ", tools[j]); - for (f_string_length_t k = 0; k < arguments.used; k++) { + for (f_array_length_t k = 0; k < arguments.used; k++) { fprintf(f_type_error, "%.*s ", arguments.array[k].used, arguments.array[k].string); } // for diff --git a/level_3/fss_basic_list_read/c/fss_basic_list_read.c b/level_3/fss_basic_list_read/c/fss_basic_list_read.c index f09bec7..901e41c 100644 --- a/level_3/fss_basic_list_read/c/fss_basic_list_read.c +++ b/level_3/fss_basic_list_read/c/fss_basic_list_read.c @@ -349,8 +349,8 @@ extern "C" { status = F_status_set_error(F_parameter); } else if (data->parameters[fss_basic_list_read_parameter_delimit].result == f_console_result_additional) { - const f_string_length_t location = data->parameters[fss_basic_list_read_parameter_delimit].values.array[0]; - f_string_length_t length = strnlen(arguments.argv[location], f_console_length_size); + const f_array_length_t location = data->parameters[fss_basic_list_read_parameter_delimit].values.array[0]; + f_array_length_t length = strnlen(arguments.argv[location], f_console_parameter_size); if (length == 0) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error); @@ -402,7 +402,7 @@ extern "C" { f_fss_delimits_t delimits = f_fss_delimits_t_initialize; f_fss_comments_t comments = f_fss_comments_t_initialize; - f_string_length_t original_size = data->quantity.total; + f_array_length_t original_size = data->quantity.total; if (F_status_is_error_not(status)) { status = fss_basic_list_read_main_preprocess_depth(arguments, *data, &depths); @@ -538,16 +538,16 @@ extern "C" { #ifndef _di_fss_basic_list_read_delete_data_ f_status_t fss_basic_list_read_delete_data(fss_basic_list_read_data_t *data) { - for (f_string_length_t i = 0; i < fss_basic_list_read_total_parameters; i++) { - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations); - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub); - f_macro_string_lengths_t_delete_simple(data->parameters[i].values); + for (f_array_length_t i = 0; i < fss_basic_list_read_total_parameters; i++) { + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations); + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub); + f_macro_array_lengths_t_delete_simple(data->parameters[i].values); } // for f_macro_fss_contents_t_delete_simple(data->contents); f_macro_fss_objects_t_delete_simple(data->objects); f_macro_string_dynamic_t_delete_simple(data->buffer); - f_macro_string_lengths_t_delete_simple(data->remaining); + f_macro_array_lengths_t_delete_simple(data->remaining); f_macro_color_context_t_delete_simple(data->context); diff --git a/level_3/fss_basic_list_read/c/fss_basic_list_read.h b/level_3/fss_basic_list_read/c/fss_basic_list_read.h index 4029f21..0472be3 100644 --- a/level_3/fss_basic_list_read/c/fss_basic_list_read.h +++ b/level_3/fss_basic_list_read/c/fss_basic_list_read.h @@ -169,7 +169,7 @@ extern "C" { typedef struct { f_console_parameter_t parameters[fss_basic_list_read_total_parameters]; - f_string_lengths_t remaining; + f_array_lengths_t remaining; bool process_pipe; f_file_t output; @@ -181,7 +181,7 @@ extern "C" { f_string_quantity_t quantity; uint8_t delimit_mode; - f_string_length_t delimit_depth; + f_array_length_t delimit_depth; f_color_context_t context; } fss_basic_list_read_data_t; @@ -189,7 +189,7 @@ extern "C" { #define fss_basic_list_read_data_t_initialize \ { \ fss_basic_list_read_console_parameter_t_initialize, \ - f_string_lengths_t_initialize, \ + f_array_lengths_t_initialize, \ F_false, \ f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \ fll_error_print_t_initialize, \ 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 7650e43..d63c8d0 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 @@ -105,7 +105,7 @@ extern "C" { if (status_code == F_memory_not) { fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]); } - else if (status_code == f_string_length_t_size) { + else if (status_code == f_array_length_t_size) { fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to process '", fll_error_print_error); fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_trim); fl_color_print(data.error.to.stream, data.context.set.error, "' because the maximum buffer size was reached.%c", f_string_eol_s[0]); @@ -173,7 +173,7 @@ extern "C" { f_status_t fss_basic_list_read_main_process_file(const f_console_arguments_t arguments, fss_basic_list_read_data_t *data, const f_string_t filename, const fss_basic_list_read_depths_t depths, f_fss_delimits_t *delimits, f_fss_comments_t *comments) { f_status_t status = F_none; - const f_string_lengths_t except_none = f_string_lengths_t_initialize; + const f_array_lengths_t except_none = f_array_lengths_t_initialize; bool delimited = F_true; // for this standard, delimits would always be applied, except for when delimit_depth is greater than 0. @@ -320,7 +320,7 @@ extern "C" { return F_none; } - f_status_t (*print_object)(FILE *, const f_string_static_t, const f_string_range_t, const f_string_lengths_t) = &f_print_except_dynamic_partial; + f_status_t (*print_object)(FILE *, const f_string_static_t, const f_string_range_t, const f_array_lengths_t) = &f_print_except_dynamic_partial; if (data->parameters[fss_basic_list_read_parameter_trim].result == f_console_result_found) { print_object = &fl_print_trim_except_dynamic_partial; diff --git a/level_3/fss_basic_list_read/c/private-fss_basic_list_read.h b/level_3/fss_basic_list_read/c/private-fss_basic_list_read.h index 9b3bc04..fc4fcab 100644 --- a/level_3/fss_basic_list_read/c/private-fss_basic_list_read.h +++ b/level_3/fss_basic_list_read/c/private-fss_basic_list_read.h @@ -25,7 +25,7 @@ extern "C" { */ #ifndef _di_fss_basic_list_read_depth_t_ typedef struct { - f_string_length_t depth; + f_array_length_t depth; f_array_length_t index_at; f_array_length_t index_name; 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 60c312b..4e07235 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 @@ -185,7 +185,7 @@ extern "C" { status = F_status_set_error(F_parameter); } else { - const f_string_length_t location = data->parameters[fss_basic_list_write_parameter_file].values.array[0]; + const f_array_length_t location = data->parameters[fss_basic_list_write_parameter_file].values.array[0]; output.id = -1; output.stream = 0; @@ -314,8 +314,8 @@ extern "C" { status = F_status_set_error(F_parameter); } else if (data->parameters[fss_basic_list_write_parameter_prepend].result == f_console_result_additional) { - const f_string_length_t index = data->parameters[fss_basic_list_write_parameter_prepend].values.array[data->parameters[fss_basic_list_write_parameter_prepend].values.used - 1]; - const f_string_length_t length = strnlen(arguments.argv[index], f_console_length_size); + const f_array_length_t index = data->parameters[fss_basic_list_write_parameter_prepend].values.array[data->parameters[fss_basic_list_write_parameter_prepend].values.used - 1]; + const f_array_length_t length = strnlen(arguments.argv[index], f_console_parameter_size); if (length) { f_string_range_t range = f_macro_string_range_t_initialize(length); @@ -423,7 +423,7 @@ extern "C" { for (f_array_length_t i = 0; i < data->parameters[fss_basic_list_write_parameter_object].values.used; i++) { object.string = arguments.argv[data->parameters[fss_basic_list_write_parameter_object].values.array[i]]; - object.used = strnlen(object.string, f_console_length_size); + object.used = strnlen(object.string, f_console_parameter_size); object.size = object.used; status = fss_basic_list_write_process(*data, output, quote, &object, 0, &buffer); @@ -434,7 +434,7 @@ extern "C" { for (f_array_length_t i = 0; i < data->parameters[fss_basic_list_write_parameter_content].values.used; i++) { content.string = arguments.argv[data->parameters[fss_basic_list_write_parameter_content].values.array[i]]; - content.used = strnlen(content.string, f_console_length_size); + content.used = strnlen(content.string, f_console_parameter_size); content.size = content.used; status = fss_basic_list_write_process(*data, output, quote, 0, &content, &buffer); @@ -446,11 +446,11 @@ extern "C" { for (f_array_length_t i = 0; i < data->parameters[fss_basic_list_write_parameter_object].values.used; i++) { object.string = arguments.argv[data->parameters[fss_basic_list_write_parameter_object].values.array[i]]; - object.used = strnlen(object.string, f_console_length_size); + object.used = strnlen(object.string, f_console_parameter_size); object.size = object.used; content.string = arguments.argv[data->parameters[fss_basic_list_write_parameter_content].values.array[i]]; - content.used = strnlen(content.string, f_console_length_size); + content.used = strnlen(content.string, f_console_parameter_size); content.size = content.used; status = fss_basic_list_write_process(*data, output, quote, &object, &content, &buffer); @@ -508,13 +508,13 @@ extern "C" { #ifndef _di_fss_basic_list_write_delete_data_ f_status_t fss_basic_list_write_delete_data(fss_basic_list_write_data_t *data) { - for (f_string_length_t i = 0; i < fss_basic_list_write_total_parameters; i++) { - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations); - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub); - f_macro_string_lengths_t_delete_simple(data->parameters[i].values); + for (f_array_length_t i = 0; i < fss_basic_list_write_total_parameters; i++) { + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations); + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub); + f_macro_array_lengths_t_delete_simple(data->parameters[i].values); } // for - f_macro_string_lengths_t_delete_simple(data->remaining); + f_macro_array_lengths_t_delete_simple(data->remaining); f_macro_color_context_t_delete_simple(data->context); diff --git a/level_3/fss_basic_list_write/c/fss_basic_list_write.h b/level_3/fss_basic_list_write/c/fss_basic_list_write.h index 27dc3d2..e9203ed 100644 --- a/level_3/fss_basic_list_write/c/fss_basic_list_write.h +++ b/level_3/fss_basic_list_write/c/fss_basic_list_write.h @@ -130,7 +130,7 @@ extern "C" { typedef struct { f_console_parameter_t parameters[fss_basic_list_write_total_parameters]; - f_string_lengths_t remaining; + f_array_lengths_t remaining; bool process_pipe; f_file_t output; @@ -143,7 +143,7 @@ extern "C" { #define fss_basic_list_write_data_t_initialize \ { \ fss_basic_list_write_console_parameter_t_initialize, \ - f_string_lengths_t_initialize, \ + f_array_lengths_t_initialize, \ F_false, \ f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \ fll_error_print_t_initialize, \ diff --git a/level_3/fss_basic_list_write/c/private-fss_basic_list_write.c b/level_3/fss_basic_list_write/c/private-fss_basic_list_write.c index 6523a65..f5e7931 100644 --- a/level_3/fss_basic_list_write/c/private-fss_basic_list_write.c +++ b/level_3/fss_basic_list_write/c/private-fss_basic_list_write.c @@ -130,8 +130,8 @@ extern "C" { input.id = f_type_descriptor_input; input.size_read = 2048; - f_string_length_t total = 0; - f_string_length_t previous = 0; + f_array_length_t total = 0; + f_array_length_t previous = 0; f_string_range_t range = f_string_range_t_initialize; f_string_dynamic_t block = f_string_dynamic_t_initialize; diff --git a/level_3/fss_basic_read/c/fss_basic_read.c b/level_3/fss_basic_read/c/fss_basic_read.c index 4209f9d..41d70dc 100644 --- a/level_3/fss_basic_read/c/fss_basic_read.c +++ b/level_3/fss_basic_read/c/fss_basic_read.c @@ -349,8 +349,8 @@ extern "C" { status = F_status_set_error(F_parameter); } else if (data->parameters[fss_basic_read_parameter_delimit].result == f_console_result_additional) { - const f_string_length_t location = data->parameters[fss_basic_read_parameter_delimit].values.array[0]; - f_string_length_t length = strnlen(arguments.argv[location], f_console_length_size); + const f_array_length_t location = data->parameters[fss_basic_read_parameter_delimit].values.array[0]; + f_array_length_t length = strnlen(arguments.argv[location], f_console_parameter_size); if (length == 0) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error); @@ -401,7 +401,7 @@ extern "C" { f_fss_delimits_t delimits = f_fss_delimits_t_initialize; - f_string_length_t original_size = data->quantity.total; + f_array_length_t original_size = data->quantity.total; if (F_status_is_error_not(status)) { status = fss_basic_read_main_preprocess_depth(arguments, *data, &depths); @@ -536,16 +536,16 @@ extern "C" { #ifndef _di_fss_basic_read_delete_data_ f_status_t fss_basic_read_delete_data(fss_basic_read_data_t *data) { - for (f_string_length_t i = 0; i < fss_basic_read_total_parameters; i++) { - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations); - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub); - f_macro_string_lengths_t_delete_simple(data->parameters[i].values); + for (f_array_length_t i = 0; i < fss_basic_read_total_parameters; i++) { + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations); + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub); + f_macro_array_lengths_t_delete_simple(data->parameters[i].values); } // for f_macro_fss_contents_t_delete_simple(data->contents); f_macro_fss_objects_t_delete_simple(data->objects); f_macro_string_dynamic_t_delete_simple(data->buffer); - f_macro_string_lengths_t_delete_simple(data->remaining); + f_macro_array_lengths_t_delete_simple(data->remaining); f_macro_color_context_t_delete_simple(data->context); diff --git a/level_3/fss_basic_read/c/fss_basic_read.h b/level_3/fss_basic_read/c/fss_basic_read.h index dcb95ea..0b1ee12 100644 --- a/level_3/fss_basic_read/c/fss_basic_read.h +++ b/level_3/fss_basic_read/c/fss_basic_read.h @@ -169,7 +169,7 @@ extern "C" { typedef struct { f_console_parameter_t parameters[fss_basic_read_total_parameters]; - f_string_lengths_t remaining; + f_array_lengths_t remaining; bool process_pipe; f_file_t output; @@ -181,7 +181,7 @@ extern "C" { f_string_quantity_t quantity; uint8_t delimit_mode; - f_string_length_t delimit_depth; + f_array_length_t delimit_depth; f_color_context_t context; } fss_basic_read_data_t; @@ -189,7 +189,7 @@ extern "C" { #define fss_basic_read_data_t_initialize \ { \ fss_basic_read_console_parameter_t_initialize, \ - f_string_lengths_t_initialize, \ + f_array_lengths_t_initialize, \ F_false, \ f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \ fll_error_print_t_initialize, \ 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 45bcf50..6948a1e 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 @@ -105,7 +105,7 @@ extern "C" { if (status_code == F_memory_not) { fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]); } - else if (status_code == f_string_length_t_size) { + else if (status_code == f_array_length_t_size) { fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to process '", fll_error_print_error); fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_trim); fl_color_print(data.error.to.stream, data.context.set.error, "' because the maximum buffer size was reached.%c", f_string_eol_s[0]); @@ -173,7 +173,7 @@ extern "C" { f_status_t fss_basic_read_main_process_file(const f_console_arguments_t arguments, fss_basic_read_data_t *data, const f_string_t filename, const fss_basic_read_depths_t depths, f_fss_delimits_t *delimits) { f_status_t status = F_none; - const f_string_lengths_t except_none = f_string_lengths_t_initialize; + const f_array_lengths_t except_none = f_array_lengths_t_initialize; bool delimited = F_true; // for this standard, delimits would always be applied, except for when delimit_depth is greater than 0. @@ -217,7 +217,7 @@ extern "C" { f_number_unsigned_t select = 0; if (data->parameters[fss_basic_read_parameter_select].result == f_console_result_additional) { - const f_string_length_t index = data->parameters[fss_basic_read_parameter_select].values.array[data->parameters[fss_basic_read_parameter_select].values.used - 1]; + const f_array_length_t index = data->parameters[fss_basic_read_parameter_select].values.array[data->parameters[fss_basic_read_parameter_select].values.used - 1]; const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index])); status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &select, range); @@ -309,7 +309,7 @@ extern "C" { return F_none; } - f_status_t (*print_object)(FILE *, const f_string_static_t, const f_string_range_t, const f_string_lengths_t) = &f_print_except_dynamic_partial; + f_status_t (*print_object)(FILE *, const f_string_static_t, const f_string_range_t, const f_array_lengths_t) = &f_print_except_dynamic_partial; if (data->parameters[fss_basic_read_parameter_trim].result == f_console_result_found) { print_object = &fl_print_trim_except_dynamic_partial; @@ -419,7 +419,7 @@ extern "C" { } if (data->parameters[fss_basic_read_parameter_total].result == f_console_result_found) { - f_string_length_t total = 0; + f_array_length_t total = 0; for (i = 0; i < data->objects.used; i++) { if (!names[i]) continue; diff --git a/level_3/fss_basic_read/c/private-fss_basic_read.h b/level_3/fss_basic_read/c/private-fss_basic_read.h index 3e93d39..e8d890c 100644 --- a/level_3/fss_basic_read/c/private-fss_basic_read.h +++ b/level_3/fss_basic_read/c/private-fss_basic_read.h @@ -25,7 +25,7 @@ extern "C" { */ #ifndef _di_fss_basic_read_depth_t_ typedef struct { - f_string_length_t depth; + f_array_length_t depth; f_array_length_t index_at; f_array_length_t index_name; 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 4b1a765..5b70685 100644 --- a/level_3/fss_basic_write/c/fss_basic_write.c +++ b/level_3/fss_basic_write/c/fss_basic_write.c @@ -183,7 +183,7 @@ extern "C" { status = F_status_set_error(F_parameter); } else { - const f_string_length_t location = data->parameters[fss_basic_write_parameter_file].values.array[0]; + const f_array_length_t location = data->parameters[fss_basic_write_parameter_file].values.array[0]; output.id = -1; output.stream = 0; @@ -312,8 +312,8 @@ extern "C" { status = F_status_set_error(F_parameter); } else if (data->parameters[fss_basic_write_parameter_prepend].result == f_console_result_additional) { - const f_string_length_t index = data->parameters[fss_basic_write_parameter_prepend].values.array[data->parameters[fss_basic_write_parameter_prepend].values.used - 1]; - const f_string_length_t length = strnlen(arguments.argv[index], f_console_length_size); + const f_array_length_t index = data->parameters[fss_basic_write_parameter_prepend].values.array[data->parameters[fss_basic_write_parameter_prepend].values.used - 1]; + const f_array_length_t length = strnlen(arguments.argv[index], f_console_parameter_size); // Even though this standard does not utilize this parameter, provide the validation for consistency. if (length) { @@ -420,7 +420,7 @@ extern "C" { for (f_array_length_t i = 0; i < data->parameters[fss_basic_write_parameter_object].values.used; i++) { object.string = arguments.argv[data->parameters[fss_basic_write_parameter_object].values.array[i]]; - object.used = strnlen(object.string, f_console_length_size); + object.used = strnlen(object.string, f_console_parameter_size); object.size = object.used; status = fss_basic_write_process(*data, output, quote, &object, 0, &buffer); @@ -433,7 +433,7 @@ extern "C" { for (f_array_length_t i = 0; i < data->parameters[fss_basic_write_parameter_content].values.used; i++) { content.string = arguments.argv[data->parameters[fss_basic_write_parameter_content].values.array[i]]; - content.used = strnlen(content.string, f_console_length_size); + content.used = strnlen(content.string, f_console_parameter_size); content.size = content.used; status = fss_basic_write_process(*data, output, quote, 0, &content, &buffer); @@ -445,11 +445,11 @@ extern "C" { for (f_array_length_t i = 0; i < data->parameters[fss_basic_write_parameter_object].values.used; i++) { object.string = arguments.argv[data->parameters[fss_basic_write_parameter_object].values.array[i]]; - object.used = strnlen(object.string, f_console_length_size); + object.used = strnlen(object.string, f_console_parameter_size); object.size = object.used; content.string = arguments.argv[data->parameters[fss_basic_write_parameter_content].values.array[i]]; - content.used = strnlen(content.string, f_console_length_size); + content.used = strnlen(content.string, f_console_parameter_size); content.size = content.used; status = fss_basic_write_process(*data, output, quote, &object, &content, &buffer); @@ -507,13 +507,13 @@ extern "C" { #ifndef _di_fss_basic_write_delete_data_ f_status_t fss_basic_write_delete_data(fss_basic_write_data_t *data) { - for (f_string_length_t i = 0; i < fss_basic_write_total_parameters; i++) { - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations); - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub); - f_macro_string_lengths_t_delete_simple(data->parameters[i].values); + for (f_array_length_t i = 0; i < fss_basic_write_total_parameters; i++) { + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations); + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub); + f_macro_array_lengths_t_delete_simple(data->parameters[i].values); } // for - f_macro_string_lengths_t_delete_simple(data->remaining); + f_macro_array_lengths_t_delete_simple(data->remaining); f_macro_color_context_t_delete_simple(data->context); diff --git a/level_3/fss_basic_write/c/fss_basic_write.h b/level_3/fss_basic_write/c/fss_basic_write.h index 05440cb..e7e1f70 100644 --- a/level_3/fss_basic_write/c/fss_basic_write.h +++ b/level_3/fss_basic_write/c/fss_basic_write.h @@ -131,7 +131,7 @@ extern "C" { typedef struct { f_console_parameter_t parameters[fss_basic_write_total_parameters]; - f_string_lengths_t remaining; + f_array_lengths_t remaining; bool process_pipe; f_file_t output; @@ -143,7 +143,7 @@ extern "C" { #define fss_basic_write_data_t_initialize \ { \ fss_basic_write_console_parameter_t_initialize, \ - f_string_lengths_t_initialize, \ + f_array_lengths_t_initialize, \ F_false, \ f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \ fll_error_print_t_initialize, \ diff --git a/level_3/fss_basic_write/c/private-fss_basic_write.c b/level_3/fss_basic_write/c/private-fss_basic_write.c index ecc955f..443942a 100644 --- a/level_3/fss_basic_write/c/private-fss_basic_write.c +++ b/level_3/fss_basic_write/c/private-fss_basic_write.c @@ -142,8 +142,8 @@ extern "C" { input.id = f_type_descriptor_input; input.size_read = 2048; - f_string_length_t total = 0; - f_string_length_t previous = 0; + f_array_length_t total = 0; + f_array_length_t previous = 0; f_string_range_t range = f_string_range_t_initialize; f_string_dynamic_t block = f_string_dynamic_t_initialize; diff --git a/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c b/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c index 1d406cb..c0cf809 100644 --- a/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c +++ b/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c @@ -349,8 +349,8 @@ extern "C" { status = F_status_set_error(F_parameter); } else if (data->parameters[fss_embedded_list_read_parameter_delimit].result == f_console_result_additional) { - const f_string_length_t location = data->parameters[fss_embedded_list_read_parameter_delimit].values.array[0]; - f_string_length_t length = strnlen(arguments.argv[location], f_console_length_size); + const f_array_length_t location = data->parameters[fss_embedded_list_read_parameter_delimit].values.array[0]; + f_array_length_t length = strnlen(arguments.argv[location], f_console_parameter_size); if (length == 0) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error); @@ -403,7 +403,7 @@ extern "C" { f_fss_delimits_t contents_delimits = f_fss_delimits_t_initialize; f_fss_comments_t comments = f_fss_comments_t_initialize; - f_string_length_t original_size = data->quantity.total; + f_array_length_t original_size = data->quantity.total; if (F_status_is_error_not(status)) { status = fss_embedded_list_read_main_preprocess_depth(arguments, *data, &depths); @@ -522,16 +522,16 @@ extern "C" { #ifndef _di_fss_embedded_list_read_delete_data_ f_status_t fss_embedded_list_read_delete_data(fss_embedded_list_read_data_t *data) { - for (f_string_length_t i = 0; i < fss_embedded_list_read_total_parameters; i++) { - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations); - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub); - f_macro_string_lengths_t_delete_simple(data->parameters[i].values); + for (f_array_length_t i = 0; i < fss_embedded_list_read_total_parameters; i++) { + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations); + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub); + f_macro_array_lengths_t_delete_simple(data->parameters[i].values); } // for f_macro_fss_nest_t_delete_simple(data->nest); f_macro_string_dynamic_t_delete_simple(data->buffer); - f_macro_string_lengths_t_delete_simple(data->remaining); + f_macro_array_lengths_t_delete_simple(data->remaining); f_macro_color_context_t_delete_simple(data->context); diff --git a/level_3/fss_embedded_list_read/c/fss_embedded_list_read.h b/level_3/fss_embedded_list_read/c/fss_embedded_list_read.h index dd05f25..922d98a 100644 --- a/level_3/fss_embedded_list_read/c/fss_embedded_list_read.h +++ b/level_3/fss_embedded_list_read/c/fss_embedded_list_read.h @@ -169,7 +169,7 @@ extern "C" { typedef struct { f_console_parameter_t parameters[fss_embedded_list_read_total_parameters]; - f_string_lengths_t remaining; + f_array_lengths_t remaining; bool process_pipe; f_file_t output; @@ -180,7 +180,7 @@ extern "C" { f_string_quantity_t quantity; uint8_t delimit_mode; - f_string_length_t delimit_depth; + f_array_length_t delimit_depth; f_color_context_t context; } fss_embedded_list_read_data_t; @@ -188,7 +188,7 @@ extern "C" { #define fss_embedded_list_read_data_t_initialize \ { \ fss_embedded_list_read_console_parameter_t_initialize, \ - f_string_lengths_t_initialize, \ + f_array_lengths_t_initialize, \ F_false, \ f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \ fll_error_print_t_initialize, \ diff --git a/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.c b/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.c index fbd86a8..7d786fe 100644 --- a/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.c +++ b/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.c @@ -161,7 +161,7 @@ extern "C" { depths->array[depths->used].value_name.used = 0; if (data.parameters[fss_embedded_list_read_parameter_trim].result == f_console_result_found) { - status = fl_string_rip(arguments.argv[values_order[i]], strnlen(arguments.argv[values_order[i]], f_console_length_size), &depths->array[depths->used].value_name); + status = fl_string_rip(arguments.argv[values_order[i]], strnlen(arguments.argv[values_order[i]], f_console_parameter_size), &depths->array[depths->used].value_name); if (F_status_is_error(status)) { fll_error_print(data.error, F_status_set_fine(status), "fl_string_rip", F_true); @@ -169,7 +169,7 @@ extern "C" { } } else { - status = f_string_append(arguments.argv[values_order[i]], strnlen(arguments.argv[values_order[i]], f_console_length_size), &depths->array[depths->used].value_name); + status = f_string_append(arguments.argv[values_order[i]], strnlen(arguments.argv[values_order[i]], f_console_parameter_size), &depths->array[depths->used].value_name); if (F_status_is_error(status)) { fll_error_print(data.error, F_status_set_fine(status), "f_string_append", F_true); @@ -276,7 +276,7 @@ extern "C" { f_number_unsigned_t select = 0; if (data->parameters[fss_embedded_list_read_parameter_select].result == f_console_result_additional) { - const f_string_length_t index = data->parameters[fss_embedded_list_read_parameter_select].values.array[data->parameters[fss_embedded_list_read_parameter_select].values.used - 1]; + const f_array_length_t index = data->parameters[fss_embedded_list_read_parameter_select].values.array[data->parameters[fss_embedded_list_read_parameter_select].values.used - 1]; const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index])); status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &select, range); @@ -335,7 +335,7 @@ extern "C" { } if (depths.array[depths_index].index_name || depths.array[depths_index].index_at) { - const f_string_lengths_t except_none = f_string_lengths_t_initialize; + const f_array_lengths_t except_none = f_array_lengths_t_initialize; f_array_length_t i = 0; f_array_length_t j = 0; @@ -483,7 +483,7 @@ extern "C" { return F_none; } - f_status_t (*print_object)(FILE *, const f_string_static_t, const f_string_range_t, const f_string_lengths_t) = &f_print_except_dynamic_partial; + f_status_t (*print_object)(FILE *, const f_string_static_t, const f_string_range_t, const f_array_lengths_t) = &f_print_except_dynamic_partial; if (data->parameters[fss_embedded_list_read_parameter_trim].result == f_console_result_found) { print_object = &fl_print_trim_except_dynamic_partial; @@ -710,14 +710,14 @@ extern "C" { } } - const f_string_length_t original_objects_used = objects_delimits->used; - const f_string_length_t original_contents_used = contents_delimits->used; + const f_array_length_t original_objects_used = objects_delimits->used; + const f_array_length_t original_contents_used = contents_delimits->used; - f_string_length_t original_objects_delimits[original_objects_used]; - f_string_length_t original_contents_delimits[original_contents_used]; + f_array_length_t original_objects_delimits[original_objects_used]; + f_array_length_t original_contents_delimits[original_contents_used]; - memcpy(&original_objects_delimits, objects_delimits->array, original_objects_used * sizeof(f_string_length_t)); - memcpy(&original_contents_delimits, contents_delimits->array, original_contents_used * sizeof(f_string_length_t)); + memcpy(&original_objects_delimits, objects_delimits->array, original_objects_used * sizeof(f_array_length_t)); + memcpy(&original_contents_delimits, contents_delimits->array, original_contents_used * sizeof(f_array_length_t)); objects_delimits->used = 0; contents_delimits->used = 0; @@ -760,7 +760,7 @@ extern "C" { #endif // _di_fss_embedded_list_read_process_delimits_ #ifndef _di_fss_embedded_list_read_process_delimits_contents_ - void fss_embedded_list_read_process_delimits_contents(const fss_embedded_list_read_data_t data, const f_string_length_t depth, const f_string_length_t original_delimits[], const f_string_length_t original_used, f_fss_delimits_t *delimits) { + void fss_embedded_list_read_process_delimits_contents(const fss_embedded_list_read_data_t data, const f_array_length_t depth, const f_array_length_t original_delimits[], const f_array_length_t original_used, f_fss_delimits_t *delimits) { if (!original_used) return; @@ -813,7 +813,7 @@ extern "C" { #endif // _di_fss_embedded_list_read_process_delimits_contents_ #ifndef _di_fss_embedded_list_read_process_delimits_objects_ - void fss_embedded_list_read_process_delimits_objects(const fss_embedded_list_read_data_t data, const f_string_length_t depth, const f_string_length_t original_delimits[], const f_string_length_t original_used, f_fss_delimits_t *delimits) { + void fss_embedded_list_read_process_delimits_objects(const fss_embedded_list_read_data_t data, const f_array_length_t depth, const f_array_length_t original_delimits[], const f_array_length_t original_used, f_fss_delimits_t *delimits) { if (!original_used) return; @@ -862,16 +862,16 @@ extern "C" { #endif // _di_fss_embedded_list_read_process_delimits_objects_ #ifndef _di_fss_embedded_list_read_process_delimits_within_greater_ - f_status_t fss_embedded_list_read_process_delimits_within_greater(const fss_embedded_list_read_data_t data, const f_string_length_t depth, const f_string_length_t location) { + f_status_t fss_embedded_list_read_process_delimits_within_greater(const fss_embedded_list_read_data_t data, const f_array_length_t depth, const f_array_length_t location) { if (depth + 1 >= data.nest.used) return F_false; f_fss_items_t *items = 0; - f_string_length_t i = 0; - f_string_length_t j = 0; + f_array_length_t i = 0; + f_array_length_t j = 0; - for (f_string_length_t d = depth + 1; d < data.nest.used; ++d) { + for (f_array_length_t d = depth + 1; d < data.nest.used; ++d) { items = &data.nest.depth[d]; for (i = 0; i < items->used; ++i) { diff --git a/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.h b/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.h index daa598f..9fd707e 100644 --- a/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.h +++ b/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.h @@ -25,7 +25,7 @@ extern "C" { */ #ifndef _di_fss_embedded_list_read_depth_t_ typedef struct { - f_string_length_t depth; + f_array_length_t depth; f_array_length_t index_at; f_array_length_t index_name; @@ -297,7 +297,7 @@ extern "C" { * @see fss_embedded_list_read_process_delimits() */ #ifndef _di_fss_embedded_list_read_process_delimits_contents_ - extern void fss_embedded_list_read_process_delimits_contents(const fss_embedded_list_read_data_t data, const f_string_length_t depth, const f_string_length_t original_delimits[], const f_string_length_t original_used, f_fss_delimits_t *delimits) f_gcc_attribute_visibility_internal; + extern void fss_embedded_list_read_process_delimits_contents(const fss_embedded_list_read_data_t data, const f_array_length_t depth, const f_array_length_t original_delimits[], const f_array_length_t original_used, f_fss_delimits_t *delimits) f_gcc_attribute_visibility_internal; #endif // _di_fss_embedded_list_read_process_delimits_contents_ /** @@ -317,7 +317,7 @@ extern "C" { * @see fss_embedded_list_read_process_delimits() */ #ifndef _di_fss_embedded_list_read_process_delimits_objects_ - extern void fss_embedded_list_read_process_delimits_objects(const fss_embedded_list_read_data_t data, const f_string_length_t depth, const f_string_length_t original_delimits[], const f_string_length_t original_used, f_fss_delimits_t *delimits) f_gcc_attribute_visibility_internal; + extern void fss_embedded_list_read_process_delimits_objects(const fss_embedded_list_read_data_t data, const f_array_length_t depth, const f_array_length_t original_delimits[], const f_array_length_t original_used, f_fss_delimits_t *delimits) f_gcc_attribute_visibility_internal; #endif // _di_fss_embedded_list_read_process_delimits_objects_ /** @@ -338,7 +338,7 @@ extern "C" { * @see fss_embedded_list_read_process_delimits_contents() */ #ifndef _di_fss_embedded_list_read_process_delimits_within_greater_ - extern f_status_t fss_embedded_list_read_process_delimits_within_greater(const fss_embedded_list_read_data_t data, const f_string_length_t depth, const f_string_length_t location) f_gcc_attribute_visibility_internal; + extern f_status_t fss_embedded_list_read_process_delimits_within_greater(const fss_embedded_list_read_data_t data, const f_array_length_t depth, const f_array_length_t location) f_gcc_attribute_visibility_internal; #endif // _di_fss_embedded_list_read_process_delimits_within_greater_ #ifdef __cplusplus diff --git a/level_3/fss_embedded_list_write/c/fss_embedded_list_write.c b/level_3/fss_embedded_list_write/c/fss_embedded_list_write.c index df15d8b..dade5c1 100644 --- a/level_3/fss_embedded_list_write/c/fss_embedded_list_write.c +++ b/level_3/fss_embedded_list_write/c/fss_embedded_list_write.c @@ -191,7 +191,7 @@ extern "C" { status = F_status_set_error(F_parameter); } else { - const f_string_length_t location = data->parameters[fss_embedded_list_write_parameter_file].values.array[0]; + const f_array_length_t location = data->parameters[fss_embedded_list_write_parameter_file].values.array[0]; output.id = -1; output.stream = 0; @@ -320,8 +320,8 @@ extern "C" { status = F_status_set_error(F_parameter); } else if (data->parameters[fss_embedded_list_write_parameter_prepend].result == f_console_result_additional) { - const f_string_length_t index = data->parameters[fss_embedded_list_write_parameter_prepend].values.array[data->parameters[fss_embedded_list_write_parameter_prepend].values.used - 1]; - const f_string_length_t length = strnlen(arguments.argv[index], f_console_length_size); + const f_array_length_t index = data->parameters[fss_embedded_list_write_parameter_prepend].values.array[data->parameters[fss_embedded_list_write_parameter_prepend].values.used - 1]; + const f_array_length_t length = strnlen(arguments.argv[index], f_console_parameter_size); if (length) { f_string_range_t range = f_macro_string_range_t_initialize(length); @@ -432,7 +432,7 @@ extern "C" { for (f_array_length_t i = 0; i < data->parameters[fss_embedded_list_write_parameter_object].values.used; i++) { object.string = arguments.argv[data->parameters[fss_embedded_list_write_parameter_object].values.array[i]]; - object.used = strnlen(object.string, f_console_length_size); + object.used = strnlen(object.string, f_console_parameter_size); object.size = object.used; status = fss_embedded_list_write_process(*data, output, quote, &object, 0, 0, &buffer); @@ -446,7 +446,7 @@ extern "C" { if (F_status_is_error(status)) break; content.string = arguments.argv[data->parameters[fss_embedded_list_write_parameter_content].values.array[i]]; - content.used = strnlen(content.string, f_console_length_size); + content.used = strnlen(content.string, f_console_parameter_size); content.size = content.used; status = fss_embedded_list_write_process(*data, output, quote, 0, &content, &ignore, &buffer); @@ -461,11 +461,11 @@ extern "C" { if (F_status_is_error(status)) break; object.string = arguments.argv[data->parameters[fss_embedded_list_write_parameter_object].values.array[i]]; - object.used = strnlen(object.string, f_console_length_size); + object.used = strnlen(object.string, f_console_parameter_size); object.size = object.used; content.string = arguments.argv[data->parameters[fss_embedded_list_write_parameter_content].values.array[i]]; - content.used = strnlen(content.string, f_console_length_size); + content.used = strnlen(content.string, f_console_parameter_size); content.size = content.used; status = fss_embedded_list_write_process(*data, output, quote, &object, &content, &ignore, &buffer); @@ -525,13 +525,13 @@ extern "C" { #ifndef _di_fss_embedded_list_write_delete_data_ f_status_t fss_embedded_list_write_delete_data(fss_embedded_list_write_data_t *data) { - for (f_string_length_t i = 0; i < fss_embedded_list_write_total_parameters; i++) { - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations); - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub); - f_macro_string_lengths_t_delete_simple(data->parameters[i].values); + for (f_array_length_t i = 0; i < fss_embedded_list_write_total_parameters; i++) { + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations); + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub); + f_macro_array_lengths_t_delete_simple(data->parameters[i].values); } // for - f_macro_string_lengths_t_delete_simple(data->remaining); + f_macro_array_lengths_t_delete_simple(data->remaining); f_macro_color_context_t_delete_simple(data->context); diff --git a/level_3/fss_embedded_list_write/c/fss_embedded_list_write.h b/level_3/fss_embedded_list_write/c/fss_embedded_list_write.h index 4341067..3916631 100644 --- a/level_3/fss_embedded_list_write/c/fss_embedded_list_write.h +++ b/level_3/fss_embedded_list_write/c/fss_embedded_list_write.h @@ -131,7 +131,7 @@ extern "C" { typedef struct { f_console_parameter_t parameters[fss_embedded_list_write_total_parameters]; - f_string_lengths_t remaining; + f_array_lengths_t remaining; bool process_pipe; f_file_t output; @@ -144,7 +144,7 @@ extern "C" { #define fss_embedded_list_write_data_t_initialize \ { \ fss_embedded_list_write_console_parameter_t_initialize, \ - f_string_lengths_t_initialize, \ + f_array_lengths_t_initialize, \ F_false, \ f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \ fll_error_print_t_initialize, \ diff --git a/level_3/fss_embedded_list_write/c/private-fss_embedded_list_write.c b/level_3/fss_embedded_list_write/c/private-fss_embedded_list_write.c index 5c8090f..f9809a3 100644 --- a/level_3/fss_embedded_list_write/c/private-fss_embedded_list_write.c +++ b/level_3/fss_embedded_list_write/c/private-fss_embedded_list_write.c @@ -130,8 +130,8 @@ extern "C" { input.id = f_type_descriptor_input; input.size_read = 2048; - f_string_length_t total = 0; - f_string_length_t previous = 0; + f_array_length_t total = 0; + f_array_length_t previous = 0; f_string_range_t range = f_string_range_t_initialize; f_string_range_t range_ignore = f_string_range_t_initialize; @@ -364,7 +364,7 @@ extern "C" { index = data.parameters[fss_embedded_list_write_parameter_ignore].values.array[i * 2]; range.start = 0; - range.stop = strnlen(arguments.argv[index], f_console_length_size) - 1; + range.stop = strnlen(arguments.argv[index], f_console_parameter_size) - 1; // allow and ignore the positive sign. if (range.stop > 0 && arguments.argv[index][0] == '+') { @@ -383,7 +383,7 @@ extern "C" { index = data.parameters[fss_embedded_list_write_parameter_ignore].values.array[(i * 2) + 1]; range.start = 0; - range.stop = strnlen(arguments.argv[index], f_console_length_size) - 1; + range.stop = strnlen(arguments.argv[index], f_console_parameter_size) - 1; // allow and ignore the positive sign. if (range.stop > 0 && arguments.argv[index][0] == '+') { diff --git a/level_3/fss_extended_list_read/c/fss_extended_list_read.c b/level_3/fss_extended_list_read/c/fss_extended_list_read.c index 8c57e8f..82cdbee 100644 --- a/level_3/fss_extended_list_read/c/fss_extended_list_read.c +++ b/level_3/fss_extended_list_read/c/fss_extended_list_read.c @@ -349,8 +349,8 @@ extern "C" { status = F_status_set_error(F_parameter); } else if (data->parameters[fss_extended_list_read_parameter_delimit].result == f_console_result_additional) { - const f_string_length_t location = data->parameters[fss_extended_list_read_parameter_delimit].values.array[0]; - f_string_length_t length = strnlen(arguments.argv[location], f_console_length_size); + const f_array_length_t location = data->parameters[fss_extended_list_read_parameter_delimit].values.array[0]; + f_array_length_t length = strnlen(arguments.argv[location], f_console_parameter_size); if (length == 0) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error); @@ -402,7 +402,7 @@ extern "C" { f_fss_delimits_t delimits = f_fss_delimits_t_initialize; f_fss_comments_t comments = f_fss_comments_t_initialize; - f_string_length_t original_size = data->quantity.total; + f_array_length_t original_size = data->quantity.total; if (F_status_is_error_not(status)) { status = fss_extended_list_read_main_preprocess_depth(arguments, *data, &depths); @@ -538,16 +538,16 @@ extern "C" { #ifndef _di_fss_extended_list_read_delete_data_ f_status_t fss_extended_list_read_delete_data(fss_extended_list_read_data_t *data) { - for (f_string_length_t i = 0; i < fss_extended_list_read_total_parameters; i++) { - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations); - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub); - f_macro_string_lengths_t_delete_simple(data->parameters[i].values); + for (f_array_length_t i = 0; i < fss_extended_list_read_total_parameters; i++) { + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations); + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub); + f_macro_array_lengths_t_delete_simple(data->parameters[i].values); } // for f_macro_fss_contents_t_delete_simple(data->contents); f_macro_fss_objects_t_delete_simple(data->objects); f_macro_string_dynamic_t_delete_simple(data->buffer); - f_macro_string_lengths_t_delete_simple(data->remaining); + f_macro_array_lengths_t_delete_simple(data->remaining); f_macro_color_context_t_delete_simple(data->context); diff --git a/level_3/fss_extended_list_read/c/fss_extended_list_read.h b/level_3/fss_extended_list_read/c/fss_extended_list_read.h index 2bb2747..cff8c9b 100644 --- a/level_3/fss_extended_list_read/c/fss_extended_list_read.h +++ b/level_3/fss_extended_list_read/c/fss_extended_list_read.h @@ -169,7 +169,7 @@ extern "C" { typedef struct { f_console_parameter_t parameters[fss_extended_list_read_total_parameters]; - f_string_lengths_t remaining; + f_array_lengths_t remaining; bool process_pipe; f_file_t output; @@ -181,7 +181,7 @@ extern "C" { f_string_quantity_t quantity; uint8_t delimit_mode; - f_string_length_t delimit_depth; + f_array_length_t delimit_depth; f_color_context_t context; } fss_extended_list_read_data_t; @@ -189,7 +189,7 @@ extern "C" { #define fss_extended_list_read_data_t_initialize \ { \ fss_extended_list_read_console_parameter_t_initialize, \ - f_string_lengths_t_initialize, \ + f_array_lengths_t_initialize, \ F_false, \ f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \ fll_error_print_t_initialize, \ 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 892ac40..30f8971 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 @@ -105,7 +105,7 @@ extern "C" { if (status_code == F_memory_not) { fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]); } - else if (status_code == f_string_length_t_size) { + else if (status_code == f_array_length_t_size) { fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to process '", fll_error_print_error); fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_trim); fl_color_print(data.error.to.stream, data.context.set.error, "' because the maximum buffer size was reached.%c", f_string_eol_s[0]); @@ -173,7 +173,7 @@ extern "C" { f_status_t fss_extended_list_read_main_process_file(const f_console_arguments_t arguments, fss_extended_list_read_data_t *data, const f_string_t filename, const fss_extended_list_read_depths_t depths, f_fss_delimits_t *delimits, f_fss_comments_t *comments) { f_status_t status = F_none; - const f_string_lengths_t except_none = f_string_lengths_t_initialize; + const f_array_lengths_t except_none = f_array_lengths_t_initialize; bool delimited = F_true; // for this standard, delimits would always be applied, except for when delimit_depth is greater than 0. @@ -320,7 +320,7 @@ extern "C" { return F_none; } - f_status_t (*print_object)(FILE *, const f_string_static_t, const f_string_range_t, const f_string_lengths_t) = &f_print_except_dynamic_partial; + f_status_t (*print_object)(FILE *, const f_string_static_t, const f_string_range_t, const f_array_lengths_t) = &f_print_except_dynamic_partial; if (data->parameters[fss_extended_list_read_parameter_trim].result == f_console_result_found) { print_object = &fl_print_trim_except_dynamic_partial; diff --git a/level_3/fss_extended_list_read/c/private-fss_extended_list_read.h b/level_3/fss_extended_list_read/c/private-fss_extended_list_read.h index a1d4db0..6ce3470 100644 --- a/level_3/fss_extended_list_read/c/private-fss_extended_list_read.h +++ b/level_3/fss_extended_list_read/c/private-fss_extended_list_read.h @@ -25,7 +25,7 @@ extern "C" { */ #ifndef _di_fss_extended_list_read_depth_t_ typedef struct { - f_string_length_t depth; + f_array_length_t depth; f_array_length_t index_at; f_array_length_t index_name; diff --git a/level_3/fss_extended_list_write/c/fss_extended_list_write.c b/level_3/fss_extended_list_write/c/fss_extended_list_write.c index f1dbcb0..1b70256 100644 --- a/level_3/fss_extended_list_write/c/fss_extended_list_write.c +++ b/level_3/fss_extended_list_write/c/fss_extended_list_write.c @@ -191,7 +191,7 @@ extern "C" { status = F_status_set_error(F_parameter); } else { - const f_string_length_t location = data->parameters[fss_extended_list_write_parameter_file].values.array[0]; + const f_array_length_t location = data->parameters[fss_extended_list_write_parameter_file].values.array[0]; output.id = -1; output.stream = 0; @@ -320,8 +320,8 @@ extern "C" { status = F_status_set_error(F_parameter); } else if (data->parameters[fss_extended_list_write_parameter_prepend].result == f_console_result_additional) { - const f_string_length_t index = data->parameters[fss_extended_list_write_parameter_prepend].values.array[data->parameters[fss_extended_list_write_parameter_prepend].values.used - 1]; - const f_string_length_t length = strnlen(arguments.argv[index], f_console_length_size); + const f_array_length_t index = data->parameters[fss_extended_list_write_parameter_prepend].values.array[data->parameters[fss_extended_list_write_parameter_prepend].values.used - 1]; + const f_array_length_t length = strnlen(arguments.argv[index], f_console_parameter_size); if (length) { f_string_range_t range = f_macro_string_range_t_initialize(length); @@ -432,7 +432,7 @@ extern "C" { for (f_array_length_t i = 0; i < data->parameters[fss_extended_list_write_parameter_object].values.used; i++) { object.string = arguments.argv[data->parameters[fss_extended_list_write_parameter_object].values.array[i]]; - object.used = strnlen(object.string, f_console_length_size); + object.used = strnlen(object.string, f_console_parameter_size); object.size = object.used; status = fss_extended_list_write_process(*data, output, quote, &object, 0, 0, &buffer); @@ -446,7 +446,7 @@ extern "C" { if (F_status_is_error(status)) break; content.string = arguments.argv[data->parameters[fss_extended_list_write_parameter_content].values.array[i]]; - content.used = strnlen(content.string, f_console_length_size); + content.used = strnlen(content.string, f_console_parameter_size); content.size = content.used; status = fss_extended_list_write_process(*data, output, quote, 0, &content, &ignore, &buffer); @@ -461,11 +461,11 @@ extern "C" { if (F_status_is_error(status)) break; object.string = arguments.argv[data->parameters[fss_extended_list_write_parameter_object].values.array[i]]; - object.used = strnlen(object.string, f_console_length_size); + object.used = strnlen(object.string, f_console_parameter_size); object.size = object.used; content.string = arguments.argv[data->parameters[fss_extended_list_write_parameter_content].values.array[i]]; - content.used = strnlen(content.string, f_console_length_size); + content.used = strnlen(content.string, f_console_parameter_size); content.size = content.used; status = fss_extended_list_write_process(*data, output, quote, &object, &content, &ignore, &buffer); @@ -525,13 +525,13 @@ extern "C" { #ifndef _di_fss_extended_list_write_delete_data_ f_status_t fss_extended_list_write_delete_data(fss_extended_list_write_data_t *data) { - for (f_string_length_t i = 0; i < fss_extended_list_write_total_parameters; i++) { - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations); - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub); - f_macro_string_lengths_t_delete_simple(data->parameters[i].values); + for (f_array_length_t i = 0; i < fss_extended_list_write_total_parameters; i++) { + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations); + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub); + f_macro_array_lengths_t_delete_simple(data->parameters[i].values); } // for - f_macro_string_lengths_t_delete_simple(data->remaining); + f_macro_array_lengths_t_delete_simple(data->remaining); f_macro_color_context_t_delete_simple(data->context); diff --git a/level_3/fss_extended_list_write/c/fss_extended_list_write.h b/level_3/fss_extended_list_write/c/fss_extended_list_write.h index 9d462f3..1c10409 100644 --- a/level_3/fss_extended_list_write/c/fss_extended_list_write.h +++ b/level_3/fss_extended_list_write/c/fss_extended_list_write.h @@ -131,7 +131,7 @@ extern "C" { typedef struct { f_console_parameter_t parameters[fss_extended_list_write_total_parameters]; - f_string_lengths_t remaining; + f_array_lengths_t remaining; bool process_pipe; f_file_t output; @@ -144,7 +144,7 @@ extern "C" { #define fss_extended_list_write_data_t_initialize \ { \ fss_extended_list_write_console_parameter_t_initialize, \ - f_string_lengths_t_initialize, \ + f_array_lengths_t_initialize, \ F_false, \ f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \ fll_error_print_t_initialize, \ diff --git a/level_3/fss_extended_list_write/c/private-fss_extended_list_write.c b/level_3/fss_extended_list_write/c/private-fss_extended_list_write.c index 0c0243e..8d3ca8c 100644 --- a/level_3/fss_extended_list_write/c/private-fss_extended_list_write.c +++ b/level_3/fss_extended_list_write/c/private-fss_extended_list_write.c @@ -130,8 +130,8 @@ extern "C" { input.id = f_type_descriptor_input; input.size_read = 2048; - f_string_length_t total = 0; - f_string_length_t previous = 0; + f_array_length_t total = 0; + f_array_length_t previous = 0; f_string_range_t range = f_string_range_t_initialize; f_string_range_t range_ignore = f_string_range_t_initialize; @@ -364,7 +364,7 @@ extern "C" { index = data.parameters[fss_extended_list_write_parameter_ignore].values.array[i * 2]; range.start = 0; - range.stop = strnlen(arguments.argv[index], f_console_length_size) - 1; + range.stop = strnlen(arguments.argv[index], f_console_parameter_size) - 1; // allow and ignore the positive sign. if (range.stop > 0 && arguments.argv[index][0] == '+') { @@ -383,7 +383,7 @@ extern "C" { index = data.parameters[fss_extended_list_write_parameter_ignore].values.array[(i * 2) + 1]; range.start = 0; - range.stop = strnlen(arguments.argv[index], f_console_length_size) - 1; + range.stop = strnlen(arguments.argv[index], f_console_parameter_size) - 1; // allow and ignore the positive sign. if (range.stop > 0 && arguments.argv[index][0] == '+') { diff --git a/level_3/fss_extended_read/c/fss_extended_read.c b/level_3/fss_extended_read/c/fss_extended_read.c index fa895a0..9e270b7 100644 --- a/level_3/fss_extended_read/c/fss_extended_read.c +++ b/level_3/fss_extended_read/c/fss_extended_read.c @@ -349,8 +349,8 @@ extern "C" { status = F_status_set_error(F_parameter); } else if (data->parameters[fss_extended_read_parameter_delimit].result == f_console_result_additional) { - const f_string_length_t location = data->parameters[fss_extended_read_parameter_delimit].values.array[0]; - f_string_length_t length = strnlen(arguments.argv[location], f_console_length_size); + const f_array_length_t location = data->parameters[fss_extended_read_parameter_delimit].values.array[0]; + f_array_length_t length = strnlen(arguments.argv[location], f_console_parameter_size); if (length == 0) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error); @@ -402,7 +402,7 @@ extern "C" { f_fss_delimits_t objects_delimits = f_fss_delimits_t_initialize; f_fss_delimits_t contents_delimits = f_fss_delimits_t_initialize; - f_string_length_t original_size = data->quantity.total; + f_array_length_t original_size = data->quantity.total; if (F_status_is_error_not(status)) { status = fss_extended_read_main_preprocess_depth(arguments, *data, &depths); @@ -538,16 +538,16 @@ extern "C" { #ifndef _di_fss_extended_read_delete_data_ f_status_t fss_extended_read_delete_data(fss_extended_read_data_t *data) { - for (f_string_length_t i = 0; i < fss_extended_read_total_parameters; i++) { - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations); - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub); - f_macro_string_lengths_t_delete_simple(data->parameters[i].values); + for (f_array_length_t i = 0; i < fss_extended_read_total_parameters; i++) { + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations); + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub); + f_macro_array_lengths_t_delete_simple(data->parameters[i].values); } // for f_macro_fss_contents_t_delete_simple(data->contents); f_macro_fss_objects_t_delete_simple(data->objects); f_macro_string_dynamic_t_delete_simple(data->buffer); - f_macro_string_lengths_t_delete_simple(data->remaining); + f_macro_array_lengths_t_delete_simple(data->remaining); f_macro_color_context_t_delete_simple(data->context); diff --git a/level_3/fss_extended_read/c/fss_extended_read.h b/level_3/fss_extended_read/c/fss_extended_read.h index 77060cb..3f8db59 100644 --- a/level_3/fss_extended_read/c/fss_extended_read.h +++ b/level_3/fss_extended_read/c/fss_extended_read.h @@ -169,7 +169,7 @@ extern "C" { typedef struct { f_console_parameter_t parameters[fss_extended_read_total_parameters]; - f_string_lengths_t remaining; + f_array_lengths_t remaining; bool process_pipe; f_file_t output; @@ -181,7 +181,7 @@ extern "C" { f_string_quantity_t quantity; uint8_t delimit_mode; - f_string_length_t delimit_depth; + f_array_length_t delimit_depth; f_color_context_t context; } fss_extended_read_data_t; @@ -189,7 +189,7 @@ extern "C" { #define fss_extended_read_data_t_initialize \ { \ fss_extended_read_console_parameter_t_initialize, \ - f_string_lengths_t_initialize, \ + f_array_lengths_t_initialize, \ F_false, \ f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \ fll_error_print_t_initialize, \ 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 0b2cbc7..36f7db4 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 @@ -6,7 +6,7 @@ extern "C" { #endif #ifndef _di_fss_extended_read_is_delimited_at_depth_ - f_status_t fss_extended_read_is_delimited_at_depth(const fss_extended_read_data_t data, const f_string_length_t depth) { + f_status_t fss_extended_read_is_delimited_at_depth(const fss_extended_read_data_t data, const f_array_length_t depth) { if (data.delimit_mode == fss_extended_read_delimit_mode_none) { return F_false; @@ -132,7 +132,7 @@ extern "C" { if (status_code == F_memory_not) { fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]); } - else if (status_code == f_string_length_t_size) { + else if (status_code == f_array_length_t_size) { fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to process '", fll_error_print_error); fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_trim); fl_color_print(data.error.to.stream, data.context.set.error, "' because the maximum buffer size was reached.%c", f_string_eol_s[0]); @@ -200,7 +200,7 @@ extern "C" { f_status_t fss_extended_read_main_process_file(const f_console_arguments_t arguments, fss_extended_read_data_t *data, const f_string_t filename, const fss_extended_read_depths_t depths, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits) { f_status_t status = F_none; - const f_string_lengths_t except_none = f_string_lengths_t_initialize; + const f_array_lengths_t except_none = f_array_lengths_t_initialize; bool object_delimited = F_true; bool content_delimited = F_true; @@ -333,7 +333,7 @@ extern "C" { return F_none; } - f_status_t (*print_object)(FILE *, const f_string_static_t, const f_string_range_t, const f_string_lengths_t) = &f_print_except_dynamic_partial; + f_status_t (*print_object)(FILE *, const f_string_static_t, const f_string_range_t, const f_array_lengths_t) = &f_print_except_dynamic_partial; if (data->parameters[fss_extended_read_parameter_trim].result == f_console_result_found) { print_object = &fl_print_trim_except_dynamic_partial; diff --git a/level_3/fss_extended_read/c/private-fss_extended_read.h b/level_3/fss_extended_read/c/private-fss_extended_read.h index 0b7c41d..9cdaece 100644 --- a/level_3/fss_extended_read/c/private-fss_extended_read.h +++ b/level_3/fss_extended_read/c/private-fss_extended_read.h @@ -25,7 +25,7 @@ extern "C" { */ #ifndef _di_fss_extended_read_depth_t_ typedef struct { - f_string_length_t depth; + f_array_length_t depth; f_array_length_t index_at; f_array_length_t index_name; @@ -122,7 +122,7 @@ extern "C" { * F_false if not delimited. */ #ifndef _di_fss_extended_read_is_delimited_at_depth_ - extern f_status_t fss_extended_read_is_delimited_at_depth(const fss_extended_read_data_t data, const f_string_length_t depth) f_gcc_attribute_visibility_internal; + extern f_status_t fss_extended_read_is_delimited_at_depth(const fss_extended_read_data_t data, const f_array_length_t depth) f_gcc_attribute_visibility_internal; #endif // _di_fss_extended_read_is_delimited_at_depth_ /** 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 0fe2d1e..02c3718 100644 --- a/level_3/fss_extended_write/c/fss_extended_write.c +++ b/level_3/fss_extended_write/c/fss_extended_write.c @@ -183,7 +183,7 @@ extern "C" { status = F_status_set_error(F_parameter); } else { - const f_string_length_t location = data->parameters[fss_extended_write_parameter_file].values.array[0]; + const f_array_length_t location = data->parameters[fss_extended_write_parameter_file].values.array[0]; output.id = -1; output.stream = 0; @@ -323,8 +323,8 @@ extern "C" { status = F_status_set_error(F_parameter); } else if (data->parameters[fss_extended_write_parameter_prepend].result == f_console_result_additional) { - const f_string_length_t index = data->parameters[fss_extended_write_parameter_prepend].values.array[data->parameters[fss_extended_write_parameter_prepend].values.used - 1]; - const f_string_length_t length = strnlen(arguments.argv[index], f_console_length_size); + const f_array_length_t index = data->parameters[fss_extended_write_parameter_prepend].values.array[data->parameters[fss_extended_write_parameter_prepend].values.used - 1]; + const f_array_length_t length = strnlen(arguments.argv[index], f_console_parameter_size); // Even though this standard does not utilize this parameter, provide the validation for consistency. if (length) { @@ -431,7 +431,7 @@ extern "C" { for (f_array_length_t i = 0; i < data->parameters[fss_extended_write_parameter_object].values.used; i++) { object.string = arguments.argv[data->parameters[fss_extended_write_parameter_object].values.array[i]]; - object.used = strnlen(object.string, f_console_length_size); + object.used = strnlen(object.string, f_console_parameter_size); object.size = object.used; status = fss_extended_write_process(*data, output, quote, &object, 0, &buffer); @@ -456,7 +456,7 @@ extern "C" { for (; i < data->parameters[fss_extended_write_parameter_content].values.used; i++) { contents.array[contents.used].string = arguments.argv[data->parameters[fss_extended_write_parameter_content].values.array[i]]; - contents.array[contents.used].used = strnlen(contents.array[contents.used].string, f_console_length_size); + contents.array[contents.used].used = strnlen(contents.array[contents.used].string, f_console_parameter_size); contents.array[contents.used].size = contents.array[contents.used].used; contents.used++; } // for @@ -491,7 +491,7 @@ extern "C" { } object.string = arguments.argv[data->parameters[fss_extended_write_parameter_object].values.array[i]]; - object.used = strnlen(object.string, f_console_length_size); + object.used = strnlen(object.string, f_console_parameter_size); object.size = object.used; contents.used = 0; @@ -515,7 +515,7 @@ extern "C" { contents.array[contents.used].used = 0; } - status = f_string_append(arguments.argv[data->parameters[fss_extended_write_parameter_content].values.array[j]], strnlen(arguments.argv[data->parameters[fss_extended_write_parameter_content].values.array[j]], f_console_length_size), &contents.array[contents.used]); + status = f_string_append(arguments.argv[data->parameters[fss_extended_write_parameter_content].values.array[j]], strnlen(arguments.argv[data->parameters[fss_extended_write_parameter_content].values.array[j]], f_console_parameter_size), &contents.array[contents.used]); if (F_status_is_error(status)) { fll_error_print(data->error, F_status_set_fine(status), "f_string_append", F_true); @@ -581,13 +581,13 @@ extern "C" { #ifndef _di_fss_extended_write_delete_data_ f_status_t fss_extended_write_delete_data(fss_extended_write_data_t *data) { - for (f_string_length_t i = 0; i < fss_extended_write_total_parameters; i++) { - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations); - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub); - f_macro_string_lengths_t_delete_simple(data->parameters[i].values); + for (f_array_length_t i = 0; i < fss_extended_write_total_parameters; i++) { + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations); + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub); + f_macro_array_lengths_t_delete_simple(data->parameters[i].values); } // for - f_macro_string_lengths_t_delete_simple(data->remaining); + f_macro_array_lengths_t_delete_simple(data->remaining); f_macro_color_context_t_delete_simple(data->context); diff --git a/level_3/fss_extended_write/c/fss_extended_write.h b/level_3/fss_extended_write/c/fss_extended_write.h index 81a2e0c..e949681 100644 --- a/level_3/fss_extended_write/c/fss_extended_write.h +++ b/level_3/fss_extended_write/c/fss_extended_write.h @@ -130,7 +130,7 @@ extern "C" { typedef struct { f_console_parameter_t parameters[fss_extended_write_total_parameters]; - f_string_lengths_t remaining; + f_array_lengths_t remaining; bool process_pipe; f_file_t output; @@ -143,7 +143,7 @@ extern "C" { #define fss_extended_write_data_t_initialize \ { \ fss_extended_write_console_parameter_t_initialize, \ - f_string_lengths_t_initialize, \ + f_array_lengths_t_initialize, \ F_false, \ f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \ fll_error_print_t_initialize, \ diff --git a/level_3/fss_extended_write/c/private-fss_extended_write.c b/level_3/fss_extended_write/c/private-fss_extended_write.c index 32e8096..9d4c7a3 100644 --- a/level_3/fss_extended_write/c/private-fss_extended_write.c +++ b/level_3/fss_extended_write/c/private-fss_extended_write.c @@ -148,8 +148,8 @@ extern "C" { f_array_length_t i = 0; - f_string_length_t total = 0; - f_string_length_t previous = 0; + f_array_length_t total = 0; + f_array_length_t previous = 0; f_string_range_t range = f_string_range_t_initialize; f_string_dynamic_t block = f_string_dynamic_t_initialize; diff --git a/level_3/fss_status_code/c/fss_status_code.c b/level_3/fss_status_code/c/fss_status_code.c index 14e084f..72d35c1 100644 --- a/level_3/fss_status_code/c/fss_status_code.c +++ b/level_3/fss_status_code/c/fss_status_code.c @@ -212,13 +212,13 @@ extern "C" { #ifndef _di_fss_status_code_delete_data_ f_status_t fss_status_code_delete_data(fss_status_code_data_t *data) { - for (f_string_length_t i = 0; i < fss_status_code_total_parameters; i++) { - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations); - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub); - f_macro_string_lengths_t_delete_simple(data->parameters[i].values); + for (f_array_length_t i = 0; i < fss_status_code_total_parameters; i++) { + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations); + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub); + f_macro_array_lengths_t_delete_simple(data->parameters[i].values); } // for - f_macro_string_lengths_t_delete_simple(data->remaining); + f_macro_array_lengths_t_delete_simple(data->remaining); f_macro_color_context_t_delete_simple(data->context); diff --git a/level_3/fss_status_code/c/fss_status_code.h b/level_3/fss_status_code/c/fss_status_code.h index d113fa0..b15c866 100644 --- a/level_3/fss_status_code/c/fss_status_code.h +++ b/level_3/fss_status_code/c/fss_status_code.h @@ -107,7 +107,7 @@ extern "C" { typedef struct { f_console_parameter_t parameters[fss_status_code_total_parameters]; - f_string_lengths_t remaining; + f_array_lengths_t remaining; bool process_pipe; f_file_t output; @@ -119,7 +119,7 @@ extern "C" { #define fss_status_code_data_t_initialize \ { \ fss_status_code_console_parameter_t_initialize, \ - f_string_lengths_t_initialize, \ + f_array_lengths_t_initialize, \ F_false, \ f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \ fll_error_print_t_initialize, \ diff --git a/level_3/iki_read/c/iki_read.c b/level_3/iki_read/c/iki_read.c index 2f62f11..573cca1 100644 --- a/level_3/iki_read/c/iki_read.c +++ b/level_3/iki_read/c/iki_read.c @@ -189,7 +189,7 @@ extern "C" { status = F_status_set_error(F_parameter); } else if (data->parameters[iki_read_parameter_at].result == f_console_result_additional) { - const f_string_length_t index = data->parameters[iki_read_parameter_at].values.array[data->parameters[iki_read_parameter_at].values.used - 1]; + const f_array_length_t index = data->parameters[iki_read_parameter_at].values.array[data->parameters[iki_read_parameter_at].values.used - 1]; const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index])); f_number_unsigned_t number = 0; @@ -229,7 +229,7 @@ extern "C" { status = F_status_set_error(F_parameter); } else if (data->parameters[iki_read_parameter_line].result == f_console_result_additional) { - const f_string_length_t index = data->parameters[iki_read_parameter_line].values.array[data->parameters[iki_read_parameter_line].values.used - 1]; + const f_array_length_t index = data->parameters[iki_read_parameter_line].values.array[data->parameters[iki_read_parameter_line].values.used - 1]; const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index])); f_number_unsigned_t number = 0; @@ -404,8 +404,8 @@ extern "C" { } if (F_status_is_fine(status) && data->remaining.used > 0) { - f_string_length_t i = 0; - f_string_length_t total = 0; + f_array_length_t i = 0; + f_array_length_t total = 0; f_file_t file = f_file_t_initialize; for (; i < data->remaining.used; i++) { @@ -475,13 +475,13 @@ extern "C" { #ifndef _di_iki_read_delete_data_ f_status_t iki_read_delete_data(iki_read_data_t *data) { - for (f_string_length_t i = 0; i < iki_read_total_parameters; i++) { - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations); - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub); - f_macro_string_lengths_t_delete_simple(data->parameters[i].values); + for (f_array_length_t i = 0; i < iki_read_total_parameters; i++) { + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations); + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub); + f_macro_array_lengths_t_delete_simple(data->parameters[i].values); } // for - f_macro_string_lengths_t_delete_simple(data->remaining); + f_macro_array_lengths_t_delete_simple(data->remaining); f_macro_string_dynamic_t_delete_simple(data->buffer); f_macro_color_context_t_delete_simple(data->context); diff --git a/level_3/iki_read/c/iki_read.h b/level_3/iki_read/c/iki_read.h index 44543d6..07f3b21 100644 --- a/level_3/iki_read/c/iki_read.h +++ b/level_3/iki_read/c/iki_read.h @@ -184,7 +184,7 @@ extern "C" { typedef struct { f_console_parameter_t parameters[iki_read_total_parameters]; - f_string_lengths_t remaining; + f_array_lengths_t remaining; bool process_pipe; f_file_t output; @@ -205,7 +205,7 @@ extern "C" { #define iki_read_data_t_initialize \ { \ iki_read_console_parameter_t_initialize, \ - f_string_lengths_t_initialize, \ + f_array_lengths_t_initialize, \ F_false, \ f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \ fll_error_print_t_initialize, \ diff --git a/level_3/iki_read/c/private-iki_read.c b/level_3/iki_read/c/private-iki_read.c index 3a7466a..3c82f60 100644 --- a/level_3/iki_read/c/private-iki_read.c +++ b/level_3/iki_read/c/private-iki_read.c @@ -9,7 +9,7 @@ extern "C" { f_status_t iki_read_process_at(const f_console_arguments_t arguments, const f_string_t file_name, iki_read_data_t *data, f_string_range_t *range) { if (data->parameters[iki_read_parameter_line].result != f_console_result_additional) return F_false; - f_string_length_t line = 0; + f_array_length_t line = 0; range->start = 0; if (data->line > 0) { @@ -185,7 +185,7 @@ extern "C" { } else if (ranges->used) { f_array_length_t i = 0; - f_string_length_t j = 0; + f_array_length_t j = 0; for (; i < ranges->used; i++) { @@ -261,12 +261,12 @@ extern "C" { if (data->parameters[iki_read_parameter_name].result == f_console_result_additional) { f_array_length_t i = 0; f_array_length_t j = 0; - f_string_length_t length_argument = 0; + f_array_length_t length_argument = 0; for (f_array_length_t index = 0; i < data->parameters[iki_read_parameter_name].values.used; i++) { index = data->parameters[iki_read_parameter_name].values.array[i]; - length_argument = strnlen(arguments.argv[index], f_console_length_size); + length_argument = strnlen(arguments.argv[index], f_console_parameter_size); for (j = 0, name_missed = F_true; j < names.used; j++) { @@ -308,7 +308,7 @@ extern "C" { } { - f_string_length_t i = buffer_range.start; + f_array_length_t i = buffer_range.start; f_array_length_t j = 0; f_array_length_t k = 0; @@ -474,14 +474,14 @@ extern "C" { f_array_length_t index = 0; f_array_length_t index_2 = 0; - f_string_length_t length = 0; + f_array_length_t length = 0; f_console_parameter_t *parameter = &data->parameters[iki_read_parameter_substitute]; for (; i < parameter->values.used; i += 3) { index = parameter->values.array[i]; - length = strnlen(arguments.argv[index], f_console_length_size); + length = strnlen(arguments.argv[index], f_console_parameter_size); for (j = 0; j < vocabulary->used; j++) { @@ -494,12 +494,12 @@ extern "C" { index = parameter->values.array[i + 1]; index_2 = substitutionss[j].used; substitutionss[j].array[index_2].replace.string = arguments.argv[index]; - substitutionss[j].array[index_2].replace.used = strnlen(arguments.argv[index], f_console_length_size); + substitutionss[j].array[index_2].replace.used = strnlen(arguments.argv[index], f_console_parameter_size); substitutionss[j].array[index_2].replace.size = substitutionss[j].array[index_2].replace.used; index = parameter->values.array[i + 2]; substitutionss[j].array[index_2].with.string = arguments.argv[index]; - substitutionss[j].array[index_2].with.used = strnlen(arguments.argv[index], f_console_length_size); + substitutionss[j].array[index_2].with.used = strnlen(arguments.argv[index], f_console_parameter_size); substitutionss[j].array[index_2].with.size = substitutionss[j].array[index_2].with.used; substitutionss[j].used++; @@ -512,10 +512,10 @@ extern "C" { #endif // _di_iki_read_substitutions_identify_ #ifndef _di_iki_read_substitutions_print_ - void iki_read_substitutions_print(const iki_read_data_t data, const f_iki_variable_t variable, const f_iki_content_t content, const f_string_ranges_t ranges, const iki_read_substitutions_t substitutions, const f_string_length_t index, const bool content_only) { + void iki_read_substitutions_print(const iki_read_data_t data, const f_iki_variable_t variable, const f_iki_content_t content, const f_string_ranges_t ranges, const iki_read_substitutions_t substitutions, const f_array_length_t index, const bool content_only) { f_status_t status = F_none; - f_string_length_t i = 0; + f_array_length_t i = 0; f_string_range_t range = f_string_range_t_initialize; range.start = 0; diff --git a/level_3/iki_read/c/private-iki_read.h b/level_3/iki_read/c/private-iki_read.h index d195f0a..2d75619 100644 --- a/level_3/iki_read/c/private-iki_read.h +++ b/level_3/iki_read/c/private-iki_read.h @@ -190,7 +190,7 @@ extern "C" { * Set to FALSE to print the entire variable when printing substituted text. */ #ifndef _di_iki_read_substitutions_print_ - extern void iki_read_substitutions_print(const iki_read_data_t data, const f_iki_variable_t variable, const f_iki_content_t content, const f_string_ranges_t ranges, const iki_read_substitutions_t substitutions, const f_string_length_t index, const bool content_only) f_gcc_attribute_visibility_internal; + extern void iki_read_substitutions_print(const iki_read_data_t data, const f_iki_variable_t variable, const f_iki_content_t content, const f_string_ranges_t ranges, const iki_read_substitutions_t substitutions, const f_array_length_t index, const bool content_only) f_gcc_attribute_visibility_internal; #endif // _di_iki_read_substitutions_print_ #ifdef __cplusplus diff --git a/level_3/iki_write/c/iki_write.c b/level_3/iki_write/c/iki_write.c index 29ad661..973d525 100644 --- a/level_3/iki_write/c/iki_write.c +++ b/level_3/iki_write/c/iki_write.c @@ -155,7 +155,7 @@ extern "C" { status = F_status_set_error(F_parameter); } else { - const f_string_length_t location = data->parameters[iki_write_parameter_file].values.array[0]; + const f_array_length_t location = data->parameters[iki_write_parameter_file].values.array[0]; output.id = -1; output.stream = 0; @@ -257,7 +257,7 @@ extern "C" { bool object_ended = F_false; - f_string_length_t previous = 0; + f_array_length_t previous = 0; f_string_range_t range = f_string_range_t_initialize; range.start = 0; @@ -378,11 +378,11 @@ extern "C" { for (f_array_length_t i = 0; i < data->parameters[iki_write_parameter_object].values.used; i++) { object.string = arguments.argv[data->parameters[iki_write_parameter_object].values.array[i]]; - object.used = strnlen(object.string, f_console_length_size); + object.used = strnlen(object.string, f_console_parameter_size); object.size = object.used; content.string = arguments.argv[data->parameters[iki_write_parameter_content].values.array[i]]; - content.used = strnlen(content.string, f_console_length_size); + content.used = strnlen(content.string, f_console_parameter_size); content.size = content.used; status = iki_write_process(*data, output, object, content, quote, &escaped); @@ -421,13 +421,13 @@ extern "C" { #ifndef _di_iki_write_delete_data_ f_status_t iki_write_delete_data(iki_write_data_t *data) { - for (f_string_length_t i = 0; i < iki_write_total_parameters; i++) { - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations); - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub); - f_macro_string_lengths_t_delete_simple(data->parameters[i].values); + for (f_array_length_t i = 0; i < iki_write_total_parameters; i++) { + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations); + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub); + f_macro_array_lengths_t_delete_simple(data->parameters[i].values); } // for - f_macro_string_lengths_t_delete_simple(data->remaining); + f_macro_array_lengths_t_delete_simple(data->remaining); f_macro_string_dynamic_t_delete_simple(data->buffer); f_macro_color_context_t_delete_simple(data->context); diff --git a/level_3/iki_write/c/iki_write.h b/level_3/iki_write/c/iki_write.h index 79d3088..762f40b 100644 --- a/level_3/iki_write/c/iki_write.h +++ b/level_3/iki_write/c/iki_write.h @@ -120,7 +120,7 @@ extern "C" { typedef struct { f_console_parameter_t parameters[iki_write_total_parameters]; - f_string_lengths_t remaining; + f_array_lengths_t remaining; bool process_pipe; f_file_t output; @@ -134,7 +134,7 @@ extern "C" { #define iki_write_data_t_initialize \ { \ iki_write_console_parameter_t_initialize, \ - f_string_lengths_t_initialize, \ + f_array_lengths_t_initialize, \ F_false, \ f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \ fll_error_print_t_initialize, \ diff --git a/level_3/init/c/init.c b/level_3/init/c/init.c index 086188b..26325d4 100644 --- a/level_3/init/c/init.c +++ b/level_3/init/c/init.c @@ -106,13 +106,13 @@ extern "C" { #ifndef _di_init_delete_data_ f_status_t init_delete_data(init_data_t *data) { - for (f_string_length_t i = 0; i < init_total_parameters; i++) { - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations); - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub); - f_macro_string_lengths_t_delete_simple(data->parameters[i].values); + for (f_array_length_t i = 0; i < init_total_parameters; i++) { + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations); + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub); + f_macro_array_lengths_t_delete_simple(data->parameters[i].values); } // for - f_macro_string_lengths_t_delete_simple(data->remaining); + f_macro_array_lengths_t_delete_simple(data->remaining); f_macro_string_dynamic_t_delete_simple(data->setting_kernel.root); f_macro_string_dynamic_t_delete_simple(data->setting_kernel.root_group); diff --git a/level_3/init/c/init.h b/level_3/init/c/init.h index f93b1f9..2aeada9 100644 --- a/level_3/init/c/init.h +++ b/level_3/init/c/init.h @@ -243,7 +243,7 @@ extern "C" { typedef struct { f_console_parameter_t parameters[init_total_parameters]; - f_string_lengths_t remaining; + f_array_lengths_t remaining; f_file_t output; fll_error_print_t error; @@ -259,7 +259,7 @@ extern "C" { #define init_data_initialize \ { \ init_console_parameter_t_initialize, \ - f_string_lengths_t_initialize, \ + f_array_lengths_t_initialize, \ f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \ fll_error_print_t_initialize, \ 0, \ diff --git a/level_3/init/c/private-init.c b/level_3/init/c/private-init.c index d20ce27..6221db2 100644 --- a/level_3/init/c/private-init.c +++ b/level_3/init/c/private-init.c @@ -114,7 +114,7 @@ Consider the "*.device" files such that they are also use IKI. init_string_verbosity, }; - const f_string_length_t parameter_length[] = { + const f_array_length_t parameter_length[] = { init_string_color_length, init_string_failsafe_length, init_string_mode_length, @@ -217,8 +217,8 @@ Consider the "*.device" files such that they are also use IKI. } { - f_string_length_t i = 0; - f_string_length_t j = 0; + f_array_length_t i = 0; + f_array_length_t j = 0; for (; i < variable.used; ++i) { diff --git a/level_3/status_code/c/status_code.c b/level_3/status_code/c/status_code.c index 9931c73..34a900b 100644 --- a/level_3/status_code/c/status_code.c +++ b/level_3/status_code/c/status_code.c @@ -213,13 +213,13 @@ extern "C" { #ifndef _di_status_code_delete_data_ f_status_t status_code_delete_data(status_code_data_t *data) { - for (f_string_length_t i = 0; i < status_code_total_parameters; i++) { - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations); - f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub); - f_macro_string_lengths_t_delete_simple(data->parameters[i].values); + for (f_array_length_t i = 0; i < status_code_total_parameters; i++) { + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations); + f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub); + f_macro_array_lengths_t_delete_simple(data->parameters[i].values); } // for - f_macro_string_lengths_t_delete_simple(data->remaining); + f_macro_array_lengths_t_delete_simple(data->remaining); f_macro_color_context_t_delete_simple(data->context); diff --git a/level_3/status_code/c/status_code.h b/level_3/status_code/c/status_code.h index f498f26..24ef23e 100644 --- a/level_3/status_code/c/status_code.h +++ b/level_3/status_code/c/status_code.h @@ -106,7 +106,7 @@ extern "C" { typedef struct { f_console_parameter_t parameters[status_code_total_parameters]; - f_string_lengths_t remaining; + f_array_lengths_t remaining; bool process_pipe; f_file_t output; @@ -118,7 +118,7 @@ extern "C" { #define status_code_data_t_initialize \ { \ status_code_console_parameter_t_initialize, \ - f_string_lengths_t_initialize, \ + f_array_lengths_t_initialize, \ F_false, \ f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \ fll_error_print_t_initialize, \