]> Kevux Git Server - fll/commitdiff
Update: provide f_string_lengthss_t and f_string_quantityss_t.
authorKevin Day <thekevinday@gmail.com>
Fri, 16 Oct 2020 01:58:13 +0000 (20:58 -0500)
committerKevin Day <thekevinday@gmail.com>
Fri, 16 Oct 2020 01:58:13 +0000 (20:58 -0500)
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.

level_0/f_memory/c/memory_structure.h
level_0/f_string/c/string-common.h
level_0/f_string/c/string_quantity.h

index 1f96b2af22c82a3652bf2cf975ab84afb908b387..6df81cf4cdf1794184e8c0e546ef767a49a9d422 100644 (file)
@@ -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.
  */
index 0c5188d36f820626f45d9c7848f1e023f2829817..4c6c9aa699e1b2f4d8637f6e5788c41489e4b332 100644 (file)
@@ -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
index 789555b24f1515142510400525891c4c293965b5..cf7d2c2236906e74b3bae4e389246391b3bf6498 100644 (file)
@@ -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