From 5f7e236f2e9daa4c857f71d3f33fd22fcecf0ece Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 30 Nov 2025 18:23:49 -0600 Subject: [PATCH] Update: To FLL structure changes. Apply similar practices to the structures. --- sources/c/program/controller/main/common/type.h | 7 +--- .../c/program/controller/main/common/type/entry.h | 25 +++++--------- .../program/controller/main/common/type/instance.h | 10 ++---- .../c/program/controller/main/common/type/rule.h | 40 +++++++--------------- 4 files changed, 25 insertions(+), 57 deletions(-) diff --git a/sources/c/program/controller/main/common/type.h b/sources/c/program/controller/main/common/type.h index 04f58d2..db71d23 100644 --- a/sources/c/program/controller/main/common/type.h +++ b/sources/c/program/controller/main/common/type.h @@ -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_ /** diff --git a/sources/c/program/controller/main/common/type/entry.h b/sources/c/program/controller/main/common/type/entry.h index 53b7db8..dd7255a 100644 --- a/sources/c/program/controller/main/common/type/entry.h +++ b/sources/c/program/controller/main/common/type/entry.h @@ -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_ /** diff --git a/sources/c/program/controller/main/common/type/instance.h b/sources/c/program/controller/main/common/type/instance.h index 762aba6..e61a27d 100644 --- a/sources/c/program/controller/main/common/type/instance.h +++ b/sources/c/program/controller/main/common/type/instance.h @@ -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_ /** diff --git a/sources/c/program/controller/main/common/type/rule.h b/sources/c/program/controller/main/common/type/rule.h index 4204152..358d25d 100644 --- a/sources/c/program/controller/main/common/type/rule.h +++ b/sources/c/program/controller/main/common/type/rule.h @@ -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_ /** -- 1.8.3.1