From 5594e1af3270c7dec5811c393d0d4f0f8b50e5ba Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 30 Nov 2025 15:56:48 -0600 Subject: [PATCH] Update: Make *_t_clear() functionality consistent and fix existing problems. These were being removed at one point in time, resulting in an inconsistent declaration of these macros. The memory clear macros were also removed, but some of the uses still (incorrectly) remained. Ensure that these `*_t_clear()` macros are encased in a brace defined block. Do not use semi-colons at the end of the `*_t_clear()` uses. Do use semi-colons at the end of `*_t_clear()` direct property assignments. --- level_0/f_abstruse/c/abstruse/abstruse.h | 17 ++- level_0/f_abstruse/c/abstruse/map.h | 19 ++- level_0/f_account/c/account/common.h | 29 ++-- level_0/f_color/c/color/common.h | 16 ++- level_0/f_console/c/console/common.h | 22 +++ level_0/f_control_group/c/control_group/common.h | 7 +- level_0/f_conversion/c/conversion/common.h | 5 +- level_0/f_directory/c/directory/listing.h | 23 ++- level_0/f_directory/c/directory/recurse_do.h | 12 +- level_0/f_directory/c/directory/status.h | 17 ++- level_0/f_execute/c/execute/common.h | 5 +- level_0/f_fss/c/fss/item.h | 23 ++- level_0/f_fss/c/fss/named.h | 17 ++- level_0/f_fss/c/fss/nest.h | 18 ++- level_0/f_fss/c/fss/set.h | 17 ++- level_0/f_fss/c/fss/set_quote.h | 17 ++- level_0/f_fss/c/fss/simple_packet.h | 66 ++++----- level_0/f_iki/c/iki/common.h | 46 ++++-- level_0/f_limit/c/limit/set.h | 17 ++- level_0/f_limit/c/limit/value.h | 12 ++ level_0/f_network/c/network/common.h | 5 +- level_0/f_schedule/c/schedule/common.h | 6 + level_0/f_signal/c/signal/common.h | 10 +- level_0/f_socket/c/socket/address.h | 12 ++ level_0/f_socket/c/socket/socket.h | 40 +++++- level_0/f_string/c/string/map.h | 5 +- level_0/f_string/c/string/map_multi.h | 5 +- level_0/f_string/c/string/map_multis.h | 5 +- level_0/f_string/c/string/map_multiss.h | 5 +- level_0/f_string/c/string/maps.h | 5 +- level_0/f_string/c/string/mapss.h | 5 +- level_0/f_string/c/string/statics.h | 5 +- level_0/f_string/c/string/staticss.h | 5 +- level_0/f_string/c/string/triple.h | 15 +- level_0/f_string/c/string/triples.h | 5 +- level_0/f_string/c/string/tripless.h | 5 +- level_0/f_thread/c/thread/attributes.h | 6 + level_0/f_thread/c/thread/attributess.h | 8 +- level_0/f_thread/c/thread/barrier_attribute.h | 2 + level_0/f_thread/c/thread/barrier_attributes.h | 6 + level_0/f_thread/c/thread/barrier_attributess.h | 6 + level_0/f_thread/c/thread/barrier_full.h | 6 +- level_0/f_thread/c/thread/barrier_fulls.h | 6 + level_0/f_thread/c/thread/barrier_fullss.h | 6 + level_0/f_thread/c/thread/barriers.h | 6 + level_0/f_thread/c/thread/condition.h | 2 + level_0/f_thread/c/thread/condition_attributes.h | 6 + level_0/f_thread/c/thread/condition_attributess.h | 6 + level_0/f_thread/c/thread/condition_full.h | 6 +- level_0/f_thread/c/thread/condition_fulls.h | 6 + level_0/f_thread/c/thread/condition_fullss.h | 6 + level_0/f_thread/c/thread/conditions.h | 6 + level_0/f_thread/c/thread/conditionss.h | 6 + level_0/f_thread/c/thread/ids.h | 6 + level_0/f_thread/c/thread/idss.h | 6 + level_0/f_thread/c/thread/keys.h | 6 + level_0/f_thread/c/thread/keyss.h | 6 + level_0/f_thread/c/thread/lock.h | 2 + level_0/f_thread/c/thread/lock_attributes.h | 6 + level_0/f_thread/c/thread/lock_attributess.h | 6 + level_0/f_thread/c/thread/lock_full.h | 6 +- level_0/f_thread/c/thread/lock_fulls.h | 6 + level_0/f_thread/c/thread/lock_fullss.h | 6 + level_0/f_thread/c/thread/locks.h | 6 + level_0/f_thread/c/thread/lockss.h | 6 + level_0/f_thread/c/thread/mutex.h | 2 + level_0/f_thread/c/thread/mutex_attributes.h | 6 + level_0/f_thread/c/thread/mutex_attributess.h | 6 + level_0/f_thread/c/thread/mutex_full.h | 6 +- level_0/f_thread/c/thread/mutex_fulls.h | 6 + level_0/f_thread/c/thread/mutex_fullss.h | 6 + level_0/f_thread/c/thread/mutexs.h | 6 + level_0/f_thread/c/thread/mutexss.h | 6 + level_0/f_thread/c/thread/onces.h | 6 + level_0/f_thread/c/thread/oncess.h | 6 + level_0/f_thread/c/thread/semaphores.h | 6 + level_0/f_thread/c/thread/semaphoress.h | 6 + level_0/f_thread/c/thread/spins.h | 6 + level_0/f_thread/c/thread/spinss.h | 6 + level_0/f_type/c/type/cell.h | 17 +++ level_0/f_type/c/type/file.h | 42 +++++- level_0/f_type/c/type/fll.h | 81 +++++++++++ level_0/f_type/c/type/mode.h | 11 ++ level_0/f_type/c/type/number.h | 162 +++++++++++++++++++++- level_0/f_type/c/type/pid.h | 12 ++ level_0/f_type/c/type/quantity.h | 17 +++ level_0/f_type/c/type/range.h | 17 +++ level_0/f_type/c/type/range_double.h | 20 +++ level_0/f_type/c/type/state.h | 12 ++ level_0/f_type/c/type/status.h | 12 ++ level_0/f_type/c/type/time.h | 15 ++ level_0/f_utf/c/utf/dynamic.h | 2 +- level_0/f_utf/c/utf/dynamics.h | 2 +- level_0/f_utf/c/utf/dynamicss.h | 2 +- level_0/f_utf/c/utf/map.h | 7 +- level_0/f_utf/c/utf/map_multi.h | 5 +- level_0/f_utf/c/utf/map_multis.h | 6 + level_0/f_utf/c/utf/map_multiss.h | 6 + level_0/f_utf/c/utf/maps.h | 6 + level_0/f_utf/c/utf/mapss.h | 6 + level_0/f_utf/c/utf/static.h | 9 +- level_0/f_utf/c/utf/statics.h | 5 +- level_0/f_utf/c/utf/staticss.h | 5 +- level_0/f_utf/c/utf/triple.h | 17 +-- level_0/f_utf/c/utf/triples.h | 6 + level_0/f_utf/c/utf/tripless.h | 6 + level_1/fl_conversion/c/conversion/common.h | 7 +- level_1/fl_execute/c/execute/common.h | 18 +-- level_1/fl_fss/c/fss/embedded_list.h | 5 +- level_1/fl_fss/c/fss/payload/type.h | 24 +++- level_1/fl_print/c/print/common.h | 12 ++ level_2/fll_program/c/program/common.h | 20 +++ 112 files changed, 1184 insertions(+), 197 deletions(-) diff --git a/level_0/f_abstruse/c/abstruse/abstruse.h b/level_0/f_abstruse/c/abstruse/abstruse.h index 1c04c83..a97b797 100644 --- a/level_0/f_abstruse/c/abstruse/abstruse.h +++ b/level_0/f_abstruse/c/abstruse/abstruse.h @@ -41,9 +41,10 @@ extern "C" { #define macro_f_abstruse_t_initialize_1(type, is) { type, is } #define macro_f_abstruse_t_initialize_2(type) { type, f_abstruse_type_t_initialize } - #define macro_f_abstruse_t_clear(abstruse) \ + #define macro_f_abstruse_t_clear(abstruse) { \ abstruse.type = 0; \ - macro_f_abstruse_type_t_clear(abstruse.is); + macro_f_abstruse_type_t_clear(abstruse.is); \ + } #endif // _di_f_abstruse_t_ /** @@ -66,6 +67,12 @@ extern "C" { #define macro_f_abstruses_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_abstruses_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_abstruses_t_clear(abstruses) { \ + abstruses.array = 0; \ + abstruses.used = 0; \ + abstruses.size = 0; \ + } #endif // _di_f_abstruses_t_ /** @@ -88,6 +95,12 @@ extern "C" { #define macro_f_abstrusess_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_abstrusess_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_abstrusess_t_clear(abstrusess) { \ + abstrusess.array = 0; \ + abstrusess.used = 0; \ + abstrusess.size = 0; \ + } #endif // _di_f_abstrusess_t_ /** diff --git a/level_0/f_abstruse/c/abstruse/map.h b/level_0/f_abstruse/c/abstruse/map.h index d839c2a..28115e4 100644 --- a/level_0/f_abstruse/c/abstruse/map.h +++ b/level_0/f_abstruse/c/abstruse/map.h @@ -33,9 +33,10 @@ extern "C" { #define macro_f_abstruse_map_t_initialize_1(key, value) { key, value } - #define macro_f_abstruse_map_t_clear(map) \ - macro_f_string_dynamic_t_clear(map.key); \ - macro_f_abstruse_t_clear(map.value); + #define macro_f_abstruse_map_t_clear(map) { \ + macro_f_string_dynamic_t_clear(map.key) \ + macro_f_abstruse_t_clear(map.value) \ + } #endif // _di_f_abstruse_map_t_ /** @@ -58,6 +59,12 @@ extern "C" { #define macro_f_abstruse_maps_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_abstruse_maps_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_abstruse_maps_t_clear(abstruse_maps) { \ + abstruse_maps.array = 0; \ + abstruse_maps.used = 0; \ + abstruse_maps.size = 0; \ + } #endif // _di_f_abstruse_maps_t_ /** @@ -80,6 +87,12 @@ extern "C" { #define macro_f_abstruse_mapss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_abstruse_mapss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_abstruse_mapss_t_clear(abstruse_mapss) { \ + abstruse_mapss.array = 0; \ + abstruse_mapss.used = 0; \ + abstruse_mapss.size = 0; \ + } #endif // _di_f_abstruse_mapss_t_ /** diff --git a/level_0/f_account/c/account/common.h b/level_0/f_account/c/account/common.h index 8c80529..1c386e6 100644 --- a/level_0/f_account/c/account/common.h +++ b/level_0/f_account/c/account/common.h @@ -62,14 +62,15 @@ extern "C" { f_string_dynamic_t_initialize \ } - #define macro_f_account_t_clear(account) \ - macro_f_uid_t_clear(account.id_user); \ - macro_f_gid_t_clear(account.id_group); \ - macro_f_string_dynamic_t_clear(account.home); \ - macro_f_string_dynamic_t_clear(account.label); \ - macro_f_string_dynamic_t_clear(account.name); \ - macro_f_string_dynamic_t_clear(account.password); \ - macro_f_string_dynamic_t_clear(account.shell); + #define macro_f_account_t_clear(account) { \ + macro_f_uid_t_clear(account.id_user) \ + macro_f_gid_t_clear(account.id_group) \ + macro_f_string_dynamic_t_clear(account.home) \ + macro_f_string_dynamic_t_clear(account.label) \ + macro_f_string_dynamic_t_clear(account.name) \ + macro_f_string_dynamic_t_clear(account.password) \ + macro_f_string_dynamic_t_clear(account.shell) \ + } #define macro_f_account_t_delete_simple(accounts) f_account_delete(&accounts); #define macro_f_account_t_destroy_simple(accounts) f_account_destroy(&accounts); @@ -96,7 +97,11 @@ extern "C" { #define macro_f_accounts_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_accounts_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_accounts_t_clear(accounts) macro_f_memory_structures_clear(accounts) + #define macro_f_accounts_t_clear(accounts) { \ + accounts.array = 0; \ + accounts.used = 0; \ + accounts.size = 0; \ + } #endif // _di_f_accounts_t_ /** @@ -120,7 +125,11 @@ extern "C" { #define macro_f_accountss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_accountss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_accountss_t_clear(accountss) macro_f_memory_structures_clear(accountss) + #define macro_f_accountss_t_clear(accountss) { \ + accountss.array = 0; \ + accountss.used = 0; \ + accountss.size = 0; \ + } #endif // _di_f_accountss_t_ #ifdef __cplusplus diff --git a/level_0/f_color/c/color/common.h b/level_0/f_color/c/color/common.h index 3e076d0..9102d59 100644 --- a/level_0/f_color/c/color/common.h +++ b/level_0/f_color/c/color/common.h @@ -439,20 +439,23 @@ extern "C" { #define macro_f_color_format_t_initialize_1(begin, end, medium) { begin, end, medium } - #define macro_f_color_format_t_clear(format) \ + #define macro_f_color_format_t_clear(format) { \ macro_f_string_static_t_clear(format.begin) \ macro_f_string_static_t_clear(format.end) \ - macro_f_string_static_t_clear(format.medium) + macro_f_string_static_t_clear(format.medium) \ + } - #define macro_f_color_format_t_set_linux(format) \ + #define macro_f_color_format_t_set_linux(format) { \ format.begin = f_color_begin_s; \ format.end = f_color_end_s; \ - format.medium = f_color_medium_s; + format.medium = f_color_medium_s; \ + } - #define macro_f_color_format_t_set_xterminal(format) \ + #define macro_f_color_format_t_set_xterminal(format) { \ format.begin = f_color_begin_s; \ format.end = f_color_end_s; \ - format.medium = f_color_medium_s; + format.medium = f_color_medium_s; \ + } #endif // _di_f_color_format_t_ /** @@ -938,7 +941,6 @@ extern "C" { f_string_dynamic_t warning; } f_color_context_t; - // @todo create allocate/clear/etc... functions. #define f_color_context_t_initialize { \ f_color_t_initialize_linux, \ f_color_format_t_initialize_linux, \ diff --git a/level_0/f_console/c/console/common.h b/level_0/f_console/c/console/common.h index 84d94b2..b995b40 100644 --- a/level_0/f_console/c/console/common.h +++ b/level_0/f_console/c/console/common.h @@ -517,6 +517,20 @@ extern "C" { f_number_unsigneds_t_initialize, \ f_number_unsigneds_t_initialize, \ } + + #define macro_f_console_parameter_t_clear(console_parameter) { \ + macro_f_string_static_t_clear(console_parameter.match_short) \ + macro_f_string_static_t_clear(console_parameter.match_long) \ + macro_f_string_static_t_clear(console_parameter.match_simple) \ + console_parameter.values_total = 0; \ + console_parameter.flag = 0; \ + console_parameter.result = f_console_result_none_d; \ + console_parameter.location = 0; \ + console_parameter.location_sub = 0; \ + macro_f_number_unsigneds_t_clear(console_parameter.locations) \ + macro_f_number_unsigneds_t_clear(console_parameter.locations_sub) \ + macro_f_number_unsigneds_t_clear(console_parameter.values) \ + } #endif // _di_f_console_parameter_t_ /** @@ -577,6 +591,14 @@ extern "C" { used, \ on_match \ } + + #define macro_f_console_parameters_t_clear(console_parameters) { \ + console_parameters.before = 0; \ + macro_f_string_dynamics_t_clear(console_parameters.arguments) \ + macro_f_number_unsigneds_t_clear(console_parameters.remaining) \ + console_parameters.used = 0; \ + macro_f_console_parameters_t_clear(console_parameters.on_match) \ + } #endif // _di_f_console_parameters_t_ /** diff --git a/level_0/f_control_group/c/control_group/common.h b/level_0/f_control_group/c/control_group/common.h index 14eeb01..424ddec 100644 --- a/level_0/f_control_group/c/control_group/common.h +++ b/level_0/f_control_group/c/control_group/common.h @@ -68,10 +68,11 @@ extern "C" { #define macro_f_control_group_t_initialize_1(as_new, path, groups) { as_new, path, groups } - #define macro_f_control_group_t_clear(control) \ + #define macro_f_control_group_t_clear(control) { \ control.as_new = F_false; \ - macro_f_string_dynamic_t_clear(control.path); \ - macro_f_string_dynamics_t_clear(control.groups); + macro_f_string_dynamic_t_clear(control.path) \ + macro_f_string_dynamics_t_clear(control.groups) \ + } #endif // _di_f_control_group_t_ #ifdef __cplusplus diff --git a/level_0/f_conversion/c/conversion/common.h b/level_0/f_conversion/c/conversion/common.h index 7c5498c..49d54bd 100644 --- a/level_0/f_conversion/c/conversion/common.h +++ b/level_0/f_conversion/c/conversion/common.h @@ -96,10 +96,11 @@ extern "C" { #define macro_f_conversion_data_t_initialize_1(base, flag, width) { base, flag, width } - #define macro_f_conversion_data_t_clear(data) \ + #define macro_f_conversion_data_t_clear(data) { \ data.base = 0; \ data.flag = 0; \ - data.width = 0; + data.width = 0; \ + } #endif // _di_f_conversion_data_t_ /** diff --git a/level_0/f_directory/c/directory/listing.h b/level_0/f_directory/c/directory/listing.h index fcbbe29..b5ebfff 100644 --- a/level_0/f_directory/c/directory/listing.h +++ b/level_0/f_directory/c/directory/listing.h @@ -101,6 +101,17 @@ extern "C" { socket, \ unknown, \ } + + #define macro_f_directory_listing_t_clear(directory_listing) { \ + macro_f_string_dynamics_t_clear(directory_listing.block) \ + macro_f_string_dynamics_t_clear(directory_listing.character) \ + macro_f_string_dynamics_t_clear(directory_listing.directory) \ + macro_f_string_dynamics_t_clear(directory_listing.regular) \ + macro_f_string_dynamics_t_clear(directory_listing.link) \ + macro_f_string_dynamics_t_clear(directory_listing.fifo) \ + macro_f_string_dynamics_t_clear(directory_listing.socket) \ + macro_f_string_dynamics_t_clear(directory_listing.unknown) \ + } #endif // _di_f_directory_listing_t_ /** @@ -124,7 +135,11 @@ extern "C" { #define macro_f_directory_listings_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_directory_listings_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_directory_listings_t_clear(structures) macro_f_memory_structures_clear(structures) + #define macro_f_directory_listings_t_clear(directory_listings) { \ + directory_listings.array = 0; \ + directory_listings.used = 0; \ + directory_listings.size = 0; \ + } #endif // _di_f_directory_listings_t_ /** @@ -148,7 +163,11 @@ extern "C" { #define macro_f_directory_listingss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_directory_listingss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_directory_listingss_t_clear(structures) macro_f_memory_structures_clear(structures) + #define macro_f_directory_listingss_t_clear(directory_listingss) { \ + directory_listingss.array = 0; \ + directory_listingss.used = 0; \ + directory_listingss.size = 0; \ + } #endif // _di_f_directory_listingss_t_ /** diff --git a/level_0/f_directory/c/directory/recurse_do.h b/level_0/f_directory/c/directory/recurse_do.h index 85be188..56f158b 100644 --- a/level_0/f_directory/c/directory/recurse_do.h +++ b/level_0/f_directory/c/directory/recurse_do.h @@ -141,7 +141,11 @@ extern "C" { #define macro_f_directory_recurse_dos_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_directory_recurse_dos_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_directory_recurse_dos_t_clear(structures) macro_f_memory_structures_clear(structures) + #define macro_f_directory_recurse_dos_t_clear(directory_recurse_dos) { \ + directory_recurse_dos.array = 0; \ + directory_recurse_dos.used = 0; \ + directory_recurse_dos.size = 0; \ + } #endif // _di_f_directory_recurse_dos_t_ /** @@ -165,7 +169,11 @@ extern "C" { #define macro_f_directory_recurse_doss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_directory_recurse_doss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_directory_recurse_doss_t_clear(structures) macro_f_memory_structures_clear(structures) + #define macro_f_directory_recurse_doss_t_clear(directory_recurse_doss) { \ + directory_recurse_doss.array = 0; \ + directory_recurse_doss.used = 0; \ + directory_recurse_doss.size = 0; \ + } #endif // _di_f_directory_recurse_doss_t_ /** diff --git a/level_0/f_directory/c/directory/status.h b/level_0/f_directory/c/directory/status.h index a006967..43ade04 100644 --- a/level_0/f_directory/c/directory/status.h +++ b/level_0/f_directory/c/directory/status.h @@ -36,9 +36,10 @@ extern "C" { #define macro_f_directory_status_t_initialize_1(status, path) { status, path } - #define macro_f_directory_status_t_clear(directory) \ + #define macro_f_directory_status_t_clear(directory) { \ directory.status = 0; \ - macro_f_string_dynamic_t_clear(directory.path); + macro_f_string_dynamic_t_clear(directory.path) \ + } #endif // _di_f_directory_status_t_ /** @@ -62,7 +63,11 @@ extern "C" { #define macro_f_directory_statuss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_directory_statuss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_directory_statuss_t_clear(structures) macro_f_memory_structures_clear(structures) + #define macro_f_directory_statuss_t_clear(directory_statuss) { \ + directory_statuss.array = 0; \ + directory_statuss.used = 0; \ + directory_statuss.size = 0; \ + } #endif // _di_f_directory_statuss_t_ /** @@ -86,7 +91,11 @@ extern "C" { #define macro_f_directory_statusss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_directory_statusss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_directory_statusss_t_clear(structures) macro_f_memory_structures_clear(structures) + #define macro_f_directory_statusss_t_clear(directory_statusss) { \ + directory_statusss.array = 0; \ + directory_statusss.used = 0; \ + directory_statusss.size = 0; \ + } #endif // _di_f_directory_statusss_t_ /** diff --git a/level_0/f_execute/c/execute/common.h b/level_0/f_execute/c/execute/common.h index 90fe40e..e1a20ab 100644 --- a/level_0/f_execute/c/execute/common.h +++ b/level_0/f_execute/c/execute/common.h @@ -169,9 +169,10 @@ extern "C" { #define macro_f_execute_scheduler_t_initialize_1(policy, priority) { policy, priority } - #define f_execute_scheduler_t_clear(scheduler) \ + #define f_execute_scheduler_t_clear(scheduler) { \ scheduler.policy = 0; \ - scheduler.priority = 0; + scheduler.priority = 0; \ + } #endif // _di_f_execute_scheduler_t_ /** diff --git a/level_0/f_fss/c/fss/item.h b/level_0/f_fss/c/fss/item.h index 3399c08..3a20e77 100644 --- a/level_0/f_fss/c/fss/item.h +++ b/level_0/f_fss/c/fss/item.h @@ -46,11 +46,12 @@ extern "C" { #define macro_f_fss_item_t_initialize_1(object, close, content, parent) macro_f_number_unsigneds_t_initialize_1(object, close, content, parent) - #define macro_f_fss_item_t_clear(item) \ - macro_f_range_t_clear(item.object); \ - macro_f_range_t_clear(item.close); \ - macro_f_ranges_t_clear(item.content); \ - item.parent = 0; + #define macro_f_fss_item_t_clear(item) { \ + macro_f_range_t_clear(item.object) \ + macro_f_range_t_clear(item.close) \ + macro_f_ranges_t_clear(item.content) \ + item.parent = 0; \ + } #endif // _di_f_fss_item_t_ /** @@ -98,6 +99,12 @@ extern "C" { #define macro_f_fss_items_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_fss_items_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_fss_items_t_clear(fss_items) { \ + fss_items.array = 0; \ + fss_items.used = 0; \ + fss_items.size = 0; \ + } #endif // _di_f_fss_items_t_ /** @@ -120,6 +127,12 @@ extern "C" { #define macro_f_fss_itemss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_fss_itemss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_fss_itemss_t_clear(fss_itemss) { \ + fss_itemss.array = 0; \ + fss_itemss.used = 0; \ + fss_itemss.size = 0; \ + } #endif // _di_f_fss_itemss_t_ /** diff --git a/level_0/f_fss/c/fss/named.h b/level_0/f_fss/c/fss/named.h index 4a12163..fd0648a 100644 --- a/level_0/f_fss/c/fss/named.h +++ b/level_0/f_fss/c/fss/named.h @@ -42,11 +42,12 @@ extern "C" { #define macro_f_fss_named_t_initialize_1(name, objects, contents, quotess) macro_f_number_unsigneds_t_initialize_1(name, objects, contents, quotess) #define macro_f_fss_named_t_initialize_2(name) macro_f_number_unsigneds_t_initialize_1(name, f_ranges_t_initialize, f_rangess_t_initialize, f_uint8ss_t_initialize) - #define macro_f_fss_named_t_clear(named) \ + #define macro_f_fss_named_t_clear(named) { \ macro_f_range_t_clear(named.name) \ macro_f_ranges_t_clear(named.objects) \ macro_f_rangess_t_clear(named.contents) \ - macro_f_uint8ss_t_clear(named.quotess) + macro_f_uint8ss_t_clear(named.quotess) \ + } #endif // _di_f_fss_named_t_ /** @@ -70,7 +71,11 @@ extern "C" { #define macro_f_fss_nameds_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_fss_nameds_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_fss_nameds_t_clear(nameds) macro_f_memory_structures_clear(nameds) + #define macro_f_fss_nameds_t_clear(fss_nameds) { \ + fss_nameds.array = 0; \ + fss_nameds.used = 0; \ + fss_nameds.size = 0; \ + } #endif // _di_f_fss_nameds_t_ /** @@ -94,7 +99,11 @@ extern "C" { #define macro_f_fss_namedss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_fss_namedss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_fss_namedss_t_clear(nameds) macro_f_memory_structures_clear(nameds) + #define macro_f_fss_namedss_t_clear(fss_namedss) { \ + fss_namedss.array = 0; \ + fss_namedss.used = 0; \ + fss_namedss.size = 0; \ + } #endif // _di_f_fss_namedss_t_ /** diff --git a/level_0/f_fss/c/fss/nest.h b/level_0/f_fss/c/fss/nest.h index 771b6b7..454ca9e 100644 --- a/level_0/f_fss/c/fss/nest.h +++ b/level_0/f_fss/c/fss/nest.h @@ -41,7 +41,11 @@ extern "C" { #define macro_f_fss_nest_t_initialize_1(depth_value, used_value, size_value) { .depth = depth_value, .used = used_value, .size = size_value } #define macro_f_fss_nest_t_initialize_2(depth_value, length_value) { .depth = depth_value, .used = length_value, .size = length_value } - #define macro_f_fss_nest_t_clear(nest) macro_f_memory_structures_clear(nest) + #define macro_f_fss_nest_t_clear(fss_nest) { \ + fss_nest.array = 0; \ + fss_nest.used = 0; \ + fss_nest.size = 0; \ + } #endif // _di_f_fss_nest_t_ /** @@ -65,7 +69,11 @@ extern "C" { #define macro_f_fss_nests_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_fss_nests_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_fss_nests_t_clear(nests) macro_f_memory_structures_clear(nests) + #define macro_f_fss_nests_t_clear(fss_nests) { \ + fss_nests.array = 0; \ + fss_nests.used = 0; \ + fss_nests.size = 0; \ + } #endif // _di_f_fss_nests_t_ /** @@ -89,7 +97,11 @@ extern "C" { #define macro_f_fss_nestss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_fss_nestss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_fss_nestss_t_clear(nests) macro_f_memory_structures_clear(nests) + #define macro_f_fss_nestss_t_clear(fss_nestss) { \ + fss_nestss.array = 0; \ + fss_nestss.used = 0; \ + fss_nestss.size = 0; \ + } #endif // _di_f_fss_nestss_t_ /** diff --git a/level_0/f_fss/c/fss/set.h b/level_0/f_fss/c/fss/set.h index 94913a4..51fd52c 100644 --- a/level_0/f_fss/c/fss/set.h +++ b/level_0/f_fss/c/fss/set.h @@ -36,9 +36,10 @@ extern "C" { #define macro_f_fss_set_t_initialize_1(objects, contents) { objects, contents } - #define macro_f_fss_set_t_clear(set) \ + #define macro_f_fss_set_t_clear(set) { \ macro_f_ranges_t_clear(set.objects) \ - macro_f_rangess_t_clear(set.contents) + macro_f_rangess_t_clear(set.contents) \ + } #endif // _di_f_fss_set_t_ /** @@ -62,7 +63,11 @@ extern "C" { #define macro_f_fss_sets_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_fss_sets_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_fss_sets_t_clear(sets) macro_f_memory_structures_clear(sets) + #define macro_f_fss_sets_t_clear(fss_sets) { \ + fss_sets.array = 0; \ + fss_sets.used = 0; \ + fss_sets.size = 0; \ + } #endif // _di_f_fss_sets_t_ /** @@ -86,7 +91,11 @@ extern "C" { #define macro_f_fss_setss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_fss_setss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_fss_setss_t_clear(sets) macro_f_memory_structures_clear(sets) + #define macro_f_fss_setss_t_clear(fss_setss) { \ + fss_setss.array = 0; \ + fss_setss.used = 0; \ + fss_setss.size = 0; \ + } #endif // _di_f_fss_setss_t_ /** diff --git a/level_0/f_fss/c/fss/set_quote.h b/level_0/f_fss/c/fss/set_quote.h index 5c21eb5..7f06b16 100644 --- a/level_0/f_fss/c/fss/set_quote.h +++ b/level_0/f_fss/c/fss/set_quote.h @@ -41,11 +41,12 @@ extern "C" { #define macro_f_fss_set_quote_t_initialize_1(objects, contents, objects_quote, contents_quote) { objects, contents, objects_quote, contents_quote } - #define macro_f_fss_set_quote_t_clear(set) \ + #define macro_f_fss_set_quote_t_clear(set) { \ macro_f_ranges_t_clear(set.objects) \ macro_f_rangess_t_clear(set.contents) \ macro_f_uint8s_t_clear(set.objects_quote) \ - macro_f_uint8ss_t_clear(set.contents_quote) + macro_f_uint8ss_t_clear(set.contents_quote) \ + } #endif // _di_f_fss_set_quote_t_ /** @@ -69,7 +70,11 @@ extern "C" { #define macro_f_fss_set_quotes_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_fss_set_quotes_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_fss_set_quotes_t_clear(set_quotes) macro_f_memory_structures_clear(set_quotes) + #define macro_f_fss_set_quotes_t_clear(fss_set_quotes) { \ + fss_set_quotes.array = 0; \ + fss_set_quotes.used = 0; \ + fss_set_quotes.size = 0; \ + } #endif // _di_f_fss_set_quotes_t_ /** @@ -93,7 +98,11 @@ extern "C" { #define macro_f_fss_set_quotess_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_fss_set_quotess_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_fss_set_quotess_t_clear(set_quotes) macro_f_memory_structures_clear(set_quotes) + #define macro_f_fss_set_quotess_t_clear(fss_set_quotess) { \ + fss_set_quotess.array = 0; \ + fss_set_quotess.used = 0; \ + fss_set_quotess.size = 0; \ + } #endif // _di_f_fss_set_quotess_t_ /** diff --git a/level_0/f_fss/c/fss/simple_packet.h b/level_0/f_fss/c/fss/simple_packet.h index dfa8dbb..37205e1 100644 --- a/level_0/f_fss/c/fss/simple_packet.h +++ b/level_0/f_fss/c/fss/simple_packet.h @@ -50,22 +50,15 @@ extern "C" { f_string_dynamic_t payload; } f_fss_simple_packet_t; - #define f_fss_simple_packet_t_initialize { \ - 0, \ - 0, \ - f_string_dynamic_t_initialize, \ - } + #define f_fss_simple_packet_t_initialize { 0, 0, f_string_dynamic_t_initialize } - #define macro_f_fss_simple_packet_t_initialize_1(control, size, payload) { \ - control, \ - size, \ - payload, \ - } + #define macro_f_fss_simple_packet_t_initialize_1(control, size, payload) { control, size, payload } + #define macro_f_fss_simple_packet_t_initialize_2(payload) { 0, 0, payload } - #define macro_f_fss_simple_packet_t_initialize_2(payload) { \ - 0, \ - 0, \ - payload, \ + #define macro_f_fss_simple_packet_t_clear(fss_simple_packet) { \ + fss_simple_packet.array = 0; \ + fss_simple_packet.used = 0; \ + fss_simple_packet.size = 0; \ } #endif // _di_f_fss_simple_packet_t_ @@ -90,7 +83,11 @@ extern "C" { #define macro_f_fss_simple_packets_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_fss_simple_packets_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_fss_simple_packets_t_clear(simple_packets) macro_f_memory_structures_clear(simple_packets) + #define macro_f_fss_simple_packets_t_clear(fss_simple_packets) { \ + fss_simple_packets.array = 0; \ + fss_simple_packets.used = 0; \ + fss_simple_packets.size = 0; \ + } #endif // _di_f_fss_simple_packets_t_ /** @@ -114,7 +111,11 @@ extern "C" { #define macro_f_fss_simple_packetss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_fss_simple_packetss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_fss_simple_packetss_t_clear(simple_packetss) macro_f_memory_structures_clear(simple_packetss) + #define macro_f_fss_simple_packetss_t_clear(fss_simple_packetss) { \ + fss_simple_packetss.array = 0; \ + fss_simple_packetss.used = 0; \ + fss_simple_packetss.size = 0; \ + } #endif // _di_f_fss_simple_packetss_t_ /** @@ -132,22 +133,15 @@ extern "C" { f_range_t payload; } f_fss_simple_packet_range_t; - #define f_fss_simple_packet_range_t_initialize { \ - 0, \ - 0, \ - f_range_t_initialize, \ - } + #define f_fss_simple_packet_range_t_initialize { 0, 0, f_range_t_initialize } - #define macro_f_fss_simple_packet_range_t_initialize_1(control, size, payload) { \ - control, \ - size, \ - payload, \ - } + #define macro_f_fss_simple_packet_range_t_initialize_1(control, size, payload) { control, size, payload } + #define macro_f_fss_simple_packet_range_t_initialize_2(payload) { 0, 0, payload } - #define macro_f_fss_simple_packet_range_t_initialize_2(payload) { \ - 0, \ - 0, \ - payload, \ + #define macro_f_fss_simple_packet_range_t_clear(fss_simple_packet_range) { \ + fss_simple_packet_range.control = 0; \ + fss_simple_packet_range.size = 0; \ + macro_f_range_t_clear(fss_simple_packet_range.payload) \ } #endif // _di_f_fss_simple_packet_range_t_ @@ -172,7 +166,11 @@ extern "C" { #define macro_f_fss_simple_packet_ranges_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_fss_simple_packet_ranges_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_fss_simple_packet_ranges_t_clear(simple_packet_ranges) macro_f_memory_structures_clear(simple_packet_ranges) + #define macro_f_fss_simple_packet_ranges_t_clear(fss_simple_packet_ranges) { \ + fss_simple_packet_ranges.array = 0; \ + fss_simple_packet_ranges.used = 0; \ + fss_simple_packet_ranges.size = 0; \ + } #endif // _di_f_fss_simple_packet_ranges_t_ /** @@ -196,7 +194,11 @@ extern "C" { #define macro_f_fss_simple_packet_rangess_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_fss_simple_packet_rangess_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_fss_simple_packet_rangess_t_clear(simple_packet_rangess) macro_f_memory_structures_clear(simple_packet_rangess) + #define macro_f_fss_simple_packet_rangess_t_clear(fss_simple_packet_rangess) { \ + fss_simple_packet_rangess.array = 0; \ + fss_simple_packet_rangess.used = 0; \ + fss_simple_packet_rangess.size = 0; \ + } #endif // _di_f_fss_simple_packet_rangess_t_ /** diff --git a/level_0/f_iki/c/iki/common.h b/level_0/f_iki/c/iki/common.h index f09f874..dba109b 100644 --- a/level_0/f_iki/c/iki/common.h +++ b/level_0/f_iki/c/iki/common.h @@ -229,11 +229,12 @@ extern "C" { #define macro_f_iki_data_t_initialize_1(content, delimits, variable, vocabulary) { content, delimits, variable, vocabulary } - #define macro_f_iki_data_t_clear(data) \ - f_ranges_t_clear(data.content) \ - f_number_unsigneds_t_clear(data.delimits) \ - f_ranges_t_clear(data.variable) \ - f_ranges_t_clear(data.vocabulary) + #define macro_f_iki_data_t_clear(data) { \ + macro_f_ranges_t_clear(data.content) \ + macro_f_number_unsigneds_t_clear(data.delimits) \ + macro_f_ranges_t_clear(data.variable) \ + macro_f_ranges_t_clear(data.vocabulary) \ + } #endif // _di_f_iki_data_t_ /** @@ -256,6 +257,12 @@ extern "C" { #define macro_f_iki_datas_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_iki_datas_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_iki_datas_t_clear(iki_datas) { \ + iki_datas.array = 0; \ + iki_datas.used = 0; \ + iki_datas.size = 0; \ + } #endif // _di_f_iki_datas_t_ /** @@ -278,6 +285,12 @@ extern "C" { #define macro_f_iki_datass_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_iki_datass_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_iki_datass_t_clear(iki_datass) { \ + iki_datass.array = 0; \ + iki_datass.used = 0; \ + iki_datass.size = 0; \ + } #endif // _di_f_iki_datass_t_ /** @@ -306,11 +319,12 @@ extern "C" { #define macro_f_iki_eki_t_initialize_1(content, delimits, variable, vocabularys) { content, delimits, variable, vocabularys } - #define macro_f_iki_eki_t_clear(data) \ - f_ranges_t_clear(data.content) \ - f_number_unsigneds_t_clear(data.delimits) \ - f_ranges_t_clear(data.variable) \ - f_ranges_t_clear(data.vocabulary) + #define macro_f_iki_eki_t_clear(data) { \ + macro_f_ranges_t_clear(data.content) \ + macro_f_number_unsigneds_t_clear(data.delimits) \ + macro_f_ranges_t_clear(data.variable) \ + macro_f_ranges_t_clear(data.vocabulary) \ + } #endif // _di_f_iki_eki_t_ /** @@ -333,6 +347,12 @@ extern "C" { #define macro_f_iki_ekis_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_iki_ekis_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_iki_ekis_t_clear(iki_ekis) { \ + iki_ekis.array = 0; \ + iki_ekis.used = 0; \ + iki_ekis.size = 0; \ + } #endif // _di_f_iki_ekis_t_ /** @@ -355,6 +375,12 @@ extern "C" { #define macro_f_iki_ekiss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_iki_ekiss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_iki_ekiss_t_clear(iki_ekiss) { \ + iki_ekiss.array = 0; \ + iki_ekiss.used = 0; \ + iki_ekiss.size = 0; \ + } #endif // _di_f_iki_ekiss_t_ #ifdef __cplusplus diff --git a/level_0/f_limit/c/limit/set.h b/level_0/f_limit/c/limit/set.h index b5e512e..b33be47 100644 --- a/level_0/f_limit/c/limit/set.h +++ b/level_0/f_limit/c/limit/set.h @@ -33,9 +33,10 @@ extern "C" { #define macro_f_limit_set_t_initialize_1(type, value) { type, value } - #define macro_f_limit_set_t_clear(set) \ + #define macro_f_limit_set_t_clear(set) { \ set.type = 0; \ - macro_f_limit_value_t_clear(set.value); + macro_f_limit_value_t_clear(set.value) \ + } #endif // _di_f_limit_set_t_ /** @@ -58,6 +59,12 @@ extern "C" { #define macro_f_limit_sets_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_limit_sets_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_limit_sets_t_clear(limit_sets) { \ + limit_sets.array = 0; \ + limit_sets.used = 0; \ + limit_sets.size = 0; \ + } #endif // _di_f_limit_sets_t_ /** @@ -80,6 +87,12 @@ extern "C" { #define macro_f_limit_setss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_limit_setss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_limit_setss_t_clear(limit_setss) { \ + limit_setss.array = 0; \ + limit_setss.used = 0; \ + limit_setss.size = 0; \ + } #endif // _di_f_limit_setss_t_ /** diff --git a/level_0/f_limit/c/limit/value.h b/level_0/f_limit/c/limit/value.h index d40a660..ced432f 100644 --- a/level_0/f_limit/c/limit/value.h +++ b/level_0/f_limit/c/limit/value.h @@ -54,6 +54,12 @@ extern "C" { #define macro_f_limit_values_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_limit_values_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_limit_values_t_clear(limit_values) { \ + limit_values.array = 0; \ + limit_values.used = 0; \ + limit_values.size = 0; \ + } #endif // _di_f_limit_values_t_ /** @@ -76,6 +82,12 @@ extern "C" { #define macro_f_limit_valuess_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_limit_valuess_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_limit_valuess_t_clear(limit_valuess) { \ + limit_valuess.array = 0; \ + limit_valuess.used = 0; \ + limit_valuess.size = 0; \ + } #endif // _di_f_limit_valuess_t_ /** diff --git a/level_0/f_network/c/network/common.h b/level_0/f_network/c/network/common.h index 5682887..fee4487 100644 --- a/level_0/f_network/c/network/common.h +++ b/level_0/f_network/c/network/common.h @@ -77,9 +77,10 @@ extern "C" { #define macro_f_network_family_ip_t_initialize_1(v4) { f_network_family_ip_4_e, macro_f_network_family_ip_4_or_6_t_initialize_1(v4) } #define macro_f_network_family_ip_t_initialize_2(v6) { f_network_family_ip_6_e, macro_f_network_family_ip_4_or_6_t_initialize_2(v6) } - #define f_network_family_ip_t_clear(family_ip) \ + #define f_network_family_ip_t_clear(family_ip) { \ family_ip.type = f_network_family_none_e; \ - f_network_family_ip_t_clear(family_ip.address) + f_network_family_ip_t_clear(family_ip.address) \ + } #endif // _di_f_network_family_ip_t_ #ifdef __cplusplus diff --git a/level_0/f_schedule/c/schedule/common.h b/level_0/f_schedule/c/schedule/common.h index b53d223..48a1aec 100644 --- a/level_0/f_schedule/c/schedule/common.h +++ b/level_0/f_schedule/c/schedule/common.h @@ -150,6 +150,12 @@ extern "C" { deadline, \ period, \ } + + #define macro_f_schedule_attribute_t_clear(schedule_attribute) { \ + schedule_attribute.array = 0; \ + schedule_attribute.used = 0; \ + schedule_attribute.size = 0; \ + } #endif // _di_f_schedule_attribute_t_ /** diff --git a/level_0/f_signal/c/signal/common.h b/level_0/f_signal/c/signal/common.h index 7c3bb62..78d3ede 100644 --- a/level_0/f_signal/c/signal/common.h +++ b/level_0/f_signal/c/signal/common.h @@ -35,10 +35,11 @@ extern "C" { #define macro_f_signal_t_initialize_1(flags, id, set) { flags, id, set } - #define macro_f_signal_t_clear(signal) \ + #define macro_f_signal_t_clear(signal) { \ signal.flags = 0; \ signal.id = -1; \ - signal.set[0] = 0; + signal.set[0] = 0; \ + } #endif // _di_f_signal_t_ /** @@ -57,6 +58,11 @@ extern "C" { #define f_signal_how_t_initialize { { 0 } , { 0 } } #define macro_f_signal_how_t_initialize_1(block, block_not) { block, block_not } + + #define macro_f_signal_how_t_clear(signal_how) { \ + signal_how.block[0] = 0; \ + signal_how.block_not[0] = 0; \ + } #endif // _di_f_signal_how_t_ #ifdef __cplusplus diff --git a/level_0/f_socket/c/socket/address.h b/level_0/f_socket/c/socket/address.h index 8f0e0c9..1dd351c 100644 --- a/level_0/f_socket/c/socket/address.h +++ b/level_0/f_socket/c/socket/address.h @@ -192,6 +192,12 @@ extern "C" { #define macro_f_socket_addresss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_socket_addresss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_socket_addresss_t_clear(socket_addresss) { \ + socket_addresss.array = 0; \ + socket_addresss.used = 0; \ + socket_addresss.size = 0; \ + } #endif // _di_f_socket_addresss_t_ /** @@ -214,6 +220,12 @@ extern "C" { #define macro_f_socket_addressss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_socket_addressss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_socket_addressss_t_clear(socket_addressss) { \ + socket_addressss.array = 0; \ + socket_addressss.used = 0; \ + socket_addressss.size = 0; \ + } #endif // _di_f_socket_addressss_t_ /** diff --git a/level_0/f_socket/c/socket/socket.h b/level_0/f_socket/c/socket/socket.h index b9be4a5..c563007 100644 --- a/level_0/f_socket/c/socket/socket.h +++ b/level_0/f_socket/c/socket/socket.h @@ -20,8 +20,8 @@ extern "C" { * Commonly used socket related properties, loosely based off of f_file_t. * * Properties: - * - id: Socket file descriptor, used for binding and listening. - * - id_data: Data file descriptor, used for reading and writing data from or to the socket. + * - id: Socket file descriptor, used for binding and listening (set to -1 to designate not used). + * - id_data: Data file descriptor, used for reading and writing data from or to the socket (set to -1 to designate not used). * - domain: The socket domain (protocol family, such as f_socket_protocol_family_local_e). * - protocol: The socket protocol (such as f_socket_protocol_tcp_e). * - type: The socket type (address family, such as f_socket_address_family_local_e). @@ -55,7 +55,19 @@ extern "C" { f_string_static_t name; } f_socket_t; - #define f_socket_t_initialize { -1, -1, 0, 0, 0, f_socket_address_form_generic_e, F_socket_default_read_size_d, F_socket_default_write_size_d, f_socket_address_t_initialize, 0, f_string_static_t_initialize } + #define f_socket_t_initialize { \ + -1, \ + -1, \ + 0, \ + 0, \ + 0, \ + f_socket_address_form_generic_e, \ + F_socket_default_read_size_d, \ + F_socket_default_write_size_d, \ + f_socket_address_t_initialize, \ + 0, \ + f_string_static_t_initialize \ + } #define macro_f_socket_t_initialize_1(form, address, length) { \ -1, \ @@ -127,7 +139,7 @@ extern "C" { name \ } - #define macro_f_socket_t_clear(file) \ + #define macro_f_socket_t_clear(file) { \ file.id = -1; \ file.id_data = -1; \ file.domain = 0; \ @@ -137,9 +149,10 @@ extern "C" { file.size_read = 0; \ file.size_write = 0; \ file.length = 0; \ - macro_f_string_static_t_clear(file); + macro_f_string_static_t_clear(file) \ + } - #define macro_f_socket_t_reset(file) \ + #define macro_f_socket_t_reset(file) { \ file.id = -1; \ file.id_data = -1; \ file.domain = 0; \ @@ -149,7 +162,8 @@ extern "C" { file.size_read = F_socket_default_read_size_d; \ file.size_write = F_socket_default_write_size_d; \ file.length = 0; \ - macro_f_string_static_t_clear(file); + macro_f_string_static_t_clear(file) \ + } #endif // _di_f_socket_t_ /** @@ -172,6 +186,12 @@ extern "C" { #define macro_f_sockets_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_sockets_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_sockets_t_clear(sockets) { \ + sockets.array = 0; \ + sockets.used = 0; \ + sockets.size = 0; \ + } #endif // _di_f_sockets_t_ /** @@ -194,6 +214,12 @@ extern "C" { #define macro_f_socketss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_socketss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_socketss_t_clear(socketss) { \ + socketss.array = 0; \ + socketss.used = 0; \ + socketss.size = 0; \ + } #endif // _di_f_socketss_t_ /** diff --git a/level_0/f_string/c/string/map.h b/level_0/f_string/c/string/map.h index 1f2c8f9..52b6c63 100644 --- a/level_0/f_string/c/string/map.h +++ b/level_0/f_string/c/string/map.h @@ -33,9 +33,10 @@ extern "C" { #define macro_f_string_map_t_initialize_1(key, value) { key, value } - #define macro_f_string_map_t_clear(map) \ + #define macro_f_string_map_t_clear(map) { \ macro_f_string_dynamic_t_clear(map.key) \ - macro_f_string_dynamic_t_clear(map.value) + macro_f_string_dynamic_t_clear(map.value) \ + } #endif // _di_f_string_map_t_ #ifdef __cplusplus diff --git a/level_0/f_string/c/string/map_multi.h b/level_0/f_string/c/string/map_multi.h index 4db5406..3ecb2c6 100644 --- a/level_0/f_string/c/string/map_multi.h +++ b/level_0/f_string/c/string/map_multi.h @@ -33,9 +33,10 @@ extern "C" { #define macro_f_string_map_multi_t_initialize_1(key, value) { key, value } - #define macro_f_string_map_multi_t_clear(key) \ + #define macro_f_string_map_multi_t_clear(key) { \ macro_f_string_dynamic_t_clear(key.name) \ - macro_f_string_dynamics_t_clear(key.value) + macro_f_string_dynamics_t_clear(key.value) \ + } #endif // _di_f_string_map_multi_t_ #ifdef __cplusplus diff --git a/level_0/f_string/c/string/map_multis.h b/level_0/f_string/c/string/map_multis.h index 87611e3..9a577f9 100644 --- a/level_0/f_string/c/string/map_multis.h +++ b/level_0/f_string/c/string/map_multis.h @@ -37,10 +37,11 @@ extern "C" { #define macro_f_string_map_multis_t_initialize_1(array, size, used) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_string_map_multis_t_initialize_2(array, length) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_string_map_multis_t_clear(map_multis) \ + #define macro_f_string_map_multis_t_clear(map_multis) { \ map_multis.array = 0; \ map_multis.used = 0; \ - map_multis.size = 0; + map_multis.size = 0; \ + } #endif // _di_f_string_map_multis_t_ /** diff --git a/level_0/f_string/c/string/map_multiss.h b/level_0/f_string/c/string/map_multiss.h index 09dbde8..aa8c5c2 100644 --- a/level_0/f_string/c/string/map_multiss.h +++ b/level_0/f_string/c/string/map_multiss.h @@ -37,10 +37,11 @@ extern "C" { #define macro_f_string_map_multiss_t_initialize_1(array, size, used) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_string_map_multiss_t_initialize_2(array, length) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_string_map_multiss_t_clear(map_multiss) \ + #define macro_f_string_map_multiss_t_clear(map_multiss) { \ map_multiss.array = 0; \ map_multiss.used = 0; \ - map_multiss.size = 0; + map_multiss.size = 0; \ + } #endif // _di_f_string_map_multiss_t_ /** diff --git a/level_0/f_string/c/string/maps.h b/level_0/f_string/c/string/maps.h index 459c2ee..0a30ee6 100644 --- a/level_0/f_string/c/string/maps.h +++ b/level_0/f_string/c/string/maps.h @@ -37,10 +37,11 @@ extern "C" { #define macro_f_string_maps_t_initialize_1(array, size, used) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_string_maps_t_initialize_2(array, length) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_string_maps_t_clear(maps) \ + #define macro_f_string_maps_t_clear(maps) { \ maps.array = 0; \ maps.used = 0; \ - maps.size = 0; + maps.size = 0; \ + } #endif // _di_f_string_maps_t_ /** diff --git a/level_0/f_string/c/string/mapss.h b/level_0/f_string/c/string/mapss.h index dde84eb..8d36282 100644 --- a/level_0/f_string/c/string/mapss.h +++ b/level_0/f_string/c/string/mapss.h @@ -37,10 +37,11 @@ extern "C" { #define macro_f_string_mapss_t_initialize_1(array, size, used) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_string_mapss_t_initialize_2(array, length) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_string_mapss_t_clear(mapss) \ + #define macro_f_string_mapss_t_clear(mapss) { \ mapss.array = 0; \ mapss.used = 0; \ - mapss.size = 0; + mapss.size = 0; \ + } #endif // _di_f_string_mapss_t_ /** diff --git a/level_0/f_string/c/string/statics.h b/level_0/f_string/c/string/statics.h index 3870496..31bd327 100644 --- a/level_0/f_string/c/string/statics.h +++ b/level_0/f_string/c/string/statics.h @@ -37,10 +37,11 @@ extern "C" { #define macro_f_string_statics_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_string_statics_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_string_statics_t_clear(statics) \ + #define macro_f_string_statics_t_clear(statics) { \ statics.array = 0; \ statics.used = 0; \ - statics.size = 0; + statics.size = 0; \ + } #endif // _di_f_string_statics_t_ #ifdef __cplusplus diff --git a/level_0/f_string/c/string/staticss.h b/level_0/f_string/c/string/staticss.h index ad586d3..20755da 100644 --- a/level_0/f_string/c/string/staticss.h +++ b/level_0/f_string/c/string/staticss.h @@ -37,10 +37,11 @@ extern "C" { #define macro_f_string_staticss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_string_staticss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_string_staticss_t_clear(staticss) \ + #define macro_f_string_staticss_t_clear(staticss) { \ staticss.array = 0; \ staticss.used = 0; \ - staticss.size = 0; + staticss.size = 0; \ + } #endif // _di_f_string_staticss_t_ #ifdef __cplusplus diff --git a/level_0/f_string/c/string/triple.h b/level_0/f_string/c/string/triple.h index 5653d69..a4d6e46 100644 --- a/level_0/f_string/c/string/triple.h +++ b/level_0/f_string/c/string/triple.h @@ -35,16 +35,11 @@ extern "C" { #define macro_f_string_triple_t_initialize_1(a, b, c) { a, b, c } - #define macro_f_string_triple_t_clear(triple) \ - triple.a.array = 0; \ - triple.a.size = 0; \ - triple.a.used = 0; \ - triple.b.array = 0; \ - triple.b.size = 0; \ - triple.b.used = 0; \ - triple.c.array = 0; \ - triple.c.size = 0; \ - triple.c.used = 0; + #define macro_f_string_triple_t_clear(triple) { \ + macro_f_string_dynamic_t_clear(triple.a) \ + macro_f_string_dynamic_t_clear(triple.b) \ + macro_f_string_dynamic_t_clear(triple.c) \ + } #endif // _di_f_string_triple_t_ #ifdef __cplusplus diff --git a/level_0/f_string/c/string/triples.h b/level_0/f_string/c/string/triples.h index aceffea..a915a5a 100644 --- a/level_0/f_string/c/string/triples.h +++ b/level_0/f_string/c/string/triples.h @@ -37,10 +37,11 @@ extern "C" { #define macro_f_string_triples_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_string_triples_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_string_triples_t_clear(triples) \ + #define macro_f_string_triples_t_clear(triples) { \ triples.array = 0; \ triples.used = 0; \ - triples.size = 0; + triples.size = 0; \ + } #endif // _di_f_string_triples_t_ /** diff --git a/level_0/f_string/c/string/tripless.h b/level_0/f_string/c/string/tripless.h index 4939b32..bb2243a 100644 --- a/level_0/f_string/c/string/tripless.h +++ b/level_0/f_string/c/string/tripless.h @@ -37,10 +37,11 @@ extern "C" { #define macro_f_string_tripless_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_string_tripless_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_string_tripless_t_clear(tripless) \ + #define macro_f_string_tripless_t_clear(tripless) { \ tripless.array = 0; \ tripless.used = 0; \ - tripless.size = 0; + tripless.size = 0; \ + } #endif // _di_f_string_tripless_t_ /** diff --git a/level_0/f_thread/c/thread/attributes.h b/level_0/f_thread/c/thread/attributes.h index b1a1e15..bf546f1 100644 --- a/level_0/f_thread/c/thread/attributes.h +++ b/level_0/f_thread/c/thread/attributes.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_attributes_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_attributes_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_attributes_t_clear(thread_attributes) { \ + thread_attributes.array = 0; \ + thread_attributes.used = 0; \ + thread_attributes.size = 0; \ + } #endif // _di_f_thread_attributes_t_ /** diff --git a/level_0/f_thread/c/thread/attributess.h b/level_0/f_thread/c/thread/attributess.h index 8f4b09a..8d6873e 100644 --- a/level_0/f_thread/c/thread/attributess.h +++ b/level_0/f_thread/c/thread/attributess.h @@ -17,7 +17,7 @@ extern "C" { #endif /** - * An array of an array of f_thread_attributes_t. + * An array of an array of f_thread_attribute_t. * * Properties: * - array: The array of f_thread_attributes_t. @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_attributess_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_attributess_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_attributess_t_clear(thread_attributess) { \ + thread_attributess.array = 0; \ + thread_attributess.used = 0; \ + thread_attributess.size = 0; \ + } #endif // _di_f_thread_attributess_t_ /** diff --git a/level_0/f_thread/c/thread/barrier_attribute.h b/level_0/f_thread/c/thread/barrier_attribute.h index 64b2fa8..b259225 100644 --- a/level_0/f_thread/c/thread/barrier_attribute.h +++ b/level_0/f_thread/c/thread/barrier_attribute.h @@ -18,6 +18,8 @@ extern "C" { /** * A typedef representing pthread_barrierattr_t. + * + * This does not provide a clear macro because pthread_cond_t requires special functions to perform a clear. */ #ifndef _di_f_thread_barrier_attribute_t_ typedef pthread_barrierattr_t f_thread_barrier_attribute_t; diff --git a/level_0/f_thread/c/thread/barrier_attributes.h b/level_0/f_thread/c/thread/barrier_attributes.h index 6dcc820..81e3ec8 100644 --- a/level_0/f_thread/c/thread/barrier_attributes.h +++ b/level_0/f_thread/c/thread/barrier_attributes.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_barrier_attributes_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_barrier_attributes_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_barrier_attributes_t_clear(thread_barrier_attributes) { \ + thread_barrier_attributes.array = 0; \ + thread_barrier_attributes.used = 0; \ + thread_barrier_attributes.size = 0; \ + } #endif // _di_f_thread_barrier_attributes_t_ /** diff --git a/level_0/f_thread/c/thread/barrier_attributess.h b/level_0/f_thread/c/thread/barrier_attributess.h index 47c265e..32fa6a8 100644 --- a/level_0/f_thread/c/thread/barrier_attributess.h +++ b/level_0/f_thread/c/thread/barrier_attributess.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_barrier_attributess_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_barrier_attributess_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_barrier_attributess_t_clear(thread_barrier_attributess) { \ + thread_barrier_attributess.array = 0; \ + thread_barrier_attributess.used = 0; \ + thread_barrier_attributess.size = 0; \ + } #endif // _di_f_thread_barrier_attributess_t_ /** diff --git a/level_0/f_thread/c/thread/barrier_full.h b/level_0/f_thread/c/thread/barrier_full.h index b7c6b8a..46abbd5 100644 --- a/level_0/f_thread/c/thread/barrier_full.h +++ b/level_0/f_thread/c/thread/barrier_full.h @@ -20,7 +20,7 @@ extern "C" { * A structure of the barrier and its associated attribute. * * Properties: - * - barrier: The barrier. + * - barrier: The barrier (cannot be cleared using the clear macro). * - attribute: The associated attribute. */ #ifndef _di_f_thread_barrier_full_t_ @@ -32,6 +32,10 @@ extern "C" { #define f_thread_barrier_full_t_initialize { f_thread_barrier_t_initialize, f_thread_barrier_attribute_t_initialize } #define macro_f_thread_barrier_full_t_initialize_1(barrier, attribute) { barrier, attribute } + + #define macro_f_thread_barrier_full_t_clear(thread_barrier_full) { \ + macro_f_thread_barrier_attribute_t_clear(thread_barrier_full.attribute) \ + } #endif // _di_f_thread_barrier_full_t_ /** diff --git a/level_0/f_thread/c/thread/barrier_fulls.h b/level_0/f_thread/c/thread/barrier_fulls.h index 1fdf445..0580947 100644 --- a/level_0/f_thread/c/thread/barrier_fulls.h +++ b/level_0/f_thread/c/thread/barrier_fulls.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_barrier_fulls_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_barrier_fulls_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_barrier_fulls_t_clear(thread_barrier_fulls) { \ + thread_barrier_fulls.array = 0; \ + thread_barrier_fulls.used = 0; \ + thread_barrier_fulls.size = 0; \ + } #endif // _di_f_thread_barrier_fulls_t_ /** diff --git a/level_0/f_thread/c/thread/barrier_fullss.h b/level_0/f_thread/c/thread/barrier_fullss.h index 3a94ad3..0dfb573 100644 --- a/level_0/f_thread/c/thread/barrier_fullss.h +++ b/level_0/f_thread/c/thread/barrier_fullss.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_barrier_fullss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_barrier_fullss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_barrier_fullss_t_clear(thread_barrier_fullss) { \ + thread_barrier_fullss.array = 0; \ + thread_barrier_fullss.used = 0; \ + thread_barrier_fullss.size = 0; \ + } #endif // _di_f_thread_barrier_fullss_t_ /** diff --git a/level_0/f_thread/c/thread/barriers.h b/level_0/f_thread/c/thread/barriers.h index 56e3352..524c07a 100644 --- a/level_0/f_thread/c/thread/barriers.h +++ b/level_0/f_thread/c/thread/barriers.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_barriers_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_barriers_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_barriers_t_clear(thread_barriers) { \ + thread_barriers.array = 0; \ + thread_barriers.used = 0; \ + thread_barriers.size = 0; \ + } #endif // _di_f_thread_barriers_t_ /** * A callback intended to be passed to f_memory_arrays_resize() for an f_thread_barriers_t structure. diff --git a/level_0/f_thread/c/thread/condition.h b/level_0/f_thread/c/thread/condition.h index 97dd288..94eb4a3 100644 --- a/level_0/f_thread/c/thread/condition.h +++ b/level_0/f_thread/c/thread/condition.h @@ -21,6 +21,8 @@ extern "C" { * * This must be dynamically initialized using f_thread_condition_create(). * In some cases, they can be utilized statically, in which case only f_thread_condition_t_initialize is needed. + * + * This does not provide a clear maco because pthread_cond_t requires special functions to perform a clear. */ #ifndef _di_f_thread_condition_t_ typedef pthread_cond_t f_thread_condition_t; diff --git a/level_0/f_thread/c/thread/condition_attributes.h b/level_0/f_thread/c/thread/condition_attributes.h index 1d4a9f2..d3b5fec 100644 --- a/level_0/f_thread/c/thread/condition_attributes.h +++ b/level_0/f_thread/c/thread/condition_attributes.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_condition_attributes_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_condition_attributes_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_condition_attributes_t_clear(thread_condition_attributes) { \ + thread_condition_attributes.array = 0; \ + thread_condition_attributes.used = 0; \ + thread_condition_attributes.size = 0; \ + } #endif // _di_f_thread_condition_attributes_t_ /** diff --git a/level_0/f_thread/c/thread/condition_attributess.h b/level_0/f_thread/c/thread/condition_attributess.h index aff8a97..c3d5766 100644 --- a/level_0/f_thread/c/thread/condition_attributess.h +++ b/level_0/f_thread/c/thread/condition_attributess.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_condition_attributess_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_condition_attributess_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_condition_attributess_t_clear(thread_condition_attributess) { \ + thread_condition_attributess.array = 0; \ + thread_condition_attributess.used = 0; \ + thread_condition_attributess.size = 0; \ + } #endif // _di_f_thread_condition_attributess_t_ /** diff --git a/level_0/f_thread/c/thread/condition_full.h b/level_0/f_thread/c/thread/condition_full.h index 8316720..0a0921f 100644 --- a/level_0/f_thread/c/thread/condition_full.h +++ b/level_0/f_thread/c/thread/condition_full.h @@ -20,7 +20,7 @@ extern "C" { * A structure of the condition and its associated attribute. * * Properties: - * - condition: The condition. + * - condition: The condition (cannot be cleared using the clear macro). * - attribute: The associated attribute. */ #ifndef _di_f_thread_condition_full_t_ @@ -32,6 +32,10 @@ extern "C" { #define f_thread_condition_full_t_initialize { f_thread_condition_t_initialize, f_thread_condition_attribute_t_initialize } #define macro_f_thread_condition_full_t_initialize_1(condition, attribute) { condition, attribute } + + #define macro_f_thread_condition_full_t_clear(thread_condition_full) { \ + macro_f_thread_condition_attribute_t_clear(thread_condition_full.condition_attribute) \ + } #endif // _di_f_thread_condition_full_t_ /** diff --git a/level_0/f_thread/c/thread/condition_fulls.h b/level_0/f_thread/c/thread/condition_fulls.h index 5d78e91..39853c2 100644 --- a/level_0/f_thread/c/thread/condition_fulls.h +++ b/level_0/f_thread/c/thread/condition_fulls.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_condition_fulls_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_condition_fulls_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_condition_fulls_t_clear(thread_condition_fulls) { \ + thread_condition_fulls.array = 0; \ + thread_condition_fulls.used = 0; \ + thread_condition_fulls.size = 0; \ + } #endif // _di_f_thread_condition_fulls_t_ /** diff --git a/level_0/f_thread/c/thread/condition_fullss.h b/level_0/f_thread/c/thread/condition_fullss.h index 7493c6e..4dae034 100644 --- a/level_0/f_thread/c/thread/condition_fullss.h +++ b/level_0/f_thread/c/thread/condition_fullss.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_condition_fullss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_condition_fullss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_condition_fullss_t_clear(thread_condition_fullss) { \ + thread_condition_fullss.array = 0; \ + thread_condition_fullss.used = 0; \ + thread_condition_fullss.size = 0; \ + } #endif // _di_f_thread_condition_fullss_t_ /** diff --git a/level_0/f_thread/c/thread/conditions.h b/level_0/f_thread/c/thread/conditions.h index f044ef7..2d265d9 100644 --- a/level_0/f_thread/c/thread/conditions.h +++ b/level_0/f_thread/c/thread/conditions.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_conditions_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_conditions_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_conditions_t_clear(thread_conditions) { \ + thread_conditions.array = 0; \ + thread_conditions.used = 0; \ + thread_conditions.size = 0; \ + } #endif // _di_f_thread_conditions_t_ /** diff --git a/level_0/f_thread/c/thread/conditionss.h b/level_0/f_thread/c/thread/conditionss.h index 6abbd80..85f2882 100644 --- a/level_0/f_thread/c/thread/conditionss.h +++ b/level_0/f_thread/c/thread/conditionss.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_conditionss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_conditionss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_conditionss_t_clear(thread_conditionss) { \ + thread_conditionss.array = 0; \ + thread_conditionss.used = 0; \ + thread_conditionss.size = 0; \ + } #endif // _di_f_thread_conditionss_t_ /** diff --git a/level_0/f_thread/c/thread/ids.h b/level_0/f_thread/c/thread/ids.h index bb9de3f..76a2317 100644 --- a/level_0/f_thread/c/thread/ids.h +++ b/level_0/f_thread/c/thread/ids.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_ids_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_ids_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_ids_t_clear(thread_ids) { \ + thread_ids.array = 0; \ + thread_ids.used = 0; \ + thread_ids.size = 0; \ + } #endif // _di_f_thread_ids_t_ /** diff --git a/level_0/f_thread/c/thread/idss.h b/level_0/f_thread/c/thread/idss.h index d87afdf..ae46e47 100644 --- a/level_0/f_thread/c/thread/idss.h +++ b/level_0/f_thread/c/thread/idss.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_idss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_idss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_idss_t_clear(thread_idss) { \ + thread_idss.array = 0; \ + thread_idss.used = 0; \ + thread_idss.size = 0; \ + } #endif // _di_f_thread_idss_t_ /** diff --git a/level_0/f_thread/c/thread/keys.h b/level_0/f_thread/c/thread/keys.h index c63ef6d..7d79262 100644 --- a/level_0/f_thread/c/thread/keys.h +++ b/level_0/f_thread/c/thread/keys.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_keys_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_keys_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_keys_t_clear(thread_keys) { \ + thread_keys.array = 0; \ + thread_keys.used = 0; \ + thread_keys.size = 0; \ + } #endif // _di_f_thread_keys_t_ /** diff --git a/level_0/f_thread/c/thread/keyss.h b/level_0/f_thread/c/thread/keyss.h index 0426c59..e7a8b1b 100644 --- a/level_0/f_thread/c/thread/keyss.h +++ b/level_0/f_thread/c/thread/keyss.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_keyss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_keyss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_keyss_t_clear(thread_keyss) { \ + thread_keyss.array = 0; \ + thread_keyss.used = 0; \ + thread_keyss.size = 0; \ + } #endif // _di_f_thread_keyss_t_ /** diff --git a/level_0/f_thread/c/thread/lock.h b/level_0/f_thread/c/thread/lock.h index c065192..85cc433 100644 --- a/level_0/f_thread/c/thread/lock.h +++ b/level_0/f_thread/c/thread/lock.h @@ -21,6 +21,8 @@ extern "C" { * * This must be dynamically initialized using f_thread_lock_create(). * In some cases, they can be utilized statically, in which case only f_thread_lock_t_initialize is needed. + * + * This does not provide a clear macro because pthread_rwlock_t requires special functions to perform a clear. */ #ifndef _di_f_thread_lock_t_ typedef pthread_rwlock_t f_thread_lock_t; diff --git a/level_0/f_thread/c/thread/lock_attributes.h b/level_0/f_thread/c/thread/lock_attributes.h index 19b8523..7b6daba 100644 --- a/level_0/f_thread/c/thread/lock_attributes.h +++ b/level_0/f_thread/c/thread/lock_attributes.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_lock_attributes_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_lock_attributes_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_lock_attributes_t_clear(lock_attributes) { \ + lock_attributes.array = 0; \ + lock_attributes.used = 0; \ + lock_attributes.size = 0; \ + } #endif // _di_f_thread_lock_attributes_t_ /** diff --git a/level_0/f_thread/c/thread/lock_attributess.h b/level_0/f_thread/c/thread/lock_attributess.h index 9c9e37b..649ea5f 100644 --- a/level_0/f_thread/c/thread/lock_attributess.h +++ b/level_0/f_thread/c/thread/lock_attributess.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_lock_attributess_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_lock_attributess_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_lock_attributess_t_clear(lock_attributess) { \ + lock_attributess.array = 0; \ + lock_attributess.used = 0; \ + lock_attributess.size = 0; \ + } #endif // _di_f_thread_lock_attributess_t_ /** diff --git a/level_0/f_thread/c/thread/lock_full.h b/level_0/f_thread/c/thread/lock_full.h index 77fcb77..f235965 100644 --- a/level_0/f_thread/c/thread/lock_full.h +++ b/level_0/f_thread/c/thread/lock_full.h @@ -20,7 +20,7 @@ extern "C" { * A structure of the lock and its associated attribute. * * Properties: - * - lock: The lock. + * - lock: The lock (cannot be cleared using the clear macro). * - attribute: The associated attribute. */ #ifndef _di_f_thread_lock_full_t_ @@ -32,6 +32,10 @@ extern "C" { #define f_thread_lock_full_t_initialize { f_thread_lock_t_initialize, f_thread_lock_attribute_t_initialize } #define macro_f_thread_lock_full_t_initialize_1(lock, attribute) { lock, attribute } + + #define macro_f_thread_lock_full_t_clear(thread_lock_full) { \ + macro_f_thread_lock_attribute_t_clear(thread_lock_full.attribute) \ + } #endif // _di_f_thread_lock_full_t_ /** diff --git a/level_0/f_thread/c/thread/lock_fulls.h b/level_0/f_thread/c/thread/lock_fulls.h index aea9057..27188bd 100644 --- a/level_0/f_thread/c/thread/lock_fulls.h +++ b/level_0/f_thread/c/thread/lock_fulls.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_lock_fulls_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_lock_fulls_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_lock_fulls_t_clear(thread_lock_fulls) { \ + thread_lock_fulls.array = 0; \ + thread_lock_fulls.used = 0; \ + thread_lock_fulls.size = 0; \ + } #endif // _di_f_thread_lock_fulls_t_ /** diff --git a/level_0/f_thread/c/thread/lock_fullss.h b/level_0/f_thread/c/thread/lock_fullss.h index 4b042df..2ec8d21 100644 --- a/level_0/f_thread/c/thread/lock_fullss.h +++ b/level_0/f_thread/c/thread/lock_fullss.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_lock_fullss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_lock_fullss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_lock_fullss_t_clear(thread_lock_fullss) { \ + thread_lock_fullss.array = 0; \ + thread_lock_fullss.used = 0; \ + thread_lock_fullss.size = 0; \ + } #endif // _di_f_thread_lock_fullss_t_ /** diff --git a/level_0/f_thread/c/thread/locks.h b/level_0/f_thread/c/thread/locks.h index 06661b0..7b9c31a 100644 --- a/level_0/f_thread/c/thread/locks.h +++ b/level_0/f_thread/c/thread/locks.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_locks_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_locks_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_locks_t_clear(thread_locks) { \ + thread_locks.array = 0; \ + thread_locks.used = 0; \ + thread_locks.size = 0; \ + } #endif // _di_f_thread_locks_t_ /** diff --git a/level_0/f_thread/c/thread/lockss.h b/level_0/f_thread/c/thread/lockss.h index f358ce2..812ed6f 100644 --- a/level_0/f_thread/c/thread/lockss.h +++ b/level_0/f_thread/c/thread/lockss.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_lockss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_lockss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_lockss_t_clear(thread_lockss) { \ + thread_lockss.array = 0; \ + thread_lockss.used = 0; \ + thread_lockss.size = 0; \ + } #endif // _di_f_thread_lockss_t_ /** diff --git a/level_0/f_thread/c/thread/mutex.h b/level_0/f_thread/c/thread/mutex.h index 0de9915..3155700 100644 --- a/level_0/f_thread/c/thread/mutex.h +++ b/level_0/f_thread/c/thread/mutex.h @@ -23,6 +23,8 @@ extern "C" { * * This must be dynamically initialized using f_thread_mutex_create(). * In some cases, they can be utilized statically, in which case only f_thread_mutex_t_initialize is needed. + * + * This does not provide a clear macro because pthread_mutex_t requires special functions to perform a clear. */ #ifndef _di_f_thread_mutex_t_ typedef pthread_mutex_t f_thread_mutex_t; diff --git a/level_0/f_thread/c/thread/mutex_attributes.h b/level_0/f_thread/c/thread/mutex_attributes.h index 1d64b03..c3d98e1 100644 --- a/level_0/f_thread/c/thread/mutex_attributes.h +++ b/level_0/f_thread/c/thread/mutex_attributes.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_mutex_attributes_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_mutex_attributes_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_mutex_attributes_t_clear(thread_mutex_attributes) { \ + thread_mutex_attributes.array = 0; \ + thread_mutex_attributes.used = 0; \ + thread_mutex_attributes.size = 0; \ + } #endif // _di_f_thread_mutex_attributes_t_ /** diff --git a/level_0/f_thread/c/thread/mutex_attributess.h b/level_0/f_thread/c/thread/mutex_attributess.h index 4c54cbb..32dea68 100644 --- a/level_0/f_thread/c/thread/mutex_attributess.h +++ b/level_0/f_thread/c/thread/mutex_attributess.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_mutex_attributess_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_mutex_attributess_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_mutex_attributess_t_clear(thread_mutex_attributess) { \ + thread_mutex_attributess.array = 0; \ + thread_mutex_attributess.used = 0; \ + thread_mutex_attributess.size = 0; \ + } #endif // _di_f_thread_mutex_attributess_t_ /** diff --git a/level_0/f_thread/c/thread/mutex_full.h b/level_0/f_thread/c/thread/mutex_full.h index 1ce6d96..a44ffc8 100644 --- a/level_0/f_thread/c/thread/mutex_full.h +++ b/level_0/f_thread/c/thread/mutex_full.h @@ -20,7 +20,7 @@ extern "C" { * A structure of the mutex and its associated attribute. * * Properties: - * - mutex: The mutex. + * - mutex: The mutex (cannot be cleared using the clear macro). * - attribute: The associated attribute. */ #ifndef _di_f_thread_mutex_full_t_ @@ -32,6 +32,10 @@ extern "C" { #define f_thread_mutex_full_t_initialize { f_thread_mutex_t_initialize, f_thread_mutex_attribute_t_initialize } #define macro_f_thread_mutex_full_t_initialize_1(mutex, attribute) { mutex, attribute } + + #define macro_f_thread_mutex_full_t_clear(thread_mutex_full) { \ + macro_f_thread_mutex_attribute_t_clear(thread_mutex_full.attribute)\ + } #endif // _di_f_thread_mutex_full_t_ /** diff --git a/level_0/f_thread/c/thread/mutex_fulls.h b/level_0/f_thread/c/thread/mutex_fulls.h index bb65388..533407e 100644 --- a/level_0/f_thread/c/thread/mutex_fulls.h +++ b/level_0/f_thread/c/thread/mutex_fulls.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_mutex_fulls_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_mutex_fulls_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_mutex_fulls_t_clear(thread_mutex_fulls) { \ + thread_mutex_fulls.array = 0; \ + thread_mutex_fulls.used = 0; \ + thread_mutex_fulls.size = 0; \ + } #endif // _di_f_thread_mutex_fulls_t_ /** diff --git a/level_0/f_thread/c/thread/mutex_fullss.h b/level_0/f_thread/c/thread/mutex_fullss.h index fc14447..d8e3c78 100644 --- a/level_0/f_thread/c/thread/mutex_fullss.h +++ b/level_0/f_thread/c/thread/mutex_fullss.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_mutex_fullss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_mutex_fullss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_mutex_fullss_t_clear(thread_mutex_fullss) { \ + thread_mutex_fullss.array = 0; \ + thread_mutex_fullss.used = 0; \ + thread_mutex_fullss.size = 0; \ + } #endif // _di_f_thread_mutex_fullss_t_ /** diff --git a/level_0/f_thread/c/thread/mutexs.h b/level_0/f_thread/c/thread/mutexs.h index 3cbd917..6a3954f 100644 --- a/level_0/f_thread/c/thread/mutexs.h +++ b/level_0/f_thread/c/thread/mutexs.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_mutexs_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_mutexs_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_mutexs_t_clear(thread_mutexs) { \ + thread_mutexs.array = 0; \ + thread_mutexs.used = 0; \ + thread_mutexs.size = 0; \ + } #endif // _di_f_thread_mutexs_t_ /** diff --git a/level_0/f_thread/c/thread/mutexss.h b/level_0/f_thread/c/thread/mutexss.h index 695361a..635f850 100644 --- a/level_0/f_thread/c/thread/mutexss.h +++ b/level_0/f_thread/c/thread/mutexss.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_mutexss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_mutexss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_mutexss_t_clear(thread_mutexss) { \ + thread_mutexss.array = 0; \ + thread_mutexss.used = 0; \ + thread_mutexss.size = 0; \ + } #endif // _di_f_thread_mutexss_t_ /** diff --git a/level_0/f_thread/c/thread/onces.h b/level_0/f_thread/c/thread/onces.h index 4c10836..958e5de 100644 --- a/level_0/f_thread/c/thread/onces.h +++ b/level_0/f_thread/c/thread/onces.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_onces_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_onces_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_onces_t_clear(thread_onces) { \ + thread_onces.array = 0; \ + thread_onces.used = 0; \ + thread_onces.size = 0; \ + } #endif // _di_f_thread_onces_t_ // @todo add delete & destroy callbacks. diff --git a/level_0/f_thread/c/thread/oncess.h b/level_0/f_thread/c/thread/oncess.h index f273f59..47700aa 100644 --- a/level_0/f_thread/c/thread/oncess.h +++ b/level_0/f_thread/c/thread/oncess.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_oncess_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_oncess_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_oncess_t_clear(thread_oncess) { \ + thread_oncess.array = 0; \ + thread_oncess.used = 0; \ + thread_oncess.size = 0; \ + } #endif // _di_f_thread_oncess_t_ // @todo add delete & destroy callbacks. diff --git a/level_0/f_thread/c/thread/semaphores.h b/level_0/f_thread/c/thread/semaphores.h index addd33f..cc54e76 100644 --- a/level_0/f_thread/c/thread/semaphores.h +++ b/level_0/f_thread/c/thread/semaphores.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_semaphores_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_semaphores_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_semaphores_t_clear(thread_semaphores) { \ + thread_semaphores.array = 0; \ + thread_semaphores.used = 0; \ + thread_semaphores.size = 0; \ + } #endif // _di_f_thread_semaphores_t_ /** diff --git a/level_0/f_thread/c/thread/semaphoress.h b/level_0/f_thread/c/thread/semaphoress.h index e2db789..ce6a1b1 100644 --- a/level_0/f_thread/c/thread/semaphoress.h +++ b/level_0/f_thread/c/thread/semaphoress.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_semaphoress_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_semaphoress_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_semaphoress_t_clear(thread_semaphoress) { \ + thread_semaphoress.array = 0; \ + thread_semaphoress.used = 0; \ + thread_semaphoress.size = 0; \ + } #endif // _di_f_thread_semaphoress_t_ /** diff --git a/level_0/f_thread/c/thread/spins.h b/level_0/f_thread/c/thread/spins.h index cca0b60..1b7c362 100644 --- a/level_0/f_thread/c/thread/spins.h +++ b/level_0/f_thread/c/thread/spins.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_spins_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_spins_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_spins_t_clear(thread_spins) { \ + thread_spins.array = 0; \ + thread_spins.used = 0; \ + thread_spins.size = 0; \ + } #endif // _di_f_thread_spins_t_ /** diff --git a/level_0/f_thread/c/thread/spinss.h b/level_0/f_thread/c/thread/spinss.h index e09559b..c2e3c7d 100644 --- a/level_0/f_thread/c/thread/spinss.h +++ b/level_0/f_thread/c/thread/spinss.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_thread_spinss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_thread_spinss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_thread_spinss_t_clear(thread_spinss) { \ + thread_spinss.array = 0; \ + thread_spinss.used = 0; \ + thread_spinss.size = 0; \ + } #endif // _di_f_thread_spinss_t_ /** diff --git a/level_0/f_type/c/type/cell.h b/level_0/f_type/c/type/cell.h index ff75513..ef8f6e5 100644 --- a/level_0/f_type/c/type/cell.h +++ b/level_0/f_type/c/type/cell.h @@ -32,6 +32,11 @@ extern "C" { #define f_cell_t_initialize { 0, 0 } #define macro_f_cell_t_initialize_1(row, column) { row, column } + + #define macro_f_cell_t_clear(cell) { \ + cell.row = 0; \ + cell.column = 0; \ + } #endif // _di_f_cell_t_ /** @@ -56,6 +61,12 @@ extern "C" { #define macro_f_cells_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_cells_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_cells_t_clear(cells) { \ + cells.array = 0; \ + cells.used = 0; \ + cells.size = 0; \ + } #endif // _di_f_cells_t_ /** @@ -80,6 +91,12 @@ extern "C" { #define macro_f_cellss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_cellss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_cellss_t_clear(cellss) { \ + cellss.array = 0; \ + cellss.used = 0; \ + cellss.size = 0; \ + } #endif // _di_f_cellss_t_ #ifdef __cplusplus diff --git a/level_0/f_type/c/type/file.h b/level_0/f_type/c/type/file.h index d7f8f99..27b72df 100644 --- a/level_0/f_type/c/type/file.h +++ b/level_0/f_type/c/type/file.h @@ -172,19 +172,21 @@ extern "C" { #define macro_f_file_t_initialize_id(id) { 0, id, O_RDONLY, F_file_default_size_read_d, F_file_default_size_write_d } #define macro_f_file_t_initialize_stream(stream) { stream, -1, O_RDONLY, F_file_default_size_read_d, F_file_default_size_write_d } - #define macro_f_file_t_clear(file) \ + #define macro_f_file_t_clear(file) { \ file.stream = 0; \ file.id = -1; \ file.flag = 0; \ file.size_read = 0; \ - file.size_write = 0; + file.size_write = 0; \ + } - #define macro_f_file_t_reset(file) \ + #define macro_f_file_t_reset(file) { \ file.stream = 0; \ file.id = -1; \ file.flag = F_file_flag_read_only_d; \ file.size_read = F_file_default_size_read_d; \ - file.size_write = F_file_default_size_write_d; + file.size_write = F_file_default_size_write_d; \ + } #endif // _di_f_file_t_ /** @@ -209,6 +211,12 @@ extern "C" { #define macro_f_files_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_files_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_files_t_clear(files) { \ + files.array = 0; \ + files.used = 0; \ + files.size = 0; \ + } #endif // _di_f_files_t_ /** @@ -233,6 +241,12 @@ extern "C" { #define macro_f_filess_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_filess_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_filess_t_clear(filess) { \ + filess.array = 0; \ + filess.used = 0; \ + filess.size = 0; \ + } #endif // _di_f_filess_t_ /** @@ -285,12 +299,18 @@ extern "C" { #ifndef _di_f_poll_t_ typedef struct pollfd f_poll_t; - #define f_poll_t_initialize { 0 } + #define f_poll_t_initialize { .fd = -1, .events = 0, .revents = 0 } #define macro_f_poll_t_initialize_1(fd, events, revents) { fd, events, revents } #define macro_f_poll_t_initialize_2(fd, events) { fd, events, 0 } #define macro_f_poll_t_initialize_3(fd) { fd, 0, 0 } #define macro_f_poll_t_initialize_4(events) { 0, events, 0 } + + #define macro_f_poll_t_clear(files) { \ + files.fd = -1; \ + files.events = 0; \ + files.revents = 0; \ + } #endif // _di_f_poll_t_ /** @@ -319,6 +339,12 @@ extern "C" { #define macro_f_polls_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_polls_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_polls_t_clear(polls) { \ + polls.array = 0; \ + polls.used = 0; \ + polls.size = 0; \ + } #endif // _di_f_polls_t_ /** @@ -343,6 +369,12 @@ extern "C" { #define macro_f_pollss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_pollss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_pollss_t_clear(pollss) { \ + pollss.array = 0; \ + pollss.used = 0; \ + pollss.size = 0; \ + } #endif // _di_f_pollss_t_ #ifdef __cplusplus diff --git a/level_0/f_type/c/type/fll.h b/level_0/f_type/c/type/fll.h index 646b780..25dab93 100644 --- a/level_0/f_type/c/type/fll.h +++ b/level_0/f_type/c/type/fll.h @@ -62,6 +62,75 @@ extern "C" { } #define macro_f_fll_id_t_initialize_1(name, type, used) { name, type, used } + + #define macro_f_fll_id_t_clear(states) { \ + states.name[0] = 0; \ + states.name[1] = 0; \ + states.name[2] = 0; \ + states.name[3] = 0; \ + states.name[4] = 0; \ + states.name[5] = 0; \ + states.name[6] = 0; \ + states.name[7] = 0; \ + states.name[8] = 0; \ + states.name[9] = 0; \ + states.name[0] = 0; \ + states.name[11] = 0; \ + states.name[12] = 0; \ + states.name[13] = 0; \ + states.name[14] = 0; \ + states.name[15] = 0; \ + states.name[16] = 0; \ + states.name[17] = 0; \ + states.name[18] = 0; \ + states.name[19] = 0; \ + states.name[20] = 0; \ + states.name[21] = 0; \ + states.name[22] = 0; \ + states.name[23] = 0; \ + states.name[24] = 0; \ + states.name[25] = 0; \ + states.name[26] = 0; \ + states.name[27] = 0; \ + states.name[28] = 0; \ + states.name[29] = 0; \ + states.name[30] = 0; \ + states.name[31] = 0; \ + states.name[32] = 0; \ + states.name[33] = 0; \ + states.name[34] = 0; \ + states.name[35] = 0; \ + states.name[36] = 0; \ + states.name[37] = 0; \ + states.name[38] = 0; \ + states.name[39] = 0; \ + states.name[40] = 0; \ + states.name[41] = 0; \ + states.name[42] = 0; \ + states.name[43] = 0; \ + states.name[44] = 0; \ + states.name[45] = 0; \ + states.name[46] = 0; \ + states.name[47] = 0; \ + states.name[48] = 0; \ + states.name[49] = 0; \ + states.name[50] = 0; \ + states.name[51] = 0; \ + states.name[52] = 0; \ + states.name[53] = 0; \ + states.name[54] = 0; \ + states.name[55] = 0; \ + states.name[56] = 0; \ + states.name[57] = 0; \ + states.name[58] = 0; \ + states.name[59] = 0; \ + states.name[60] = 0; \ + states.name[61] = 0; \ + states.name[62] = 0; \ + states.name[63] = 0; \ + states.type = 0; \ + states.used = 0; \ + } #endif // _di_f_fll_id_t_ /** @@ -86,6 +155,12 @@ extern "C" { #define macro_f_fll_ids_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_fll_ids_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_fll_ids_t_clear(fll_ids) { \ + fll_ids.array = 0; \ + fll_ids.used = 0; \ + fll_ids.size = 0; \ + } #endif // _di_f_fll_ids_t_ /** @@ -110,6 +185,12 @@ extern "C" { #define macro_f_fll_idss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_fll_idss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_fll_idss_t_clear(fll_idss) { \ + fll_idss.array = 0; \ + fll_idss.used = 0; \ + fll_idss.size = 0; \ + } #endif // _di_f_fll_idss_t_ #ifdef __cplusplus diff --git a/level_0/f_type/c/type/mode.h b/level_0/f_type/c/type/mode.h index eb89f2b..5b0839e 100644 --- a/level_0/f_type/c/type/mode.h +++ b/level_0/f_type/c/type/mode.h @@ -93,6 +93,17 @@ extern "C" { mode.fifo = value_fifo; \ mode.socket = value_socket; \ mode.unknown = value_unknown; + + #define macro_f_mode_t_clear(mode) { \ + mode.block = 0; \ + mode.character = 0; \ + mode.directory = 0; \ + mode.fifo = 0; \ + mode.regular = 0; \ + mode.link = 0; \ + mode.socket = 0; \ + mode.unknown = 0; \ + } #endif // _di_f_mode_t_ #ifdef __cplusplus diff --git a/level_0/f_type/c/type/number.h b/level_0/f_type/c/type/number.h index c29d232..286a181 100644 --- a/level_0/f_type/c/type/number.h +++ b/level_0/f_type/c/type/number.h @@ -201,6 +201,12 @@ extern "C" { #define macro_f_number_signeds_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_number_signeds_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_number_signeds_t_clear(number_signeds) { \ + number_signeds.array = 0; \ + number_signeds.used = 0; \ + number_signeds.size = 0; \ + } #endif // _di_f_number_signeds_t_ /** @@ -225,6 +231,12 @@ extern "C" { #define macro_f_number_signedss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_number_signedss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_number_signedss_t_clear(number_signedss) { \ + number_signedss.array = 0; \ + number_signedss.used = 0; \ + number_signedss.size = 0; \ + } #endif // _di_f_number_signedss_t_ /** @@ -249,6 +261,12 @@ extern "C" { #define macro_f_number_unsigneds_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_number_unsigneds_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_number_unsigneds_t_clear(number_unsigneds) { \ + number_unsigneds.array = 0; \ + number_unsigneds.used = 0; \ + number_unsigneds.size = 0; \ + } #endif // _di_f_number_unsigneds_t_ /** @@ -273,6 +291,12 @@ extern "C" { #define macro_f_number_unsignedss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_number_unsignedss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_number_unsignedss_t_clear(number_unsignedss) { \ + number_unsignedss.array = 0; \ + number_unsignedss.used = 0; \ + number_unsignedss.size = 0; \ + } #endif // _di_f_number_unsignedss_t_ /** @@ -297,6 +321,12 @@ extern "C" { #define macro_f_int8s_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_int8s_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_int8s_t_clear(int8s) { \ + int8s.array = 0; \ + int8s.used = 0; \ + int8s.size = 0; \ + } #endif // _di_f_int8s_t_ /** @@ -321,6 +351,12 @@ extern "C" { #define macro_f_int8ss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_int8ss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_int8ss_t_clear(int8ss) { \ + int8ss.array = 0; \ + int8ss.used = 0; \ + int8ss.size = 0; \ + } #endif // _di_f_int8ss_t_ /** @@ -345,6 +381,12 @@ extern "C" { #define macro_f_uint8s_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_uint8s_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_uint8s_t_clear(uint8s) { \ + uint8s.array = 0; \ + uint8s.used = 0; \ + uint8s.size = 0; \ + } #endif // _di_f_uint8s_t_ /** @@ -369,6 +411,12 @@ extern "C" { #define macro_f_uint8ss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_uint8ss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_uint8ss_t_clear(uint8ss) { \ + uint8ss.array = 0; \ + uint8ss.used = 0; \ + uint8ss.size = 0; \ + } #endif // _di_f_uint8ss_t_ /** @@ -393,6 +441,12 @@ extern "C" { #define macro_f_int16s_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_int16s_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_int16s_t_clear(int16s) { \ + int16s.array = 0; \ + int16s.used = 0; \ + int16s.size = 0; \ + } #endif // _di_f_int16s_t_ /** @@ -417,6 +471,12 @@ extern "C" { #define macro_f_int16ss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_int16ss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_int16ss_t_clear(int16ss) { \ + int16ss.array = 0; \ + int16ss.used = 0; \ + int16ss.size = 0; \ + } #endif // _di_f_int16ss_t_ /** @@ -441,6 +501,12 @@ extern "C" { #define macro_f_uint16s_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_uint16s_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_uint16s_t_clear(uint16s) { \ + uint16s.array = 0; \ + uint16s.used = 0; \ + uint16s.size = 0; \ + } #endif // _di_f_uint16s_t_ /** @@ -465,6 +531,12 @@ extern "C" { #define macro_f_uint16s_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_uint16s_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_uint16ss_t_clear(uint16ss) { \ + uint16ss.array = 0; \ + uint16ss.used = 0; \ + uint16ss.size = 0; \ + } #endif // _di_f_uint16ss_t_ /** @@ -489,6 +561,12 @@ extern "C" { #define macro_f_int32s_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_int32s_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_int32s_t_clear(int32s) { \ + int32s.array = 0; \ + int32s.used = 0; \ + int32s.size = 0; \ + } #endif // _di_f_int32s_t_ /** @@ -513,6 +591,12 @@ extern "C" { #define macro_f_int32ss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_int32ss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_int32ss_t_clear(int32ss) { \ + int32ss.array = 0; \ + int32ss.used = 0; \ + int32ss.size = 0; \ + } #endif // _di_f_int32ss_t_ /** @@ -537,6 +621,12 @@ extern "C" { #define macro_f_uint32s_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_uint32s_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_uint32s_t_clear(uint32s) { \ + uint32s.array = 0; \ + uint32s.used = 0; \ + uint32s.size = 0; \ + } #endif // _di_f_uint32s_t_ /** @@ -561,6 +651,12 @@ extern "C" { #define macro_f_uint32ss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_uint32ss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_uint32ss_t_clear(uint32ss) { \ + uint32ss.array = 0; \ + uint32ss.used = 0; \ + uint32ss.size = 0; \ + } #endif // _di_f_uint32ss_t_ /** @@ -585,6 +681,12 @@ extern "C" { #define macro_f_int64s_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_int64s_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_int64s_t_clear(int64s) { \ + int64s.array = 0; \ + int64s.used = 0; \ + int64s.size = 0; \ + } #endif // _di_f_int64s_t_ /** @@ -609,6 +711,12 @@ extern "C" { #define macro_f_int64ss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_int64ss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_int64ss_t_clear(int64ss) { \ + int64ss.array = 0; \ + int64ss.used = 0; \ + int64ss.size = 0; \ + } #endif // _di_f_int64ss_t_ /** @@ -633,6 +741,12 @@ extern "C" { #define macro_f_uint64s_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_uint64s_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_uint64s_t_clear(uint64s) { \ + uint64s.array = 0; \ + uint64s.used = 0; \ + uint64s.size = 0; \ + } #endif // _di_f_uint64s_t_ /** @@ -657,6 +771,12 @@ extern "C" { #define macro_f_uint64ss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_uint64ss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_uint64ss_t_clear(int64s) { \ + uint64ss.array = 0; \ + uint64ss.used = 0; \ + uint64ss.size = 0; \ + } #endif // _di_f_uint64ss_t_ /** @@ -681,6 +801,12 @@ extern "C" { #define macro_f_int128s_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_int128s_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_int128s_t_clear(int128s) { \ + int128s.array = 0; \ + int128s.used = 0; \ + int128s.size = 0; \ + } #endif // _di_f_int128s_t_ /** @@ -705,6 +831,12 @@ extern "C" { #define macro_f_int128ss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_int128ss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_int128ss_t_clear(int128ss) { \ + int128ss.array = 0; \ + int128ss.used = 0; \ + int128ss.size = 0; \ + } #endif // _di_f_int128ss_t_ /** @@ -729,6 +861,12 @@ extern "C" { #define macro_f_uint128s_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_uint128s_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_uint128s_t_clear(uint128s) { \ + uint128s.array = 0; \ + uint128s.used = 0; \ + uint128s.size = 0; \ + } #endif // _di_f_uint128s_t_ /** @@ -753,6 +891,12 @@ extern "C" { #define macro_f_uint128ss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_uint128ss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_uint128ss_t_clear(uint128ss) { \ + uint128ss.array = 0; \ + uint128ss.used = 0; \ + uint128ss.size = 0; \ + } #endif // _di_f_uint128ss_t_ /** @@ -785,7 +929,7 @@ extern "C" { #define f_id_t_initialize -1 - #define macro_f_id_t_clear(id) id = -1; + #define macro_f_id_t_clear(id) { id = -1; } /** * The f_gid_t type, see f_id_t documentation. @@ -795,7 +939,7 @@ extern "C" { #define f_gid_t_initialize -1 - #define macro_f_gid_t_clear(id) id = -1; + #define macro_f_gid_t_clear(id) { id = -1; } #endif // _di_f_gid_t_ /** @@ -806,7 +950,7 @@ extern "C" { #define f_uid_t_initialize -1 - #define macro_f_uid_t_clear(id) id = -1; + #define macro_f_uid_t_clear(id) { id = -1; } #endif // _di_f_uid_t_ #endif // _di_f_id_t_ @@ -823,6 +967,8 @@ extern "C" { #define macro_f_ids_t_initialize_1(array, used, size) macro_f_uint32s_t_initialize_1(array, used, size) #define macro_f_ids_t_initialize_2(array, length) macro_f_uint32s_t_initialize_2(array, length) + #define macro_f_ids_t_clear(ids) macro_f_uint32s_t_clear(ids) + /** * The f_gids_t type, see f_ids_t documentation. */ @@ -833,6 +979,8 @@ extern "C" { #define macro_f_gids_t_initialize_1(array, used, size) macro_f_ids_t_initialize_1(array, used, size) #define macro_f_gids_t_initialize_2(array, length) macro_f_ids_t_initialize_2(array, length) + + #define macro_f_gids_t_clear(gids) macro_f_ids_t_clear(gids) #endif // _di_f_gids_t_ /** @@ -845,6 +993,8 @@ extern "C" { #define macro_f_uids_t_initialize_1(array, used, size) macro_f_ids_t_initialize_1(array, used, size) #define macro_f_uids_t_initialize_2(array, length) macro_f_ids_t_initialize_2(array, length) + + #define macro_f_uids_t_clear(uids) macro_f_ids_t_clear(uids) #endif // _di_f_uids_t_ #endif // _di_f_ids_t_ @@ -861,6 +1011,8 @@ extern "C" { #define macro_f_idss_t_initialize_1(array, used, size) macro_f_uint32ss_t_initialize_1(array, used, size) #define macro_f_idss_t_initialize_2(array, length) macro_f_uint32ss_t_initialize_2(array, length) + #define macro_f_idss_t_clear(idss) macro_f_uint32ss_t_clear(idss) + /** * The f_gidss_t type, see f_idss_t documentation. */ @@ -871,6 +1023,8 @@ extern "C" { #define macro_f_gidss_t_initialize_1(array, used, size) macro_f_idss_t_initialize_1(array, used, size) #define macro_f_gidss_t_initialize_2(array, length) macro_f_idss_t_initialize_2(array, length) + + #define macro_f_gidss_t_clear(gidss) macro_f_idss_t_clear(gidss) #endif // _di_f_gids_t_ /** @@ -883,6 +1037,8 @@ extern "C" { #define macro_f_uidss_t_initialize_1(array, used, size) macro_f_idss_t_initialize_1(array, used, size) #define macro_f_uidss_t_initialize_2(array, length) macro_f_idss_t_initialize_2(array, length) + + #define macro_f_uidss_t_clear(gidss) macro_f_idss_t_clear(uidss) #endif // _di_f_uidss_t_ #endif // _di_f_idss_t_ diff --git a/level_0/f_type/c/type/pid.h b/level_0/f_type/c/type/pid.h index ee4c836..d888f0b 100644 --- a/level_0/f_type/c/type/pid.h +++ b/level_0/f_type/c/type/pid.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_pids_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_pids_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_pids_t_clear(pids) { \ + pids.array = 0; \ + pids.used = 0; \ + pids.size = 0; \ + } #endif // _di_f_pids_t_ /** @@ -58,6 +64,12 @@ extern "C" { #define macro_f_pidss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_pidss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_pidss_t_clear(pidss) { \ + pidss.array = 0; \ + pidss.used = 0; \ + pidss.size = 0; \ + } #endif // _di_f_pidss_t_ #ifdef __cplusplus diff --git a/level_0/f_type/c/type/quantity.h b/level_0/f_type/c/type/quantity.h index 7712220..43e6bf0 100644 --- a/level_0/f_type/c/type/quantity.h +++ b/level_0/f_type/c/type/quantity.h @@ -38,6 +38,11 @@ extern "C" { #define f_quantity_t_initialize { 0, 0 } #define macro_f_quantity_t_initialize_1(start, total) { start, total } + + #define macro_f_quantity_t_clear(quantity) { \ + quantity.start = 0; \ + quantity.total = 0; \ + } #endif // _di_f_quantity_t_ /** @@ -60,6 +65,12 @@ extern "C" { #define macro_f_quantitys_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_quantitys_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_quantitys_t_clear(quantitys) { \ + quantitys.array = 0; \ + quantitys.used = 0; \ + quantitys.size = 0; \ + } #endif // _di_f_quantitys_t_ /** @@ -82,6 +93,12 @@ extern "C" { #define macro_f_quantityss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_quantityss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_quantityss_t_clear(quantityss) { \ + quantityss.array = 0; \ + quantityss.used = 0; \ + quantityss.size = 0; \ + } #endif // _di_f_quantityss_t_ #ifdef __cplusplus diff --git a/level_0/f_type/c/type/range.h b/level_0/f_type/c/type/range.h index 70d7d74..662aec7 100644 --- a/level_0/f_type/c/type/range.h +++ b/level_0/f_type/c/type/range.h @@ -37,6 +37,11 @@ extern "C" { #define macro_f_range_t_initialize_1(start, stop) { start, stop } #define macro_f_range_t_initialize_2(length) { length ? 0 : 1, length ? length - 1 : 0 } + + #define macro_f_range_t_clear(range) { \ + range.start = 1; \ + range.stop = 0; \ + } #endif // _di_f_range_t_ /** @@ -59,6 +64,12 @@ extern "C" { #define macro_f_ranges_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_ranges_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_ranges_t_clear(ranges) { \ + ranges.array = 0; \ + ranges.used = 0; \ + ranges.size = 0; \ + } #endif // _di_f_ranges_t_ /** @@ -81,6 +92,12 @@ extern "C" { #define macro_f_rangess_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_rangess_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_rangess_t_clear(rangess) { \ + rangess.array = 0; \ + rangess.used = 0; \ + rangess.size = 0; \ + } #endif // _di_f_rangess_t_ #ifdef __cplusplus diff --git a/level_0/f_type/c/type/range_double.h b/level_0/f_type/c/type/range_double.h index cf6abb7..fddd788 100644 --- a/level_0/f_type/c/type/range_double.h +++ b/level_0/f_type/c/type/range_double.h @@ -33,6 +33,7 @@ extern "C" { typedef struct { f_number_unsigned_t start_1; f_number_unsigned_t stop_1; + f_number_unsigned_t start_2; f_number_unsigned_t stop_2; } f_range_double_t; @@ -41,6 +42,13 @@ extern "C" { #define macro_f_range_double_t_initialize_1(start_1, stop_1, start_2, stop_2) { start_1, stop_1, start_2, stop_2 } #define macro_f_range_double_t_initialize_2(length_1, length_2) { length_1 ? 0 : 1, length_1 ? length_1 - 1 : 0, length_2 ? 0 : 1, length_2 ? length_2 - 1 : 0 } + + #define macro_f_range_double_t_clear(range_double) { \ + range_double.start_1 = 1; \ + range_double.stop_1 = 0; \ + range_double.start_2 = 1; \ + range_double.stop_2 = 0; \ + } #endif // _di_f_range_double_t_ /** @@ -63,6 +71,12 @@ extern "C" { #define macro_f_range_doubles_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_range_doubles_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_range_doubles_t_clear(range_doubles) { \ + range_doubles.array = 0; \ + range_doubles.used = 0; \ + range_doubles.size = 0; \ + } #endif // _di_f_range_doubles_t_ /** @@ -85,6 +99,12 @@ extern "C" { #define macro_f_range_doubless_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_range_doubless_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_range_doubless_t_clear(range_doubless) { \ + range_doubless.array = 0; \ + range_doubless.used = 0; \ + range_doubless.size = 0; \ + } #endif // _di_f_range_doubless_t_ #ifdef __cplusplus diff --git a/level_0/f_type/c/type/state.h b/level_0/f_type/c/type/state.h index babe3a2..66d04e8 100644 --- a/level_0/f_type/c/type/state.h +++ b/level_0/f_type/c/type/state.h @@ -137,6 +137,12 @@ extern "C" { #define macro_f_states_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_states_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_states_t_clear(states) { \ + states.array = 0; \ + states.used = 0; \ + states.size = 0; \ + } #endif // _di_f_states_t_ /** @@ -161,6 +167,12 @@ extern "C" { #define macro_f_statess_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_statess_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_states_t_clear(states) { \ + states.array = 0; \ + states.used = 0; \ + states.size = 0; \ + } #endif // _di_f_statess_t_ #ifdef __cplusplus diff --git a/level_0/f_type/c/type/status.h b/level_0/f_type/c/type/status.h index bcbf415..b716609 100644 --- a/level_0/f_type/c/type/status.h +++ b/level_0/f_type/c/type/status.h @@ -47,6 +47,12 @@ extern "C" { #define macro_f_statuss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_statuss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_statuss_t_clear(statuss) { \ + statuss.array = 0; \ + statuss.used = 0; \ + statuss.size = 0; \ + } #endif // _di_f_statuss_t_ /** @@ -71,6 +77,12 @@ extern "C" { #define macro_f_statusss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_statusss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_statusss_t_clear(statusss) { \ + statusss.array = 0; \ + statusss.used = 0; \ + statusss.size = 0; \ + } #endif // _di_f_statusss_t_ #ifdef __cplusplus diff --git a/level_0/f_type/c/type/time.h b/level_0/f_type/c/type/time.h index 3452891..aa38d16 100644 --- a/level_0/f_type/c/type/time.h +++ b/level_0/f_type/c/type/time.h @@ -96,6 +96,11 @@ extern "C" { #define f_time_simple_t_initialize { f_time_t_initialize, f_time_t_initialize } #define macro_f_time_simple_t_initialize_1(seconds, nanoseconds) { .seconds = seconds, .seconds_nano = nanoseconds }; + + #define macro_f_time_simple_t_clear(time_simple) { \ + time_simple.seconds = 0; \ + time_simple.seconds_nano = 0; \ + } #endif // _di_f_time_simple_t_ /** @@ -124,6 +129,11 @@ extern "C" { #define f_date_t_initialize { f_number_signed_t_initialize, f_time_t_initialize } #define macro_f_date_t_initialize_1(year, time) { .year = year, .time = time }; + + #define macro_f_date_t_clear(date) { \ + date.year = 0; \ + date.time = 0; \ + } #endif // _di_f_date_t_ /** @@ -146,6 +156,11 @@ extern "C" { #define f_date_simple_t_initialize { f_time_t_initialize, f_time_simple_t_initialize } #define macro_f_date_simple_t_initialize_1(year, time) { .year = year, .time = time }; + + #define macro_f_date_simple_t_clear(date_simple) { \ + date_simple.year = 0; \ + date_simple.time = 0; \ + } #endif // _di_f_date_simple_t_ #ifdef __cplusplus diff --git a/level_0/f_utf/c/utf/dynamic.h b/level_0/f_utf/c/utf/dynamic.h index 3b06425..e363db0 100644 --- a/level_0/f_utf/c/utf/dynamic.h +++ b/level_0/f_utf/c/utf/dynamic.h @@ -36,7 +36,7 @@ extern "C" { #define macro_f_utf_string_dynamic_t_initialize_1(array, used, value) macro_f_utf_string_static_t_initialize_1(array, used, value) #define macro_f_utf_string_dynamic_t_initialize_2(array, length) macro_f_utf_string_static_t_initialize_2(array, length) - #define macro_f_utf_string_dynamic_t_clear(dynamic) macro_f_utf_string_static_t_clear(dynamic) + #define macro_f_utf_string_dynamic_t_clear(utf_string_dynamic) macro_f_utf_string_static_t_clear(utf_string_dynamic) #endif // _di_f_utf_string_dynamic_t_ /** diff --git a/level_0/f_utf/c/utf/dynamics.h b/level_0/f_utf/c/utf/dynamics.h index 1f3952e..7caa868 100644 --- a/level_0/f_utf/c/utf/dynamics.h +++ b/level_0/f_utf/c/utf/dynamics.h @@ -31,7 +31,7 @@ extern "C" { #define macro_f_utf_string_dynamics_t_initialize_1(array, used, value) macro_f_utf_string_statics_t_initialize_1(array, used, value) #define macro_f_utf_string_dynamics_t_initialize_2(array, length) macro_f_utf_string_statics_t_initialize_2(array, length) - #define macro_f_utf_string_dynamics_t_clear(dynamics) macro_f_utf_string_statics_t_clear(dynamics) + #define macro_f_utf_string_dynamics_t_clear(utf_string_dynamics) macro_f_utf_string_statics_t_clear(utf_string_dynamics) #endif // _di_f_utf_string_dynamics_t_ /** diff --git a/level_0/f_utf/c/utf/dynamicss.h b/level_0/f_utf/c/utf/dynamicss.h index 177f135..a7a194e 100644 --- a/level_0/f_utf/c/utf/dynamicss.h +++ b/level_0/f_utf/c/utf/dynamicss.h @@ -31,7 +31,7 @@ extern "C" { #define macro_f_utf_string_dynamicss_t_initialize_1(array, used, value) macro_f_utf_string_staticss_t_initialize_1(array, used, value) #define macro_f_utf_string_dynamicss_t_initialize_2(array, length) macro_f_utf_string_staticss_t_initialize_2(array, length) - #define macro_f_utf_string_dynamicss_t_clear(dynamicss) macro_f_utf_string_staticss_t_clear(dynamicss) + #define macro_f_utf_string_dynamicss_t_clear(utf_string_dynamicss) macro_f_utf_string_staticss_t_clear(utf_string_dynamicss) #endif // _di_f_utf_string_dynamicss_t_ /** diff --git a/level_0/f_utf/c/utf/map.h b/level_0/f_utf/c/utf/map.h index b3a9b3c..f598796 100644 --- a/level_0/f_utf/c/utf/map.h +++ b/level_0/f_utf/c/utf/map.h @@ -33,9 +33,10 @@ extern "C" { #define macro_f_utf_string_map_t_initialize_1(key, value) { key, value } - #define macro_f_utf_string_map_t_clear(map) \ - macro_f_utf_string_dynamic_t_clear(map.key) \ - macro_f_utf_string_dynamic_t_clear(map.value) + #define macro_f_utf_string_map_t_clear(utf_string_map) { \ + macro_f_utf_string_dynamic_t_clear(utf_string_map.key) \ + macro_f_utf_string_dynamic_t_clear(utf_string_map.value) \ + } #endif // _di_f_utf_string_map_t_ #ifdef __cplusplus diff --git a/level_0/f_utf/c/utf/map_multi.h b/level_0/f_utf/c/utf/map_multi.h index 11c9f8c..6dde23a 100644 --- a/level_0/f_utf/c/utf/map_multi.h +++ b/level_0/f_utf/c/utf/map_multi.h @@ -33,9 +33,10 @@ extern "C" { #define macro_f_utf_string_map_multi_t_initialize_1(key, value) { key, value } - #define macro_f_utf_string_map_multi_t_clear(map) \ + #define macro_f_utf_string_map_multi_t_clear(map) { \ macro_f_utf_string_dynamic_t_clear(map.key) \ - macro_f_utf_string_dynamics_t_clear(map.value) + macro_f_utf_string_dynamics_t_clear(map.value) \ + } #endif // _di_f_utf_string_map_multi_t_ #ifdef __cplusplus diff --git a/level_0/f_utf/c/utf/map_multis.h b/level_0/f_utf/c/utf/map_multis.h index e42f973..624b265 100644 --- a/level_0/f_utf/c/utf/map_multis.h +++ b/level_0/f_utf/c/utf/map_multis.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_utf_string_map_multis_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_utf_string_map_multis_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_utf_string_map_multis_t_clear(utf_string_map_multis) { \ + utf_string_map_multis.array = 0; \ + utf_string_map_multis.used = 0; \ + utf_string_map_multis.size = 0; \ + } #endif // _di_f_utf_string_map_multis_t_ /** diff --git a/level_0/f_utf/c/utf/map_multiss.h b/level_0/f_utf/c/utf/map_multiss.h index e9999c2..2cea63c 100644 --- a/level_0/f_utf/c/utf/map_multiss.h +++ b/level_0/f_utf/c/utf/map_multiss.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_utf_string_map_multiss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_utf_string_map_multiss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_utf_string_map_multiss_t_clear(utf_string_map_multiss) { \ + utf_string_map_multiss.array = 0; \ + utf_string_map_multiss.used = 0; \ + utf_string_map_multiss.size = 0; \ + } #endif // _di_f_utf_string_map_multiss_t_ /** diff --git a/level_0/f_utf/c/utf/maps.h b/level_0/f_utf/c/utf/maps.h index 556fbdd..8d206cb 100644 --- a/level_0/f_utf/c/utf/maps.h +++ b/level_0/f_utf/c/utf/maps.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_utf_string_maps_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_utf_string_maps_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_utf_string_maps_t_clear(utf_string_maps) { \ + utf_string_maps.array = 0; \ + utf_string_maps.used = 0; \ + utf_string_maps.size = 0; \ + } #endif // _di_f_utf_string_maps_t_ /** diff --git a/level_0/f_utf/c/utf/mapss.h b/level_0/f_utf/c/utf/mapss.h index fdff66d..6ec55c9 100644 --- a/level_0/f_utf/c/utf/mapss.h +++ b/level_0/f_utf/c/utf/mapss.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_utf_string_mapss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_utf_string_mapss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_utf_string_mapss_t_clear(utf_string_mapss) { \ + utf_string_mapss.array = 0; \ + utf_string_mapss.used = 0; \ + utf_string_mapss.size = 0; \ + } #endif // _di_f_utf_string_mapss_t_ /** diff --git a/level_0/f_utf/c/utf/static.h b/level_0/f_utf/c/utf/static.h index 99a84df..368c6e6 100644 --- a/level_0/f_utf/c/utf/static.h +++ b/level_0/f_utf/c/utf/static.h @@ -42,10 +42,11 @@ extern "C" { #define macro_f_utf_string_static_t_initialize_1(string_value, used_value, size_value) { .string = string_value, .used = used_value, .size = size_value } #define macro_f_utf_string_static_t_initialize_2(string_value, length_value) { .string = string_value, .used = length_value, .size = length_value } - #define macro_f_utf_string_static_t_clear(string_static) \ - string_static.string = 0; \ - string_static.used = 0; \ - string_static.size = 0; + #define macro_f_utf_string_static_t_clear(utf_string_static) { \ + utf_string_static.string = 0; \ + utf_string_static.used = 0; \ + utf_string_static.size = 0; \ + } #endif // _di_f_utf_string_static_t_ /** diff --git a/level_0/f_utf/c/utf/statics.h b/level_0/f_utf/c/utf/statics.h index 4db8316..f6823db 100644 --- a/level_0/f_utf/c/utf/statics.h +++ b/level_0/f_utf/c/utf/statics.h @@ -37,10 +37,11 @@ extern "C" { #define macro_f_utf_string_statics_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_utf_string_statics_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_utf_string_statics_t_clear(statics) \ + #define macro_f_utf_string_statics_t_clear(statics) { \ statics.array = 0; \ statics.used = 0; \ - statics.size = 0; + statics.size = 0; \ + } #endif // _di_f_utf_string_statics_t_ #ifdef __cplusplus diff --git a/level_0/f_utf/c/utf/staticss.h b/level_0/f_utf/c/utf/staticss.h index 2404e7e..3b46e80 100644 --- a/level_0/f_utf/c/utf/staticss.h +++ b/level_0/f_utf/c/utf/staticss.h @@ -37,10 +37,11 @@ extern "C" { #define macro_f_utf_string_staticss_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_utf_string_staticss_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } - #define macro_f_utf_string_staticss_t_clear(staticss) \ + #define macro_f_utf_string_staticss_t_clear(staticss) { \ staticss.array = 0; \ staticss.used = 0; \ - staticss.size = 0; + staticss.size = 0; \ + } #endif // _di_f_utf_string_staticss_t_ #ifdef __cplusplus diff --git a/level_0/f_utf/c/utf/triple.h b/level_0/f_utf/c/utf/triple.h index aaeff39..8ac7e96 100644 --- a/level_0/f_utf/c/utf/triple.h +++ b/level_0/f_utf/c/utf/triple.h @@ -33,18 +33,13 @@ extern "C" { #define f_utf_string_triple_t_initialize { f_utf_string_dynamic_t_initialize, f_utf_string_dynamic_t_initialize, f_utf_string_dynamic_t_initialize } - #define macro_f_utf_string_triple_t_clear(triple) \ - triple.a.array = 0; \ - triple.a.size = 0; \ - triple.a.used = 0; \ - triple.b.array = 0; \ - triple.b.size = 0; \ - triple.b.used = 0; \ - triple.c.array = 0; \ - triple.c.size = 0; \ - triple.c.used = 0; - #define macro_f_utf_string_triple_t_initialize_1(a, b, c) { a, b, c } + + #define macro_f_utf_string_triple_t_clear(triple) { \ + macrro_f_utf_string_dynamic_t_clear(triple.a) \ + macrro_f_utf_string_dynamic_t_clear(triple.b) \ + macrro_f_utf_string_dynamic_t_clear(triple.c) \ + } #endif // _di_f_utf_string_triple_t_ #ifdef __cplusplus diff --git a/level_0/f_utf/c/utf/triples.h b/level_0/f_utf/c/utf/triples.h index 923cee8..3a046a8 100644 --- a/level_0/f_utf/c/utf/triples.h +++ b/level_0/f_utf/c/utf/triples.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_utf_string_triples_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_utf_string_triples_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_utf_string_triples_t_clear(utf_string_triples) { \ + utf_string_triples.array = 0; \ + utf_string_triples.used = 0; \ + utf_string_triples.size = 0; \ + } #endif // _di_f_utf_string_triples_t_ /** diff --git a/level_0/f_utf/c/utf/tripless.h b/level_0/f_utf/c/utf/tripless.h index 3391563..8b19866 100644 --- a/level_0/f_utf/c/utf/tripless.h +++ b/level_0/f_utf/c/utf/tripless.h @@ -36,6 +36,12 @@ extern "C" { #define macro_f_utf_string_tripless_t_initialize_1(array_value, used_value, size_value) { .array = array_value, .used = used_value, .size = size_value } #define macro_f_utf_string_tripless_t_initialize_2(array_value, length_value) { .array = array_value, .used = length_value, .size = length_value } + + #define macro_f_utf_string_tripless_t_clear(utf_string_tripless) { \ + utf_string_tripless.array = 0; \ + utf_string_tripless.used = 0; \ + utf_string_tripless.size = 0; \ + } #endif // _di_f_utf_string_tripless_t_ /** diff --git a/level_1/fl_conversion/c/conversion/common.h b/level_1/fl_conversion/c/conversion/common.h index ef5390b..7097c34 100644 --- a/level_1/fl_conversion/c/conversion/common.h +++ b/level_1/fl_conversion/c/conversion/common.h @@ -33,9 +33,10 @@ extern "C" { #define macro_fl_conversion_data_t_initialize_1(base, flag) { base, flag } - #define macro_fl_conversion_data_t_clear(data) \ - data.base = 0; \ - data.flag = 0; + #define macro_fl_conversion_data_t_clear(conversion_data) { \ + conversion_data.base = 0; \ + conversion_data.flag = 0; \ + } #endif // _di_fl_conversion_data_t_ /** diff --git a/level_1/fl_execute/c/execute/common.h b/level_1/fl_execute/c/execute/common.h index cfb8fbc..de4e0a9 100644 --- a/level_1/fl_execute/c/execute/common.h +++ b/level_1/fl_execute/c/execute/common.h @@ -40,12 +40,13 @@ extern "C" { #define macro_fl_execute_parameter_t_initialize_1(option, wait, environment, signals, data) { option, wait, environment, signals, data } - #define macro_fl_execute_parameter_t_clear(set) \ - set.option = 0; \ - set.wait = 0; \ - set.environment = 0; \ - set.signals = 0; \ - set.data = 0; + #define macro_fl_execute_parameter_t_clear(execute_parameter) { \ + execute_parameter.option = 0; \ + execute_parameter.wait = 0; \ + execute_parameter.environment = 0; \ + execute_parameter.signals = 0; \ + execute_parameter.data = 0; \ + } #endif // _di_fl_execute_parameter_t_ /** @@ -105,7 +106,7 @@ extern "C" { #define macro_fl_execute_as_t_initialize_1(nice, id_user, id_group, affinity, capability, control_group, id_groups, limits, scheduler) { nice, id_user, id_group, affinity, capability, control_group, id_groups, limits, scheduler } - #define macro_fl_execute_as_t_clear(as) \ + #define macro_fl_execute_as_t_clear(as) { \ as.nice = 0; \ as.id_user = 0; \ as.id_group = 0; \ @@ -114,7 +115,8 @@ extern "C" { as.control_group = 0; \ as.id_groups = 0; \ as.limits = 0; \ - as.scheduler = 0; + as.scheduler = 0; \ + } #endif // _di_fl_execute_as_t_ #ifdef __cplusplus diff --git a/level_1/fl_fss/c/fss/embedded_list.h b/level_1/fl_fss/c/fss/embedded_list.h index ba20d7b..f687227 100644 --- a/level_1/fl_fss/c/fss/embedded_list.h +++ b/level_1/fl_fss/c/fss/embedded_list.h @@ -50,10 +50,11 @@ extern "C" { #define macro_fl_fss_data_embedded_list_t_initialize_1(objects, positions, slashes) { objects, positions, slashes } - #define macro_fl_fss_data_embedded_list_t_clear(data) \ + #define macro_fl_fss_data_embedded_list_t_clear(data) { \ data.objects = 0; \ data.positions = 0; \ - data.slashes = 0; + data.slashes = 0; \ + } #endif // _di_fl_fss_data_embedded_list_t_ /** diff --git a/level_1/fl_fss/c/fss/payload/type.h b/level_1/fl_fss/c/fss/payload/type.h index db7af69..2dc4a5d 100644 --- a/level_1/fl_fss/c/fss/payload/type.h +++ b/level_1/fl_fss/c/fss/payload/type.h @@ -30,8 +30,8 @@ extern "C" { * - range: Used for passing a given string range to the FSS write functions. * - conversion: The conversion data. * - quote_null: The string representing an empty, aka NULL, Content. This is generally double-quotes. - * - destinations: The destinations map being appended to. - * - original: The original destination used length. + * - destinations: The destinations map being appended to (This cannot be cleared due to being a constant). + * - original: The original destination used length (This cannot be cleared due to being a constant). */ #ifndef _di_fl_fss_payload_header_internal_t_ typedef struct { @@ -94,6 +94,20 @@ extern "C" { destinations, \ original, \ } + + #define macro_f_fss_payload_header_internal_t_clear(fss_payload_header_internal) { \ + fss_payload_header_internal.quote = 0; \ + fss_payload_header_internal.step = 0; \ + fss_payload_header_internal.size = 0; \ + fss_payload_header_internal.i = 0; \ + fss_payload_header_internal.j = 0; \ + fss_payload_header_internal.k = 0; \ + fss_payload_header_internal.l = 0; \ + fss_payload_header_internal.m = 0; \ + macro_f_range_t_clear(fss_payload_header_internal.range) \ + macro_f_conversion_data_t_clear(fss_payload_header_internal.conversion) \ + macro_f_string_static_t_clear(fss_payload_header_internal.quote_null) \ + } #endif // _di_fl_fss_payload_header_internal_t_ /** @@ -137,6 +151,12 @@ extern "C" { f_conversion_data_base_10_c, \ cache, \ } + + #define macro_f_fss_payload_header_state_t_clear(fss_payload_header_state) { \ + fss_payload_header_state.flag = 0; \ + macro_f_conversion_data_t_clear(fss_payload_header_state.conversion) \ + fss_payload_header_state.cache = 0; \ + } #endif // _di_fl_fss_payload_header_state_t_ #ifdef __cplusplus diff --git a/level_1/fl_print/c/print/common.h b/level_1/fl_print/c/print/common.h index f9ec5f8..21d8adb 100644 --- a/level_1/fl_print/c/print/common.h +++ b/level_1/fl_print/c/print/common.h @@ -109,6 +109,18 @@ extern "C" { #define macro_fl_print_t_initialize_error_2(suffix, set) macro_fl_print_t_initialize_1(macro_f_file_t_initialize_2(F_type_error_d, F_type_descriptor_error_d, F_file_flag_write_only_d), f_console_verbosity_normal_e, 0, fl_print_error_s, suffix, f_color_set_t_initialize, f_color_set_t_initialize, set, 0) #define macro_fl_print_t_initialize_warning_1() macro_fl_print_t_initialize_1(macro_f_file_t_initialize_2(F_type_output_d, F_type_descriptor_output_d, F_file_flag_write_only_d), f_console_verbosity_normal_e, 0, fl_print_warning_s, f_string_static_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, 0, 0) #define macro_fl_print_t_initialize_warning_2(suffix, set) macro_fl_print_t_initialize_1(macro_f_file_t_initialize_2(F_type_output_d, F_type_descriptor_output_d, F_file_flag_write_only_d), f_console_verbosity_normal_e, 0, fl_print_warning_s, suffix, f_color_set_t_initialize, f_color_set_t_initialize, set, 0) + + #define macro_fl_print_t_clear(print) { \ + macro_f_file_t_clear(print.to) \ + print.verbosity = 0; \ + print.flag = 0; \ + macro_f_string_static_t_clear(print.prefix) \ + macro_f_string_static_t_clear(print.suffix) \ + macro_f_color_set_t_clear(print.context) \ + macro_f_color_set_t_clear(print.notable) \ + print.set = 0; \ + print.custom = 0; \ + } #endif // _di_fl_print_t_ /** diff --git a/level_2/fll_program/c/program/common.h b/level_2/fll_program/c/program/common.h index 629e18d..41f5855 100644 --- a/level_2/fll_program/c/program/common.h +++ b/level_2/fll_program/c/program/common.h @@ -197,6 +197,26 @@ extern "C" { macro_f_console_parameter_t_initialize_3(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_d), \ macro_f_console_parameter_t_initialize_3(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_d), \ macro_f_console_parameter_t_initialize_3(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_d) + + #define macro_fll_program_data_t_clear(program_data) { \ + macro_f_console_parameters_t_clear(program_data.parameters) \ + program_data.environment = 0; \ + program_data.umask = 0; \ + program_data.pid = 0; \ + program_data.child = 0; \ + program_data.pipe = 0; \ + program_data.signal_received = 0; \ + program_data.signal_check = 0; \ + macro_f_signal_t_clear(program_data.signal) \ + program_data.signal_status = F_false; \ + macro_f_file_t_clear(program_data.input) \ + macro_fl_print_t_clear(program_data.message) \ + macro_fl_print_t_clear(program_data.output) \ + macro_fl_print_t_clear(program_data.error) \ + macro_fl_print_t_clear(program_data.warning) \ + macro_fl_print_t_clear(program_data.debug) \ + macro_f_color_context_t_clear(program_data.context) \ + } #endif // _di_fll_program_data_t_ /** -- 1.8.3.1