From 633c38178d3ce95178acf18b8c14a285d3472d60 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Thu, 3 Mar 2022 21:51:15 -0600 Subject: [PATCH] Update: Fix consistency where initialize macros are not available for every typedef. --- level_0/f_account/c/account/common.h | 13 ++- level_0/f_color/c/color/common.h | 2 + level_0/f_console/c/console/common.h | 2 + level_0/f_control_group/c/control_group/common.h | 2 + level_0/f_directory/c/directory/type.h | 20 ++++- level_0/f_execute/c/execute/common.h | 4 +- level_0/f_fss/c/fss/comment.h | 12 +++ level_0/f_fss/c/fss/common.h | 11 +++ level_0/f_fss/c/fss/delimit.h | 8 ++ level_0/f_fss/c/fss/named.h | 5 ++ level_0/f_fss/c/fss/nest.h | 12 ++- level_0/f_fss/c/fss/quote.h | 8 ++ level_0/f_fss/c/fss/set.h | 15 +++- level_0/f_limit/c/limit/common.h | 10 +++ level_0/f_string/c/string/common.h | 4 + level_0/f_string/c/string/dynamic.h | 9 ++ level_0/f_string/c/string/map.h | 16 ++++ level_0/f_string/c/string/quantity.h | 12 +++ level_0/f_string/c/string/range.h | 6 ++ level_0/f_string/c/string/static.h | 12 ++- level_0/f_string/c/string/triple.h | 8 ++ level_0/f_thread/c/thread/common.h | 78 +++++++++++++++++- level_0/f_type/c/type.h | 100 ++++++++++++++++++++++- level_1/fl_directory/c/directory/common.h | 9 ++ level_1/fl_iki/data/build/settings | 2 +- level_1/fl_signal/c/signal/common.h | 1 + level_2/fll_iki/data/build/settings | 2 +- level_2/fll_program/c/program/common.h | 11 +++ 28 files changed, 376 insertions(+), 18 deletions(-) diff --git a/level_0/f_account/c/account/common.h b/level_0/f_account/c/account/common.h index 01bc66b..6a4de74 100644 --- a/level_0/f_account/c/account/common.h +++ b/level_0/f_account/c/account/common.h @@ -51,7 +51,15 @@ extern "C" { f_string_dynamic_t shell; } f_account_t; - #define f_account_t_initialize { 0, 0, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize } + #define f_account_t_initialize { \ + 0, \ + 0, \ + f_string_dynamic_t_initialize, \ + f_string_dynamic_t_initialize, \ + f_string_dynamic_t_initialize, \ + f_string_dynamic_t_initialize, \ + f_string_dynamic_t_initialize \ + } #define macro_f_account_t_clear(account) \ account.id_user = 0; \ @@ -94,6 +102,9 @@ extern "C" { #define f_accounts_t_initialize { 0, 0, 0 } + #define macro_f_accounts_t_initialize(content, size, used) { array, size, used } + #define macro_f_accounts_t_initialize2(array, length) { array, length, length } + #define macro_f_accounts_t_clear(accounts) macro_f_memory_structure_clear(accounts) #define macro_f_string_accounts_t_resize(status, accounts, length) macro_f_memory_structure_resize(status, values, sizeof(f_account_t), length) diff --git a/level_0/f_color/c/color/common.h b/level_0/f_color/c/color/common.h index 24a399a..bd6361d 100644 --- a/level_0/f_color/c/color/common.h +++ b/level_0/f_color/c/color/common.h @@ -293,6 +293,8 @@ extern "C" { f_color_string_medium_s \ } + #define macro_f_color_format_t_initialize(begin, end, medium) { begin, end, medium } + #define macro_f_color_format_t_clear(format) \ macro_f_string_static_t_clear(format.begin) \ macro_f_string_static_t_clear(format.end) \ diff --git a/level_0/f_console/c/console/common.h b/level_0/f_console/c/console/common.h index c578d91..e1ced14 100644 --- a/level_0/f_console/c/console/common.h +++ b/level_0/f_console/c/console/common.h @@ -357,6 +357,8 @@ extern "C" { typedef uint16_t f_console_parameter_id_t; #define f_console_parameter_id_t_initialize 0 + + #define macro_f_console_parameter_id_t_initialize(id) id #endif // _di_f_console_parameter_id_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 6b71e50..4b968e5 100644 --- a/level_0/f_control_group/c/control_group/common.h +++ b/level_0/f_control_group/c/control_group/common.h @@ -52,6 +52,8 @@ extern "C" { #define f_control_group_t_initialize { F_false, f_string_dynamic_t_initialize, f_string_dynamics_t_initialize } + #define macro_f_control_group_t_initialize(as_new, path, groups) { as_new, path, groups } + #define macro_f_control_group_t_clear(control) \ control.as_new = F_false; \ macro_f_string_dynamic_t_clear(control.path); \ diff --git a/level_0/f_directory/c/directory/type.h b/level_0/f_directory/c/directory/type.h index 03cddf7..3488a12 100644 --- a/level_0/f_directory/c/directory/type.h +++ b/level_0/f_directory/c/directory/type.h @@ -44,6 +44,17 @@ extern "C" { f_string_dynamics_t_initialize, \ } + #define macro_f_directory_listing_t_initialize(block, character, directory, regular, link, fifo, socket, unknown) { \ + block, \ + character, \ + directory, \ + regular, \ + link, \ + fifo, \ + socket, \ + unknown, \ + } + #define macro_f_directory_listing_t_delete_simple(listing) \ macro_f_string_dynamics_t_delete_simple(listing.block) \ macro_f_string_dynamics_t_delete_simple(listing.character) \ @@ -82,6 +93,8 @@ extern "C" { #define f_directory_status_t_initialize { 0, f_string_dynamic_t_initialize } + #define macro_f_directory_status_t_initialize(status, path) { status, path } + #define macro_f_directory_status_t_clear(directory) \ directory.status = 0; \ macro_f_string_dynamic_t_clear(directory.path); @@ -114,6 +127,9 @@ extern "C" { #define f_directory_statuss_t_initialize { 0, 0, 0 } + #define macro_f_directory_statuss_t_initialize(content, size, used) { array, size, used } + #define macro_f_directory_statuss_t_initialize2(array, length) { array, length, length } + #define macro_f_directory_statuss_t_clear(structures) macro_f_memory_structures_clear(structures) #define macro_f_directory_statuss_t_resize(status, structures, new_length) \ @@ -146,7 +162,7 @@ extern "C" { #define macro_f_directory_statuss_t_delete_simple(structures) \ structures.used = structures.size; \ - while (structures.used > 0) { \ + while (structures.used) { \ --structures.used; \ macro_f_directory_status_t_delete_simple(structures.array[structures.used]); \ } \ @@ -158,7 +174,7 @@ extern "C" { #define macro_f_directory_statuss_t_destroy_simple(structures) \ structures.used = structures.size; \ - while (structures.used > 0) { \ + while (structures.used) { \ --structures.used; \ macro_f_directory_status_t_destroy_simple(structures.array[structures.used]); \ } \ diff --git a/level_0/f_execute/c/execute/common.h b/level_0/f_execute/c/execute/common.h index 9077e90..f5e62fb 100644 --- a/level_0/f_execute/c/execute/common.h +++ b/level_0/f_execute/c/execute/common.h @@ -76,8 +76,6 @@ extern "C" { /** * A structure representing a scheduler and its parameters for execution. * - * @todo move this into a f_scheduler project. - * * policy: The scheduler policy. * priority: The scheduler priority; */ @@ -113,6 +111,8 @@ extern "C" { #define f_execute_result_t_initialize { 0 } + #define macro_f_execute_result_t_initialize(status, pid) { status, pid } + #define f_execute_result_t_clear(execute_result) \ execute_result.status = 0; \ execute_result.pid = 0; diff --git a/level_0/f_fss/c/fss/comment.h b/level_0/f_fss/c/fss/comment.h index 5ad1faf..399a4af 100644 --- a/level_0/f_fss/c/fss/comment.h +++ b/level_0/f_fss/c/fss/comment.h @@ -21,6 +21,12 @@ extern "C" { */ #ifndef _di_f_fss_comment_t_ typedef f_string_range_t f_fss_comment_t; + + #define f_fss_comment_t_initialize f_string_range_t_initialize + + #define macro_f_fss_comment_t_initialize(length) macro_f_string_range_t_initialize(length) + + #define macro_f_fss_comment_t_clear(comment) macro_f_string_range_t_clear(comment) #endif // _di_f_fss_comment_t_ /** @@ -35,6 +41,9 @@ extern "C" { #define f_fss_comments_t_initialize f_string_ranges_t_initialize + #define macro_f_fss_comments_t_initialize(array, size, used) macro_f_string_ranges_t_initialize(array, size, used) + #define macro_f_fss_comments_t_initialize2(array, length) macro_f_string_ranges_t_initialize2(array, length) + #define f_fss_comments_t_clear(comments) macro_f_string_ranges_t_clear(comments) #define macro_f_fss_comments_t_resize(status, comments, length) macro_f_string_ranges_t_resize(status, comments, length) @@ -61,6 +70,9 @@ extern "C" { #define f_fss_commentss_t_initialize f_string_rangess_t_initialize + #define macro_f_fss_commentss_t_initialize(array, size, used) macro_f_string_rangess_t_initialize(array, size, used) + #define macro_f_fss_commentss_t_initialize2(array, length) macro_f_string_rangess_t_initialize2(array, length) + #define macro_f_fss_commentss_t_clear(commentss) macro_f_string_rangess_t_clear(commentss) #define macro_f_fss_commentss_t_resize(status, commentss, length) macro_f_string_rangess_t_resize(status, commentss, length) diff --git a/level_0/f_fss/c/fss/common.h b/level_0/f_fss/c/fss/common.h index d56af4d..76a2b68 100644 --- a/level_0/f_fss/c/fss/common.h +++ b/level_0/f_fss/c/fss/common.h @@ -260,6 +260,8 @@ enum { #define f_fss_object_t_initialize f_string_range_t_initialize + #define macro_f_fss_object_t_initialize(length) macro_f_string_range_t_initialize(length) + #define macro_f_fss_object_t_clear(object) macro_f_string_range_t_clear(object) #endif // _di_f_fss_object_t_ @@ -275,6 +277,9 @@ enum { #define f_fss_objects_t_initialize f_string_ranges_t_initialize + #define macro_f_fss_objects_t_initialize(array, size, used) macro_f_string_ranges_t_initialize(array, size, used) + #define macro_f_fss_objects_t_initialize2(array, length) macro_f_string_ranges_t_initialize2(array, length) + #define macro_f_fss_objects_t_clear(objects) macro_f_string_ranges_t_clear(objects) #define macro_f_fss_objects_t_resize(status, objects, length) macro_f_string_ranges_t_resize(status, objects, length) @@ -303,6 +308,9 @@ enum { #define f_fss_content_t_initialize f_string_ranges_t_initialize + #define macro_f_fss_content_t_initialize(array, size, used) macro_f_string_ranges_t_initialize(array, size, used) + #define macro_f_fss_content_t_initialize2(array, length) macro_f_string_ranges_t_initialize2(array, length) + #define macro_f_fss_content_t_clear(content) macro_f_string_ranges_t_clear(content) #define macro_f_fss_content_t_resize(status, content, length) macro_f_string_ranges_t_resize(status, content, length) @@ -329,6 +337,9 @@ enum { #define f_fss_contents_t_initialize f_string_rangess_t_initialize + #define macro_f_fss_contents_t_initialize(array, size, used) macro_f_string_rangess_t_initialize(array, size, used) + #define macro_f_fss_contents_t_initialize2(array, length) macro_f_string_rangess_t_initialize2(array, length) + #define macro_f_fss_contents_t_clear(contents) macro_f_string_rangess_t_clear(contents) #define macro_f_fss_contents_t_resize(status, contents, length) macro_f_string_rangess_t_resize(status, contents, length) diff --git a/level_0/f_fss/c/fss/delimit.h b/level_0/f_fss/c/fss/delimit.h index 98a3d32..91a3442 100644 --- a/level_0/f_fss/c/fss/delimit.h +++ b/level_0/f_fss/c/fss/delimit.h @@ -21,6 +21,8 @@ extern "C" { */ #ifndef _di_f_fss_delimit_t_ typedef f_array_length_t f_fss_delimit_t; + + #define macro_f_fss_object_t_initialize(length) macro_f_string_range_t_initialize(length) #endif // _di_f_fss_delimit_t_ /** @@ -35,6 +37,9 @@ extern "C" { #define f_fss_delimits_t_initialize f_array_lengths_t_initialize + #define macro_f_fss_delimits_t_initialize(array, size, used) macro_f_array_lengths_t_initialize(array, size, used) + #define macro_f_fss_delimits_t_initialize2(array, length) macro_f_array_lengths_t_initialize2(array, length) + #define macro_f_fss_delimits_t_clear(delimits) macro_f_array_lengths_t_clear(delimits) #define macro_f_fss_delimits_t_resize(status, delimits, length) macro_f_array_lengths_t_resize(status, delimits, length) @@ -61,6 +66,9 @@ extern "C" { #define f_fss_delimitss_t_initialize f_array_lengthss_t_initialize + #define macro_f_fss_delimitss_t_initialize(array, size, used) macro_f_array_lengthss_t_initialize(array, size, used) + #define macro_f_fss_delimitss_t_initialize2(array, length) macro_f_array_lengthss_t_initialize2(array, length) + #define macro_f_fss_delimitss_t_clear(delimitss) macro_f_array_lengthss_t_clear(delimitss) #define macro_f_fss_delimitss_t_resize(status, delimitss, length) macro_f_array_lengthss_t_resize(status, delimitss, length) diff --git a/level_0/f_fss/c/fss/named.h b/level_0/f_fss/c/fss/named.h index db5f04d..b07ccd4 100644 --- a/level_0/f_fss/c/fss/named.h +++ b/level_0/f_fss/c/fss/named.h @@ -38,6 +38,8 @@ extern "C" { #define f_fss_named_t_initialize { f_fss_object_t_initialize, f_fss_objects_t_initialize, f_fss_contents_t_initialize, f_fss_quotess_t_initialize } + #define macro_f_fss_named_t_initialize(name, objects, contents, quotess) macro_f_array_lengths_t_initialize(name, objects, contents, quotess) + #define macro_f_fss_named_t_clear(named) \ macro_f_fss_object_t_clear(named.name) \ macro_f_fss_objects_t_clear(named.objects) \ @@ -73,6 +75,9 @@ extern "C" { #define f_fss_nameds_t_initialize { 0, 0, 0 } + #define macro_f_fss_nameds_t_initialize(array, size, used) macro_f_fss_nameds_t_initialize(array, size, used) + #define macro_f_fss_nameds_t_initialize2(array, length) macro_f_fss_nameds_t_initialize2(array, length) + #define macro_f_fss_nameds_t_clear(nameds) macro_f_memory_structure_clear(nameds); #define macro_f_fss_nameds_t_resize(status, nameds, length) status = f_fss_nameds_resize(length, &nameds); diff --git a/level_0/f_fss/c/fss/nest.h b/level_0/f_fss/c/fss/nest.h index b6b48e3..f7e97aa 100644 --- a/level_0/f_fss/c/fss/nest.h +++ b/level_0/f_fss/c/fss/nest.h @@ -41,6 +41,8 @@ extern "C" { #define f_fss_item_t_initialize { f_fss_object_t_initialize, f_fss_content_t_initialize, 0 } + #define macro_f_fss_item_t_initialize(object, content, parent) macro_f_array_lengths_t_initialize(object, content, parent) + #define macro_f_fss_item_t_clear(item) \ macro_f_fss_object_t_clear(item.object); \ macro_f_fss_content_t_clear(item.content); \ @@ -96,6 +98,9 @@ extern "C" { #define f_fss_items_t_initialize { 0, 0, 0 } + #define macro_f_fss_items_t_initialize(array, size, used) { array, size, used } + #define macro_f_fss_items_t_initialize2(array, length) { array, length, length } + #define macro_f_fss_items_t_clear(items) macro_f_memory_structure_clear(items) #define macro_f_fss_items_t_resize(status, items, length) status = f_fss_items_resize(length, &items); @@ -116,7 +121,6 @@ extern "C" { * Each array row represents the nesting depth. * The top-level will not have any parent, so "parent" must be ignored on anything at index 0. * The parent identifier is expected to reference a position in the nesting depth immediately above it. - * @todo consider instead of using a "parent", have setting set to 0 to represent no data. * * depth: An array of f_fss_items_t, with each index representing the depth. * size: Total amount of allocated space. @@ -132,6 +136,9 @@ extern "C" { #define f_fss_nest_t_initialize { 0, 0, 0 } + #define macro_f_fss_nest_t_initialize(depth, size, used) { depth, size, used } + #define macro_f_fss_nest_t_initialize2(depth, length) { depth, length, length } + #define macro_f_fss_nest_t_clear(nest) macro_f_memory_structures_clear(nest) #define macro_f_fss_nest_t_resize(status, nest, length) status = f_fss_nest_resize(length, &nest); @@ -163,6 +170,9 @@ extern "C" { #define f_fss_nests_t_initialize { 0, 0, 0 } + #define macro_f_fss_nests_t_initialize(array, size, used) { array, size, used } + #define macro_f_fss_nests_t_initialize2(array, length) { array, length, length } + #define macro_f_fss_nests_t_clear(nests) macro_f_memory_structures_clear(nests) #define macro_f_fss_nests_t_resize(status, nests, length) status = f_fss_nests_resize(length, &nests); diff --git a/level_0/f_fss/c/fss/quote.h b/level_0/f_fss/c/fss/quote.h index a64ec02..0d2b3ab 100644 --- a/level_0/f_fss/c/fss/quote.h +++ b/level_0/f_fss/c/fss/quote.h @@ -35,6 +35,8 @@ extern "C" { */ #ifndef _di_f_fss_quote_t_ typedef uint8_t f_fss_quote_t; + + #define macro_f_fss_quote_t_initialize(quote) quote #endif // _di_f_fss_quote_t_ /** @@ -49,6 +51,9 @@ extern "C" { #define f_fss_quotes_t_initialize f_uint8s_t_initialize + #define macro_f_fss_quotes_t_initialize(array, size, used) macro_f_uint8s_t_initialize(array, size, used) + #define macro_f_fss_quotes_t_initialize2(array, length) macro_f_uint8s_t_initialize2(array, length) + #define macro_f_fss_quotes_t_clear(quotes) macro_f_uint8s_t_clear(quotes) #define macro_f_fss_quotes_t_resize(status, quotes, length) macro_f_uint8s_t_resize(status, quotes, length) @@ -75,6 +80,9 @@ extern "C" { #define f_fss_quotess_t_initialize f_uint8ss_t_initialize + #define macro_f_fss_quotess_t_initialize(array, size, used) macro_f_uint8ss_t_initialize(array, size, used) + #define macro_f_fss_quotess_t_initialize2(array, length) macro_f_uint8ss_t_initialize2(array, length) + #define macro_f_fss_quotess_t_clear(quotess) macro_f_uint8ss_t_clear(quotess) #define macro_f_fss_quotess_t_resize(status, quotess, length) macro_f_uint8ss_t_resize(status, quotess, length) diff --git a/level_0/f_fss/c/fss/set.h b/level_0/f_fss/c/fss/set.h index f67dd4e..060b355 100644 --- a/level_0/f_fss/c/fss/set.h +++ b/level_0/f_fss/c/fss/set.h @@ -33,6 +33,8 @@ extern "C" { #define f_fss_set_t_initialize { f_fss_objects_t_initialize, f_fss_contents_t_initialize } + #define macro_f_fss_set_t_initialize(objects, contents) { objects, contents } + #define macro_f_fss_set_t_clear(set) \ macro_f_fss_objects_t_clear(set.objects) \ macro_f_fss_contents_t_clear(set.contents) @@ -86,10 +88,10 @@ extern "C" { * The objects, contents, and quotes should each be of the same used and size. * Any deviation to this would require implementing custom equivelents to the standard management macros. * - * objects: the array of objects. - * contents: the array of contents. - * objects_quote: the array of objects quote types. - * contents_quote: the array of contents quote types. + * objects: The array of objects. + * contents: The array of contents. + * objects_quote: The array of objects quote types. + * contents_quote: The array of contents quote types. */ #ifndef _di_f_fss_set_quote_t_ typedef struct { @@ -102,6 +104,8 @@ extern "C" { #define f_fss_set_quote_t_initialize { f_fss_objects_t_initialize, f_fss_contents_t_initialize, f_fss_quotes_t_initialize, f_fss_quotess_t_initialize } + #define macro_f_fss_set_quote_t_initialize(objects, contents, objects_quote, contents_quote) { objects, contents, objects_quote, contents_quote } + #define macro_f_fss_set_quote_t_clear(set) \ macro_f_fss_objects_t_clear(set.objects) \ macro_f_fss_contents_t_clear(set.contents) \ @@ -137,6 +141,9 @@ extern "C" { #define f_fss_set_quotes_t_initialize { 0, 0, 0 } + #define macro_f_fss_set_quotes_t_initialize(array, size, used) { array, size, used } + #define macro_f_fss_set_quotes_t_initialize2(array, length) { array, length, length } + #define macro_f_fss_set_quotes_t_clear(nameds) macro_f_memory_structure_clear(nameds) #define macro_f_fss_set_quotes_t_resize(status, set_quotes, length) status = f_fss_set_quotes_resize(length, &set_quotes); diff --git a/level_0/f_limit/c/limit/common.h b/level_0/f_limit/c/limit/common.h index 0716e4b..4d7e1ee 100644 --- a/level_0/f_limit/c/limit/common.h +++ b/level_0/f_limit/c/limit/common.h @@ -27,6 +27,8 @@ extern "C" { #define f_limit_value_t_initialize { 0, 0 } + #define macro_f_limit_value_t_initialize(value) { value } + #define macro_f_limit_value_t_clear(value) \ value.rlim_cur = 0; \ value.rlim_max = 0; @@ -49,6 +51,9 @@ extern "C" { #define f_limit_values_t_initialize { 0, 0, 0 } + #define macro_f_limit_values_t_initialize(content, size, used) { array, size, used } + #define macro_f_limit_values_t_initialize2(array, length) { array, length, length } + #define macro_f_limit_values_t_clear(values) macro_f_memory_structure_clear(values) #define macro_f_limit_values_t_resize(status, values, length) macro_f_memory_structure_resize(status, values, f_limit_value_t, length) @@ -77,6 +82,8 @@ extern "C" { #define f_limit_set_t_initialize { 0, 0 } + #define macro_f_limit_set_t_initialize(type, value) { type, value } + #define macro_f_limit_set_t_clear(set) \ set.type = 0; \ set.value = 0; @@ -99,6 +106,9 @@ extern "C" { #define f_limit_sets_t_initialize { 0, 0, 0 } + #define macro_f_limit_sets_t_initialize(content, size, used) { array, size, used } + #define macro_f_limit_sets_t_initialize2(array, length) { array, length, length } + #define macro_f_limit_sets_t_clear(sets) macro_f_memory_structure_clear(sets) #define macro_f_limit_sets_t_resize(status, sets, length) macro_f_memory_structure_resize(status, sets, f_limit_set_t, length) diff --git a/level_0/f_string/c/string/common.h b/level_0/f_string/c/string/common.h index 7585b81..05f9433 100644 --- a/level_0/f_string/c/string/common.h +++ b/level_0/f_string/c/string/common.h @@ -40,6 +40,8 @@ extern "C" { #define f_string_t_initialize 0 + #define macro_f_string_t_initialize(string) string + #define macro_f_string_t_clear(string) string = 0; #define macro_f_string_t_resize(status, string, length_old, length_new) status = f_memory_resize(length_old, length_new, 1, (void **) & string); @@ -69,6 +71,8 @@ extern "C" { #define f_string_constant_t_initialize 0 + #define macro_f_string_constant_t_initialize(string) string + #define macro_f_string_constant_t_clear(string) string = 0; #endif // _di_f_string_t_ diff --git a/level_0/f_string/c/string/dynamic.h b/level_0/f_string/c/string/dynamic.h index 41e0efb..86ff8b1 100644 --- a/level_0/f_string/c/string/dynamic.h +++ b/level_0/f_string/c/string/dynamic.h @@ -33,6 +33,9 @@ extern "C" { #define f_string_dynamic_t_initialize f_string_static_t_initialize + #define macro_f_string_dynamic_t_initialize(array, size, used) { array, size, used } + #define macro_f_string_dynamic_t_initialize2(array, length) { array, length, length } + #define macro_f_string_dynamic_t_clear(dynamic) macro_f_string_static_t_clear(dynamic) #define macro_f_string_dynamic_t_resize(status, dynamic, length) status = f_string_dynamic_resize(length, &dynamic); @@ -59,6 +62,9 @@ extern "C" { #define f_string_dynamics_t_initialize f_string_statics_t_initialize + #define macro_f_string_dynamics_t_initialize(array, size, used) { array, size, used } + #define macro_f_string_dynamics_t_initialize2(array, length) { array, length, length } + #define macro_f_string_dynamics_t_clear(dynamics) macro_f_string_statics_t_clear(dynamics) #define macro_f_string_dynamics_t_resize(status, dynamics, length) status = f_string_dynamics_resize(length, &dynamics); @@ -85,6 +91,9 @@ extern "C" { #define f_string_dynamicss_t_initialize f_string_staticss_t_initialize + #define macro_f_string_dynamicss_t_initialize(array, size, used) { array, size, used } + #define macro_f_string_dynamicss_t_initialize2(array, length) { array, length, length } + #define macro_f_string_dynamicss_t_clear(dynamicss) macro_f_string_staticss_t_clear(dynamicss) #define macro_f_string_dynamicss_t_resize(status, dynamicss, length) status = f_string_dynamicss_resize(length, &dynamicss); diff --git a/level_0/f_string/c/string/map.h b/level_0/f_string/c/string/map.h index db983f5..c54d47d 100644 --- a/level_0/f_string/c/string/map.h +++ b/level_0/f_string/c/string/map.h @@ -30,6 +30,8 @@ extern "C" { #define f_string_map_t_initialize { f_string_dynamic_t_initialize, f_string_dynamic_t_initialize } + #define macro_f_string_map_t_initialize(name, value) { name, value } + #define macro_f_string_map_t_clear(map) \ macro_f_string_dynamic_t_clear(map.name) \ macro_f_string_dynamic_t_clear(map.value) @@ -60,6 +62,9 @@ extern "C" { #define f_string_maps_t_initialize f_string_statics_t_initialize + #define macro_f_string_maps_t_initialize(array, size, used) { array, size, used } + #define macro_f_string_maps_t_initialize2(array, length) { array, length, length } + #define macro_f_string_maps_t_clear(maps) macro_f_memory_structure_clear(maps) #define macro_f_string_maps_t_resize(status, maps, length) status = f_string_maps_resize(length, &maps); @@ -91,6 +96,9 @@ extern "C" { #define f_string_mapss_t_initialize f_string_statics_t_initialize + #define macro_f_string_mapss_t_initialize(array, size, used) { array, size, used } + #define macro_f_string_mapss_t_initialize2(array, length) { array, length, length } + #define macro_f_string_mapss_t_clear(maps) macro_f_memory_structure_clear(maps) #define macro_f_string_mapss_t_resize(status, maps, length) status = f_string_mapss_resize(length, &maps); @@ -119,6 +127,8 @@ extern "C" { #define f_string_map_multi_t_initialize { f_string_dynamic_t_initialize, f_string_dynamics_t_initialize } + #define macro_f_string_map_t_initialize(name, value) { name, value } + #define macro_f_string_map_multi_t_clear(map) \ macro_f_string_dynamic_t_clear(map.name) \ macro_f_string_dynamics_t_clear(map.value) @@ -149,6 +159,9 @@ extern "C" { #define f_string_map_multis_t_initialize f_string_statics_t_initialize + #define macro_f_string_map_multis_t_initialize(array, size, used) { array, size, used } + #define macro_f_string_map_multis_t_initialize2(array, length) { array, length, length } + #define macro_f_string_map_multis_t_clear(map_multis) macro_f_memory_structure_clear(map_multis) #define macro_f_string_map_multis_t_resize(status, map_multis, length) status = f_string_map_multis_resize(length, &map_multis); @@ -180,6 +193,9 @@ extern "C" { #define f_string_map_multiss_t_initialize f_string_statics_t_initialize + #define macro_f_string_map_multiss_t_initialize(array, size, used) { array, size, used } + #define macro_f_string_map_multiss_t_initialize2(array, length) { array, length, length } + #define macro_f_string_map_multiss_t_clear(map_multis) macro_f_memory_structure_clear(map_multis) #define macro_f_string_map_multiss_t_resize(status, map_multis, length) status = f_string_map_multiss_resize(length, &map_multis); diff --git a/level_0/f_string/c/string/quantity.h b/level_0/f_string/c/string/quantity.h index 8d36d77..f3603e7 100644 --- a/level_0/f_string/c/string/quantity.h +++ b/level_0/f_string/c/string/quantity.h @@ -35,6 +35,12 @@ extern "C" { } f_string_quantity_t; #define f_string_quantity_t_initialize { 0, 0 } + + #define macro_f_string_quantity_t_initialize(start, total) { start, total } + + #define macro_f_string_quantity_t_clear(quantity) \ + quantity.start = 0; \ + quantity.total = 0; #endif // _di_f_string_quantity_t_ /** @@ -54,6 +60,9 @@ extern "C" { #define f_string_quantitys_t_initialize { 0, 0, 0 } + #define macro_f_string_quantitys_t_initialize(array, size, used) { array, size, used } + #define macro_f_string_quantitys_t_initialize2(array, length) { array, length, length } + #define macro_f_string_quantitys_t_clear(quantitys) macro_f_memory_structure_clear(quantitys) #define macro_f_string_quantitys_t_resize(status, quantitys, length) status = f_string_quantitys_resize(length, &quantitys); @@ -85,6 +94,9 @@ extern "C" { #define f_string_quantityss_t_initialize { 0, 0, 0 } + #define macro_f_string_quantityss_t_initialize(array, size, used) { array, size, used } + #define macro_f_string_quantityss_t_initialize2(array, length) { array, length, length } + #define macro_f_string_quantityss_t_clear(quantityss) macro_f_memory_structures_clear(quantityss) #define macro_f_string_quantityss_t_resize(status, quantityss, length) status = f_string_quantityss_resize(length, &quantityss); diff --git a/level_0/f_string/c/string/range.h b/level_0/f_string/c/string/range.h index 78366b4..44db0ce 100644 --- a/level_0/f_string/c/string/range.h +++ b/level_0/f_string/c/string/range.h @@ -59,6 +59,9 @@ extern "C" { #define f_string_ranges_t_initialize { 0, 0, 0 } + #define macro_f_string_ranges_t_initialize(array, size, used) { array, size, used } + #define macro_f_string_ranges_t_initialize2(array, length) { array, length, length } + #define macro_f_string_ranges_t_clear(ranges) macro_f_memory_structure_clear(ranges) #define macro_f_string_ranges_t_resize(status, ranges, length) status = f_string_ranges_resize(length, &ranges); @@ -90,6 +93,9 @@ extern "C" { #define f_string_rangess_t_initialize { 0, 0, 0 } + #define macro_f_string_rangess_t_initialize(array, size, used) { array, size, used } + #define macro_f_string_rangess_t_initialize2(array, length) { array, length, length } + #define macro_f_string_rangess_t_clear(rangess) macro_f_memory_structures_clear(rangess) #define macro_f_string_rangess_t_resize(status, rangess, length) status = f_string_rangess_resize(length, &rangess); diff --git a/level_0/f_string/c/string/static.h b/level_0/f_string/c/string/static.h index ea1657c..536ea6b 100644 --- a/level_0/f_string/c/string/static.h +++ b/level_0/f_string/c/string/static.h @@ -38,13 +38,13 @@ extern "C" { #define f_string_static_t_initialize { 0, 0, 0 } + #define macro_f_string_static_t_initialize(string, size, used) { string, size, used } + #define macro_f_string_static_t_initialize2(string, length) { string, length, length } + #define macro_f_string_static_t_clear(string_static) \ string_static.string = 0; \ string_static.size = 0; \ string_static.used = 0; - - #define macro_f_string_static_t_initialize(string, size, used) { string, size, used } - #define macro_f_string_static_t_initialize2(string, length) { string, length, length } #endif // _di_f_string_static_t_ /** @@ -64,6 +64,9 @@ extern "C" { #define f_string_statics_t_initialize { 0, 0, 0 } + #define macro_f_string_statics_t_initialize(array, size, used) { array, size, used } + #define macro_f_string_statics_t_initialize2(array, length) { array, length, length } + #define macro_f_string_statics_t_clear(statics) \ statics.array = 0; \ statics.size = 0; \ @@ -87,6 +90,9 @@ extern "C" { #define f_string_staticss_t_initialize { 0, 0, 0 } + #define macro_f_string_staticss_t_initialize(array, size, used) { array, size, used } + #define macro_f_string_staticss_t_initialize2(array, length) { array, length, length } + #define macro_f_string_staticss_t_clear(staticss) \ staticss.array = 0; \ staticss.size = 0; \ diff --git a/level_0/f_string/c/string/triple.h b/level_0/f_string/c/string/triple.h index 417792b..dea8f04 100644 --- a/level_0/f_string/c/string/triple.h +++ b/level_0/f_string/c/string/triple.h @@ -43,6 +43,8 @@ extern "C" { triple.c.size = 0; \ triple.c.used = 0; + #define macro_f_string_triple_t_initialize(a, b, c) { a, b, c } + #define macro_f_string_triple_t_delete_simple(triple) \ macro_f_string_dynamic_t_delete_simple(triple.a) \ macro_f_string_dynamic_t_delete_simple(triple.b) \ @@ -71,6 +73,9 @@ extern "C" { #define f_string_triples_t_initialize f_string_statics_t_initialize + #define macro_f_string_triples_t_initialize(array, size, used) { array, size, used } + #define macro_f_string_triples_t_initialize2(array, length) { array, length, length } + #define macro_f_string_triples_t_clear(triples) macro_f_memory_structure_clear(triples) #define macro_f_string_triples_t_resize(status, triples, length) status = f_string_triples_resize(length, &triples); @@ -102,6 +107,9 @@ extern "C" { #define f_string_tripless_t_initialize f_string_statics_t_initialize + #define macro_f_string_tripless_t_initialize(array, size, used) { array, size, used } + #define macro_f_string_tripless_t_initialize2(array, length) { array, length, length } + #define macro_f_string_tripless_t_clear(tripless) macro_f_memory_structure_clear(tripless) #define macro_f_string_tripless_t_resize(status, tripless, length) status = f_string_tripless_resize(length, &tripless); diff --git a/level_0/f_thread/c/thread/common.h b/level_0/f_thread/c/thread/common.h index 8ccbb79..8e0d984 100644 --- a/level_0/f_thread/c/thread/common.h +++ b/level_0/f_thread/c/thread/common.h @@ -24,6 +24,8 @@ extern "C" { #define f_thread_attribute_t_initialize { 0 } + #define macro_f_thread_attribute_t_initialize(attribute) attribute + // This does not clear the thread.attributes.__size array (may need to memset() against a sizeof(pthread_attr_t)). #define macro_f_thread_attribute_t_clear(attribute) attribute.__align = 0; @@ -47,6 +49,9 @@ extern "C" { #define f_thread_attributes_t_initialize { 0, 0, 0 } + #define macro_f_thread_attributes_t_initialize(array, size, used) { array, size, used } + #define macro_f_thread_attributes_t_initialize2(array, length) { array, length, length } + #define macro_f_thread_attributes_t_clear(attributes) macro_f_memory_structure_clear(attributes) #define macro_f_thread_attributes_t_resize(status, attributes, length) status = f_thread_attributes_resize(length, &attributes); @@ -69,6 +74,8 @@ extern "C" { #define f_thread_barrier_t_initialize { 0 } + #define macro_f_thread_barrier_t_initialize(barrier) barrier + #define macro_f_thread_barrier_t_clear(barrier) barrier = 0; #define macro_f_thread_barrier_t_delete_simple(barrier) f_thread_barrier_delete(&barrier); @@ -91,6 +98,9 @@ extern "C" { #define f_thread_barriers_t_initialize { 0, 0, 0 } + #define macro_f_thread_barriers_t_initialize(array, size, used) { array, size, used } + #define macro_f_thread_barriers_t_initialize2(array, length) { array, length, length } + #define macro_f_thread_barriers_t_clear(barriers) macro_f_memory_structure_clear(barriers) #define macro_f_thread_barriers_t_resize(status, barriers, length) status = f_thread_barriers_resize(length, &barriers); @@ -113,6 +123,8 @@ extern "C" { #define f_thread_barrier_attribute_t_initialize { 0 } + #define macro_f_thread_barrier_attribute_t_initialize(attribute) attribute + // This does not clear the thread.attributes.__size array (may need to memset() against a sizeof(pthread_attr_t)). #define macro_f_thread_barrier_attribute_t_clear(attribute) attribute.__align = 0; @@ -136,6 +148,9 @@ extern "C" { #define f_thread_barrier_attributes_t_initialize { 0, 0, 0 } + #define macro_f_thread_barrier_attributes_t_initialize(array, size, used) { array, size, used } + #define macro_f_thread_barrier_attributes_t_initialize2(array, length) { array, length, length } + #define macro_f_thread_barrier_attributes_t_clear(barrier_attributes) macro_f_memory_structure_clear(barrier_attributes) #define macro_f_thread_barrier_attributes_t_resize(status, barrier_attributes, length) status = f_thread_barrier_attributes_resize(length, &barrier_attributes); @@ -161,6 +176,8 @@ extern "C" { #define f_thread_condition_t_initialize PTHREAD_COND_INITIALIZER + #define macro_f_thread_condition_t_initialize(condition) { condition } + #define macro_f_thread_condition_t_delete_simple(condition) f_thread_condition_delete(&condition); #endif // _di_f_thread_condition_t_ @@ -181,6 +198,9 @@ extern "C" { #define f_thread_conditions_t_initialize { 0, 0, 0 } + #define macro_f_thread_conditions_t_initialize(array, size, used) { array, size, used } + #define macro_f_thread_conditions_t_initialize2(array, length) { array, length, length } + #define macro_f_thread_conditions_t_clear(conditions) macro_f_memory_structure_clear(conditions) #define macro_f_thread_conditions_t_resize(status, conditions, length) status = f_thread_conditions_resize(length, &conditions); @@ -203,6 +223,8 @@ extern "C" { #define f_thread_condition_attribute_t_initialize { 0 }; + #define macro_f_thread_condition_attribute_t_initialize(array, size, used) attribute + // This does not clear the thread.attributes.__size array (may need to memset() against a sizeof(pthread_attr_t)). #define macro_f_thread_condition_attribute_t_clear(attribute) attribute.__align = 0; @@ -226,6 +248,9 @@ extern "C" { #define f_thread_condition_attributes_t_initialize { 0, 0, 0 } + #define macro_f_thread_condition_attributes_t_initialize(array, size, used) { array, size, used } + #define macro_f_thread_condition_attributes_t_initialize2(array, length) { array, length, length } + #define macro_f_thread_condition_attributes_t_clear(attributes) macro_f_memory_structure_clear(attributes) #define macro_f_thread_condition_attributes_t_resize(status, attributes, length) status = f_thread_condition_attributes_resize(length, &attributes); @@ -268,6 +293,9 @@ extern "C" { #define f_thread_ids_t_initialize { 0, 0, 0 } + #define macro_f_thread_ids_t_initialize(array, size, used) { array, size, used } + #define macro_f_thread_ids_t_initialize2(array, length) { array, length, length } + #define macro_f_thread_ids_t_resize(status, ids, length) macro_f_memory_structure_resize(status, ids, f_thread_id_t, length) #define macro_f_thread_ids_t_adjust(status, ids, length) macro_f_memory_structure_adjust(status, ids, f_thread_id_t, length) @@ -288,6 +316,8 @@ extern "C" { #define f_thread_key_t_initialize 0 + #define macro_f_thread_key_t_initialize(key) key + #define macro_f_thread_key_t_clear(key) key = 0; #define macro_f_thread_key_t_delete_simple(key) f_thread_key_delete(&key); @@ -310,6 +340,9 @@ extern "C" { #define f_thread_keys_t_initialize { 0, 0, 0 } + #define macro_f_thread_keys_t_initialize(array, size, used) { array, size, used } + #define macro_f_thread_keys_t_initialize2(array, length) { array, length, length } + #define macro_f_thread_keys_t_clear(keys) macro_f_memory_structure_clear(keys) #define macro_f_thread_keys_t_resize(status, keys, length) status = f_thread_keys_resize(length, &keys); @@ -335,6 +368,8 @@ extern "C" { #define f_thread_lock_t_initialize PTHREAD_RWLOCK_INITIALIZER + #define macro_f_thread_lock_t_initialize(lock) lock + #define macro_f_thread_lock_t_delete_simple(lock) f_thread_lock_delete(&lock); #endif // _di_f_thread_lock_t_ @@ -355,6 +390,9 @@ extern "C" { #define f_thread_locks_t_initialize { 0, 0, 0 } + #define macro_f_thread_locks_t_initialize(array, size, used) { array, size, used } + #define macro_f_thread_locks_t_initialize2(array, length) { array, length, length } + #define macro_f_thread_locks_t_resize(status, locks, length) macro_f_memory_structure_resize(status, locks, f_thread_lock_t, length) #define macro_f_thread_locks_t_adjust(status, locks, length) macro_f_memory_structure_adjust(status, locks, f_thread_lock_t, length) @@ -375,6 +413,8 @@ extern "C" { #define f_thread_lock_attribute_t_initialize { 0 } + #define macro_f_thread_lock_attribute_t_initialize(attribute) attribute + // This does not clear the thread.attributes.__size array (may need to memset() against a sizeof(pthread_attr_t)). #define macro_f_thread_lock_attribute_t_clear(attribute) attribute.__align = 0; @@ -398,6 +438,9 @@ extern "C" { #define f_thread_lock_attributes_t_initialize { 0, 0, 0 } + #define macro_f_thread_lock_attributes_t_initialize(array, size, used) { array, size, used } + #define macro_f_thread_lock_attributes_t_initialize2(array, length) { array, length, length } + #define macro_f_thread_lock_attributes_t_clear(attributes) macro_f_memory_structure_clear(attributes) #define macro_f_thread_lock_attributes_t_resize(status, attributes, length) status = f_thread_lock_attributes_resize(length, &attributes); @@ -425,6 +468,8 @@ extern "C" { #define f_thread_mutex_t_initialize PTHREAD_MUTEX_INITIALIZER + #define macro_f_thread_mutex_t_initialize(mutex) mutex + #define macro_f_thread_mutex_t_delete_simple(mutex) f_thread_mutex_delete(&mutex); #endif // _di_f_thread_mutex_t_ @@ -445,6 +490,9 @@ extern "C" { #define f_thread_mutexs_t_initialize { 0, 0, 0 } + #define macro_f_thread_mutexs_t_initialize(array, size, used) { array, size, used } + #define macro_f_thread_mutexs_t_initialize2(array, length) { array, length, length } + #define macro_f_thread_mutexs_t_clear(mutexs) macro_f_memory_structure_clear(mutexs) #define macro_f_thread_mutexs_t_resize(status, mutexs, length) status = f_thread_mutexs_resize(length, &mutexs); @@ -467,6 +515,8 @@ extern "C" { #define f_thread_mutex_attribute_t_initialize { 0 } + #define macro_f_thread_mutex_attribute_t_initialize(attribute) attribute + // This does not clear the thread.attributes.__size array (may need to memset() against a sizeof(pthread_attr_t)). #define macro_f_thread_mutex_attribute_t_clear(attribute) attribute.__align = 0; @@ -490,6 +540,9 @@ extern "C" { #define f_thread_mutex_attributes_t_initialize { 0, 0, 0 } + #define macro_f_thread_mutex_attributes_t_initialize(array, size, used) { array, size, used } + #define macro_f_thread_mutex_attributes_t_initialize2(array, length) { array, length, length } + #define macro_f_thread_mutex_attributes_t_clear(attributes) macro_f_memory_structure_clear(attributes) #define macro_f_thread_mutex_attributes_t_resize(status, attributes, length) status = f_thread_mutex_attributes_resize(length, &attributes); @@ -513,6 +566,8 @@ extern "C" { typedef pthread_once_t f_thread_once_t; #define f_thread_once_t_initialize PTHREAD_ONCE_INIT + + #define macro_f_thread_once_t_initialize(once) once #endif // _di_f_thread_once_t_ /** @@ -532,6 +587,11 @@ extern "C" { #define f_thread_onces_t_initialize { 0, 0, 0 } + #define macro_f_thread_onces_t_initialize(array, size, used) { array, size, used } + #define macro_f_thread_onces_t_initialize2(array, length) { array, length, length } + + #define macro_f_thread_onces_t_clear(onces) macro_f_memory_structure_clear(onces) + #define macro_f_thread_onces_t_resize(status, onces, length) macro_f_memory_structure_resize(status, onces, f_thread_once_t, length) #define macro_f_thread_onces_t_adjust(status, onces, length) macro_f_memory_structure_adjust(status, onces, f_thread_once_t, length) @@ -556,6 +616,8 @@ extern "C" { #define f_thread_semaphore_t_initialize 0 + #define macro_f_thread_semaphore_t_initialize(semaphore) semaphore + #define macro_f_thread_semaphore_t_delete_simple(semaphore) f_thread_semaphore_delete(&semaphore); #endif // _di_f_thread_semaphore_t_ @@ -576,6 +638,9 @@ extern "C" { #define f_thread_semaphores_t_initialize { 0, 0, 0 } + #define macro_f_thread_semaphores_t_initialize(array, size, used) { array, size, used } + #define macro_f_thread_semaphores_t_initialize2(array, length) { array, length, length } + #define macro_f_thread_semaphores_t_clear(semaphores) macro_f_memory_structure_clear(semaphores) #define macro_f_thread_semaphores_t_resize(status, semaphores, length) status = f_thread_semaphores_resize(length, &semaphores); @@ -606,9 +671,12 @@ extern "C" { #define f_thread_set_t_initialize { f_thread_attribute_t_initialize, f_thread_id_t_initialize, 0 } + #define macro_f_thread_set_t_initialize(attribute, id, result) { attribute, id, result } + #define macro_f_thread_set_t_clear(thread) \ macro_f_thread_attribute_t_clear(thread.attribute) \ - macro_f_thread_id_t_clear(thread.id) + macro_f_thread_id_t_clear(thread.id) \ + result = 0; #define macro_f_thread_set_t_delete_simple(set) macro_f_thread_attribute_t_delete_simple(set.attribute) #endif // _di_f_thread_set_t_ @@ -630,6 +698,9 @@ extern "C" { #define f_thread_sets_t_initialize { 0, 0, 0 } + #define macro_f_thread_sets_t_initialize(array, size, used) { array, size, used } + #define macro_f_thread_sets_t_initialize2(array, length) { array, length, length } + #define macro_f_thread_sets_t_clear(sets) macro_f_memory_structure_clear(sets) #define macro_f_thread_sets_t_resize(status, sets, length) status = f_thread_sets_resize(length, &sets); @@ -654,6 +725,8 @@ extern "C" { #define f_thread_spin_t_initialize ((pthread_spinlock_t) 0xFFFFFFFF) + #define macro_f_thread_spin_t_initialize(spin) spin + #define macro_f_thread_spin_t_delete_simple(spin) f_thread_spin_delete(&spin); #endif // _di_f_thread_spin_t_ @@ -674,6 +747,9 @@ extern "C" { #define f_thread_spins_t_initialize { 0, 0, 0 } + #define macro_f_thread_spins_t_initialize(array, size, used) { array, size, used } + #define macro_f_thread_spins_t_initialize2(array, length) { array, length, length } + #define macro_f_thread_spins_t_clear(spins) macro_f_memory_structure_clear(spins) #define macro_f_thread_spins_t_resize(status, spins, length) status = f_thread_spins_resize(length, &spins); diff --git a/level_0/f_type/c/type.h b/level_0/f_type/c/type.h index 9e858b2..4db4cec 100644 --- a/level_0/f_type/c/type.h +++ b/level_0/f_type/c/type.h @@ -304,6 +304,8 @@ extern "C" { #define f_array_length_t_initialize 0 + #define macro_f_array_length_t_initialize(length) length + #define F_array_length_t_size_d F_number_t_size_unsigned_d #define F_array_length_t_size_max_d F_number_t_size_max_unsigned_d #endif // _di_f_array_t_ @@ -311,8 +313,8 @@ extern "C" { /** * A structure designating a row and column, just like a cell in a table. * - * row: the row position. - * column: the column position. + * row: The row position. + * column: The column position. */ #ifndef _di_f_cell_t_ typedef struct { @@ -322,6 +324,8 @@ extern "C" { #define f_cell_t_initialize { 0, 0 } + #define macro_f_cell_t_initialize(row, column) { row, column } + #define macro_f_cell_t_clear(cell) \ cell.row = 0; \ cell.column = 0; @@ -345,6 +349,9 @@ extern "C" { } f_cells_t; #define f_cells_t_initialize { 0, 0, 0 } + + #define macro_f_cells_t_initialize(array, size, used) { array, size, used } + #define macro_f_cells_t_initialize2(array, length) { array, length, length } #endif // _di_f_cells_t_ /** @@ -365,6 +372,9 @@ extern "C" { } f_cellss_t; #define f_cellss_t_initialize { 0, 0, 0 } + + #define macro_f_cellss_t_initialize(array, size, used) { array, size, used } + #define macro_f_cellss_t_initialize2(array, length) { array, length, length } #endif // _di_f_cellss_t_ /** @@ -527,6 +537,9 @@ extern "C" { } f_array_lengths_t; #define f_array_lengths_t_initialize { 0, 0, 0 } + + #define macro_f_array_lengths_t_initialize(array, size, used) { array, size, used } + #define macro_f_array_lengths_t_initialize2(array, length) { array, length, length } #endif // _di_f_array_lengths_t_ /** @@ -547,6 +560,9 @@ extern "C" { } f_array_lengthss_t; #define f_array_lengthss_t_initialize { 0, 0, 0 } + + #define macro_f_array_lengthss_t_initialize(array, size, used) { array, size, used } + #define macro_f_array_lengthss_t_initialize2(array, length) { array, length, length } #endif // _di_f_array_lengthss_t_ /** @@ -567,6 +583,9 @@ extern "C" { } f_int8s_t; #define f_int8s_t_initialize { 0, 0, 0 } + + #define macro_f_int8s_t_initialize(array, size, used) { array, size, used } + #define macro_f_int8s_t_initialize2(array, length) { array, length, length } #endif // _di_int8s_t_ /** @@ -587,6 +606,9 @@ extern "C" { } f_int8ss_t; #define f_int8ss_t_initialize { 0, 0, 0 } + + #define macro_f_int8ss_t_initialize(array, size, used) { array, size, used } + #define macro_f_int8ss_t_initialize2(array, length) { array, length, length } #endif // _di_int8ss_t_ /** @@ -607,6 +629,9 @@ extern "C" { } f_uint8s_t; #define f_uint8s_t_initialize { 0, 0, 0 } + + #define macro_f_uint8s_t_initialize(array, size, used) { array, size, used } + #define macro_f_uint8s_t_initialize2(array, length) { array, length, length } #endif // _di_uint8s_t_ /** @@ -627,6 +652,9 @@ extern "C" { } f_uint8ss_t; #define f_uint8ss_t_initialize { 0, 0, 0 } + + #define macro_f_uint8ss_t_initialize(array, size, used) { array, size, used } + #define macro_f_uint8ss_t_initialize2(array, length) { array, length, length } #endif // _di_uint8ss_t_ /** @@ -647,6 +675,9 @@ extern "C" { } f_int16s_t; #define f_int16s_t_initialize { 0, 0, 0 } + + #define macro_f_int16s_t_initialize(array, size, used) { array, size, used } + #define macro_f_int16s_t_initialize2(array, length) { array, length, length } #endif // _di_int16s_t_ /** @@ -667,6 +698,9 @@ extern "C" { } f_int16ss_t; #define f_int16ss_t_initialize { 0, 0, 0 } + + #define macro_f_int16ss_t_initialize(array, size, used) { array, size, used } + #define macro_f_int16ss_t_initialize2(array, length) { array, length, length } #endif // _di_int16ss_t_ /** @@ -687,6 +721,9 @@ extern "C" { } f_uint16s_t; #define f_uint16s_t_initialize { 0, 0, 0 } + + #define macro_f_uint16s_t_initialize(array, size, used) { array, size, used } + #define macro_f_uint16s_t_initialize2(array, length) { array, length, length } #endif // _di_uint16s_t_ /** @@ -707,6 +744,9 @@ extern "C" { } f_uint16ss_t; #define f_uint16ss_t_initialize { 0, 0, 0 } + + #define macro_f_uint16s_t_initialize(array, size, used) { array, size, used } + #define macro_f_uint16s_t_initialize2(array, length) { array, length, length } #endif // _di_uint16ss_t_ /** @@ -727,6 +767,9 @@ extern "C" { } f_int32s_t; #define f_int32s_t_initialize { 0, 0, 0 } + + #define macro_f_int32s_t_initialize(array, size, used) { array, size, used } + #define macro_f_int32s_t_initialize2(array, length) { array, length, length } #endif // _di_int32s_t_ /** @@ -747,6 +790,9 @@ extern "C" { } f_int32ss_t; #define f_int32ss_t_initialize { 0, 0, 0 } + + #define macro_f_int32ss_t_initialize(array, size, used) { array, size, used } + #define macro_f_int32ss_t_initialize2(array, length) { array, length, length } #endif // _di_int32ss_t_ /** @@ -767,6 +813,9 @@ extern "C" { } f_uint32s_t; #define f_uint32s_t_initialize { 0, 0, 0 } + + #define macro_f_uint32s_t_initialize(array, size, used) { array, size, used } + #define macro_f_uint32s_t_initialize2(array, length) { array, length, length } #endif // _di_uint32s_t_ /** @@ -787,6 +836,9 @@ extern "C" { } f_uint32ss_t; #define f_uint32ss_t_initialize { 0, 0, 0 } + + #define macro_f_uint32ss_t_initialize(array, size, used) { array, size, used } + #define macro_f_uint32ss_t_initialize2(array, length) { array, length, length } #endif // _di_uint32ss_t_ /** @@ -807,6 +859,9 @@ extern "C" { } f_int64s_t; #define f_int64s_t_initialize { 0, 0, 0 } + + #define macro_f_int64s_t_initialize(array, size, used) { array, size, used } + #define macro_f_int64s_t_initialize2(array, length) { array, length, length } #endif // _di_int64s_t_ /** @@ -827,6 +882,9 @@ extern "C" { } f_int64ss_t; #define f_int64ss_t_initialize { 0, 0, 0 } + + #define macro_f_int64ss_t_initialize(array, size, used) { array, size, used } + #define macro_f_int64ss_t_initialize2(array, length) { array, length, length } #endif // _di_int64ss_t_ /** @@ -847,6 +905,9 @@ extern "C" { } f_uint64s_t; #define f_uint64s_t_initialize { 0, 0, 0 } + + #define macro_f_uint64s_t_initialize(array, size, used) { array, size, used } + #define macro_f_uint64s_t_initialize2(array, length) { array, length, length } #endif // _di_uint64s_t_ /** @@ -867,6 +928,9 @@ extern "C" { } f_uint64ss_t; #define f_uint64ss_t_initialize { 0, 0, 0 } + + #define macro_f_uint64ss_t_initialize(array, size, used) { array, size, used } + #define macro_f_uint64ss_t_initialize2(array, length) { array, length, length } #endif // _di_uint64ss_t_ /** @@ -914,6 +978,9 @@ extern "C" { } f_int128s_t; #define f_int128s_t_initialize { 0, 0, 0 } + + #define macro_f_int128s_t_initialize(array, size, used) { array, size, used } + #define macro_f_int128s_t_initialize2(array, length) { array, length, length } #endif // _di_int128s_t_ /** @@ -934,6 +1001,9 @@ extern "C" { } f_int128ss_t; #define f_int128ss_t_initialize { 0, 0, 0 } + + #define macro_f_int128ss_t_initialize(array, size, used) { array, size, used } + #define macro_f_int128ss_t_initialize2(array, length) { array, length, length } #endif // _di_int128ss_t_ /** @@ -954,6 +1024,9 @@ extern "C" { } f_uint128s_t; #define f_uint128s_t_initialize { 0, 0, 0 } + + #define macro_f_uint128s_t_initialize(array, size, used) { array, size, used } + #define macro_f_uint128s_t_initialize2(array, length) { array, length, length } #endif // _di_uint128s_t_ /** @@ -974,6 +1047,9 @@ extern "C" { } f_uint128ss_t; #define f_uint128ss_t_initialize { 0, 0, 0 } + + #define macro_f_uint128ss_t_initialize(array, size, used) { array, size, used } + #define macro_f_uint128ss_t_initialize2(array, length) { array, length, length } #endif // _di_uint128ss_t_ /** @@ -994,6 +1070,9 @@ extern "C" { } f_statuss_t; #define f_statuss_t_initialize { 0, 0, 0 } + + #define macro_f_statuss_t_initialize(array, size, used) { array, size, used } + #define macro_f_statuss_t_initialize2(array, length) { array, length, length } #endif // _di_f_statuss_t_ /** @@ -1014,6 +1093,9 @@ extern "C" { } f_statusss_t; #define f_statusss_t_initialize { 0, 0, 0 } + + #define macro_f_statusss_t_initialize(array, size, used) { array, size, used } + #define macro_f_statusss_t_initialize2(array, length) { array, length, length } #endif // _di_f_statusss_t_ /** @@ -1034,6 +1116,9 @@ extern "C" { } f_states_t; #define f_states_t_initialize { 0, 0, 0 } + + #define macro_f_states_t_initialize(array, size, used) { array, size, used } + #define macro_f_states_t_initialize2(array, length) { array, length, length } #endif // _di_f_states_t_ /** @@ -1054,6 +1139,9 @@ extern "C" { } f_statess_t; #define f_statess_t_initialize { 0, 0, 0 } + + #define macro_f_statess_t_initialize(array, size, used) { array, size, used } + #define macro_f_statess_t_initialize2(array, length) { array, length, length } #endif // _di_f_statess_t_ /** @@ -1098,6 +1186,8 @@ extern "C" { 0, \ } + #define macro_f_fll_id_t_initialize(name, type, used) { name, type, used } + #define macro_f_fll_id_t_clear(id) \ id.name[0] = 0; \ id.type = 0; \ @@ -1122,6 +1212,9 @@ extern "C" { } f_fll_ids_t; #define f_fll_ids_t_initialize { 0, 0, 0 } + + #define macro_f_fll_ids_t_initialize(array, size, used) { array, size, used } + #define macro_f_fll_ids_t_initialize2(array, length) { array, length, length } #endif // _di_f_fll_ids_t_ /** @@ -1142,6 +1235,9 @@ extern "C" { } f_fll_idss_t; #define f_fll_idss_t_initialize { 0, 0, 0 } + + #define macro_f_fll_idss_t_initialize(array, size, used) { array, size, used } + #define macro_f_fll_idss_t_initialize2(array, length) { array, length, length } #endif // _di_f_fll_idss_t_ #ifdef __cplusplus diff --git a/level_1/fl_directory/c/directory/common.h b/level_1/fl_directory/c/directory/common.h index 87f9b79..e2b1589 100644 --- a/level_1/fl_directory/c/directory/common.h +++ b/level_1/fl_directory/c/directory/common.h @@ -59,6 +59,15 @@ extern "C" { } fl_directory_recurse_t; #define fl_directory_recurse_t_initialize { FL_directory_recurse_depth_max_d, F_file_default_read_size_d, F_false, macro_f_file_t_initialize2(F_type_output_d, F_type_descriptor_output_d, F_file_flag_write_only_d), 0, 0 } + + #define macro_fl_directory_recurse_t_initialize(depth_max, size_block, exclusive, output, verbose, failures) { \ + depth_max, \ + size_block, \ + exclusive, \ + output, \ + verbose, \ + failures \ + } #endif // _di_fl_directory_recurse_t_ #ifdef __cplusplus diff --git a/level_1/fl_iki/data/build/settings b/level_1/fl_iki/data/build/settings index 6345afe..8425f1d 100644 --- a/level_1/fl_iki/data/build/settings +++ b/level_1/fl_iki/data/build/settings @@ -22,7 +22,7 @@ build_indexer ar build_indexer_arguments rcs build_language c build_libraries -lc -build_libraries-individual -lf_iki -lf_memory -lf_string -lf_utf +build_libraries-individual -lf_iki -lf_memory -lf_string -lf_type_array -lf_utf build_libraries_shared build_libraries_static build_objects_library diff --git a/level_1/fl_signal/c/signal/common.h b/level_1/fl_signal/c/signal/common.h index 4f61f13..664de91 100644 --- a/level_1/fl_signal/c/signal/common.h +++ b/level_1/fl_signal/c/signal/common.h @@ -33,6 +33,7 @@ extern "C" { #define fl_signal_interrupt_t_initialize { f_int32s_t_initialize, f_signal_t_initialize, 0 } #define macro_fl_signal_interrupt_t_initialize(interrupts, signal) { interrupts, signal, 0 } + #define macro_fl_signal_interrupt_t_initialize2(interrupts, signal, trigger) { interrupts, signal, trigger } #define macro_fl_signal_interrupt_t_clear(structure) \ macro_f_int32s_t_clear(structure.interrupts) \ diff --git a/level_2/fll_iki/data/build/settings b/level_2/fll_iki/data/build/settings index 64e7b2a..dfed915 100644 --- a/level_2/fll_iki/data/build/settings +++ b/level_2/fll_iki/data/build/settings @@ -22,7 +22,7 @@ build_indexer ar build_indexer_arguments rcs build_language c build_libraries -lc -build_libraries-individual -lfl_iki -lf_iki -lf_memory -lf_string -lf_utf +build_libraries-individual -lfl_iki -lf_iki -lf_memory -lf_string -lf_type_array -lf_utf build_libraries_shared build_libraries_static build_objects_library diff --git a/level_2/fll_program/c/program/common.h b/level_2/fll_program/c/program/common.h index 2856780..18cbf63 100644 --- a/level_2/fll_program/c/program/common.h +++ b/level_2/fll_program/c/program/common.h @@ -68,6 +68,17 @@ extern "C" { f_signal_t_initialize, \ f_color_context_t_initialize, \ } + + #define macro_fll_program_data_t_initialize(parameters, signal_check, process_pipe, output, error, warning, signal, context) { \ + parameters, \ + signal_check, \ + process_pipe, \ + output, \ + error, \ + warning, \ + signal, \ + context, \ + } #endif // _di_fll_program_data_t_ /** -- 1.8.3.1