From: Kevin Day Date: Sat, 22 Jul 2023 15:38:57 +0000 (-0500) Subject: Progress: Continue memory array related changes. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=35e6c5b73cd709df1f273bf4bc296b958f77d2f5;p=fll Progress: Continue memory array related changes. I noticed that I could also implement f_memory_array_append() and f_memory_array_append_all() methods if I used memcpy() and a multiplication over the type size. This: const f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_socket_t), (void **) &destination->array, &destination->used, &destination->size); if (F_status_is_error(status)) return status; for (f_number_unsigned_t i = 0; i < source.used; ++i) { destination->array[destination->used++] = source.array[i]; } // for return F_none; Could instead become: const f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_socket_t), (void **) &destination->array, &destination->used, &destination->size); if (F_status_is_error(status)) return status; memcpy(destination->array, source.array, sizeof(f_socket_t) * source.used); return F_none; This could then be logic could then be moved into something like f_memory_array_append_all(), further simplifying the code into: return f_memory_array_append(source.array, source.used, sizeof(f_socket_t), (void **) &destination->array, &destination->used, &destination->size); I need to think of the function structure that I want and so I only decided to comment in this commit. Such a change is not implemented yet but may be done at some later time. --- diff --git a/level_0/f_iki/c/iki/data.c b/level_0/f_iki/c/iki/data.c index 4a4e822..0c9fd00 100644 --- a/level_0/f_iki/c/iki/data.c +++ b/level_0/f_iki/c/iki/data.c @@ -182,12 +182,8 @@ extern "C" { if (!source.used) return F_data_not; - f_status_t status = F_none; - - if (destination->used + 1 > destination->size) { - status = private_f_iki_datass_resize(destination->used + F_memory_default_allocation_small_d, destination); - if (F_status_is_error(status)) return status; - } + f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_iki_datas_t), (void **) &destination->array, &destination->used, &destination->size); + if (F_status_is_error(status)) return status; status = private_f_iki_datas_append_all(source, &destination->array[destination->used]); if (F_status_is_error(status)) return status; @@ -206,12 +202,8 @@ extern "C" { if (!source.used) return F_data_not; - f_status_t status = F_none; - - if (destination->used + source.used > destination->size) { - status = private_f_iki_datass_resize(destination->used + source.used, destination); - if (F_status_is_error(status)) return status; - } + f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_iki_datas_t), (void **) &destination->array, &destination->used, &destination->size); + if (F_status_is_error(status)) return status; for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) { @@ -234,9 +226,8 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (!amount) return F_data_not; - if (datass->size > amount) return private_f_iki_datass_adjust(datass->size - amount, datass); - return private_f_iki_datass_adjust(0, datass); + return private_f_iki_datass_adjust((datass->size > amount) ? datass->size - amount : 0, datass); } #endif // _di_f_iki_datass_decimate_by_ @@ -247,9 +238,8 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (!amount) return F_data_not; - if (datass->size > amount) return private_f_iki_datass_resize(datass->size - amount, datass); - return private_f_iki_datass_resize(0, datass); + return private_f_iki_datass_resize((datass->size > amount) ? datass->size - amount : 0, datass); } #endif // _di_f_iki_datass_decrease_by_ diff --git a/level_0/f_iki/c/iki/data.h b/level_0/f_iki/c/iki/data.h index 5e3f1c9..ae59c6a 100644 --- a/level_0/f_iki/c/iki/data.h +++ b/level_0/f_iki/c/iki/data.h @@ -71,7 +71,13 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_adjust(). + * Errors (with error bit) from: f_memory_array_adjust(). + * Errors (with error bit) from: f_number_unsigneds_adjust(). + * Errors (with error bit) from: f_string_ranges_adjust(). + * + * @see f_memory_array_adjust() + * @see f_number_unsigneds_adjust() + * @see f_string_ranges_adjust() */ #ifndef _di_f_iki_datas_adjust_ extern f_status_t f_iki_datas_adjust(const f_number_unsigned_t length, f_iki_datas_t *datas); @@ -91,7 +97,13 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_increase(). + * Errors (with error bit) from: f_number_unsigneds_append_all(). + * Errors (with error bit) from: f_string_ranges_append_all(). + * + * @see f_memory_array_increase() + * @see f_number_unsigneds_append_all() + * @see f_string_ranges_append_all() */ #ifndef _di_f_iki_datas_append_ extern f_status_t f_iki_datas_append(const f_iki_data_t source, f_iki_datas_t *destination); @@ -111,7 +123,13 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_increase_by(). + * Errors (with error bit) from: f_number_unsigneds_append_all(). + * Errors (with error bit) from: f_string_ranges_append_all(). + * + * @see f_memory_array_increase_by() + * @see f_number_unsigneds_append_all() + * @see f_string_ranges_append_all() */ #ifndef _di_f_iki_datas_append_all_ extern f_status_t f_iki_datas_append_all(const f_iki_datas_t source, f_iki_datas_t *destination); @@ -135,7 +153,13 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_adjust(). + * Errors (with error bit) from: f_memory_array_adjust(). + * Errors (with error bit) from: f_number_unsigneds_adjust(). + * Errors (with error bit) from: f_string_ranges_adjust(). + * + * @see f_memory_array_adjust() + * @see f_number_unsigneds_adjust() + * @see f_string_ranges_adjust() */ #ifndef _di_f_iki_datas_decimate_by_ extern f_status_t f_iki_datas_decimate_by(const f_number_unsigned_t amount, f_iki_datas_t *datas); @@ -159,7 +183,13 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_resize(). + * Errors (with error bit) from: f_number_unsigneds_resize(). + * Errors (with error bit) from: f_string_ranges_resize(). + * + * @see f_memory_array_resize() + * @see f_number_unsigneds_resize() + * @see f_string_ranges_resize() */ #ifndef _di_f_iki_datas_decrease_by_ extern f_status_t f_iki_datas_decrease_by(const f_number_unsigned_t amount, f_iki_datas_t *datas); @@ -184,7 +214,13 @@ extern "C" { * F_array_too_large (with error bit) if the new array length is too large. * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_resize(). + * Errors (with error bit) from: f_number_unsigneds_resize(). + * Errors (with error bit) from: f_string_ranges_resize(). + * + * @see f_memory_array_resize() + * @see f_number_unsigneds_resize() + * @see f_string_ranges_resize() */ #ifndef _di_f_iki_datas_increase_ extern f_status_t f_iki_datas_increase(const f_number_unsigned_t step, f_iki_datas_t *datas); @@ -209,7 +245,13 @@ extern "C" { * F_array_too_large (with error bit) if the new array length is too large. * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_resize(). + * Errors (with error bit) from: f_number_unsigneds_resize(). + * Errors (with error bit) from: f_string_ranges_resize(). + * + * @see f_memory_array_resize() + * @see f_number_unsigneds_resize() + * @see f_string_ranges_resize() */ #ifndef _di_f_iki_datas_increase_by_ extern f_status_t f_iki_datas_increase_by(const f_number_unsigned_t amount, f_iki_datas_t *datas); @@ -228,7 +270,13 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_resize(). + * Errors (with error bit) from: f_number_unsigneds_resize(). + * Errors (with error bit) from: f_string_ranges_resize(). + * + * @see f_memory_array_resize() + * @see f_number_unsigneds_resize() + * @see f_string_ranges_resize() */ #ifndef _di_f_iki_datas_resize_ extern f_status_t f_iki_datas_resize(const f_number_unsigned_t length, f_iki_datas_t *datas); @@ -247,8 +295,13 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_adjust(). - * Errors (with error bit) from: f_memory_destroy(). + * Errors (with error bit) from: f_memory_array_adjust(). + * Errors (with error bit) from: f_number_unsigneds_adjust(). + * Errors (with error bit) from: f_string_ranges_adjust(). + * + * @see f_memory_array_adjust() + * @see f_number_unsigneds_adjust() + * @see f_string_ranges_adjust() */ #ifndef _di_f_iki_datass_adjust_ extern f_status_t f_iki_datass_adjust(const f_number_unsigned_t length, f_iki_datass_t *datass); @@ -268,7 +321,15 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_increase(). + * Errors (with error bit) from: f_memory_array_resize(). + * Errors (with error bit) from: f_number_unsigneds_resize(). + * Errors (with error bit) from: f_string_ranges_resize(). + * + * @see f_memory_array_increase() + * @see f_memory_array_resize() + * @see f_number_unsigneds_resize() + * @see f_string_ranges_resize() */ #ifndef _di_f_iki_datass_append_ extern f_status_t f_iki_datass_append(const f_iki_datas_t source, f_iki_datass_t *destination); @@ -288,7 +349,15 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_increase_by(). + * Errors (with error bit) from: f_memory_array_resize(). + * Errors (with error bit) from: f_number_unsigneds_resize(). + * Errors (with error bit) from: f_string_ranges_resize(). + * + * @see f_memory_array_increase_by() + * @see f_memory_array_resize() + * @see f_number_unsigneds_resize() + * @see f_string_ranges_resize() */ #ifndef _di_f_iki_datass_append_all_ extern f_status_t f_iki_datass_append_all(const f_iki_datass_t source, f_iki_datass_t *destination); @@ -312,8 +381,13 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_adjust(). - * Errors (with error bit) from: f_memory_destroy(). + * Errors (with error bit) from: f_memory_array_adjust(). + * Errors (with error bit) from: f_number_unsigneds_adjust(). + * Errors (with error bit) from: f_string_ranges_adjust(). + * + * @see f_memory_array_adjust() + * @see f_number_unsigneds_adjust() + * @see f_string_ranges_adjust() */ #ifndef _di_f_iki_datass_decimate_by_ extern f_status_t f_iki_datass_decimate_by(const f_number_unsigned_t amount, f_iki_datass_t *datass); @@ -337,8 +411,13 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_delete(). - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_resize(). + * Errors (with error bit) from: f_number_unsigneds_resize(). + * Errors (with error bit) from: f_string_ranges_resize(). + * + * @see f_memory_array_resize() + * @see f_number_unsigneds_resize() + * @see f_string_ranges_resize() */ #ifndef _di_f_iki_datass_decrease_by_ extern f_status_t f_iki_datass_decrease_by(const f_number_unsigned_t amount, f_iki_datass_t *datass); @@ -363,7 +442,13 @@ extern "C" { * F_array_too_large (with error bit) if the new array length is too large. * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_resize(). + * Errors (with error bit) from: f_number_unsigneds_resize(). + * Errors (with error bit) from: f_string_ranges_resize(). + * + * @see f_memory_array_resize() + * @see f_number_unsigneds_resize() + * @see f_string_ranges_resize() */ #ifndef _di_f_iki_datass_increase_ extern f_status_t f_iki_datass_increase(const f_number_unsigned_t step, f_iki_datass_t *datass); @@ -388,7 +473,13 @@ extern "C" { * F_array_too_large (with error bit) if the new array length is too large. * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_resize(). + * Errors (with error bit) from: f_number_unsigneds_resize(). + * Errors (with error bit) from: f_string_ranges_resize(). + * + * @see f_memory_array_resize() + * @see f_number_unsigneds_resize() + * @see f_string_ranges_resize() */ #ifndef _di_f_iki_datass_increase_by_ extern f_status_t f_iki_datass_increase_by(const f_number_unsigned_t amount, f_iki_datass_t *datass); @@ -407,8 +498,13 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_delete(). - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_resize(). + * Errors (with error bit) from: f_number_unsigneds_resize(). + * Errors (with error bit) from: f_string_ranges_resize(). + * + * @see f_memory_array_resize() + * @see f_number_unsigneds_resize() + * @see f_string_ranges_resize() */ #ifndef _di_f_iki_datass_resize_ extern f_status_t f_iki_datass_resize(const f_number_unsigned_t length, f_iki_datass_t *datass); diff --git a/level_0/f_iki/c/iki/private-data.c b/level_0/f_iki/c/iki/private-data.c index 5f9bf5a..daaea95 100644 --- a/level_0/f_iki/c/iki/private-data.c +++ b/level_0/f_iki/c/iki/private-data.c @@ -6,41 +6,34 @@ extern "C" { #endif #if !defined(_di_f_iki_datas_adjust_) || !defined(_di_f_iki_datas_decimate_by_) - f_status_t private_f_iki_datas_adjust(const f_number_unsigned_t length, f_iki_datas_t *datas) { - - if (datas->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large); - if (datas->used + length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large); + f_status_t private_f_iki_datas_adjust(const f_number_unsigned_t length, f_iki_datas_t *structure) { f_status_t status = F_none; - for (f_number_unsigned_t i = length; i < datas->size; ++i) { + for (f_number_unsigned_t i = length; i < structure->size; ++i) { - status = f_string_ranges_adjust(0, &datas->array[i].content); + status = f_string_ranges_adjust(0, &structure->array[i].content); if (F_status_is_error(status)) return status; - status = f_number_unsigneds_adjust(0, &datas->array[i].delimits); + status = f_number_unsigneds_adjust(0, &structure->array[i].delimits); if (F_status_is_error(status)) return status; - status = f_string_ranges_adjust(0, &datas->array[i].variable); + status = f_string_ranges_adjust(0, &structure->array[i].variable); if (F_status_is_error(status)) return status; - status = f_string_ranges_adjust(0, &datas->array[i].vocabulary); + status = f_string_ranges_adjust(0, &structure->array[i].vocabulary); if (F_status_is_error(status)) return status; } // for - return f_memory_array_adjust(length, sizeof(f_iki_data_t), (void **) &datas->array, &datas->used, &datas->size); + return f_memory_array_adjust(length, sizeof(f_iki_data_t), (void **) &structure->array, &structure->used, &structure->size); } #endif // !defined(_di_f_iki_datas_adjust_) || !defined(_di_f_iki_datas_decimate_by_) #if !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datass_append_) extern f_status_t private_f_iki_datas_append(const f_iki_data_t source, f_iki_datas_t *destination) { - f_status_t status = F_none; - - if (destination->used + 1 > destination->size) { - status = private_f_iki_datas_resize(destination->used + F_iki_default_allocation_small_d, destination); - if (F_status_is_error(status)) return status; - } + f_status_t status = f_memory_array_increase(F_iki_default_allocation_small_d, sizeof(f_iki_data_t), (void **) &destination->array, &destination->used, &destination->size); + if (F_status_is_error(status)) return status; destination->array[destination->used].content.used = 0; destination->array[destination->used].delimits.used = 0; @@ -76,12 +69,8 @@ extern "C" { #if !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datas_append_all_) || !defined(_di_f_iki_datass_append_all_) extern f_status_t private_f_iki_datas_append_all(const f_iki_datas_t source, f_iki_datas_t *destination) { - f_status_t status = F_none; - - if (destination->used + source.used > destination->size) { - status = private_f_iki_datas_resize(destination->used + source.used, destination); - if (F_status_is_error(status)) return status; - } + f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_iki_data_t), (void **) &destination->array, &destination->used, &destination->size); + if (F_status_is_error(status)) return status; for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) { @@ -116,80 +105,56 @@ extern "C" { #endif // !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datas_append_all_) || !defined(_di_f_iki_datass_append_all_) #if !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datas_decrease_by_) || !defined(_di_f_iki_datas_increase_) || !defined(_di_f_iki_datas_increase_by_) || !defined(_di_f_iki_datas_resize_) - f_status_t private_f_iki_datas_resize(const f_number_unsigned_t length, f_iki_datas_t *datas) { - - if (datas->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large); - if (datas->used + length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large); + f_status_t private_f_iki_datas_resize(const f_number_unsigned_t length, f_iki_datas_t *structure) { f_status_t status = F_none; - for (f_number_unsigned_t i = length; i < datas->size; ++i) { + for (f_number_unsigned_t i = length; i < structure->size; ++i) { - status = f_string_ranges_resize(0, &datas->array[i].content); + status = f_string_ranges_resize(0, &structure->array[i].content); if (F_status_is_error(status)) return status; - status = f_number_unsigneds_resize(0, &datas->array[i].delimits); + status = f_number_unsigneds_resize(0, &structure->array[i].delimits); if (F_status_is_error(status)) return status; - status = f_string_ranges_resize(0, &datas->array[i].variable); + status = f_string_ranges_resize(0, &structure->array[i].variable); if (F_status_is_error(status)) return status; - status = f_string_ranges_resize(0, &datas->array[i].vocabulary); + status = f_string_ranges_resize(0, &structure->array[i].vocabulary); if (F_status_is_error(status)) return status; } // for - return f_memory_array_resize(length, sizeof(f_iki_data_t), (void **) &datas->array, &datas->used, &datas->size); + return f_memory_array_resize(length, sizeof(f_iki_data_t), (void **) &structure->array, &structure->used, &structure->size); } #endif // !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datas_decrease_by_) || !defined(_di_f_iki_datas_increase_) || !defined(_di_f_iki_datas_increase_by_) || !defined(_di_f_iki_datas_resize_) #if !defined(_di_f_iki_datass_adjust_) || !defined(_di_f_iki_datass_decimate_by_) - f_status_t private_f_iki_datass_adjust(const f_number_unsigned_t length, f_iki_datass_t *datass) { + f_status_t private_f_iki_datass_adjust(const f_number_unsigned_t length, f_iki_datass_t *structure) { f_status_t status = F_none; - for (f_number_unsigned_t i = length; i < datass->size; ++i) { + for (f_number_unsigned_t i = length; i < structure->size; ++i) { - status = private_f_iki_datas_adjust(0, &datass->array[i]); + status = private_f_iki_datas_adjust(0, &structure->array[i]); if (F_status_is_error(status)) return status; } // for - status = f_memory_adjust(datass->size, length, sizeof(f_iki_datas_t), (void **) & datass->array); - if (F_status_is_error(status)) return status; - - datass->size = length; - - if (datass->used > datass->size) { - datass->used = length; - } - - return F_none; + return f_memory_array_adjust(length, sizeof(f_iki_datas_t), (void **) &structure->array, &structure->used, &structure->size); } #endif // !defined(_di_f_iki_datass_adjust_) || !defined(_di_f_iki_datass_decimate_by_) #if !defined(_di_f_iki_datass_decrease_by_) || !defined(_di_f_iki_datass_increase_) || !defined(_di_f_iki_datass_increase_by_) || !defined(_di_f_iki_datass_resize_) - f_status_t private_f_iki_datass_resize(const f_number_unsigned_t length, f_iki_datass_t *datass) { + f_status_t private_f_iki_datass_resize(const f_number_unsigned_t length, f_iki_datass_t *structure) { f_status_t status = F_none; - for (f_number_unsigned_t i = length; i < datass->size; ++i) { + for (f_number_unsigned_t i = length; i < structure->size; ++i) { - status = f_memory_delete(datass->array[i].size, sizeof(f_iki_datas_t), (void **) & datass->array[i].array); + status = private_f_iki_datas_resize(0, &structure->array[i]); if (F_status_is_error(status)) return status; - - datass->array[i].size = 0; - datass->array[i].used = 0; } // for - status = f_memory_resize(datass->size, length, sizeof(f_iki_datas_t), (void **) & datass->array); - if (F_status_is_error(status)) return status; - - datass->size = length; - - if (datass->used > datass->size) { - datass->used = length; - } - - return F_none; + return f_memory_array_resize(length, sizeof(f_iki_datas_t), (void **) &structure->array, &structure->used, &structure->size); } #endif // !defined(_di_f_iki_datass_decrease_by_) || !defined(_di_f_iki_datass_increase_) || !defined(_di_f_iki_datass_increase_by_) || !defined(_di_f_iki_datass_resize_) diff --git a/level_0/f_iki/c/iki/private-data.h b/level_0/f_iki/c/iki/private-data.h index 86783bb..2d04c64 100644 --- a/level_0/f_iki/c/iki/private-data.h +++ b/level_0/f_iki/c/iki/private-data.h @@ -22,20 +22,26 @@ extern "C" { * * @param length * The length to adjust to. - * @param iki_datas + * @param structure * The iki_datas array to adjust. * * @return * F_none on success. * F_data_not on success, but there is no reason to increase size (used + 1 <= size). * - * Errors (with error bit) from: f_memory_adjust(). + * Errors (with error bit) from: f_memory_array_adjust(). + * Errors (with error bit) from: f_number_unsigneds_adjust(). + * Errors (with error bit) from: f_string_ranges_adjust(). + * + * @see f_memory_array_adjust() + * @see f_number_unsigneds_adjust() + * @see f_string_ranges_adjust() * * @see f_iki_datas_adjust() * @see f_iki_datas_decimate_by() */ #if !defined(_di_f_iki_datas_adjust_) || !defined(_di_f_iki_datas_decimate_by_) - extern f_status_t private_f_iki_datas_adjust(const f_number_unsigned_t length, f_iki_datas_t *datas) F_attribute_visibility_internal_d; + extern f_status_t private_f_iki_datas_adjust(const f_number_unsigned_t length, f_iki_datas_t *structure) F_attribute_visibility_internal_d; #endif // !defined(_di_f_iki_datas_adjust_) || !defined(_di_f_iki_datas_decimate_by_) /** @@ -46,14 +52,19 @@ extern "C" { * @param source * The source iki_data to append. * @param destination - * The destination lengths the source is appended onto. + * The iki_datas array the source is appended onto. * * @return * F_none on success. * - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_increase(). + * Errors (with error bit) from: f_number_unsigneds_append_all(). + * Errors (with error bit) from: f_string_ranges_append_all(). + * + * @see f_memory_array_increase() + * @see f_number_unsigneds_append_all() + * @see f_string_ranges_append_all() * - * @see f_memory_resize() * @see f_iki_datas_append() * @see f_iki_datass_append() */ @@ -69,15 +80,19 @@ extern "C" { * @param source * The source iki_datas to append. * @param destination - * The destination lengths the source is appended onto. + * The iki_datas array the source is appended onto. * * @return * F_none on success. * - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_increase_by(). + * Errors (with error bit) from: f_number_unsigneds_append_all(). + * Errors (with error bit) from: f_string_ranges_append_all(). + * + * @see f_memory_array_increase_by() + * @see f_number_unsigneds_append_all() + * @see f_string_ranges_append_all() * - * @see f_memory_resize() - * @see f_iki_datas_append_all() * @see f_iki_datass_append() * @see f_iki_datass_append_all() */ @@ -92,14 +107,20 @@ extern "C" { * * @param length * The length to adjust to. - * @param iki_datas + * @param structure * The iki_datas array to adjust. * * @return * F_none on success. * F_data_not on success, but there is no reason to increase size (used + 1 <= size). * - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_resize(). + * Errors (with error bit) from: f_number_unsigneds_resize(). + * Errors (with error bit) from: f_string_ranges_resize(). + * + * @see f_memory_array_resize() + * @see f_number_unsigneds_resize() + * @see f_string_ranges_resize() * * @see f_iki_datas_resize() * @see f_iki_datas_append() @@ -107,7 +128,7 @@ extern "C" { * @see f_iki_datass_append() */ #if !defined(_di_f_iki_datas_resize_) || !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datas_decimate_by_) || !defined(_di_f_iki_datass_append_) - extern f_status_t private_f_iki_datas_resize(const f_number_unsigned_t length, f_iki_datas_t *datas) F_attribute_visibility_internal_d; + extern f_status_t private_f_iki_datas_resize(const f_number_unsigned_t length, f_iki_datas_t *structure) F_attribute_visibility_internal_d; #endif // !defined(_di_f_iki_datas_resize_) || !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datas_decimate_by_) || !defined(_di_f_iki_datass_append_) /** @@ -128,8 +149,13 @@ extern "C" { * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_adjust(). - * Errors (with error bit) from: f_memory_destroy(). + * Errors (with error bit) from: f_memory_array_adjust(). + * Errors (with error bit) from: f_number_unsigneds_adjust(). + * Errors (with error bit) from: f_string_ranges_adjust(). + * + * @see f_memory_array_adjust() + * @see f_number_unsigneds_adjust() + * @see f_string_ranges_adjust() * * @see f_iki_datass_adjust() * @see f_iki_datass_decimate_by() @@ -156,8 +182,13 @@ extern "C" { * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_delete(). - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_resize(). + * Errors (with error bit) from: f_number_unsigneds_resize(). + * Errors (with error bit) from: f_string_ranges_resize(). + * + * @see f_memory_array_resize() + * @see f_number_unsigneds_resize() + * @see f_string_ranges_resize() * * @see f_iki_datass_decrease_by() * @see f_iki_datass_increase() diff --git a/level_0/f_limit/c/limit/private-set.h b/level_0/f_limit/c/limit/private-set.h index 66ddb25..f587d01 100644 --- a/level_0/f_limit/c/limit/private-set.h +++ b/level_0/f_limit/c/limit/private-set.h @@ -28,9 +28,10 @@ extern "C" { * @return * F_none on success. * - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_increase(). + * + * @see f_memory_array_increase() * - * @see f_memory_resize() * @see f_limit_sets_append() * @see f_limit_setss_append() */ @@ -51,9 +52,10 @@ extern "C" { * @return * F_none on success. * - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_increase_by(). + * + * @see f_memory_array_increase_by() * - * @see f_memory_resize() * @see f_limit_sets_append_all() * @see f_limit_setss_append() * @see f_limit_setss_append_all() @@ -80,8 +82,9 @@ extern "C" { * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_adjust(). - * Errors (with error bit) from: f_memory_destroy(). + * Errors (with error bit) from: f_memory_array_adjust(). + * + * @see f_memory_array_adjust() * * @see f_limit_setss_adjust() * @see f_limit_setss_decimate_by() @@ -108,8 +111,9 @@ extern "C" { * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_delete(). - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_resize(). + * + * @see f_memory_array_resize() * * @see f_limit_setss_decrease_by() * @see f_limit_setss_increase() diff --git a/level_0/f_limit/c/limit/private-value.h b/level_0/f_limit/c/limit/private-value.h index c905bce..4547886 100644 --- a/level_0/f_limit/c/limit/private-value.h +++ b/level_0/f_limit/c/limit/private-value.h @@ -28,9 +28,10 @@ extern "C" { * @return * F_none on success. * - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_increase(). + * + * @see f_memory_array_increase() * - * @see f_memory_resize() * @see f_limit_values_append() * @see f_limit_valuess_append() */ @@ -51,9 +52,10 @@ extern "C" { * @return * F_none on success. * - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_increase_by(). + * + * @see f_memory_array_increase_by() * - * @see f_memory_resize() * @see f_limit_values_append_all() * @see f_limit_valuess_append() * @see f_limit_valuess_append_all() @@ -80,8 +82,9 @@ extern "C" { * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_adjust(). - * Errors (with error bit) from: f_memory_destroy(). + * Errors (with error bit) from: f_memory_array_adjust(). + * + * @see f_memory_array_adjust() * * @see f_limit_valuess_adjust() * @see f_limit_valuess_decimate_by() @@ -108,8 +111,9 @@ extern "C" { * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_delete(). - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_resize(). + * + * @see f_memory_array_resize() * * @see f_limit_valuess_decrease_by() * @see f_limit_valuess_increase() diff --git a/level_0/f_limit/c/limit/set.h b/level_0/f_limit/c/limit/set.h index d96d757..d006e0a 100644 --- a/level_0/f_limit/c/limit/set.h +++ b/level_0/f_limit/c/limit/set.h @@ -117,9 +117,9 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_array_resize(). + * Errors (with error bit) from: f_memory_array_adjust(). * - * @see f_memory_array_resize() + * @see f_memory_array_adjust() */ #ifndef _di_f_limit_sets_adjust_ extern f_status_t f_limit_sets_adjust(const f_number_unsigned_t length, f_limit_sets_t *sets); @@ -141,11 +141,9 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_array_increase_by(). - * Errors (with error bit) from: f_memory_array_resize(). + * Errors (with error bit) from: f_memory_array_increase(). * - * @see f_memory_array_increase_by() - * @see f_memory_array_resize() + * @see f_memory_array_increase() */ #ifndef _di_f_limit_sets_append_ extern f_status_t f_limit_sets_append(const f_limit_set_t source, f_limit_sets_t *destination); @@ -168,10 +166,8 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_memory_array_increase_by(). - * Errors (with error bit) from: f_memory_array_resize(). * * @see f_memory_array_increase_by() - * @see f_memory_array_resize() */ #ifndef _di_f_limit_sets_append_all_ extern f_status_t f_limit_sets_append_all(const f_limit_sets_t source, f_limit_sets_t *destination); diff --git a/level_0/f_limit/c/limit/value.h b/level_0/f_limit/c/limit/value.h index c0ad9b7..f3067ae 100644 --- a/level_0/f_limit/c/limit/value.h +++ b/level_0/f_limit/c/limit/value.h @@ -137,11 +137,9 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_array_increase_by(). - * Errors (with error bit) from: f_memory_array_resize(). + * Errors (with error bit) from: f_memory_array_increase(). * - * @see f_memory_array_increase_by() - * @see f_memory_array_resize() + * @see f_memory_array_increase() */ #ifndef _di_f_limit_values_append_ extern f_status_t f_limit_values_append(const f_limit_value_t source, f_limit_values_t *destination); @@ -164,10 +162,8 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_memory_array_increase_by(). - * Errors (with error bit) from: f_memory_array_resize(). * * @see f_memory_array_increase_by() - * @see f_memory_array_resize() */ #ifndef _di_f_limit_values_append_all_ extern f_status_t f_limit_values_append_all(const f_limit_values_t source, f_limit_values_t *destination); diff --git a/level_0/f_socket/c/socket/private-socket.h b/level_0/f_socket/c/socket/private-socket.h index 5aa0391..9fd002a 100644 --- a/level_0/f_socket/c/socket/private-socket.h +++ b/level_0/f_socket/c/socket/private-socket.h @@ -28,9 +28,9 @@ extern "C" { * @return * F_none on success. * - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_increase_by(). * - * @see f_memory_resize() + * @see f_memory_array_increase_by() * * @see f_sockets_append_all() * @see f_socketss_append() @@ -58,8 +58,9 @@ extern "C" { * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_adjust(). - * Errors (with error bit) from: f_memory_destroy(). + * Errors (with error bit) from: f_memory_array_adjust(). + * + * @see f_memory_array_adjust() * * @see f_socketss_adjust() * @see f_socketss_decimate_by() @@ -86,8 +87,9 @@ extern "C" { * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_delete(). - * Errors (with error bit) from: f_memory_resize(). + * Errors (with error bit) from: f_memory_array_resize(). + * + * @see f_memory_array_resize() * * @see f_socketss_decrease_by() * @see f_socketss_increase() diff --git a/level_0/f_socket/c/socket/socket.h b/level_0/f_socket/c/socket/socket.h index a110148..c0392ac 100644 --- a/level_0/f_socket/c/socket/socket.h +++ b/level_0/f_socket/c/socket/socket.h @@ -53,11 +53,9 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_array_increase_by(). - * Errors (with error bit) from: f_memory_array_resize(). + * Errors (with error bit) from: f_memory_array_increase(). * - * @see f_memory_array_increase_by() - * @see f_memory_array_resize() + * @see f_memory_array_increase() */ #ifndef _di_f_sockets_append_ extern f_status_t f_sockets_append(const f_socket_t source, f_sockets_t * const destination); @@ -80,10 +78,8 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_memory_array_increase_by(). - * Errors (with error bit) from: f_memory_array_resize(). * * @see f_memory_array_increase_by() - * @see f_memory_array_resize() */ #ifndef _di_f_sockets_append_all_ extern f_status_t f_sockets_append_all(const f_sockets_t source, f_sockets_t * const destination); @@ -223,8 +219,9 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_memory_adjust(). - * Errors (with error bit) from: f_memory_destroy(). + * Errors (with error bit) from: f_memory_array_adjust(). + * + * @see f_memory_array_adjust() */ #ifndef _di_f_socketss_adjust_ extern f_status_t f_socketss_adjust(const f_number_unsigned_t length, f_socketss_t * const socketss); @@ -246,11 +243,11 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * + * Errors (with error bit) from: f_memory_array_increase(). * Errors (with error bit) from: f_memory_array_increase_by(). - * Errors (with error bit) from: f_memory_array_resize(). * + * @see f_memory_array_increase() * @see f_memory_array_increase_by() - * @see f_memory_array_resize() */ #ifndef _di_f_socketss_append_ extern f_status_t f_socketss_append(const f_sockets_t source, f_socketss_t * const destination); @@ -273,10 +270,8 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_memory_array_increase_by(). - * Errors (with error bit) from: f_memory_array_resize(). * * @see f_memory_array_increase_by() - * @see f_memory_array_resize() */ #ifndef _di_f_socketss_append_all_ extern f_status_t f_socketss_append_all(const f_socketss_t source, f_socketss_t * const destination);