]> Kevux Git Server - controller/commitdiff
Update: To FLL structure changes.
authorKevin Day <Kevin@kevux.org>
Mon, 1 Dec 2025 00:23:49 +0000 (18:23 -0600)
committerKevin Day <Kevin@kevux.org>
Mon, 1 Dec 2025 00:23:49 +0000 (18:23 -0600)
Apply similar practices to the structures.

sources/c/program/controller/main/common/type.h
sources/c/program/controller/main/common/type/entry.h
sources/c/program/controller/main/common/type/instance.h
sources/c/program/controller/main/common/type/rule.h

index 04f58d2c4f6cf00a9bfc6dfbafc0e6d0e66fa368..db71d234faf8f32d4cabac742283e562fb361c2c 100644 (file)
@@ -80,12 +80,7 @@ extern "C" {
     void (*process_thread_signal)(controller_t * const main, const uint8_t is_normal, f_thread_attribute_t * const attribute);
   } controller_callback_t;
 
-  #define controller_callback_t_initialize \
-    { \
-      0, \
-      0, \
-      0, \
-    }
+  #define controller_callback_t_initialize { 0, 0, 0 }
 #endif // _di_controller_t_
 
 /**
index 53b7db848f309e73140e94863e1906327fc2fdf9..dd7255aab1becc330abcb1131f01d358d83e5501 100644 (file)
@@ -58,22 +58,18 @@ extern "C" {
  *
  * Properties:
  *   - array: An array of Entry Item Actions.
- *   - size:  Total amount of allocated space.
  *   - used:  Total number of allocated spaces used.
+ *   - size:  Total amount of allocated space.
  */
 #ifndef _di_controller_entry_actions_t_
   typedef struct {
     controller_entry_action_t *array;
 
-    f_number_unsigned_t size;
     f_number_unsigned_t used;
+    f_number_unsigned_t size;
   } controller_entry_actions_t;
 
-  #define controller_entry_actions_t_initialize { \
-    0, \
-    0, \
-    0, \
-  }
+  #define controller_entry_actions_t_initialize { 0, 0, 0 }
 #endif // _di_controller_entry_actions_t_
 
 /**
@@ -105,27 +101,24 @@ extern "C" {
  *
  * Properties:
  *   - array: An array of Entry Items.
- *   - size:  Total amount of allocated space.
  *   - used:  Total number of allocated spaces used.
+ *   - size:  Total amount of allocated space.
  */
 #ifndef _di_controller_entry_items_t_
   typedef struct {
     controller_entry_item_t *array;
 
-    f_number_unsigned_t size;
     f_number_unsigned_t used;
+    f_number_unsigned_t size;
   } controller_entry_items_t;
 
-  #define controller_entry_items_t_initialize { \
-    0, \
-    0, \
-    0, \
-  }
+  #define controller_entry_items_t_initialize { 0, 0, 0 }
 
-  #define macro_controller_entry_items_t_clear(items) \
+  #define macro_controller_entry_items_t_clear(items) \
     items.array = 0; \
+    items.used = 0; \
     items.size = 0; \
-    items.used = 0;
+  }
 #endif // _di_controller_entry_items_t_
 
 /**
index 762aba6b7684c836c16f40cfc37729ca77f14872..e61a27dd30ad09fa3093aef9b92e7fcf814de915 100644 (file)
@@ -111,22 +111,18 @@ extern "C" {
  *
  * Properties:
  *   - array: An array of Instances pointers (note the double-pointer).
- *   - size:  Total amount of allocated space.
  *   - used:  Total number of allocated spaces used.
+ *   - size:  Total amount of allocated space.
  */
 #ifndef _di_controller_instances_t_
   struct controller_instances_t_ {
     controller_instance_t **array;
 
-    f_number_unsigned_t size;
     f_number_unsigned_t used;
+    f_number_unsigned_t size;
   };
 
-  #define controller_instances_t_initialize { \
-    0, \
-    0, \
-    0, \
-  }
+  #define controller_instances_t_initialize { 0, 0, 0 }
 #endif // _di_controller_instances_t_
 
 /**
index 42041527180d669936bf75a110ef9d5b3371c342..358d25d8582baeb447730a3c9cc1ee41f86e4767 100644 (file)
@@ -107,22 +107,18 @@ extern "C" {
  *
  * Properties:
  *   - array: An array of Rule Actions.
- *   - size:  Total amount of allocated space.
  *   - used:  Total number of allocated spaces used.
+ *   - size:  Total amount of allocated space.
  */
 #ifndef _di_controller_rule_actions_t_
   typedef struct {
     controller_rule_action_t *array;
 
-    f_number_unsigned_t size;
     f_number_unsigned_t used;
+    f_number_unsigned_t size;
   } controller_rule_actions_t;
 
-  #define controller_rule_actions_t_initialize { \
-    0, \
-    0, \
-    0, \
-  }
+  #define controller_rule_actions_t_initialize { 0, 0, 0 }
 #endif // _di_controller_rule_actions_t_
 
 /**
@@ -172,22 +168,18 @@ extern "C" {
  *
  * Properties:
  *   - array: An array of Rule Items.
- *   - size:  Total amount of allocated space.
  *   - used:  Total number of allocated spaces used.
+ *   - size:  Total amount of allocated space.
  */
 #ifndef _di_controller_rule_items_t_
   typedef struct {
     controller_rule_item_t *array;
 
-    f_number_unsigned_t size;
     f_number_unsigned_t used;
+    f_number_unsigned_t size;
   } controller_rule_items_t;
 
-  #define controller_rule_items_initialize { \
-    0, \
-    0, \
-    0, \
-  }
+  #define controller_rule_items_initialize { 0, 0, 0 }
 #endif // _di_controller_rule_items_t_
 
 /**
@@ -221,22 +213,18 @@ extern "C" {
  *
  * Properties:
  *   - array: An array of Rule "on" values.
- *   - size:  Total amount of allocated space.
  *   - used:  Total number of allocated spaces used.
+ *   - size:  Total amount of allocated space.
  */
 #ifndef _di_controller_rule_ons_t_
   typedef struct {
     controller_rule_on_t *array;
 
-    f_number_unsigned_t size;
     f_number_unsigned_t used;
+    f_number_unsigned_t size;
   } controller_rule_ons_t;
 
-  #define controller_rule_ons_t_initialize { \
-    0, \
-    0, \
-    0, \
-  }
+  #define controller_rule_ons_t_initialize { 0, 0, 0 }
 #endif // _di_controller_rule_ons_t_
 
 /**
@@ -359,22 +347,18 @@ extern "C" {
  *
  * Properties:
  *   - array: An array of Rules pointers (note the double-pointer).
- *   - size:  Total amount of allocated space.
  *   - used:  Total number of allocated spaces used.
+ *   - size:  Total amount of allocated space.
  */
 #ifndef _di_controller_rules_t_
   struct controller_rules_t_ {
     controller_rule_t **array;
 
-    f_number_unsigned_t size;
     f_number_unsigned_t used;
+    f_number_unsigned_t size;
   };
 
-  #define controller_rules_t_initialize { \
-    0, \
-    0, \
-    0, \
-  }
+  #define controller_rules_t_initialize { 0, 0, 0 }
 #endif // _di_controller_rules_t_
 
 /**