From: Kevin Day Date: Fri, 16 Oct 2020 01:58:13 +0000 (-0500) Subject: Update: provide f_string_lengthss_t and f_string_quantityss_t. X-Git-Tag: 0.5.1~25 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=9ec6917bf687f78f528c4e29c411a371134efa1f;p=fll Update: provide f_string_lengthss_t and f_string_quantityss_t. Ensure that array of an array typedefs exist for: - f_string_length_t - f_string_quantity_t The following already exist: - f_string_range_t There are some additional structures that this should also have an array of an array for: - f_string_static_t - f_string_dynamic_t - f_string_map_t - f_string_map_multi_t But they are more complicated so I will get to them later. --- diff --git a/level_0/f_memory/c/memory_structure.h b/level_0/f_memory/c/memory_structure.h index 1f96b2a..6df81cf 100644 --- a/level_0/f_memory/c/memory_structure.h +++ b/level_0/f_memory/c/memory_structure.h @@ -165,7 +165,7 @@ extern "C" { * * status: the status to return. * structures: the structures to operate on. - * type_stuctures: the structure type. + * type_stuctures: the structures type. * new_length: the new size of the array. */ #ifndef _di_f_macro_memory_structures_new_ @@ -184,7 +184,7 @@ extern "C" { * status: the status to return. * structures: the structures to operate on. * type_stucture: the structure type. - * type_stuctures: the structure type. + * type_stuctures: the structures type. */ #ifndef _di_f_macro_memory_structures_delete_ #define f_macro_memory_structures_t_delete(status, structures, type_structure, type_structures) \ @@ -205,7 +205,7 @@ extern "C" { * status: the status to return. * structures: the structures to operate on. * type_stucture: the structure type. - * type_stuctures: the structure type. + * type_stuctures: the structures type. */ #ifndef _di_f_macro_memory_structures_destroy_ #define f_macro_memory_structures_t_destroy(status, structures, type_structure, type_structures) \ @@ -225,7 +225,7 @@ extern "C" { * * structures: the structures to operate on. * type_stucture: the structure type. - * type_stuctures: the structure type. + * type_stuctures: the structures type. */ #ifndef _di_f_macro_memory_structures_delete_simple_ #define f_macro_memory_structures_t_delete_simple(structures, type_structure, type_structures) \ @@ -246,7 +246,7 @@ extern "C" { * * structures: the structures to operate on. * type_stucture: the structure type. - * type_stuctures: the structure type. + * type_stuctures: the structures type. */ #ifndef _di_f_macro_memory_structures_destroy_simple_ #define f_macro_memory_structures_t_destroy_simple(structures, type_structure, type_structures) \ @@ -268,7 +268,7 @@ extern "C" { * status: the status to return. * structures: the structures to operate on. * type_stucture: the structure type. - * type_stuctures: the structure type. + * type_stuctures: the structures type. * new_length: the new size of the array. * length_variable: the data type of the length variable. */ @@ -299,7 +299,7 @@ extern "C" { * status: the status to return. * structures: the structures to operate on. * type_stucture: the structure type. - * type_stuctures: the structure type. + * type_stuctures: the structures type. * new_length: the new size of the array. * length_variable: the data type of the length variable. */ diff --git a/level_0/f_string/c/string-common.h b/level_0/f_string/c/string-common.h index 0c5188d..4c6c9aa 100644 --- a/level_0/f_string/c/string-common.h +++ b/level_0/f_string/c/string-common.h @@ -125,6 +125,37 @@ extern "C" { #define f_macro_string_lengths_t_adjust(status, lengths, new_length) f_macro_memory_structure_t_adjust(status, lengths, f_string_length_t, new_length) #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_t_clear(lengthss) + + #define f_macro_string_lengthss_t_new(status, lengthss, length) f_macro_memory_structures_t_new(status, lengthss, f_string_length_t, length) + + #define f_macro_string_lengthss_t_delete(status, lengthss) f_macro_memory_structures_t_delete(status, lengthss, f_string_length_t, f_string_lengths_t) + #define f_macro_string_lengthss_t_destroy(status, lengthss) f_macro_memory_structures_t_destroy(status, lengthss, f_string_length_t, f_string_lengths_t) + + #define f_macro_string_lengthss_t_delete_simple(lengthss) f_macro_memory_structures_t_delete_simple(lengthss, f_string_length_t, f_string_lengths_t) + #define f_macro_string_lengthss_t_destroy_simple(lengthss) f_macro_memory_structures_t_destroy_simple(lengthss, f_string_length_t, f_string_lengths_t) + + #define f_macro_string_lengthss_t_resize(status, lengthss, new_length) f_macro_memory_structures_t_resize(status, lengthss, f_string_length_t, f_string_lengths_t, new_length, f_array_length_t) + #define f_macro_string_lengthss_t_adjust(status, lengthss, new_length) f_macro_memory_structures_t_adjust(status, lengthss, f_string_length_t, f_string_lengths_t, new_length, f_array_length_t) +#endif // _di_f_string_lengthss_t_ + #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/c/string_quantity.h b/level_0/f_string/c/string_quantity.h index 789555b..cf7d2c2 100644 --- a/level_0/f_string/c/string_quantity.h +++ b/level_0/f_string/c/string_quantity.h @@ -68,6 +68,37 @@ extern "C" { #define f_macro_string_quantitys_t_adjust(status, quantitys, new_length) f_macro_memory_structure_t_adjust(status, quantitys, f_string_quantity_t, new_length) #endif // _di_f_string_quantitys_t_ +/** + * This holds an array of f_string_quantity_t. + * + * array: the array of quantitys arrays. + * size: total amount of allocated space. + * used: total number of allocated spaces used. + */ +#ifndef _di_f_string_quantityss_t_ + typedef struct { + f_string_quantity_t *array; + + f_array_length_t size; + f_array_length_t used; + } f_string_quantityss_t; + + #define f_string_quantityss_t_initialize {0, 0, 0} + + #define f_macro_string_quantityss_t_clear(quantityss) f_macro_memory_structures_t_clear(quantityss) + + #define f_macro_string_quantityss_t_new(status, quantityss, length) f_macro_memory_structures_t_new(status, quantityss, f_string_quantity_t, length) + + #define f_macro_string_quantityss_t_delete(status, quantityss) f_macro_memory_structures_t_delete(status, quantityss, f_string_quantity_t, f_string_quantitys_t) + #define f_macro_string_quantityss_t_destroy(status, quantityss) f_macro_memory_structures_t_destroy(status, quantityss, f_string_quantity_t, f_string_quantitys_t) + + #define f_macro_string_quantityss_t_delete_simple(quantityss) f_macro_memory_structures_t_delete_simple(quantityss, f_string_quantity_t, f_string_quantitys_t) + #define f_macro_string_quantityss_t_destroy_simple(quantityss) f_macro_memory_structures_t_destroy_simple(quantityss, f_string_quantity_t, f_string_quantitys_t) + + #define f_macro_string_quantityss_t_resize(status, quantityss, new_length) f_macro_memory_structures_t_resize(status, quantityss, f_string_quantity_t, f_string_quantitys_t, new_length, f_array_length_t) + #define f_macro_string_quantityss_t_adjust(status, quantityss, new_length) f_macro_memory_structures_t_adjust(status, quantityss, f_string_quantity_t, f_string_quantitys_t, new_length, f_array_length_t) +#endif // _di_f_string_quantityss_t_ + #ifdef __cplusplus } // extern "C" #endif