From: Kevin Day Date: Mon, 18 Oct 2021 02:04:56 +0000 (-0500) Subject: Refactor: Use the newer _s and _d define strategy. X-Git-Tag: 0.5.6~10 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=f6117ce08fb4e7386f3f5c6a7f00f912651b2154;p=fll Refactor: Use the newer _s and _d define strategy. This new strategy allows for the "const char *"s to be more directly the same as the "#define"s. For example, "F_console_standard_short_dark_s" is the "#define" and "f_console_standard_short_dark_s" is the "const char *". The use of uppercase is tolerated here as an exceptional case because F, FL, and FLL are sufficiently short enough to not be an eyesore. No changes are made to exist "macro_*". I will contemplate changing the "macro_XXX" to instead be "XXX_m" to match the "XXX_s" and "XXX_d" notations. As an additional exception case, the length "#defines" that are directly coupled to a string, are of the fom "XXX_s_length" rather than "XXX_d". This directly identifies that these only exist within direct relationship to the string "#define". The "#define" will now have uppercase in the level 0, 1, and 2 projects. Level 3, being programs, only conditionally follow to avoid using too many uppercase characters (ie: fss_basic_list_read_xxx vs FSS_BASIC_LIST_READ_xxx). --- diff --git a/level_0/f_account/c/account-common.h b/level_0/f_account/c/account-common.h index b7c9998..8bd0fee 100644 --- a/level_0/f_account/c/account-common.h +++ b/level_0/f_account/c/account-common.h @@ -19,12 +19,13 @@ extern "C" { /** * Custom defines for f_account. * - * f_account_pwd_length_fallback_first: provide a fallback max length for when sysconf(_SC_GETPW_R_SIZE_MAX) return -1 (aka: infinite). - * f_account_pwd_length_fallback_second: provide a fallback max length for when f_account_pwd_length_fallback_first is too small. + * F_account_pwd_length_fallback_*: + * - first: provide a fallback max length for when sysconf(_SC_GETPW_R_SIZE_MAX) return -1 (aka: infinite). + * - second: provide a fallback max length for when F_account_pwd_length_fallback_first_d is too small. */ #ifndef _di_f_account_defines_ - #define f_account_pwd_length_fallback_first 8192 - #define f_account_pwd_length_fallback_second 32767 + #define F_account_pwd_length_fallback_first_d 8192 + #define F_account_pwd_length_fallback_second_d 32767 #endif // _di_f_account_defines_ /** diff --git a/level_0/f_account/c/account.c b/level_0/f_account/c/account.c index 8c15854..cf5b41c 100644 --- a/level_0/f_account/c/account.c +++ b/level_0/f_account/c/account.c @@ -29,7 +29,7 @@ extern "C" { { if (length == -1) { - length = f_account_pwd_length_fallback_first; + length = F_account_pwd_length_fallback_first_d; } // must be set to 0 to avoid problems due to the design of getpwnam()/getpwnam_r(). @@ -61,9 +61,9 @@ extern "C" { } } - length = f_account_pwd_length_fallback_second; + length = F_account_pwd_length_fallback_second_d; - char buffer[f_account_pwd_length_fallback_second]; + char buffer[F_account_pwd_length_fallback_second_d]; const int result = getpwnam_r(name, &password, buffer, length, &pointer); @@ -110,7 +110,7 @@ extern "C" { { if (length == -1) { - length = f_account_pwd_length_fallback_first; + length = F_account_pwd_length_fallback_first_d; } // must be set to 0 to avoid problems due to the design of getpwuid()/getpwuid_r(). @@ -142,9 +142,9 @@ extern "C" { } } - length = f_account_pwd_length_fallback_second; + length = F_account_pwd_length_fallback_second_d; - char buffer[f_account_pwd_length_fallback_second]; + char buffer[F_account_pwd_length_fallback_second_d]; const int result = getpwuid_r(id, &password, buffer, length, &pointer); @@ -183,7 +183,7 @@ extern "C" { { if (length == -1) { - length = f_account_pwd_length_fallback_first; + length = F_account_pwd_length_fallback_first_d; } // must be set to 0 to avoid problems due to the design of getgrnam()/getgrnam_r(). @@ -217,9 +217,9 @@ extern "C" { } } - length = f_account_pwd_length_fallback_second; + length = F_account_pwd_length_fallback_second_d; - char buffer[f_account_pwd_length_fallback_second]; + char buffer[F_account_pwd_length_fallback_second_d]; const int result = getgrnam_r(name, &grp, buffer, length, &pointer); @@ -260,7 +260,7 @@ extern "C" { { if (length == -1) { - length = f_account_pwd_length_fallback_first; + length = F_account_pwd_length_fallback_first_d; } // must be set to 0 to avoid problems due to the design of getpwnam()/getpwnam_r(). @@ -294,9 +294,9 @@ extern "C" { } } - length = f_account_pwd_length_fallback_second; + length = F_account_pwd_length_fallback_second_d; - char buffer[f_account_pwd_length_fallback_second]; + char buffer[F_account_pwd_length_fallback_second_d]; const int result = getpwnam_r(name, &password, buffer, length, &pointer); @@ -341,7 +341,7 @@ extern "C" { { if (length == -1) { - length = f_account_pwd_length_fallback_first; + length = F_account_pwd_length_fallback_first_d; } // must be set to 0 to avoid problems due to the design of getpwuid()/getpwuid_r(). @@ -383,9 +383,9 @@ extern "C" { } } - length = f_account_pwd_length_fallback_second; + length = F_account_pwd_length_fallback_second_d; - char buffer[f_account_pwd_length_fallback_second]; + char buffer[F_account_pwd_length_fallback_second_d]; const int result = getpwuid_r(id, &password, buffer, length, &pointer); diff --git a/level_0/f_account/c/private-account.h b/level_0/f_account/c/private-account.h index 77374cf..5e330ab 100644 --- a/level_0/f_account/c/private-account.h +++ b/level_0/f_account/c/private-account.h @@ -39,7 +39,7 @@ extern "C" { * @see macro_f_string_dynamic_t_resize() */ #if !defined(_di_f_account_by_name_) || !defined(_di_f_account_by_id_) - extern f_status_t private_f_account_from_passwd(const struct passwd password, const f_array_length_t password_length, f_account_t *account) f_attribute_visibility_internal; + extern f_status_t private_f_account_from_passwd(const struct passwd password, const f_array_length_t password_length, f_account_t *account) F_attribute_visibility_internal_d; #endif // !defined(_di_f_account_by_name_) || !defined(_di_f_account_by_id_) #ifdef __cplusplus diff --git a/level_0/f_capability/c/capability.c b/level_0/f_capability/c/capability.c index d00e4fe..4b012bf 100644 --- a/level_0/f_capability/c/capability.c +++ b/level_0/f_capability/c/capability.c @@ -1047,7 +1047,7 @@ extern "C" { const f_array_length_t length = strlen(result); if (name->used + length + 1 > name->size) { - if (name->used + length + 1 > f_string_t_size) { + if (name->used + length + 1 > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -1088,7 +1088,7 @@ extern "C" { if (result) { if (text->used + length + 1 > text->size) { - if (text->used + length + 1 > f_string_t_size) { + if (text->used + length + 1 > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } diff --git a/level_0/f_color/c/color-common.c b/level_0/f_color/c/color-common.c index 38a24ed..e461660 100644 --- a/level_0/f_color/c/color-common.c +++ b/level_0/f_color/c/color-common.c @@ -5,48 +5,48 @@ extern "C" { #endif #ifndef _di_f_color_strings_s_ - const f_string_t f_color_string_begin_s = "\033["; - const f_string_t f_color_string_end_s = "m"; - const f_string_t f_color_string_medium_s = ";"; + const f_string_t f_color_string_begin_s = F_color_string_begin_s; + const f_string_t f_color_string_end_s = F_color_string_end_s; + const f_string_t f_color_string_medium_s = F_color_string_medium_s; - const f_string_t f_color_string_code_reset_s = "0"; - const f_string_t f_color_string_code_bold_s = "1"; - const f_string_t f_color_string_code_underline_s = "4"; - const f_string_t f_color_string_code_blink_s = "5"; - const f_string_t f_color_string_code_reverse_s = "7"; - const f_string_t f_color_string_code_conceal_s = "8"; - const f_string_t f_color_string_code_black_s = "30"; - const f_string_t f_color_string_code_red_s = "31"; - const f_string_t f_color_string_code_green_s = "32"; - const f_string_t f_color_string_code_yellow_s = "33"; - const f_string_t f_color_string_code_blue_s = "34"; - const f_string_t f_color_string_code_purple_s = "35"; - const f_string_t f_color_string_code_teal_s = "36"; - const f_string_t f_color_string_code_white_s = "37"; - const f_string_t f_color_string_code_black_bg_s = "40"; - const f_string_t f_color_string_code_red_bg_s = "41"; - const f_string_t f_color_string_code_green_bg_s = "42"; - const f_string_t f_color_string_code_yellow_bg_s = "43"; - const f_string_t f_color_string_code_blue_bg_s = "44"; - const f_string_t f_color_string_code_purple_bg_s = "45"; - const f_string_t f_color_string_code_teal_bg_s = "46"; - const f_string_t f_color_string_code_white_bg_s = "47"; - const f_string_t f_color_string_code_bright_black_s = "90"; - const f_string_t f_color_string_code_bright_red_s = "91"; - const f_string_t f_color_string_code_bright_green_s = "92"; - const f_string_t f_color_string_code_bright_yellow_s = "93"; - const f_string_t f_color_string_code_bright_blue_s = "94"; - const f_string_t f_color_string_code_bright_purple_s = "95"; - const f_string_t f_color_string_code_bright_teal_s = "96"; - const f_string_t f_color_string_code_bright_white_s = "97"; - const f_string_t f_color_string_code_bright_black_bg_s = "100"; - const f_string_t f_color_string_code_bright_red_bg_s = "101"; - const f_string_t f_color_string_code_bright_green_bg_s = "102"; - const f_string_t f_color_string_code_bright_yellow_bg_s = "103"; - const f_string_t f_color_string_code_bright_blue_bg_s = "104"; - const f_string_t f_color_string_code_bright_purple_bg_s = "105"; - const f_string_t f_color_string_code_bright_teal_bg_s = "106"; - const f_string_t f_color_string_code_bright_white_bg_s = "107"; + const f_string_t f_color_string_code_reset_s = F_color_string_code_reset_s; + const f_string_t f_color_string_code_bold_s = F_color_string_code_bold_s; + const f_string_t f_color_string_code_underline_s = F_color_string_code_underline_s; + const f_string_t f_color_string_code_blink_s = F_color_string_code_blink_s; + const f_string_t f_color_string_code_reverse_s = F_color_string_code_reverse_s; + const f_string_t f_color_string_code_conceal_s = F_color_string_code_conceal_s; + const f_string_t f_color_string_code_black_s = F_color_string_code_black_s; + const f_string_t f_color_string_code_red_s = F_color_string_code_red_s; + const f_string_t f_color_string_code_green_s = F_color_string_code_green_s; + const f_string_t f_color_string_code_yellow_s = F_color_string_code_yellow_s; + const f_string_t f_color_string_code_blue_s = F_color_string_code_blue_s; + const f_string_t f_color_string_code_purple_s = F_color_string_code_purple_s; + const f_string_t f_color_string_code_teal_s = F_color_string_code_teal_s; + const f_string_t f_color_string_code_white_s = F_color_string_code_white_s; + const f_string_t f_color_string_code_black_bg_s = F_color_string_code_black_bg_s; + const f_string_t f_color_string_code_red_bg_s = F_color_string_code_red_bg_s; + const f_string_t f_color_string_code_green_bg_s = F_color_string_code_green_bg_s; + const f_string_t f_color_string_code_yellow_bg_s = F_color_string_code_yellow_bg_s; + const f_string_t f_color_string_code_blue_bg_s = F_color_string_code_blue_bg_s; + const f_string_t f_color_string_code_purple_bg_s = F_color_string_code_purple_bg_s; + const f_string_t f_color_string_code_teal_bg_s = F_color_string_code_teal_bg_s; + const f_string_t f_color_string_code_white_bg_s = F_color_string_code_white_bg_s; + const f_string_t f_color_string_code_bright_black_s = F_color_string_code_bright_black_s; + const f_string_t f_color_string_code_bright_red_s = F_color_string_code_bright_red_s; + const f_string_t f_color_string_code_bright_green_s = F_color_string_code_bright_green_s; + const f_string_t f_color_string_code_bright_yellow_s = F_color_string_code_bright_yellow_s; + const f_string_t f_color_string_code_bright_blue_s = F_color_string_code_bright_blue_s; + const f_string_t f_color_string_code_bright_purple_s = F_color_string_code_bright_purple_s; + const f_string_t f_color_string_code_bright_teal_s = F_color_string_code_bright_teal_s; + const f_string_t f_color_string_code_bright_white_s = F_color_string_code_bright_white_s; + const f_string_t f_color_string_code_bright_black_bg_s = F_color_string_code_bright_black_bg_s; + const f_string_t f_color_string_code_bright_red_bg_s = F_color_string_code_bright_red_bg_s; + const f_string_t f_color_string_code_bright_green_bg_s = F_color_string_code_bright_green_bg_s; + const f_string_t f_color_string_code_bright_yellow_bg_s = F_color_string_code_bright_yellow_bg_s; + const f_string_t f_color_string_code_bright_blue_bg_s = F_color_string_code_bright_blue_bg_s; + const f_string_t f_color_string_code_bright_purple_bg_s = F_color_string_code_bright_purple_bg_s; + const f_string_t f_color_string_code_bright_teal_bg_s = F_color_string_code_bright_teal_bg_s; + const f_string_t f_color_string_code_bright_white_bg_s = F_color_string_code_bright_white_bg_s; #endif // _di_f_color_strings_s_ #ifndef _di_f_color_set_string_empty_s_ diff --git a/level_0/f_color/c/color-common.h b/level_0/f_color/c/color-common.h index 625aa95..a058012 100644 --- a/level_0/f_color/c/color-common.h +++ b/level_0/f_color/c/color-common.h @@ -17,21 +17,64 @@ extern "C" { #endif #ifndef _di_f_color_max_size_ - #define f_color_max_size 7 + #define F_color_max_size_d 7 #endif // _di_f_color_max_size_ #ifndef _di_f_color_types_t_ typedef char f_color_code_t; - #define f_color_code_none 0 - #define f_color_code_linux 1 - #define f_color_code_xterminal 2 + #define F_color_code_none_d 0 + #define F_color_code_linux_d 1 + #define F_color_code_xterminal_d 2 #endif // _di_f_color_types_t_ /** * Provide a global color related strings. */ #ifndef _di_f_color_strings_s_ + #define F_color_string_begin_s "\033["; + #define F_color_string_end_s "m"; + #define F_color_string_medium_s ";"; + + #define F_color_string_code_reset_s "0" + #define F_color_string_code_bold_s "1" + #define F_color_string_code_underline_s "4" + #define F_color_string_code_blink_s "5" + #define F_color_string_code_reverse_s "7" + #define F_color_string_code_conceal_s "8" + #define F_color_string_code_black_s "30" + #define F_color_string_code_red_s "31" + #define F_color_string_code_green_s "32" + #define F_color_string_code_yellow_s "33" + #define F_color_string_code_blue_s "34" + #define F_color_string_code_purple_s "35" + #define F_color_string_code_teal_s "36" + #define F_color_string_code_white_s "37" + #define F_color_string_code_black_bg_s "40" + #define F_color_string_code_red_bg_s "41" + #define F_color_string_code_green_bg_s "42" + #define F_color_string_code_yellow_bg_s "43" + #define F_color_string_code_blue_bg_s "44" + #define F_color_string_code_purple_bg_s "45" + #define F_color_string_code_teal_bg_s "46" + #define F_color_string_code_white_bg_s "47" + #define F_color_string_code_bright_black_s "90" + #define F_color_string_code_bright_red_s "91" + #define F_color_string_code_bright_green_s "92" + #define F_color_string_code_bright_yellow_s "93" + #define F_color_string_code_bright_blue_s "94" + #define F_color_string_code_bright_purple_s "95" + #define F_color_string_code_bright_teal_s "96" + #define F_color_string_code_bright_white_s "97" + #define F_color_string_code_bright_black_bg_s "100" + #define F_color_string_code_bright_red_bg_s "101" + #define F_color_string_code_bright_green_bg_s "102" + #define F_color_string_code_bright_yellow_bg_s "103" + #define F_color_string_code_bright_blue_bg_s "104" + #define F_color_string_code_bright_purple_bg_s "105" + #define F_color_string_code_bright_teal_bg_s "106" + #define F_color_string_code_bright_white_bg_s "107" + extern const f_string_t f_color_string_begin_s; extern const f_string_t f_color_string_end_s; extern const f_string_t f_color_string_medium_s; @@ -81,16 +124,19 @@ extern "C" { * * Color modes communicate how the color is supposed to be. * - * The f_color_mode_none define designates that there is no assigned mode (the mode is undefined). - * The f_color_mode_no_color define designates that the color mode is set to no color (disable colors). + * F_color_mode_*: + * - none: define designates that there is no assigned mode (the mode is undefined). + * - no_color: define designates that the color mode is set to no color (disable colors). + * - dark: define designates that the color mode is for dark backgrounds. + * - light: define designates that the color mode is for light backgrounds. */ #ifndef _di_f_color_mode_t_ typedef uint8_t f_color_mode_t; - #define f_color_mode_none 0 - #define f_color_mode_no_color 1 - #define f_color_mode_dark 2 - #define f_color_mode_light 3 + #define F_color_mode_none_d 0 + #define F_color_mode_no_color_d 1 + #define F_color_mode_dark_d 2 + #define F_color_mode_light_d 3 #endif // _di_f_color_mode_t_ #ifndef _di_f_color_format_t_ @@ -402,12 +448,12 @@ extern "C" { f_string_dynamic_t normal_reset; } f_color_context_t; - #define f_color_context_t_initialize { f_color_t_initialize_linux, f_color_format_t_initialize_linux, f_color_mode_none, f_color_set_context_t_initialize, 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, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize } + #define f_color_context_t_initialize { f_color_t_initialize_linux, f_color_format_t_initialize_linux, F_color_mode_none_d, f_color_set_context_t_initialize, 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, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize } #define macro_f_color_context_t_clear(context) \ macro_f_color_t_clear(context.list) \ macro_f_color_format_t_clear(context.format) \ - context.mode = f_color_mode_none; \ + context.mode = F_color_mode_none_d; \ macro_f_color_set_context_t_clear(context.set) \ macro_f_string_dynamic_t_clear(context.error) \ macro_f_string_dynamic_t_clear(context.title) \ @@ -418,15 +464,15 @@ extern "C" { macro_f_string_dynamic_t_clear(context.normal_reset) #define macro_f_color_context_t_new(status, context) \ - macro_f_string_dynamic_t_resize(status, context.reset, f_color_max_size + 1) \ - if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.warning, f_color_max_size + 1) \ - if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.error, f_color_max_size + 1) \ - if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.title, f_color_max_size + 1) \ - if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.notable, f_color_max_size + 1) \ - if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.important, f_color_max_size + 1) \ - if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.standout, f_color_max_size + 1) \ - if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.normal, f_color_max_size + 1) \ - if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.normal_reset, f_color_max_size + 1) + macro_f_string_dynamic_t_resize(status, context.reset, F_color_max_size_d + 1) \ + if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.warning, F_color_max_size_d + 1) \ + if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.error, F_color_max_size_d + 1) \ + if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.title, F_color_max_size_d + 1) \ + if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.notable, F_color_max_size_d + 1) \ + if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.important, F_color_max_size_d + 1) \ + if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.standout, F_color_max_size_d + 1) \ + if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.normal, F_color_max_size_d + 1) \ + if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.normal_reset, F_color_max_size_d + 1) #define macro_f_color_context_t_delete_simple(context) \ macro_f_string_dynamic_t_delete_simple(context.reset) \ diff --git a/level_0/f_color/c/color.c b/level_0/f_color/c/color.c index f3c00f2..56eee24 100644 --- a/level_0/f_color/c/color.c +++ b/level_0/f_color/c/color.c @@ -52,7 +52,7 @@ extern "C" { } if (F_status_is_error_not(status)) { - context->mode = f_color_mode_light; + context->mode = F_color_mode_light_d; } if (F_status_is_error_not(status)) { @@ -69,7 +69,7 @@ extern "C" { } if (F_status_is_error_not(status)) { - context->mode = f_color_mode_dark; + context->mode = F_color_mode_dark_d; } if (F_status_is_error_not(status)) { @@ -122,13 +122,13 @@ extern "C" { if (!color4 && color5 != 0) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - f_array_length_t string_size = strnlen(format.begin, f_color_max_size) + strnlen(format.end, f_color_max_size) + 1; + f_array_length_t string_size = strnlen(format.begin, F_color_max_size_d) + strnlen(format.end, F_color_max_size_d) + 1; - if (!color2) string_size += strnlen(color1, f_color_max_size); - else if (!color3) string_size += strnlen(color1, f_color_max_size) + strnlen(color2, f_color_max_size); - else if (!color4) string_size += strnlen(color1, f_color_max_size) + strnlen(color2, f_color_max_size) + strnlen(color3, f_color_max_size); - else if (!color5) string_size += strnlen(color1, f_color_max_size) + strnlen(color2, f_color_max_size) + strnlen(color3, f_color_max_size) + strnlen(color4, f_color_max_size); - else string_size += strnlen(color1, f_color_max_size) + strnlen(color2, f_color_max_size) + strnlen(color3, f_color_max_size) + strnlen(color4, f_color_max_size) + strnlen(color5, f_color_max_size); + if (!color2) string_size += strnlen(color1, F_color_max_size_d); + else if (!color3) string_size += strnlen(color1, F_color_max_size_d) + strnlen(color2, F_color_max_size_d); + else if (!color4) string_size += strnlen(color1, F_color_max_size_d) + strnlen(color2, F_color_max_size_d) + strnlen(color3, F_color_max_size_d); + else if (!color5) string_size += strnlen(color1, F_color_max_size_d) + strnlen(color2, F_color_max_size_d) + strnlen(color3, F_color_max_size_d) + strnlen(color4, F_color_max_size_d); + else string_size += strnlen(color1, F_color_max_size_d) + strnlen(color2, F_color_max_size_d) + strnlen(color3, F_color_max_size_d) + strnlen(color4, F_color_max_size_d) + strnlen(color5, F_color_max_size_d); if (buffer->size - buffer->used - 1 < string_size) { f_status_t status = F_none; @@ -141,49 +141,49 @@ extern "C" { } if (!color2) { - strncat(buffer->string, format.begin, f_color_max_size); - strncat(buffer->string, color1, f_color_max_size); - strncat(buffer->string, format.end, f_color_max_size); + strncat(buffer->string, format.begin, F_color_max_size_d); + strncat(buffer->string, color1, F_color_max_size_d); + strncat(buffer->string, format.end, F_color_max_size_d); } else if (!color3) { - strncat(buffer->string, format.begin, f_color_max_size); - strncat(buffer->string, color1, f_color_max_size); - strncat(buffer->string, format.medium, f_color_max_size); - strncat(buffer->string, color2, f_color_max_size); - strncat(buffer->string, format.end, f_color_max_size); + strncat(buffer->string, format.begin, F_color_max_size_d); + strncat(buffer->string, color1, F_color_max_size_d); + strncat(buffer->string, format.medium, F_color_max_size_d); + strncat(buffer->string, color2, F_color_max_size_d); + strncat(buffer->string, format.end, F_color_max_size_d); } else if (!color4) { - strncat(buffer->string, format.begin, f_color_max_size); - strncat(buffer->string, color1, f_color_max_size); - strncat(buffer->string, format.medium, f_color_max_size); - strncat(buffer->string, color2, f_color_max_size); - strncat(buffer->string, format.medium, f_color_max_size); - strncat(buffer->string, color3, f_color_max_size); - strncat(buffer->string, format.end, f_color_max_size); + strncat(buffer->string, format.begin, F_color_max_size_d); + strncat(buffer->string, color1, F_color_max_size_d); + strncat(buffer->string, format.medium, F_color_max_size_d); + strncat(buffer->string, color2, F_color_max_size_d); + strncat(buffer->string, format.medium, F_color_max_size_d); + strncat(buffer->string, color3, F_color_max_size_d); + strncat(buffer->string, format.end, F_color_max_size_d); } else if (!color5) { - strncat(buffer->string, format.begin, f_color_max_size); - strncat(buffer->string, color1, f_color_max_size); - strncat(buffer->string, format.medium, f_color_max_size); - strncat(buffer->string, color2, f_color_max_size); - strncat(buffer->string, format.medium, f_color_max_size); - strncat(buffer->string, color3, f_color_max_size); - strncat(buffer->string, format.medium, f_color_max_size); - strncat(buffer->string, color4, f_color_max_size); - strncat(buffer->string, format.end, f_color_max_size); + strncat(buffer->string, format.begin, F_color_max_size_d); + strncat(buffer->string, color1, F_color_max_size_d); + strncat(buffer->string, format.medium, F_color_max_size_d); + strncat(buffer->string, color2, F_color_max_size_d); + strncat(buffer->string, format.medium, F_color_max_size_d); + strncat(buffer->string, color3, F_color_max_size_d); + strncat(buffer->string, format.medium, F_color_max_size_d); + strncat(buffer->string, color4, F_color_max_size_d); + strncat(buffer->string, format.end, F_color_max_size_d); } else { - strncat(buffer->string, format.begin, f_color_max_size); - strncat(buffer->string, color1, f_color_max_size); - strncat(buffer->string, format.medium, f_color_max_size); - strncat(buffer->string, color2, f_color_max_size); - strncat(buffer->string, format.medium, f_color_max_size); - strncat(buffer->string, color3, f_color_max_size); - strncat(buffer->string, format.medium, f_color_max_size); - strncat(buffer->string, color4, f_color_max_size); - strncat(buffer->string, format.medium, f_color_max_size); - strncat(buffer->string, color5, f_color_max_size); - strncat(buffer->string, format.end, f_color_max_size); + strncat(buffer->string, format.begin, F_color_max_size_d); + strncat(buffer->string, color1, F_color_max_size_d); + strncat(buffer->string, format.medium, F_color_max_size_d); + strncat(buffer->string, color2, F_color_max_size_d); + strncat(buffer->string, format.medium, F_color_max_size_d); + strncat(buffer->string, color3, F_color_max_size_d); + strncat(buffer->string, format.medium, F_color_max_size_d); + strncat(buffer->string, color4, F_color_max_size_d); + strncat(buffer->string, format.medium, F_color_max_size_d); + strncat(buffer->string, color5, F_color_max_size_d); + strncat(buffer->string, format.end, F_color_max_size_d); } buffer->used += string_size; diff --git a/level_0/f_console/c/console-common.c b/level_0/f_console/c/console-common.c index 8a6436f..1598541 100644 --- a/level_0/f_console/c/console-common.c +++ b/level_0/f_console/c/console-common.c @@ -5,37 +5,37 @@ extern "C" { #endif #ifndef _di_f_console_standard_s_ - const f_string_t f_console_standard_short_dark_s = f_console_standard_short_dark; - const f_string_t f_console_standard_short_debug_s = f_console_standard_short_debug; - const f_string_t f_console_standard_short_help_s = f_console_standard_short_help; - const f_string_t f_console_standard_short_light_s = f_console_standard_short_light; - const f_string_t f_console_standard_short_no_color_s = f_console_standard_short_no_color; - const f_string_t f_console_standard_short_normal_s = f_console_standard_short_normal; - const f_string_t f_console_standard_short_quiet_s = f_console_standard_short_quiet; - const f_string_t f_console_standard_short_status_in_s = f_console_standard_short_status_in; - const f_string_t f_console_standard_short_status_out_s = f_console_standard_short_status_out; - const f_string_t f_console_standard_short_verbose_s = f_console_standard_short_verbose; - const f_string_t f_console_standard_short_version_s = f_console_standard_short_version; + const f_string_t f_console_standard_short_dark_s = F_console_standard_short_dark_s; + const f_string_t f_console_standard_short_debug_s = F_console_standard_short_debug_s; + const f_string_t f_console_standard_short_help_s = F_console_standard_short_help_s; + const f_string_t f_console_standard_short_light_s = F_console_standard_short_light_s; + const f_string_t f_console_standard_short_no_color_s = F_console_standard_short_no_color_s; + const f_string_t f_console_standard_short_normal_s = F_console_standard_short_normal_s; + const f_string_t f_console_standard_short_quiet_s = F_console_standard_short_quiet_s; + const f_string_t f_console_standard_short_status_in_s = F_console_standard_short_status_in_s; + const f_string_t f_console_standard_short_status_out_s = F_console_standard_short_status_out_s; + const f_string_t f_console_standard_short_verbose_s = F_console_standard_short_verbose_s; + const f_string_t f_console_standard_short_version_s = F_console_standard_short_version_s; - const f_string_t f_console_standard_long_dark_s = f_console_standard_long_dark; - const f_string_t f_console_standard_long_debug_s = f_console_standard_long_debug; - const f_string_t f_console_standard_long_help_s = f_console_standard_long_help; - const f_string_t f_console_standard_long_light_s = f_console_standard_long_light; - const f_string_t f_console_standard_long_no_color_s = f_console_standard_long_no_color; - const f_string_t f_console_standard_long_normal_s = f_console_standard_long_normal; - const f_string_t f_console_standard_long_quiet_s = f_console_standard_long_quiet; - const f_string_t f_console_standard_long_status_in_s = f_console_standard_long_status_in; - const f_string_t f_console_standard_long_status_out_s = f_console_standard_long_status_out; - const f_string_t f_console_standard_long_verbose_s = f_console_standard_long_verbose; - const f_string_t f_console_standard_long_version_s = f_console_standard_long_version; + const f_string_t f_console_standard_long_dark_s = F_console_standard_long_dark_s; + const f_string_t f_console_standard_long_debug_s = F_console_standard_long_debug_s; + const f_string_t f_console_standard_long_help_s = F_console_standard_long_help_s; + const f_string_t f_console_standard_long_light_s = F_console_standard_long_light_s; + const f_string_t f_console_standard_long_no_color_s = F_console_standard_long_no_color_s; + const f_string_t f_console_standard_long_normal_s = F_console_standard_long_normal_s; + const f_string_t f_console_standard_long_quiet_s = F_console_standard_long_quiet_s; + const f_string_t f_console_standard_long_status_in_s = F_console_standard_long_status_in_s; + const f_string_t f_console_standard_long_status_out_s = F_console_standard_long_status_out_s; + const f_string_t f_console_standard_long_verbose_s = F_console_standard_long_verbose_s; + const f_string_t f_console_standard_long_version_s = F_console_standard_long_version_s; #endif // _di_f_console_standard_s_ #ifndef _di_f_console_symbol_s_ - const f_string_t f_console_symbol_short_enable_s = f_console_symbol_short_enable; - const f_string_t f_console_symbol_short_disable_s = f_console_symbol_short_disable; + const f_string_t f_console_symbol_short_enable_s = F_console_symbol_short_enable_s; + const f_string_t f_console_symbol_short_disable_s = F_console_symbol_short_disable_s; - const f_string_t f_console_symbol_long_enable_s = f_console_symbol_long_enable; - const f_string_t f_console_symbol_long_disable_s = f_console_symbol_long_disable; + const f_string_t f_console_symbol_long_enable_s = F_console_symbol_long_s_enable; + const f_string_t f_console_symbol_long_disable_s = F_console_symbol_long_s_disable; #endif // _di_f_console_symbol_s_ #ifdef __cplusplus diff --git a/level_0/f_console/c/console-common.h b/level_0/f_console/c/console-common.h index cf00545..61fa0a0 100644 --- a/level_0/f_console/c/console-common.h +++ b/level_0/f_console/c/console-common.h @@ -39,17 +39,17 @@ extern "C" { * The symbols passed to the program for option handling. */ #ifndef _di_f_console_symbol_s_ - #define f_console_symbol_short_enable "-" - #define f_console_symbol_short_disable "+" + #define F_console_symbol_short_enable_s "-" + #define F_console_symbol_short_disable_s "+" - #define f_console_symbol_short_enable_length 1 - #define f_console_symbol_short_disable_length 1 + #define F_console_symbol_short_enable_s_length 1 + #define F_console_symbol_short_disable_s_length 1 - #define f_console_symbol_long_enable "--" - #define f_console_symbol_long_disable "++" + #define F_console_symbol_long_s_enable "--" + #define F_console_symbol_long_s_disable "++" - #define f_console_symbol_long_enable_length 2 - #define f_console_symbol_long_disable_length 2 + #define F_console_symbol_long_enable_s_length 2 + #define F_console_symbol_long_disable_s_length 2 extern const f_string_t f_console_symbol_short_enable_s; extern const f_string_t f_console_symbol_short_disable_s; @@ -71,20 +71,20 @@ extern "C" { * This is not stricly a requirement, but expect level 3 projects to work this way. * * The following options are subjective in interpretation of the verbosity but are expected to be follow the general interpretation: - * - debug: Enable debugging, which will likely increase output verbosity. - * - normal: Use normal printing (don't use debug/quiet/verbose). - * - quiet: Decrease verbosity, print less, in some use cases this could mean printing nothing. + * - debug: Enable debugging, which will likely increase output verbosity. + * - normal: Use normal printing (don't use debug/quiet/verbose). + * - quiet: Decrease verbosity, print less, in some use cases this could mean printing nothing. * - verbose: Increase verbosity, print more, in some use cases this could mean printing just about everything. * * The following are less subjective in interpretation but do allow some flexibility. - * - dark: Do display color intended for dark backgrounds (often the default behavior) when printing to the console. Other contexts may be acceptable (such as voice inflections, or lack-thereof) for audio.) - * - help: Display the help text. This does not define how the text is displayed only that the text is displayed. - * - light: Do display color intended for light backgrounds when printing to the console. Other contexts may be acceptable (such as voice inflections, or lack-thereof) for audio.) + * - dark: Do display color intended for dark backgrounds (often the default behavior) when printing to the console. Other contexts may be acceptable (such as voice inflections, or lack-thereof) for audio.) + * - help: Display the help text. This does not define how the text is displayed only that the text is displayed. + * - light: Do display color intended for light backgrounds when printing to the console. Other contexts may be acceptable (such as voice inflections, or lack-thereof) for audio.) * - no_color: Do not display color when printing to the console. Other contexts may be acceptable (such as voice inflections, or lack-thereof) for audio.) - * - version: Should always print only the version number, no colors, but what represents the version number is undefined by this project. + * - version: Should always print only the version number, no colors, but what represents the version number is undefined by this project. * * The following options are for special purposes: - * - status_in: Is intended to accept the name of an environment variable in which to read the status from. + * - status_in: Is intended to accept the name of an environment variable in which to read the status from. * - status_out: Is intended to accept the name of an environment variable in which to ride the status to. * * In the case of "status_in" and "status_out", the environment variable will store a string representing the base-10 unsigned 16-bit status code. @@ -93,53 +93,53 @@ extern "C" { * - To avoid problems with the status code after a program is forcibly killed, the status_out environment variable should be cleared at program start. */ #ifndef _di_f_console_standard_s_ - #define f_console_standard_short_dark "d" - #define f_console_standard_short_debug "D" - #define f_console_standard_short_help "h" - #define f_console_standard_short_light "l" - #define f_console_standard_short_no_color "n" - #define f_console_standard_short_normal "N" - #define f_console_standard_short_quiet "q" - #define f_console_standard_short_status_in "s" - #define f_console_standard_short_status_out "S" - #define f_console_standard_short_verbose "V" - #define f_console_standard_short_version "v" - - #define f_console_standard_short_dark_length 1 - #define f_console_standard_short_debug_length 1 - #define f_console_standard_short_help_length 1 - #define f_console_standard_short_light_length 1 - #define f_console_standard_short_no_color_length 1 - #define f_console_standard_short_normal_length 1 - #define f_console_standard_short_quiet_length 1 - #define f_console_standard_short_status_in_length 1 - #define f_console_standard_short_status_out_length 1 - #define f_console_standard_short_verbose_length 1 - #define f_console_standard_short_version_length 1 - - #define f_console_standard_long_dark "dark" - #define f_console_standard_long_debug "debug" - #define f_console_standard_long_help "help" - #define f_console_standard_long_light "light" - #define f_console_standard_long_no_color "no_color" - #define f_console_standard_long_normal "normal" - #define f_console_standard_long_quiet "quiet" - #define f_console_standard_long_status_in "status_in" - #define f_console_standard_long_status_out "status_out" - #define f_console_standard_long_verbose "verbose" - #define f_console_standard_long_version "version" - - #define f_console_standard_long_dark_length 4 - #define f_console_standard_long_debug_length 5 - #define f_console_standard_long_help_length 4 - #define f_console_standard_long_light_length 5 - #define f_console_standard_long_no_color_length 8 - #define f_console_standard_long_normal_length 6 - #define f_console_standard_long_quiet_length 5 - #define f_console_standard_long_status_in_length 9 - #define f_console_standard_long_status_out_length 10 - #define f_console_standard_long_verbose_length 7 - #define f_console_standard_long_version_length 7 + #define F_console_standard_short_dark_s "d" + #define F_console_standard_short_debug_s "D" + #define F_console_standard_short_help_s "h" + #define F_console_standard_short_light_s "l" + #define F_console_standard_short_no_color_s "n" + #define F_console_standard_short_normal_s "N" + #define F_console_standard_short_quiet_s "q" + #define F_console_standard_short_status_in_s "s" + #define F_console_standard_short_status_out_s "S" + #define F_console_standard_short_verbose_s "V" + #define F_console_standard_short_version_s "v" + + #define F_console_standard_short_dark_s_length 1 + #define F_console_standard_short_debug_s_length 1 + #define F_console_standard_short_help_s_length 1 + #define F_console_standard_short_light_s_length 1 + #define F_console_standard_short_no_color_s_length 1 + #define F_console_standard_short_normal_s_length 1 + #define F_console_standard_short_quiet_s_length 1 + #define F_console_standard_short_status_in_s_length 1 + #define F_console_standard_short_status_out_s_length 1 + #define F_console_standard_short_verbose_s_length 1 + #define F_console_standard_short_version_s_length 1 + + #define F_console_standard_long_dark_s "dark" + #define F_console_standard_long_debug_s "debug" + #define F_console_standard_long_help_s "help" + #define F_console_standard_long_light_s "light" + #define F_console_standard_long_no_color_s "no_color" + #define F_console_standard_long_normal_s "normal" + #define F_console_standard_long_quiet_s "quiet" + #define F_console_standard_long_status_in_s "status_in" + #define F_console_standard_long_status_out_s "status_out" + #define F_console_standard_long_verbose_s "verbose" + #define F_console_standard_long_version_s "version" + + #define F_console_standard_long_dark_s_length 4 + #define F_console_standard_long_debug_s_length 5 + #define F_console_standard_long_help_s_length 4 + #define F_console_standard_long_light_s_length 5 + #define F_console_standard_long_no_color_s_length 8 + #define F_console_standard_long_normal_s_length 6 + #define F_console_standard_long_quiet_s_length 5 + #define F_console_standard_long_status_in_s_length 9 + #define F_console_standard_long_status_out_s_length 10 + #define F_console_standard_long_verbose_s_length 7 + #define F_console_standard_long_version_s_length 7 extern const f_string_t f_console_standard_short_dark_s; extern const f_string_t f_console_standard_short_debug_s; @@ -169,11 +169,11 @@ extern "C" { /** * The maximum size for a single parameter (the length of the string representing the parameter). * - * The ideal parameter value is f_array_length_t_size, which generally defaults to 2^64 (unsigned). + * The ideal parameter value is F_array_length_t_size_d, which generally defaults to 2^64 (unsigned). * However, the libc/POSIX appears to limit this to 2^63 (signed). */ #ifndef _di_f_console_length_size_ - #define f_console_parameter_size f_string_t_size + #define f_console_parameter_size F_string_t_size_d #endif // _di_f_console_length_size_ /** diff --git a/level_0/f_console/c/console.c b/level_0/f_console/c/console.c index d7669e0..0581f4a 100644 --- a/level_0/f_console/c/console.c +++ b/level_0/f_console/c/console.c @@ -82,7 +82,7 @@ extern "C" { if (needs_value.used > 0) { i = needs_value.array[0]; - macro_f_array_lengths_t_increase(status, f_memory_default_allocation_small, parameters.parameter[i].values) + macro_f_array_lengths_t_increase(status, F_memory_default_allocation_small_d, parameters.parameter[i].values) if (F_status_is_error(status)) { macro_f_array_lengths_t_delete_simple(needs_value); @@ -200,7 +200,7 @@ extern "C" { continue; } - macro_f_array_lengths_t_increase(status, f_memory_default_allocation_small, parameters.parameter[i].locations) + macro_f_array_lengths_t_increase(status, F_memory_default_allocation_small_d, parameters.parameter[i].locations) if (F_status_is_error(status)) { macro_f_array_lengths_t_delete_simple(needs_value); @@ -208,7 +208,7 @@ extern "C" { return status; } - macro_f_array_lengths_t_increase(status, f_memory_default_allocation_small, parameters.parameter[i].locations_sub) + macro_f_array_lengths_t_increase(status, F_memory_default_allocation_small_d, parameters.parameter[i].locations_sub) if (F_status_is_error(status)) { macro_f_array_lengths_t_delete_simple(needs_value); @@ -263,7 +263,7 @@ extern "C" { if (strncmp(arguments.argv[location], parameters.parameter[i].symbol_other, argument_length + 1) != 0) continue; - macro_f_array_lengths_t_increase(status, f_memory_default_allocation_small, parameters.parameter[i].locations) + macro_f_array_lengths_t_increase(status, F_memory_default_allocation_small_d, parameters.parameter[i].locations) if (F_status_is_error(status)) { macro_f_array_lengths_t_delete_simple(needs_value); @@ -271,7 +271,7 @@ extern "C" { return status; } - macro_f_array_lengths_t_increase(status, f_memory_default_allocation_small, parameters.parameter[i].locations_sub) + macro_f_array_lengths_t_increase(status, F_memory_default_allocation_small_d, parameters.parameter[i].locations_sub) if (F_status_is_error(status)) { macro_f_array_lengths_t_delete_simple(needs_value); @@ -311,7 +311,7 @@ extern "C" { // populate list of remaining parameters.parameter not associated with anything. if (remaining->used == remaining->size) { - macro_f_memory_structure_increment(status, (*remaining), 1, f_memory_default_allocation_small, macro_f_array_lengths_t_resize, F_array_too_large); + macro_f_memory_structure_increment(status, (*remaining), 1, F_memory_default_allocation_small_d, macro_f_array_lengths_t_resize, F_array_too_large); if (F_status_is_error(status)) { macro_f_array_lengths_t_delete_simple(needs_value); diff --git a/level_0/f_control_group/c/control_group-common.c b/level_0/f_control_group/c/control_group-common.c index 29bbd76..9ecf02e 100644 --- a/level_0/f_control_group/c/control_group-common.c +++ b/level_0/f_control_group/c/control_group-common.c @@ -5,9 +5,9 @@ extern "C" { #endif #ifndef _di_f_control_group_defines_ - const f_string_t f_control_group_path_system_default_s = f_control_group_path_system_default; - const f_string_t f_control_group_path_system_prefix_s = f_control_group_path_system_prefix; - const f_string_t f_control_group_path_system_suffix_s = f_control_group_path_system_suffix; + const f_string_t f_control_group_path_system_default_s = F_control_group_path_system_default_s; + const f_string_t f_control_group_path_system_prefix_s = F_control_group_path_system_prefix_s; + const f_string_t f_control_group_path_system_suffix_s = F_control_group_path_system_suffix_s; #endif // _di_f_control_group_defines_ #ifdef __cplusplus 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 15ab2be..4edf5d5 100644 --- a/level_0/f_control_group/c/control_group-common.h +++ b/level_0/f_control_group/c/control_group-common.h @@ -20,15 +20,15 @@ extern "C" { * The defines for control groups. */ #ifndef _di_f_control_group_defines_ - #define f_control_group_path_system_default "sys/fs/cgroup/" - #define f_control_group_path_system_prefix "/" - #define f_control_group_path_system_suffix "/cgroup.procs" + #define F_control_group_path_system_default_s "sys/fs/cgroup/" + #define F_control_group_path_system_prefix_s "/" + #define F_control_group_path_system_suffix_s "/cgroup.procs" - #define f_control_group_path_system_default_length 14 - #define f_control_group_path_system_prefix_length 1 - #define f_control_group_path_system_suffix_length 13 + #define F_control_group_path_system_default_s_length 14 + #define F_control_group_path_system_prefix_s_length 1 + #define F_control_group_path_system_suffix_s_length 13 - #define f_control_group_pid_length_max 64 + #define F_control_group_pid_length_max_d 64 extern const f_string_t f_control_group_path_system_default_s; extern const f_string_t f_control_group_path_system_prefix_s; diff --git a/level_0/f_conversion/c/conversion-common.h b/level_0/f_conversion/c/conversion-common.h index 84d02a7..a89bbd4 100644 --- a/level_0/f_conversion/c/conversion-common.h +++ b/level_0/f_conversion/c/conversion-common.h @@ -24,54 +24,54 @@ extern "C" { * 64-bit is the designed default. */ #ifndef _di_f_type_number_64_t_ - #define f_conversion_digits_binary_unsigned 64 - #define f_conversion_digits_binary_signed 63 + #define F_conversion_digits_binary_unsigned_d 64 + #define F_conversion_digits_binary_signed_d 63 - #define f_conversion_digits_octal_unsigned 22 - #define f_conversion_digits_octal_signed 22 + #define F_conversion_digits_octal_unsigned_d 22 + #define F_conversion_digits_octal_signed_d 22 - #define f_conversion_digits_decimal_unsigned 19 - #define f_conversion_digits_decimal_signed 19 + #define F_conversion_digits_decimal_unsigned_d 19 + #define F_conversion_digits_decimal_signed_d 19 - #define f_conversion_digits_duodecimal_unsigned 18 - #define f_conversion_digits_duodecimal_signed 18 + #define F_conversion_digits_duodecimal_unsigned_d 18 + #define F_conversion_digits_duodecimal_signed_d 18 - #define f_conversion_digits_hexidecimal_unsigned 16 - #define f_conversion_digits_hexidecimal_signed 16 + #define F_conversion_digits_hexidecimal_unsigned_d 16 + #define F_conversion_digits_hexidecimal_signed_d 16 #endif // _di_f_type_number_64_t_ #ifdef _en_f_type_number_32_t_ - #define f_conversion_digits_binary_unsigned 32 - #define f_conversion_digits_binary_signed 31 + #define F_conversion_digits_binary_unsigned_d 32 + #define F_conversion_digits_binary_signed_d 31 - #define f_conversion_digits_octal_unsigned 10 - #define f_conversion_digits_octal_signed 10 + #define F_conversion_digits_octal_unsigned_d 10 + #define F_conversion_digits_octal_signed_d 10 - #define f_conversion_digits_decimal_unsigned 9 - #define f_conversion_digits_decimal_signed 9 + #define F_conversion_digits_decimal_unsigned_d 9 + #define F_conversion_digits_decimal_signed_d 9 - #define f_conversion_digits_duodecimal_unsigned 8 - #define f_conversion_digits_duodecimal_signed 8 + #define F_conversion_digits_duodecimal_unsigned_d 8 + #define F_conversion_digits_duodecimal_signed_d 8 - #define f_conversion_digits_hexidecimal_unsigned 8 - #define f_conversion_digits_hexidecimal_signed 8 + #define F_conversion_digits_hexidecimal_unsigned_d 8 + #define F_conversion_digits_hexidecimal_signed_d 8 #endif // _en_f_type_number_32_t_ #ifdef _en_f_type_number_128_t_ - #define f_conversion_digits_binary_unsigned 128 - #define f_conversion_digits_binary_signed 127 + #define F_conversion_digits_binary_unsigned_d 128 + #define F_conversion_digits_binary_signed_d 127 - #define f_conversion_digits_octal_unsigned 43 - #define f_conversion_digits_octal_signed 43 + #define F_conversion_digits_octal_unsigned_d 43 + #define F_conversion_digits_octal_signed_d 43 - #define f_conversion_digits_decimal_unsigned 38 - #define f_conversion_digits_decimal_signed 38 + #define F_conversion_digits_decimal_unsigned_d 38 + #define F_conversion_digits_decimal_signed_d 38 - #define f_conversion_digits_duodecimal_unsigned 36 - #define f_conversion_digits_duodecimal_signed 36 + #define F_conversion_digits_duodecimal_unsigned_d 36 + #define F_conversion_digits_duodecimal_signed_d 36 - #define f_conversion_digits_hexidecimal_unsigned 32 - #define f_conversion_digits_hexidecimal_signed 32 + #define F_conversion_digits_hexidecimal_unsigned_d 32 + #define F_conversion_digits_hexidecimal_signed_d 32 #endif // _en_f_type_number_128_t_ /** @@ -136,12 +136,12 @@ extern "C" { * - base 16: 0x, 0X. */ #ifndef _di_f_conversion_data_flag_ - #define f_conversion_data_flag_align_left 0x1 - #define f_conversion_data_flag_base_prepend 0x2 - #define f_conversion_data_flag_base_upper 0x4 - #define f_conversion_data_flag_sign_always 0x8 - #define f_conversion_data_flag_sign_pad 0x10 - #define f_conversion_data_flag_zeros_leading 0x20 + #define F_conversion_data_flag_align_left_d 0x1 + #define F_conversion_data_flag_base_prepend_d 0x2 + #define F_conversion_data_flag_base_upper_d 0x4 + #define F_conversion_data_flag_sign_always_d 0x8 + #define F_conversion_data_flag_sign_pad_d 0x10 + #define F_conversion_data_flag_zeros_leading_d 0x20 #endif // _di_f_conversion_data_flag_ #ifdef __cplusplus diff --git a/level_0/f_conversion/c/private-conversion.c b/level_0/f_conversion/c/private-conversion.c index 04b427a..496fdd5 100644 --- a/level_0/f_conversion/c/private-conversion.c +++ b/level_0/f_conversion/c/private-conversion.c @@ -19,11 +19,11 @@ extern "C" { digits = 1; } - if (data.flag & f_conversion_data_flag_base_prepend) { - const int used = digits + 2 + (data.flag & f_conversion_data_flag_sign_always & f_conversion_data_flag_sign_pad ? 1 : 0); + if (data.flag & F_conversion_data_flag_base_prepend_d) { + const int used = digits + 2 + (data.flag & F_conversion_data_flag_sign_always_d & F_conversion_data_flag_sign_pad_d ? 1 : 0); if (data.width > used) { - if (data.flag & f_conversion_data_flag_zeros_leading) { + if (data.flag & F_conversion_data_flag_zeros_leading_d) { if (F_status_is_error(private_f_conversion_digit_to_file_prefix(data, negative, output))) { return F_status_set_error(F_output); } @@ -77,10 +77,10 @@ extern "C" { } } else { - const int used = digits + (data.flag & (f_conversion_data_flag_sign_always | f_conversion_data_flag_sign_pad) ? 1 : 0); + const int used = digits + (data.flag & (F_conversion_data_flag_sign_always_d | F_conversion_data_flag_sign_pad_d) ? 1 : 0); if (data.width > used) { - if (data.flag & f_conversion_data_flag_zeros_leading) { + if (data.flag & F_conversion_data_flag_zeros_leading_d) { if (F_status_is_error(private_f_conversion_digit_to_file_prefix(data, negative, output))) { return F_status_set_error(F_output); } @@ -174,7 +174,7 @@ extern "C" { c = 0x30 + work; } else { - if (data.flag & f_conversion_data_flag_base_upper) { + if (data.flag & F_conversion_data_flag_base_upper_d) { c = 0x37 + work; } else { @@ -236,7 +236,7 @@ extern "C" { } } } - else if (data.flag & f_conversion_data_flag_sign_always) { + else if (data.flag & F_conversion_data_flag_sign_always_d) { if (fwrite_unlocked(f_string_ascii_plus_s, 1, 1, output) == -1) { if (errno == EAGAIN || errno == EWOULDBLOCK) return F_status_set_error(F_block); if (errno == EFAULT) return F_status_set_error(F_buffer); @@ -248,7 +248,7 @@ extern "C" { return F_status_set_error(F_output); } } - else if (data.flag & f_conversion_data_flag_sign_pad) { + else if (data.flag & F_conversion_data_flag_sign_pad_d) { if (fwrite_unlocked(f_string_ascii_space_s, 1, 1, output) == -1) { if (errno == EAGAIN || errno == EWOULDBLOCK) return F_status_set_error(F_block); if (errno == EFAULT) return F_status_set_error(F_buffer); @@ -261,7 +261,7 @@ extern "C" { } } - if (data.flag & f_conversion_data_flag_base_prepend) { + if (data.flag & F_conversion_data_flag_base_prepend_d) { if (fwrite_unlocked(f_string_ascii_0_s, 1, 1, output) == -1) { if (errno == EAGAIN || errno == EWOULDBLOCK) return F_status_set_error(F_block); if (errno == EFAULT) return F_status_set_error(F_buffer); @@ -277,23 +277,23 @@ extern "C" { switch (data.base) { case 2: - c = data.flag & f_conversion_data_flag_base_upper ? f_string_ascii_B_s[0] : f_string_ascii_b_s[0]; + c = data.flag & F_conversion_data_flag_base_upper_d ? f_string_ascii_B_s[0] : f_string_ascii_b_s[0]; break; case 8: - c = data.flag & f_conversion_data_flag_base_upper ? f_string_ascii_O_s[0] : f_string_ascii_o_s[0]; + c = data.flag & F_conversion_data_flag_base_upper_d ? f_string_ascii_O_s[0] : f_string_ascii_o_s[0]; break; case 10: - c = data.flag & f_conversion_data_flag_base_upper ? f_string_ascii_T_s[0] : f_string_ascii_t_s[0]; + c = data.flag & F_conversion_data_flag_base_upper_d ? f_string_ascii_T_s[0] : f_string_ascii_t_s[0]; break; case 12: - c = data.flag & f_conversion_data_flag_base_upper ? f_string_ascii_D_s[0] : f_string_ascii_d_s[0]; + c = data.flag & F_conversion_data_flag_base_upper_d ? f_string_ascii_D_s[0] : f_string_ascii_d_s[0]; break; case 16: - c = data.flag & f_conversion_data_flag_base_upper ? f_string_ascii_X_s[0] : f_string_ascii_x_s[0]; + c = data.flag & F_conversion_data_flag_base_upper_d ? f_string_ascii_X_s[0] : f_string_ascii_x_s[0]; break; default: @@ -344,11 +344,11 @@ extern "C" { } } - if (data.flag & f_conversion_data_flag_base_prepend) { - const int used = digits + 2 + (data.flag & f_conversion_data_flag_sign_always & f_conversion_data_flag_sign_pad ? 1 : 0); + if (data.flag & F_conversion_data_flag_base_prepend_d) { + const int used = digits + 2 + (data.flag & F_conversion_data_flag_sign_always_d & F_conversion_data_flag_sign_pad_d ? 1 : 0); if (data.width > used) { - if (data.flag & f_conversion_data_flag_zeros_leading) { + if (data.flag & F_conversion_data_flag_zeros_leading_d) { private_f_conversion_digit_to_string_prefix(data, negative, destination); private_f_conversion_digit_to_string_pad(data, f_string_ascii_0_s[0], data.width - used, destination); private_f_conversion_digit_to_string_number(data, number, digits, destination); @@ -370,10 +370,10 @@ extern "C" { } } else { - const int used = digits + (data.flag & (f_conversion_data_flag_sign_always | f_conversion_data_flag_sign_pad) ? 1 : 0); + const int used = digits + (data.flag & (F_conversion_data_flag_sign_always_d | F_conversion_data_flag_sign_pad_d) ? 1 : 0); if (data.width > used) { - if (data.flag & f_conversion_data_flag_zeros_leading) { + if (data.flag & F_conversion_data_flag_zeros_leading_d) { private_f_conversion_digit_to_string_prefix(data, negative, destination); private_f_conversion_digit_to_string_pad(data, f_string_ascii_0_s[0], data.width - used, destination); private_f_conversion_digit_to_string_number(data, number, digits, destination); @@ -431,7 +431,7 @@ extern "C" { c = 0x30 + work; } else { - if (data.flag & f_conversion_data_flag_base_upper) { + if (data.flag & F_conversion_data_flag_base_upper_d) { c = 0x37 + work; } else { @@ -461,37 +461,37 @@ extern "C" { destination->string[destination->used++] = f_string_ascii_minus_s[0]; } } - else if (data.flag & f_conversion_data_flag_sign_always) { + else if (data.flag & F_conversion_data_flag_sign_always_d) { destination->string[destination->used++] = f_string_ascii_plus_s[0]; } - else if (data.flag & f_conversion_data_flag_sign_pad) { + else if (data.flag & F_conversion_data_flag_sign_pad_d) { destination->string[destination->used++] = f_string_ascii_space_s[0]; } - if (data.flag & f_conversion_data_flag_base_prepend) { + if (data.flag & F_conversion_data_flag_base_prepend_d) { destination->string[destination->used++] = f_string_ascii_0_s[0]; char c = 0; switch (data.base) { case 2: - c = data.flag & f_conversion_data_flag_base_upper ? f_string_ascii_B_s[0] : f_string_ascii_b_s[0]; + c = data.flag & F_conversion_data_flag_base_upper_d ? f_string_ascii_B_s[0] : f_string_ascii_b_s[0]; break; case 8: - c = data.flag & f_conversion_data_flag_base_upper ? f_string_ascii_O_s[0] : f_string_ascii_o_s[0]; + c = data.flag & F_conversion_data_flag_base_upper_d ? f_string_ascii_O_s[0] : f_string_ascii_o_s[0]; break; case 10: - c = data.flag & f_conversion_data_flag_base_upper ? f_string_ascii_T_s[0] : f_string_ascii_t_s[0]; + c = data.flag & F_conversion_data_flag_base_upper_d ? f_string_ascii_T_s[0] : f_string_ascii_t_s[0]; break; case 12: - c = data.flag & f_conversion_data_flag_base_upper ? f_string_ascii_D_s[0] : f_string_ascii_d_s[0]; + c = data.flag & F_conversion_data_flag_base_upper_d ? f_string_ascii_D_s[0] : f_string_ascii_d_s[0]; break; case 16: - c = data.flag & f_conversion_data_flag_base_upper ? f_string_ascii_X_s[0] : f_string_ascii_x_s[0]; + c = data.flag & F_conversion_data_flag_base_upper_d ? f_string_ascii_X_s[0] : f_string_ascii_x_s[0]; break; default: diff --git a/level_0/f_conversion/c/private-conversion.h b/level_0/f_conversion/c/private-conversion.h index 3a5eee3..e545978 100644 --- a/level_0/f_conversion/c/private-conversion.h +++ b/level_0/f_conversion/c/private-conversion.h @@ -53,7 +53,7 @@ extern "C" { * @see private_f_conversion_digit_to_file_prefix() */ #if !defined(_di_f_conversion_number_signed_print_) || !defined(_di_f_conversion_number_unsigned_print_) - extern f_status_t private_f_conversion_digit_to_file(const f_number_unsigned_t number, const f_conversion_data_t data, const uint8_t negative, FILE *output) f_attribute_visibility_internal; + extern f_status_t private_f_conversion_digit_to_file(const f_number_unsigned_t number, const f_conversion_data_t data, const uint8_t negative, FILE *output) F_attribute_visibility_internal_d; #endif // !defined(_di_f_conversion_number_signed_print_) || !defined(_di_f_conversion_number_unsigned_print_) /** @@ -88,7 +88,7 @@ extern "C" { * @see f_conversion_number_unsigned_print() */ #if !defined(_di_f_conversion_number_signed_print_) || !defined(_di_f_conversion_number_unsigned_print_) - extern f_status_t private_f_conversion_digit_to_file_number(const f_conversion_data_t data, f_number_unsigned_t number, int digits, FILE *output) f_attribute_visibility_internal; + extern f_status_t private_f_conversion_digit_to_file_number(const f_conversion_data_t data, f_number_unsigned_t number, int digits, FILE *output) F_attribute_visibility_internal_d; #endif // !defined(_di_f_conversion_number_signed_print_) || !defined(_di_f_conversion_number_unsigned_print_) /** @@ -122,7 +122,7 @@ extern "C" { * @see f_conversion_number_unsigned_print() */ #if !defined(_di_f_conversion_number_signed_print_) || !defined(_di_f_conversion_number_unsigned_print_) - extern f_status_t private_f_conversion_digit_to_file_pad(const f_conversion_data_t data, const char pad, int total, FILE *output) f_attribute_visibility_internal; + extern f_status_t private_f_conversion_digit_to_file_pad(const f_conversion_data_t data, const char pad, int total, FILE *output) F_attribute_visibility_internal_d; #endif // !defined(_di_f_conversion_number_signed_print_) || !defined(_di_f_conversion_number_unsigned_print_) /** @@ -157,7 +157,7 @@ extern "C" { * @see f_conversion_number_unsigned_print() */ #if !defined(_di_f_conversion_number_signed_print_) || !defined(_di_f_conversion_number_unsigned_print_) - extern f_status_t private_f_conversion_digit_to_file_prefix(const f_conversion_data_t data, const uint8_t negative, FILE *output) f_attribute_visibility_internal; + extern f_status_t private_f_conversion_digit_to_file_prefix(const f_conversion_data_t data, const uint8_t negative, FILE *output) F_attribute_visibility_internal_d; #endif // !defined(_di_f_conversion_number_signed_print_) || !defined(_di_f_conversion_number_unsigned_print_) /** @@ -190,7 +190,7 @@ extern "C" { * @see private_f_conversion_digit_to_string_prefix() */ #if !defined(_di_f_conversion_number_signed_to_string_) || !defined(_di_f_conversion_number_unsigned_to_string_) - extern f_status_t private_f_conversion_digit_to_string(const f_number_unsigned_t number, const f_conversion_data_t data, const uint8_t negative, f_string_dynamic_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_conversion_digit_to_string(const f_number_unsigned_t number, const f_conversion_data_t data, const uint8_t negative, f_string_dynamic_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_conversion_number_signed_to_string_) || !defined(_di_f_conversion_number_unsigned_to_string_) /** @@ -212,7 +212,7 @@ extern "C" { * @see f_conversion_number_unsigned_to_string() */ #if !defined(_di_f_conversion_number_signed_to_string_) || !defined(_di_f_conversion_number_unsigned_to_string_) - extern void private_f_conversion_digit_to_string_number(const f_conversion_data_t data, f_number_unsigned_t number, int digits, f_string_dynamic_t *destination) f_attribute_visibility_internal; + extern void private_f_conversion_digit_to_string_number(const f_conversion_data_t data, f_number_unsigned_t number, int digits, f_string_dynamic_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_conversion_number_signed_to_string_) || !defined(_di_f_conversion_number_unsigned_to_string_) /** @@ -233,7 +233,7 @@ extern "C" { * @see f_conversion_number_unsigned_to_string() */ #if !defined(_di_f_conversion_number_signed_to_string_) || !defined(_di_f_conversion_number_unsigned_to_string_) - extern void private_f_conversion_digit_to_string_pad(const f_conversion_data_t data, const char pad, int total, f_string_dynamic_t *destination) f_attribute_visibility_internal; + extern void private_f_conversion_digit_to_string_pad(const f_conversion_data_t data, const char pad, int total, f_string_dynamic_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_conversion_number_signed_to_string_) || !defined(_di_f_conversion_number_unsigned_to_string_) /** @@ -255,7 +255,7 @@ extern "C" { * @see f_conversion_number_unsigned_to_string() */ #if !defined(_di_f_conversion_number_signed_to_string_) || !defined(_di_f_conversion_number_unsigned_to_string_) - extern void private_f_conversion_digit_to_string_prefix(const f_conversion_data_t data, const uint8_t negative, f_string_dynamic_t *destination) f_attribute_visibility_internal; + extern void private_f_conversion_digit_to_string_prefix(const f_conversion_data_t data, const uint8_t negative, f_string_dynamic_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_conversion_number_signed_to_string_) || !defined(_di_f_conversion_number_unsigned_to_string_) #ifdef __cplusplus diff --git a/level_0/f_directory/c/directory-common.h b/level_0/f_directory/c/directory-common.h index 2434643..080e323 100644 --- a/level_0/f_directory/c/directory-common.h +++ b/level_0/f_directory/c/directory-common.h @@ -20,16 +20,16 @@ extern "C" { * Directory AT_* define related functionality. */ #ifndef _di_f_directory_at_ - #define f_directory_at_current_working -100 - #define f_directory_at_symlink_follow 0x400 - #define f_directory_at_symlink_follow_no 0x100 - #define f_directory_at_remove_directory 0x200 - #define f_directory_at_automount_no 0x800 - #define f_directory_at_path_empty 0x1000 - #define f_directory_at_statx_sync_type 0x6000 - #define f_directory_at_statx_sync_as_stat 0x0000 - #define f_directory_at_statx_sync_force 0x2000 - #define f_directory_at_statx_sync_no 0x4000 + #define F_directory_at_current_working_d -100 + #define F_directory_at_symlink_follow_d 0x400 + #define F_directory_at_symlink_follow_no_d 0x100 + #define F_directory_at_remove_directory_d 0x200 + #define F_directory_at_automount_no_d 0x800 + #define F_directory_at_path_empty_d 0x1000 + #define F_directory_at_statx_sync_type_d 0x6000 + #define F_directory_at_statx_sync_as_stat_d 0x0000 + #define F_directory_at_statx_sync_force_d 0x2000 + #define F_directory_at_statx_sync_no_d 0x4000 #endif // _di_f_directory_at_ /** @@ -38,26 +38,26 @@ extern "C" { #ifndef _di_f_directory_flag_ // directory open flags - #define f_directory_flag_append O_APPEND - #define f_directory_flag_asynchronous O_ASYNC - #define f_directory_flag_create O_CREAT - #define f_directory_flag_close_execute O_CLOEXEC - #define f_directory_flag_direct O_DIRECT - #define f_directory_flag_directory O_DIRECTORY - #define f_directory_flag_exclusive O_EXCL - #define f_directory_flag_large_file O_LARGEFILE - #define f_directory_flag_no_access_time O_NOATIME - #define f_directory_flag_no_follow O_NOFOLLOW - #define f_directory_flag_no_tty O_NOCTTY - #define f_directory_flag_non_blocking O_NONBLOCK - #define f_directory_flag_path 010000000 - #define f_directory_flag_read_only O_RDONLY - #define f_directory_flag_read_write O_RDWR - #define f_directory_flag_synchronous O_SYNC - #define f_directory_flag_synchronous_direct O_DSYNC - #define f_directory_flag_temporary O_TMPFILE - #define f_directory_flag_truncate O_TRUNC - #define f_directory_flag_write_only O_WRONLY + #define F_directory_flag_append_d O_APPEND + #define F_directory_flag_asynchronous_d O_ASYNC + #define F_directory_flag_create_d O_CREAT + #define F_directory_flag_close_execute_d O_CLOEXEC + #define F_directory_flag_direct_d O_DIRECT + #define F_directory_flag_directory_d O_DIRECTORY + #define F_directory_flag_exclusive_d O_EXCL + #define F_directory_flag_large_file_d O_LARGEFILE + #define F_directory_flag_no_access_time_d O_NOATIME + #define F_directory_flag_no_follow_d O_NOFOLLOW + #define F_directory_flag_no_tty_d O_NOCTTY + #define F_directory_flag_non_blocking_d O_NONBLOCK + #define F_directory_flag_path_d 010000000 + #define F_directory_flag_read_only_d O_RDONLY + #define F_directory_flag_read_write_d O_RDWR + #define F_directory_flag_synchronous_d O_SYNC + #define F_directory_flag_synchronous_direct_d O_DSYNC + #define F_directory_flag_temporary_d O_TMPFILE + #define F_directory_flag_truncate_d O_TRUNC + #define F_directory_flag_write_only_d O_WRONLY #endif // _di_f_directory_flag_ /** @@ -67,10 +67,10 @@ extern "C" { * This is generally used for nftw() recursive operations to reduce the number of open file descriptors during recursion. */ #ifndef _di_f_directory_limitations_ - #define f_directory_default_allocation_step f_memory_default_allocation_small + #define F_directory_default_allocation_step_d F_memory_default_allocation_small_d - #define f_directory_descriptors_max 255 - #define f_directory_name_max NAME_MAX + #define F_directory_descriptors_max_d 255 + #define F_directory_name_max_d NAME_MAX #endif // _di_f_directory_limitations_ #ifdef __cplusplus diff --git a/level_0/f_directory/c/directory.c b/level_0/f_directory/c/directory.c index 1681e8c..f517c1e 100644 --- a/level_0/f_directory/c/directory.c +++ b/level_0/f_directory/c/directory.c @@ -156,7 +156,7 @@ extern "C" { for (; i < length; ++i) { - size = strnlen(listing[i]->d_name, f_directory_name_max); + size = strnlen(listing[i]->d_name, F_directory_name_max_d); // There is no reason to include "." and ".." in the directory listing. if (!strncmp(listing[i]->d_name, "..", 3) || !strncmp(listing[i]->d_name, ".", 2)) { @@ -166,7 +166,7 @@ extern "C" { } if (names->used == names->size) { - macro_f_memory_structure_increment(status, (*names), 1, f_directory_default_allocation_step, macro_f_string_dynamics_t_resize, F_array_too_large); + macro_f_memory_structure_increment(status, (*names), 1, F_directory_default_allocation_step_d, macro_f_string_dynamics_t_resize, F_array_too_large); if (F_status_is_error(status)) break; } @@ -204,10 +204,10 @@ extern "C" { if (!id) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - int flag = f_directory_flag_directory | f_directory_flag_close_execute | f_directory_flag_path; + int flag = F_directory_flag_directory_d | F_directory_flag_close_execute_d | F_directory_flag_path_d; if (dereference) { - flag |= f_directory_flag_no_follow; + flag |= F_directory_flag_no_follow_d; } *id = open(path, flag); @@ -242,10 +242,10 @@ extern "C" { if (!id) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - int flag = f_directory_flag_directory | f_directory_flag_close_execute | f_directory_flag_path; + int flag = F_directory_flag_directory_d | F_directory_flag_close_execute_d | F_directory_flag_path_d; if (dereference) { - flag |= f_directory_flag_no_follow; + flag |= F_directory_flag_no_follow_d; } *id = openat(at_id, path, flag); @@ -400,7 +400,7 @@ extern "C" { return F_status_set_error(F_file_stat); } - if (utimensat(f_directory_at_current_working, path, 0, 0) < 0) { + if (utimensat(F_directory_at_current_working_d, path, 0, 0) < 0) { if (errno == EACCES) return F_status_set_error(F_access_denied); if (errno == EBADF) return F_status_set_error(F_directory_descriptor); if (errno == EFAULT) return F_status_set_error(F_buffer); diff --git a/level_0/f_directory/c/directory.h b/level_0/f_directory/c/directory.h index 6aca2d2..6f6e631 100644 --- a/level_0/f_directory/c/directory.h +++ b/level_0/f_directory/c/directory.h @@ -143,7 +143,7 @@ extern "C" { * @param path * The file path to the directory. * @param flag - * Any valid flag, such as f_directory_at_path_empty, f_directory_at_automount_no, or f_directory_at_symlink_follow_no. + * Any valid flag, such as F_directory_at_path_empty_d, F_directory_at_automount_no_d, or F_directory_at_symlink_follow_no_d. * * @return * F_true if path was found and path is a directory (or a symlink to a directory). @@ -196,7 +196,7 @@ extern "C" { * @param path * The file path to the directory. * @param flag - * Any valid flag, such as f_directory_at_path_empty, f_directory_at_automount_no, or f_directory_at_symlink_follow_no. + * Any valid flag, such as F_directory_at_path_empty_d, F_directory_at_automount_no_d, or F_directory_at_symlink_follow_no_d. * * @return * F_true if path was found and path is a directory. @@ -466,7 +466,7 @@ extern "C" { * @param mode * The file mode to use when (directory) file is created. * @param flag - * Any valid flag, such as f_file_at_path_empty, f_file_at_automount_no, or f_file_at_symlink_follow_no. + * Any valid flag, such as F_file_at_path_empty_d, F_file_at_automount_no_d, or F_file_at_symlink_follow_no_d. * * @return * F_none on success. diff --git a/level_0/f_directory/c/private-directory.h b/level_0/f_directory/c/private-directory.h index c66d329..cc1c7ed 100644 --- a/level_0/f_directory/c/private-directory.h +++ b/level_0/f_directory/c/private-directory.h @@ -46,7 +46,7 @@ extern "C" { * @see f_directory_touch() */ #if !defined(_di_f_directory_create_) || !defined(_di_f_directory_touch_) - extern f_status_t private_f_directory_create(const f_string_t path, const mode_t mode) f_attribute_visibility_internal; + extern f_status_t private_f_directory_create(const f_string_t path, const mode_t mode) F_attribute_visibility_internal_d; #endif // !defined(_di_f_directory_create_) || !defined(_di_f_directory_touch_) /** @@ -84,7 +84,7 @@ extern "C" { * @see f_directory_touch_at() */ #if !defined(_di_f_directory_create_at_) || !defined(_di_f_directory_touch_at_) - extern f_status_t private_f_directory_create_at(const int at_id, const f_string_t path, const mode_t mode) f_attribute_visibility_internal; + extern f_status_t private_f_directory_create_at(const int at_id, const f_string_t path, const mode_t mode) F_attribute_visibility_internal_d; #endif // !defined(_di_f_directory_create_at_) || !defined(_di_f_directory_touch_at_) /** @@ -111,7 +111,7 @@ extern "C" { * @see f_directory_remove() */ #if !defined(_di_f_directory_remove_) - extern int private_f_directory_remove_recursively(const char *path, const struct stat *file_stat, int type, struct FTW *entity) f_attribute_visibility_internal; + extern int private_f_directory_remove_recursively(const char *path, const struct stat *file_stat, int type, struct FTW *entity) F_attribute_visibility_internal_d; #endif // !defined(_di_f_directory_remove_) #ifdef __cplusplus diff --git a/level_0/f_environment/c/environment-common.h b/level_0/f_environment/c/environment-common.h index ef70835..b51b397 100644 --- a/level_0/f_environment/c/environment-common.h +++ b/level_0/f_environment/c/environment-common.h @@ -20,7 +20,7 @@ extern "C" { * Environment related defines. */ #ifndef _di_f_environment_defines_ - #define f_environment_max_length f_string_t_size + #define f_environment_max_length F_string_t_size_d #endif // _di_f_environment_defines_ #ifdef __cplusplus diff --git a/level_0/f_environment/c/private-environment.h b/level_0/f_environment/c/private-environment.h index e5ec29e..92e2b10 100644 --- a/level_0/f_environment/c/private-environment.h +++ b/level_0/f_environment/c/private-environment.h @@ -39,7 +39,7 @@ extern "C" { * @see f_environment_get_dynamic() */ #if !defined(_di_f_environment_get_) || !defined(_di_f_environment_get_dynamic_) - extern f_status_t private_f_environment_get(const f_string_t name, f_string_dynamic_t *value) f_attribute_visibility_internal; + extern f_status_t private_f_environment_get(const f_string_t name, f_string_dynamic_t *value) F_attribute_visibility_internal_d; #endif // !defined(_di_f_environment_get_) || !defined(_di_f_environment_get_dynamic_) /** @@ -67,7 +67,7 @@ extern "C" { * @see f_environment_set_dynamic() */ #if !defined(_di_f_environment_set_) || !defined(_di_f_environment_set_dynamic_) - extern f_status_t private_f_environment_set(const f_string_t name, const f_string_t value, const bool replace) f_attribute_visibility_internal; + extern f_status_t private_f_environment_set(const f_string_t name, const f_string_t value, const bool replace) F_attribute_visibility_internal_d; #endif // !defined(_di_f_environment_set_) || !defined(_di_f_environment_set_dynamic_) /** @@ -88,7 +88,7 @@ extern "C" { * @see f_environment_unset_dynamic() */ #if !defined(_di_f_environment_unset_) || !defined(_di_f_environment_unset_dynamic_) - extern f_status_t private_f_environment_unset(const f_string_t name) f_attribute_visibility_internal; + extern f_status_t private_f_environment_unset(const f_string_t name) F_attribute_visibility_internal_d; #endif // !defined(_di_f_environment_unset_) || !defined(_di_f_environment_unset_dynamic_) #ifdef __cplusplus diff --git a/level_0/f_file/c/file-common.c b/level_0/f_file/c/file-common.c index 1ce7e5e..e357bd5 100644 --- a/level_0/f_file/c/file-common.c +++ b/level_0/f_file/c/file-common.c @@ -6,19 +6,19 @@ extern "C" { #endif #ifndef _di_f_file_type_ - const f_string_t f_file_type_name_blocks = f_file_type_name_block; - const f_string_t f_file_type_name_character_s = f_file_type_name_character; - const f_string_t f_file_type_name_directory_s = f_file_type_name_directory; - const f_string_t f_file_type_name_link_s = f_file_type_name_link; - const f_string_t f_file_type_name_regular_s = f_file_type_name_regular; - const f_string_t f_file_type_name_socket_s = f_file_type_name_socket; + const f_string_t f_file_type_name_blocks_s = F_file_type_name_block_s; + const f_string_t f_file_type_name_character_s = F_file_type_name_character_s; + const f_string_t f_file_type_name_directory_s = F_file_type_name_directory_s; + const f_string_t f_file_type_name_link_s = F_file_type_name_link_s; + const f_string_t f_file_type_name_regular_s = F_file_type_name_regular_s; + const f_string_t f_file_type_name_socket_s = F_file_type_name_socket_s; - const f_string_t f_file_open_mode_append_s = macro_f_file_open_mode_append; - const f_string_t f_file_open_mode_read_s = macro_f_file_open_mode_read; - const f_string_t f_file_open_mode_read_append_s = macro_f_file_open_mode_read_append; - const f_string_t f_file_open_mode_read_truncate_s = macro_f_file_open_mode_read_truncate; - const f_string_t f_file_open_mode_read_write_s = macro_f_file_open_mode_read_write; - const f_string_t f_file_open_mode_truncate_s = macro_f_file_open_mode_truncate; + const f_string_t f_file_open_mode_append_s = F_file_open_mode_append_s; + const f_string_t f_file_open_mode_read_s = F_file_open_mode_read_s; + const f_string_t f_file_open_mode_read_append_s = F_file_open_mode_read_append_s; + const f_string_t f_file_open_mode_read_truncate_s = F_file_open_mode_read_truncate_s; + const f_string_t f_file_open_mode_read_write_s = F_file_open_mode_read_write_s; + const f_string_t f_file_open_mode_truncate_s = F_file_open_mode_truncate_s; #endif // _di_f_file_type_ #ifdef __cplusplus diff --git a/level_0/f_file/c/file-common.h b/level_0/f_file/c/file-common.h index cd5040d..ee3a0ff 100644 --- a/level_0/f_file/c/file-common.h +++ b/level_0/f_file/c/file-common.h @@ -20,8 +20,8 @@ extern "C" { * Provide common file-typ specific data types. */ #ifndef _di_f_file_types_ - #define f_file_default_read_size 8192 // default to 8k read sizes. // @fixme rename and move into _di_f_file_type_ - #define f_file_default_write_size 8192 // default to 8k write sizes. // @fixme rename and move into _di_f_file_type_ + #define F_file_default_read_size_d 8192 // default to 8k read sizes. // @fixme rename and move into _di_f_file_type_ + #define F_file_default_write_size_d 8192 // default to 8k write sizes. // @fixme rename and move into _di_f_file_type_ #endif // _di_f_file_types_ /** @@ -29,11 +29,12 @@ extern "C" { * * The fseek() function parameters can be confusing, so provide a hopefully more readibly code via these macros. * - * The macro_f_file_seek_begin() sets the file pointer from this many bytes from the beginning of the file. - * The macro_f_file_seek_data() sets the file pointer from this many bytes from the end of the file, relative to the next data. - * The macro_f_file_seek_end() sets the file pointer from this many bytes from the end of the file. - * The macro_f_file_seek_hole() sets the file pointer from this many bytes from the end of the file, relative to the next hole. - * The macro_f_file_seek_to() sets the file pointer from this many bytes relative to the current position. + * macro_f_file_seek_*: + * - begin: sets the file pointer from this many bytes from the beginning of the file. + * - data: sets the file pointer from this many bytes from the end of the file, relative to the next data. + * - end: sets the file pointer from this many bytes from the end of the file. + * - hole: sets the file pointer from this many bytes from the end of the file, relative to the next hole. + * - to: sets the file pointer from this many bytes relative to the current position. */ #ifndef _di_f_file_seeks_ #define macro_f_file_seek_begin(file, bytes) fseek(file, bytes, SEEK_SET) @@ -49,57 +50,57 @@ extern "C" { * These type macros are of size 32-bit (int32_t). */ #ifndef _di_f_file_type_ - #define f_file_type_mask S_IFMT - - #define f_file_type_block S_IFBLK - #define f_file_type_character S_IFCHR - #define f_file_type_directory S_IFDIR - #define f_file_type_fifo S_IFIFO - #define f_file_type_link S_IFLNK - #define f_file_type_regular S_IFREG - #define f_file_type_socket S_IFSOCK - - #define f_file_type_name_block "block" - #define f_file_type_name_character "character" - #define f_file_type_name_directory "directory" - #define f_file_type_name_fifo "fifo" - #define f_file_type_name_link "link" - #define f_file_type_name_regular "regular" - #define f_file_type_name_socket "socket" - - #define f_file_type_name_block_length 5 - #define f_file_type_name_character_length 9 - #define f_file_type_name_directory_length 9 - #define f_file_type_name_fifo_length 4 - #define f_file_type_name_link_length 4 - #define f_file_type_name_regular_length 7 - #define f_file_type_name_socket_length 6 - - #define macro_f_file_type_get(mode) (f_file_type_mask & mode) - - #define macro_f_file_type_is_block(mode) (macro_f_file_type_get(mode) == f_file_type_block) - #define macro_f_file_type_is_character(mode) (macro_f_file_type_get(mode) == f_file_type_character) - #define macro_f_file_type_is_directory(mode) (macro_f_file_type_get(mode) == f_file_type_directory) - #define macro_f_file_type_is_fifo(mode) (macro_f_file_type_get(mode) == f_file_type_fifo) - #define macro_f_file_type_is_link(mode) (macro_f_file_type_get(mode) == f_file_type_link) - #define macro_f_file_type_is_regular(mode) (macro_f_file_type_get(mode) == f_file_type_regular) - #define macro_f_file_type_is_socket(mode) (macro_f_file_type_get(mode) == f_file_type_socket) - - #define macro_f_file_open_mode_append "a" - #define macro_f_file_open_mode_read "r" - #define macro_f_file_open_mode_read_append "a+" - #define macro_f_file_open_mode_read_truncate "w+" - #define macro_f_file_open_mode_read_write "r+" - #define macro_f_file_open_mode_truncate "w" - - #define macro_f_file_open_mode_append_length 1 - #define macro_f_file_open_mode_read_length 1 - #define macro_f_file_open_mode_read_append_length 2 - #define macro_f_file_open_mode_read_truncate_length 2 - #define macro_f_file_open_mode_read_write_length 2 - #define macro_f_file_open_mode_truncate_length 1 - - extern const f_string_t f_file_type_name_blocks; + #define F_file_type_mask_d S_IFMT + + #define F_file_type_block_d S_IFBLK + #define F_file_type_character_d S_IFCHR + #define F_file_type_directory_d S_IFDIR + #define F_file_type_fifo_d S_IFIFO + #define F_file_type_link_d S_IFLNK + #define F_file_type_regular_d S_IFREG + #define F_file_type_socket_d S_IFSOCK + + #define F_file_type_name_block_s "block" + #define F_file_type_name_character_s "character" + #define F_file_type_name_directory_s "directory" + #define F_file_type_name_fifo_s "fifo" + #define F_file_type_name_link_s "link" + #define F_file_type_name_regular_s "regular" + #define F_file_type_name_socket_s "socket" + + #define F_file_type_name_block_s_length 5 + #define F_file_type_name_character_s_length 9 + #define F_file_type_name_directory_s_length 9 + #define F_file_type_name_fifo_s_length 4 + #define F_file_type_name_link_s_length 4 + #define F_file_type_name_regular_s_length 7 + #define F_file_type_name_socket_s_length 6 + + #define macro_f_file_type_get(mode) (F_file_type_mask_d & mode) + + #define macro_f_file_type_is_block(mode) (macro_f_file_type_get(mode) == F_file_type_block_d) + #define macro_f_file_type_is_character(mode) (macro_f_file_type_get(mode) == F_file_type_character_d) + #define macro_f_file_type_is_directory(mode) (macro_f_file_type_get(mode) == F_file_type_directory_d) + #define macro_f_file_type_is_fifo(mode) (macro_f_file_type_get(mode) == F_file_type_fifo_d) + #define macro_f_file_type_is_link(mode) (macro_f_file_type_get(mode) == F_file_type_link_d) + #define macro_f_file_type_is_regular(mode) (macro_f_file_type_get(mode) == F_file_type_regular_d) + #define macro_f_file_type_is_socket(mode) (macro_f_file_type_get(mode) == F_file_type_socket_d) + + #define F_file_open_mode_append_s "a" + #define F_file_open_mode_read_s "r" + #define F_file_open_mode_read_append_s "a+" + #define F_file_open_mode_read_truncate_s "w+" + #define F_file_open_mode_read_write_s "r+" + #define F_file_open_mode_truncate_s "w" + + #define F_file_open_mode_append_s_length 1 + #define F_file_open_mode_read_s_length 1 + #define F_file_open_mode_read_append_s_length 2 + #define F_file_open_mode_read_truncate_s_length 2 + #define F_file_open_mode_read_write_s_length 2 + #define F_file_open_mode_truncate_s_length 1 + + extern const f_string_t f_file_type_name_blocks_s; extern const f_string_t f_file_type_name_character_s; extern const f_string_t f_file_type_name_directory_s; extern const f_string_t f_file_type_name_link_s; @@ -132,10 +133,10 @@ extern "C" { size_t size_write; } f_file_t; - #define f_file_t_initialize { 0, -1, f_file_flag_read_only, f_file_default_read_size, f_file_default_write_size } + #define f_file_t_initialize { 0, -1, F_file_flag_read_only_d, F_file_default_read_size_d, F_file_default_write_size_d } #define macro_f_file_t_initialize(stream, id, flag, read_size, write_size) { stream, id, flag, read_size, write_size } - #define macro_f_file_t_initialize2(stream, id, flag) { stream, id, flag, f_file_default_read_size, f_file_default_write_size } + #define macro_f_file_t_initialize2(stream, id, flag) { stream, id, flag, F_file_default_read_size_d, F_file_default_write_size_d } #define macro_f_file_t_clear(file) \ file.stream = 0; \ @@ -147,25 +148,25 @@ extern "C" { #define macro_f_file_t_reset(file) \ file.stream = 0; \ file.id = -1; \ - file.flag = f_file_flag_read_only; \ - file.size_read = f_file_default_read_size; \ - file.size_write = f_file_default_write_size; + file.flag = F_file_flag_read_only_d; \ + file.size_read = F_file_default_read_size_d; \ + file.size_write = F_file_default_write_size_d; #endif // _di_f_file_t_ /** * File AT_* define related functionality. */ #ifndef _di_f_file_at_ - #define f_file_at_current_working -100 - #define f_file_at_symlink_follow 0x400 - #define f_file_at_symlink_follow_no 0x100 - #define f_file_at_remove_directory 0x200 - #define f_file_at_automount_no 0x800 - #define f_file_at_path_empty 0x1000 - #define f_file_at_statx_sync_type 0x6000 - #define f_file_at_statx_sync_as_stat 0x0000 - #define f_file_at_statx_sync_force 0x2000 - #define f_file_at_statx_sync_no 0x4000 + #define F_file_at_current_working_d -100 + #define F_file_at_symlink_follow_d 0x400 + #define F_file_at_symlink_follow_no_d 0x100 + #define F_file_at_remove_directory_d 0x200 + #define F_file_at_automount_no_d 0x800 + #define F_file_at_path_empty_d 0x1000 + #define F_file_at_statx_sync_type_d 0x6000 + #define F_file_at_statx_sync_as_stat_d 0x0000 + #define F_file_at_statx_sync_force_d 0x2000 + #define F_file_at_statx_sync_no_d 0x4000 #endif // _di_f_file_at_ /** @@ -174,101 +175,101 @@ extern "C" { #ifndef _di_f_file_flag_ // file open flags - #define f_file_flag_append O_APPEND - #define f_file_flag_asynchronous O_ASYNC - #define f_file_flag_create O_CREAT - #define f_file_flag_close_execute O_CLOEXEC - #define f_file_flag_direct O_DIRECT - #define f_file_flag_directory O_DIRECTORY - #define f_file_flag_exclusive O_EXCL - #define f_file_flag_large_file O_LARGEFILE - #define f_file_flag_no_access_time O_NOATIME - #define f_file_flag_no_follow O_NOFOLLOW - #define f_file_flag_no_tty O_NOCTTY - #define f_file_flag_non_blocking O_NONBLOCK - #define f_file_flag_path 010000000 - #define f_file_flag_read_only O_RDONLY - #define f_file_flag_read_write O_RDWR - #define f_file_flag_synchronous O_SYNC - #define f_file_flag_synchronous_direct O_DSYNC - #define f_file_flag_temporary O_TMPFILE - #define f_file_flag_truncate O_TRUNC - #define f_file_flag_write_only O_WRONLY + #define F_file_flag_append_d O_APPEND + #define F_file_flag_asynchronous_d O_ASYNC + #define F_file_flag_create_d O_CREAT + #define F_file_flag_close_execute_d O_CLOEXEC + #define F_file_flag_direct_d O_DIRECT + #define F_file_flag_directory_d O_DIRECTORY + #define F_file_flag_exclusive_d O_EXCL + #define F_file_flag_large_file_d O_LARGEFILE + #define F_file_flag_no_access_time_d O_NOATIME + #define F_file_flag_no_follow_d O_NOFOLLOW + #define F_file_flag_no_tty_d O_NOCTTY + #define F_file_flag_non_blocking_d O_NONBLOCK + #define F_file_flag_path_d 010000000 + #define F_file_flag_read_only_d O_RDONLY + #define F_file_flag_read_write_d O_RDWR + #define F_file_flag_synchronous_d O_SYNC + #define F_file_flag_synchronous_direct_d O_DSYNC + #define F_file_flag_temporary_d O_TMPFILE + #define F_file_flag_truncate_d O_TRUNC + #define F_file_flag_write_only_d O_WRONLY // file open flags pre-combined with create. - #define f_file_flag_create_ro (O_CREAT | O_RDONLY) - #define f_file_flag_create_wo (O_CREAT | O_WRONLY) - #define f_file_flag_create_rw (O_CREAT | O_RDRW) + #define F_file_flag_create_ro_d (O_CREAT | O_RDONLY) + #define F_file_flag_create_wo_d (O_CREAT | O_WRONLY) + #define F_file_flag_create_rw_d (O_CREAT | O_RDRW) // file open flags pre-combined will fail if file exists. - #define f_file_flag_create_new_ro (O_CREAT | O_EXCL | O_RDONLY) - #define f_file_flag_create_new_wo (O_CREAT | O_EXCL | O_WRONLY) - #define f_file_flag_create_new_rw (O_CREAT | O_EXCL | O_RDRW) + #define F_file_flag_create_new_ro_d (O_CREAT | O_EXCL | O_RDONLY) + #define F_file_flag_create_new_wo_d (O_CREAT | O_EXCL | O_WRONLY) + #define F_file_flag_create_new_rw_d (O_CREAT | O_EXCL | O_RDRW) // file open flags pre-combined will truncate any existing files to 0. - #define f_file_flag_truncate_ro (O_CREAT | O_TRUNC | O_RDONLY) - #define f_file_flag_truncate_rw (O_CREAT | O_TRUNC | O_RDRW) - #define f_file_flag_truncate_wo (O_CREAT | O_TRUNC | O_WRONLY) + #define F_file_flag_truncate_ro_d (O_CREAT | O_TRUNC | O_RDONLY) + #define F_file_flag_truncate_rw_d (O_CREAT | O_TRUNC | O_RDRW) + #define F_file_flag_truncate_wo_d (O_CREAT | O_TRUNC | O_WRONLY) // file open flags pre-combined will truncate any existing files to 0. - #define f_file_flag_append_rw (O_CREAT | O_APPEND | O_RDRW) - #define f_file_flag_append_wo (O_CREAT | O_APPEND | O_WRONLY) + #define F_file_flag_append_rw_d (O_CREAT | O_APPEND | O_RDRW) + #define F_file_flag_append_wo_d (O_CREAT | O_APPEND | O_WRONLY) // file open flags pre-combined with synchronous io. - #define f_file_flag_sync_ro (O_SYNC | O_RDONLY) - #define f_file_flag_sync_wo (O_SYNC | O_WRONLY) - #define f_file_flag_sync_rw (O_SYNC | O_RDRW) - #define f_file_flag_sync_create_ro (O_SYNC | O_CREAT | O_RDONLY) - #define f_file_flag_sync_create_wo (O_SYNC | O_CREAT | O_WRONLY) - #define f_file_flag_sync_create_rw (O_SYNC | O_CREAT | O_RDRW) - #define f_file_flag_sync_create_new_ro (O_SYNC | O_CREAT | O_EXCL | O_RDONLY) - #define f_file_flag_sync_create_new_wo (O_SYNC | O_CREAT | O_EXCL | O_WRONLY) - #define f_file_flag_sync_create_new_rw (O_SYNC | O_CREAT | O_EXCL | O_RDRW) + #define F_file_flag_sync_ro_d (O_SYNC | O_RDONLY) + #define F_file_flag_sync_wo_d (O_SYNC | O_WRONLY) + #define F_file_flag_sync_rw_d (O_SYNC | O_RDRW) + #define F_file_flag_sync_create_ro_d (O_SYNC | O_CREAT | O_RDONLY) + #define F_file_flag_sync_create_wo_d (O_SYNC | O_CREAT | O_WRONLY) + #define F_file_flag_sync_create_rw_d (O_SYNC | O_CREAT | O_RDRW) + #define F_file_flag_sync_create_new_ro_d (O_SYNC | O_CREAT | O_EXCL | O_RDONLY) + #define F_file_flag_sync_create_new_wo_d (O_SYNC | O_CREAT | O_EXCL | O_WRONLY) + #define F_file_flag_sync_create_new_rw_d (O_SYNC | O_CREAT | O_EXCL | O_RDRW) // file open flags pre-combined with asynchronous io. - #define f_file_flag_async_ro (O_ASYNC | O_RDONLY) - #define f_file_flag_async_wo (O_ASYNC | O_WRONLY) - #define f_file_flag_async_rw (O_ASYNC | O_RDRW) - #define f_file_flag_async_create_ro (O_ASYNC | O_CREAT | O_RDONLY) - #define f_file_flag_async_create_wo (O_ASYNC | O_CREAT | O_WRONLY) - #define f_file_flag_async_create_rw (O_ASYNC | O_CREAT | O_RDRW) - #define f_file_flag_async_create_new_ro (O_ASYNC | O_CREAT | O_EXCL | O_RDONLY) - #define f_file_flag_async_create_new_wo (O_ASYNC | O_CREAT | O_EXCL | O_WRONLY) - #define f_file_flag_async_create_new_rw (O_ASYNC | O_CREAT | O_EXCL | O_RDRW) + #define F_file_flag_async_ro_d (O_ASYNC | O_RDONLY) + #define F_file_flag_async_wo_d (O_ASYNC | O_WRONLY) + #define F_file_flag_async_rw_d (O_ASYNC | O_RDRW) + #define F_file_flag_async_create_ro_d (O_ASYNC | O_CREAT | O_RDONLY) + #define F_file_flag_async_create_wo_d (O_ASYNC | O_CREAT | O_WRONLY) + #define F_file_flag_async_create_rw_d (O_ASYNC | O_CREAT | O_RDRW) + #define F_file_flag_async_create_new_ro_d (O_ASYNC | O_CREAT | O_EXCL | O_RDONLY) + #define F_file_flag_async_create_new_wo_d (O_ASYNC | O_CREAT | O_EXCL | O_WRONLY) + #define F_file_flag_async_create_new_rw_d (O_ASYNC | O_CREAT | O_EXCL | O_RDRW) // file open flags pre-combined with direct io (which works synchronously). - #define f_file_flag_direct_ro (O_DIRECT | O_RDONLY) - #define f_file_flag_direct_wo (O_DIRECT | O_WRONLY) - #define f_file_flag_direct_rw (O_DIRECT | O_RDRW) - #define f_file_flag_direct_create_ro (O_DIRECT | O_CREAT | O_RDONLY) - #define f_file_flag_direct_create_wo (O_DIRECT | O_CREAT | O_WRONLY) - #define f_file_flag_direct_create_rw (O_DIRECT | O_CREAT | O_RDRW) - #define f_file_flag_direct_create_new_ro (O_DIRECT | O_CREAT | O_EXCL | O_RDONLY) - #define f_file_flag_direct_create_new_wo (O_DIRECT | O_CREAT | O_EXCL | O_WRONLY) - #define f_file_flag_direct_create_new_rw (O_DIRECT | O_CREAT | O_EXCL | O_RDRW) + #define F_file_flag_direct_ro_d (O_DIRECT | O_RDONLY) + #define F_file_flag_direct_wo_d (O_DIRECT | O_WRONLY) + #define F_file_flag_direct_rw_d (O_DIRECT | O_RDRW) + #define F_file_flag_direct_create_ro_d (O_DIRECT | O_CREAT | O_RDONLY) + #define F_file_flag_direct_create_wo_d (O_DIRECT | O_CREAT | O_WRONLY) + #define F_file_flag_direct_create_rw_d (O_DIRECT | O_CREAT | O_RDRW) + #define F_file_flag_direct_create_new_ro_d (O_DIRECT | O_CREAT | O_EXCL | O_RDONLY) + #define F_file_flag_direct_create_new_wo_d (O_DIRECT | O_CREAT | O_EXCL | O_WRONLY) + #define F_file_flag_direct_create_new_rw_d (O_DIRECT | O_CREAT | O_EXCL | O_RDRW) // file open flags pre-combined with large_file. - #define f_file_flag_large_ro (O_LARGEFILE | O_RDONLY) - #define f_file_flag_large_wo (O_LARGEFILE | O_WRONLY) - #define f_file_flag_large_rw (O_LARGEFILE | O_RDRW) - #define f_file_flag_large_sync_ro (O_LARGEFILE | O_SYNC | O_RDONLY) - #define f_file_flag_large_sync_wo (O_LARGEFILE | O_SYNC | O_WRONLY) - #define f_file_flag_large_sync_rw (O_LARGEFILE | O_SYNC | O_RDRW) - #define f_file_flag_large_sync_create_ro (O_LARGEFILE | O_SYNC | O_CREAT | O_RDONLY) - #define f_file_flag_large_sync_create_wo (O_LARGEFILE | O_SYNC | O_CREAT | O_WRONLY) - #define f_file_flag_large_sync_create_rw (O_LARGEFILE | O_SYNC | O_CREAT | O_RDRW) - #define f_file_flag_large_sync_create_new_ro (O_LARGEFILE | O_SYNC | O_CREAT | O_EXCL | O_RDONLY) - #define f_file_flag_large_sync_create_new_wo (O_LARGEFILE | O_SYNC | O_CREAT | O_EXCL | O_WRONLY) - #define f_file_flag_large_sync_create_new_rw (O_LARGEFILE | O_SYNC | O_CREAT | O_EXCL | O_RDRW) - #define f_file_flag_large_async_ro (O_LARGEFILE | O_ASYNC | O_RDONLY) - #define f_file_flag_large_async_wo (O_LARGEFILE | O_ASYNC | O_WRONLY) - #define f_file_flag_large_async_rw (O_LARGEFILE | O_ASYNC | O_RDRW) - #define f_file_flag_large_async_create_ro (O_LARGEFILE | O_ASYNC | O_CREAT | O_RDONLY) - #define f_file_flag_large_async_create_wo (O_LARGEFILE | O_ASYNC | O_CREAT | O_WRONLY) - #define f_file_flag_large_async_create_rw (O_LARGEFILE | O_ASYNC | O_CREAT | O_RDRW) - #define f_file_flag_large_async_create_new_ro (O_LARGEFILE | O_ASYNC | O_CREAT | O_EXCL | O_RDONLY) - #define f_file_flag_large_async_create_new_wo (O_LARGEFILE | O_ASYNC | O_CREAT | O_EXCL | O_WRONLY) - #define f_file_flag_large_async_create_new_rw (O_LARGEFILE | O_ASYNC | O_CREAT | O_EXCL | O_RDRW) + #define F_file_flag_large_ro_d (O_LARGEFILE | O_RDONLY) + #define F_file_flag_large_wo_d (O_LARGEFILE | O_WRONLY) + #define F_file_flag_large_rw_d (O_LARGEFILE | O_RDRW) + #define F_file_flag_large_sync_ro_d (O_LARGEFILE | O_SYNC | O_RDONLY) + #define F_file_flag_large_sync_wo_d (O_LARGEFILE | O_SYNC | O_WRONLY) + #define F_file_flag_large_sync_rw_d (O_LARGEFILE | O_SYNC | O_RDRW) + #define F_file_flag_large_sync_create_ro_d (O_LARGEFILE | O_SYNC | O_CREAT | O_RDONLY) + #define F_file_flag_large_sync_create_wo_d (O_LARGEFILE | O_SYNC | O_CREAT | O_WRONLY) + #define F_file_flag_large_sync_create_rw_d (O_LARGEFILE | O_SYNC | O_CREAT | O_RDRW) + #define F_file_flag_large_sync_create_new_ro_d (O_LARGEFILE | O_SYNC | O_CREAT | O_EXCL | O_RDONLY) + #define F_file_flag_large_sync_create_new_wo_d (O_LARGEFILE | O_SYNC | O_CREAT | O_EXCL | O_WRONLY) + #define F_file_flag_large_sync_create_new_rw_d (O_LARGEFILE | O_SYNC | O_CREAT | O_EXCL | O_RDRW) + #define F_file_flag_large_async_ro_d (O_LARGEFILE | O_ASYNC | O_RDONLY) + #define F_file_flag_large_async_wo_d (O_LARGEFILE | O_ASYNC | O_WRONLY) + #define F_file_flag_large_async_rw_d (O_LARGEFILE | O_ASYNC | O_RDRW) + #define F_file_flag_large_async_create_ro_d (O_LARGEFILE | O_ASYNC | O_CREAT | O_RDONLY) + #define F_file_flag_large_async_create_wo_d (O_LARGEFILE | O_ASYNC | O_CREAT | O_WRONLY) + #define F_file_flag_large_async_create_rw_d (O_LARGEFILE | O_ASYNC | O_CREAT | O_RDRW) + #define F_file_flag_large_async_create_new_ro_d (O_LARGEFILE | O_ASYNC | O_CREAT | O_EXCL | O_RDONLY) + #define F_file_flag_large_async_create_new_wo_d (O_LARGEFILE | O_ASYNC | O_CREAT | O_EXCL | O_WRONLY) + #define F_file_flag_large_async_create_new_rw_d (O_LARGEFILE | O_ASYNC | O_CREAT | O_EXCL | O_RDRW) #endif // _di_f_file_flag_ /** @@ -295,81 +296,81 @@ extern "C" { #ifndef _di_f_file_mode_ typedef uint32_t f_file_mode_t; - #define f_file_mode_t_block_special 0x77000000 // 0111 0111 0000 0000 0000 0000 0000 0000 - #define f_file_mode_t_block_owner 0x00ff0000 // 0000 0000 1111 1111 0000 0000 0000 0000 - #define f_file_mode_t_block_group 0x0000ff00 // 0000 0000 0000 0000 1111 1111 0000 0000 - #define f_file_mode_t_block_world 0x000000ff // 0000 0000 0000 0000 0000 0000 1111 1111 + #define F_file_mode_t_block_special_d 0x77000000 // 0111 0111 0000 0000 0000 0000 0000 0000 + #define F_file_mode_t_block_owner_d 0x00ff0000 // 0000 0000 1111 1111 0000 0000 0000 0000 + #define F_file_mode_t_block_group_d 0x0000ff00 // 0000 0000 0000 0000 1111 1111 0000 0000 + #define F_file_mode_t_block_world_d 0x000000ff // 0000 0000 0000 0000 0000 0000 1111 1111 - #define f_file_mode_t_block_all 0x77ffffff // 0111 0111 1111 1111 1111 1111 1111 1111 - #define f_file_mode_t_block_standard 0x00ffffff // 0000 0000 1111 1111 1111 1111 1111 1111 + #define F_file_mode_t_block_all_d 0x77ffffff // 0111 0111 1111 1111 1111 1111 1111 1111 + #define F_file_mode_t_block_standard_d 0x00ffffff // 0000 0000 1111 1111 1111 1111 1111 1111 - #define f_file_mode_t_mask_how_add 0x070f0f0f // 0000 0111 0000 1111 0000 1111 0000 1111 - #define f_file_mode_t_mask_how_subtract 0x70f0f0f0 // 0111 0000 1111 0000 1111 0000 1111 0000 + #define F_file_mode_t_mask_how_add_d 0x070f0f0f // 0000 0111 0000 1111 0000 1111 0000 1111 + #define F_file_mode_t_mask_how_subtract_d 0x70f0f0f0 // 0111 0000 1111 0000 1111 0000 1111 0000 - #define f_file_mode_t_mask_bit_execute 0x00111111 // 0000 0000 0001 0001 0001 0001 0001 0001 - #define f_file_mode_t_mask_bit_execute_only 0x00888888 // 0000 0000 1000 1000 1000 1000 1000 1000 - #define f_file_mode_t_mask_bit_read 0x00444444 // 0000 0000 0100 0100 0100 0100 0100 0100 - #define f_file_mode_t_mask_bit_set_group 0x22000000 // 0010 0010 0000 0000 0000 0000 0000 0000 - #define f_file_mode_t_mask_bit_set_owner 0x44000000 // 0100 0100 0000 0000 0000 0000 0000 0000 - #define f_file_mode_t_mask_bit_sticky 0x11000000 // 0001 0001 0000 0000 0000 0000 0000 0000 - #define f_file_mode_t_mask_bit_write 0x00222222 // 0000 0000 0010 0010 0010 0010 0010 0010 + #define F_file_mode_t_mask_bit_execute_d 0x00111111 // 0000 0000 0001 0001 0001 0001 0001 0001 + #define F_file_mode_t_mask_bit_execute_only_d 0x00888888 // 0000 0000 1000 1000 1000 1000 1000 1000 + #define F_file_mode_t_mask_bit_read_d 0x00444444 // 0000 0000 0100 0100 0100 0100 0100 0100 + #define F_file_mode_t_mask_bit_set_group_d 0x22000000 // 0010 0010 0000 0000 0000 0000 0000 0000 + #define F_file_mode_t_mask_bit_set_owner_d 0x44000000 // 0100 0100 0000 0000 0000 0000 0000 0000 + #define F_file_mode_t_mask_bit_sticky_d 0x11000000 // 0001 0001 0000 0000 0000 0000 0000 0000 + #define F_file_mode_t_mask_bit_write_d 0x00222222 // 0000 0000 0010 0010 0010 0010 0010 0010 - #define f_file_mode_t_replace_owner 0x1 // 0000 0001 - #define f_file_mode_t_replace_group 0x2 // 0000 0010 - #define f_file_mode_t_replace_world 0x4 // 0000 0100 - #define f_file_mode_t_replace_special 0x8 // 0000 1000 - #define f_file_mode_t_replace_directory 0x10 // 0001 0000 + #define F_file_mode_t_replace_owner_d 0x1 // 0000 0001 + #define F_file_mode_t_replace_group_d 0x2 // 0000 0010 + #define F_file_mode_t_replace_world_d 0x4 // 0000 0100 + #define F_file_mode_t_replace_special_d 0x8 // 0000 1000 + #define F_file_mode_t_replace_directory_d 0x10 // 0001 0000 - #define f_file_mode_t_replace_all 0x1f // 0001 1111 - #define f_file_mode_t_replace_other 0x18 // 0001 1000 - #define f_file_mode_t_replace_standard 0x7 // 0000 0111 + #define F_file_mode_t_replace_all_d 0x1f // 0001 1111 + #define F_file_mode_t_replace_other_d 0x18 // 0001 1000 + #define F_file_mode_t_replace_standard_d 0x7 // 0000 0111 // file permission modes (mode_t). - #define f_file_mode_owner_rwx S_IRWXU - #define f_file_mode_owner_r S_IRUSR - #define f_file_mode_owner_w S_IWUSR - #define f_file_mode_owner_x S_IXUSR - #define f_file_mode_owner_rw (S_IRUSR | S_IWUSR) - #define f_file_mode_owner_rx (S_IRUSR | S_IXUSR) - #define f_file_mode_owner_wx (S_IWUSR | S_IXUSR) - #define f_file_mode_group_rwx S_IRWXG - #define f_file_mode_group_r S_IRGRP - #define f_file_mode_group_w S_IWGRP - #define f_file_mode_group_x S_IXGRP - #define f_file_mode_group_rw (S_IRGRP | S_IWGRP) - #define f_file_mode_group_rx (S_IRGRP | S_IXGRP) - #define f_file_mode_group_wx (S_IWGRP | S_IXGRP) - #define f_file_mode_world_rwx S_IRWXO - #define f_file_mode_world_r S_IROTH - #define f_file_mode_world_w S_IWOTH - #define f_file_mode_world_x S_IXOTH - #define f_file_mode_world_rw (S_IROTH | S_IWOTH) - #define f_file_mode_world_rx (S_IROTH | S_IXOTH) - #define f_file_mode_world_wx (S_IWOTH | S_IXOTH) - - #define f_file_mode_all_rwx (f_file_mode_owner_rwx | f_file_mode_group_rwx | f_file_mode_world_rwx) - #define f_file_mode_all_rw (f_file_mode_owner_rw | f_file_mode_group_rw | f_file_mode_world_rw) - #define f_file_mode_all_wx (f_file_mode_owner_wx | f_file_mode_group_wx | f_file_mode_world_wx) - #define f_file_mode_all_rx (f_file_mode_owner_rx | f_file_mode_group_rx | f_file_mode_world_rx) - #define f_file_mode_all_r (f_file_mode_owner_r | f_file_mode_group_r | f_file_mode_world_r) - #define f_file_mode_all_w (f_file_mode_owner_w | f_file_mode_group_w | f_file_mode_world_w) - #define f_file_mode_all_x (f_file_mode_owner_x | f_file_mode_group_x | f_file_mode_world_x) + #define F_file_mode_owner_rwx_d S_IRWXU + #define F_file_mode_owner_r_d S_IRUSR + #define F_file_mode_owner_w_d S_IWUSR + #define F_file_mode_owner_x_d S_IXUSR + #define F_file_mode_owner_rw_d (S_IRUSR | S_IWUSR) + #define F_file_mode_owner_rx_d (S_IRUSR | S_IXUSR) + #define F_file_mode_owner_wx_d (S_IWUSR | S_IXUSR) + #define F_file_mode_group_rwx_d S_IRWXG + #define F_file_mode_group_r_d S_IRGRP + #define F_file_mode_group_w_d S_IWGRP + #define F_file_mode_group_x_d S_IXGRP + #define F_file_mode_group_rw_d (S_IRGRP | S_IWGRP) + #define F_file_mode_group_rx_d (S_IRGRP | S_IXGRP) + #define F_file_mode_group_wx_d (S_IWGRP | S_IXGRP) + #define F_file_mode_world_rwx_d S_IRWXO + #define F_file_mode_world_r_d S_IROTH + #define F_file_mode_world_w_d S_IWOTH + #define F_file_mode_world_x_d S_IXOTH + #define F_file_mode_world_rw_d (S_IROTH | S_IWOTH) + #define F_file_mode_world_rx_d (S_IROTH | S_IXOTH) + #define F_file_mode_world_wx_d (S_IWOTH | S_IXOTH) + + #define F_file_mode_all_rwx_d (F_file_mode_owner_rwx_d | F_file_mode_group_rwx_d | F_file_mode_world_rwx_d) + #define F_file_mode_all_rw_d (F_file_mode_owner_rw_d | F_file_mode_group_rw_d | F_file_mode_world_rw_d) + #define F_file_mode_all_wx_d (F_file_mode_owner_wx_d | F_file_mode_group_wx_d | F_file_mode_world_wx_d) + #define F_file_mode_all_rx_d (F_file_mode_owner_rx_d | F_file_mode_group_rx_d | F_file_mode_world_rx_d) + #define F_file_mode_all_r_d (F_file_mode_owner_r_d | F_file_mode_group_r_d | F_file_mode_world_r_d) + #define F_file_mode_all_w_d (F_file_mode_owner_w_d | F_file_mode_group_w_d | F_file_mode_world_w_d) + #define F_file_mode_all_x_d (F_file_mode_owner_x_d | F_file_mode_group_x_d | F_file_mode_world_x_d) // file mode set-uid/set-gid/sticky-bits and all bits (mode_t). - #define f_file_mode_special_set_user S_ISUID - #define f_file_mode_special_set_group S_ISGID - #define f_file_mode_special_sticky S_ISVTX - #define f_file_mode_special_all (S_ISUID | S_ISGID | S_ISVTX) + #define F_file_mode_special_set_user_d S_ISUID + #define F_file_mode_special_set_group_d S_ISGID + #define F_file_mode_special_sticky_d S_ISVTX + #define F_file_mode_special_all_d (S_ISUID | S_ISGID | S_ISVTX) // all permissions modes and special modes (mode_t). - #define f_file_mode_all (f_file_mode_special_all | f_file_mode_all_rwx) + #define F_file_mode_all_d (F_file_mode_special_all_d | F_file_mode_all_rwx_d) // special file mode combinations (mode_t). - #define f_file_mode_user_access (f_file_mode_owner_rwx | f_file_mode_group_rwx | f_file_mode_world_x) - #define f_file_mode_user_directory (f_file_mode_owner_rwx | f_file_mode_group_rwx) - #define f_file_mode_user_file (f_file_mode_owner_rw | f_file_mode_group_rw) - #define f_file_mode_user_program (f_file_mode_owner_rx | f_file_mode_group_rx) - #define f_file_mode_user_protected (f_file_mode_owner_r | f_file_mode_group_r) + #define F_file_mode_user_access_d (F_file_mode_owner_rwx_d | F_file_mode_group_rwx_d | F_file_mode_world_x_d) + #define F_file_mode_user_directory_d (F_file_mode_owner_rwx_d | F_file_mode_group_rwx_d) + #define F_file_mode_user_file_d (F_file_mode_owner_rw_d | F_file_mode_group_rw_d) + #define F_file_mode_user_program_d (F_file_mode_owner_rx_d | F_file_mode_group_rx_d) + #define F_file_mode_user_protected_d (F_file_mode_owner_r_d | F_file_mode_group_r_d) #endif // _di_f_file_mode_ #ifdef __cplusplus diff --git a/level_0/f_file/c/file.c b/level_0/f_file/c/file.c index 123e6b5..aad3d51 100644 --- a/level_0/f_file/c/file.c +++ b/level_0/f_file/c/file.c @@ -57,7 +57,7 @@ extern "C" { if (F_status_is_error(status)) return status; } - return private_f_file_copy_content(source, destination, size_block == 0 ? f_file_default_read_size : size_block); + return private_f_file_copy_content(source, destination, size_block == 0 ? F_file_default_read_size_d : size_block); } else if (macro_f_file_type_is_link(source_stat.st_mode)) { status = private_f_file_link(destination, source); @@ -112,18 +112,18 @@ extern "C" { if (macro_f_file_type_is_regular(source_stat.st_mode)) { - status = private_f_file_create(destination, (~f_file_type_mask) & mode.regular, exclusive); + status = private_f_file_create(destination, (~F_file_type_mask_d) & mode.regular, exclusive); if (F_status_is_error(status)) return status; if (!exclusive) { - status = private_f_file_mode_set(destination, (~f_file_type_mask) & mode.regular); + status = private_f_file_mode_set(destination, (~F_file_type_mask_d) & mode.regular); if (F_status_is_error(status)) return status; } - return private_f_file_copy_content(source, destination, size_block == 0 ? f_file_default_read_size : size_block); + return private_f_file_copy_content(source, destination, size_block == 0 ? F_file_default_read_size_d : size_block); } else if (macro_f_file_type_is_directory(source_stat.st_mode)) { - status = private_f_file_create_directory(destination, (~f_file_type_mask) & mode.directory); + status = private_f_file_create_directory(destination, (~F_file_type_mask_d) & mode.directory); if (F_status_is_error(status)) { if (F_status_set_fine(status) != F_file_found || exclusive) { @@ -131,7 +131,7 @@ extern "C" { } } - status = private_f_file_mode_set(destination, (~f_file_type_mask) & mode.directory); + status = private_f_file_mode_set(destination, (~F_file_type_mask_d) & mode.directory); if (F_status_is_error(status)) return status; return F_none; @@ -158,7 +158,7 @@ extern "C" { return F_none; } else if (macro_f_file_type_is_fifo(source_stat.st_mode)) { - status = private_f_file_create_fifo(destination, (~f_file_type_mask) & mode.fifo); + status = private_f_file_create_fifo(destination, (~F_file_type_mask_d) & mode.fifo); if (F_status_is_error(status)) { if (F_status_set_fine(status) != F_file_found || exclusive) { @@ -166,13 +166,13 @@ extern "C" { } } - status = private_f_file_mode_set(destination, (~f_file_type_mask) & mode.fifo); + status = private_f_file_mode_set(destination, (~F_file_type_mask_d) & mode.fifo); if (F_status_is_error(status)) return status; return F_none; } else if (macro_f_file_type_is_socket(source_stat.st_mode)) { - status = private_f_file_create_node(destination, macro_f_file_type_get(source_stat.st_mode) | ((~f_file_type_mask) & mode.socket), source_stat.st_rdev); + status = private_f_file_create_node(destination, macro_f_file_type_get(source_stat.st_mode) | ((~F_file_type_mask_d) & mode.socket), source_stat.st_rdev); if (F_status_is_error(status)) { if (F_status_set_fine(status) != F_file_found || exclusive) { @@ -180,13 +180,13 @@ extern "C" { } } - status = private_f_file_mode_set(destination, (~f_file_type_mask) & mode.socket); + status = private_f_file_mode_set(destination, (~F_file_type_mask_d) & mode.socket); if (F_status_is_error(status)) return status; return F_none; } else if (macro_f_file_type_is_block(source_stat.st_mode) || macro_f_file_type_is_character(source_stat.st_mode)) { - status = private_f_file_create_node(destination, macro_f_file_type_get(source_stat.st_mode) | ((~f_file_type_mask) & mode.block), source_stat.st_rdev); + status = private_f_file_create_node(destination, macro_f_file_type_get(source_stat.st_mode) | ((~F_file_type_mask_d) & mode.block), source_stat.st_rdev); if (F_status_is_error(status)) { if (F_status_set_fine(status) != F_file_found || exclusive) { @@ -194,7 +194,7 @@ extern "C" { } } - status = private_f_file_mode_set(destination, (~f_file_type_mask) & mode.block); + status = private_f_file_mode_set(destination, (~F_file_type_mask_d) & mode.block); if (F_status_is_error(status)) return status; return F_none; @@ -567,134 +567,134 @@ extern "C" { if (!mode) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - f_file_mode_t change = mode_change & f_file_mode_t_block_special; + f_file_mode_t change = mode_change & F_file_mode_t_block_special_d; *mode = 0; - if (mode_replace & f_file_mode_t_replace_special) { - if (change & f_file_mode_t_mask_bit_set_owner & f_file_mode_t_mask_how_add) { - *mode = f_file_mode_special_set_user; + if (mode_replace & F_file_mode_t_replace_special_d) { + if (change & F_file_mode_t_mask_bit_set_owner_d & F_file_mode_t_mask_how_add_d) { + *mode = F_file_mode_special_set_user_d; } - if (change & f_file_mode_t_mask_bit_set_group & f_file_mode_t_mask_how_add) { - *mode |= f_file_mode_special_set_group; + if (change & F_file_mode_t_mask_bit_set_group_d & F_file_mode_t_mask_how_add_d) { + *mode |= F_file_mode_special_set_group_d; } - if (change & f_file_mode_t_mask_bit_sticky & f_file_mode_t_mask_how_add) { - *mode |= f_file_mode_special_sticky; + if (change & F_file_mode_t_mask_bit_sticky_d & F_file_mode_t_mask_how_add_d) { + *mode |= F_file_mode_special_sticky_d; } } else { - *mode = mode_file & f_file_mode_special_all; + *mode = mode_file & F_file_mode_special_all_d; - if (mode_change & f_file_mode_t_block_special) { - if (change & f_file_mode_t_mask_bit_set_owner & f_file_mode_t_mask_how_subtract) { - if (*mode & f_file_mode_special_set_user) { - *mode -= f_file_mode_special_set_user; + if (mode_change & F_file_mode_t_block_special_d) { + if (change & F_file_mode_t_mask_bit_set_owner_d & F_file_mode_t_mask_how_subtract_d) { + if (*mode & F_file_mode_special_set_user_d) { + *mode -= F_file_mode_special_set_user_d; } } - else if (change & f_file_mode_t_mask_bit_set_owner & f_file_mode_t_mask_how_add) { - if (!(*mode & f_file_mode_special_set_user)) { - *mode |= f_file_mode_special_set_user; + else if (change & F_file_mode_t_mask_bit_set_owner_d & F_file_mode_t_mask_how_add_d) { + if (!(*mode & F_file_mode_special_set_user_d)) { + *mode |= F_file_mode_special_set_user_d; } } - if (change & f_file_mode_t_mask_bit_set_group & f_file_mode_t_mask_how_subtract) { - if (*mode & f_file_mode_special_set_group) { - *mode -= f_file_mode_special_set_group; + if (change & F_file_mode_t_mask_bit_set_group_d & F_file_mode_t_mask_how_subtract_d) { + if (*mode & F_file_mode_special_set_group_d) { + *mode -= F_file_mode_special_set_group_d; } } - else if (change & f_file_mode_t_mask_bit_set_group & f_file_mode_t_mask_how_add) { - if (!(*mode & f_file_mode_special_set_group)) { - *mode |= f_file_mode_special_set_group; + else if (change & F_file_mode_t_mask_bit_set_group_d & F_file_mode_t_mask_how_add_d) { + if (!(*mode & F_file_mode_special_set_group_d)) { + *mode |= F_file_mode_special_set_group_d; } } - if (change & f_file_mode_t_mask_bit_sticky & f_file_mode_t_mask_how_subtract) { - if (*mode & f_file_mode_special_sticky) { - *mode -= f_file_mode_special_sticky; + if (change & F_file_mode_t_mask_bit_sticky_d & F_file_mode_t_mask_how_subtract_d) { + if (*mode & F_file_mode_special_sticky_d) { + *mode -= F_file_mode_special_sticky_d; } } - else if (change & f_file_mode_t_mask_bit_sticky & f_file_mode_t_mask_how_add) { - if (!(*mode & f_file_mode_special_sticky)) { - *mode |= f_file_mode_special_sticky; + else if (change & F_file_mode_t_mask_bit_sticky_d & F_file_mode_t_mask_how_add_d) { + if (!(*mode & F_file_mode_special_sticky_d)) { + *mode |= F_file_mode_special_sticky_d; } } } } - change = mode_change & f_file_mode_t_block_owner; + change = mode_change & F_file_mode_t_block_owner_d; - if (mode_replace & f_file_mode_t_replace_owner) { - if (change & f_file_mode_t_mask_bit_read & f_file_mode_t_mask_how_add) { - *mode |= f_file_mode_owner_r; + if (mode_replace & F_file_mode_t_replace_owner_d) { + if (change & F_file_mode_t_mask_bit_read_d & F_file_mode_t_mask_how_add_d) { + *mode |= F_file_mode_owner_r_d; } - if (change & f_file_mode_t_mask_bit_write & f_file_mode_t_mask_how_add) { - *mode |= f_file_mode_owner_w; + if (change & F_file_mode_t_mask_bit_write_d & F_file_mode_t_mask_how_add_d) { + *mode |= F_file_mode_owner_w_d; } - if (change & f_file_mode_t_mask_bit_execute & f_file_mode_t_mask_how_add) { - *mode |= f_file_mode_owner_x; + if (change & F_file_mode_t_mask_bit_execute_d & F_file_mode_t_mask_how_add_d) { + *mode |= F_file_mode_owner_x_d; } - else if (change & f_file_mode_t_mask_bit_execute_only & f_file_mode_t_mask_how_add) { - if (directory_is || (mode_file & f_file_mode_owner_x)) { - *mode |= f_file_mode_owner_x; + else if (change & F_file_mode_t_mask_bit_execute_only_d & F_file_mode_t_mask_how_add_d) { + if (directory_is || (mode_file & F_file_mode_owner_x_d)) { + *mode |= F_file_mode_owner_x_d; } } } else { - *mode |= mode_file & f_file_mode_owner_rwx; + *mode |= mode_file & F_file_mode_owner_rwx_d; - if (mode_change & f_file_mode_t_block_owner) { - if (change & f_file_mode_t_mask_bit_read & f_file_mode_t_mask_how_subtract) { - if (*mode & f_file_mode_owner_r) { - *mode -= f_file_mode_owner_r; + if (mode_change & F_file_mode_t_block_owner_d) { + if (change & F_file_mode_t_mask_bit_read_d & F_file_mode_t_mask_how_subtract_d) { + if (*mode & F_file_mode_owner_r_d) { + *mode -= F_file_mode_owner_r_d; } } - else if (change & f_file_mode_t_mask_bit_read & f_file_mode_t_mask_how_add) { - if (!(*mode & f_file_mode_owner_r)) { - *mode |= f_file_mode_owner_r; + else if (change & F_file_mode_t_mask_bit_read_d & F_file_mode_t_mask_how_add_d) { + if (!(*mode & F_file_mode_owner_r_d)) { + *mode |= F_file_mode_owner_r_d; } } - if (change & f_file_mode_t_mask_bit_write & f_file_mode_t_mask_how_subtract) { - if (*mode & f_file_mode_owner_w) { - *mode -= f_file_mode_owner_w; + if (change & F_file_mode_t_mask_bit_write_d & F_file_mode_t_mask_how_subtract_d) { + if (*mode & F_file_mode_owner_w_d) { + *mode -= F_file_mode_owner_w_d; } } - else if (change & f_file_mode_t_mask_bit_write & f_file_mode_t_mask_how_add) { - if (!(*mode & f_file_mode_owner_w)) { - *mode |= f_file_mode_owner_w; + else if (change & F_file_mode_t_mask_bit_write_d & F_file_mode_t_mask_how_add_d) { + if (!(*mode & F_file_mode_owner_w_d)) { + *mode |= F_file_mode_owner_w_d; } } - if (change & f_file_mode_t_mask_bit_execute) { - change &= f_file_mode_t_mask_bit_execute; + if (change & F_file_mode_t_mask_bit_execute_d) { + change &= F_file_mode_t_mask_bit_execute_d; - if (change & f_file_mode_t_mask_how_subtract) { - if (*mode & f_file_mode_owner_x) { - *mode -= f_file_mode_owner_x; + if (change & F_file_mode_t_mask_how_subtract_d) { + if (*mode & F_file_mode_owner_x_d) { + *mode -= F_file_mode_owner_x_d; } } - else if (change & f_file_mode_t_mask_how_add) { - if (!(*mode & f_file_mode_owner_x)) { - *mode |= f_file_mode_owner_x; + else if (change & F_file_mode_t_mask_how_add_d) { + if (!(*mode & F_file_mode_owner_x_d)) { + *mode |= F_file_mode_owner_x_d; } } } - else if (change & f_file_mode_t_mask_bit_execute_only) { - change &= f_file_mode_t_mask_bit_execute_only; + else if (change & F_file_mode_t_mask_bit_execute_only_d) { + change &= F_file_mode_t_mask_bit_execute_only_d; - if (directory_is || (mode_file & f_file_mode_owner_x)) { - if (change & f_file_mode_t_mask_how_subtract) { - if (*mode & f_file_mode_owner_x) { - *mode -= f_file_mode_owner_x; + if (directory_is || (mode_file & F_file_mode_owner_x_d)) { + if (change & F_file_mode_t_mask_how_subtract_d) { + if (*mode & F_file_mode_owner_x_d) { + *mode -= F_file_mode_owner_x_d; } } - else if (change & f_file_mode_t_mask_how_add) { - if (!(*mode & f_file_mode_owner_x)) { - *mode |= f_file_mode_owner_x; + else if (change & F_file_mode_t_mask_how_add_d) { + if (!(*mode & F_file_mode_owner_x_d)) { + *mode |= F_file_mode_owner_x_d; } } } @@ -702,79 +702,79 @@ extern "C" { } } - change = mode_change & f_file_mode_t_block_group; + change = mode_change & F_file_mode_t_block_group_d; - if (mode_replace & f_file_mode_t_replace_group) { - if (change & f_file_mode_t_mask_bit_read & f_file_mode_t_mask_how_add) { - *mode |= f_file_mode_group_r; + if (mode_replace & F_file_mode_t_replace_group_d) { + if (change & F_file_mode_t_mask_bit_read_d & F_file_mode_t_mask_how_add_d) { + *mode |= F_file_mode_group_r_d; } - if (change & f_file_mode_t_mask_bit_write & f_file_mode_t_mask_how_add) { - *mode |= f_file_mode_group_w; + if (change & F_file_mode_t_mask_bit_write_d & F_file_mode_t_mask_how_add_d) { + *mode |= F_file_mode_group_w_d; } - if (change & f_file_mode_t_mask_bit_execute & f_file_mode_t_mask_how_add) { - *mode |= f_file_mode_group_x; + if (change & F_file_mode_t_mask_bit_execute_d & F_file_mode_t_mask_how_add_d) { + *mode |= F_file_mode_group_x_d; } - else if (change & f_file_mode_t_mask_bit_execute_only & f_file_mode_t_mask_how_add) { - if (directory_is || (mode_file & f_file_mode_group_x)) { - *mode |= f_file_mode_group_x; + else if (change & F_file_mode_t_mask_bit_execute_only_d & F_file_mode_t_mask_how_add_d) { + if (directory_is || (mode_file & F_file_mode_group_x_d)) { + *mode |= F_file_mode_group_x_d; } } } else { - *mode |= mode_file & f_file_mode_group_rwx; + *mode |= mode_file & F_file_mode_group_rwx_d; - if (mode_change & f_file_mode_t_block_group) { + if (mode_change & F_file_mode_t_block_group_d) { - if (change & f_file_mode_t_mask_bit_read & f_file_mode_t_mask_how_subtract) { - if (*mode & f_file_mode_group_r) { - *mode -= f_file_mode_group_r; + if (change & F_file_mode_t_mask_bit_read_d & F_file_mode_t_mask_how_subtract_d) { + if (*mode & F_file_mode_group_r_d) { + *mode -= F_file_mode_group_r_d; } } - else if (change & f_file_mode_t_mask_bit_read & f_file_mode_t_mask_how_add) { - if (!(*mode & f_file_mode_group_r)) { - *mode |= f_file_mode_group_r; + else if (change & F_file_mode_t_mask_bit_read_d & F_file_mode_t_mask_how_add_d) { + if (!(*mode & F_file_mode_group_r_d)) { + *mode |= F_file_mode_group_r_d; } } - if (change & f_file_mode_t_mask_bit_write & f_file_mode_t_mask_how_subtract) { - if (*mode & f_file_mode_group_w) { - *mode -= f_file_mode_group_w; + if (change & F_file_mode_t_mask_bit_write_d & F_file_mode_t_mask_how_subtract_d) { + if (*mode & F_file_mode_group_w_d) { + *mode -= F_file_mode_group_w_d; } } - else if (change & f_file_mode_t_mask_bit_write & f_file_mode_t_mask_how_add) { - if (!(*mode & f_file_mode_group_w)) { - *mode |= f_file_mode_group_w; + else if (change & F_file_mode_t_mask_bit_write_d & F_file_mode_t_mask_how_add_d) { + if (!(*mode & F_file_mode_group_w_d)) { + *mode |= F_file_mode_group_w_d; } } - if (change & f_file_mode_t_mask_bit_execute) { - change &= f_file_mode_t_mask_bit_execute; + if (change & F_file_mode_t_mask_bit_execute_d) { + change &= F_file_mode_t_mask_bit_execute_d; - if (change & f_file_mode_t_mask_how_subtract) { - if (*mode & f_file_mode_group_x) { - *mode -= f_file_mode_group_x; + if (change & F_file_mode_t_mask_how_subtract_d) { + if (*mode & F_file_mode_group_x_d) { + *mode -= F_file_mode_group_x_d; } } - else if (change & f_file_mode_t_mask_how_add) { - if (!(*mode & f_file_mode_group_x)) { - *mode |= f_file_mode_group_x; + else if (change & F_file_mode_t_mask_how_add_d) { + if (!(*mode & F_file_mode_group_x_d)) { + *mode |= F_file_mode_group_x_d; } } } - else if (change & f_file_mode_t_mask_bit_execute_only) { - change &= f_file_mode_t_mask_bit_execute_only; + else if (change & F_file_mode_t_mask_bit_execute_only_d) { + change &= F_file_mode_t_mask_bit_execute_only_d; - if (directory_is || (mode_file & f_file_mode_group_x)) { - if (change & f_file_mode_t_mask_how_subtract) { - if (*mode & f_file_mode_group_x) { - *mode -= f_file_mode_group_x; + if (directory_is || (mode_file & F_file_mode_group_x_d)) { + if (change & F_file_mode_t_mask_how_subtract_d) { + if (*mode & F_file_mode_group_x_d) { + *mode -= F_file_mode_group_x_d; } } - else if (change & f_file_mode_t_mask_how_add) { - if (!(*mode & f_file_mode_group_x)) { - *mode |= f_file_mode_group_x; + else if (change & F_file_mode_t_mask_how_add_d) { + if (!(*mode & F_file_mode_group_x_d)) { + *mode |= F_file_mode_group_x_d; } } } @@ -782,80 +782,80 @@ extern "C" { } } - change = mode_change & f_file_mode_t_block_world; + change = mode_change & F_file_mode_t_block_world_d; - if (mode_replace & f_file_mode_t_replace_world) { + if (mode_replace & F_file_mode_t_replace_world_d) { - if (change & f_file_mode_t_mask_bit_read & f_file_mode_t_mask_how_add) { - *mode |= f_file_mode_world_r; + if (change & F_file_mode_t_mask_bit_read_d & F_file_mode_t_mask_how_add_d) { + *mode |= F_file_mode_world_r_d; } - if (change & f_file_mode_t_mask_bit_write & f_file_mode_t_mask_how_add) { - *mode |= f_file_mode_world_w; + if (change & F_file_mode_t_mask_bit_write_d & F_file_mode_t_mask_how_add_d) { + *mode |= F_file_mode_world_w_d; } - if (change & f_file_mode_t_mask_bit_execute & f_file_mode_t_mask_how_add) { - *mode |= f_file_mode_world_x; + if (change & F_file_mode_t_mask_bit_execute_d & F_file_mode_t_mask_how_add_d) { + *mode |= F_file_mode_world_x_d; } - else if (change & f_file_mode_t_mask_bit_execute_only & f_file_mode_t_mask_how_add) { - if (directory_is || (mode_file & f_file_mode_world_x)) { - *mode |= f_file_mode_world_x; + else if (change & F_file_mode_t_mask_bit_execute_only_d & F_file_mode_t_mask_how_add_d) { + if (directory_is || (mode_file & F_file_mode_world_x_d)) { + *mode |= F_file_mode_world_x_d; } } } else { - *mode |= mode_file & f_file_mode_world_rwx; + *mode |= mode_file & F_file_mode_world_rwx_d; - if (mode_change & f_file_mode_t_block_world) { + if (mode_change & F_file_mode_t_block_world_d) { - if (change & f_file_mode_t_mask_bit_read & f_file_mode_t_mask_how_subtract) { - if (*mode & f_file_mode_world_r) { - *mode -= f_file_mode_world_r; + if (change & F_file_mode_t_mask_bit_read_d & F_file_mode_t_mask_how_subtract_d) { + if (*mode & F_file_mode_world_r_d) { + *mode -= F_file_mode_world_r_d; } } - else if (change & f_file_mode_t_mask_bit_read & f_file_mode_t_mask_how_add) { - if (!(*mode & f_file_mode_world_r)) { - *mode |= f_file_mode_world_r; + else if (change & F_file_mode_t_mask_bit_read_d & F_file_mode_t_mask_how_add_d) { + if (!(*mode & F_file_mode_world_r_d)) { + *mode |= F_file_mode_world_r_d; } } - if (change & f_file_mode_t_mask_bit_write & f_file_mode_t_mask_how_subtract) { - if (*mode & f_file_mode_world_w) { - *mode -= f_file_mode_world_w; + if (change & F_file_mode_t_mask_bit_write_d & F_file_mode_t_mask_how_subtract_d) { + if (*mode & F_file_mode_world_w_d) { + *mode -= F_file_mode_world_w_d; } } - else if (change & f_file_mode_t_mask_bit_write & f_file_mode_t_mask_how_add) { - if (!(*mode & f_file_mode_world_w)) { - *mode |= f_file_mode_world_w; + else if (change & F_file_mode_t_mask_bit_write_d & F_file_mode_t_mask_how_add_d) { + if (!(*mode & F_file_mode_world_w_d)) { + *mode |= F_file_mode_world_w_d; } } - if (change & f_file_mode_t_mask_bit_execute) { - change &= f_file_mode_t_mask_bit_execute; + if (change & F_file_mode_t_mask_bit_execute_d) { + change &= F_file_mode_t_mask_bit_execute_d; - if (change & f_file_mode_t_mask_how_subtract) { - if (*mode & f_file_mode_world_x) { - *mode -= f_file_mode_world_x; + if (change & F_file_mode_t_mask_how_subtract_d) { + if (*mode & F_file_mode_world_x_d) { + *mode -= F_file_mode_world_x_d; } } - else if (change & f_file_mode_t_mask_how_add) { - if (!(*mode & f_file_mode_world_x)) { - *mode |= f_file_mode_world_x; + else if (change & F_file_mode_t_mask_how_add_d) { + if (!(*mode & F_file_mode_world_x_d)) { + *mode |= F_file_mode_world_x_d; } } } - else if (change & f_file_mode_t_mask_bit_execute_only) { - change &= f_file_mode_t_mask_bit_execute_only; + else if (change & F_file_mode_t_mask_bit_execute_only_d) { + change &= F_file_mode_t_mask_bit_execute_only_d; - if (directory_is || (mode_file & f_file_mode_world_x)) { - if (change & f_file_mode_t_mask_how_subtract) { - if (*mode & f_file_mode_world_x) { - *mode -= f_file_mode_world_x; + if (directory_is || (mode_file & F_file_mode_world_x_d)) { + if (change & F_file_mode_t_mask_how_subtract_d) { + if (*mode & F_file_mode_world_x_d) { + *mode -= F_file_mode_world_x_d; } } - else if (change & f_file_mode_t_mask_how_add) { - if (!(*mode & f_file_mode_world_x)) { - *mode |= f_file_mode_world_x; + else if (change & F_file_mode_t_mask_how_add_d) { + if (!(*mode & F_file_mode_world_x_d)) { + *mode |= F_file_mode_world_x_d; } } } @@ -912,71 +912,71 @@ extern "C" { f_file_mode_t what = 0; // translate the umask into an f_file_mode_t umask equivalent. - if (umask & f_file_mode_special_set_user) { - mode_umask = f_file_mode_t_block_special & f_file_mode_t_mask_bit_set_owner; + if (umask & F_file_mode_special_set_user_d) { + mode_umask = F_file_mode_t_block_special_d & F_file_mode_t_mask_bit_set_owner_d; } - if (umask & f_file_mode_special_set_group) { - mode_umask |= f_file_mode_t_block_special & f_file_mode_t_mask_bit_set_group; + if (umask & F_file_mode_special_set_group_d) { + mode_umask |= F_file_mode_t_block_special_d & F_file_mode_t_mask_bit_set_group_d; } - if (umask & f_file_mode_special_sticky) { - mode_umask |= f_file_mode_t_block_special & f_file_mode_t_mask_bit_sticky; + if (umask & F_file_mode_special_sticky_d) { + mode_umask |= F_file_mode_t_block_special_d & F_file_mode_t_mask_bit_sticky_d; } - if (umask & f_file_mode_owner_r) { - mode_umask |= f_file_mode_t_block_owner & f_file_mode_t_mask_bit_read; + if (umask & F_file_mode_owner_r_d) { + mode_umask |= F_file_mode_t_block_owner_d & F_file_mode_t_mask_bit_read_d; } - if (umask & f_file_mode_owner_w) { - mode_umask |= f_file_mode_t_block_owner & f_file_mode_t_mask_bit_write; + if (umask & F_file_mode_owner_w_d) { + mode_umask |= F_file_mode_t_block_owner_d & F_file_mode_t_mask_bit_write_d; } - if (umask & f_file_mode_owner_x) { - mode_umask |= f_file_mode_t_block_owner & f_file_mode_t_mask_bit_execute; + if (umask & F_file_mode_owner_x_d) { + mode_umask |= F_file_mode_t_block_owner_d & F_file_mode_t_mask_bit_execute_d; } - if (umask & f_file_mode_group_r) { - mode_umask |= f_file_mode_t_block_group & f_file_mode_t_mask_bit_read; + if (umask & F_file_mode_group_r_d) { + mode_umask |= F_file_mode_t_block_group_d & F_file_mode_t_mask_bit_read_d; } - if (umask & f_file_mode_group_w) { - mode_umask |= f_file_mode_t_block_group & f_file_mode_t_mask_bit_write; + if (umask & F_file_mode_group_w_d) { + mode_umask |= F_file_mode_t_block_group_d & F_file_mode_t_mask_bit_write_d; } - if (umask & f_file_mode_group_x) { - mode_umask |= f_file_mode_t_block_group & f_file_mode_t_mask_bit_execute; + if (umask & F_file_mode_group_x_d) { + mode_umask |= F_file_mode_t_block_group_d & F_file_mode_t_mask_bit_execute_d; } - if (umask & f_file_mode_world_r) { - mode_umask |= f_file_mode_t_block_world & f_file_mode_t_mask_bit_read; + if (umask & F_file_mode_world_r_d) { + mode_umask |= F_file_mode_t_block_world_d & F_file_mode_t_mask_bit_read_d; } - if (umask & f_file_mode_world_w) { - mode_umask |= f_file_mode_t_block_world & f_file_mode_t_mask_bit_write; + if (umask & F_file_mode_world_w_d) { + mode_umask |= F_file_mode_t_block_world_d & F_file_mode_t_mask_bit_write_d; } - if (umask & f_file_mode_world_x) { - mode_umask |= f_file_mode_t_block_world & f_file_mode_t_mask_bit_execute; + if (umask & F_file_mode_world_x_d) { + mode_umask |= F_file_mode_t_block_world_d & F_file_mode_t_mask_bit_execute_d; } for (f_array_length_t i = 0; syntax && string[i]; ++i) { if (string[i] == f_string_ascii_o_s[0]) { on |= 1; - mode_mask |= f_file_mode_t_block_world; + mode_mask |= F_file_mode_t_block_world_d; } else if (string[i] == f_string_ascii_g_s[0]) { on |= 2; - mode_mask |= f_file_mode_t_block_group; + mode_mask |= F_file_mode_t_block_group_d; } else if (string[i] == f_string_ascii_u_s[0]) { on |= 4; - mode_mask |= f_file_mode_t_block_owner; + mode_mask |= F_file_mode_t_block_owner_d; } else if (string[i] == f_string_ascii_a_s[0]) { on = 7; - mode_mask = f_file_mode_t_block_standard; + mode_mask = F_file_mode_t_block_standard_d; } else if (string[i] == f_string_ascii_plus_s[0] || string[i] == f_string_ascii_minus_s[0] || string[i] == f_string_ascii_equal_s[0]) { if (string[i] == f_string_ascii_plus_s[0]) { @@ -989,61 +989,61 @@ extern "C" { how = on ? 2 : 5; // clear by mask to prepare for replacement, which includes clearing the special block. - mode_mask |= f_file_mode_t_block_special; + mode_mask |= F_file_mode_t_block_special_d; *mode -= (*mode) & mode_mask; - *replace |= f_file_mode_t_replace_special; + *replace |= F_file_mode_t_replace_special_d; - if (mode_mask & f_file_mode_t_block_owner) { - *replace |= f_file_mode_t_replace_owner; + if (mode_mask & F_file_mode_t_block_owner_d) { + *replace |= F_file_mode_t_replace_owner_d; } - if (mode_mask & f_file_mode_t_block_group) { - *replace |= f_file_mode_t_replace_group; + if (mode_mask & F_file_mode_t_block_group_d) { + *replace |= F_file_mode_t_replace_group_d; } - if (mode_mask & f_file_mode_t_block_world) { - *replace |= f_file_mode_t_replace_world; + if (mode_mask & F_file_mode_t_block_world_d) { + *replace |= F_file_mode_t_replace_world_d; } } if (!on) { on = 7; - mode_mask = f_file_mode_t_block_all; + mode_mask = F_file_mode_t_block_all_d; } for (++i; string[i]; ++i) { if (string[i] == f_string_ascii_r_s[0]) { - what = f_file_mode_t_mask_bit_read; + what = F_file_mode_t_mask_bit_read_d; } else if (string[i] == f_string_ascii_w_s[0]) { - what = f_file_mode_t_mask_bit_write; + what = F_file_mode_t_mask_bit_write_d; } else if (string[i] == f_string_ascii_x_s[0]) { - what = f_file_mode_t_mask_bit_execute; + what = F_file_mode_t_mask_bit_execute_d; } else if (string[i] == f_string_ascii_X_s[0]) { - what = f_file_mode_t_mask_bit_execute_only; + what = F_file_mode_t_mask_bit_execute_only_d; } else if (string[i] == f_string_ascii_s_s[0]) { - mode_mask |= f_file_mode_t_block_special; + mode_mask |= F_file_mode_t_block_special_d; if (on & 4) { - what = f_file_mode_t_mask_bit_set_owner; + what = F_file_mode_t_mask_bit_set_owner_d; } else if (on & 2) { - what = f_file_mode_t_mask_bit_set_group; + what = F_file_mode_t_mask_bit_set_group_d; } else { what = 0; } } else if (string[i] == f_string_ascii_t_s[0]) { - mode_mask |= f_file_mode_t_block_special; + mode_mask |= F_file_mode_t_block_special_d; if (on & 1) { - what = f_file_mode_t_mask_bit_sticky; + what = F_file_mode_t_mask_bit_sticky_d; } else { what = 0; @@ -1065,10 +1065,10 @@ extern "C" { } if (how == 1 || how == 2 || how == 4 || how == 5) { - *mode |= what & mode_mask & f_file_mode_t_mask_how_add; + *mode |= what & mode_mask & F_file_mode_t_mask_how_add_d; } else if (how == 3 || how == 6) { - *mode |= what & mode_mask & f_file_mode_t_mask_how_subtract; + *mode |= what & mode_mask & F_file_mode_t_mask_how_subtract_d; } } // for @@ -1102,12 +1102,12 @@ extern "C" { how = 2; i = 1; - *replace = f_file_mode_t_replace_standard; + *replace = F_file_mode_t_replace_standard_d; } else { how = 2; - *replace = f_file_mode_t_replace_standard | f_file_mode_t_replace_directory; + *replace = F_file_mode_t_replace_standard_d | F_file_mode_t_replace_directory_d; } if (string[i] == f_string_ascii_0_s[0]) { @@ -1153,7 +1153,7 @@ extern "C" { // if there are only '0's then the standard and setuid/setgid/sticky bits are to be replaced. if (!*mode) { - *replace = f_file_mode_t_replace_standard | f_file_mode_t_replace_special; + *replace = F_file_mode_t_replace_standard_d | F_file_mode_t_replace_special_d; } } } @@ -1240,56 +1240,56 @@ extern "C" { if (!to) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - const f_file_mode_t add = from & f_file_mode_t_mask_how_add; + const f_file_mode_t add = from & F_file_mode_t_mask_how_add_d; *to = 0; - if (add & f_file_mode_t_mask_bit_set_owner) { - *to |= f_file_mode_special_set_user; + if (add & F_file_mode_t_mask_bit_set_owner_d) { + *to |= F_file_mode_special_set_user_d; } - if (add & f_file_mode_t_mask_bit_set_group) { - *to |= f_file_mode_special_set_group; + if (add & F_file_mode_t_mask_bit_set_group_d) { + *to |= F_file_mode_special_set_group_d; } - if (add & f_file_mode_t_mask_bit_sticky) { - *to |= f_file_mode_special_sticky; + if (add & F_file_mode_t_mask_bit_sticky_d) { + *to |= F_file_mode_special_sticky_d; } - if (add & f_file_mode_t_block_owner & f_file_mode_t_mask_bit_read) { - *to |= f_file_mode_owner_r; + if (add & F_file_mode_t_block_owner_d & F_file_mode_t_mask_bit_read_d) { + *to |= F_file_mode_owner_r_d; } - if (add & f_file_mode_t_block_group & f_file_mode_t_mask_bit_read) { - *to |= f_file_mode_group_r; + if (add & F_file_mode_t_block_group_d & F_file_mode_t_mask_bit_read_d) { + *to |= F_file_mode_group_r_d; } - if (add & f_file_mode_t_block_world & f_file_mode_t_mask_bit_write) { - *to |= f_file_mode_world_r; + if (add & F_file_mode_t_block_world_d & F_file_mode_t_mask_bit_write_d) { + *to |= F_file_mode_world_r_d; } - if (add & f_file_mode_t_block_owner & f_file_mode_t_mask_bit_write) { - *to |= f_file_mode_owner_w; + if (add & F_file_mode_t_block_owner_d & F_file_mode_t_mask_bit_write_d) { + *to |= F_file_mode_owner_w_d; } - if (add & f_file_mode_t_block_group & f_file_mode_t_mask_bit_write) { - *to |= f_file_mode_group_w; + if (add & F_file_mode_t_block_group_d & F_file_mode_t_mask_bit_write_d) { + *to |= F_file_mode_group_w_d; } - if (add & f_file_mode_t_block_world & f_file_mode_t_mask_bit_write) { - *to |= f_file_mode_world_w; + if (add & F_file_mode_t_block_world_d & F_file_mode_t_mask_bit_write_d) { + *to |= F_file_mode_world_w_d; } - if (add & f_file_mode_t_block_owner & (f_file_mode_t_mask_bit_execute | f_file_mode_t_mask_bit_execute_only)) { - *to |= f_file_mode_owner_x; + if (add & F_file_mode_t_block_owner_d & (F_file_mode_t_mask_bit_execute_d | F_file_mode_t_mask_bit_execute_only_d)) { + *to |= F_file_mode_owner_x_d; } - if (add & f_file_mode_t_block_group & (f_file_mode_t_mask_bit_execute | f_file_mode_t_mask_bit_execute_only)) { - *to |= f_file_mode_group_x; + if (add & F_file_mode_t_block_group_d & (F_file_mode_t_mask_bit_execute_d | F_file_mode_t_mask_bit_execute_only_d)) { + *to |= F_file_mode_group_x_d; } - if (add & f_file_mode_t_block_world & (f_file_mode_t_mask_bit_execute | f_file_mode_t_mask_bit_execute_only)) { - *to |= f_file_mode_world_x; + if (add & F_file_mode_t_block_world_d & (F_file_mode_t_mask_bit_execute_d | F_file_mode_t_mask_bit_execute_only_d)) { + *to |= F_file_mode_world_x_d; } return F_none; @@ -1315,7 +1315,7 @@ extern "C" { f_array_length_t size = strnlen(path_to_name, length); if (name_base->used + size > name_base->size) { - if (name_base->used + size > f_string_t_size) { + if (name_base->used + size > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -1351,7 +1351,7 @@ extern "C" { f_array_length_t size = strnlen(path_to_name, length); if (name_directory->used + size > name_directory->size) { - if (name_directory->used + size > f_string_t_size) { + if (name_directory->used + size > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -1428,7 +1428,7 @@ extern "C" { for (f_string_t buffer_read = 0; ; ) { if (buffer->used + file.size_read > buffer->size) { - if (buffer->size + file.size_read > f_string_t_size) { + if (buffer->size + file.size_read > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -1478,7 +1478,7 @@ extern "C" { f_string_t buffer_read = 0; if (buffer->used + file.size_read > buffer->size) { - if (buffer->size + file.size_read > f_string_t_size) { + if (buffer->size + file.size_read > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -1538,7 +1538,7 @@ extern "C" { } if (buffer->used + buffer_size > buffer->size) { - if (buffer->size + buffer_size > f_string_t_size) { + if (buffer->size + buffer_size > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -1997,7 +1997,7 @@ extern "C" { for (;;) { if (buffer->used + file.size_read > buffer->size) { - if (buffer->size + file.size_read > f_string_t_size) { + if (buffer->size + file.size_read > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -2043,7 +2043,7 @@ extern "C" { ssize_t size_read = 0; if (buffer->used + file.size_read > buffer->size) { - if (buffer->size + file.size_read > f_string_t_size) { + if (buffer->size + file.size_read > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -2097,7 +2097,7 @@ extern "C" { } if (buffer->used + buffer_size > buffer->size) { - if (buffer->size + buffer_size > f_string_t_size) { + if (buffer->size + buffer_size > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -2417,7 +2417,7 @@ extern "C" { return status; } - if (utimensat(f_file_at_current_working, path, 0, dereference ? 0 : f_file_at_symlink_follow_no) < 0) { + if (utimensat(F_file_at_current_working_d, path, 0, dereference ? 0 : F_file_at_symlink_follow_no_d) < 0) { if (errno == EACCES) return F_status_set_error(F_access_denied); if (errno == EBADF) return F_status_set_error(F_directory_descriptor); if (errno == EFAULT) return F_status_set_error(F_buffer); diff --git a/level_0/f_file/c/file.h b/level_0/f_file/c/file.h index f20e7f9..0a7696e 100644 --- a/level_0/f_file/c/file.h +++ b/level_0/f_file/c/file.h @@ -575,7 +575,7 @@ extern "C" { * @param path * The path file name. * @param flag - * Any valid flag, such as f_file_at_path_empty, f_file_at_automount_no, or f_file_at_symlink_follow_no. + * Any valid flag, such as F_file_at_path_empty_d, F_file_at_automount_no_d, or F_file_at_symlink_follow_no_d. * * @return * F_true if file exists. @@ -688,7 +688,7 @@ extern "C" { * @param type * The type of the file. * @param flag - * Any valid flag, such as f_file_at_path_empty, f_file_at_automount_no, or f_file_at_symlink_follow_no. + * Any valid flag, such as F_file_at_path_empty_d, F_file_at_automount_no_d, or F_file_at_symlink_follow_no_d. * * @return * F_true if path was found and path is type. @@ -836,7 +836,7 @@ extern "C" { * @param point * A path to the link that does the pointing. * @param flag - * Any valid flag, such as f_file_at_path_empty, f_file_at_automount_no, or f_file_at_symlink_follow_no. + * Any valid flag, such as F_file_at_path_empty_d, F_file_at_automount_no_d, or F_file_at_symlink_follow_no_d. * * @return * F_none on success. @@ -1015,7 +1015,7 @@ extern "C" { * * When using digits, the umask is always ignored. * When there is a leading '0' or '=' when using digits, then the special bits should be replaced. - * Otherwise, the current special bits are intended to be respected (designated by f_file_mode_t_replace_directory). + * Otherwise, the current special bits are intended to be respected (designated by F_file_mode_t_replace_directory_d). * * When using non-digits and '+', '-', or '=' are specified without a leading 'a', 'u', 'g', or 'o', then the mode operations should be performed against the current umask. * These are designated with the umask hows, such as f_file_mode_how_umask_replace. @@ -1041,7 +1041,7 @@ extern "C" { * The determined mode. * This uses bitwise data. * @param replace - * The determined modes that are to be replaced, such as: f_file_mode_t_replace_owner. + * The determined modes that are to be replaced, such as: F_file_mode_t_replace_owner_d. * This uses bitwise data. * * @return @@ -1483,7 +1483,7 @@ extern "C" { * @param path * The path file name. * @param flag - * Any valid flag, such as f_file_at_path_empty, f_file_at_automount_no, or f_file_at_symlink_follow_no. + * Any valid flag, such as F_file_at_path_empty_d, F_file_at_automount_no_d, or F_file_at_symlink_follow_no_d. * * @return * F_none on success. @@ -1660,7 +1660,7 @@ extern "C" { * The new group id to use. * Set to -1 to not change. * @param flag - * Any valid flag, such as f_file_at_path_empty, f_file_at_automount_no, or f_file_at_symlink_follow_no. + * Any valid flag, such as F_file_at_path_empty_d, F_file_at_automount_no_d, or F_file_at_symlink_follow_no_d. * * @return * F_none on success. @@ -1838,7 +1838,7 @@ extern "C" { * @param path * The path to the file. * @param flag - * Any valid flag, such as f_file_at_path_empty, f_file_at_automount_no, or f_file_at_symlink_follow_no. + * Any valid flag, such as F_file_at_path_empty_d, F_file_at_automount_no_d, or F_file_at_symlink_follow_no_d. * @param stat_file * The statistics read. * @@ -2342,7 +2342,7 @@ extern "C" { * @param mode * The file mode to use when (regular) file is created. * @param flag - * Any valid flag, such as f_file_at_path_empty, f_file_at_automount_no, or f_file_at_symlink_follow_no. + * Any valid flag, such as F_file_at_path_empty_d, F_file_at_automount_no_d, or F_file_at_symlink_follow_no_d. * * @return * F_none on success. @@ -2410,7 +2410,7 @@ extern "C" { * @param path * The path file name. * @param flag - * Any valid flag, such as f_file_at_path_empty, f_file_at_automount_no, or f_file_at_symlink_follow_no. + * Any valid flag, such as F_file_at_path_empty_d, F_file_at_automount_no_d, or F_file_at_symlink_follow_no_d. * @param type * The type of the file. * diff --git a/level_0/f_file/c/private-file.c b/level_0/f_file/c/private-file.c index c2682f4..9e413b6 100644 --- a/level_0/f_file/c/private-file.c +++ b/level_0/f_file/c/private-file.c @@ -37,8 +37,8 @@ extern "C" { f_file_t file_source = f_file_t_initialize; f_file_t file_destination = f_file_t_initialize; - file_source.flag = f_file_flag_read_only; - file_destination.flag = f_file_flag_write_only | f_file_flag_no_follow; + file_source.flag = F_file_flag_read_only_d; + file_destination.flag = F_file_flag_write_only_d | F_file_flag_no_follow_d; f_status_t status = private_f_file_open(source, 0, &file_source); if (F_status_is_error(status)) return status; @@ -85,8 +85,8 @@ extern "C" { f_file_t file_source = f_file_t_initialize; f_file_t file_destination = f_file_t_initialize; - file_source.flag = f_file_flag_read_only; - file_destination.flag = f_file_flag_write_only | f_file_flag_no_follow; + file_source.flag = F_file_flag_read_only_d; + file_destination.flag = F_file_flag_write_only_d | F_file_flag_no_follow_d; f_status_t status = private_f_file_open_at(at_id, source, 0, &file_source); if (F_status_is_error(status)) return status; @@ -132,10 +132,10 @@ extern "C" { f_file_t file = f_file_t_initialize; - file.flag = f_file_flag_close_execute | f_file_flag_create | f_file_flag_write_only; + file.flag = F_file_flag_close_execute_d | F_file_flag_create_d | F_file_flag_write_only_d; if (exclusive) { - file.flag |= f_file_flag_exclusive; + file.flag |= F_file_flag_exclusive_d; } const f_status_t status = private_f_file_open(path, mode, &file); @@ -153,10 +153,10 @@ extern "C" { f_file_t file = f_file_t_initialize; - file.flag = f_file_flag_close_execute | f_file_flag_create | f_file_flag_write_only; + file.flag = F_file_flag_close_execute_d | F_file_flag_create_d | F_file_flag_write_only_d; if (exclusive) { - file.flag |= f_file_flag_exclusive; + file.flag |= F_file_flag_exclusive_d; } const f_status_t status = private_f_file_open_at(at_id, path, mode, &file); @@ -397,7 +397,7 @@ extern "C" { // create a NULL terminated string based on file stat. if (link_stat.st_size + 1 > target->size) { - if (link_stat.st_size + 1 > f_array_length_t_size) { + if (link_stat.st_size + 1 > F_array_length_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -434,7 +434,7 @@ extern "C" { // create a NULL terminated string based on file stat. if (link_stat.st_size + 1 > target->size) { - if (link_stat.st_size + 1 > f_array_length_t_size) { + if (link_stat.st_size + 1 > F_array_length_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -754,19 +754,19 @@ extern "C" { #if !defined(_di_f_file_stream_descriptor_) || !defined(_di_f_file_stream_open_) || !defined(_di_f_file_stream_reopen_) const char *private_f_file_stream_open_mode_determine(const int flag) { - if (flag & f_file_flag_read_write) { - if (flag & f_file_flag_truncate) { + if (flag & F_file_flag_read_write_d) { + if (flag & F_file_flag_truncate_d) { return f_file_open_mode_read_truncate_s; } - else if (flag & f_file_flag_append) { + else if (flag & F_file_flag_append_d) { return f_file_open_mode_read_append_s; } // failsafe to read write prepend. return f_file_open_mode_read_write_s; } - else if (flag & f_file_flag_write_only) { - if (flag & f_file_flag_truncate) { + else if (flag & F_file_flag_write_only_d) { + if (flag & F_file_flag_truncate_d) { return f_file_open_mode_truncate_s; } diff --git a/level_0/f_file/c/private-file.h b/level_0/f_file/c/private-file.h index 4747b02..6a2001f 100644 --- a/level_0/f_file/c/private-file.h +++ b/level_0/f_file/c/private-file.h @@ -43,7 +43,7 @@ extern "C" { * @see f_file_stream_close() */ #if !defined(_di_f_file_close_) || !defined(_di_f_file_copy_) || !defined(_di_f_file_stream_close_) - extern f_status_t private_f_file_close(const bool flush, int *id) f_attribute_visibility_internal; + extern f_status_t private_f_file_close(const bool flush, int *id) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_close_) || !defined(_di_f_file_copy_) || !defined(_di_f_file_stream_close_) /** @@ -92,7 +92,7 @@ extern "C" { * @see f_file_clone() */ #if !defined(_di_f_file_copy_) || !defined(_di_f_file_clone_) - extern f_status_t private_f_file_copy_content(const f_string_t source, const f_string_t destination, const f_number_unsigned_t size_block) f_attribute_visibility_internal; + extern f_status_t private_f_file_copy_content(const f_string_t source, const f_string_t destination, const f_number_unsigned_t size_block) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_copy_) || !defined(_di_f_file_clone_) /** @@ -136,7 +136,7 @@ extern "C" { * @see f_file_create() */ #if !defined(_di_f_file_create_) || !defined(_di_f_file_copy_) - extern f_status_t private_f_file_create(const f_string_t path, const mode_t mode, const bool exclusive) f_attribute_visibility_internal; + extern f_status_t private_f_file_create(const f_string_t path, const mode_t mode, const bool exclusive) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_create_) || !defined(_di_f_file_copy_) /** @@ -181,7 +181,7 @@ extern "C" { * @see f_file_create_at() */ #if !defined(_di_f_file_create_at_) - extern f_status_t private_f_file_create_at(const int at_id, const f_string_t path, const mode_t mode, const bool exclusive) f_attribute_visibility_internal; + extern f_status_t private_f_file_create_at(const int at_id, const f_string_t path, const mode_t mode, const bool exclusive) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_create_at_) /** @@ -216,7 +216,7 @@ extern "C" { * @see f_file_copy() */ #if !defined(_di_f_file_copy_) - extern f_status_t private_f_file_create_directory(const f_string_t path, const mode_t mode) f_attribute_visibility_internal; + extern f_status_t private_f_file_create_directory(const f_string_t path, const mode_t mode) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_copy_) /** @@ -254,7 +254,7 @@ extern "C" { * @see f_file_copy_at() */ #if !defined(_di_f_file_copy_at_) - extern f_status_t private_f_file_create_directory_at(const int at_id, const f_string_t path, const mode_t mode) f_attribute_visibility_internal; + extern f_status_t private_f_file_create_directory_at(const int at_id, const f_string_t path, const mode_t mode) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_copy_at_) /** @@ -287,7 +287,7 @@ extern "C" { * @see f_file_copy() */ #if !defined(_di_f_file_create_fifo_) || !defined(_di_f_file_copy_) - extern f_status_t private_f_file_create_fifo(const f_string_t path, const mode_t mode) f_attribute_visibility_internal; + extern f_status_t private_f_file_create_fifo(const f_string_t path, const mode_t mode) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_create_fifo_) || !defined(_di_f_file_copy_) /** @@ -323,7 +323,7 @@ extern "C" { * @see f_file_copy_at() */ #if !defined(_di_f_file_create_fifo_at_) || !defined(_di_f_file_copy_at_) - extern f_status_t private_f_file_create_fifo_at(const int at_id, const f_string_t path, const mode_t mode) f_attribute_visibility_internal; + extern f_status_t private_f_file_create_fifo_at(const int at_id, const f_string_t path, const mode_t mode) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_create_fifo_at_) || !defined(_di_f_file_copy_at_) /** @@ -363,7 +363,7 @@ extern "C" { * @see f_file_create_node() */ #if !defined(_di_f_file_create_device_) || !defined(_di_f_file_create_node_) || !defined(_di_f_file_copy_) - extern f_status_t private_f_file_create_node(const f_string_t path, const mode_t mode, const dev_t device) f_attribute_visibility_internal; + extern f_status_t private_f_file_create_node(const f_string_t path, const mode_t mode, const dev_t device) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_create_device_) || !defined(_di_f_file_create_node_) || !defined(_di_f_file_copy_) /** @@ -406,7 +406,7 @@ extern "C" { * @see f_file_create_node_at() */ #if !defined(_di_f_file_create_device_at_) || !defined(_di_f_file_create_node_at_) || !defined(_di_f_file_copy_at_) - extern f_status_t private_f_file_create_node_at(const int at_id, const f_string_t path, const mode_t mode, const dev_t device) f_attribute_visibility_internal; + extern f_status_t private_f_file_create_node_at(const int at_id, const f_string_t path, const mode_t mode, const dev_t device) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_create_device_at_) || !defined(_di_f_file_create_node_at_) || !defined(_di_f_file_copy_at_) /** @@ -433,7 +433,7 @@ extern "C" { * @see f_file_flush() */ #if !defined(_di_f_file_flush_) || !defined(_di_f_file_close_) || !defined(_di_f_file_copy_) - extern f_status_t private_f_file_flush(const int id) f_attribute_visibility_internal; + extern f_status_t private_f_file_flush(const int id) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_flush_) || !defined(_di_f_file_close_) || !defined(_di_f_file_copy_) /** @@ -470,7 +470,7 @@ extern "C" { * @see f_file_link() */ #if !defined(_di_f_file_link_) || !defined(_di_f_file_copy_) - extern f_status_t private_f_file_link(const f_string_t target, const f_string_t point) f_attribute_visibility_internal; + extern f_status_t private_f_file_link(const f_string_t target, const f_string_t point) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_link_) || !defined(_di_f_file_copy_) /** @@ -509,7 +509,7 @@ extern "C" { * @see f_file_link_at() */ #if !defined(_di_f_file_link_at_) - extern f_status_t private_f_file_link_at(const int at_id, const f_string_t target, const f_string_t point) f_attribute_visibility_internal; + extern f_status_t private_f_file_link_at(const int at_id, const f_string_t target, const f_string_t point) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_link_at_) /** @@ -544,7 +544,7 @@ extern "C" { * @see f_file_link_read() */ #if !defined(_di_f_file_link_read_) || !defined(_di_f_file_copy_) - extern f_status_t private_f_file_link_read(const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target) f_attribute_visibility_internal; + extern f_status_t private_f_file_link_read(const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_link_read_) || !defined(_di_f_file_copy_) /** @@ -582,7 +582,7 @@ extern "C" { * @see f_file_link_read_at() */ #if !defined(_di_f_file_link_read_at_) || !defined(_di_f_file_copy_at_) - extern f_status_t private_f_file_link_read_at(const int at_id, const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target) f_attribute_visibility_internal; + extern f_status_t private_f_file_link_read_at(const int at_id, const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_link_read_at_) || !defined(_di_f_file_copy_at_) /** @@ -614,7 +614,7 @@ extern "C" { * @see f_file_mode_set() */ #if !defined(_di_f_file_mode_set_) || !defined(_di_f_file_copy_) - extern f_status_t private_f_file_mode_set(const f_string_t path, const mode_t mode) f_attribute_visibility_internal; + extern f_status_t private_f_file_mode_set(const f_string_t path, const mode_t mode) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_mode_set_) || !defined(_di_f_file_copy_) /** @@ -647,7 +647,7 @@ extern "C" { * @see f_file_mode_set_at() */ #if !defined(_di_f_file_mode_set_at_) - extern f_status_t private_f_file_mode_set_at(const int at_id, const f_string_t path, const mode_t mode) f_attribute_visibility_internal; + extern f_status_t private_f_file_mode_set_at(const int at_id, const f_string_t path, const mode_t mode) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_mode_set_at_) /** @@ -676,7 +676,7 @@ extern "C" { * @see f_file_open() */ #if !defined(_di_f_file_open_) || !defined(_di_f_file_copy_) - extern f_status_t private_f_file_open(const f_string_t path, const mode_t mode, f_file_t *file) f_attribute_visibility_internal; + extern f_status_t private_f_file_open(const f_string_t path, const mode_t mode, f_file_t *file) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_open_) || !defined(_di_f_file_copy_) /** @@ -706,7 +706,7 @@ extern "C" { * @see f_file_open_at() */ #if !defined(_di_f_file_open_at_) - extern f_status_t private_f_file_open_at(const int at_id, const f_string_t path, const mode_t mode, f_file_t *file) f_attribute_visibility_internal; + extern f_status_t private_f_file_open_at(const int at_id, const f_string_t path, const mode_t mode, f_file_t *file) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_open_at_) /** @@ -745,7 +745,7 @@ extern "C" { * @see f_file_role_change() */ #if !defined(_di_f_file_role_change_) || !defined(_di_f_file_copy_) - extern f_status_t private_f_file_role_change(const f_string_t path, const uid_t uid, const gid_t gid, const bool dereference) f_attribute_visibility_internal; + extern f_status_t private_f_file_role_change(const f_string_t path, const uid_t uid, const gid_t gid, const bool dereference) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_role_change_) || !defined(_di_f_file_copy_) /** @@ -762,7 +762,7 @@ extern "C" { * @param gid * The new group id to use. * @param flag - * Any valid flag, such as f_file_at_path_empty, f_file_at_automount_no, or f_file_at_symlink_follow_no. + * Any valid flag, such as F_file_at_path_empty_d, F_file_at_automount_no_d, or F_file_at_symlink_follow_no_d. * * @return * F_none on success. @@ -785,7 +785,7 @@ extern "C" { * @see f_file_role_change_at() */ #if !defined(_di_f_file_role_change_at_) - extern f_status_t private_f_file_role_change_at(const int at_id, const f_string_t path, const uid_t uid, const gid_t gid, const int flag) f_attribute_visibility_internal; + extern f_status_t private_f_file_role_change_at(const int at_id, const f_string_t path, const uid_t uid, const gid_t gid, const int flag) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_role_change_at_) /** @@ -820,7 +820,7 @@ extern "C" { * @see f_file_touch() */ #if !defined(_di_f_file_stat_) || !defined(_di_f_file_copy_) || !defined(_di_f_file_exists_) || !defined(_di_f_file_is_) || !defined(_di_f_file_touch_) - extern f_status_t private_f_file_stat(const f_string_t file_name, const bool dereference, struct stat *file_stat) f_attribute_visibility_internal; + extern f_status_t private_f_file_stat(const f_string_t file_name, const bool dereference, struct stat *file_stat) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_stat_) || !defined(_di_f_file_copy_) || !defined(_di_f_file_exists_) || !defined(_di_f_file_is_) || !defined(_di_f_file_touch_) /** @@ -833,7 +833,7 @@ extern "C" { * @param file_name * The name of the file. * @param flag - * Any valid flag, such as f_file_at_path_empty, f_file_at_automount_no, or f_file_at_symlink_follow_no. + * Any valid flag, such as F_file_at_path_empty_d, F_file_at_automount_no_d, or F_file_at_symlink_follow_no_d. * @param file_stat * The statistics read. * @@ -854,7 +854,7 @@ extern "C" { * @see f_file_touch_at() */ #if !defined(_di_f_file_stat_at_) || !defined(_di_f_file_exists_at_) || !defined(_di_f_file_touch_at_) - extern f_status_t private_f_file_stat_at(const int at_id, const f_string_t file_name, const int flag, struct stat *file_stat) f_attribute_visibility_internal; + extern f_status_t private_f_file_stat_at(const int at_id, const f_string_t file_name, const int flag, struct stat *file_stat) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_stat_at_) || !defined(_di_f_file_exists_at_) || !defined(_di_f_file_touch_at_) /** @@ -883,7 +883,7 @@ extern "C" { * @see f_file_stat_by_id() */ #if !defined(_di_f_file_stat_by_id_) || !defined(_di_f_file_size_by_id_) - extern f_status_t private_f_file_stat_by_id(const int id, struct stat *file_stat) f_attribute_visibility_internal; + extern f_status_t private_f_file_stat_by_id(const int id, struct stat *file_stat) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_stat_by_id_) || !defined(_di_f_file_size_by_id_) /** @@ -902,7 +902,7 @@ extern "C" { * @see f_file_stream_reopen() */ #if !defined(_di_f_file_stream_descriptor_) || !defined(_di_f_file_stream_open_) || !defined(_di_f_file_stream_reopen_) - extern const char *private_f_file_stream_open_mode_determine(const int flag) f_attribute_visibility_internal; + extern const char *private_f_file_stream_open_mode_determine(const int flag) F_attribute_visibility_internal_d; #endif // !defined(_di_f_file_stream_descriptor_) || !defined(_di_f_file_stream_open_) || !defined(_di_f_file_stream_reopen_) /** @@ -940,7 +940,7 @@ extern "C" { * @see f_file_stream_write_until() */ #if !defined(f_file_stream_write) || !defined(_di_f_file_stream_write_block_) || !defined(f_file_stream_write_until) || !defined(f_file_stream_write_range) - extern f_status_t private_f_file_stream_write_until(const f_file_t file, const f_string_t string, const f_array_length_t total, f_array_length_t *written) f_attribute_visibility_internal; + extern f_status_t private_f_file_stream_write_until(const f_file_t file, const f_string_t string, const f_array_length_t total, f_array_length_t *written) F_attribute_visibility_internal_d; #endif // !defined(f_file_stream_write) || !defined(_di_f_file_stream_write_block_) || !defined(f_file_stream_write_until) || !defined(f_file_stream_write_range) /** @@ -978,7 +978,7 @@ extern "C" { * @see f_file_write_until() */ #if !defined(f_file_write) || !defined(_di_f_file_write_block_) || !defined(f_file_write_until) || !defined(f_file_write_range) - extern f_status_t private_f_file_write_until(const f_file_t file, const f_string_t string, const f_array_length_t total, f_array_length_t *written) f_attribute_visibility_internal; + extern f_status_t private_f_file_write_until(const f_file_t file, const f_string_t string, const f_array_length_t total, f_array_length_t *written) F_attribute_visibility_internal_d; #endif // !defined(f_file_write) || !defined(_di_f_file_write_block_) || !defined(f_file_write_until) || !defined(f_file_write_range) #ifdef __cplusplus diff --git a/level_0/f_fss/c/fss-common.h b/level_0/f_fss/c/fss-common.h index 9020565..ab8bfa5 100644 --- a/level_0/f_fss/c/fss-common.h +++ b/level_0/f_fss/c/fss-common.h @@ -20,10 +20,36 @@ extern "C" { * FSS-specific types. */ #ifndef _di_f_fss_types_t_ + #define F_fss_brace_close_s F_string_ascii_brace_close_s + #define F_fss_brace_open_s F_string_ascii_brace_open_s + #define F_fss_colon_s F_string_ascii_colon_s + #define F_fss_minus_s F_string_ascii_minus_s + #define F_fss_f_s F_string_ascii_f_s + #define F_fss_pound_s F_string_ascii_pound_s + #define F_fss_quote_double_s F_string_ascii_quote_double_s + #define F_fss_quote_single_s F_string_ascii_quote_single_s + #define F_fss_s_s F_string_ascii_s_s + #define F_fss_slash_s F_string_ascii_slash_backward_s + #define F_fss_space_s F_string_ascii_space_s + #define F_fss_underscore_s F_string_ascii_underscore_s + + #define F_fss_brace_close_s_length F_string_ascii_brace_close_s_length + #define F_fss_brace_open_s_length F_string_ascii_brace_open_s_length + #define F_fss_colon_s_length F_string_ascii_colon_s_length + #define F_fss_minus_s_length F_string_ascii_minus_s_length + #define F_fss_f_s_length F_string_ascii_f_s_length + #define F_fss_pound_s_length F_string_ascii_pound_s_length + #define F_fss_quote_double_s_length F_string_ascii_quote_double_s_length + #define F_fss_quote_single_s_length F_string_ascii_quote_single_s_length + #define F_fss_s_s_length F_string_ascii_s_s_length + #define F_fss_slash_s_length F_string_ascii_slash_backward_s_length + #define F_fss_space_s_length F_string_ascii_space_s_length + #define F_fss_underscore_s_length F_string_ascii_underscore_s_length + #define f_fss_brace_close_s f_string_ascii_brace_close_s #define f_fss_brace_open_s f_string_ascii_brace_open_s #define f_fss_colon_s f_string_ascii_colon_s - #define f_fss_minus_s f_string_ascii_minus_s + #define f_fss_minus_s f_string_ascii_minus_s #define f_fss_f_s f_string_ascii_f_s #define f_fss_pound_s f_string_ascii_pound_s #define f_fss_quote_double_s f_string_ascii_quote_double_s @@ -33,43 +59,42 @@ extern "C" { #define f_fss_space_s f_string_ascii_space_s #define f_fss_underscore_s f_string_ascii_underscore_s - #define f_fss_comment f_fss_pound_s[0] - #define f_fss_eol f_string_eol_s[0] - #define f_fss_space f_fss_space_s[0] - #define f_fss_space_holder f_fss_underscore_s[0] - #define f_fss_basic_open f_fss_space_s[0] - #define f_fss_basic_close f_string_eol_s[0] - #define f_fss_extended_open f_fss_space_s[0] - #define f_fss_extended_next f_fss_space_s[0] - #define f_fss_extended_close f_string_eol_s[0] - #define f_fss_basic_list_open f_fss_colon_s[0] - #define f_fss_basic_list_open_end f_string_eol_s[0] - #define f_fss_basic_list_close f_string_eol_s[0] - #define f_fss_extended_list_open f_fss_brace_open_s[0] - #define f_fss_extended_list_open_end f_string_eol_s[0] - #define f_fss_extended_list_close f_fss_brace_close_s[0] - #define f_fss_extended_list_close_end f_string_eol_s[0] - #define f_fss_embedded_list_open f_fss_brace_open_s[0] - #define f_fss_embedded_list_open_end f_string_eol_s[0] - #define f_fss_embedded_list_close f_fss_brace_close_s[0] - #define f_fss_embedded_list_close_end f_string_eol_s[0] - #define f_fss_type_header_open f_fss_pound_s[0] - #define f_fss_type_header_part1 f_fss_space_s[0] - #define f_fss_type_header_part2 f_fss_f_s[0] - #define f_fss_type_header_part3 f_fss_s_s[0] - #define f_fss_type_header_part4 f_fss_s_s[0] - #define f_fss_type_header_part5 f_fss_minus_s[0] - #define f_fss_type_header_close f_string_eol_s[0] + #define f_fss_comment_s f_fss_pound_s + #define f_fss_eol_s f_string_eol_s + #define f_fss_space_holder_s f_fss_underscore_s + #define f_fss_basic_open_s f_fss_space_s + #define f_fss_basic_close_s f_string_eol_s + #define f_fss_extended_open_s f_fss_space_s + #define f_fss_extended_next_s f_fss_space_s + #define f_fss_extended_close_s f_string_eol_s + #define f_fss_basic_list_open_s f_fss_colon_s + #define f_fss_basic_list_open_end_s f_string_eol_s + #define f_fss_basic_list_close_s f_string_eol_s + #define f_fss_extended_list_open_s f_fss_brace_open_s + #define f_fss_extended_list_open_end_s f_string_eol_s + #define f_fss_extended_list_close_s f_fss_brace_close_s + #define f_fss_extended_list_close_end_s f_string_eol_s + #define f_fss_embedded_list_open_s f_fss_brace_open_s + #define f_fss_embedded_list_open_end_s f_string_eol_s + #define f_fss_embedded_list_close_s f_fss_brace_close_s + #define f_fss_embedded_list_close_end_s f_string_eol_s + #define f_fss_type_header_open_s f_fss_pound_s + #define f_fss_type_header_part1_s f_fss_space_s + #define f_fss_type_header_part2_s f_fss_f_s + #define f_fss_type_header_part3_s f_fss_s_s + #define f_fss_type_header_part4_s f_fss_s_s + #define f_fss_type_header_part5_s f_fss_minus_s + #define f_fss_type_header_close_s f_string_eol_s #endif // _di_f_fss_types_t_ /** * FSS-specific delimiters. */ #ifndef _di_f_fss_delimiters_ - #define f_fss_delimit_placeholder f_string_placeholder_s[0] - #define f_fss_delimit_quote_single f_fss_quote_single_s[0] - #define f_fss_delimit_quote_double f_fss_quote_double_s[0] - #define f_fss_delimit_slash f_fss_slash_s[0] + #define F_fss_delimit_placeholder_s f_string_placeholder_s[0] + #define F_fss_delimit_quote_single_s f_fss_quote_single_s[0] + #define F_fss_delimit_quote_double_s f_fss_quote_double_s[0] + #define F_fss_delimit_slash_s f_fss_slash_s[0] #endif //_di_f_fss_delimiters_ /** @@ -128,9 +153,9 @@ extern "C" { * Recommended to be set to at least 4 to be UTF-8 friendlier. */ #ifndef _di_f_fss_default_allocation_step_ - #define f_fss_default_allocation_step f_memory_default_allocation_small - #define f_fss_default_allocation_step_small f_memory_default_allocation_small - #define f_fss_default_allocation_step_large f_memory_default_allocation_large + #define F_fss_default_allocation_step_d F_memory_default_allocation_small_d + #define F_fss_default_allocation_step_small_d F_memory_default_allocation_small_d + #define F_fss_default_allocation_step_large_d F_memory_default_allocation_large_d #endif // _di_f_fss_default_allocation_step_ /** @@ -312,7 +337,7 @@ extern "C" { /** * Increase the size of the string quantitys array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -337,7 +362,7 @@ extern "C" { * Resize the string quantitys array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -444,7 +469,7 @@ extern "C" { /** * Increase the size of the string quantityss array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -470,7 +495,7 @@ extern "C" { * Resize the string quantityss array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount diff --git a/level_0/f_fss/c/fss.c b/level_0/f_fss/c/fss.c index c3ac5ec..9f6230d 100644 --- a/level_0/f_fss/c/fss.c +++ b/level_0/f_fss/c/fss.c @@ -14,7 +14,7 @@ extern "C" { for (f_array_length_t i = 0; i < delimits.used; ++i) { if (delimits.array[i] < buffer->used) { - buffer->string[delimits.array[i]] = f_fss_delimit_placeholder; + buffer->string[delimits.array[i]] = F_fss_delimit_placeholder_s; } } // for @@ -31,7 +31,7 @@ extern "C" { for (f_array_length_t i = 0; i < delimits.used; ++i) { if (delimits.array[i] < buffer->used && delimits.array[i] >= range.start && delimits.array[i] <= range.stop) { - buffer->string[delimits.array[i]] = f_fss_delimit_placeholder; + buffer->string[delimits.array[i]] = F_fss_delimit_placeholder_s; } } // for @@ -51,12 +51,12 @@ extern "C" { for (f_array_length_t i = before; i > 0; --i) { - if (buffer.string[i] == f_fss_eol) { + if (buffer.string[i] == f_fss_eol_s[0]) { ++(*line); } } // for - if (buffer.string[0] == f_fss_eol) { + if (buffer.string[0] == f_fss_eol_s[0]) { ++(*line); } @@ -76,12 +76,12 @@ extern "C" { for (f_array_length_t i = before; i > range.start; --i) { - if (buffer.string[i] == f_fss_eol) { + if (buffer.string[i] == f_fss_eol_s[0]) { ++(*line); } } // for - if (buffer.string[range.start] == f_fss_eol) { + if (buffer.string[range.start] == f_fss_eol_s[0]) { ++(*line); } @@ -166,7 +166,7 @@ extern "C" { if (range->start >= buffer.used) return F_none_eos; if (range->start > range->stop) return F_none_stop; - if (buffer.string[range->start] == f_fss_eol) break; + if (buffer.string[range->start] == f_fss_eol_s[0]) break; } // for return F_none; @@ -192,7 +192,7 @@ extern "C" { while (position < buffer->used && position <= range.stop) { - if (buffer->string[position] == f_fss_delimit_placeholder) { + if (buffer->string[position] == F_fss_delimit_placeholder_s) { ++distance; } @@ -233,7 +233,7 @@ extern "C" { if (distance > 0) { while (position < buffer->used + distance && position <= range.stop) { - buffer->string[position] = f_fss_delimit_placeholder; + buffer->string[position] = F_fss_delimit_placeholder_s; ++position; } } @@ -252,7 +252,7 @@ extern "C" { if (range->start >= buffer.used) return F_none_eos; if (range->start > range->stop) return F_none_stop; - if (buffer.string[range->start] != f_fss_delimit_placeholder) break; + if (buffer.string[range->start] != F_fss_delimit_placeholder_s) break; } // for return F_none; @@ -284,11 +284,11 @@ extern "C" { for (;;) { - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { return F_none_eol; } - if (buffer.string[range->start] == f_fss_delimit_placeholder) { + if (buffer.string[range->start] == F_fss_delimit_placeholder_s) { ++range->start; if (range->start >= buffer.used) { @@ -381,7 +381,7 @@ extern "C" { for (;;) { - if (buffer.string[range->start] != f_fss_delimit_placeholder) { + if (buffer.string[range->start] != F_fss_delimit_placeholder_s) { status = f_utf_is_graph(buffer.string + range->start, width_max); if (status == F_true) { diff --git a/level_0/f_fss/c/fss_named.c b/level_0/f_fss/c/fss_named.c index 85cbf54..2ccf8d3 100644 --- a/level_0/f_fss/c/fss_named.c +++ b/level_0/f_fss/c/fss_named.c @@ -55,12 +55,12 @@ extern "C" { if (named->objects.used + 1 > named->objects.size) { f_array_length_t size = named->objects.used + step; - if (size > f_array_length_t_size) { - if (named->objects.used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (named->objects.used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_fss_named_resize(size, named); @@ -78,7 +78,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (named->objects.used + amount > named->objects.size) { - if (named->objects.used + amount > f_array_length_t_size) { + if (named->objects.used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -149,12 +149,12 @@ extern "C" { if (nameds->used + 1 > nameds->size) { f_array_length_t size = nameds->used + step; - if (size > f_array_length_t_size) { - if (nameds->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (nameds->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_fss_nameds_resize(size, nameds); @@ -172,7 +172,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (nameds->used + amount > nameds->size) { - if (nameds->used + amount > f_array_length_t_size) { + if (nameds->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } diff --git a/level_0/f_fss/c/fss_named.h b/level_0/f_fss/c/fss_named.h index d098f3c..09f5c68 100644 --- a/level_0/f_fss/c/fss_named.h +++ b/level_0/f_fss/c/fss_named.h @@ -152,7 +152,7 @@ extern "C" { /** * Increase the size of all parts of the named structure, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -177,7 +177,7 @@ extern "C" { * Resize all parts of the named structure to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -280,7 +280,7 @@ extern "C" { /** * Increase the size of the nameds array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -305,7 +305,7 @@ extern "C" { * Resize the nameds array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount diff --git a/level_0/f_fss/c/fss_nest.c b/level_0/f_fss/c/fss_nest.c index d6e7c43..2004b20 100644 --- a/level_0/f_fss/c/fss_nest.c +++ b/level_0/f_fss/c/fss_nest.c @@ -55,12 +55,12 @@ extern "C" { if (items->used + 1 > items->size) { f_array_length_t size = items->used + step; - if (size > f_array_length_t_size) { - if (items->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (items->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_fss_items_resize(size, items); @@ -78,7 +78,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (items->used + amount > items->size) { - if (items->used + amount > f_array_length_t_size) { + if (items->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -149,12 +149,12 @@ extern "C" { if (nest->used + 1 > nest->size) { f_array_length_t size = nest->used + step; - if (size > f_array_length_t_size) { - if (nest->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (nest->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_fss_nest_resize(size, nest); @@ -172,7 +172,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (nest->used + amount > nest->size) { - if (nest->used + amount > f_array_length_t_size) { + if (nest->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -243,12 +243,12 @@ extern "C" { if (nests->used + 1 > nests->size) { f_array_length_t size = nests->used + step; - if (size > f_array_length_t_size) { - if (nests->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (nests->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_fss_nests_resize(size, nests); @@ -266,7 +266,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (nests->used + amount > nests->size) { - if (nests->used + amount > f_array_length_t_size) { + if (nests->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } diff --git a/level_0/f_fss/c/fss_nest.h b/level_0/f_fss/c/fss_nest.h index a2ca95c..569c9a9 100644 --- a/level_0/f_fss/c/fss_nest.h +++ b/level_0/f_fss/c/fss_nest.h @@ -242,7 +242,7 @@ extern "C" { /** * Increase the size of the items array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -267,7 +267,7 @@ extern "C" { * Resize the items array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -370,7 +370,7 @@ extern "C" { /** * Increase the size of the nest array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -395,7 +395,7 @@ extern "C" { * Resize the nest array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -498,7 +498,7 @@ extern "C" { /** * Increase the size of the nests array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -523,7 +523,7 @@ extern "C" { * Resize the nests array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount diff --git a/level_0/f_fss/c/fss_set.c b/level_0/f_fss/c/fss_set.c index e4e47a6..fad3db1 100644 --- a/level_0/f_fss/c/fss_set.c +++ b/level_0/f_fss/c/fss_set.c @@ -55,12 +55,12 @@ extern "C" { if (set->objects.used + 1 > set->objects.size) { f_array_length_t size = set->objects.used + step; - if (size > f_array_length_t_size) { - if (set->objects.used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (set->objects.used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_fss_set_resize(size, set); @@ -78,7 +78,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (set->objects.used + amount > set->objects.size) { - if (set->objects.used + amount > f_array_length_t_size) { + if (set->objects.used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -149,12 +149,12 @@ extern "C" { if (set_quote->objects.used + 1 > set_quote->objects.size) { f_array_length_t size = set_quote->objects.used + step; - if (size > f_array_length_t_size) { - if (set_quote->objects.used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (set_quote->objects.used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_fss_set_quote_resize(size, set_quote); @@ -172,7 +172,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (set_quote->objects.used + amount > set_quote->objects.size) { - if (set_quote->objects.used + amount > f_array_length_t_size) { + if (set_quote->objects.used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -243,12 +243,12 @@ extern "C" { if (set_quotes->used + 1 > set_quotes->size) { f_array_length_t size = set_quotes->used + step; - if (size > f_array_length_t_size) { - if (set_quotes->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (set_quotes->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_fss_set_quotes_resize(size, set_quotes); @@ -266,7 +266,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (set_quotes->used + amount > set_quotes->size) { - if (set_quotes->used + amount > f_array_length_t_size) { + if (set_quotes->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -337,12 +337,12 @@ extern "C" { if (sets->used + 1 > sets->size) { f_array_length_t size = sets->used + step; - if (size > f_array_length_t_size) { - if (sets->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (sets->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_fss_sets_resize(size, sets); @@ -360,7 +360,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (sets->used + amount > sets->size) { - if (sets->used + amount > f_array_length_t_size) { + if (sets->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } diff --git a/level_0/f_fss/c/fss_set.h b/level_0/f_fss/c/fss_set.h index be4782b..592f4b1 100644 --- a/level_0/f_fss/c/fss_set.h +++ b/level_0/f_fss/c/fss_set.h @@ -216,7 +216,7 @@ extern "C" { /** * Increase the size of the set array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -241,7 +241,7 @@ extern "C" { * Resize the set array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -344,7 +344,7 @@ extern "C" { /** * Increase the size of the set_quote array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set_quote max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set_quote max buffer size (F_array_length_t_size_d). * If already set_quote to the maximum buffer size, then the resize will fail. * * @param step @@ -369,7 +369,7 @@ extern "C" { * Resize the set_quote array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set_quote max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set_quote max buffer size (F_array_length_t_size_d). * If already set_quote to the maximum buffer size, then the resize will fail. * * @param amount @@ -472,7 +472,7 @@ extern "C" { /** * Increase the size of the set_quotes array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -497,7 +497,7 @@ extern "C" { * Resize the set_quotes array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -600,7 +600,7 @@ extern "C" { /** * Increase the size of the sets array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -625,7 +625,7 @@ extern "C" { * Resize the sets array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount diff --git a/level_0/f_fss/c/private-fss.h b/level_0/f_fss/c/private-fss.h index ad16eda..1b0e326 100644 --- a/level_0/f_fss/c/private-fss.h +++ b/level_0/f_fss/c/private-fss.h @@ -38,7 +38,7 @@ extern "C" { * @see f_memory_adjust() */ #if !defined(_di_f_fss_items_adjust_) || !defined(_di_f_fss_items_decimate_by_) - extern f_status_t private_f_fss_items_adjust(const f_array_length_t length, f_fss_items_t *items) f_attribute_visibility_internal; + extern f_status_t private_f_fss_items_adjust(const f_array_length_t length, f_fss_items_t *items) F_attribute_visibility_internal_d; #endif // !defined(_di_f_fss_items_adjust_) || !defined(_di_f_fss_items_decimate_by_) /** @@ -66,7 +66,7 @@ extern "C" { * @see f_memory_resize() */ #if !defined(_di_f_fss_items_decrease_by_) || !defined(_di_f_fss_items_increase_) || !defined(_di_f_fss_items_increase_by_) || !defined(_di_f_fss_items_resize_) - extern f_status_t private_f_fss_items_resize(const f_array_length_t length, f_fss_items_t *items) f_attribute_visibility_internal; + extern f_status_t private_f_fss_items_resize(const f_array_length_t length, f_fss_items_t *items) F_attribute_visibility_internal_d; #endif // !defined(_di_f_fss_items_decrease_by_) || !defined(_di_f_fss_items_increase_) || !defined(_di_f_fss_items_increase_by_) || !defined(_di_f_fss_items_resize_) /** @@ -94,7 +94,7 @@ extern "C" { * @see f_fss_nameds_decimate_by() */ #if !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_) - extern f_status_t private_f_fss_named_adjust(const f_array_length_t length, f_fss_named_t *named) f_attribute_visibility_internal; + extern f_status_t private_f_fss_named_adjust(const f_array_length_t length, f_fss_named_t *named) F_attribute_visibility_internal_d; #endif // !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_) /** @@ -124,7 +124,7 @@ extern "C" { * @see f_fss_nameds_resize() */ #if !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_increase_) || !defined(_di_f_fss_nameds_increase_by_) || !defined(_di_f_fss_nameds_resize_) - extern f_status_t private_f_fss_named_resize(const f_array_length_t length, f_fss_named_t *named) f_attribute_visibility_internal; + extern f_status_t private_f_fss_named_resize(const f_array_length_t length, f_fss_named_t *named) F_attribute_visibility_internal_d; #endif // !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_increase_) || !defined(_di_f_fss_nameds_increase_by_) || !defined(_di_f_fss_nameds_resize_) /** @@ -150,7 +150,7 @@ extern "C" { * @see f_memory_adjust() */ #if !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_) - extern f_status_t private_f_fss_nameds_adjust(const f_array_length_t length, f_fss_nameds_t *nameds) f_attribute_visibility_internal; + extern f_status_t private_f_fss_nameds_adjust(const f_array_length_t length, f_fss_nameds_t *nameds) F_attribute_visibility_internal_d; #endif // !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_) /** @@ -178,7 +178,7 @@ extern "C" { * @see f_memory_resize() */ #if !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_increase_) || !defined(_di_f_fss_nameds_increase_by_) || !defined(_di_f_fss_nameds_resize_) - extern f_status_t private_f_fss_nameds_resize(const f_array_length_t length, f_fss_nameds_t *nameds) f_attribute_visibility_internal; + extern f_status_t private_f_fss_nameds_resize(const f_array_length_t length, f_fss_nameds_t *nameds) F_attribute_visibility_internal_d; #endif // !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_increase_) || !defined(_di_f_fss_nameds_increase_by_) || !defined(_di_f_fss_nameds_resize_) /** @@ -204,7 +204,7 @@ extern "C" { * @see f_memory_adjust() */ #if !defined(_di_f_fss_nest_adjust_) || !defined(_di_f_fss_nest_decimate_by_) - extern f_status_t private_f_fss_nest_adjust(const f_array_length_t length, f_fss_nest_t *nest) f_attribute_visibility_internal; + extern f_status_t private_f_fss_nest_adjust(const f_array_length_t length, f_fss_nest_t *nest) F_attribute_visibility_internal_d; #endif // !defined(_di_f_fss_nest_adjust_) || !defined(_di_f_fss_nest_decimate_by_) /** @@ -232,7 +232,7 @@ extern "C" { * @see f_memory_resize() */ #if !defined(_di_f_fss_nest_decrease_by_) || !defined(_di_f_fss_nest_increase_) || !defined(_di_f_fss_nest_increase_by_) || !defined(_di_f_fss_nest_resize_) - extern f_status_t private_f_fss_nest_resize(const f_array_length_t length, f_fss_nest_t *nest) f_attribute_visibility_internal; + extern f_status_t private_f_fss_nest_resize(const f_array_length_t length, f_fss_nest_t *nest) F_attribute_visibility_internal_d; #endif // !defined(_di_f_fss_nest_decrease_by_) || !defined(_di_f_fss_nest_increase_) || !defined(_di_f_fss_nest_increase_by_) || !defined(_di_f_fss_nest_resize_) /** @@ -258,7 +258,7 @@ extern "C" { * @see f_memory_adjust() */ #if !defined(_di_f_fss_nests_adjust_) || !defined(_di_f_fss_nests_decimate_by_) - extern f_status_t private_f_fss_nests_adjust(const f_array_length_t length, f_fss_nests_t *nests) f_attribute_visibility_internal; + extern f_status_t private_f_fss_nests_adjust(const f_array_length_t length, f_fss_nests_t *nests) F_attribute_visibility_internal_d; #endif // !defined(_di_f_fss_nests_adjust_) || !defined(_di_f_fss_nests_decimate_by_) /** @@ -286,7 +286,7 @@ extern "C" { * @see f_memory_resize() */ #if !defined(_di_f_fss_nests_decrease_by_) || !defined(_di_f_fss_nests_increase_) || !defined(_di_f_fss_nests_increase_by_) || !defined(_di_f_fss_nests_resize_) - extern f_status_t private_f_fss_nests_resize(const f_array_length_t length, f_fss_nests_t *nests) f_attribute_visibility_internal; + extern f_status_t private_f_fss_nests_resize(const f_array_length_t length, f_fss_nests_t *nests) F_attribute_visibility_internal_d; #endif // !defined(_di_f_fss_nests_decrease_by_) || !defined(_di_f_fss_nests_increase_) || !defined(_di_f_fss_nests_increase_by_) || !defined(_di_f_fss_nests_resize_) /** @@ -312,7 +312,7 @@ extern "C" { * @see f_fss_set_decimate_by() */ #if !defined(_di_f_fss_set_adjust_) || !defined(_di_f_fss_set_decimate_by_) - extern f_status_t private_f_fss_set_adjust(const f_array_length_t length, f_fss_set_t *set) f_attribute_visibility_internal; + extern f_status_t private_f_fss_set_adjust(const f_array_length_t length, f_fss_set_t *set) F_attribute_visibility_internal_d; #endif // !defined(_di_f_fss_set_adjust_) || !defined(_di_f_fss_set_decimate_by_) /** @@ -340,7 +340,7 @@ extern "C" { * @see f_fss_set_resize() */ #if !defined(_di_f_fss_set_decrease_by_) || !defined(_di_f_fss_set_increase_) || !defined(_di_f_fss_set_increase_by_) || !defined(_di_f_fss_set_resize_) - extern f_status_t private_f_fss_set_resize(const f_array_length_t length, f_fss_set_t *set) f_attribute_visibility_internal; + extern f_status_t private_f_fss_set_resize(const f_array_length_t length, f_fss_set_t *set) F_attribute_visibility_internal_d; #endif // !defined(_di_f_fss_set_decrease_by_) || !defined(_di_f_fss_set_increase_) || !defined(_di_f_fss_set_increase_by_) || !defined(_di_f_fss_set_resize_) /** @@ -370,7 +370,7 @@ extern "C" { * @see f_fss_set_quote_decimate_by() */ #if !defined(_di_f_fss_set_quote_adjust_) || !defined(_di_f_fss_set_quote_decimate_by_) - extern f_status_t private_f_fss_set_quote_adjust(const f_array_length_t length, f_fss_set_quote_t *set_quote) f_attribute_visibility_internal; + extern f_status_t private_f_fss_set_quote_adjust(const f_array_length_t length, f_fss_set_quote_t *set_quote) F_attribute_visibility_internal_d; #endif // !defined(_di_f_fss_set_quote_adjust_) || !defined(_di_f_fss_set_quote_decimate_by_) /** @@ -402,7 +402,7 @@ extern "C" { * @see f_fss_set_quote_resize() */ #if !defined(_di_f_fss_set_quote_decrease_by_) || !defined(_di_f_fss_set_quote_increase_) || !defined(_di_f_fss_set_quote_increase_by_) || !defined(_di_f_fss_set_quote_resize_) - extern f_status_t private_f_fss_set_quote_resize(const f_array_length_t length, f_fss_set_quote_t *set_quote) f_attribute_visibility_internal; + extern f_status_t private_f_fss_set_quote_resize(const f_array_length_t length, f_fss_set_quote_t *set_quote) F_attribute_visibility_internal_d; #endif // !defined(_di_f_fss_set_quote_decrease_by_) || !defined(_di_f_fss_set_quote_increase_) || !defined(_di_f_fss_set_quote_increase_by_) || !defined(_di_f_fss_set_quote_resize_) /** @@ -434,7 +434,7 @@ extern "C" { * @see f_memory_adjust() */ #if !defined(_di_f_fss_set_quotes_adjust_) || !defined(_di_f_fss_set_quotes_decimate_by_) - extern f_status_t private_f_fss_set_quotes_adjust(const f_array_length_t length, f_fss_set_quotes_t *set_quotes) f_attribute_visibility_internal; + extern f_status_t private_f_fss_set_quotes_adjust(const f_array_length_t length, f_fss_set_quotes_t *set_quotes) F_attribute_visibility_internal_d; #endif // !defined(_di_f_fss_set_quotes_adjust_) || !defined(_di_f_fss_set_quotes_decimate_by_) /** @@ -468,7 +468,7 @@ extern "C" { * @see f_memory_resize() */ #if !defined(_di_f_fss_set_quotes_decrease_by_) || !defined(_di_f_fss_set_quotes_increase_) || !defined(_di_f_fss_set_quotes_increase_by_) || !defined(_di_f_fss_set_quotes_resize_) - extern f_status_t private_f_fss_set_quotes_resize(const f_array_length_t length, f_fss_set_quotes_t *set_quotes) f_attribute_visibility_internal; + extern f_status_t private_f_fss_set_quotes_resize(const f_array_length_t length, f_fss_set_quotes_t *set_quotes) F_attribute_visibility_internal_d; #endif // !defined(_di_f_fss_set_quotes_decrease_by_) || !defined(_di_f_fss_set_quotes_increase_) || !defined(_di_f_fss_set_quotes_increase_by_) || !defined(_di_f_fss_set_quotes_resize_) /** @@ -496,7 +496,7 @@ extern "C" { * @see f_memory_adjust() */ #if !defined(_di_f_fss_sets_adjust_) || !defined(_di_f_fss_sets_decimate_by_) - extern f_status_t private_f_fss_sets_adjust(const f_array_length_t length, f_fss_sets_t *sets) f_attribute_visibility_internal; + extern f_status_t private_f_fss_sets_adjust(const f_array_length_t length, f_fss_sets_t *sets) F_attribute_visibility_internal_d; #endif // !defined(_di_f_fss_sets_adjust_) || !defined(_di_f_fss_sets_decimate_by_) /** @@ -526,7 +526,7 @@ extern "C" { * @see f_memory_resize() */ #if !defined(_di_f_fss_sets_decrease_by_) || !defined(_di_f_fss_sets_increase_) || !defined(_di_f_fss_sets_increase_by_) || !defined(_di_f_fss_sets_resize_) - extern f_status_t private_f_fss_sets_resize(const f_array_length_t length, f_fss_sets_t *sets) f_attribute_visibility_internal; + extern f_status_t private_f_fss_sets_resize(const f_array_length_t length, f_fss_sets_t *sets) F_attribute_visibility_internal_d; #endif // !defined(_di_f_fss_sets_decrease_by_) || !defined(_di_f_fss_sets_increase_) || !defined(_di_f_fss_sets_increase_by_) || !defined(_di_f_fss_sets_resize_) #ifdef __cplusplus diff --git a/level_0/f_iki/c/iki-common.c b/level_0/f_iki/c/iki-common.c index 2eb2d88..5d58c37 100644 --- a/level_0/f_iki/c/iki-common.c +++ b/level_0/f_iki/c/iki-common.c @@ -6,21 +6,21 @@ extern "C" { #endif #ifndef _di_iki_vocabulary_0001_s_ - const f_string_t iki_vocabulary_0001_address_s = iki_vocabulary_0001_address; - const f_string_t iki_vocabulary_0001_code_s = iki_vocabulary_0001_code; - const f_string_t iki_vocabulary_0001_email_s = iki_vocabulary_0001_email; - const f_string_t iki_vocabulary_0001_name_s = iki_vocabulary_0001_name; - const f_string_t iki_vocabulary_0001_phone_s = iki_vocabulary_0001_phone; - const f_string_t iki_vocabulary_0001_quote_s = iki_vocabulary_0001_quote; - const f_string_t iki_vocabulary_0001_uri_s = iki_vocabulary_0001_uri; - const f_string_t iki_vocabulary_0001_url_s = iki_vocabulary_0001_url; - const f_string_t iki_vocabulary_0001_urn_s = iki_vocabulary_0001_urn; - const f_string_t iki_vocabulary_0001_variable_s = iki_vocabulary_0001_variable; + const f_string_t iki_vocabulary_0001_address_s = IKI_vocabulary_0001_address_s; + const f_string_t iki_vocabulary_0001_code_s = IKI_vocabulary_0001_code_s; + const f_string_t iki_vocabulary_0001_email_s = IKI_vocabulary_0001_email_s; + const f_string_t iki_vocabulary_0001_name_s = IKI_vocabulary_0001_name_s; + const f_string_t iki_vocabulary_0001_phone_s = IKI_vocabulary_0001_phone_s; + const f_string_t iki_vocabulary_0001_quote_s = IKI_vocabulary_0001_quote_s; + const f_string_t iki_vocabulary_0001_uri_s = IKI_vocabulary_0001_uri_s; + const f_string_t iki_vocabulary_0001_url_s = IKI_vocabulary_0001_url_s; + const f_string_t iki_vocabulary_0001_urn_s = IKI_vocabulary_0001_urn_s; + const f_string_t iki_vocabulary_0001_variable_s = IKI_vocabulary_0001_variable_s; #endif // _di_iki_vocabulary_0001_s_ #ifndef _di_iki_vocabulary_0002_s_ - const f_string_t iki_vocabulary_0002_define_s = iki_vocabulary_0002_define; - const f_string_t iki_vocabulary_0002_parameter_s = iki_vocabulary_0002_parameter; + const f_string_t iki_vocabulary_0002_define_s = IKI_vocabulary_0002_define_s; + const f_string_t iki_vocabulary_0002_parameter_s = IKI_vocabulary_0002_parameter_s; #endif // _di_iki_vocabulary_0002_s_ #ifdef __cplusplus diff --git a/level_0/f_iki/c/iki-common.h b/level_0/f_iki/c/iki-common.h index 1e92e36..a5f9d34 100644 --- a/level_0/f_iki/c/iki-common.h +++ b/level_0/f_iki/c/iki-common.h @@ -20,35 +20,35 @@ extern "C" { * IKI-specific syntax. */ #ifndef _di_f_iki_syntax_ - #define f_iki_syntax_separator ':' - #define f_iki_syntax_placeholder 0 - #define f_iki_syntax_quote_double '"' - #define f_iki_syntax_quote_single '\'' - #define f_iki_syntax_slash '\\' + #define F_iki_syntax_separator_s ':' + #define F_iki_syntax_placeholder_s 0 + #define F_iki_syntax_quote_double_s '"' + #define F_iki_syntax_quote_single_s '\'' + #define F_iki_syntax_slash_s '\\' #endif //_di_f_iki_syntax_ #ifndef _di_iki_vocabulary_0001_s_ - #define iki_vocabulary_0001_address "address" - #define iki_vocabulary_0001_code "code" - #define iki_vocabulary_0001_email "email" - #define iki_vocabulary_0001_name "name" - #define iki_vocabulary_0001_phone "phone" - #define iki_vocabulary_0001_quote "quote" - #define iki_vocabulary_0001_uri "uri" - #define iki_vocabulary_0001_url "url" - #define iki_vocabulary_0001_urn "urn" - #define iki_vocabulary_0001_variable "var" - - #define iki_vocabulary_0001_address_length 7 - #define iki_vocabulary_0001_code_length 4 - #define iki_vocabulary_0001_email_length 5 - #define iki_vocabulary_0001_name_length 4 - #define iki_vocabulary_0001_phone_length 5 - #define iki_vocabulary_0001_quote_length 5 - #define iki_vocabulary_0001_uri_length 3 - #define iki_vocabulary_0001_url_length 3 - #define iki_vocabulary_0001_urn_length 3 - #define iki_vocabulary_0001_variable_length 3 + #define IKI_vocabulary_0001_address_s "address" + #define IKI_vocabulary_0001_code_s "code" + #define IKI_vocabulary_0001_email_s "email" + #define IKI_vocabulary_0001_name_s "name" + #define IKI_vocabulary_0001_phone_s "phone" + #define IKI_vocabulary_0001_quote_s "quote" + #define IKI_vocabulary_0001_uri_s "uri" + #define IKI_vocabulary_0001_url_s "url" + #define IKI_vocabulary_0001_urn_s "urn" + #define IKI_vocabulary_0001_variable_s "var" + + #define IKI_vocabulary_0001_address_s_length 7 + #define IKI_vocabulary_0001_code_s_length 4 + #define IKI_vocabulary_0001_email_s_length 5 + #define IKI_vocabulary_0001_name_s_length 4 + #define IKI_vocabulary_0001_phone_s_length 5 + #define IKI_vocabulary_0001_quote_s_length 5 + #define IKI_vocabulary_0001_uri_s_length 3 + #define IKI_vocabulary_0001_url_s_length 3 + #define IKI_vocabulary_0001_urn_s_length 3 + #define IKI_vocabulary_0001_variable_s_length 3 extern const f_string_t iki_vocabulary_0001_address_s; extern const f_string_t iki_vocabulary_0001_code_s; @@ -63,11 +63,11 @@ extern "C" { #endif // _di_iki_vocabulary_0001_s_ #ifndef _di_iki_vocabulary_0002_s_ - #define iki_vocabulary_0002_define "define" - #define iki_vocabulary_0002_parameter "parameter" + #define IKI_vocabulary_0002_define_s "define" + #define IKI_vocabulary_0002_parameter_s "parameter" - #define iki_vocabulary_0002_define_length 6 - #define iki_vocabulary_0002_parameter_length 9 + #define IKI_vocabulary_0002_define_s_length 6 + #define IKI_vocabulary_0002_parameter_s_length 9 extern const f_string_t iki_vocabulary_0002_define_s; extern const f_string_t iki_vocabulary_0002_parameter_s; @@ -188,7 +188,7 @@ extern "C" { * For a UTF-8 friendly allocation step, set to at least 4. */ #ifndef _di_f_iki_default_allocation_step_ - #define f_iki_default_allocation_step 4 + #define F_iki_default_allocation_step_d 4 #endif // _di_f_iki_default_allocation_step_ /** @@ -202,8 +202,8 @@ extern "C" { #define macro_f_iki_allocate_delimits_if_necessary(state, status, delimits) \ status = F_none; \ if (delimits.used == delimits.size) { \ - if (delimits.used + state.step_small > f_array_length_t_size) { \ - if (delimits.used == f_array_length_t_size) { \ + if (delimits.used + state.step_small > F_array_length_t_size_d) { \ + if (delimits.used == F_array_length_t_size_d) { \ status = F_status_set_error(F_string_too_large); \ } \ else { \ @@ -227,8 +227,8 @@ extern "C" { #define macro_f_iki_allocate_ranges_if_necessary(state, status, ranges) \ status = F_none; \ if (ranges.used == ranges.size) { \ - if (ranges.used + state.step_small > f_array_length_t_size) { \ - if (ranges.used == f_array_length_t_size) { \ + if (ranges.used + state.step_small > F_array_length_t_size_d) { \ + if (ranges.used == F_array_length_t_size_d) { \ status = F_status_set_error(F_string_too_large); \ } \ else { \ @@ -270,7 +270,7 @@ extern "C" { #ifndef _di_macro_f_iki_seek_whitespace_ #define macro_f_iki_seek_whitespace(status, buffer, range, width_max, condition) \ while (range->start <= range->stop && range->start < buffer->used) { \ - if (buffer->string[range->start] == f_iki_syntax_placeholder) { \ + if (buffer->string[range->start] == F_iki_syntax_placeholder_s) { \ ++range->start; \ continue; \ } \ @@ -297,7 +297,7 @@ extern "C" { #ifndef _di_macro_f_iki_seek_word_dash_plus_ #define macro_f_iki_seek_word_dash_plus(status, buffer, range, width_max, condition) \ while (range->start <= range->stop && range->start < buffer->used) { \ - if (buffer->string[range->start] == f_iki_syntax_placeholder) { \ + if (buffer->string[range->start] == F_iki_syntax_placeholder_s) { \ ++range->start; \ continue; \ } \ diff --git a/level_0/f_iki/c/iki.c b/level_0/f_iki/c/iki.c index fdae925..be5e1f3 100644 --- a/level_0/f_iki/c/iki.c +++ b/level_0/f_iki/c/iki.c @@ -9,7 +9,7 @@ extern "C" { f_status_t f_iki_content_is(const f_string_static_t content, const uint8_t quote) { #ifndef _di_level_0_parameter_checking_ if (content.used > content.size) return F_status_set_error(F_parameter); - if (quote != f_iki_syntax_quote_single && quote != f_iki_syntax_quote_double) return F_status_set_error(F_parameter); + if (quote != F_iki_syntax_quote_single_s && quote != F_iki_syntax_quote_double_s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ const f_string_range_t range = macro_f_string_range_t_initialize(content.used); @@ -24,7 +24,7 @@ extern "C" { if (content.used > content.size) return F_status_set_error(F_parameter); if (range.start > range.stop) return F_status_set_error(F_parameter); if (range.start >= content.used) return F_status_set_error(F_parameter); - if (quote != f_iki_syntax_quote_single && quote != f_iki_syntax_quote_double) return F_status_set_error(F_parameter); + if (quote != F_iki_syntax_quote_single_s && quote != F_iki_syntax_quote_double_s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ return private_f_iki_content_partial_is(content, range, quote); @@ -127,12 +127,12 @@ extern "C" { } } - if (buffer->string[range->start] == f_iki_syntax_placeholder) { + if (buffer->string[range->start] == F_iki_syntax_placeholder_s) { ++range->start; continue; } - if (buffer->string[range->start] == f_iki_syntax_separator) { + if (buffer->string[range->start] == F_iki_syntax_separator_s) { if (range->start == found_vocabulary.start) { status = f_utf_buffer_increment(*buffer, range, 1); @@ -144,12 +144,12 @@ extern "C" { do { status = f_utf_buffer_increment(*buffer, range, 1); - } while (F_status_is_fine(status) && buffer->string[range->start] == f_iki_syntax_placeholder); + } while (F_status_is_fine(status) && buffer->string[range->start] == F_iki_syntax_placeholder_s); if (F_status_is_error(status)) break; // found a valid vocabulary name. - if (buffer->string[range->start] == f_iki_syntax_quote_single || buffer->string[range->start] == f_iki_syntax_quote_double) { + if (buffer->string[range->start] == F_iki_syntax_quote_single_s || buffer->string[range->start] == F_iki_syntax_quote_double_s) { quote = buffer->string[range->start]; ++range->start; @@ -162,7 +162,7 @@ extern "C" { break; } - else if (buffer->string[range->start] == f_iki_syntax_slash) { + else if (buffer->string[range->start] == F_iki_syntax_slash_s) { bool separator_found = F_false; vocabulary_slash_first = range->start; @@ -170,13 +170,13 @@ extern "C" { // the slash only needs to be delimited if it were to otherwise be a valid vocabulary name. while (range->start <= range->stop && range->start < buffer->used) { - if (buffer->string[range->start] == f_iki_syntax_placeholder) { + if (buffer->string[range->start] == F_iki_syntax_placeholder_s) { ++range->start; continue; } if (separator_found) { - if (buffer->string[range->start] == f_iki_syntax_quote_single || buffer->string[range->start] == f_iki_syntax_quote_double) { + if (buffer->string[range->start] == F_iki_syntax_quote_single_s || buffer->string[range->start] == F_iki_syntax_quote_double_s) { vocabulary_delimited = F_true; quote = buffer->string[range->start]; @@ -188,10 +188,10 @@ extern "C" { break; } } - else if (buffer->string[range->start] == f_iki_syntax_separator) { + else if (buffer->string[range->start] == F_iki_syntax_separator_s) { separator_found = F_true; } - else if (buffer->string[range->start] != f_iki_syntax_slash) { + else if (buffer->string[range->start] != F_iki_syntax_slash_s) { find_next = F_true; break; } @@ -255,7 +255,7 @@ extern "C" { } } - if (buffer->string[range->start] == f_iki_syntax_placeholder) { + if (buffer->string[range->start] == F_iki_syntax_placeholder_s) { ++range->start; continue; @@ -304,7 +304,7 @@ extern "C" { ++content->used; for (f_array_length_t i = 0; i < delimits.used; ++i) { - buffer->string[delimits.array[i]] = f_iki_syntax_placeholder; + buffer->string[delimits.array[i]] = F_iki_syntax_placeholder_s; } // for macro_f_array_lengths_t_delete_simple(delimits); @@ -323,13 +323,13 @@ extern "C" { return F_none; } } - else if (buffer->string[range->start] == f_iki_syntax_slash) { + else if (buffer->string[range->start] == F_iki_syntax_slash_s) { f_array_length_t content_slash_first = range->start; f_array_length_t content_slash_total = 0; while (range->start <= range->stop && range->start < buffer->used) { - if (buffer->string[range->start] == f_iki_syntax_placeholder) { + if (buffer->string[range->start] == F_iki_syntax_placeholder_s) { ++range->start; continue; @@ -345,7 +345,7 @@ extern "C" { } if (delimits.used + content_slash_delimits > delimits.size) { - if (delimits.used + content_slash_delimits > f_array_length_t_size) { + if (delimits.used + content_slash_delimits > F_array_length_t_size_d) { status = F_status_set_error(F_string_too_large); } else { @@ -360,7 +360,7 @@ extern "C" { while (i < content_slash_delimits) { - if (buffer->string[content_range.start] == f_iki_syntax_slash) { + if (buffer->string[content_range.start] == F_iki_syntax_slash_s) { delimits.array[delimits.used] = content_range.start; ++delimits.used; @@ -420,7 +420,7 @@ extern "C" { ++content->used; for (f_array_length_t i = 0; i < delimits.used; ++i) { - buffer->string[delimits.array[i]] = f_iki_syntax_placeholder; + buffer->string[delimits.array[i]] = F_iki_syntax_placeholder_s; } // for macro_f_array_lengths_t_delete_simple(delimits); @@ -442,7 +442,7 @@ extern "C" { break; } - else if (buffer->string[range->start] != f_iki_syntax_slash) { + else if (buffer->string[range->start] != F_iki_syntax_slash_s) { break; } @@ -480,7 +480,7 @@ extern "C" { } while (range->start <= range->stop && range->start < buffer->used); for (f_array_length_t i = 0; i < delimits.used; ++i) { - buffer->string[delimits.array[i]] = f_iki_syntax_placeholder; + buffer->string[delimits.array[i]] = F_iki_syntax_placeholder_s; } // for macro_f_array_lengths_t_delete_simple(delimits); diff --git a/level_0/f_iki/c/private-iki.c b/level_0/f_iki/c/private-iki.c index 294ec84..3395ab8 100644 --- a/level_0/f_iki/c/private-iki.c +++ b/level_0/f_iki/c/private-iki.c @@ -21,7 +21,7 @@ extern "C" { return F_false; } - else if (buffer.string[i] == f_iki_syntax_slash) { + else if (buffer.string[i] == F_iki_syntax_slash_s) { ++delimits; } else { diff --git a/level_0/f_iki/c/private-iki.h b/level_0/f_iki/c/private-iki.h index 8487955..5b476ee 100644 --- a/level_0/f_iki/c/private-iki.h +++ b/level_0/f_iki/c/private-iki.h @@ -38,7 +38,7 @@ extern "C" { * @see f_iki_content_partial_is() */ #if !defined(_di_f_iki_content_is_) || !defined(_di_f_iki_content_partial_is_) - extern f_status_t private_f_iki_content_partial_is(const f_string_static_t buffer, const f_string_range_t range, const uint8_t quote) f_attribute_visibility_internal; + extern f_status_t private_f_iki_content_partial_is(const f_string_static_t buffer, const f_string_range_t range, const uint8_t quote) F_attribute_visibility_internal_d; #endif // !defined(_di_f_iki_content_is_) || !defined(_di_f_iki_content_partial_is_) /** @@ -61,7 +61,7 @@ extern "C" { * @see f_iki_object_partial_is() */ #if !defined(_di_f_iki_object_is_) || !defined(_di_f_iki_object_partial_is_) - extern f_status_t private_f_iki_object_partial_is(const f_string_static_t buffer, const f_string_range_t range) f_attribute_visibility_internal; + extern f_status_t private_f_iki_object_partial_is(const f_string_static_t buffer, const f_string_range_t range) F_attribute_visibility_internal_d; #endif // !defined(_di_f_iki_object_is_) || !defined(_di_f_iki_object_partial_is_) #ifdef __cplusplus diff --git a/level_0/f_memory/c/memory-common.h b/level_0/f_memory/c/memory-common.h index a26767f..f0643e4 100644 --- a/level_0/f_memory/c/memory-common.h +++ b/level_0/f_memory/c/memory-common.h @@ -38,8 +38,8 @@ extern "C" { * Other projects may provide their own values. */ #ifndef _di_f_memory_default_allocation_step_ - #define f_memory_default_allocation_large 64 - #define f_memory_default_allocation_small 4 + #define F_memory_default_allocation_large_d 64 + #define F_memory_default_allocation_small_d 4 #endif // _di_f_memory_default_allocation_step_ /** @@ -377,8 +377,8 @@ extern "C" { * Provide a macro for calling other macros for incrementing a buffer. * * If the used + step is greater than size, then increase by step_default. - * If step_default exceeds f_array_length_t_size, then attempt to increment by step. - * If step exceeds f_array_length_t_size, set status to error_too_large. + * If step_default exceeds F_array_length_t_size_d, then attempt to increment by step. + * If step exceeds F_array_length_t_size_d, set status to error_too_large. * * Be sure to check size for error after calling this. * @@ -387,13 +387,13 @@ extern "C" { * step: The step to increase by, must be less than or equal to step_default. * step_default: The default step to increase by if memory allows. * macro_resize: The resize structure macro to call that excepts the exact arguments: (status, structure, length). - * error_too_large: The error status to return when f_array_length_t_size would be exceeded. + * error_too_large: The error status to return when F_array_length_t_size_d would be exceeded. */ #ifndef _di_macro_f_memory_structure_increment_ #define macro_f_memory_structure_increment(status, structure, step, step_default, macro_resize, error_too_large) \ if (structure.used + step > structure.size) { \ - if (structure.used + step_default > f_array_length_t_size) { \ - if (structure.used + step > f_array_length_t_size) { \ + if (structure.used + step_default > F_array_length_t_size_d) { \ + if (structure.used + step > F_array_length_t_size_d) { \ status = F_status_set_error(error_too_large); \ } \ else { \ diff --git a/level_0/f_memory/c/memory_structure.c b/level_0/f_memory/c/memory_structure.c index 7b8d938..9fc2414 100644 --- a/level_0/f_memory/c/memory_structure.c +++ b/level_0/f_memory/c/memory_structure.c @@ -65,12 +65,12 @@ extern "C" { if (*used + 1 > *size) { f_array_length_t length_new = *used + step; - if (length_new > f_array_length_t_size) { - if (*used + 1 > f_array_length_t_size) { + if (length_new > F_array_length_t_size_d) { + if (*used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - length_new = f_array_length_t_size; + length_new = F_array_length_t_size_d; } return private_f_memory_structure_resize(length_new, type_size, structure, used, size); @@ -90,7 +90,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (*used + amount > *size) { - if (*used + amount > f_array_length_t_size) { + if (*used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } diff --git a/level_0/f_memory/c/memory_structure.h b/level_0/f_memory/c/memory_structure.h index 5051c0e..fffbbc0 100644 --- a/level_0/f_memory/c/memory_structure.h +++ b/level_0/f_memory/c/memory_structure.h @@ -114,7 +114,7 @@ extern "C" { /** * Increase the size of the structure, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -149,7 +149,7 @@ extern "C" { * Resize the structure to a larger size. * * This will resize making the array larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount diff --git a/level_0/f_memory/c/private-memory.h b/level_0/f_memory/c/private-memory.h index 9108db8..9b9f96c 100644 --- a/level_0/f_memory/c/private-memory.h +++ b/level_0/f_memory/c/private-memory.h @@ -45,7 +45,7 @@ extern "C" { * @see f_memory_structure_decimate_by() */ #if !defined(_di_f_memory_structure_adjust_) || !defined(_di_f_memory_structure_decimate_by_) - extern f_status_t private_f_memory_adjust(const size_t length_old, const size_t length_new, const size_t type_size, void **pointer) f_attribute_visibility_internal; + extern f_status_t private_f_memory_adjust(const size_t length_old, const size_t length_new, const size_t type_size, void **pointer) F_attribute_visibility_internal_d; #endif // !defined(_di_f_memory_structure_adjust_) || !defined(_di_f_memory_structure_decimate_by_) /** @@ -82,7 +82,7 @@ extern "C" { * @see private_f_memory_structure_resize() */ #if !defined(_di_memory_structure_decrease_by_) || !defined(_di_memory_structure_increase_) || !defined(_di_memory_structure_increase_by_) || !defined(_di_f_memory_structure_resize_) - extern f_status_t private_f_memory_resize(const size_t length_old, const size_t length_new, const size_t type_size, void **pointer) f_attribute_visibility_internal; + extern f_status_t private_f_memory_resize(const size_t length_old, const size_t length_new, const size_t type_size, void **pointer) F_attribute_visibility_internal_d; #endif // !defined(_di_memory_structure_decrease_by_) || !defined(_di_memory_structure_increase_) || !defined(_di_memory_structure_increase_by_) || !defined(_di_f_memory_structure_resize_) /** @@ -113,7 +113,7 @@ extern "C" { * @see private_f_memory_adjust() */ #if !defined(_di_f_memory_structure_adjust_) || !defined(_di_f_memory_structure_decimate_by_) - f_status_t private_f_memory_structure_adjust(const size_t length_new, const size_t type_size, void **structure, f_array_length_t *used, f_array_length_t *size) f_attribute_visibility_internal; + f_status_t private_f_memory_structure_adjust(const size_t length_new, const size_t type_size, void **structure, f_array_length_t *used, f_array_length_t *size) F_attribute_visibility_internal_d; #endif // !defined(_di_f_memory_structure_adjust_) || !defined(_di_f_memory_structure_decimate_by_) /** @@ -146,7 +146,7 @@ extern "C" { * @see private_f_memory_resize() */ #if !defined(_di_memory_structure_decrease_by_) || !defined(_di_memory_structure_increase_) || !defined(_di_memory_structure_increase_by_) || !defined(_di_f_memory_structure_resize_) - f_status_t private_f_memory_structure_resize(const size_t length_new, const size_t type_size, void **structure, f_array_length_t *used, f_array_length_t *size) f_attribute_visibility_internal; + f_status_t private_f_memory_structure_resize(const size_t length_new, const size_t type_size, void **structure, f_array_length_t *used, f_array_length_t *size) F_attribute_visibility_internal_d; #endif // !defined(_di_memory_structure_decrease_by_) || !defined(_di_memory_structure_increase_) || !defined(_di_memory_structure_increase_by_) || !defined(_di_f_memory_structure_resize_) #ifdef __cplusplus diff --git a/level_0/f_path/c/path-common.c b/level_0/f_path/c/path-common.c index c111452..c40084d 100644 --- a/level_0/f_path/c/path-common.c +++ b/level_0/f_path/c/path-common.c @@ -6,82 +6,82 @@ extern "C" { #endif #ifndef _di_f_path_defines_ - const f_string_t f_path_separator_s = f_string_ascii_slash_forward; - const f_string_t f_path_separator_current_s = f_string_ascii_period; - const f_string_t f_path_separator_variable_s = f_string_ascii_colon; + const f_string_t f_path_separator_s = F_string_ascii_slash_forward_s; + const f_string_t f_path_separator_current_s = F_string_ascii_period_s; + const f_string_t f_path_separator_variable_s = F_string_ascii_colon_s; - const f_string_t f_path_extension_separator_s = f_string_ascii_period; + const f_string_t f_path_extension_separator_s = F_string_ascii_period_s; - const f_string_t f_path_environment_s = f_path_environment; - const f_string_t f_path_home_wildcard_s = f_string_ascii_tilde; - const f_string_t f_path_present_working_s = f_path_present_working; - const f_string_t f_path_present_working_old_s = f_path_present_working_old; + const f_string_t f_path_environment_s = F_path_environment_s; + const f_string_t f_path_home_wildcard_s = F_string_ascii_tilde_s; + const f_string_t f_path_present_working_s = F_path_present_working_s; + const f_string_t f_path_present_working_old_s = F_path_present_working_old_s; #endif // _di_f_path_defines_ #ifdef _di_path_tree_s_ // KFS Root Level - extern const f_string_t f_path_tree_devices_s = f_path_tree_devices; - extern const f_string_t f_path_tree_external_s = f_path_tree_external; - extern const f_string_t f_path_tree_libraries_s = f_path_tree_libraries; - extern const f_string_t f_path_tree_programs_s = f_path_tree_programs; - extern const f_string_t f_path_tree_temporary_s = f_path_tree_temporary; - extern const f_string_t f_path_tree_home_s = f_path_tree_home; - extern const f_string_t f_path_tree_run_s = f_path_tree_run; - extern const f_string_t f_path_tree_binary_s = f_path_tree_binary; + extern const f_string_t f_path_tree_devices_s = F_path_tree_devices_s; + extern const f_string_t f_path_tree_external_s = F_path_tree_external_s; + extern const f_string_t f_path_tree_libraries_s = F_path_tree_libraries_s; + extern const f_string_t f_path_tree_programs_s = F_path_tree_programs_s; + extern const f_string_t f_path_tree_temporary_s = F_path_tree_temporary_s; + extern const f_string_t f_path_tree_home_s = F_path_tree_home_s; + extern const f_string_t f_path_tree_run_s = F_path_tree_run_s; + extern const f_string_t f_path_tree_binary_s = F_path_tree_binary_s; // FHS Root Level - extern const f_string_t f_path_tree_boot_s = f_path_tree_boot; - extern const f_string_t f_path_tree_hardware_s = f_path_tree_hardware; - extern const f_string_t f_path_tree_processes_s = f_path_tree_processes; - extern const f_string_t f_path_tree_system_s = f_path_tree_system; + extern const f_string_t f_path_tree_boot_s = F_path_tree_boot_s; + extern const f_string_t f_path_tree_hardware_s = F_path_tree_hardware_s; + extern const f_string_t f_path_tree_processes_s = F_path_tree_processes_s; + extern const f_string_t f_path_tree_system_s = F_path_tree_system_s; // Program Level - extern const f_string_t f_path_tree_programs_public_s = f_path_tree_programs_public; - extern const f_string_t f_path_tree_programs_system_s = f_path_tree_programs_system; - extern const f_string_t f_path_tree_programs_remote_s = f_path_tree_programs_remote; - extern const f_string_t f_path_tree_programs_services_s = f_path_tree_programs_services; - extern const f_string_t f_path_tree_programs_toolchain_s = f_path_tree_programs_toolchain; - extern const f_string_t f_path_tree_programs_users_s = f_path_tree_programs_users; - extern const f_string_t f_path_tree_programs_susers_s = f_path_tree_programs_susers; - extern const f_string_t f_path_tree_programs_boot_s = f_path_tree_programs_boot; - extern const f_string_t f_path_tree_programs_sboot_s = f_path_tree_programs_sboot; + extern const f_string_t f_path_tree_programs_public_s = F_path_tree_programs_public_s; + extern const f_string_t f_path_tree_programs_system_s = F_path_tree_programs_system_s; + extern const f_string_t f_path_tree_programs_remote_s = F_path_tree_programs_remote_s; + extern const f_string_t f_path_tree_programs_services_s = F_path_tree_programs_services_s; + extern const f_string_t f_path_tree_programs_toolchain_s = F_path_tree_programs_toolchain_s; + extern const f_string_t f_path_tree_programs_users_s = F_path_tree_programs_users_s; + extern const f_string_t f_path_tree_programs_susers_s = F_path_tree_programs_susers_s; + extern const f_string_t f_path_tree_programs_boot_s = F_path_tree_programs_boot_s; + extern const f_string_t f_path_tree_programs_sboot_s = F_path_tree_programs_sboot_s; // Library Level - extern const f_string_t f_path_tree_libraries_public_s = f_path_tree_libraries_public; - extern const f_string_t f_path_tree_libraries_system_s = f_path_tree_libraries_system; - extern const f_string_t f_path_tree_libraries_remote_s = f_path_tree_libraries_remote; - extern const f_string_t f_path_tree_libraries_services_s = f_path_tree_libraries_services; - extern const f_string_t f_path_tree_libraries_toolchain_s = f_path_tree_libraries_toolchain; - extern const f_string_t f_path_tree_libraries_users_s = f_path_tree_libraries_users; - extern const f_string_t f_path_tree_libraries_boot_s = f_path_tree_libraries_boot; + extern const f_string_t f_path_tree_libraries_public_s = F_path_tree_libraries_public_s; + extern const f_string_t f_path_tree_libraries_system_s = F_path_tree_libraries_system_s; + extern const f_string_t f_path_tree_libraries_remote_s = F_path_tree_libraries_remote_s; + extern const f_string_t f_path_tree_libraries_services_s = F_path_tree_libraries_services_s; + extern const f_string_t f_path_tree_libraries_toolchain_s = F_path_tree_libraries_toolchain_s; + extern const f_string_t f_path_tree_libraries_users_s = F_path_tree_libraries_users_s; + extern const f_string_t f_path_tree_libraries_boot_s = F_path_tree_libraries_boot_s; // Home Level - extern const f_string_t f_path_tree_home_services_s = f_path_tree_home_services; - extern const f_string_t f_path_tree_home_share_s = f_path_tree_home_share; - extern const f_string_t f_path_tree_home_users_s = f_path_tree_home_users; - extern const f_string_t f_path_tree_home_websites_s = f_path_tree_home_websites; + extern const f_string_t f_path_tree_home_services_s = F_path_tree_home_services_s; + extern const f_string_t f_path_tree_home_share_s = F_path_tree_home_share_s; + extern const f_string_t f_path_tree_home_users_s = F_path_tree_home_users_s; + extern const f_string_t f_path_tree_home_websites_s = F_path_tree_home_websites_s; // System Level - extern const f_string_t f_path_tree_system_logs_s = f_path_tree_system_logs; - extern const f_string_t f_path_tree_system_settings_s = f_path_tree_system_settings; - extern const f_string_t f_path_tree_system_data_s = f_path_tree_system_data; - extern const f_string_t f_path_tree_system_variables_s = f_path_tree_system_variables; + extern const f_string_t f_path_tree_system_logs_s = F_path_tree_system_logs_s; + extern const f_string_t f_path_tree_system_settings_s = F_path_tree_system_settings_s; + extern const f_string_t f_path_tree_system_data_s = F_path_tree_system_data_s; + extern const f_string_t f_path_tree_system_variables_s = F_path_tree_system_variables_s; // Temporary Level - extern const f_string_t f_path_tree_temporary_public_s = f_path_tree_temporary_public; - extern const f_string_t f_path_tree_temporary_services_s = f_path_tree_temporary_services; - extern const f_string_t f_path_tree_temporary_users_s = f_path_tree_temporary_users; - extern const f_string_t f_path_tree_temporary_variables_s = f_path_tree_temporary_variables; + extern const f_string_t f_path_tree_temporary_public_s = F_path_tree_temporary_public_s; + extern const f_string_t f_path_tree_temporary_services_s = F_path_tree_temporary_services_s; + extern const f_string_t f_path_tree_temporary_users_s = F_path_tree_temporary_users_s; + extern const f_string_t f_path_tree_temporary_variables_s = F_path_tree_temporary_variables_s; // Private User Directories - extern const f_string_t f_path_user_downloads_s = f_path_user_downloads; - extern const f_string_t f_path_user_desktop_s = f_path_user_desktop; - extern const f_string_t f_path_user_private_s = f_path_user_private; - extern const f_string_t f_path_user_settings_s = f_path_user_settings; - extern const f_string_t f_path_user_data_s = f_path_user_data; - extern const f_string_t f_path_user_temporary_s = f_path_user_temporary; - extern const f_string_t f_path_user_shared_s = f_path_user_shared; + extern const f_string_t f_path_user_downloads_s = F_path_user_downloads_s; + extern const f_string_t f_path_user_desktop_s = F_path_user_desktop_s; + extern const f_string_t f_path_user_private_s = F_path_user_private_s; + extern const f_string_t f_path_user_settings_s = F_path_user_settings_s; + extern const f_string_t f_path_user_data_s = F_path_user_data_s; + extern const f_string_t f_path_user_temporary_s = F_path_user_temporary_s; + extern const f_string_t f_path_user_shared_s = F_path_user_shared_s; #endif // _di_path_tree_s_ #ifdef __cplusplus diff --git a/level_0/f_path/c/path-common.h b/level_0/f_path/c/path-common.h index ab6686d..be097b8 100644 --- a/level_0/f_path/c/path-common.h +++ b/level_0/f_path/c/path-common.h @@ -32,29 +32,29 @@ extern "C" { * The path extension separator is for the separator that separates the main part of a file path with its extension (which is generally a '.'). */ #ifndef _di_f_path_defines_ - #define f_path_separator f_string_ascii_slash_forward - #define f_path_separator_current f_string_ascii_period - #define f_path_separator_variable f_string_ascii_colon + #define F_path_separator_s F_string_ascii_slash_forward_s + #define F_path_separator_current_s F_string_ascii_period_s + #define F_path_separator_variable_s F_string_ascii_colon_s - #define f_path_separator_length 1 - #define f_path_separator_current_length 1 - #define f_path_separator_variable_length 1 + #define F_path_separator_s_length 1 + #define F_path_separator_current_s_length 1 + #define F_path_separator_variable_s_length 1 - #define f_path_extension_separator f_string_ascii_period + #define F_path_extension_separator_s F_string_ascii_period_s - #define f_path_extension_separator_length 1 + #define F_path_extension_separator_s_length 1 - #define f_path_environment "PATH" - #define f_path_home_wildcard f_string_ascii_tilde - #define f_path_present_working "PWD" - #define f_path_present_working_old "OLDPWD" + #define F_path_environment_s "PATH" + #define F_path_home_wildcard_s F_string_ascii_tilde_s + #define F_path_present_working_s "PWD" + #define F_path_present_working_old_s "OLDPWD" - #define f_path_environment_length 4 - #define f_path_home_wildcard_length 1 - #define f_path_present_working_length 3 - #define f_path_present_working_old_length 6 + #define F_path_environment_s_length 4 + #define F_path_home_wildcard_s_length 1 + #define F_path_present_working_s_length 3 + #define F_path_present_working_old_s_length 6 - #define f_path_length_max PATH_MAX + #define F_path_length_max_d PATH_MAX extern const f_string_t f_path_separator_s; extern const f_string_t f_path_separator_current_s; @@ -78,67 +78,67 @@ extern "C" { #define _di_path_tree_hierarchy_standard_ // KFS Root Level - #define f_path_tree_devices f_path_separator "devices" - #define f_path_tree_external f_path_separator "external" - #define f_path_tree_libraries f_path_separator "libraries" - #define f_path_tree_programs f_path_separator "programs" - #define f_path_tree_temporary f_path_separator "temporary" - #define f_path_tree_home f_path_separator "home" - #define f_path_tree_run f_path_separator "run" - #define f_path_tree_binary f_path_separator ".system" + #define F_path_tree_devices_s F_path_separator_s "devices" + #define F_path_tree_external_s F_path_separator_s "external" + #define F_path_tree_libraries_s F_path_separator_s "libraries" + #define F_path_tree_programs_s F_path_separator_s "programs" + #define F_path_tree_temporary_s F_path_separator_s "temporary" + #define F_path_tree_home_s F_path_separator_s "home" + #define F_path_tree_run_s F_path_separator_s "run" + #define F_path_tree_binary_s F_path_separator_s ".system" // Kernel Level - #define f_path_tree_boot f_path_devices f_path_separator "boot" - #define f_path_tree_hardware f_path_devices f_path_separator "devices" - #define f_path_tree_processes f_path_devices f_path_separator "processes" - #define f_path_tree_system f_path_devices f_path_separator "system" + #define F_path_tree_boot_s f_path_devices F_path_separator_s "boot" + #define F_path_tree_hardware_s f_path_devices F_path_separator_s "devices" + #define F_path_tree_processes_s f_path_devices F_path_separator_s "processes" + #define F_path_tree_system_s f_path_devices F_path_separator_s "system" // Program Level - #define f_path_tree_programs_public f_path_programs f_path_separator "public" - #define f_path_tree_programs_system f_path_programs f_path_separator "system" - #define f_path_tree_programs_remote f_path_programs f_path_separator "remote" - #define f_path_tree_programs_services f_path_programs f_path_separator "targets" - #define f_path_tree_programs_toolchain f_path_programs f_path_separator "toolchain" - #define f_path_tree_programs_users f_path_programs f_path_separator "users" - #define f_path_tree_programs_susers f_path_programs f_path_separator "users" - #define f_path_tree_programs_boot f_path_boot f_path_separator "programs" - #define f_path_tree_programs_sboot f_path_boot f_path_separator "programs" + #define F_path_tree_programs_public_s f_path_programs F_path_separator_s "public" + #define F_path_tree_programs_system_s f_path_programs F_path_separator_s "system" + #define F_path_tree_programs_remote_s f_path_programs F_path_separator_s "remote" + #define F_path_tree_programs_services_s f_path_programs F_path_separator_s "targets" + #define F_path_tree_programs_toolchain_s f_path_programs F_path_separator_s "toolchain" + #define F_path_tree_programs_users_s f_path_programs F_path_separator_s "users" + #define F_path_tree_programs_susers_s f_path_programs F_path_separator_s "users" + #define F_path_tree_programs_boot_s f_path_boot F_path_separator_s "programs" + #define F_path_tree_programs_sboot_s f_path_boot F_path_separator_s "programs" // Library Level - #define f_path_tree_libraries_public f_path_libraries f_path_separator "public" - #define f_path_tree_libraries_system f_path_libraries f_path_separator "system" - #define f_path_tree_libraries_remote f_path_libraries f_path_separator "remote" - #define f_path_tree_libraries_services f_path_libraries f_path_separator "targets" - #define f_path_tree_libraries_toolchain f_path_libraries f_path_separator "toolchain" - #define f_path_tree_libraries_users f_path_libraries f_path_separator "users" - #define f_path_tree_libraries_boot f_path_boot f_path_separator "libraries" + #define F_path_tree_libraries_public_s f_path_libraries F_path_separator_s "public" + #define F_path_tree_libraries_system_s f_path_libraries F_path_separator_s "system" + #define F_path_tree_libraries_remote_s f_path_libraries F_path_separator_s "remote" + #define F_path_tree_libraries_services_s f_path_libraries F_path_separator_s "targets" + #define F_path_tree_libraries_toolchain_s f_path_libraries F_path_separator_s "toolchain" + #define F_path_tree_libraries_users_s f_path_libraries F_path_separator_s "users" + #define F_path_tree_libraries_boot_s f_path_boot F_path_separator_s "libraries" // Home Level - #define f_path_tree_home_services f_path_home f_path_separator "services" - #define f_path_tree_home_share f_path_home f_path_separator "share" - #define f_path_tree_home_users f_path_home f_path_separator "users" - #define f_path_tree_home_websites f_path_home f_path_separator "websites" + #define F_path_tree_home_services_s f_path_home F_path_separator_s "services" + #define F_path_tree_home_share_s f_path_home F_path_separator_s "share" + #define F_path_tree_home_users_s f_path_home F_path_separator_s "users" + #define F_path_tree_home_websites_s f_path_home F_path_separator_s "websites" // System Level - #define f_path_tree_system_logs f_path_system f_path_separator "logs" - #define f_path_tree_system_settings f_path_system f_path_separator "settings" - #define f_path_tree_system_data f_path_system f_path_separator "data" - #define f_path_tree_system_variables f_path_system f_path_separator "variables" // for backwards FHS support only, use of this directory is considered bad practice for KFS, use f_path_temporary_variables instead + #define F_path_tree_system_logs_s f_path_system F_path_separator_s "logs" + #define F_path_tree_system_settings_s f_path_system F_path_separator_s "settings" + #define F_path_tree_system_data_s f_path_system F_path_separator_s "data" + #define F_path_tree_system_variables_s f_path_system F_path_separator_s "variables" // for backwards FHS support only, use of this directory is considered bad practice for KFS, use f_path_temporary_variables instead // Temporary Level - #define f_path_tree_temporary_public f_path_temporary f_path_separator "public" - #define f_path_tree_temporary_services f_path_temporary f_path_separator "services" - #define f_path_tree_temporary_users f_path_temporary f_path_separator "users" - #define f_path_tree_temporary_variables f_path_temporary f_path_separator "variables" + #define F_path_tree_temporary_public_s f_path_temporary F_path_separator_s "public" + #define F_path_tree_temporary_services_s f_path_temporary F_path_separator_s "services" + #define F_path_tree_temporary_users_s f_path_temporary F_path_separator_s "users" + #define F_path_tree_temporary_variables_s f_path_temporary F_path_separator_s "variables" // Private User Directories - #define f_path_tree_user_downloads "downloads" - #define f_path_tree_user_desktop "desktop" - #define f_path_tree_user_private "private" - #define f_path_tree_user_settings "settings" - #define f_path_tree_user_data "data" - #define f_path_tree_user_temporary "temporary" - #define f_path_tree_user_shared "shared" + #define F_path_tree_user_downloads_s "downloads" + #define F_path_tree_user_desktop_s "desktop" + #define F_path_tree_user_private_s "private" + #define F_path_tree_user_settings_s "settings" + #define F_path_tree_user_data_s "data" + #define F_path_tree_user_temporary_s "temporary" + #define F_path_tree_user_shared_s "shared" #endif // _di_path_tree_kevux_standard_ /** @@ -151,133 +151,133 @@ extern "C" { #define _di_path_tree_kevux_standard_ // KFS Root Level - #define f_path_tree_devices f_path_separator - #define f_path_tree_external f_path_separator "mnt" - #define f_path_tree_libraries f_path_separator - #define f_path_tree_programs f_path_separator - #define f_path_tree_temporary f_path_separator - #define f_path_tree_home f_path_separator "home" - #define f_path_tree_run f_path_separator "run" - #define f_path_tree_binary f_path_separator ".system" + #define F_path_tree_devices_s F_path_separator_s + #define F_path_tree_external_s F_path_separator_s "mnt" + #define F_path_tree_libraries_s F_path_separator_s + #define F_path_tree_programs_s F_path_separator_s + #define F_path_tree_temporary_s F_path_separator_s + #define F_path_tree_home_s F_path_separator_s "home" + #define F_path_tree_run_s F_path_separator_s "run" + #define F_path_tree_binary_s F_path_separator_s ".system" // FHS Root Level - #define f_path_tree_boot f_path_separator "boot" - #define f_path_tree_hardware f_path_separator "dev" - #define f_path_tree_processes f_path_separator "proc" - #define f_path_tree_system f_path_separator "sysfs" + #define F_path_tree_boot_s F_path_separator_s "boot" + #define F_path_tree_hardware_s F_path_separator_s "dev" + #define F_path_tree_processes_s F_path_separator_s "proc" + #define F_path_tree_system_s F_path_separator_s "sysfs" // Program Level - #define f_path_tree_programs_public f_path_separator "usr" f_path_separator "bin" - #define f_path_tree_programs_system f_path_separator "usr" f_path_separator "sbin" - #define f_path_tree_programs_remote f_path_separator "usr" f_path_separator "bin" - #define f_path_tree_programs_services f_path_separator "usr" f_path_separator "sbin" - #define f_path_tree_programs_toolchain f_path_separator "usr" f_path_separator "bin" - #define f_path_tree_programs_users f_path_separator "usr" f_path_separator "local" f_path_separator "bin" - #define f_path_tree_programs_susers f_path_separator "usr" f_path_separator "local" f_path_separator "sbin" - #define f_path_tree_programs_boot f_path_separator "bin" - #define f_path_tree_programs_sboot f_path_separator "sbin" + #define F_path_tree_programs_public_s F_path_separator_s "usr" F_path_separator_s "bin" + #define F_path_tree_programs_system_s F_path_separator_s "usr" F_path_separator_s "sbin" + #define F_path_tree_programs_remote_s F_path_separator_s "usr" F_path_separator_s "bin" + #define F_path_tree_programs_services_s F_path_separator_s "usr" F_path_separator_s "sbin" + #define F_path_tree_programs_toolchain_s F_path_separator_s "usr" F_path_separator_s "bin" + #define F_path_tree_programs_users_s F_path_separator_s "usr" F_path_separator_s "local" F_path_separator_s "bin" + #define F_path_tree_programs_susers_s F_path_separator_s "usr" F_path_separator_s "local" F_path_separator_s "sbin" + #define F_path_tree_programs_boot_s F_path_separator_s "bin" + #define F_path_tree_programs_sboot_s F_path_separator_s "sbin" // Library Level - #define f_path_tree_libraries_public f_path_separator "usr" f_path_separator "lib" - #define f_path_tree_libraries_system f_path_separator "usr" f_path_separator "lib" - #define f_path_tree_libraries_remote f_path_separator "usr" f_path_separator "lib" - #define f_path_tree_libraries_services f_path_separator "usr" f_path_separator "lib" - #define f_path_tree_libraries_toolchain f_path_separator "usr" f_path_separator "lib" - #define f_path_tree_libraries_users f_path_separator "usr" f_path_separator "local" f_path_separator "lib" - #define f_path_tree_libraries_boot f_path_separator "lib" + #define F_path_tree_libraries_public_s F_path_separator_s "usr" F_path_separator_s "lib" + #define F_path_tree_libraries_system_s F_path_separator_s "usr" F_path_separator_s "lib" + #define F_path_tree_libraries_remote_s F_path_separator_s "usr" F_path_separator_s "lib" + #define F_path_tree_libraries_services_s F_path_separator_s "usr" F_path_separator_s "lib" + #define F_path_tree_libraries_toolchain_s F_path_separator_s "usr" F_path_separator_s "lib" + #define F_path_tree_libraries_users_s F_path_separator_s "usr" F_path_separator_s "local" F_path_separator_s "lib" + #define F_path_tree_libraries_boot_s F_path_separator_s "lib" // Home Level - #define f_path_tree_home_services f_path_separator "srv" - #define f_path_tree_home_share f_path_separator "" - #define f_path_tree_home_users f_path_home - #define f_path_tree_home_websites f_path_separator "srv" f_path_separator "www" + #define F_path_tree_home_services_s F_path_separator_s "srv" + #define F_path_tree_home_share_s F_path_separator_s "" + #define F_path_tree_home_users_s f_path_home + #define F_path_tree_home_websites_s F_path_separator_s "srv" F_path_separator_s "www" // System Level - #define f_path_tree_system_logs f_path_separator "var" f_path_separator "log" - #define f_path_tree_system_settings f_path_separator "etc" - #define f_path_tree_system_data f_path_separator "usr" f_path_separator "share" - #define f_path_tree_system_variables f_path_separator "var" + #define F_path_tree_system_logs_s F_path_separator_s "var" F_path_separator_s "log" + #define F_path_tree_system_settings_s F_path_separator_s "etc" + #define F_path_tree_system_data_s F_path_separator_s "usr" F_path_separator_s "share" + #define F_path_tree_system_variables_s F_path_separator_s "var" // Temporary Level - #define f_path_tree_temporary_public f_path_separator "tmp" - #define f_path_tree_temporary_services f_path_separator "tmp" - #define f_path_tree_temporary_users f_path_separator "tmp" - #define f_path_tree_temporary_variables f_path_separator "var" f_path_separator "tmp" + #define F_path_tree_temporary_public_s F_path_separator_s "tmp" + #define F_path_tree_temporary_services_s F_path_separator_s "tmp" + #define F_path_tree_temporary_users_s F_path_separator_s "tmp" + #define F_path_tree_temporary_variables_s F_path_separator_s "var" F_path_separator_s "tmp" // Private User Directories - #define f_path_tree_user_downloads "downloads" - #define f_path_tree_user_desktop "desktop" - #define f_path_tree_user_private "" - #define f_path_tree_user_settings "" - #define f_path_tree_user_data "" - #define f_path_tree_user_temporary "" - #define f_path_tree_user_shared "" + #define F_path_tree_user_downloads_s "downloads" + #define F_path_tree_user_desktop_s "desktop" + #define F_path_tree_user_private_s "" + #define F_path_tree_user_settings_s "" + #define F_path_tree_user_data_s "" + #define F_path_tree_user_temporary_s "" + #define F_path_tree_user_shared_s "" #endif // _di_path_tree_hierarchy_standard_ #ifdef _di_path_tree_s_ // KFS Root Level - extern const f_string_t f_path_tree_devices; - extern const f_string_t f_path_tree_external; - extern const f_string_t f_path_tree_libraries; - extern const f_string_t f_path_tree_programs; - extern const f_string_t f_path_tree_temporary; - extern const f_string_t f_path_tree_home; - extern const f_string_t f_path_tree_run; - extern const f_string_t f_path_tree_binary; + extern const f_string_t f_path_tree_devices_s; + extern const f_string_t f_path_tree_external_s; + extern const f_string_t f_path_tree_libraries_s; + extern const f_string_t f_path_tree_programs_s; + extern const f_string_t f_path_tree_temporary_s; + extern const f_string_t f_path_tree_home_s; + extern const f_string_t f_path_tree_run_s; + extern const f_string_t f_path_tree_binary_s; // FHS Root Level - extern const f_string_t f_path_tree_boot; - extern const f_string_t f_path_tree_hardware; - extern const f_string_t f_path_tree_processes; - extern const f_string_t f_path_tree_system; + extern const f_string_t f_path_tree_boot_s; + extern const f_string_t f_path_tree_hardware_s; + extern const f_string_t f_path_tree_processes_s; + extern const f_string_t f_path_tree_system_s; // Program Level - extern const f_string_t f_path_tree_programs_public; - extern const f_string_t f_path_tree_programs_system; - extern const f_string_t f_path_tree_programs_remote; - extern const f_string_t f_path_tree_programs_services; - extern const f_string_t f_path_tree_programs_toolchain; - extern const f_string_t f_path_tree_programs_users; - extern const f_string_t f_path_tree_programs_susers; - extern const f_string_t f_path_tree_programs_boot; - extern const f_string_t f_path_tree_programs_sboot; + extern const f_string_t f_path_tree_programs_public_s; + extern const f_string_t f_path_tree_programs_system_s; + extern const f_string_t f_path_tree_programs_remote_s; + extern const f_string_t f_path_tree_programs_services_s; + extern const f_string_t f_path_tree_programs_toolchain_s; + extern const f_string_t f_path_tree_programs_users_s; + extern const f_string_t f_path_tree_programs_susers_s; + extern const f_string_t f_path_tree_programs_boot_s; + extern const f_string_t f_path_tree_programs_sboot_s; // Library Level - extern const f_string_t f_path_tree_libraries_public; - extern const f_string_t f_path_tree_libraries_system; - extern const f_string_t f_path_tree_libraries_remote; - extern const f_string_t f_path_tree_libraries_services; - extern const f_string_t f_path_tree_libraries_toolchain; - extern const f_string_t f_path_tree_libraries_users; - extern const f_string_t f_path_tree_libraries_boot; + extern const f_string_t f_path_tree_libraries_public_s; + extern const f_string_t f_path_tree_libraries_system_s; + extern const f_string_t f_path_tree_libraries_remote_s; + extern const f_string_t f_path_tree_libraries_services_s; + extern const f_string_t f_path_tree_libraries_toolchain_s; + extern const f_string_t f_path_tree_libraries_users_s; + extern const f_string_t f_path_tree_libraries_boot_s; // Home Level - extern const f_string_t f_path_tree_home_services; - extern const f_string_t f_path_tree_home_share; - extern const f_string_t f_path_tree_home_users; - extern const f_string_t f_path_tree_home_websites; - - // System Level - extern const f_string_t f_path_tree_system_logs; - extern const f_string_t f_path_tree_system_settings; - extern const f_string_t f_path_tree_system_data; - extern const f_string_t f_path_tree_system_variables; - - // Temporary Level - extern const f_string_t f_path_tree_temporary_public; - extern const f_string_t f_path_tree_temporary_services; - extern const f_string_t f_path_tree_temporary_users; - extern const f_string_t f_path_tree_temporary_variables; - - // Private User Directories - extern const f_string_t f_path_user_downloads; - extern const f_string_t f_path_user_desktop; - extern const f_string_t f_path_user_private; - extern const f_string_t f_path_user_settings; - extern const f_string_t f_path_user_data; - extern const f_string_t f_path_user_temporary; - extern const f_string_t f_path_user_shared; + extern const f_string_t f_path_tree_home_services_s; + extern const f_string_t f_path_tree_home_share_s; + extern const f_string_t f_path_tree_home_users_s; + extern const f_string_t f_path_tree_home_websites_s; + + // system level + extern const f_string_t f_path_tree_system_logs_s; + extern const f_string_t f_path_tree_system_settings_s; + extern const f_string_t f_path_tree_system_data_s; + extern const f_string_t f_path_tree_system_variables_s; + + // temporary level + extern const f_string_t f_path_tree_temporary_public_s; + extern const f_string_t f_path_tree_temporary_services_s; + extern const f_string_t f_path_tree_temporary_users_s; + extern const f_string_t f_path_tree_temporary_variables_s; + + // private user directories + extern const f_string_t f_path_user_downloads_s; + extern const f_string_t f_path_user_desktop_s; + extern const f_string_t f_path_user_private_s; + extern const f_string_t f_path_user_settings_s; + extern const f_string_t f_path_user_data_s; + extern const f_string_t f_path_user_temporary_s; + extern const f_string_t f_path_user_shared_s; #endif // _di_path_tree_s_ #ifdef __cplusplus diff --git a/level_0/f_path/c/path.c b/level_0/f_path/c/path.c index 721a05b..a3d6486 100644 --- a/level_0/f_path/c/path.c +++ b/level_0/f_path/c/path.c @@ -55,9 +55,9 @@ extern "C" { if (!path) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - char buffer[f_path_length_max]; + char buffer[F_path_length_max_d]; - if (!getcwd(buffer, f_path_length_max)) { + if (!getcwd(buffer, F_path_length_max_d)) { if (errno == EACCES) return F_status_set_error(F_access_denied); if (errno == EFAULT) return F_status_set_error(F_buffer); if (errno == EINVAL) return F_status_set_error(F_parameter); @@ -73,7 +73,7 @@ extern "C" { return private_f_path_real(buffer, path); } - const f_array_length_t length = strnlen(buffer, f_path_length_max); + const f_array_length_t length = strnlen(buffer, F_path_length_max_d); if (length + 1 > path->size) { f_status_t status = F_none; diff --git a/level_0/f_path/c/path.h b/level_0/f_path/c/path.h index 6dad33f..6925a73 100644 --- a/level_0/f_path/c/path.h +++ b/level_0/f_path/c/path.h @@ -94,7 +94,7 @@ extern "C" { * Otherwise, this gets the path as it appears to be. * @param path * The (allocated) file path. - * This will have a max size of f_path_length_max + 1. + * This will have a max size of F_path_length_max_d + 1. * This will be NULL terminated at real->used + 1. * * @return @@ -143,14 +143,14 @@ extern "C" { * This does check to see if the path exists or not (path must exist). * This processes all relative parts. * This processes all symbolic links. - * This has a max size of f_path_length_max + 1. + * This has a max size of F_path_length_max_d + 1. * * @param path * The source path to determine what the real path is. * This is a NULL terminated string. * @param real * The (allocated) real file path. - * This will have a max size of f_path_length_max + 1. + * This will have a max size of F_path_length_max_d + 1. * This will be NULL terminated at real->used + 1. * * @return diff --git a/level_0/f_path/c/private-path.c b/level_0/f_path/c/private-path.c index 1a9d46a..a59b247 100644 --- a/level_0/f_path/c/private-path.c +++ b/level_0/f_path/c/private-path.c @@ -8,7 +8,7 @@ extern "C" { #if !defined(_di_f_path_current_) || !defined(_di_f_path_real_) f_status_t private_f_path_real(const f_string_t path, f_string_dynamic_t *real) { - char buffer[f_path_length_max]; + char buffer[F_path_length_max_d]; if (!realpath(path, buffer)) { if (errno == EACCES) return F_status_set_error(F_access_denied); @@ -23,7 +23,7 @@ extern "C" { return F_status_set_error(F_failure); } - const f_array_length_t length = strnlen(buffer, f_path_length_max); + const f_array_length_t length = strnlen(buffer, F_path_length_max_d); if (length + 1 > real->size) { f_status_t status = F_none; diff --git a/level_0/f_path/c/private-path.h b/level_0/f_path/c/private-path.h index 069031b..935685e 100644 --- a/level_0/f_path/c/private-path.h +++ b/level_0/f_path/c/private-path.h @@ -24,7 +24,7 @@ extern "C" { * The source path to determine what the real path is. * @param real * The (allocated) real file path. - * This will have a max size of f_path_length_max + 1. + * This will have a max size of F_path_length_max_d + 1. * This will be NULL terminated at real->used + 1. * * @return @@ -42,7 +42,7 @@ extern "C" { * @see f_path_real() */ #if !defined(_di_f_path_current_) || !defined(_di_f_path_real_) - extern f_status_t private_f_path_real(const f_string_t path, f_string_dynamic_t *real) f_attribute_visibility_internal; + extern f_status_t private_f_path_real(const f_string_t path, f_string_dynamic_t *real) F_attribute_visibility_internal_d; #endif // !defined(_di_f_path_current_) || !defined(_di_f_path_real_) #ifdef __cplusplus diff --git a/level_0/f_pipe/c/pipe.c b/level_0/f_pipe/c/pipe.c index adf26f6..6ffc14d 100644 --- a/level_0/f_pipe/c/pipe.c +++ b/level_0/f_pipe/c/pipe.c @@ -8,7 +8,7 @@ extern "C" { f_status_t f_pipe_input_exists() { struct stat st_info; - if (fstat(f_type_descriptor_input, &st_info) != 0) { + if (fstat(F_type_descriptor_input_d, &st_info) != 0) { return F_status_set_error(F_file_stat); } @@ -24,7 +24,7 @@ extern "C" { f_status_t f_pipe_warning_exists() { struct stat st_info; - if (fstat(f_type_descriptor_warning, &st_info) != 0) { + if (fstat(F_type_descriptor_warning_d, &st_info) != 0) { return F_status_set_error(F_file_stat); } @@ -40,7 +40,7 @@ extern "C" { f_status_t f_pipe_error_exists() { struct stat st_info; - if (fstat(f_type_descriptor_error, &st_info) != 0) { + if (fstat(F_type_descriptor_error_d, &st_info) != 0) { return F_status_set_error(F_file_stat); } @@ -56,7 +56,7 @@ extern "C" { f_status_t f_pipe_debug_exists() { struct stat st_info; - if (fstat(f_type_descriptor_debug, &st_info) != 0) { + if (fstat(F_type_descriptor_debug_d, &st_info) != 0) { return F_status_set_error(F_file_stat); } diff --git a/level_0/f_print/c/print-common.c b/level_0/f_print/c/print-common.c index 9df9f1f..61a7024 100644 --- a/level_0/f_print/c/print-common.c +++ b/level_0/f_print/c/print-common.c @@ -6,76 +6,76 @@ extern "C" { #endif #ifndef _di_f_print_sequences_ - const f_string_t f_print_sequence_acknowledge_s = f_print_sequence_acknowledge; - const f_string_t f_print_sequence_acknowledge_negative_s = f_print_sequence_acknowledge_negative; - const f_string_t f_print_sequence_backspace_s = f_print_sequence_backspace; - const f_string_t f_print_sequence_bell_s = f_print_sequence_bell; - const f_string_t f_print_sequence_cancel_s = f_print_sequence_cancel; - const f_string_t f_print_sequence_carriage_return_s = f_print_sequence_carriage_return; - const f_string_t f_print_sequence_data_link_escape_s = f_print_sequence_data_link_escape; - const f_string_t f_print_sequence_delete_s = f_print_sequence_delete; - const f_string_t f_print_sequence_device_control_1_s = f_print_sequence_device_control_1; - const f_string_t f_print_sequence_device_control_2_s = f_print_sequence_device_control_2; - const f_string_t f_print_sequence_device_control_3_s = f_print_sequence_device_control_3; - const f_string_t f_print_sequence_device_control_4_s = f_print_sequence_device_control_4; - const f_string_t f_print_sequence_end_of_medium_s = f_print_sequence_end_of_medium; - const f_string_t f_print_sequence_end_of_text_s = f_print_sequence_end_of_text; - const f_string_t f_print_sequence_end_of_transmission_s = f_print_sequence_end_of_transmission; - const f_string_t f_print_sequence_end_of_transmission_block_s = f_print_sequence_end_of_transmission_block; - const f_string_t f_print_sequence_enquiry_s = f_print_sequence_enquiry; - const f_string_t f_print_sequence_escape_s = f_print_sequence_escape; - const f_string_t f_print_sequence_form_feed_s = f_print_sequence_form_feed; - const f_string_t f_print_sequence_line_feed_s = f_print_sequence_line_feed; - const f_string_t f_print_sequence_null_s = f_print_sequence_null; - const f_string_t f_print_sequence_separator_file_s = f_print_sequence_separator_file; - const f_string_t f_print_sequence_separator_group_s = f_print_sequence_separator_group; - const f_string_t f_print_sequence_separator_record_s = f_print_sequence_separator_record; - const f_string_t f_print_sequence_separator_unit_s = f_print_sequence_separator_unit; - const f_string_t f_print_sequence_shift_in_s = f_print_sequence_shift_in; - const f_string_t f_print_sequence_shift_out_s = f_print_sequence_shift_out; - const f_string_t f_print_sequence_start_of_header_s = f_print_sequence_start_of_header; - const f_string_t f_print_sequence_start_of_text_s = f_print_sequence_start_of_text; - const f_string_t f_print_sequence_substitute_s = f_print_sequence_substitute; - const f_string_t f_print_sequence_synchronous_idle_s = f_print_sequence_synchronous_idle; - const f_string_t f_print_sequence_tab_s = f_print_sequence_tab; - const f_string_t f_print_sequence_tab_vertical_s = f_print_sequence_tab_vertical; - const f_string_t f_print_sequence_unknown_s = f_print_sequence_unknown; + const f_string_t f_print_sequence_acknowledge_s = F_print_sequence_acknowledge_s; + const f_string_t f_print_sequence_acknowledge_negative_s = F_print_sequence_acknowledge_negative_s; + const f_string_t f_print_sequence_backspace_s = F_print_sequence_backspace_s; + const f_string_t f_print_sequence_bell_s = F_print_sequence_bell_s; + const f_string_t f_print_sequence_cancel_s = F_print_sequence_cancel_s; + const f_string_t f_print_sequence_carriage_return_s = F_print_sequence_carriage_return_s; + const f_string_t f_print_sequence_data_link_escape_s = F_print_sequence_data_link_escape_s; + const f_string_t f_print_sequence_delete_s = F_print_sequence_delete_s; + const f_string_t f_print_sequence_device_control_1_s = F_print_sequence_device_control_1_s; + const f_string_t f_print_sequence_device_control_2_s = F_print_sequence_device_control_2_s; + const f_string_t f_print_sequence_device_control_3_s = F_print_sequence_device_control_3_s; + const f_string_t f_print_sequence_device_control_4_s = F_print_sequence_device_control_4_s; + const f_string_t f_print_sequence_end_of_medium_s = F_print_sequence_end_of_medium_s; + const f_string_t f_print_sequence_end_of_text_s = F_print_sequence_end_of_text_s; + const f_string_t f_print_sequence_end_of_transmission_s = F_print_sequence_end_of_transmission_s; + const f_string_t f_print_sequence_end_of_transmission_block_s = F_print_sequence_end_of_transmission_block_s; + const f_string_t f_print_sequence_enquiry_s = F_print_sequence_enquiry_s; + const f_string_t f_print_sequence_escape_s = F_print_sequence_escape_s; + const f_string_t f_print_sequence_form_feed_s = F_print_sequence_form_feed_s; + const f_string_t f_print_sequence_line_feed_s = F_print_sequence_line_feed_s; + const f_string_t f_print_sequence_null_s = F_print_sequence_null_s; + const f_string_t f_print_sequence_separator_file_s = F_print_sequence_separator_file_s; + const f_string_t f_print_sequence_separator_group_s = F_print_sequence_separator_group_s; + const f_string_t f_print_sequence_separator_record_s = F_print_sequence_separator_record_s; + const f_string_t f_print_sequence_separator_unit_s = F_print_sequence_separator_unit_s; + const f_string_t f_print_sequence_shift_in_s = F_print_sequence_shift_in_s; + const f_string_t f_print_sequence_shift_out_s = F_print_sequence_shift_out_s; + const f_string_t f_print_sequence_start_of_header_s = F_print_sequence_start_of_header_s; + const f_string_t f_print_sequence_start_of_text_s = F_print_sequence_start_of_text_s; + const f_string_t f_print_sequence_substitute_s = F_print_sequence_substitute_s; + const f_string_t f_print_sequence_synchronous_idle_s = F_print_sequence_synchronous_idle_s; + const f_string_t f_print_sequence_tab_s = F_print_sequence_tab_s; + const f_string_t f_print_sequence_tab_vertical_s = F_print_sequence_tab_vertical_s; + const f_string_t f_print_sequence_unknown_s = F_print_sequence_unknown_s; #endif // _di_f_print_sequences_ #ifndef _di_f_print_sequences_set_control_ const char f_print_sequence_set_control_s[32][3] = { - f_print_sequence_null, - f_print_sequence_start_of_header, - f_print_sequence_start_of_text, - f_print_sequence_end_of_text, - f_print_sequence_end_of_transmission, - f_print_sequence_enquiry, - f_print_sequence_acknowledge, - f_print_sequence_bell, - f_print_sequence_backspace, - f_print_sequence_tab, - f_print_sequence_line_feed, - f_print_sequence_tab_vertical, - f_print_sequence_form_feed, - f_print_sequence_carriage_return, - f_print_sequence_shift_out, - f_print_sequence_shift_in, - f_print_sequence_data_link_escape, - f_print_sequence_device_control_1, - f_print_sequence_device_control_2, - f_print_sequence_device_control_3, - f_print_sequence_device_control_4, - f_print_sequence_acknowledge_negative, - f_print_sequence_synchronous_idle, - f_print_sequence_end_of_transmission_block, - f_print_sequence_cancel, - f_print_sequence_end_of_medium, - f_print_sequence_substitute, - f_print_sequence_escape, - f_print_sequence_separator_file, - f_print_sequence_separator_group, - f_print_sequence_separator_record, - f_print_sequence_separator_unit, + F_print_sequence_null_s, + F_print_sequence_start_of_header_s, + F_print_sequence_start_of_text_s, + F_print_sequence_end_of_text_s, + F_print_sequence_end_of_transmission_s, + F_print_sequence_enquiry_s, + F_print_sequence_acknowledge_s, + F_print_sequence_bell_s, + F_print_sequence_backspace_s, + F_print_sequence_tab_s, + F_print_sequence_line_feed_s, + F_print_sequence_tab_vertical_s, + F_print_sequence_form_feed_s, + F_print_sequence_carriage_return_s, + F_print_sequence_shift_out_s, + F_print_sequence_shift_in_s, + F_print_sequence_data_link_escape_s, + F_print_sequence_device_control_1_s, + F_print_sequence_device_control_2_s, + F_print_sequence_device_control_3_s, + F_print_sequence_device_control_4_s, + F_print_sequence_acknowledge_negative_s, + F_print_sequence_synchronous_idle_s, + F_print_sequence_end_of_transmission_block_s, + F_print_sequence_cancel_s, + F_print_sequence_end_of_medium_s, + F_print_sequence_substitute_s, + F_print_sequence_escape_s, + F_print_sequence_separator_file_s, + F_print_sequence_separator_group_s, + F_print_sequence_separator_record_s, + F_print_sequence_separator_unit_s, }; #endif // _di_f_print_sequences_set_control_ diff --git a/level_0/f_print/c/print-common.h b/level_0/f_print/c/print-common.h index 0573d7b..4a28424 100644 --- a/level_0/f_print/c/print-common.h +++ b/level_0/f_print/c/print-common.h @@ -22,7 +22,7 @@ extern "C" { * This is documented in the man write(2) pages under Linux to being 0x7ffff000 regardless of 32-bit or 64-bit. */ #ifndef _di_f_print_write_max_ - #define f_print_write_max 0x7ffff000 + #define F_print_write_max_d 0x7ffff000 #endif // _di_f_print_write_max_ /** @@ -36,40 +36,40 @@ extern "C" { * The code currently expects these to be 3-bytes wide so changing this to any other width will require changing code that utilizes these. */ #ifndef _di_f_print_sequences_ - #define f_print_sequence_acknowledge "␆" - #define f_print_sequence_acknowledge_negative "␕" - #define f_print_sequence_backspace "␈" - #define f_print_sequence_bell "␇" - #define f_print_sequence_cancel "␘" - #define f_print_sequence_carriage_return "␍" - #define f_print_sequence_data_link_escape "␐" - #define f_print_sequence_delete "␡" - #define f_print_sequence_device_control_1 "␑" - #define f_print_sequence_device_control_2 "␒" - #define f_print_sequence_device_control_3 "␓" - #define f_print_sequence_device_control_4 "␔" - #define f_print_sequence_end_of_medium "␙" - #define f_print_sequence_end_of_text "␃" - #define f_print_sequence_end_of_transmission "␄" - #define f_print_sequence_end_of_transmission_block "␗" - #define f_print_sequence_enquiry "␅" - #define f_print_sequence_escape "␛" - #define f_print_sequence_form_feed "␌" - #define f_print_sequence_line_feed "␊" - #define f_print_sequence_null "␀" - #define f_print_sequence_separator_file "␜" - #define f_print_sequence_separator_group "␝" - #define f_print_sequence_separator_record "␞" - #define f_print_sequence_separator_unit "␟" - #define f_print_sequence_shift_in "␏" - #define f_print_sequence_shift_out "␎" - #define f_print_sequence_start_of_header "␁" - #define f_print_sequence_start_of_text "␂" - #define f_print_sequence_substitute "␚" - #define f_print_sequence_synchronous_idle "␖" - #define f_print_sequence_tab "␉" - #define f_print_sequence_tab_vertical "␋" - #define f_print_sequence_unknown "�" + #define F_print_sequence_acknowledge_s "␆" + #define F_print_sequence_acknowledge_negative_s "␕" + #define F_print_sequence_backspace_s "␈" + #define F_print_sequence_bell_s "␇" + #define F_print_sequence_cancel_s "␘" + #define F_print_sequence_carriage_return_s "␍" + #define F_print_sequence_data_link_escape_s "␐" + #define F_print_sequence_delete_s "␡" + #define F_print_sequence_device_control_1_s "␑" + #define F_print_sequence_device_control_2_s "␒" + #define F_print_sequence_device_control_3_s "␓" + #define F_print_sequence_device_control_4_s "␔" + #define F_print_sequence_end_of_medium_s "␙" + #define F_print_sequence_end_of_text_s "␃" + #define F_print_sequence_end_of_transmission_s "␄" + #define F_print_sequence_end_of_transmission_block_s "␗" + #define F_print_sequence_enquiry_s "␅" + #define F_print_sequence_escape_s "␛" + #define F_print_sequence_form_feed_s "␌" + #define F_print_sequence_line_feed_s "␊" + #define F_print_sequence_null_s "␀" + #define F_print_sequence_separator_file_s "␜" + #define F_print_sequence_separator_group_s "␝" + #define F_print_sequence_separator_record_s "␞" + #define F_print_sequence_separator_unit_s "␟" + #define F_print_sequence_shift_in_s "␏" + #define F_print_sequence_shift_out_s "␎" + #define F_print_sequence_start_of_header_s "␁" + #define F_print_sequence_start_of_text_s "␂" + #define F_print_sequence_substitute_s "␚" + #define F_print_sequence_synchronous_idle_s "␖" + #define F_print_sequence_tab_s "␉" + #define F_print_sequence_tab_vertical_s "␋" + #define F_print_sequence_unknown_s "�" extern const f_string_t f_print_sequence_acknowledge_s; extern const f_string_t f_print_sequence_acknowledge_negative_s; @@ -137,18 +137,18 @@ extern "C" { * @see fprintf() */ #ifndef _di_f_print_format_flag_ - #define f_print_format_flag_align_left 0x1 - #define f_print_format_flag_convert 0x2 - #define f_print_format_flag_ignore_index 0x4 - #define f_print_format_flag_ignore_range 0x8 - #define f_print_format_flag_precision 0x10 - #define f_print_format_flag_range 0x20 - #define f_print_format_flag_sign_always 0x40 - #define f_print_format_flag_sign_pad 0x80 - #define f_print_format_flag_trim 0x100 - #define f_print_format_flag_uppercase 0x200 - #define f_print_format_flag_width 0x400 - #define f_print_format_flag_zeros_leading 0x800 + #define F_print_format_flag_align_left_d 0x1 + #define F_print_format_flag_convert_d 0x2 + #define F_print_format_flag_ignore_index_d 0x4 + #define F_print_format_flag_ignore_range_d 0x8 + #define F_print_format_flag_precision_d 0x10 + #define F_print_format_flag_range_d 0x20 + #define F_print_format_flag_sign_always_d 0x40 + #define F_print_format_flag_sign_pad_d 0x80 + #define F_print_format_flag_trim_d 0x100 + #define F_print_format_flag_uppercase_d 0x200 + #define F_print_format_flag_width_d 0x400 + #define F_print_format_flag_zeros_leading_d 0x800 #endif // _di_f_print_format_flags_ /** diff --git a/level_0/f_print/c/print.c b/level_0/f_print/c/print.c index 3c69e35..de7f9fe 100644 --- a/level_0/f_print/c/print.c +++ b/level_0/f_print/c/print.c @@ -531,7 +531,7 @@ extern "C" { status = f_utf_is_control(string + i, 1); } - if (status == F_false && total + width < f_print_write_max) { + if (status == F_false && total + width < F_print_write_max_d) { total += width; i += width; @@ -539,7 +539,7 @@ extern "C" { } } else { - if ((string[i] > 0x1f && string[i] != 0x7f) && total < f_print_write_max) { + if ((string[i] > 0x1f && string[i] != 0x7f) && total < F_print_write_max_d) { ++total; ++i; diff --git a/level_0/f_print/c/private-print.c b/level_0/f_print/c/private-print.c index a636b3b..ab4abbb 100644 --- a/level_0/f_print/c/private-print.c +++ b/level_0/f_print/c/private-print.c @@ -201,7 +201,7 @@ extern "C" { if (width) { status = f_utf_is_control(string + i, i + width > length ? length - i : width); - if (status == F_false && total + width < f_print_write_max) { + if (status == F_false && total + width < F_print_write_max_d) { total += width; i += width; @@ -209,7 +209,7 @@ extern "C" { } } else { - if ((string[i] > 0x1f && string[i] != 0x7f) && total < f_print_write_max) { + if ((string[i] > 0x1f && string[i] != 0x7f) && total < F_print_write_max_d) { ++total; ++i; @@ -675,7 +675,7 @@ extern "C" { while (i < length) { - if (string[i] && total < f_print_write_max) { + if (string[i] && total < F_print_write_max_d) { ++total; ++i; @@ -733,7 +733,7 @@ extern "C" { while (i < length) { - if (total < f_print_write_max) { + if (total < F_print_write_max_d) { ++total; ++i; @@ -792,7 +792,7 @@ extern "C" { s = private_f_print_character_safely_get(string[i]); if (s) { - if (total < f_print_write_max) { + if (total < F_print_write_max_d) { ++total; ++i; @@ -800,7 +800,7 @@ extern "C" { } } else { - if (total + macro_f_utf_byte_width(string[i]) < f_print_write_max) { + if (total + macro_f_utf_byte_width(string[i]) < F_print_write_max_d) { total += macro_f_utf_byte_width(string[i]); i += macro_f_utf_byte_width(string[i]); @@ -919,7 +919,7 @@ extern "C" { } // while if (j >= except.used || except.array[j] != i) { - if (string[i] && total < f_print_write_max) { + if (string[i] && total < F_print_write_max_d) { ++total; ++i; @@ -984,7 +984,7 @@ extern "C" { } // while if (j >= except.used || except.array[j] != i) { - if (total < f_print_write_max) { + if (total < F_print_write_max_d) { ++total; ++i; @@ -1058,7 +1058,7 @@ extern "C" { s = private_f_print_character_safely_get(string[i]); - if (!s && total < f_print_write_max) { + if (!s && total < F_print_write_max_d) { ++total; ++i; diff --git a/level_0/f_print/c/private-print.h b/level_0/f_print/c/private-print.h index db92113..0d9b516 100644 --- a/level_0/f_print/c/private-print.h +++ b/level_0/f_print/c/private-print.h @@ -46,7 +46,7 @@ extern "C" { * @see f_print_dynamic_partial() */ #if !defined(_di_f_print_) || !defined(_di_f_print_dynamic_) || !defined(_di_f_print_dynamic_partial_) - extern f_status_t private_f_print(const f_string_t string, const f_array_length_t length, FILE *output) f_attribute_visibility_internal; + extern f_status_t private_f_print(const f_string_t string, const f_array_length_t length, FILE *output) F_attribute_visibility_internal_d; #endif // !defined(_di_f_print_) || !defined(_di_f_print_dynamic_) || !defined(_di_f_print_dynamic_partial_) /** @@ -86,7 +86,7 @@ extern "C" { * @see f_print_except_in_dynamic_partial_safely() */ #if !defined(_di_f_print_character_safely_) || !defined(_di_f_print_safely_) || !defined(_di_f_print_safely_dynamic_) || !defined(_di_f_print_safely_dynamic_partial_) || !defined(_di_f_print_safely_terminated_) || !defined(_di_f_print_except_safely_) || !defined(_di_f_print_except_dynamic_safely_) || !defined(_di_f_print_except_dynamic_partial_safely_) || !defined(_di_f_print_except_in_safely_) || !defined(_di_f_print_except_in_dynamic_safely_) || !defined(_di_f_print_except_in_dynamic_partial_safely_) - extern f_status_t private_f_print_character_safely(const char character, FILE *output) f_attribute_visibility_internal; + extern f_status_t private_f_print_character_safely(const char character, FILE *output) F_attribute_visibility_internal_d; #endif // !defined(_di_f_print_character_safely_) || !defined(_di_f_print_safely_) || !defined(_di_f_print_safely_dynamic_) || !defined(_di_f_print_safely_dynamic_partial_) || !defined(_di_f_print_safely_terminated_) || !defined(_di_f_print_except_safely_) || !defined(_di_f_print_except_dynamic_safely_) || !defined(_di_f_print_except_dynamic_partial_safely_) || !defined(_di_f_print_except_in_safely_) || !defined(_di_f_print_except_in_dynamic_safely_) || !defined(_di_f_print_except_in_dynamic_partial_safely_) /** @@ -112,7 +112,7 @@ extern "C" { * @see f_print_to_safely() */ #if !defined(_di_f_print_character_safely_get_) || !defined(_di_f_print_dynamic_to_safely_) || !defined(_di_f_print_dynamic_partial_to_safely_) || !defined(_di_f_print_to_except_dynamic_safely_) || !defined(_di_f_print_to_except_dynamic_partial_safely_) || !defined(_di_f_print_to_except_safely_) || !defined(_di_f_print_to_safely_) - extern f_string_t private_f_print_character_safely_get(const char character) f_attribute_visibility_internal; + extern f_string_t private_f_print_character_safely_get(const char character) F_attribute_visibility_internal_d; #endif // !defined(_di_f_print_character_safely_get_) || !defined(_di_f_print_dynamic_to_safely_) || !defined(_di_f_print_dynamic_partial_to_safely_) || !defined(_di_f_print_to_except_dynamic_safely_) || !defined(_di_f_print_to_except_dynamic_partial_safely_) || !defined(_di_f_print_to_except_safely_) || !defined(_di_f_print_to_safely_) /** * Private implementation of f_print_raw(). @@ -146,7 +146,7 @@ extern "C" { * @see f_print_raw_dynamic_partial() */ #if !defined(_di_f_print_raw_) || !defined(_di_f_print_raw_dynamic_) || !defined(_di_f_print_raw_dynamic_partial_) - extern f_status_t private_f_print_raw(const f_string_t string, const f_array_length_t length, FILE *output) f_attribute_visibility_internal; + extern f_status_t private_f_print_raw(const f_string_t string, const f_array_length_t length, FILE *output) F_attribute_visibility_internal_d; #endif // !defined(_di_f_print_raw_) || !defined(_di_f_print_raw_dynamic_) || !defined(_di_f_print_raw_dynamic_partial_) /** @@ -182,7 +182,7 @@ extern "C" { * @see f_utf_is_valid() */ #if !defined(_di_f_print_safely_) || !defined(_di_f_print_safely_dynamic_) || !defined(_di_f_print_safely_dynamic_partial_) - extern f_status_t private_f_print_safely(const f_string_t string, const f_array_length_t length, FILE *output) f_attribute_visibility_internal; + extern f_status_t private_f_print_safely(const f_string_t string, const f_array_length_t length, FILE *output) F_attribute_visibility_internal_d; #endif // !defined(_di_f_print_safely_) || !defined(_di_f_print_safely_dynamic_) || !defined(_di_f_print_safely_dynamic_partial_) /** @@ -222,7 +222,7 @@ extern "C" { * @see f_print_except_dynamic_partial() */ #if !defined(_di_f_print_except_) || !defined(_di_f_print_except_dynamic_) || !defined(_di_f_print_except_dynamic_partial_) - extern f_status_t private_f_print_except(const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except, FILE *output) f_attribute_visibility_internal; + extern f_status_t private_f_print_except(const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except, FILE *output) F_attribute_visibility_internal_d; #endif // !defined(_di_f_print_except_) || !defined(_di_f_print_except_dynamic_) || !defined(_di_f_print_except_dynamic_partial_) /** @@ -262,7 +262,7 @@ extern "C" { * @see f_print_except_dynamic_partial_raw() */ #if !defined(_di_f_print_except_raw_) || !defined(_di_f_print_except_dynamic_raw_) || !defined(_di_f_print_except_dynamic_partial_raw_) - extern f_status_t private_f_print_except_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except, FILE *output) f_attribute_visibility_internal; + extern f_status_t private_f_print_except_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except, FILE *output) F_attribute_visibility_internal_d; #endif // !defined(_di_f_print_except_raw_) || !defined(_di_f_print_except_dynamic_raw_) || !defined(_di_f_print_except_dynamic_partial_raw_) /** @@ -303,7 +303,7 @@ extern "C" { * @see f_utf_is_valid() */ #if !defined(_di_f_print_except_safely_) || !defined(_di_f_print_except_dynamic_safely_) || !defined(_di_f_print_except_dynamic_partial_safely_) - extern f_status_t private_f_print_except_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except, FILE *output) f_attribute_visibility_internal; + extern f_status_t private_f_print_except_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except, FILE *output) F_attribute_visibility_internal_d; #endif // !defined(_di_f_print_except_safely_) || !defined(_di_f_print_except_dynamic_safely_) || !defined(_di_f_print_except_dynamic_partial_safely_) /** @@ -346,7 +346,7 @@ extern "C" { * @see f_print_except_in_dynamic_partial() */ #if !defined(_di_f_print_except_in_) || !defined(_di_f_print_except_dynamic_in_) || !defined(_di_f_print_except_in_dynamic_partial_) - extern f_status_t private_f_print_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except_at, f_string_ranges_t except_in, FILE *output) f_attribute_visibility_internal; + extern f_status_t private_f_print_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except_at, f_string_ranges_t except_in, FILE *output) F_attribute_visibility_internal_d; #endif // !defined(_di_f_print_except_in_) || !defined(_di_f_print_except_dynamic_in_) || !defined(_di_f_print_except_in_dynamic_partial_) /** @@ -389,7 +389,7 @@ extern "C" { * @see f_print_except_in_dynamic_partial_raw() */ #if !defined(_di_f_print_except_in_raw_) || !defined(_di_f_print_except_dynamic_in_raw_) || !defined(_di_f_print_except_in_dynamic_partial_raw_) - extern f_status_t private_f_print_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except_at, f_string_ranges_t except_in, FILE *output) f_attribute_visibility_internal; + extern f_status_t private_f_print_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except_at, f_string_ranges_t except_in, FILE *output) F_attribute_visibility_internal_d; #endif // !defined(_di_f_print_except_in_raw_) || !defined(_di_f_print_except_dynamic_in_raw_) || !defined(_di_f_print_except_in_dynamic_partial_raw_) /** @@ -433,7 +433,7 @@ extern "C" { * @see f_utf_is_valid() */ #if !defined(_di_f_print_except_in_safely_) || !defined(_di_f_print_except_dynamic_in_safely_) || !defined(_di_f_print_except_in_dynamic_partial_safely_) - extern f_status_t private_f_print_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except_at, f_string_ranges_t except_in, FILE *output) f_attribute_visibility_internal; + extern f_status_t private_f_print_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except_at, f_string_ranges_t except_in, FILE *output) F_attribute_visibility_internal_d; #endif // !defined(_di_f_print_except_in_safely_) || !defined(_di_f_print_except_dynamic_in_safely_) || !defined(_di_f_print_except_in_dynamic_partial_safely_) /** @@ -464,7 +464,7 @@ extern "C" { * @see f_print_raw_terminated() */ #if !defined(_di_f_print_terminated_) || !defined(_di_f_print_raw_terminated_) - extern f_status_t private_f_print_terminated(const f_string_t string, FILE *output) f_attribute_visibility_internal; + extern f_status_t private_f_print_terminated(const f_string_t string, FILE *output) F_attribute_visibility_internal_d; #endif // !defined(_di_f_print_terminated_) || !defined(_di_f_print_raw_terminated_) /** @@ -497,7 +497,7 @@ extern "C" { * @see f_print_to_dynamic_partial() */ #if !defined(_di_f_print_to_) || !defined(_di_f_print_to_dynamic_) || !defined(_di_f_print_to_dynamic_partial_) - extern f_status_t private_f_print_to(const f_string_t string, const f_array_length_t length, const int id) f_attribute_visibility_internal; + extern f_status_t private_f_print_to(const f_string_t string, const f_array_length_t length, const int id) F_attribute_visibility_internal_d; #endif // !defined(_di_f_print_to_) || !defined(_di_f_print_to_dynamic_) || !defined(_di_f_print_to_dynamic_partial_) /** @@ -530,7 +530,7 @@ extern "C" { * @see f_print_to_dynamic_partial_raw() */ #if !defined(_di_f_print_to_raw_) || !defined(_di_f_print_to_dynamic_raw_) || !defined(_di_f_print_to_dynamic_partial_raw_) - extern f_status_t private_f_print_to_raw(const f_string_t string, const f_array_length_t length, const int id) f_attribute_visibility_internal; + extern f_status_t private_f_print_to_raw(const f_string_t string, const f_array_length_t length, const int id) F_attribute_visibility_internal_d; #endif // !defined(_di_f_print_to_raw_) || !defined(_di_f_print_to_dynamic_raw_) || !defined(_di_f_print_to_dynamic_partial_raw_) /** @@ -564,7 +564,7 @@ extern "C" { * @see f_utf_is_valid() */ #if !defined(_di_f_print_to_safely_) || !defined(_di_f_print_to_dynamic_safely_) || !defined(_di_f_print_to_dynamic_partial_safely_) - extern f_status_t private_f_print_to_safely(const f_string_t string, const f_array_length_t length, const int id) f_attribute_visibility_internal; + extern f_status_t private_f_print_to_safely(const f_string_t string, const f_array_length_t length, const int id) F_attribute_visibility_internal_d; #endif // !defined(_di_f_print_to_safely_) || !defined(_di_f_print_to_dynamic_safely_) || !defined(_di_f_print_to_dynamic_partial_safely_) /** @@ -602,7 +602,7 @@ extern "C" { * @see f_print_to_except_dynamic_partial() */ #if !defined(_di_f_print_to_except_) || !defined(_di_f_print_to_except_dynamic_) || !defined(_di_f_print_to_except_dynamic_partial_) - extern f_status_t private_f_print_to_except(const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except, const int id) f_attribute_visibility_internal; + extern f_status_t private_f_print_to_except(const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except, const int id) F_attribute_visibility_internal_d; #endif // !defined(_di_f_print_to_except_) || !defined(_di_f_print_to_except_dynamic_) || !defined(_di_f_print_to_except_dynamic_partial_) /** @@ -640,7 +640,7 @@ extern "C" { * @see f_print_to_except_dynamic_partial_raw() */ #if !defined(_di_f_print_to_except_raw_) || !defined(_di_f_print_to_except_dynamic_raw_) || !defined(_di_f_print_to_except_dynamic_partial_raw_) - extern f_status_t private_f_print_to_except_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except, const int id) f_attribute_visibility_internal; + extern f_status_t private_f_print_to_except_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except, const int id) F_attribute_visibility_internal_d; #endif // !defined(_di_f_print_to_except_raw_) || !defined(_di_f_print_to_except_dynamic_raw_) || !defined(_di_f_print_to_except_dynamic_partial_raw_) /** @@ -679,7 +679,7 @@ extern "C" { * @see f_utf_is_valid() */ #if !defined(_di_f_print_to_except_safely_) || !defined(_di_f_print_to_except_dynamic_safely_) || !defined(_di_f_print_to_except_dynamic_partial_safely_) - extern f_status_t private_f_print_to_except_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except, const int id) f_attribute_visibility_internal; + extern f_status_t private_f_print_to_except_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except, const int id) F_attribute_visibility_internal_d; #endif // !defined(_di_f_print_to_except_safely_) || !defined(_di_f_print_to_except_dynamic_safely_) || !defined(_di_f_print_to_except_dynamic_partial_safely_) #ifdef __cplusplus diff --git a/level_0/f_serialize/c/private-serialize.h b/level_0/f_serialize/c/private-serialize.h index c22c706..01eaa49 100644 --- a/level_0/f_serialize/c/private-serialize.h +++ b/level_0/f_serialize/c/private-serialize.h @@ -36,7 +36,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #if !defined(_di_f_serialize_un_simple_find_) || !defined(_di_f_serialize_un_simple_get_) - extern f_status_t private_f_serialize_un_simple_find(const f_string_static_t serialize, const f_array_length_t index, f_string_range_t *location) f_attribute_visibility_internal; + extern f_status_t private_f_serialize_un_simple_find(const f_string_static_t serialize, const f_array_length_t index, f_string_range_t *location) F_attribute_visibility_internal_d; #endif // !defined(_di_f_serialize_un_simple_find_) || !defined(_di_f_serialize_un_simple_get_) #ifdef __cplusplus diff --git a/level_0/f_serialize/c/serialize-common.c b/level_0/f_serialize/c/serialize-common.c index d839f69..60759fc 100644 --- a/level_0/f_serialize/c/serialize-common.c +++ b/level_0/f_serialize/c/serialize-common.c @@ -6,9 +6,9 @@ extern "C" { #endif #ifndef _di_f_serialize_splitter_s_ - const f_string_t f_serialize_simple_splitter_s = f_serialize_simple_splitter; - const f_string_t f_serialize_delimited_splitter_s = f_serialize_delimited_splitter; - const f_string_t f_serialize_delimited_delimiter_s = f_serialize_delimited_delimiter; + const f_string_t f_serialize_simple_splitter_s = F_serialize_simple_splitter_s; + const f_string_t f_serialize_delimited_splitter_s = F_serialize_delimited_splitter_s; + const f_string_t f_serialize_delimited_delimiter_s = F_serialize_delimited_delimiter_s; #endif // _di_f_serialize_splitter_s_ #ifdef __cplusplus diff --git a/level_0/f_serialize/c/serialize-common.h b/level_0/f_serialize/c/serialize-common.h index f66d223..aa17bb5 100644 --- a/level_0/f_serialize/c/serialize-common.h +++ b/level_0/f_serialize/c/serialize-common.h @@ -17,9 +17,9 @@ extern "C" { #endif #ifndef _di_f_serialize_splitter_s_ - #define f_serialize_simple_splitter ":" - #define f_serialize_delimited_splitter "'" - #define f_serialize_delimited_delimiter "\\" + #define F_serialize_simple_splitter_s ":" + #define F_serialize_delimited_splitter_s "'" + #define F_serialize_delimited_delimiter_s "\\" extern const f_string_t f_serialize_simple_splitter_s; extern const f_string_t f_serialize_delimited_splitter_s; diff --git a/level_0/f_serialize/c/serialize.c b/level_0/f_serialize/c/serialize.c index a1db7e6..b194202 100644 --- a/level_0/f_serialize/c/serialize.c +++ b/level_0/f_serialize/c/serialize.c @@ -51,7 +51,7 @@ extern "C" { width = macro_f_utf_byte_width(serialize.string[i]); if (serialize.string[i] == f_serialize_simple_splitter_s[0] || i + 1 >= serialize.used) { - macro_f_memory_structure_increment(status, (*strings), 1, f_memory_default_allocation_small, macro_f_string_dynamics_t_resize, F_array_too_large); + macro_f_memory_structure_increment(status, (*strings), 1, F_memory_default_allocation_small_d, macro_f_string_dynamics_t_resize, F_array_too_large); if (F_status_is_error(status)) return status; if (start == i) { @@ -120,7 +120,7 @@ extern "C" { width = macro_f_utf_byte_width(serialize.string[i]); if (serialize.string[i] == f_serialize_simple_splitter_s[0] || i + 1 >= serialize.used) { - macro_f_memory_structure_increment(status, (*locations), 1, f_memory_default_allocation_small, macro_f_string_ranges_t_resize, F_array_too_large); + macro_f_memory_structure_increment(status, (*locations), 1, F_memory_default_allocation_small_d, macro_f_string_ranges_t_resize, F_array_too_large); if (F_status_is_error(status)) return status; if (start == i) { diff --git a/level_0/f_string/c/private-string.c b/level_0/f_string/c/private-string.c index 63cb1b0..ad179e2 100644 --- a/level_0/f_string/c/private-string.c +++ b/level_0/f_string/c/private-string.c @@ -23,7 +23,7 @@ extern "C" { #if !defined(_di_f_string_append_assure_nulless_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_assure_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_assure_nulless_) || !defined(_di_f_string_dynamic_partial_append_nulless_) || !defined(_di_f_string_dynamic_partial_mash_nulless_) || !defined(_di_f_string_mash_nulless_) f_status_t private_f_string_append_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { - if (destination->used + length > f_string_t_size) { + if (destination->used + length > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -93,7 +93,7 @@ extern "C" { f_status_t private_f_string_dynamic_increase_by(const f_array_length_t amount, f_string_dynamic_t *dynamic) { if (dynamic->used + amount > dynamic->size) { - if (dynamic->used + amount > f_string_t_size) { + if (dynamic->used + amount > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -124,7 +124,7 @@ extern "C" { #if !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_) f_status_t private_f_string_dynamics_adjust(const f_array_length_t length, f_string_dynamics_t *dynamics) { - if (dynamics->used + length > f_array_length_t_size) { + if (dynamics->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -176,7 +176,7 @@ extern "C" { #if !defined(_di_f_string_dynamics_decrease_by_) || !defined(_di_f_string_dynamics_increase_) || !defined(_di_f_string_dynamics_increase_by_) f_status_t private_f_string_dynamics_resize(const f_array_length_t length, f_string_dynamics_t *dynamics) { - if (dynamics->used + length > f_array_length_t_size) { + if (dynamics->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -205,7 +205,7 @@ extern "C" { #if !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_decimate_by_) f_status_t private_f_string_map_multis_adjust(const f_array_length_t length, f_string_map_multis_t *map_multis) { - if (map_multis->used + length > f_array_length_t_size) { + if (map_multis->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -237,7 +237,7 @@ extern "C" { #if !defined(_di_f_string_map_multis_decrease_by_) || !defined(_di_f_string_map_multis_increase_) || !defined(_di_f_string_map_multis_increase_by_) || !defined(_di_f_string_map_multis_terminate_) || !defined(_di_f_string_map_multis_terminate_after_) f_status_t private_f_string_map_multis_resize(const f_array_length_t length, f_string_map_multis_t *map_multis) { - if (map_multis->used + length > f_array_length_t_size) { + if (map_multis->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -269,7 +269,7 @@ extern "C" { #if !defined(_di_f_string_maps_adjust_) || !defined(_di_f_string_maps_decimate_by_) f_status_t private_f_string_maps_adjust(const f_array_length_t length, f_string_maps_t *maps) { - if (maps->used + length > f_array_length_t_size) { + if (maps->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -301,7 +301,7 @@ extern "C" { #if !defined(_di_f_string_maps_decrease_by_) || !defined(_di_f_string_maps_increase_) || !defined(_di_f_string_maps_increase_by_) || !defined(_di_f_string_maps_terminate_) || !defined(_di_f_string_maps_terminate_after_) f_status_t private_f_string_maps_resize(const f_array_length_t length, f_string_maps_t *maps) { - if (maps->used + length > f_array_length_t_size) { + if (maps->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -333,7 +333,7 @@ extern "C" { #if !defined(_di_f_string_dynamic_mish_) || !defined(_di_f_string_dynamic_partial_mish_) || !defined(_di_f_string_dynamic_partial_prepend_assure_) || !defined(_di_f_string_dynamic_partial_prepend_) || !defined(_di_f_string_dynamic_prepend_assure_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_mish_) || !defined(_di_f_string_prepend_assure_) || !defined(_di_f_string_prepend_) f_status_t private_f_string_prepend(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { - if (destination->used + length > f_string_t_size) { + if (destination->used + length > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -358,7 +358,7 @@ extern "C" { #if !defined(_di_f_string_dynamic_mish_nulless_) || !defined(_di_f_string_dynamic_partial_mish_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_mish_nulless_) || !defined(_di_f_string_prepend_assure_nulless_) || !defined(_di_f_string_prepend_nulless_) f_status_t private_f_string_prepend_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { - if (destination->used + length > f_string_t_size) { + if (destination->used + length > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -424,7 +424,7 @@ extern "C" { #if !defined(_di_f_string_quantitys_adjust_) || !defined(_di_f_string_quantitys_decimate_by_) f_status_t private_f_string_quantitys_adjust(const f_array_length_t length, f_string_quantitys_t *quantitys) { - if (quantitys->used + length > f_array_length_t_size) { + if (quantitys->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -445,7 +445,7 @@ extern "C" { #if !defined(_di_f_string_quantitys_decrease_) || !defined(_di_f_string_quantitys_decrease_by_) || !defined(_di_f_string_quantitys_increase_) || !defined(_di_f_string_quantitys_increase_by_) || !defined(_di_f_string_quantitys_terminate_) || !defined(_di_f_string_quantitys_terminate_after_) f_status_t private_f_string_quantitys_resize(const f_array_length_t length, f_string_quantitys_t *quantitys) { - if (quantitys->used + length > f_array_length_t_size) { + if (quantitys->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -466,7 +466,7 @@ extern "C" { #if !defined(_di_f_string_quantityss_adjust_) || !defined(_di_f_string_quantityss_decimate_by_) f_status_t private_f_string_quantityss_adjust(const f_array_length_t length, f_string_quantityss_t *quantityss) { - if (quantityss->used + length > f_array_length_t_size) { + if (quantityss->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -495,7 +495,7 @@ extern "C" { #if !defined(_di_f_string_quantityss_decrease_) || !defined(_di_f_string_quantityss_decrease_by_) || !defined(_di_f_string_quantityss_increase_) || !defined(_di_f_string_quantityss_increase_by_) || !defined(_di_f_string_quantityss_terminate_) || !defined(_di_f_string_quantityss_terminate_after_) f_status_t private_f_string_quantityss_resize(const f_array_length_t length, f_string_quantityss_t *quantityss) { - if (quantityss->used + length > f_array_length_t_size) { + if (quantityss->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -524,7 +524,7 @@ extern "C" { #if !defined(_di_f_string_ranges_adjust_) || !defined(_di_f_string_ranges_decimate_by_) f_status_t private_f_string_ranges_adjust(const f_array_length_t length, f_string_ranges_t *ranges) { - if (ranges->used + length > f_array_length_t_size) { + if (ranges->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -545,7 +545,7 @@ extern "C" { #if !defined(_di_f_string_ranges_decrease_) || !defined(_di_f_string_ranges_decrease_by_) || !defined(_di_f_string_ranges_increase_) || !defined(_di_f_string_ranges_increase_by_) || !defined(_di_f_string_ranges_terminate_) || !defined(_di_f_string_ranges_terminate_after_) f_status_t private_f_string_ranges_resize(const f_array_length_t length, f_string_ranges_t *ranges) { - if (ranges->used + length > f_array_length_t_size) { + if (ranges->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -566,7 +566,7 @@ extern "C" { #if !defined(_di_f_string_rangess_adjust_) || !defined(_di_f_string_rangess_decimate_by_) f_status_t private_f_string_rangess_adjust(const f_array_length_t length, f_string_rangess_t *rangess) { - if (rangess->used + length > f_array_length_t_size) { + if (rangess->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -595,7 +595,7 @@ extern "C" { #if !defined(_di_f_string_rangess_decrease_) || !defined(_di_f_string_rangess_decrease_by_) || !defined(_di_f_string_rangess_increase_) || !defined(_di_f_string_rangess_increase_by_) || !defined(_di_f_string_rangess_terminate_) || !defined(_di_f_string_rangess_terminate_after_) f_status_t private_f_string_rangess_resize(const f_array_length_t length, f_string_rangess_t *rangess) { - if (rangess->used + length > f_array_length_t_size) { + if (rangess->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -624,7 +624,7 @@ extern "C" { #if !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_) f_status_t private_f_string_triples_adjust(const f_array_length_t length, f_string_triples_t *triples) { - if (triples->used + length > f_array_length_t_size) { + if (triples->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -659,7 +659,7 @@ extern "C" { #if !defined(_di_f_string_triples_decrease_) || !defined(_di_f_string_triples_decrease_by_) || !defined(_di_f_string_triples_increase_) || !defined(_di_f_string_triples_increase_by_) || !defined(_di_f_string_triples_terminate_) || !defined(_di_f_string_triples_terminate_after_) f_status_t private_f_string_triples_resize(const f_array_length_t length, f_string_triples_t *triples) { - if (triples->used + length > f_array_length_t_size) { + if (triples->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } diff --git a/level_0/f_string/c/private-string.h b/level_0/f_string/c/private-string.h index b8b3d1e..975734c 100644 --- a/level_0/f_string/c/private-string.h +++ b/level_0/f_string/c/private-string.h @@ -51,7 +51,7 @@ extern "C" { * @see f_string_triples_append() */ #if !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_mash_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_triples_append_) - extern f_status_t private_f_string_append(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_string_append(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_mash_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_triples_append_) /** @@ -84,7 +84,7 @@ extern "C" { * @see f_string_mash_nulless() */ #if !defined(_di_f_string_append_assure_nulless_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_assure_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_assure_nulless_) || !defined(_di_f_string_dynamic_partial_append_nulless_) || !defined(_di_f_string_dynamic_partial_mash_nulless_) || !defined(_di_f_string_mash_nulless_) - extern f_status_t private_f_string_append_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_string_append_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_append_assure_nulless_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_assure_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_assure_nulless_) || !defined(_di_f_string_dynamic_partial_append_nulless_) || !defined(_di_f_string_dynamic_partial_mash_nulless_) || !defined(_di_f_string_mash_nulless_) /** @@ -114,7 +114,7 @@ extern "C" { * @see f_string_triples_decimate_by() */ #if !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_) || !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_) - extern f_status_t private_f_string_dynamic_adjust(const f_array_length_t length, f_string_dynamic_t *string) f_attribute_visibility_internal; + extern f_status_t private_f_string_dynamic_adjust(const f_array_length_t length, f_string_dynamic_t *string) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_) || !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_) /** @@ -162,7 +162,7 @@ extern "C" { * @see f_string_triples_append() */ #if !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_) - extern f_status_t private_f_string_dynamic_increase_by(const f_array_length_t amount, f_string_dynamic_t *string) f_attribute_visibility_internal; + extern f_status_t private_f_string_dynamic_increase_by(const f_array_length_t amount, f_string_dynamic_t *string) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_) /** @@ -210,7 +210,7 @@ extern "C" { * @see f_string_triples_append() */ #if !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_) - extern f_status_t private_f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t *string) f_attribute_visibility_internal; + extern f_status_t private_f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t *string) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_) /** @@ -238,7 +238,7 @@ extern "C" { * @see f_string_map_multis_append() */ #if !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_) - extern f_status_t private_f_string_dynamics_adjust(const f_array_length_t length, f_string_dynamics_t *strings) f_attribute_visibility_internal; + extern f_status_t private_f_string_dynamics_adjust(const f_array_length_t length, f_string_dynamics_t *strings) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_) /** @@ -262,7 +262,7 @@ extern "C" { * @see f_string_map_multis_append() */ #if !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) - extern f_status_t private_f_string_dynamics_append(const f_string_dynamics_t source, f_string_dynamics_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_string_dynamics_append(const f_string_dynamics_t source, f_string_dynamics_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) /** @@ -288,7 +288,7 @@ extern "C" { * @see f_string_dynamics_increase_by() */ #if !defined(_di_f_string_dynamics_decrease_by_) || !defined(_di_f_string_dynamics_increase_) || !defined(_di_f_string_dynamics_increase_by_) - extern f_status_t private_f_string_dynamics_resize(const f_array_length_t length, f_string_dynamics_t *strings) f_attribute_visibility_internal; + extern f_status_t private_f_string_dynamics_resize(const f_array_length_t length, f_string_dynamics_t *strings) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_dynamics_decrease_by_) || !defined(_di_f_string_dynamics_increase_) || !defined(_di_f_string_dynamics_increase_by_) /** @@ -312,7 +312,7 @@ extern "C" { * @see f_string_map_multis_adjust() */ #if !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_decimate_by_) - extern f_status_t private_f_string_map_multis_adjust(const f_array_length_t length, f_string_map_multis_t *map_multis) f_attribute_visibility_internal; + extern f_status_t private_f_string_map_multis_adjust(const f_array_length_t length, f_string_map_multis_t *map_multis) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_decimate_by_) /** @@ -340,7 +340,7 @@ extern "C" { * @see f_string_map_multis_terminate_after() */ #if !defined(_di_f_string_map_multis_decrease_by_) || !defined(_di_f_string_map_multis_increase_) || !defined(_di_f_string_map_multis_increase_by_) || !defined(_di_f_string_map_multis_terminate_) || !defined(_di_f_string_map_multis_terminate_after_) - extern f_status_t private_f_string_map_multis_resize(const f_array_length_t length, f_string_map_multis_t *map_multis) f_attribute_visibility_internal; + extern f_status_t private_f_string_map_multis_resize(const f_array_length_t length, f_string_map_multis_t *map_multis) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_map_multis_decrease_by_) || !defined(_di_f_string_map_multis_increase_) || !defined(_di_f_string_map_multis_increase_by_) || !defined(_di_f_string_map_multis_terminate_) || !defined(_di_f_string_map_multis_terminate_after_) /** @@ -364,7 +364,7 @@ extern "C" { * @see f_string_maps_adjust() */ #if !defined(_di_f_string_maps_adjust_) || !defined(_di_f_string_maps_decimate_by_) - extern f_status_t private_f_string_maps_adjust(const f_array_length_t length, f_string_maps_t *maps) f_attribute_visibility_internal; + extern f_status_t private_f_string_maps_adjust(const f_array_length_t length, f_string_maps_t *maps) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_maps_adjust_) || !defined(_di_f_string_maps_decimate_by_) /** @@ -392,7 +392,7 @@ extern "C" { * @see f_string_maps_terminate_after() */ #if !defined(_di_f_string_maps_decrease_by_) || !defined(_di_f_string_maps_increase_) || !defined(_di_f_string_maps_increase_by_) || !defined(_di_f_string_maps_terminate_) || !defined(_di_f_string_maps_terminate_after_) - extern f_status_t private_f_string_maps_resize(const f_array_length_t length, f_string_maps_t *maps) f_attribute_visibility_internal; + extern f_status_t private_f_string_maps_resize(const f_array_length_t length, f_string_maps_t *maps) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_maps_decrease_by_) || !defined(_di_f_string_maps_increase_) || !defined(_di_f_string_maps_increase_by_) || !defined(_di_f_string_maps_terminate_) || !defined(_di_f_string_maps_terminate_after_) /** @@ -428,7 +428,7 @@ extern "C" { * @see f_string_prepend() */ #if !defined(_di_f_string_dynamic_mish_) || !defined(_di_f_string_dynamic_partial_mish_) || !defined(_di_f_string_dynamic_partial_prepend_assure_) || !defined(_di_f_string_dynamic_partial_prepend_) || !defined(_di_f_string_dynamic_prepend_assure_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_mish_) || !defined(_di_f_string_prepend_assure_) || !defined(_di_f_string_prepend_) - extern f_status_t private_f_string_prepend(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_string_prepend(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_dynamic_mish_) || !defined(_di_f_string_dynamic_partial_mish_) || !defined(_di_f_string_dynamic_partial_prepend_assure_) || !defined(_di_f_string_dynamic_partial_prepend_) || !defined(_di_f_string_dynamic_prepend_assure_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_mish_) || !defined(_di_f_string_prepend_assure_) || !defined(_di_f_string_prepend_) /** @@ -464,7 +464,7 @@ extern "C" { * @see f_string_prepend_nulless() */ #if !defined(_di_f_string_dynamic_mish_nulless_) || !defined(_di_f_string_dynamic_partial_mish_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_mish_nulless_) || !defined(_di_f_string_prepend_assure_nulless_) || !defined(_di_f_string_prepend_nulless_) - extern f_status_t private_f_string_prepend_nulless(const f_string_t source, f_array_length_t length, f_string_dynamic_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_string_prepend_nulless(const f_string_t source, f_array_length_t length, f_string_dynamic_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_dynamic_mish_nulless_) || !defined(_di_f_string_dynamic_partial_mish_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_mish_nulless_) || !defined(_di_f_string_prepend_assure_nulless_) || !defined(_di_f_string_prepend_nulless_) /** @@ -489,7 +489,7 @@ extern "C" { * @see f_string_quantitys_decimate_by() */ #if !defined(_di_f_string_quantitys_adjust_) || !defined(_di_f_string_quantitys_decimate_by_) - extern f_status_t private_f_string_quantitys_adjust(const f_array_length_t length, f_string_quantitys_t *quantitys) f_attribute_visibility_internal; + extern f_status_t private_f_string_quantitys_adjust(const f_array_length_t length, f_string_quantitys_t *quantitys) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_quantitys_adjust_) || !defined(_di_f_string_quantitys_decimate_by_) /** @@ -517,7 +517,7 @@ extern "C" { * @see f_string_quantitys_terminate_after() */ #if !defined(_di_f_string_quantitys_decrease_by_) || !defined(_di_f_string_quantitys_increase_) || !defined(_di_f_string_quantitys_increase_by_) || !defined(_di_f_string_quantitys_terminate_) || !defined(_di_f_string_quantitys_terminate_after_) - extern f_status_t private_f_string_quantitys_resize(const f_array_length_t length, f_string_quantitys_t *quantitys) f_attribute_visibility_internal; + extern f_status_t private_f_string_quantitys_resize(const f_array_length_t length, f_string_quantitys_t *quantitys) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_quantitys_decrease_by_) || !defined(_di_f_string_quantitys_increase_) || !defined(_di_f_string_quantitys_increase_by_) || !defined(_di_f_string_quantitys_terminate_) || !defined(_di_f_string_quantitys_terminate_after_) /** @@ -542,7 +542,7 @@ extern "C" { * @see f_string_quantityss_decimate_by() */ #if !defined(_di_f_string_quantityss_adjust_) || !defined(_di_f_string_quantityss_decimate_by_) - extern f_status_t private_f_string_quantityss_adjust(const f_array_length_t length, f_string_quantityss_t *quantityss) f_attribute_visibility_internal; + extern f_status_t private_f_string_quantityss_adjust(const f_array_length_t length, f_string_quantityss_t *quantityss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_quantityss_adjust_) || !defined(_di_f_string_quantityss_decimate_by_) /** @@ -570,7 +570,7 @@ extern "C" { * @see f_string_quantityss_terminate_after() */ #if !defined(_di_f_string_quantityss_decrease_by_) || !defined(_di_f_string_quantityss_increase_) || !defined(_di_f_string_quantityss_increase_by_) || !defined(_di_f_string_quantityss_terminate_) || !defined(_di_f_string_quantityss_terminate_after_) - extern f_status_t private_f_string_quantityss_resize(const f_array_length_t length, f_string_quantityss_t *quantityss) f_attribute_visibility_internal; + extern f_status_t private_f_string_quantityss_resize(const f_array_length_t length, f_string_quantityss_t *quantityss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_quantityss_decrease_by_) || !defined(_di_f_string_quantityss_increase_) || !defined(_di_f_string_quantityss_increase_by_) || !defined(_di_f_string_quantityss_terminate_) || !defined(_di_f_string_quantityss_terminate_after_) /** @@ -595,7 +595,7 @@ extern "C" { * @see f_string_ranges_decimate_by() */ #if !defined(_di_f_string_ranges_adjust_) || !defined(_di_f_string_ranges_decimate_by_) - extern f_status_t private_f_string_ranges_adjust(const f_array_length_t length, f_string_ranges_t *ranges) f_attribute_visibility_internal; + extern f_status_t private_f_string_ranges_adjust(const f_array_length_t length, f_string_ranges_t *ranges) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_ranges_adjust_) || !defined(_di_f_string_ranges_decimate_by_) /** @@ -623,7 +623,7 @@ extern "C" { * @see f_string_ranges_terminate_after() */ #if !defined(_di_f_string_ranges_decrease_by_) || !defined(_di_f_string_ranges_increase_) || !defined(_di_f_string_ranges_increase_by_) || !defined(_di_f_string_ranges_terminate_) || !defined(_di_f_string_ranges_terminate_after_) - extern f_status_t private_f_string_ranges_resize(const f_array_length_t length, f_string_ranges_t *ranges) f_attribute_visibility_internal; + extern f_status_t private_f_string_ranges_resize(const f_array_length_t length, f_string_ranges_t *ranges) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_ranges_decrease_by_) || !defined(_di_f_string_ranges_increase_) || !defined(_di_f_string_ranges_increase_by_) || !defined(_di_f_string_ranges_terminate_) || !defined(_di_f_string_ranges_terminate_after_) /** @@ -648,7 +648,7 @@ extern "C" { * @see f_string_rangess_decimate_by() */ #if !defined(_di_f_string_rangess_adjust_) || !defined(_di_f_string_rangess_decimate_by_) - extern f_status_t private_f_string_rangess_adjust(const f_array_length_t length, f_string_rangess_t *rangess) f_attribute_visibility_internal; + extern f_status_t private_f_string_rangess_adjust(const f_array_length_t length, f_string_rangess_t *rangess) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_rangess_adjust_) || !defined(_di_f_string_rangess_decimate_by_) /** @@ -676,7 +676,7 @@ extern "C" { * @see f_string_rangess_terminate_after() */ #if !defined(_di_f_string_rangess_decrease_by_) || !defined(_di_f_string_rangess_increase_) || !defined(_di_f_string_rangess_increase_by_) || !defined(_di_f_string_rangess_terminate_) || !defined(_di_f_string_rangess_terminate_after_) - extern f_status_t private_f_string_rangess_resize(const f_array_length_t length, f_string_rangess_t *rangess) f_attribute_visibility_internal; + extern f_status_t private_f_string_rangess_resize(const f_array_length_t length, f_string_rangess_t *rangess) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_rangess_decrease_by_) || !defined(_di_f_string_rangess_increase_) || !defined(_di_f_string_rangess_increase_by_) || !defined(_di_f_string_rangess_terminate_) || !defined(_di_f_string_rangess_terminate_after_) /** @@ -701,7 +701,7 @@ extern "C" { * @see f_string_triples_decimate_by() */ #if !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_) - extern f_status_t private_f_string_triples_adjust(const f_array_length_t length, f_string_triples_t *triples) f_attribute_visibility_internal; + extern f_status_t private_f_string_triples_adjust(const f_array_length_t length, f_string_triples_t *triples) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_) /** @@ -729,7 +729,7 @@ extern "C" { * @see f_string_triples_terminate_after() */ #if !defined(_di_f_string_triples_decrease_by_) || !defined(_di_f_string_triples_increase_) || !defined(_di_f_string_triples_increase_by_) || !defined(_di_f_string_triples_terminate_) || !defined(_di_f_string_triples_terminate_after_) - extern f_status_t private_f_string_triples_resize(const f_array_length_t length, f_string_triples_t *triples) f_attribute_visibility_internal; + extern f_status_t private_f_string_triples_resize(const f_array_length_t length, f_string_triples_t *triples) F_attribute_visibility_internal_d; #endif // !defined(_di_f_string_triples_decrease_by_) || !defined(_di_f_string_triples_increase_) || !defined(_di_f_string_triples_increase_by_) || !defined(_di_f_string_triples_terminate_) || !defined(_di_f_string_triples_terminate_after_) #ifdef __cplusplus diff --git a/level_0/f_string/c/string-common.c b/level_0/f_string/c/string-common.c index 298b36d..95eec4a 100644 --- a/level_0/f_string/c/string-common.c +++ b/level_0/f_string/c/string-common.c @@ -10,155 +10,155 @@ extern "C" { #endif // _di_f_string_empty_s_ #ifndef _di_string_format_s_ - const f_string_t f_string_format_string_s = f_string_format_string; - const f_string_t f_string_format_character_s = f_string_format_character; - const f_string_t f_string_format_wide_string_s = f_string_format_wide_string; - const f_string_t f_string_format_wide_character_s = f_string_format_wide_character; - const f_string_t f_string_format_integer_s = f_string_format_integer; - const f_string_t f_string_format_unsigned_s = f_string_format_unsigned; - const f_string_t f_string_format_digit_s = f_string_format_digit; - const f_string_t f_string_format_float_s = f_string_format_float; - const f_string_t f_string_format_short_integer_s = f_string_format_short_integer; - const f_string_t f_string_format_short_unsigned_s = f_string_format_short_unsigned; - const f_string_t f_string_format_long_integer_s = f_string_format_long_integer; - const f_string_t f_string_format_long_unsigned_s = f_string_format_long_unsigned; - const f_string_t f_string_format_long_double_s = f_string_format_long_double; - const f_string_t f_string_format_long_long_integer_s = f_string_format_long_long_integer; - const f_string_t f_string_format_long_long_unsigned_s = f_string_format_long_long_unsigned; + const f_string_t f_string_format_string_s = F_string_format_string_s; + const f_string_t f_string_format_character_s = F_string_format_character_s; + const f_string_t f_string_format_wide_string_s = F_string_format_wide_string_s; + const f_string_t f_string_format_wide_character_s = F_string_format_wide_character_s; + const f_string_t f_string_format_integer_s = F_string_format_integer_s; + const f_string_t f_string_format_unsigned_s = F_string_format_unsigned_s; + const f_string_t f_string_format_digit_s = F_string_format_digit_s; + const f_string_t f_string_format_float_s = F_string_format_float_s; + const f_string_t f_string_format_short_integer_s = F_string_format_short_integer_s; + const f_string_t f_string_format_short_unsigned_s = F_string_format_short_unsigned_s; + const f_string_t f_string_format_long_integer_s = F_string_format_long_integer_s; + const f_string_t f_string_format_long_unsigned_s = F_string_format_long_unsigned_s; + const f_string_t f_string_format_long_double_s = F_string_format_long_double_s; + const f_string_t f_string_format_long_long_integer_s = F_string_format_long_long_integer_s; + const f_string_t f_string_format_long_long_unsigned_s = F_string_format_long_long_unsigned_s; #endif // _di_string_format_s_ #ifndef _di_string_ascii_s_ - const f_string_t f_string_ascii_0_s = f_string_ascii_0; - const f_string_t f_string_ascii_1_s = f_string_ascii_1; - const f_string_t f_string_ascii_2_s = f_string_ascii_2; - const f_string_t f_string_ascii_3_s = f_string_ascii_3; - const f_string_t f_string_ascii_4_s = f_string_ascii_4; - const f_string_t f_string_ascii_5_s = f_string_ascii_5; - const f_string_t f_string_ascii_6_s = f_string_ascii_6; - const f_string_t f_string_ascii_7_s = f_string_ascii_7; - const f_string_t f_string_ascii_8_s = f_string_ascii_8; - const f_string_t f_string_ascii_9_s = f_string_ascii_9; + const f_string_t f_string_ascii_0_s = F_string_ascii_0_s; + const f_string_t f_string_ascii_1_s = F_string_ascii_1_s; + const f_string_t f_string_ascii_2_s = F_string_ascii_2_s; + const f_string_t f_string_ascii_3_s = F_string_ascii_3_s; + const f_string_t f_string_ascii_4_s = F_string_ascii_4_s; + const f_string_t f_string_ascii_5_s = F_string_ascii_5_s; + const f_string_t f_string_ascii_6_s = F_string_ascii_6_s; + const f_string_t f_string_ascii_7_s = F_string_ascii_7_s; + const f_string_t f_string_ascii_8_s = F_string_ascii_8_s; + const f_string_t f_string_ascii_9_s = F_string_ascii_9_s; - const f_string_t f_string_ascii_a_s = f_string_ascii_a; - const f_string_t f_string_ascii_b_s = f_string_ascii_b; - const f_string_t f_string_ascii_c_s = f_string_ascii_c; - const f_string_t f_string_ascii_d_s = f_string_ascii_d; - const f_string_t f_string_ascii_e_s = f_string_ascii_e; - const f_string_t f_string_ascii_f_s = f_string_ascii_f; - const f_string_t f_string_ascii_g_s = f_string_ascii_g; - const f_string_t f_string_ascii_h_s = f_string_ascii_h; - const f_string_t f_string_ascii_i_s = f_string_ascii_i; - const f_string_t f_string_ascii_j_s = f_string_ascii_j; - const f_string_t f_string_ascii_k_s = f_string_ascii_k; - const f_string_t f_string_ascii_l_s = f_string_ascii_l; - const f_string_t f_string_ascii_m_s = f_string_ascii_m; - const f_string_t f_string_ascii_n_s = f_string_ascii_n; - const f_string_t f_string_ascii_o_s = f_string_ascii_o; - const f_string_t f_string_ascii_p_s = f_string_ascii_p; - const f_string_t f_string_ascii_q_s = f_string_ascii_q; - const f_string_t f_string_ascii_r_s = f_string_ascii_r; - const f_string_t f_string_ascii_s_s = f_string_ascii_s; - const f_string_t f_string_ascii_t_s = f_string_ascii_t; - const f_string_t f_string_ascii_u_s = f_string_ascii_u; - const f_string_t f_string_ascii_v_s = f_string_ascii_v; - const f_string_t f_string_ascii_w_s = f_string_ascii_w; - const f_string_t f_string_ascii_x_s = f_string_ascii_x; - const f_string_t f_string_ascii_y_s = f_string_ascii_y; - const f_string_t f_string_ascii_z_s = f_string_ascii_z; + const f_string_t f_string_ascii_a_s = F_string_ascii_a_s; + const f_string_t f_string_ascii_b_s = F_string_ascii_b_s; + const f_string_t f_string_ascii_c_s = F_string_ascii_c_s; + const f_string_t f_string_ascii_d_s = F_string_ascii_d_s; + const f_string_t f_string_ascii_e_s = F_string_ascii_e_s; + const f_string_t f_string_ascii_f_s = F_string_ascii_f_s; + const f_string_t f_string_ascii_g_s = F_string_ascii_g_s; + const f_string_t f_string_ascii_h_s = F_string_ascii_h_s; + const f_string_t f_string_ascii_i_s = F_string_ascii_i_s; + const f_string_t f_string_ascii_j_s = F_string_ascii_j_s; + const f_string_t f_string_ascii_k_s = F_string_ascii_k_s; + const f_string_t f_string_ascii_l_s = F_string_ascii_l_s; + const f_string_t f_string_ascii_m_s = F_string_ascii_m_s; + const f_string_t f_string_ascii_n_s = F_string_ascii_n_s; + const f_string_t f_string_ascii_o_s = F_string_ascii_o_s; + const f_string_t f_string_ascii_p_s = F_string_ascii_p_s; + const f_string_t f_string_ascii_q_s = F_string_ascii_q_s; + const f_string_t f_string_ascii_r_s = F_string_ascii_r_s; + const f_string_t f_string_ascii_s_s = F_string_ascii_s_s; + const f_string_t f_string_ascii_t_s = F_string_ascii_t_s; + const f_string_t f_string_ascii_u_s = F_string_ascii_u_s; + const f_string_t f_string_ascii_v_s = F_string_ascii_v_s; + const f_string_t f_string_ascii_w_s = F_string_ascii_w_s; + const f_string_t f_string_ascii_x_s = F_string_ascii_x_s; + const f_string_t f_string_ascii_y_s = F_string_ascii_y_s; + const f_string_t f_string_ascii_z_s = F_string_ascii_z_s; - const f_string_t f_string_ascii_A_s = f_string_ascii_A; - const f_string_t f_string_ascii_B_s = f_string_ascii_B; - const f_string_t f_string_ascii_C_s = f_string_ascii_C; - const f_string_t f_string_ascii_D_s = f_string_ascii_D; - const f_string_t f_string_ascii_E_s = f_string_ascii_E; - const f_string_t f_string_ascii_F_s = f_string_ascii_F; - const f_string_t f_string_ascii_G_s = f_string_ascii_G; - const f_string_t f_string_ascii_H_s = f_string_ascii_H; - const f_string_t f_string_ascii_I_s = f_string_ascii_I; - const f_string_t f_string_ascii_J_s = f_string_ascii_J; - const f_string_t f_string_ascii_K_s = f_string_ascii_K; - const f_string_t f_string_ascii_L_s = f_string_ascii_L; - const f_string_t f_string_ascii_M_s = f_string_ascii_M; - const f_string_t f_string_ascii_N_s = f_string_ascii_N; - const f_string_t f_string_ascii_O_s = f_string_ascii_O; - const f_string_t f_string_ascii_P_s = f_string_ascii_P; - const f_string_t f_string_ascii_Q_s = f_string_ascii_Q; - const f_string_t f_string_ascii_R_s = f_string_ascii_R; - const f_string_t f_string_ascii_S_s = f_string_ascii_S; - const f_string_t f_string_ascii_T_s = f_string_ascii_T; - const f_string_t f_string_ascii_U_s = f_string_ascii_U; - const f_string_t f_string_ascii_V_s = f_string_ascii_V; - const f_string_t f_string_ascii_W_s = f_string_ascii_W; - const f_string_t f_string_ascii_X_s = f_string_ascii_X; - const f_string_t f_string_ascii_Y_s = f_string_ascii_Y; - const f_string_t f_string_ascii_Z_s = f_string_ascii_Z; + const f_string_t f_string_ascii_A_s = F_string_ascii_A_s; + const f_string_t f_string_ascii_B_s = F_string_ascii_B_s; + const f_string_t f_string_ascii_C_s = F_string_ascii_C_s; + const f_string_t f_string_ascii_D_s = F_string_ascii_D_s; + const f_string_t f_string_ascii_E_s = F_string_ascii_E_s; + const f_string_t f_string_ascii_F_s = F_string_ascii_F_s; + const f_string_t f_string_ascii_G_s = F_string_ascii_G_s; + const f_string_t f_string_ascii_H_s = F_string_ascii_H_s; + const f_string_t f_string_ascii_I_s = F_string_ascii_I_s; + const f_string_t f_string_ascii_J_s = F_string_ascii_J_s; + const f_string_t f_string_ascii_K_s = F_string_ascii_K_s; + const f_string_t f_string_ascii_L_s = F_string_ascii_L_s; + const f_string_t f_string_ascii_M_s = F_string_ascii_M_s; + const f_string_t f_string_ascii_N_s = F_string_ascii_N_s; + const f_string_t f_string_ascii_O_s = F_string_ascii_O_s; + const f_string_t f_string_ascii_P_s = F_string_ascii_P_s; + const f_string_t f_string_ascii_Q_s = F_string_ascii_Q_s; + const f_string_t f_string_ascii_R_s = F_string_ascii_R_s; + const f_string_t f_string_ascii_S_s = F_string_ascii_S_s; + const f_string_t f_string_ascii_T_s = F_string_ascii_T_s; + const f_string_t f_string_ascii_U_s = F_string_ascii_U_s; + const f_string_t f_string_ascii_V_s = F_string_ascii_V_s; + const f_string_t f_string_ascii_W_s = F_string_ascii_W_s; + const f_string_t f_string_ascii_X_s = F_string_ascii_X_s; + const f_string_t f_string_ascii_Y_s = F_string_ascii_Y_s; + const f_string_t f_string_ascii_Z_s = F_string_ascii_Z_s; - const f_string_t f_string_ascii_ampersand_s = f_string_ascii_ampersand; - const f_string_t f_string_ascii_asterisk_s = f_string_ascii_asterisk; - const f_string_t f_string_ascii_brace_close_s = f_string_ascii_brace_close; - const f_string_t f_string_ascii_brace_open_s = f_string_ascii_brace_open; - const f_string_t f_string_ascii_bracket_close_s = f_string_ascii_bracket_close; - const f_string_t f_string_ascii_bracket_open_s = f_string_ascii_bracket_open; - const f_string_t f_string_ascii_caret_s = f_string_ascii_caret; - const f_string_t f_string_ascii_comma_s = f_string_ascii_comma; - const f_string_t f_string_ascii_colon_s = f_string_ascii_colon; - const f_string_t f_string_ascii_colon_semi_s = f_string_ascii_colon_semi; - const f_string_t f_string_ascii_dollar_s = f_string_ascii_dollar; - const f_string_t f_string_ascii_equal_s = f_string_ascii_equal; - const f_string_t f_string_ascii_exclamation_s = f_string_ascii_exclamation; - const f_string_t f_string_ascii_grave_s = f_string_ascii_grave; - const f_string_t f_string_ascii_mark_question_s = f_string_ascii_mark_question; - const f_string_t f_string_ascii_minus_s = f_string_ascii_minus; - const f_string_t f_string_ascii_parenthesis_open_s = f_string_ascii_parenthesis_open; - const f_string_t f_string_ascii_parenthesis_close_s = f_string_ascii_parenthesis_close; - const f_string_t f_string_ascii_percent_s = f_string_ascii_percent; - const f_string_t f_string_ascii_period_s = f_string_ascii_period; - const f_string_t f_string_ascii_pipe_s = f_string_ascii_pipe; - const f_string_t f_string_ascii_plus_s = f_string_ascii_plus; - const f_string_t f_string_ascii_pound_s = f_string_ascii_pound; - const f_string_t f_string_ascii_quote_double_s = f_string_ascii_quote_double; - const f_string_t f_string_ascii_quote_single_s = f_string_ascii_quote_single; - const f_string_t f_string_ascii_sign_at_s = f_string_ascii_sign_at; - const f_string_t f_string_ascii_sign_greater_than_s = f_string_ascii_sign_greater_than; - const f_string_t f_string_ascii_sign_less_than_s = f_string_ascii_sign_less_than; - const f_string_t f_string_ascii_slash_forward_s = f_string_ascii_slash_forward; - const f_string_t f_string_ascii_slash_backward_s = f_string_ascii_slash_backward; - const f_string_t f_string_ascii_tilde_s = f_string_ascii_tilde; - const f_string_t f_string_ascii_underscore_s = f_string_ascii_underscore; + const f_string_t f_string_ascii_ampersand_s = F_string_ascii_ampersand_s; + const f_string_t f_string_ascii_asterisk_s = F_string_ascii_asterisk_s; + const f_string_t f_string_ascii_brace_close_s = F_string_ascii_brace_close_s; + const f_string_t f_string_ascii_brace_open_s = F_string_ascii_brace_open_s; + const f_string_t f_string_ascii_bracket_close_s = F_string_ascii_bracket_close_s; + const f_string_t f_string_ascii_bracket_open_s = F_string_ascii_bracket_open_s; + const f_string_t f_string_ascii_caret_s = F_string_ascii_caret_s; + const f_string_t f_string_ascii_comma_s = F_string_ascii_comma_s; + const f_string_t f_string_ascii_colon_s = F_string_ascii_colon_s; + const f_string_t f_string_ascii_colon_semi_s = F_string_ascii_colon_semi_s; + const f_string_t f_string_ascii_dollar_s = F_string_ascii_dollar_s; + const f_string_t f_string_ascii_equal_s = F_string_ascii_equal_s; + const f_string_t f_string_ascii_exclamation_s = F_string_ascii_exclamation_s; + const f_string_t f_string_ascii_grave_s = F_string_ascii_grave_s; + const f_string_t f_string_ascii_mark_question_s = F_string_ascii_mark_question_s; + const f_string_t f_string_ascii_minus_s = F_string_ascii_minus_s; + const f_string_t f_string_ascii_parenthesis_open_s = F_string_ascii_parenthesis_open_s; + const f_string_t f_string_ascii_parenthesis_close_s = F_string_ascii_parenthesis_close_s; + const f_string_t f_string_ascii_percent_s = F_string_ascii_percent_s; + const f_string_t f_string_ascii_period_s = F_string_ascii_period_s; + const f_string_t f_string_ascii_pipe_s = F_string_ascii_pipe_s; + const f_string_t f_string_ascii_plus_s = F_string_ascii_plus_s; + const f_string_t f_string_ascii_pound_s = F_string_ascii_pound_s; + const f_string_t f_string_ascii_quote_double_s = F_string_ascii_quote_double_s; + const f_string_t f_string_ascii_quote_single_s = F_string_ascii_quote_single_s; + const f_string_t f_string_ascii_sign_at_s = F_string_ascii_sign_at_s; + const f_string_t f_string_ascii_sign_greater_than_s = F_string_ascii_sign_greater_than_s; + const f_string_t f_string_ascii_sign_less_than_s = F_string_ascii_sign_less_than_s; + const f_string_t f_string_ascii_slash_forward_s = F_string_ascii_slash_forward_s; + const f_string_t f_string_ascii_slash_backward_s = F_string_ascii_slash_backward_s; + const f_string_t f_string_ascii_tilde_s = F_string_ascii_tilde_s; + const f_string_t f_string_ascii_underscore_s = F_string_ascii_underscore_s; - const f_string_t f_string_ascii_acknowledge_s = f_string_ascii_acknowledge; - const f_string_t f_string_ascii_acknowledge_negative_s = f_string_ascii_acknowledge_negative; - const f_string_t f_string_ascii_bell_s = f_string_ascii_bell; - const f_string_t f_string_ascii_cancel_s = f_string_ascii_cancel; - const f_string_t f_string_ascii_data_link_escape_s = f_string_ascii_data_link_escape; - const f_string_t f_string_ascii_device_control_one_s = f_string_ascii_device_control_one; - const f_string_t f_string_ascii_device_control_two_s = f_string_ascii_device_control_two; - const f_string_t f_string_ascii_device_control_three_s = f_string_ascii_device_control_three; - const f_string_t f_string_ascii_device_control_four_s = f_string_ascii_device_control_four; - const f_string_t f_string_ascii_enquiry_s = f_string_ascii_enquiry; - const f_string_t f_string_ascii_escape_s = f_string_ascii_escape; - const f_string_t f_string_ascii_feed_form_s = f_string_ascii_feed_form; - const f_string_t f_string_ascii_feed_line_s = f_string_ascii_feed_line; - const f_string_t f_string_ascii_header_start_s = f_string_ascii_header_start; - const f_string_t f_string_ascii_medium_stop_s = f_string_ascii_medium_stop; - const f_string_t f_string_ascii_null_s = f_string_ascii_null; - const f_string_t f_string_ascii_return_carriage_s = f_string_ascii_return_carriage; - const f_string_t f_string_ascii_separator_file_s = f_string_ascii_separator_file; - const f_string_t f_string_ascii_separator_group_s = f_string_ascii_separator_group; - const f_string_t f_string_ascii_separator_record_s = f_string_ascii_separator_record; - const f_string_t f_string_ascii_separator_unit_s = f_string_ascii_separator_unit; - const f_string_t f_string_ascii_shift_in_s = f_string_ascii_shift_in; - const f_string_t f_string_ascii_shift_out_s = f_string_ascii_shift_out; - const f_string_t f_string_ascii_space_s = f_string_ascii_space; - const f_string_t f_string_ascii_space_back_s = f_string_ascii_space_back; - const f_string_t f_string_ascii_substitute_s = f_string_ascii_substitute; - const f_string_t f_string_ascii_synchronous_idle_s = f_string_ascii_synchronous_idle; - const f_string_t f_string_ascii_tab_horizontal_s = f_string_ascii_tab_horizontal; - const f_string_t f_string_ascii_tab_vertical_s = f_string_ascii_tab_vertical; - const f_string_t f_string_ascii_text_start_s = f_string_ascii_text_start; - const f_string_t f_string_ascii_text_stop_s = f_string_ascii_text_stop; - const f_string_t f_string_ascii_transmission_stop_s = f_string_ascii_transmission_stop; - const f_string_t f_string_ascii_transmission_block_end_s = f_string_ascii_transmission_block_end; + const f_string_t f_string_ascii_acknowledge_s = F_string_ascii_acknowledge_s; + const f_string_t f_string_ascii_acknowledge_negative_s = F_string_ascii_acknowledge_negative_s; + const f_string_t f_string_ascii_bell_s = F_string_ascii_bell_s; + const f_string_t f_string_ascii_cancel_s = F_string_ascii_cancel_s; + const f_string_t f_string_ascii_data_link_escape_s = F_string_ascii_data_link_escape_s; + const f_string_t f_string_ascii_device_control_one_s = F_string_ascii_device_control_one_s; + const f_string_t f_string_ascii_device_control_two_s = F_string_ascii_device_control_two_s; + const f_string_t f_string_ascii_device_control_three_s = F_string_ascii_device_control_three_s; + const f_string_t f_string_ascii_device_control_four_s = F_string_ascii_device_control_four_s; + const f_string_t f_string_ascii_enquiry_s = F_string_ascii_enquiry_s; + const f_string_t f_string_ascii_escape_s = F_string_ascii_escape_s; + const f_string_t f_string_ascii_feed_form_s = F_string_ascii_feed_form_s; + const f_string_t f_string_ascii_feed_line_s = F_string_ascii_feed_line_s; + const f_string_t f_string_ascii_header_start_s = F_string_ascii_header_start_s; + const f_string_t f_string_ascii_medium_stop_s = F_string_ascii_medium_stop_s; + const f_string_t f_string_ascii_null_s = F_string_ascii_null_s; + const f_string_t f_string_ascii_return_carriage_s = F_string_ascii_return_carriage_s; + const f_string_t f_string_ascii_separator_file_s = F_string_ascii_separator_file_s; + const f_string_t f_string_ascii_separator_group_s = F_string_ascii_separator_group_s; + const f_string_t f_string_ascii_separator_record_s = F_string_ascii_separator_record_s; + const f_string_t f_string_ascii_separator_unit_s = F_string_ascii_separator_unit_s; + const f_string_t f_string_ascii_shift_in_s = F_string_ascii_shift_in_s; + const f_string_t f_string_ascii_shift_out_s = F_string_ascii_shift_out_s; + const f_string_t f_string_ascii_space_s = F_string_ascii_space_s; + const f_string_t f_string_ascii_space_back_s = F_string_ascii_space_back_s; + const f_string_t f_string_ascii_substitute_s = F_string_ascii_substitute_s; + const f_string_t f_string_ascii_synchronous_idle_s = F_string_ascii_synchronous_idle_s; + const f_string_t f_string_ascii_tab_horizontal_s = F_string_ascii_tab_horizontal_s; + const f_string_t f_string_ascii_tab_vertical_s = F_string_ascii_tab_vertical_s; + const f_string_t f_string_ascii_text_start_s = F_string_ascii_text_start_s; + const f_string_t f_string_ascii_text_stop_s = F_string_ascii_text_stop_s; + const f_string_t f_string_ascii_transmission_stop_s = F_string_ascii_transmission_stop_s; + const f_string_t f_string_ascii_transmission_block_end_s = F_string_ascii_transmission_block_end_s; #endif // _di_string_ascii_s_ #ifdef __cplusplus diff --git a/level_0/f_string/c/string-common.h b/level_0/f_string/c/string-common.h index dabd4b0..ab20171 100644 --- a/level_0/f_string/c/string-common.h +++ b/level_0/f_string/c/string-common.h @@ -31,9 +31,9 @@ extern "C" { * * is provided as a way t have a string max for systems that do not support max string length in 64-bits (when f_array_length_t is set to uint64_t). * - * The ideal length for a string is f_array_length_t_size, which generally defaults to 2^64 (unsigned). + * The ideal length for a string is F_array_length_t_size_d, which generally defaults to 2^64 (unsigned). * However, the libc/POSIX appears to limit this to 2^63 (signed). - * f_string_t_size is provided to help safely navigate this. + * F_string_t_size_d is provided to help safely navigate this. */ #ifndef _di_f_string_t_ typedef char *f_string_t; @@ -49,7 +49,7 @@ extern "C" { #define macro_f_string_t_destroy_simple(string, length) f_memory_adjust(length, 0, sizeof(f_string_t), (void **) & string); // @fixme update all code utilizing f_array_length_t on a string, such as strnlen(). - #define f_string_t_size f_type_size_64_positive + #define F_string_t_size_d F_type_size_64_positive_d #endif // _di_f_string_t_ /** @@ -79,7 +79,8 @@ extern "C" { */ #ifndef _di_f_string_eol_s_ #define f_string_eol_s f_string_ascii_feed_line_s - #define f_string_eol_s_length 1 + #define F_string_eol_s F_string_ascii_feed_line_s + #define F_string_eol_s_length 1 #endif // _di_f_string_eol_s_ #ifndef _di_f_string_empty_s_ @@ -88,30 +89,48 @@ extern "C" { #ifndef _di_f_string_placeholder_s_ #define f_string_placeholder_s f_string_empty_s - #define f_string_placeholder_s_length 1 + #define F_string_placeholder_s F_string_empty_s + #define F_string_placeholder_s_length 1 #endif // _di_f_string_placeholder_s_ #ifndef _di_f_string_space_s_ #define f_string_space_s f_string_ascii_space_s - #define f_string_space_s_length 1 + #define F_string_space_s F_string_ascii_space_s + #define F_string_space_s_length 1 #endif // _di_f_string_space_s_ #ifndef _di_string_format_s_ - #define f_string_format_string "%s" - #define f_string_format_character "%c" - #define f_string_format_wide_string "%ls" - #define f_string_format_wide_character "%lc" - #define f_string_format_integer "%i" - #define f_string_format_unsigned "%u" - #define f_string_format_digit "%d" - #define f_string_format_float "%f" - #define f_string_format_short_integer "%hi" - #define f_string_format_short_unsigned "%hu" - #define f_string_format_long_integer "%li" - #define f_string_format_long_unsigned "%lu" - #define f_string_format_long_double "%ld" - #define f_string_format_long_long_integer "%lli" - #define f_string_format_long_long_unsigned "%llu" + #define F_string_format_string_s "%s" + #define F_string_format_character_s "%c" + #define F_string_format_wide_string_s "%ls" + #define F_string_format_wide_character_s "%lc" + #define F_string_format_integer_s "%i" + #define F_string_format_unsigned_s "%u" + #define F_string_format_digit_s "%d" + #define F_string_format_float_s "%f" + #define F_string_format_short_integer_s "%hi" + #define F_string_format_short_unsigned_s "%hu" + #define F_string_format_long_integer_s "%li" + #define F_string_format_long_unsigned_s "%lu" + #define F_string_format_long_double_s "%ld" + #define F_string_format_long_long_integer_s "%lli" + #define F_string_format_long_long_unsigned_s "%llu" + + #define F_string_format_string_s_length 2 + #define F_string_format_character_s_length 2 + #define F_string_format_wide_string_s_length 3 + #define F_string_format_wide_character_s_length 3 + #define F_string_format_integer_s_length 2 + #define F_string_format_unsigned_s_length 2 + #define F_string_format_digit_s_length 2 + #define F_string_format_float_s_length 2 + #define F_string_format_short_integer_s_length 3 + #define F_string_format_short_unsigned_s_length 3 + #define F_string_format_long_integer_s_length 3 + #define F_string_format_long_unsigned_s_length 3 + #define F_string_format_long_double_s_length 3 + #define F_string_format_long_long_integer_s_length 4 + #define F_string_format_long_long_unsigned_s_length 4 extern const f_string_t f_string_format_string_s; extern const f_string_t f_string_format_character_s; @@ -131,9 +150,13 @@ extern "C" { #endif // _di_string_format_s_ #ifndef _di_f_array_length_printf_ - #define f_array_length_printf string_format_integer - #define f_array_length_short_printf string_format_short_integer - #define f_array_length_long_printf string_format_long_integer + #define F_array_length_printf_s F_string_format_integer_s + #define F_array_length_short_printf_s F_string_format_short_integer_s + #define F_array_length_long_printf_s F_string_format_long_integer_s + + #define F_array_length_printf_s_length F_string_format_integer_s_length + #define F_array_length_short_printf_s_length F_string_format_short_integer_s_length + #define F_array_length_long_printf_s_length F_string_format_long_integer_s_length #endif // _di_f_array_length_printf_ /** @@ -149,137 +172,269 @@ extern "C" { * @todo provide extended ASCII-characters. */ #ifndef _di_string_ascii_s_ - #define f_string_ascii_0 "0" - #define f_string_ascii_1 "1" - #define f_string_ascii_2 "2" - #define f_string_ascii_3 "3" - #define f_string_ascii_4 "4" - #define f_string_ascii_5 "5" - #define f_string_ascii_6 "6" - #define f_string_ascii_7 "7" - #define f_string_ascii_8 "8" - #define f_string_ascii_9 "9" - - #define f_string_ascii_a "a" - #define f_string_ascii_b "b" - #define f_string_ascii_c "c" - #define f_string_ascii_d "d" - #define f_string_ascii_e "e" - #define f_string_ascii_f "f" - #define f_string_ascii_g "g" - #define f_string_ascii_h "h" - #define f_string_ascii_i "i" - #define f_string_ascii_j "j" - #define f_string_ascii_k "k" - #define f_string_ascii_l "l" - #define f_string_ascii_m "m" - #define f_string_ascii_n "n" - #define f_string_ascii_o "o" - #define f_string_ascii_p "p" - #define f_string_ascii_q "q" - #define f_string_ascii_r "r" - #define f_string_ascii_s "s" - #define f_string_ascii_t "t" - #define f_string_ascii_u "u" - #define f_string_ascii_v "v" - #define f_string_ascii_w "w" - #define f_string_ascii_x "x" - #define f_string_ascii_y "y" - #define f_string_ascii_z "z" - - #define f_string_ascii_A "A" - #define f_string_ascii_B "B" - #define f_string_ascii_C "C" - #define f_string_ascii_D "D" - #define f_string_ascii_E "E" - #define f_string_ascii_F "F" - #define f_string_ascii_G "G" - #define f_string_ascii_H "H" - #define f_string_ascii_I "I" - #define f_string_ascii_J "J" - #define f_string_ascii_K "K" - #define f_string_ascii_L "L" - #define f_string_ascii_M "M" - #define f_string_ascii_N "N" - #define f_string_ascii_O "O" - #define f_string_ascii_P "P" - #define f_string_ascii_Q "Q" - #define f_string_ascii_R "R" - #define f_string_ascii_S "S" - #define f_string_ascii_T "T" - #define f_string_ascii_U "U" - #define f_string_ascii_V "V" - #define f_string_ascii_W "W" - #define f_string_ascii_X "X" - #define f_string_ascii_Y "Y" - #define f_string_ascii_Z "Z" - - #define f_string_ascii_ampersand "&" - #define f_string_ascii_asterisk "*" - #define f_string_ascii_brace_close "}" - #define f_string_ascii_brace_open "{" - #define f_string_ascii_bracket_close "]" - #define f_string_ascii_bracket_open "[" - #define f_string_ascii_caret "^" - #define f_string_ascii_comma "," - #define f_string_ascii_colon ":" - #define f_string_ascii_colon_semi ";" - #define f_string_ascii_dollar "$" - #define f_string_ascii_equal "=" - #define f_string_ascii_exclamation "!" - #define f_string_ascii_grave "`" - #define f_string_ascii_mark_question "?" - #define f_string_ascii_minus "-" - #define f_string_ascii_parenthesis_open "(" - #define f_string_ascii_parenthesis_close ")" - #define f_string_ascii_percent "%" - #define f_string_ascii_period "." - #define f_string_ascii_pipe "|" - #define f_string_ascii_plus "+" - #define f_string_ascii_pound "#" - #define f_string_ascii_quote_double "\"" - #define f_string_ascii_quote_single "'" - #define f_string_ascii_sign_at "@" - #define f_string_ascii_sign_greater_than ">" - #define f_string_ascii_sign_less_than "<" - #define f_string_ascii_slash_forward "/" - #define f_string_ascii_slash_backward "\\" - #define f_string_ascii_tilde "~" - #define f_string_ascii_underscore "_" - - #define f_string_ascii_acknowledge "" - #define f_string_ascii_acknowledge_negative "" - #define f_string_ascii_bell "" - #define f_string_ascii_cancel "" - #define f_string_ascii_data_link_escape "" - #define f_string_ascii_device_control_one "" - #define f_string_ascii_device_control_two "" - #define f_string_ascii_device_control_three "" - #define f_string_ascii_device_control_four "" - #define f_string_ascii_enquiry "" - #define f_string_ascii_escape "" - #define f_string_ascii_feed_form "\f" - #define f_string_ascii_feed_line "\n" - #define f_string_ascii_header_start "" - #define f_string_ascii_medium_stop "" - #define f_string_ascii_null "\0" - #define f_string_ascii_return_carriage "\r" - #define f_string_ascii_separator_file "" - #define f_string_ascii_separator_group "" - #define f_string_ascii_separator_record "" - #define f_string_ascii_separator_unit "" - #define f_string_ascii_shift_in "" - #define f_string_ascii_shift_out "" - #define f_string_ascii_space " " - #define f_string_ascii_space_back "" - #define f_string_ascii_substitute "" - #define f_string_ascii_synchronous_idle "" - #define f_string_ascii_tab_horizontal "\t" - #define f_string_ascii_tab_vertical "\v" - #define f_string_ascii_text_start "" - #define f_string_ascii_text_stop "" - #define f_string_ascii_transmission_stop "" - #define f_string_ascii_transmission_block_end "" + #define F_string_ascii_0_s "0" + #define F_string_ascii_1_s "1" + #define F_string_ascii_2_s "2" + #define F_string_ascii_3_s "3" + #define F_string_ascii_4_s "4" + #define F_string_ascii_5_s "5" + #define F_string_ascii_6_s "6" + #define F_string_ascii_7_s "7" + #define F_string_ascii_8_s "8" + #define F_string_ascii_9_s "9" + + #define F_string_ascii_a_s "a" + #define F_string_ascii_b_s "b" + #define F_string_ascii_c_s "c" + #define F_string_ascii_d_s "d" + #define F_string_ascii_e_s "e" + #define F_string_ascii_f_s "f" + #define F_string_ascii_g_s "g" + #define F_string_ascii_h_s "h" + #define F_string_ascii_i_s "i" + #define F_string_ascii_j_s "j" + #define F_string_ascii_k_s "k" + #define F_string_ascii_l_s "l" + #define F_string_ascii_m_s "m" + #define F_string_ascii_n_s "n" + #define F_string_ascii_o_s "o" + #define F_string_ascii_p_s "p" + #define F_string_ascii_q_s "q" + #define F_string_ascii_r_s "r" + #define F_string_ascii_s_s "s" + #define F_string_ascii_t_s "t" + #define F_string_ascii_u_s "u" + #define F_string_ascii_v_s "v" + #define F_string_ascii_w_s "w" + #define F_string_ascii_x_s "x" + #define F_string_ascii_y_s "y" + #define F_string_ascii_z_s "z" + + #define F_string_ascii_A_s "A" + #define F_string_ascii_B_s "B" + #define F_string_ascii_C_s "C" + #define F_string_ascii_D_s "D" + #define F_string_ascii_E_s "E" + #define F_string_ascii_F_s "F" + #define F_string_ascii_G_s "G" + #define F_string_ascii_H_s "H" + #define F_string_ascii_I_s "I" + #define F_string_ascii_J_s "J" + #define F_string_ascii_K_s "K" + #define F_string_ascii_L_s "L" + #define F_string_ascii_M_s "M" + #define F_string_ascii_N_s "N" + #define F_string_ascii_O_s "O" + #define F_string_ascii_P_s "P" + #define F_string_ascii_Q_s "Q" + #define F_string_ascii_R_s "R" + #define F_string_ascii_S_s "S" + #define F_string_ascii_T_s "T" + #define F_string_ascii_U_s "U" + #define F_string_ascii_V_s "V" + #define F_string_ascii_W_s "W" + #define F_string_ascii_X_s "X" + #define F_string_ascii_Y_s "Y" + #define F_string_ascii_Z_s "Z" + + #define F_string_ascii_ampersand_s "&" + #define F_string_ascii_asterisk_s "*" + #define F_string_ascii_brace_close_s "}" + #define F_string_ascii_brace_open_s "{" + #define F_string_ascii_bracket_close_s "]" + #define F_string_ascii_bracket_open_s "[" + #define F_string_ascii_caret_s "^" + #define F_string_ascii_comma_s "," + #define F_string_ascii_colon_s ":" + #define F_string_ascii_colon_semi_s ";" + #define F_string_ascii_dollar_s "$" + #define F_string_ascii_equal_s "=" + #define F_string_ascii_exclamation_s "!" + #define F_string_ascii_grave_s "`" + #define F_string_ascii_mark_question_s "?" + #define F_string_ascii_minus_s "-" + #define F_string_ascii_parenthesis_open_s "(" + #define F_string_ascii_parenthesis_close_s ")" + #define F_string_ascii_percent_s "%" + #define F_string_ascii_period_s "." + #define F_string_ascii_pipe_s "|" + #define F_string_ascii_plus_s "+" + #define F_string_ascii_pound_s "#" + #define F_string_ascii_quote_double_s "\"" + #define F_string_ascii_quote_single_s "'" + #define F_string_ascii_sign_at_s "@" + #define F_string_ascii_sign_greater_than_s ">" + #define F_string_ascii_sign_less_than_s "<" + #define F_string_ascii_slash_forward_s "/" + #define F_string_ascii_slash_backward_s "\\" + #define F_string_ascii_tilde_s "~" + #define F_string_ascii_underscore_s "_" + + #define F_string_ascii_acknowledge_s "" + #define F_string_ascii_acknowledge_negative_s "" + #define F_string_ascii_bell_s "" + #define F_string_ascii_cancel_s "" + #define F_string_ascii_data_link_escape_s "" + #define F_string_ascii_device_control_one_s "" + #define F_string_ascii_device_control_two_s "" + #define F_string_ascii_device_control_three_s "" + #define F_string_ascii_device_control_four_s "" + #define F_string_ascii_enquiry_s "" + #define F_string_ascii_escape_s "" + #define F_string_ascii_feed_form_s "\f" + #define F_string_ascii_feed_line_s "\n" + #define F_string_ascii_header_start_s "" + #define F_string_ascii_medium_stop_s "" + #define F_string_ascii_null_s "\0" + #define F_string_ascii_return_carriage_s "\r" + #define F_string_ascii_separator_file_s "" + #define F_string_ascii_separator_group_s "" + #define F_string_ascii_separator_record_s "" + #define F_string_ascii_separator_unit_s "" + #define F_string_ascii_shift_in_s "" + #define F_string_ascii_shift_out_s "" + #define F_string_ascii_space_s " " + #define F_string_ascii_space_back_s "" + #define F_string_ascii_substitute_s "" + #define F_string_ascii_synchronous_idle_s "" + #define F_string_ascii_tab_horizontal_s "\t" + #define F_string_ascii_tab_vertical_s "\v" + #define F_string_ascii_text_start_s "" + #define F_string_ascii_text_stop_s "" + #define F_string_ascii_transmission_stop_s "" + #define F_string_ascii_transmission_block_end_s "" + + #define F_string_ascii_0_s_length 1 + #define F_string_ascii_1_s_length 1 + #define F_string_ascii_2_s_length 1 + #define F_string_ascii_3_s_length 1 + #define F_string_ascii_4_s_length 1 + #define F_string_ascii_5_s_length 1 + #define F_string_ascii_6_s_length 1 + #define F_string_ascii_7_s_length 1 + #define F_string_ascii_8_s_length 1 + #define F_string_ascii_9_s_length 1 + + #define F_string_ascii_a_s_length 1 + #define F_string_ascii_b_s_length 1 + #define F_string_ascii_c_s_length 1 + #define F_string_ascii_d_s_length 1 + #define F_string_ascii_e_s_length 1 + #define F_string_ascii_f_s_length 1 + #define F_string_ascii_g_s_length 1 + #define F_string_ascii_h_s_length 1 + #define F_string_ascii_i_s_length 1 + #define F_string_ascii_j_s_length 1 + #define F_string_ascii_k_s_length 1 + #define F_string_ascii_l_s_length 1 + #define F_string_ascii_m_s_length 1 + #define F_string_ascii_n_s_length 1 + #define F_string_ascii_o_s_length 1 + #define F_string_ascii_p_s_length 1 + #define F_string_ascii_q_s_length 1 + #define F_string_ascii_r_s_length 1 + #define F_string_ascii_s_s_length 1 + #define F_string_ascii_t_s_length 1 + #define F_string_ascii_u_s_length 1 + #define F_string_ascii_v_s_length 1 + #define F_string_ascii_w_s_length 1 + #define F_string_ascii_x_s_length 1 + #define F_string_ascii_y_s_length 1 + #define F_string_ascii_z_s_length 1 + + #define F_string_ascii_A_s_length 1 + #define F_string_ascii_B_s_length 1 + #define F_string_ascii_C_s_length 1 + #define F_string_ascii_D_s_length 1 + #define F_string_ascii_E_s_length 1 + #define F_string_ascii_F_s_length 1 + #define F_string_ascii_G_s_length 1 + #define F_string_ascii_H_s_length 1 + #define F_string_ascii_I_s_length 1 + #define F_string_ascii_J_s_length 1 + #define F_string_ascii_K_s_length 1 + #define F_string_ascii_L_s_length 1 + #define F_string_ascii_M_s_length 1 + #define F_string_ascii_N_s_length 1 + #define F_string_ascii_O_s_length 1 + #define F_string_ascii_P_s_length 1 + #define F_string_ascii_Q_s_length 1 + #define F_string_ascii_R_s_length 1 + #define F_string_ascii_S_s_length 1 + #define F_string_ascii_T_s_length 1 + #define F_string_ascii_U_s_length 1 + #define F_string_ascii_V_s_length 1 + #define F_string_ascii_W_s_length 1 + #define F_string_ascii_X_s_length 1 + #define F_string_ascii_Y_s_length 1 + #define F_string_ascii_Z_s_length 1 + + #define F_string_ascii_ampersand_s_length 1 + #define F_string_ascii_asterisk_s_length 1 + #define F_string_ascii_brace_close_s_length 1 + #define F_string_ascii_brace_open_s_length 1 + #define F_string_ascii_bracket_close_s_length 1 + #define F_string_ascii_bracket_open_s_length 1 + #define F_string_ascii_caret_s_length 1 + #define F_string_ascii_comma_s_length 1 + #define F_string_ascii_colon_s_length 1 + #define F_string_ascii_colon_semi_s_length 1 + #define F_string_ascii_dollar_s_length 1 + #define F_string_ascii_equal_s_length 1 + #define F_string_ascii_exclamation_s_length 1 + #define F_string_ascii_grave_s_length 1 + #define F_string_ascii_mark_question_s_length 1 + #define F_string_ascii_minus_s_length 1 + #define F_string_ascii_parenthesis_open_s_length 1 + #define F_string_ascii_parenthesis_close_s_length 1 + #define F_string_ascii_percent_s_length 1 + #define F_string_ascii_period_s_length 1 + #define F_string_ascii_pipe_s_length 1 + #define F_string_ascii_plus_s_length 1 + #define F_string_ascii_pound_s_length 1 + #define F_string_ascii_quote_double_s_length 1 + #define F_string_ascii_quote_single_s_length 1 + #define F_string_ascii_sign_at_s_length 1 + #define F_string_ascii_sign_greater_than_s_length 1 + #define F_string_ascii_sign_less_than_s_length 1 + #define F_string_ascii_slash_forward_s_length 1 + #define F_string_ascii_slash_backward_s_length 1 + #define F_string_ascii_tilde_s_length 1 + #define F_string_ascii_underscore_s_length 1 + + #define F_string_ascii_acknowledge_s_length 1 + #define F_string_ascii_acknowledge_negative_s_length 1 + #define F_string_ascii_bell_s_length 1 + #define F_string_ascii_cancel_s_length 1 + #define F_string_ascii_data_link_escape_s_length 1 + #define F_string_ascii_device_control_one_s_length 1 + #define F_string_ascii_device_control_two_s_length 1 + #define F_string_ascii_device_control_three_s_length 1 + #define F_string_ascii_device_control_four_s_length 1 + #define F_string_ascii_enquiry_s_length 1 + #define F_string_ascii_escape_s_length 1 + #define F_string_ascii_feed_form_s_length 1 + #define F_string_ascii_feed_line_s_length 1 + #define F_string_ascii_header_start_s_length 1 + #define F_string_ascii_medium_stop_s_length 1 + #define F_string_ascii_null_s_length 1 + #define F_string_ascii_return_carriage_s_length 1 + #define F_string_ascii_separator_file_s_length 1 + #define F_string_ascii_separator_group_s_length 1 + #define F_string_ascii_separator_record_s_length 1 + #define F_string_ascii_separator_unit_s_length 1 + #define F_string_ascii_shift_in_s_length 1 + #define F_string_ascii_shift_out_s_length 1 + #define F_string_ascii_space_s_length 1 + #define F_string_ascii_space_back_s_length 1 + #define F_string_ascii_substitute_s_length 1 + #define F_string_ascii_synchronous_idle_s_length 1 + #define F_string_ascii_tab_horizontal_s_length 1 + #define F_string_ascii_tab_vertical_s_length 1 + #define F_string_ascii_text_start_s_length 1 + #define F_string_ascii_text_stop_s_length 1 + #define F_string_ascii_transmission_stop_s_length 1 + #define F_string_ascii_transmission_block_end_s_length 1 extern const f_string_t f_string_ascii_0_s; extern const f_string_t f_string_ascii_1_s; diff --git a/level_0/f_string/c/string.h b/level_0/f_string/c/string.h index 8b759a2..d2dcc14 100644 --- a/level_0/f_string/c/string.h +++ b/level_0/f_string/c/string.h @@ -7,8 +7,8 @@ * * Provides string capabilities. * - * It is highly recommended that all string arrays are set to a max size of f_array_length_t_size. - * Any calculations against the length (aka: string.used) can always perform (A < B) operators such that the B is f_array_length_t_size + 1 without integer overflow. + * It is highly recommended that all string arrays are set to a max size of F_array_length_t_size_d. + * Any calculations against the length (aka: string.used) can always perform (A < B) operators such that the B is F_array_length_t_size_d + 1 without integer overflow. */ #ifndef _F_string_h #define _F_string_h diff --git a/level_0/f_string/c/string_dynamic.c b/level_0/f_string/c/string_dynamic.c index 9ff1874..c3fd112 100644 --- a/level_0/f_string/c/string_dynamic.c +++ b/level_0/f_string/c/string_dynamic.c @@ -173,12 +173,12 @@ extern "C" { if (dynamic->used + 1 > dynamic->size) { f_array_length_t size = dynamic->used + step; - if (size > f_string_t_size) { - if (dynamic->used + 1 > f_string_t_size) { + if (size > F_string_t_size_d) { + if (dynamic->used + 1 > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } - size = f_string_t_size; + size = F_string_t_size_d; } return private_f_string_dynamic_resize(size, dynamic); @@ -844,7 +844,7 @@ extern "C" { return F_none; } - if (destination->used == f_string_t_size) { + if (destination->used == F_string_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -877,7 +877,7 @@ extern "C" { } // for } - if (destination->used == f_string_t_size) { + if (destination->used == F_string_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -959,12 +959,12 @@ extern "C" { if (dynamics->used + 1 > dynamics->size) { f_array_length_t size = dynamics->used + step; - if (size > f_array_length_t_size) { - if (dynamics->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (dynamics->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_string_dynamics_resize(size, dynamics); @@ -981,7 +981,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (dynamics->used + amount > dynamics->size) { - if (dynamics->used + amount > f_array_length_t_size) { + if (dynamics->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } diff --git a/level_0/f_string/c/string_dynamic.h b/level_0/f_string/c/string_dynamic.h index 5f4a6f7..69edc7a 100644 --- a/level_0/f_string/c/string_dynamic.h +++ b/level_0/f_string/c/string_dynamic.h @@ -266,7 +266,7 @@ extern "C" { * Resize the dynamic string to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -292,7 +292,7 @@ extern "C" { * Resize the dynamic string to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -1095,7 +1095,7 @@ extern "C" { /** * Increase the size of the dynamic string array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -1121,7 +1121,7 @@ extern "C" { * Resize the dynamic string array to a larger size. * * This will resize making the array larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount diff --git a/level_0/f_string/c/string_map.c b/level_0/f_string/c/string_map.c index 8559044..b9541de 100644 --- a/level_0/f_string/c/string_map.c +++ b/level_0/f_string/c/string_map.c @@ -88,12 +88,12 @@ extern "C" { if (map_multis->used + 1 > map_multis->size) { f_array_length_t size = map_multis->used + step; - if (size > f_array_length_t_size) { - if (map_multis->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (map_multis->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_string_map_multis_resize(size, map_multis); @@ -111,7 +111,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (map_multis->used + amount > map_multis->size) { - if (map_multis->used + amount > f_array_length_t_size) { + if (map_multis->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -217,12 +217,12 @@ extern "C" { if (maps->used + 1 > maps->size) { f_array_length_t size = maps->used + step; - if (size > f_array_length_t_size) { - if (maps->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (maps->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_string_maps_resize(size, maps); @@ -240,7 +240,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (maps->used + amount > maps->size) { - if (maps->used + amount > f_array_length_t_size) { + if (maps->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } diff --git a/level_0/f_string/c/string_map.h b/level_0/f_string/c/string_map.h index 457ccd7..e1ebe34 100644 --- a/level_0/f_string/c/string_map.h +++ b/level_0/f_string/c/string_map.h @@ -221,7 +221,7 @@ extern "C" { /** * Increase the size of the map_multis array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -247,7 +247,7 @@ extern "C" { * Resize the map_multis array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -376,7 +376,7 @@ extern "C" { /** * Increase the size of the string maps array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -402,7 +402,7 @@ extern "C" { * Resize the string maps array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount diff --git a/level_0/f_string/c/string_quantity.c b/level_0/f_string/c/string_quantity.c index c656b56..c39d998 100644 --- a/level_0/f_string/c/string_quantity.c +++ b/level_0/f_string/c/string_quantity.c @@ -82,12 +82,12 @@ extern "C" { if (quantitys->used + 1 > quantitys->size) { f_array_length_t size = quantitys->used + step; - if (size > f_array_length_t_size) { - if (quantitys->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (quantitys->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_string_quantitys_resize(size, quantitys); @@ -105,7 +105,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (quantitys->used + amount > quantitys->size) { - if (quantitys->used + amount > f_array_length_t_size) { + if (quantitys->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -176,12 +176,12 @@ extern "C" { if (quantityss->used + 1 > quantityss->size) { f_array_length_t size = quantityss->used + step; - if (size > f_array_length_t_size) { - if (quantityss->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (quantityss->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_string_quantityss_resize(size, quantityss); @@ -199,7 +199,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (quantityss->used + amount > quantityss->size) { - if (quantityss->used + amount > f_array_length_t_size) { + if (quantityss->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } diff --git a/level_0/f_string/c/string_quantity.h b/level_0/f_string/c/string_quantity.h index fe59c8c..43cd6f7 100644 --- a/level_0/f_string/c/string_quantity.h +++ b/level_0/f_string/c/string_quantity.h @@ -187,7 +187,7 @@ extern "C" { /** * Increase the size of the string quantitys array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -212,7 +212,7 @@ extern "C" { * Resize the string quantitys array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -319,7 +319,7 @@ extern "C" { /** * Increase the size of the string quantityss array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -345,7 +345,7 @@ extern "C" { * Resize the string quantityss array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount diff --git a/level_0/f_string/c/string_range.c b/level_0/f_string/c/string_range.c index da17fe2..11d94f7 100644 --- a/level_0/f_string/c/string_range.c +++ b/level_0/f_string/c/string_range.c @@ -82,12 +82,12 @@ extern "C" { if (ranges->used + 1 > ranges->size) { f_array_length_t size = ranges->used + step; - if (size > f_array_length_t_size) { - if (ranges->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (ranges->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_string_ranges_resize(size, ranges); @@ -105,7 +105,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (ranges->used + amount > ranges->size) { - if (ranges->used + amount > f_array_length_t_size) { + if (ranges->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -176,12 +176,12 @@ extern "C" { if (rangess->used + 1 > rangess->size) { f_array_length_t size = rangess->used + step; - if (size > f_array_length_t_size) { - if (rangess->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (rangess->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_string_rangess_resize(size, rangess); @@ -199,7 +199,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (rangess->used + amount > rangess->size) { - if (rangess->used + amount > f_array_length_t_size) { + if (rangess->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } diff --git a/level_0/f_string/c/string_range.h b/level_0/f_string/c/string_range.h index 643c6e9..87f19e6 100644 --- a/level_0/f_string/c/string_range.h +++ b/level_0/f_string/c/string_range.h @@ -192,7 +192,7 @@ extern "C" { /** * Increase the size of the string ranges array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -218,7 +218,7 @@ extern "C" { * Resize the string ranges array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -326,7 +326,7 @@ extern "C" { /** * Increase the size of the string rangess array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -352,7 +352,7 @@ extern "C" { * Resize the string rangess array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount diff --git a/level_0/f_string/c/string_triple.c b/level_0/f_string/c/string_triple.c index e107227..cc540da 100644 --- a/level_0/f_string/c/string_triple.c +++ b/level_0/f_string/c/string_triple.c @@ -96,14 +96,14 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (triples->used + 1 > triples->size) { - f_array_length_t size = triples->used + f_memory_default_allocation_small; + f_array_length_t size = triples->used + F_memory_default_allocation_small_d; - if (size > f_array_length_t_size) { - if (triples->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (triples->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_string_triples_resize(size, triples); @@ -121,7 +121,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (triples->used + amount > triples->size) { - if (triples->used + amount > f_array_length_t_size) { + if (triples->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } diff --git a/level_0/f_string/c/string_triple.h b/level_0/f_string/c/string_triple.h index b644872..0d4e33e 100644 --- a/level_0/f_string/c/string_triple.h +++ b/level_0/f_string/c/string_triple.h @@ -173,7 +173,7 @@ extern "C" { /** * Increase the size of the string triples array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -199,7 +199,7 @@ extern "C" { * Resize the string triples array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount diff --git a/level_0/f_thread/c/private-thread.h b/level_0/f_thread/c/private-thread.h index fbd416a..05a1d22 100644 --- a/level_0/f_thread/c/private-thread.h +++ b/level_0/f_thread/c/private-thread.h @@ -50,7 +50,7 @@ extern "C" { * @see f_thread_sets_resize() */ #if !defined(_di_f_thread_attributes_adjust_) || !defined(_di_f_thread_attributes_decimate_by_) || !defined(_di_f_thread_attributes_decrease_) || !defined(_di_f_thread_attributes_decrease_by_) || !defined(_di_f_thread_attributes_increase_) || !defined(_di_f_thread_attributes_increase_by_) || !defined(_di_f_thread_attributes_resize_) || !defined(_di_f_thread_sets_adjust_) || !defined(_di_f_thread_sets_decimate_by_) || !defined(_di_f_thread_sets_decrease_) || !defined(_di_f_thread_sets_decrease_by_) || !defined(_di_f_thread_sets_increase_) || !defined(_di_f_thread_sets_increase_by_) || !defined(_di_f_thread_sets_resize_) - extern f_status_t private_f_thread_attribute_delete(f_thread_attribute_t *attribute) f_attribute_visibility_internal; + extern f_status_t private_f_thread_attribute_delete(f_thread_attribute_t *attribute) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_attributes_adjust_) || !defined(_di_f_thread_attributes_decimate_by_) || !defined(_di_f_thread_attributes_decrease_) || !defined(_di_f_thread_attributes_decrease_by_) || !defined(_di_f_thread_attributes_increase_) || !defined(_di_f_thread_attributes_increase_by_) || !defined(_di_f_thread_sets_adjust_) || !defined(_di_f_thread_sets_decimate_by_) || !defined(_di_f_thread_sets_decrease_) || !defined(_di_f_thread_sets_decrease_by_) || !defined(_di_f_thread_sets_increase_) || !defined(_di_f_thread_sets_increase_by_) /** @@ -73,7 +73,7 @@ extern "C" { * @see f_thread_attributes_decimate_by() */ #if !defined(_di_f_thread_attributes_adjust_) || !defined(_di_f_thread_attributes_decimate_by_) - extern f_status_t private_f_thread_attributes_adjust(const f_array_length_t length, f_thread_attributes_t *attributes) f_attribute_visibility_internal; + extern f_status_t private_f_thread_attributes_adjust(const f_array_length_t length, f_thread_attributes_t *attributes) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_attributes_adjust_) || !defined(_di_f_thread_attributes_decimate_by_) /** @@ -97,7 +97,7 @@ extern "C" { * @see f_thread_attributes_increase_by() */ #if !defined(_di_f_thread_attributes_decrease_by_) || !defined(_di_f_thread_attributes_increase_) || !defined(_di_f_thread_attributes_increase_by_) - extern f_status_t private_f_thread_attributes_resize(const f_array_length_t length, f_thread_attributes_t *attributes) f_attribute_visibility_internal; + extern f_status_t private_f_thread_attributes_resize(const f_array_length_t length, f_thread_attributes_t *attributes) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_attributes_decrease_by_) || !defined(_di_f_thread_attributes_increase_) || !defined(_di_f_thread_attributes_increase_by_) /** @@ -128,7 +128,7 @@ extern "C" { * @see f_thread_barriers_resize() */ #if !defined(_di_f_thread_barriers_adjust_) || !defined(_di_f_thread_barriers_decimate_by_) || !defined(_di_f_thread_barriers_decrease_) || !defined(_di_f_thread_barriers_decrease_by_) || !defined(_di_f_thread_barriers_increase_) || !defined(_di_f_thread_barriers_increase_by_) || !defined(_di_f_thread_barriers_resize_) - extern f_status_t private_f_thread_barrier_delete(f_thread_barrier_t *barrier) f_attribute_visibility_internal; + extern f_status_t private_f_thread_barrier_delete(f_thread_barrier_t *barrier) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_barriers_adjust_) || !defined(_di_f_thread_barriers_decimate_by_) || !defined(_di_f_thread_barriers_decrease_) || !defined(_di_f_thread_barriers_decrease_by_) || !defined(_di_f_thread_barriers_increase_) || !defined(_di_f_thread_barriers_increase_by_) || !defined(_di_f_thread_barriers_resize_) /** @@ -151,7 +151,7 @@ extern "C" { * @see f_thread_barriers_decimate_by() */ #if !defined(_di_f_thread_barriers_adjust_) || !defined(_di_f_thread_barriers_decimate_by_) - extern f_status_t private_f_thread_barriers_adjust(const f_array_length_t length, f_thread_barriers_t *barriers) f_attribute_visibility_internal; + extern f_status_t private_f_thread_barriers_adjust(const f_array_length_t length, f_thread_barriers_t *barriers) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_barriers_adjust_) || !defined(_di_f_thread_barriers_decimate_by_) /** @@ -175,7 +175,7 @@ extern "C" { * @see f_thread_barriers_increase_by() */ #if !defined(_di_f_thread_barriers_decrease_by_) || !defined(_di_f_thread_barriers_increase_) || !defined(_di_f_thread_barriers_increase_by_) - extern f_status_t private_f_thread_barriers_resize(const f_array_length_t length, f_thread_barriers_t *barriers) f_attribute_visibility_internal; + extern f_status_t private_f_thread_barriers_resize(const f_array_length_t length, f_thread_barriers_t *barriers) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_barriers_decrease_by_) || !defined(_di_f_thread_barriers_increase_) || !defined(_di_f_thread_barriers_increase_by_) /** @@ -206,7 +206,7 @@ extern "C" { * @see f_thread_barrier_attributes_resize() */ #if !defined(_di_f_thread_barrier_attributes_adjust_) || !defined(_di_f_thread_barrier_attributes_decimate_by_) || !defined(_di_f_thread_barrier_attributes_decrease_) || !defined(_di_f_thread_barrier_attributes_decrease_by_) || !defined(_di_f_thread_barrier_attributes_increase_) || !defined(_di_f_thread_barrier_attributes_increase_by_) || !defined(_di_f_thread_barrier_attributes_resize_) - extern f_status_t private_f_thread_barrier_attribute_delete(f_thread_barrier_attribute_t *attribute) f_attribute_visibility_internal; + extern f_status_t private_f_thread_barrier_attribute_delete(f_thread_barrier_attribute_t *attribute) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_barrier_attributes_adjust_) || !defined(_di_f_thread_barrier_attributes_decimate_by_) || !defined(_di_f_thread_barrier_attributes_decrease_) || !defined(_di_f_thread_barrier_attributes_decrease_by_) || !defined(_di_f_thread_barrier_attributes_increase_) || !defined(_di_f_thread_barrier_attributes_increase_by_) || !defined(_di_f_thread_barrier_attributes_resize_) /** @@ -229,7 +229,7 @@ extern "C" { * @see f_thread_barrier_attributes_decimate_by() */ #if !defined(_di_f_thread_barrier_attributes_adjust_) || !defined(_di_f_thread_barrier_attributes_decimate_by_) - extern f_status_t private_f_thread_barrier_attributes_adjust(const f_array_length_t length, f_thread_barrier_attributes_t *attributes) f_attribute_visibility_internal; + extern f_status_t private_f_thread_barrier_attributes_adjust(const f_array_length_t length, f_thread_barrier_attributes_t *attributes) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_barrier_attributes_adjust_) || !defined(_di_f_thread_barrier_attributes_decimate_by_) /** @@ -253,7 +253,7 @@ extern "C" { * @see f_thread_barrier_attributes_increase_by() */ #if !defined(_di_f_thread_barrier_attributes_decrease_by_) || !defined(_di_f_thread_barrier_attributes_increase_) || !defined(_di_f_thread_barrier_attributes_increase_by_) - extern f_status_t private_f_thread_barrier_attributes_resize(const f_array_length_t length, f_thread_barrier_attributes_t *attributes) f_attribute_visibility_internal; + extern f_status_t private_f_thread_barrier_attributes_resize(const f_array_length_t length, f_thread_barrier_attributes_t *attributes) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_barrier_attributes_decrease_by_) || !defined(_di_f_thread_barrier_attributes_increase_) || !defined(_di_f_thread_barrier_attributes_increase_by_) /** @@ -284,7 +284,7 @@ extern "C" { * @see f_thread_condition_attributes_resize() */ #if !defined(_di_f_thread_condition_attributes_adjust_) || !defined(_di_f_thread_condition_attributes_decimate_by_) || !defined(_di_f_thread_condition_attributes_decrease_) || !defined(_di_f_thread_condition_attributes_decrease_by_) || !defined(_di_f_thread_condition_attributes_increase_) || !defined(_di_f_thread_condition_attributes_increase_by_) || !defined(_di_f_thread_condition_attributes_resize_) - extern f_status_t private_f_thread_condition_attribute_delete(f_thread_condition_attribute_t *attribute) f_attribute_visibility_internal; + extern f_status_t private_f_thread_condition_attribute_delete(f_thread_condition_attribute_t *attribute) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_condition_attributes_adjust_) || !defined(_di_f_thread_condition_attributes_decimate_by_) || !defined(_di_f_thread_condition_attributes_decrease_) || !defined(_di_f_thread_condition_attributes_decrease_by_) || !defined(_di_f_thread_condition_attributes_increase_) || !defined(_di_f_thread_condition_attributes_increase_by_) || !defined(_di_f_thread_condition_attributes_resize_) /** @@ -307,7 +307,7 @@ extern "C" { * @see f_thread_condition_attributes_decimate_by() */ #if !defined(_di_f_thread_condition_attributes_adjust_) || !defined(_di_f_thread_condition_attributes_decimate_by_) - extern f_status_t private_f_thread_condition_attributes_adjust(const f_array_length_t length, f_thread_condition_attributes_t *attributes) f_attribute_visibility_internal; + extern f_status_t private_f_thread_condition_attributes_adjust(const f_array_length_t length, f_thread_condition_attributes_t *attributes) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_condition_attributes_adjust_) || !defined(_di_f_thread_condition_attributes_decimate_by_) /** @@ -331,7 +331,7 @@ extern "C" { * @see f_thread_condition_attributes_increase_by() */ #if !defined(_di_f_thread_condition_attributes_decrease_by_) || !defined(_di_f_thread_condition_attributes_increase_) || !defined(_di_f_thread_condition_attributes_increase_by_) - extern f_status_t private_f_thread_condition_attributes_resize(const f_array_length_t length, f_thread_condition_attributes_t *attributes) f_attribute_visibility_internal; + extern f_status_t private_f_thread_condition_attributes_resize(const f_array_length_t length, f_thread_condition_attributes_t *attributes) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_condition_attributes_decrease_by_) || !defined(_di_f_thread_condition_attributes_increase_) || !defined(_di_f_thread_condition_attributes_increase_by_) /** @@ -362,7 +362,7 @@ extern "C" { * @see f_thread_conditions_resize() */ #if !defined(_di_f_thread_conditions_adjust_) || !defined(_di_f_thread_conditions_decimate_by_) || !defined(_di_f_thread_conditions_decrease_) || !defined(_di_f_thread_conditions_decrease_by_) || !defined(_di_f_thread_conditions_increase_) || !defined(_di_f_thread_conditions_increase_by_) || !defined(_di_f_thread_conditions_resize_) - extern f_status_t private_f_thread_condition_delete(f_thread_condition_t *condition) f_attribute_visibility_internal; + extern f_status_t private_f_thread_condition_delete(f_thread_condition_t *condition) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_conditions_adjust_) || !defined(_di_f_thread_conditions_decimate_by_) || !defined(_di_f_thread_conditions_decrease_) || !defined(_di_f_thread_conditions_decrease_by_) || !defined(_di_f_thread_conditions_increase_) || !defined(_di_f_thread_conditions_increase_by_) || !defined(_di_f_thread_conditions_resize_) /** @@ -385,7 +385,7 @@ extern "C" { * @see f_thread_conditions_decimate_by() */ #if !defined(_di_f_thread_conditions_adjust_) || !defined(_di_f_thread_conditions_decimate_by_) - extern f_status_t private_f_thread_conditions_adjust(const f_array_length_t length, f_thread_conditions_t *conditions) f_attribute_visibility_internal; + extern f_status_t private_f_thread_conditions_adjust(const f_array_length_t length, f_thread_conditions_t *conditions) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_conditions_adjust_) || !defined(_di_f_thread_conditions_decimate_by_) /** @@ -409,7 +409,7 @@ extern "C" { * @see f_thread_conditions_increase_by() */ #if !defined(_di_f_thread_conditions_decrease_by_) || !defined(_di_f_thread_conditions_increase_) || !defined(_di_f_thread_conditions_increase_by_) - extern f_status_t private_f_thread_conditions_resize(const f_array_length_t length, f_thread_conditions_t *conditions) f_attribute_visibility_internal; + extern f_status_t private_f_thread_conditions_resize(const f_array_length_t length, f_thread_conditions_t *conditions) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_conditions_decrease_by_) || !defined(_di_f_thread_conditions_increase_) || !defined(_di_f_thread_conditions_increase_by_) /** @@ -438,7 +438,7 @@ extern "C" { * @see f_thread_keys_resize() */ #if !defined(_di_f_thread_keys_adjust_) || !defined(_di_f_thread_keys_decimate_by_) || !defined(_di_f_thread_keys_decrease_) || !defined(_di_f_thread_keys_decrease_by_) || !defined(_di_f_thread_keys_increase_) || !defined(_di_f_thread_keys_increase_by_) || !defined(_di_f_thread_keys_resize_) - extern f_status_t private_f_thread_key_delete(f_thread_key_t *key) f_attribute_visibility_internal; + extern f_status_t private_f_thread_key_delete(f_thread_key_t *key) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_keys_adjust_) || !defined(_di_f_thread_keys_decimate_by_) || !defined(_di_f_thread_keys_decrease_) || !defined(_di_f_thread_keys_decrease_by_) || !defined(_di_f_thread_keys_increase_) || !defined(_di_f_thread_keys_increase_by_) || !defined(_di_f_thread_keys_resize_) /** @@ -461,7 +461,7 @@ extern "C" { * @see f_thread_keys_decimate_by() */ #if !defined(_di_f_thread_keys_adjust_) || !defined(_di_f_thread_keys_decimate_by_) - extern f_status_t private_f_thread_keys_adjust(const f_array_length_t length, f_thread_keys_t *keys) f_attribute_visibility_internal; + extern f_status_t private_f_thread_keys_adjust(const f_array_length_t length, f_thread_keys_t *keys) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_keys_adjust_) || !defined(_di_f_thread_keys_decimate_by_) /** @@ -485,7 +485,7 @@ extern "C" { * @see f_thread_keys_increase_by() */ #if !defined(_di_f_thread_keys_decrease_by_) || !defined(_di_f_thread_keys_increase_) || !defined(_di_f_thread_keys_increase_by_) - extern f_status_t private_f_thread_keys_resize(const f_array_length_t length, f_thread_keys_t *keys) f_attribute_visibility_internal; + extern f_status_t private_f_thread_keys_resize(const f_array_length_t length, f_thread_keys_t *keys) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_keys_decrease_by_) || !defined(_di_f_thread_keys_increase_) || !defined(_di_f_thread_keys_increase_by_) /** @@ -514,7 +514,7 @@ extern "C" { * @see f_thread_locks_resize() */ #if !defined(_di_f_thread_locks_adjust_) || !defined(_di_f_thread_locks_decimate_by_) || !defined(_di_f_thread_locks_decrease_) || !defined(_di_f_thread_locks_decrease_by_) || !defined(_di_f_thread_locks_increase_) || !defined(_di_f_thread_locks_increase_by_) || !defined(_di_f_thread_locks_resize_) - extern f_status_t private_f_thread_lock_delete(f_thread_lock_t *lock) f_attribute_visibility_internal; + extern f_status_t private_f_thread_lock_delete(f_thread_lock_t *lock) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_locks_adjust_) || !defined(_di_f_thread_locks_decimate_by_) || !defined(_di_f_thread_locks_decrease_) || !defined(_di_f_thread_locks_decrease_by_) || !defined(_di_f_thread_locks_increase_) || !defined(_di_f_thread_locks_increase_by_) || !defined(_di_f_thread_locks_resize_) /** @@ -537,7 +537,7 @@ extern "C" { * @see f_thread_locks_decimate_by() */ #if !defined(_di_f_thread_locks_adjust_) || !defined(_di_f_thread_locks_decimate_by_) - extern f_status_t private_f_thread_locks_adjust(const f_array_length_t length, f_thread_locks_t *locks) f_attribute_visibility_internal; + extern f_status_t private_f_thread_locks_adjust(const f_array_length_t length, f_thread_locks_t *locks) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_locks_adjust_) || !defined(_di_f_thread_locks_decimate_by_) /** @@ -561,7 +561,7 @@ extern "C" { * @see f_thread_locks_increase_by() */ #if !defined(_di_f_thread_locks_decrease_by_) || !defined(_di_f_thread_locks_increase_) || !defined(_di_f_thread_locks_increase_by_) - extern f_status_t private_f_thread_locks_resize(const f_array_length_t length, f_thread_locks_t *locks) f_attribute_visibility_internal; + extern f_status_t private_f_thread_locks_resize(const f_array_length_t length, f_thread_locks_t *locks) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_locks_decrease_by_) || !defined(_di_f_thread_locks_increase_) || !defined(_di_f_thread_locks_increase_by_) /** @@ -590,7 +590,7 @@ extern "C" { * @see f_thread_lock_attributes_resize() */ #if !defined(_di_f_thread_lock_attributes_adjust_) || !defined(_di_f_thread_lock_attributes_decimate_by_) || !defined(_di_f_thread_lock_attributes_decrease_) || !defined(_di_f_thread_lock_attributes_decrease_by_) || !defined(_di_f_thread_lock_attributes_increase_) || !defined(_di_f_thread_lock_attributes_increase_by_) || !defined(_di_f_thread_lock_attributes_resize_) - extern f_status_t private_f_thread_lock_attribute_delete(f_thread_lock_attribute_t *attribute) f_attribute_visibility_internal; + extern f_status_t private_f_thread_lock_attribute_delete(f_thread_lock_attribute_t *attribute) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_lock_attributes_adjust_) || !defined(_di_f_thread_lock_attributes_decimate_by_) || !defined(_di_f_thread_lock_attributes_decrease_) || !defined(_di_f_thread_lock_attributes_decrease_by_) || !defined(_di_f_thread_lock_attributes_increase_) || !defined(_di_f_thread_lock_attributes_increase_by_) || !defined(_di_f_thread_lock_attributes_resize_) /** @@ -613,7 +613,7 @@ extern "C" { * @see f_thread_lock_attributes_decimate_by() */ #if !defined(_di_f_thread_lock_attributes_adjust_) || !defined(_di_f_thread_lock_attributes_decimate_by_) - extern f_status_t private_f_thread_lock_attributes_adjust(const f_array_length_t length, f_thread_lock_attributes_t *attributes) f_attribute_visibility_internal; + extern f_status_t private_f_thread_lock_attributes_adjust(const f_array_length_t length, f_thread_lock_attributes_t *attributes) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_lock_attributes_adjust_) || !defined(_di_f_thread_lock_attributes_decimate_by_) /** @@ -637,7 +637,7 @@ extern "C" { * @see f_thread_lock_attributes_increase_by() */ #if !defined(_di_f_thread_lock_attributes_decrease_by_) || !defined(_di_f_thread_lock_attributes_increase_) || !defined(_di_f_thread_lock_attributes_increase_by_) - extern f_status_t private_f_thread_lock_attributes_resize(const f_array_length_t length, f_thread_lock_attributes_t *attributes) f_attribute_visibility_internal; + extern f_status_t private_f_thread_lock_attributes_resize(const f_array_length_t length, f_thread_lock_attributes_t *attributes) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_lock_attributes_decrease_by_) || !defined(_di_f_thread_lock_attributes_increase_) || !defined(_di_f_thread_lock_attributes_increase_by_) /** @@ -666,7 +666,7 @@ extern "C" { * @see f_thread_mutex_attributes_resize() */ #if !defined(_di_f_thread_mutex_attributes_adjust_) || !defined(_di_f_thread_mutex_attributes_decimate_by_) || !defined(_di_f_thread_mutex_attributes_decrease_) || !defined(_di_f_thread_mutex_attributes_decrease_by_) || !defined(_di_f_thread_mutex_attributes_increase_) || !defined(_di_f_thread_mutex_attributes_increase_by_) || !defined(_di_f_thread_mutex_attributes_resize_) - extern f_status_t private_f_thread_mutex_attribute_delete(f_thread_mutex_attribute_t *attribute) f_attribute_visibility_internal; + extern f_status_t private_f_thread_mutex_attribute_delete(f_thread_mutex_attribute_t *attribute) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_mutex_attributes_adjust_) || !defined(_di_f_thread_mutex_attributes_decimate_by_) || !defined(_di_f_thread_mutex_attributes_decrease_) || !defined(_di_f_thread_mutex_attributes_decrease_by_) || !defined(_di_f_thread_mutex_attributes_increase_) || !defined(_di_f_thread_mutex_attributes_increase_by_) || !defined(_di_f_thread_mutex_attributes_resize_) /** @@ -689,7 +689,7 @@ extern "C" { * @see f_thread_mutex_attributes_decimate_by() */ #if !defined(_di_f_thread_mutex_attributes_adjust_) || !defined(_di_f_thread_mutex_attributes_decimate_by_) - extern f_status_t private_f_thread_mutex_attributes_adjust(const f_array_length_t length, f_thread_mutex_attributes_t *attributes) f_attribute_visibility_internal; + extern f_status_t private_f_thread_mutex_attributes_adjust(const f_array_length_t length, f_thread_mutex_attributes_t *attributes) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_mutex_attributes_adjust_) || !defined(_di_f_thread_mutex_attributes_decimate_by_) /** @@ -713,7 +713,7 @@ extern "C" { * @see f_thread_mutex_attributes_increase_by() */ #if !defined(_di_f_thread_mutex_attributes_decrease_by_) || !defined(_di_f_thread_mutex_attributes_increase_) || !defined(_di_f_thread_mutex_attributes_increase_by_) - extern f_status_t private_f_thread_mutex_attributes_resize(const f_array_length_t length, f_thread_mutex_attributes_t *attributes) f_attribute_visibility_internal; + extern f_status_t private_f_thread_mutex_attributes_resize(const f_array_length_t length, f_thread_mutex_attributes_t *attributes) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_mutex_attributes_decrease_by_) || !defined(_di_f_thread_mutex_attributes_increase_) || !defined(_di_f_thread_mutex_attributes_increase_by_) /** @@ -742,7 +742,7 @@ extern "C" { * @see f_thread_mutexs_resize() */ #if !defined(_di_f_thread_mutexs_adjust_) || !defined(_di_f_thread_mutexs_decimate_by_) || !defined(_di_f_thread_mutexs_decrease_) || !defined(_di_f_thread_mutexs_decrease_by_) || !defined(_di_f_thread_mutexs_increase_) || !defined(_di_f_thread_mutexs_increase_by_) || !defined(_di_f_thread_mutexs_resize_) - extern f_status_t private_f_thread_mutex_delete(f_thread_mutex_t *mutex) f_attribute_visibility_internal; + extern f_status_t private_f_thread_mutex_delete(f_thread_mutex_t *mutex) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_mutexs_adjust_) || !defined(_di_f_thread_mutexs_decimate_by_) || !defined(_di_f_thread_mutexs_decrease_) || !defined(_di_f_thread_mutexs_decrease_by_) || !defined(_di_f_thread_mutexs_increase_) || !defined(_di_f_thread_mutexs_increase_by_) || !defined(_di_f_thread_mutexs_resize_) /** @@ -765,7 +765,7 @@ extern "C" { * @see f_thread_mutexs_decimate_by() */ #if !defined(_di_f_thread_mutexs_adjust_) || !defined(_di_f_thread_mutexs_decimate_by_) - extern f_status_t private_f_thread_mutexs_adjust(const f_array_length_t length, f_thread_mutexs_t *mutexs) f_attribute_visibility_internal; + extern f_status_t private_f_thread_mutexs_adjust(const f_array_length_t length, f_thread_mutexs_t *mutexs) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_mutexs_adjust_) || !defined(_di_f_thread_mutexs_decimate_by_) /** @@ -789,7 +789,7 @@ extern "C" { * @see f_thread_mutexs_increase_by() */ #if !defined(_di_f_thread_mutexs_decrease_by_) || !defined(_di_f_thread_mutexs_increase_) || !defined(_di_f_thread_mutexs_increase_by_) - extern f_status_t private_f_thread_mutexs_resize(const f_array_length_t length, f_thread_mutexs_t *mutexs) f_attribute_visibility_internal; + extern f_status_t private_f_thread_mutexs_resize(const f_array_length_t length, f_thread_mutexs_t *mutexs) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_mutexs_decrease_by_) || !defined(_di_f_thread_mutexs_increase_) || !defined(_di_f_thread_mutexs_increase_by_) /** @@ -818,7 +818,7 @@ extern "C" { * @see f_thread_semaphores_resize() */ #if !defined(_di_f_thread_semaphores_adjust_) || !defined(_di_f_thread_semaphores_decimate_by_) || !defined(_di_f_thread_semaphores_decrease_) || !defined(_di_f_thread_semaphores_decrease_by_) || !defined(_di_f_thread_semaphores_increase_) || !defined(_di_f_thread_semaphores_increase_by_) || !defined(_di_f_thread_semaphores_resize_) - extern f_status_t private_f_thread_semaphore_delete(f_thread_semaphore_t *semaphore) f_attribute_visibility_internal; + extern f_status_t private_f_thread_semaphore_delete(f_thread_semaphore_t *semaphore) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_semaphores_adjust_) || !defined(_di_f_thread_semaphores_decimate_by_) || !defined(_di_f_thread_semaphores_decrease_) || !defined(_di_f_thread_semaphores_decrease_by_) || !defined(_di_f_thread_semaphores_increase_) || !defined(_di_f_thread_semaphores_increase_by_) || !defined(_di_f_thread_semaphores_resize_) /** @@ -841,7 +841,7 @@ extern "C" { * @see f_thread_semaphores_decimate_by() */ #if !defined(_di_f_thread_semaphores_adjust_) || !defined(_di_f_thread_semaphores_decimate_by_) - extern f_status_t private_f_thread_semaphores_adjust(const f_array_length_t length, f_thread_semaphores_t *semaphores) f_attribute_visibility_internal; + extern f_status_t private_f_thread_semaphores_adjust(const f_array_length_t length, f_thread_semaphores_t *semaphores) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_semaphores_adjust_) || !defined(_di_f_thread_semaphores_decimate_by_) /** @@ -865,7 +865,7 @@ extern "C" { * @see f_thread_semaphores_increase_by() */ #if !defined(_di_f_thread_semaphores_decrease_by_) || !defined(_di_f_thread_semaphores_increase_) || !defined(_di_f_thread_semaphores_increase_by_) - extern f_status_t private_f_thread_semaphores_resize(const f_array_length_t length, f_thread_semaphores_t *semaphores) f_attribute_visibility_internal; + extern f_status_t private_f_thread_semaphores_resize(const f_array_length_t length, f_thread_semaphores_t *semaphores) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_semaphores_decrease_by_) || !defined(_di_f_thread_semaphores_increase_) || !defined(_di_f_thread_semaphores_increase_by_) /** @@ -888,7 +888,7 @@ extern "C" { * @see f_thread_sets_decimate_by() */ #if !defined(_di_f_thread_sets_adjust_) || !defined(_di_f_thread_sets_decimate_by_) - extern f_status_t private_f_thread_sets_adjust(const f_array_length_t length, f_thread_sets_t *sets) f_attribute_visibility_internal; + extern f_status_t private_f_thread_sets_adjust(const f_array_length_t length, f_thread_sets_t *sets) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_sets_adjust_) || !defined(_di_f_thread_sets_decimate_by_) /** @@ -912,7 +912,7 @@ extern "C" { * @see f_thread_sets_increase_by() */ #if !defined(_di_f_thread_sets_decrease_by_) || !defined(_di_f_thread_sets_increase_) || !defined(_di_f_thread_sets_increase_by_) - extern f_status_t private_f_thread_sets_resize(const f_array_length_t length, f_thread_sets_t *sets) f_attribute_visibility_internal; + extern f_status_t private_f_thread_sets_resize(const f_array_length_t length, f_thread_sets_t *sets) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_sets_decrease_by_) || !defined(_di_f_thread_sets_increase_) || !defined(_di_f_thread_sets_increase_by_) /** @@ -941,7 +941,7 @@ extern "C" { * @see f_thread_spins_resize() */ #if !defined(_di_f_thread_spins_adjust_) || !defined(_di_f_thread_spins_decimate_by_) || !defined(_di_f_thread_spins_decrease_) || !defined(_di_f_thread_spins_decrease_by_) || !defined(_di_f_thread_spins_increase_) || !defined(_di_f_thread_spins_increase_by_) || !defined(_di_f_thread_spins_resize_) - extern f_status_t private_f_thread_spin_delete(f_thread_spin_t *spin) f_attribute_visibility_internal; + extern f_status_t private_f_thread_spin_delete(f_thread_spin_t *spin) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_spins_adjust_) || !defined(_di_f_thread_spins_decimate_by_) || !defined(_di_f_thread_spins_decrease_) || !defined(_di_f_thread_spins_decrease_by_) || !defined(_di_f_thread_spins_increase_) || !defined(_di_f_thread_spins_increase_by_) || !defined(_di_f_thread_spins_resize_) /** @@ -964,7 +964,7 @@ extern "C" { * @see f_thread_spins_decimate_by() */ #if !defined(_di_f_thread_spins_adjust_) || !defined(_di_f_thread_spins_decimate_by_) - extern f_status_t private_f_thread_spins_adjust(const f_array_length_t length, f_thread_spins_t *spins) f_attribute_visibility_internal; + extern f_status_t private_f_thread_spins_adjust(const f_array_length_t length, f_thread_spins_t *spins) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_spins_adjust_) || !defined(_di_f_thread_spins_decimate_by_) /** @@ -988,7 +988,7 @@ extern "C" { * @see f_thread_spins_increase_by() */ #if !defined(_di_f_thread_spins_decrease_by_) || !defined(_di_f_thread_spins_increase_) || !defined(_di_f_thread_spins_increase_by_) - extern f_status_t private_f_thread_spins_resize(const f_array_length_t length, f_thread_spins_t *spins) f_attribute_visibility_internal; + extern f_status_t private_f_thread_spins_resize(const f_array_length_t length, f_thread_spins_t *spins) F_attribute_visibility_internal_d; #endif // !defined(_di_f_thread_spins_decrease_by_) || !defined(_di_f_thread_spins_increase_) || !defined(_di_f_thread_spins_increase_by_) #ifdef __cplusplus diff --git a/level_0/f_thread/c/thread.c b/level_0/f_thread/c/thread.c index 02d415c..aaa4c34 100644 --- a/level_0/f_thread/c/thread.c +++ b/level_0/f_thread/c/thread.c @@ -545,12 +545,12 @@ extern "C" { if (attributes->used + 1 > attributes->size) { f_array_length_t size = attributes->used + step; - if (size > f_array_length_t_size) { - if (attributes->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (attributes->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_thread_attributes_resize(size, attributes); @@ -568,7 +568,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (attributes->used + amount > attributes->size) { - if (attributes->used + amount > f_array_length_t_size) { + if (attributes->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -697,12 +697,12 @@ extern "C" { if (attributes->used + 1 > attributes->size) { f_array_length_t size = attributes->used + step; - if (size > f_array_length_t_size) { - if (attributes->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (attributes->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_thread_barrier_attributes_resize(size, attributes); @@ -720,7 +720,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (attributes->used + amount > attributes->size) { - if (attributes->used + amount > f_array_length_t_size) { + if (attributes->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -833,12 +833,12 @@ extern "C" { if (barriers->used + 1 > barriers->size) { f_array_length_t size = barriers->used + step; - if (size > f_array_length_t_size) { - if (barriers->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (barriers->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_thread_barriers_resize(size, barriers); @@ -856,7 +856,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (barriers->used + amount > barriers->size) { - if (barriers->used + amount > f_array_length_t_size) { + if (barriers->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -1081,12 +1081,12 @@ extern "C" { if (attributes->used + 1 > attributes->size) { f_array_length_t size = attributes->used + step; - if (size > f_array_length_t_size) { - if (attributes->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (attributes->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_thread_condition_attributes_resize(size, attributes); @@ -1104,7 +1104,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (attributes->used + amount > attributes->size) { - if (attributes->used + amount > f_array_length_t_size) { + if (attributes->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -1287,12 +1287,12 @@ extern "C" { if (conditions->used + 1 > conditions->size) { f_array_length_t size = conditions->used + step; - if (size > f_array_length_t_size) { - if (conditions->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (conditions->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_thread_conditions_resize(size, conditions); @@ -1310,7 +1310,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (conditions->used + amount > conditions->size) { - if (conditions->used + amount > f_array_length_t_size) { + if (conditions->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -1547,12 +1547,12 @@ extern "C" { if (keys->used + 1 > keys->size) { f_array_length_t size = keys->used + step; - if (size > f_array_length_t_size) { - if (keys->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (keys->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_thread_keys_resize(size, keys); @@ -1570,7 +1570,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (keys->used + amount > keys->size) { - if (keys->used + amount > f_array_length_t_size) { + if (keys->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -1707,12 +1707,12 @@ extern "C" { if (attributes->used + 1 > attributes->size) { f_array_length_t size = attributes->used + step; - if (size > f_array_length_t_size) { - if (attributes->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (attributes->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_thread_lock_attributes_resize(size, attributes); @@ -1730,7 +1730,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (attributes->used + amount > attributes->size) { - if (attributes->used + amount > f_array_length_t_size) { + if (attributes->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -1954,12 +1954,12 @@ extern "C" { if (locks->used + 1 > locks->size) { f_array_length_t size = locks->used + step; - if (size > f_array_length_t_size) { - if (locks->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (locks->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_thread_locks_resize(size, locks); @@ -1977,7 +1977,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (locks->used + amount > locks->size) { - if (locks->used + amount > f_array_length_t_size) { + if (locks->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -2226,12 +2226,12 @@ extern "C" { if (attributes->used + 1 > attributes->size) { f_array_length_t size = attributes->used + step; - if (size > f_array_length_t_size) { - if (attributes->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (attributes->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_thread_mutex_attributes_resize(size, attributes); @@ -2249,7 +2249,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (attributes->used + amount > attributes->size) { - if (attributes->used + amount > f_array_length_t_size) { + if (attributes->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -2657,12 +2657,12 @@ extern "C" { if (mutexs->used + 1 > mutexs->size) { f_array_length_t size = mutexs->used + step; - if (size > f_array_length_t_size) { - if (mutexs->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (mutexs->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_thread_mutexs_resize(size, mutexs); @@ -2680,7 +2680,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (mutexs->used + amount > mutexs->size) { - if (mutexs->used + amount > f_array_length_t_size) { + if (mutexs->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -2826,12 +2826,12 @@ extern "C" { if (semaphores->used + 1 > semaphores->size) { f_array_length_t size = semaphores->used + step; - if (size > f_array_length_t_size) { - if (semaphores->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (semaphores->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_thread_semaphores_resize(size, semaphores); @@ -2849,7 +2849,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (semaphores->used + amount > semaphores->size) { - if (semaphores->used + amount > f_array_length_t_size) { + if (semaphores->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -2920,12 +2920,12 @@ extern "C" { if (sets->used + 1 > sets->size) { f_array_length_t size = sets->used + step; - if (size > f_array_length_t_size) { - if (sets->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (sets->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_thread_sets_resize(size, sets); @@ -2943,7 +2943,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (sets->used + amount > sets->size) { - if (sets->used + amount > f_array_length_t_size) { + if (sets->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -3169,12 +3169,12 @@ extern "C" { if (spins->used + 1 > spins->size) { f_array_length_t size = spins->used + step; - if (size > f_array_length_t_size) { - if (spins->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (spins->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_thread_spins_resize(size, spins); @@ -3192,7 +3192,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (spins->used + amount > spins->size) { - if (spins->used + amount > f_array_length_t_size) { + if (spins->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } diff --git a/level_0/f_thread/c/thread.h b/level_0/f_thread/c/thread.h index c6750ac..5245fc8 100644 --- a/level_0/f_thread/c/thread.h +++ b/level_0/f_thread/c/thread.h @@ -682,7 +682,7 @@ extern "C" { /** * Increase the size of the thread attributes array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -707,7 +707,7 @@ extern "C" { * Resize the thread attributes array to a larger size. * * This will resize making the array larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -897,7 +897,7 @@ extern "C" { /** * Increase the size of the thread barrier attributes array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -922,7 +922,7 @@ extern "C" { * Resize the thread barrier attributes array to a larger size. * * This will resize making the array larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -1090,7 +1090,7 @@ extern "C" { /** * Increase the size of the thread barriers array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -1115,7 +1115,7 @@ extern "C" { * Resize the thread barriers array to a larger size. * * This will resize making the array larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -1435,7 +1435,7 @@ extern "C" { /** * Increase the size of the thread attributes array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -1460,7 +1460,7 @@ extern "C" { * Resize the thread attributes array to a larger size. * * This will resize making the array larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -1704,7 +1704,7 @@ extern "C" { /** * Increase the size of the thread conditions array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -1729,7 +1729,7 @@ extern "C" { * Resize the thread conditions array to a larger size. * * This will resize making the array larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -2081,7 +2081,7 @@ extern "C" { /** * Increase the size of the thread keys array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -2106,7 +2106,7 @@ extern "C" { * Resize the thread keys array to a larger size. * * This will resize making the array larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -2297,7 +2297,7 @@ extern "C" { /** * Increase the size of the thread attributes array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -2322,7 +2322,7 @@ extern "C" { * Resize the thread attributes array to a larger size. * * This will resize making the array larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -2622,7 +2622,7 @@ extern "C" { /** * Increase the size of the read/write array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -2647,7 +2647,7 @@ extern "C" { * Resize the read/write locks array to a larger size. * * This will resize making the array larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -2963,7 +2963,7 @@ extern "C" { /** * Increase the size of the thread attributes array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -2988,7 +2988,7 @@ extern "C" { * Resize the thread attributes array to a larger size. * * This will resize making the array larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -3291,7 +3291,7 @@ extern "C" { /** * Increase the size of the thread mutexs array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -3316,7 +3316,7 @@ extern "C" { * Resize the thread mutexs array to a larger size. * * This will resize making the array larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -3767,7 +3767,7 @@ extern "C" { /** * Increase the size of the thread semaphores array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -3792,7 +3792,7 @@ extern "C" { * Resize the thread semaphores array to a larger size. * * This will resize making the array larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -3895,7 +3895,7 @@ extern "C" { /** * Increase the size of the thread sets array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -3920,7 +3920,7 @@ extern "C" { * Resize the thread sets array to a larger size. * * This will resize making the array larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -4215,7 +4215,7 @@ extern "C" { /** * Increase the size of the thread spin locks array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -4240,7 +4240,7 @@ extern "C" { * Resize the thread spin locks array to a larger size. * * This will resize making the array larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount diff --git a/level_0/f_type/c/type.h b/level_0/f_type/c/type.h index a5ccffd..eaf9a19 100644 --- a/level_0/f_type/c/type.h +++ b/level_0/f_type/c/type.h @@ -30,13 +30,13 @@ extern "C" { * * Use these macros for visibility-specific tweaks so that if these are not supported by any given compiler, then they can be easily disabled. * - * f_attribute_visibility_internal provides a way to make some functions effectively private. + * F_attribute_visibility_internal_d provides a way to make some functions effectively private. */ #ifndef _di_f_attribute_visibility_ - #define f_attribute_visibility_hidden __attribute__((visibility("hidden"))) - #define f_attribute_visibility_internal __attribute__((visibility("internal"))) - #define f_attribute_visibility_protected __attribute__((visibility("protected"))) - #define f_attribute_visibility_public __attribute__((visibility("default"))) + #define F_attribute_visibility_hidden_d __attribute__((visibility("hidden"))) + #define F_attribute_visibility_internal_d __attribute__((visibility("internal"))) + #define F_attribute_visibility_protected_d __attribute__((visibility("protected"))) + #define F_attribute_visibility_public_d __attribute__((visibility("default"))) #endif // _di_f_attribute_visibility_ /** @@ -104,7 +104,7 @@ extern "C" { void *data; } f_state_t; - #define f_state_t_initialize { f_memory_default_allocation_large, f_memory_default_allocation_small, 0, 0, 0, 0, 0 } + #define f_state_t_initialize { F_memory_default_allocation_large_d, F_memory_default_allocation_small_d, 0, 0, 0, 0, 0 } #define macro_f_state_t_initialize(step_large, step_small, handle, interrupt, callbacks, custom, data) { \ step_large, \ @@ -147,66 +147,66 @@ extern "C" { * * The size is to be the (max supported size - 1) such that that last number can be used for overflow operations. * - * For example, f_type_size_8_negative is 2^7, or -1 to -128, therefore the max size here is -128 - 1 or -127. - * For example, f_type_size_8_positive is 2^7, or 0 to 127, therefore the max size here is 127 - 1 or 126. - * For example, f_type_size_8_unsigned is 2^8, or 0 to 255, therefore the max size here is 255 - 1 or 254. + * For example, F_type_size_8_negative_d is 2^7, or -1 to -128, therefore the max size here is -128 - 1 or -127. + * For example, F_type_size_8_positive_d is 2^7, or 0 to 127, therefore the max size here is 127 - 1 or 126. + * For example, F_type_size_8_unsigned_d is 2^8, or 0 to 255, therefore the max size here is 255 - 1 or 254. * * The max_size is provided for actual max sizes. - * For example, f_type_size_8_negative is 2^7, or -1 to -128, therefore the max size here is -128. - * For example, f_type_size_8_positive is 2^7, or 0 to 127, therefore the max size here is 127. - * For example, f_type_size_8_unsigned is 2^8, or 0 to 255, therefore the max size here is 255. + * For example, F_type_size_8_negative_d is 2^7, or -1 to -128, therefore the max size here is -128. + * For example, F_type_size_8_positive_d is 2^7, or 0 to 127, therefore the max size here is 127. + * For example, F_type_size_8_unsigned_d is 2^8, or 0 to 255, therefore the max size here is 255. */ #ifndef _di_f_type_sizes_ - #define f_type_size_8_negative 0x7f - #define f_type_size_8_positive 0x7e - #define f_type_size_8_unsigned 0xfe + #define F_type_size_8_negative_d 0x7f + #define F_type_size_8_positive_d 0x7e + #define F_type_size_8_unsigned_d 0xfe - #define f_type_size_16_negative 0x7fff - #define f_type_size_16_positive 0x7ffe - #define f_type_size_16_unsigned 0xfffe + #define F_type_size_16_negative_d 0x7fff + #define F_type_size_16_positive_d 0x7ffe + #define F_type_size_16_unsigned_d 0xfffe - #define f_type_size_32_negative 0x7fffffff - #define f_type_size_32_positive 0x7ffffffe - #define f_type_size_32_unsigned 0xfffffffe + #define F_type_size_32_negative_d 0x7fffffff + #define F_type_size_32_positive_d 0x7ffffffe + #define F_type_size_32_unsigned_d 0xfffffffe - #define f_type_size_64_negative 0x7fffffffffffffff - #define f_type_size_64_positive 0x7ffffffffffffffe - #define f_type_size_64_unsigned 0xfffffffffffffffe + #define F_type_size_64_negative_d 0x7fffffffffffffff + #define F_type_size_64_positive_d 0x7ffffffffffffffe + #define F_type_size_64_unsigned_d 0xfffffffffffffffe #ifndef _di_f_type_int_128_t_ - #define f_type_size_128_negative 0x7fffffffffffffffffffffff - #define f_type_size_128_positive 0x7ffffffffffffffffffffffe - #define f_type_size_128_unsigned 0xfffffffffffffffffffffffe + #define F_type_size_128_negative_d 0x7fffffffffffffffffffffff + #define F_type_size_128_positive_d 0x7ffffffffffffffffffffffe + #define F_type_size_128_unsigned_d 0xfffffffffffffffffffffffe #else - #define f_type_size_128_negative f_type_size_64_negative - #define f_type_size_128_positive f_type_size_64_positive - #define f_type_size_128_unsigned f_type_size_64_unsigned + #define F_type_size_128_negative_d F_type_size_64_negative_d + #define F_type_size_128_positive_d F_type_size_64_positive_d + #define F_type_size_128_unsigned_d F_type_size_64_unsigned_d #endif // _di_f_type_int_128_t_ - #define f_type_size_max_8_negative 0x80 - #define f_type_size_max_8_positive 0x7f - #define f_type_size_max_8_unsigned 0xff + #define F_type_size_max_8_negative_d 0x80 + #define F_type_size_max_8_positive_d 0x7f + #define F_type_size_max_8_unsigned_d 0xff - #define f_type_size_max_16_negative 0x8000 - #define f_type_size_max_16_positive 0x7fff - #define f_type_size_max_16_unsigned 0xffff + #define F_type_size_max_16_negative_d 0x8000 + #define F_type_size_max_16_positive_d 0x7fff + #define F_type_size_max_16_unsigned_d 0xffff - #define f_type_size_max_32_negative 0x80000000 - #define f_type_size_max_32_positive 0x7fffffff - #define f_type_size_max_32_unsigned 0xffffffff + #define F_type_size_max_32_negative_d 0x80000000 + #define F_type_size_max_32_positive_d 0x7fffffff + #define F_type_size_max_32_unsigned_d 0xffffffff - #define f_type_size_max_64_negative 0x8000000000000000 - #define f_type_size_max_64_positive 0x7fffffffffffffff - #define f_type_size_max_64_unsigned 0xffffffffffffffff + #define F_type_size_max_64_negative_d 0x8000000000000000 + #define F_type_size_max_64_positive_d 0x7fffffffffffffff + #define F_type_size_max_64_unsigned_d 0xffffffffffffffff #ifndef _di_f_type_int_128_t_ - #define f_type_size_max_128_negative 0x800000000000000000000000 - #define f_type_size_max_128_positive 0x7fffffffffffffffffffffff - #define f_type_size_max_128_unsigned 0xffffffffffffffffffffffff + #define F_type_size_max_128_negative_d 0x800000000000000000000000 + #define F_type_size_max_128_positive_d 0x7fffffffffffffffffffffff + #define F_type_size_max_128_unsigned_d 0xffffffffffffffffffffffff #else - #define f_type_size_max_128_negative f_type_size_max_64_negative - #define f_type_size_max_128_positive f_type_size_max_64_positive - #define f_type_size_max_128_unsigned f_type_size_max_64_unsigned + #define F_type_size_max_128_negative_d F_type_size_max_64_negative_d + #define F_type_size_max_128_positive_d F_type_size_max_64_positive_d + #define F_type_size_max_128_unsigned_d F_type_size_max_64_unsigned_d #endif // _di_f_type_int_128_t_ #endif // _di_f_type_sizes_ @@ -224,39 +224,39 @@ extern "C" { typedef int64_t f_number_signed_t; typedef uint64_t f_number_unsigned_t; - #define f_number_t_size_unsigned f_type_size_64_unsigned - #define f_number_t_size_positive f_type_size_64_positive - #define f_number_t_size_negative f_type_size_64_negative + #define F_number_t_size_unsigned_d F_type_size_64_unsigned_d + #define F_number_t_size_positive_d F_type_size_64_positive_d + #define F_number_t_size_negative_d F_type_size_64_negative_d - #define f_number_t_size_max_unsigned f_type_size_max_64_unsigned - #define f_number_t_size_max_positive f_type_size_max_64_positive - #define f_number_t_size_max_negative f_type_size_max_64_negative + #define F_number_t_size_max_unsigned_d F_type_size_max_64_unsigned_d + #define F_number_t_size_max_positive_d F_type_size_max_64_positive_d + #define F_number_t_size_max_negative_d F_type_size_max_64_negative_d #endif // _di_f_type_number_64_t_ #ifdef _en_f_type_number_32_t_ typedef int32_t f_number_signed_t; typedef uint32_t f_number_unsigned_t; - #define f_number_t_size_unsigned f_type_size_32_unsigned - #define f_number_t_size_positive f_type_size_32_positive - #define f_number_t_size_negative f_type_size_32_negative + #define F_number_t_size_unsigned_d F_type_size_32_unsigned_d + #define F_number_t_size_positive_d F_type_size_32_positive_d + #define F_number_t_size_negative_d F_type_size_32_negative_d - #define f_number_t_size_max_unsigned f_type_size_max_32_unsigned - #define f_number_t_size_max_positive f_type_size_max_32_positive - #define f_number_t_size_max_negative f_type_size_max_32_negative + #define F_number_t_size_max_unsigned_d F_type_size_max_32_unsigned_d + #define F_number_t_size_max_positive_d F_type_size_max_32_positive_d + #define F_number_t_size_max_negative_d F_type_size_max_32_negative_d #endif // _en_f_type_number_32_t_ #ifdef _en_f_type_number_128_t_ typedef f_int_128_t f_number_signed_t; typedef f_uint_128_t f_number_unsigned_t; - #define f_number_t_size_unsigned f_type_size_128_unsigned - #define f_number_t_size_positive f_type_size_128_positive - #define f_number_t_size_negative f_type_size_128_negative + #define F_number_t_size_unsigned_d F_type_size_128_unsigned_d + #define F_number_t_size_positive_d F_type_size_128_positive_d + #define F_number_t_size_negative_d F_type_size_128_negative_d - #define f_number_t_size_max_unsigned f_type_size_max_128_unsigned - #define f_number_t_size_max_positive f_type_size_max_128_positive - #define f_number_t_size_max_negative f_type_size_max_128_negative + #define F_number_t_size_max_unsigned_d F_type_size_max_128_unsigned_d + #define F_number_t_size_max_positive_d F_type_size_max_128_positive_d + #define F_number_t_size_max_negative_d F_type_size_max_128_negative_d #endif // _en_f_type_number_128_t_ /** @@ -266,17 +266,17 @@ extern "C" { * Therefore, these will map to standard output. */ #ifndef _di_f_type_input_output_ - #define f_type_debug stdout - #define f_type_error stderr - #define f_type_input stdin - #define f_type_output stdout - #define f_type_warning stdout - - #define f_type_descriptor_debug STDOUT_FILENO - #define f_type_descriptor_error STDERR_FILENO - #define f_type_descriptor_input STDIN_FILENO - #define f_type_descriptor_output STDOUT_FILENO - #define f_type_descriptor_warning STDOUT_FILENO + #define F_type_debug_d stdout + #define F_type_error_d stderr + #define F_type_input_d stdin + #define F_type_output_d stdout + #define F_type_warning_d stdout + + #define F_type_descriptor_debug_d STDOUT_FILENO + #define F_type_descriptor_error_d STDERR_FILENO + #define F_type_descriptor_input_d STDIN_FILENO + #define F_type_descriptor_output_d STDOUT_FILENO + #define F_type_descriptor_warning_d STDOUT_FILENO #endif // _di_f_type_input_output_ /** @@ -290,8 +290,8 @@ extern "C" { #ifndef _di_f_array_t_ typedef f_number_unsigned_t f_array_length_t; - #define f_array_length_t_size f_number_t_size_unsigned - #define f_array_length_t_size_max f_number_t_size_max_unsigned + #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_ /** @@ -380,24 +380,24 @@ extern "C" { } #define macro_f_mode_t_set_default(mode) \ - mode.block = f_file_mode_all_rw; \ - mode.character = f_file_mode_all_rw; \ - mode.directory = f_file_mode_all_rwx; \ - mode.fifo = f_file_mode_all_rw; \ - mode.regular = f_file_mode_all_rw; \ - mode.link = f_file_mode_all_rw; \ - mode.socket = f_file_mode_all_rw; \ - mode.unknown = f_file_mode_all_rw; + mode.block = F_file_mode_all_rw_d; \ + mode.character = F_file_mode_all_rw_d; \ + mode.directory = F_file_mode_all_rwx_d; \ + mode.fifo = F_file_mode_all_rw_d; \ + mode.regular = F_file_mode_all_rw_d; \ + mode.link = F_file_mode_all_rw_d; \ + mode.socket = F_file_mode_all_rw_d; \ + mode.unknown = F_file_mode_all_rw_d; #define macro_f_mode_t_set_default_umask(mode, mask) \ - mode.block = f_file_mode_all_rw & ~mask; \ - mode.character = f_file_mode_all_rw & ~mask; \ - mode.directory = f_file_mode_all_rwx & ~mask; \ - mode.fifo = f_file_mode_all_rw & ~mask; \ - mode.regular = f_file_mode_all_rw & ~mask; \ - mode.link = f_file_mode_all_rw & ~mask; \ - mode.socket = f_file_mode_all_rw & ~mask; \ - mode.unknown = f_file_mode_all_rw & ~mask; + mode.block = F_file_mode_all_rw_d & ~mask; \ + mode.character = F_file_mode_all_rw_d & ~mask; \ + mode.directory = F_file_mode_all_rwx_d & ~mask; \ + mode.fifo = F_file_mode_all_rw_d & ~mask; \ + mode.regular = F_file_mode_all_rw_d & ~mask; \ + mode.link = F_file_mode_all_rw_d & ~mask; \ + mode.socket = F_file_mode_all_rw_d & ~mask; \ + mode.unknown = F_file_mode_all_rw_d & ~mask; #define macro_f_mode_t_set_all(mode, value) \ mode.block = value; \ diff --git a/level_0/f_type_array/c/private-type_array.h b/level_0/f_type_array/c/private-type_array.h index 42b059a..f8097e1 100644 --- a/level_0/f_type_array/c/private-type_array.h +++ b/level_0/f_type_array/c/private-type_array.h @@ -35,7 +35,7 @@ extern "C" { * @see f_type_statuss_decimate_by() */ #if !defined(_di_f_type_statuss_adjust_) || !defined(_di_f_type_statuss_decimate_by_) - extern f_status_t private_f_type_statuss_adjust(const f_array_length_t length, f_statuss_t *statuss) f_attribute_visibility_internal; + extern f_status_t private_f_type_statuss_adjust(const f_array_length_t length, f_statuss_t *statuss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_statuss_adjust_) || !defined(_di_f_type_statuss_decimate_by_) /** @@ -57,7 +57,7 @@ extern "C" { * @see f_type_statusss_append() */ #if !defined(_di_f_type_statuss_append_) || !defined(_di_f_type_statusss_append_) - extern f_status_t private_f_type_statuss_append(const f_statuss_t source, f_statuss_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_type_statuss_append(const f_statuss_t source, f_statuss_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_statuss_append_) || !defined(_di_f_type_statusss_append_) /** @@ -82,7 +82,7 @@ extern "C" { * @see f_type_statusss_append() */ #if !defined(_di_f_type_statuss_resize_) || !defined(_di_f_type_statuss_append_) || !defined(_di_f_type_statuss_decimate_by_) || !defined(_di_f_type_statusss_append_) - extern f_status_t private_f_type_statuss_resize(const f_array_length_t length, f_statuss_t *statuss) f_attribute_visibility_internal; + extern f_status_t private_f_type_statuss_resize(const f_array_length_t length, f_statuss_t *statuss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_statuss_resize_) || !defined(_di_f_type_statuss_append_) || !defined(_di_f_type_statuss_decimate_by_) || !defined(_di_f_type_statusss_append_) /** @@ -110,7 +110,7 @@ extern "C" { * @see f_type_statusss_decimate_by() */ #if !defined(_di_f_type_statusss_adjust_) || !defined(_di_f_type_statusss_decimate_by_) - extern f_status_t private_f_type_statusss_adjust(const f_array_length_t length, f_statusss_t *statusss) f_attribute_visibility_internal; + extern f_status_t private_f_type_statusss_adjust(const f_array_length_t length, f_statusss_t *statusss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_statusss_adjust_) || !defined(_di_f_type_statusss_decimate_by_) /** @@ -140,7 +140,7 @@ extern "C" { * @see f_type_statusss_resize() */ #if !defined(_di_f_type_statusss_decrease_by_) || !defined(_di_f_type_statusss_increase_) || !defined(_di_f_type_statusss_increase_by_) || !defined(_di_f_type_statusss_resize_) - extern f_status_t private_f_type_statusss_resize(const f_array_length_t length, f_statusss_t *statusss) f_attribute_visibility_internal; + extern f_status_t private_f_type_statusss_resize(const f_array_length_t length, f_statusss_t *statusss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_statusss_decrease_by_) || !defined(_di_f_type_statusss_increase_) || !defined(_di_f_type_statusss_increase_by_) || !defined(_di_f_type_statusss_resize_) /** @@ -163,7 +163,7 @@ extern "C" { * @see f_type_states_decimate_by() */ #if !defined(_di_f_type_states_adjust_) || !defined(_di_f_type_states_decimate_by_) - extern f_status_t private_f_type_states_adjust(const f_array_length_t length, f_states_t *states) f_attribute_visibility_internal; + extern f_status_t private_f_type_states_adjust(const f_array_length_t length, f_states_t *states) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_states_adjust_) || !defined(_di_f_type_states_decimate_by_) /** @@ -185,7 +185,7 @@ extern "C" { * @see f_type_statess_append() */ #if !defined(_di_f_type_states_append_) || !defined(_di_f_type_statess_append_) - extern f_status_t private_f_type_states_append(const f_states_t source, f_states_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_type_states_append(const f_states_t source, f_states_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_states_append_) || !defined(_di_f_type_statess_append_) /** @@ -210,7 +210,7 @@ extern "C" { * @see f_type_statess_append() */ #if !defined(_di_f_type_states_resize_) || !defined(_di_f_type_states_append_) || !defined(_di_f_type_states_decimate_by_) || !defined(_di_f_type_statess_append_) - extern f_status_t private_f_type_states_resize(const f_array_length_t length, f_states_t *states) f_attribute_visibility_internal; + extern f_status_t private_f_type_states_resize(const f_array_length_t length, f_states_t *states) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_states_resize_) || !defined(_di_f_type_states_append_) || !defined(_di_f_type_states_decimate_by_) || !defined(_di_f_type_statess_append_) /** @@ -238,7 +238,7 @@ extern "C" { * @see f_type_statess_decimate_by() */ #if !defined(_di_f_type_statess_adjust_) || !defined(_di_f_type_statess_decimate_by_) - extern f_status_t private_f_type_statess_adjust(const f_array_length_t length, f_statess_t *statess) f_attribute_visibility_internal; + extern f_status_t private_f_type_statess_adjust(const f_array_length_t length, f_statess_t *statess) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_statess_adjust_) || !defined(_di_f_type_statess_decimate_by_) /** @@ -268,7 +268,7 @@ extern "C" { * @see f_type_statess_resize() */ #if !defined(_di_f_type_statess_decrease_by_) || !defined(_di_f_type_statess_increase_) || !defined(_di_f_type_statess_increase_by_) || !defined(_di_f_type_statess_resize_) - extern f_status_t private_f_type_statess_resize(const f_array_length_t length, f_statess_t *statess) f_attribute_visibility_internal; + extern f_status_t private_f_type_statess_resize(const f_array_length_t length, f_statess_t *statess) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_statess_decrease_by_) || !defined(_di_f_type_statess_increase_) || !defined(_di_f_type_statess_increase_by_) || !defined(_di_f_type_statess_resize_) /** @@ -291,7 +291,7 @@ extern "C" { * @see f_type_cells_decimate_by() */ #if !defined(_di_f_type_cells_adjust_) || !defined(_di_f_type_cells_decimate_by_) - extern f_status_t private_f_type_cells_adjust(const f_array_length_t length, f_cells_t *cells) f_attribute_visibility_internal; + extern f_status_t private_f_type_cells_adjust(const f_array_length_t length, f_cells_t *cells) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_cells_adjust_) || !defined(_di_f_type_cells_decimate_by_) /** @@ -313,7 +313,7 @@ extern "C" { * @see f_type_cellss_append() */ #if !defined(_di_f_type_cells_append_) || !defined(_di_f_type_cellss_append_) - extern f_status_t private_f_type_cells_append(const f_cells_t source, f_cells_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_type_cells_append(const f_cells_t source, f_cells_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_cells_append_) || !defined(_di_f_type_cellss_append_) /** @@ -338,7 +338,7 @@ extern "C" { * @see f_type_cellss_append() */ #if !defined(_di_f_type_cells_resize_) || !defined(_di_f_type_cells_append_) || !defined(_di_f_type_cells_decimate_by_) || !defined(_di_f_type_cellss_append_) - extern f_status_t private_f_type_cells_resize(const f_array_length_t length, f_cells_t *cells) f_attribute_visibility_internal; + extern f_status_t private_f_type_cells_resize(const f_array_length_t length, f_cells_t *cells) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_cells_resize_) || !defined(_di_f_type_cells_append_) || !defined(_di_f_type_cells_decimate_by_) || !defined(_di_f_type_cellss_append_) /** @@ -366,7 +366,7 @@ extern "C" { * @see f_type_cellss_decimate_by() */ #if !defined(_di_f_type_cellss_adjust_) || !defined(_di_f_type_cellss_decimate_by_) - extern f_status_t private_f_type_cellss_adjust(const f_array_length_t length, f_cellss_t *cellss) f_attribute_visibility_internal; + extern f_status_t private_f_type_cellss_adjust(const f_array_length_t length, f_cellss_t *cellss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_cellss_adjust_) || !defined(_di_f_type_cellss_decimate_by_) /** @@ -396,7 +396,7 @@ extern "C" { * @see f_type_cellss_resize() */ #if !defined(_di_f_type_cellss_decrease_by_) || !defined(_di_f_type_cellss_increase_) || !defined(_di_f_type_cellss_increase_by_) || !defined(_di_f_type_cellss_resize_) - extern f_status_t private_f_type_cellss_resize(const f_array_length_t length, f_cellss_t *cellss) f_attribute_visibility_internal; + extern f_status_t private_f_type_cellss_resize(const f_array_length_t length, f_cellss_t *cellss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_cellss_decrease_by_) || !defined(_di_f_type_cellss_increase_) || !defined(_di_f_type_cellss_increase_by_) || !defined(_di_f_type_cellss_resize_) /** @@ -419,7 +419,7 @@ extern "C" { * @see f_type_fll_ids_decimate_by() */ #if !defined(_di_f_type_fll_ids_adjust_) || !defined(_di_f_type_fll_ids_decimate_by_) - extern f_status_t private_f_type_fll_ids_adjust(const f_array_length_t length, f_fll_ids_t *ids) f_attribute_visibility_internal; + extern f_status_t private_f_type_fll_ids_adjust(const f_array_length_t length, f_fll_ids_t *ids) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_fll_ids_adjust_) || !defined(_di_f_type_fll_ids_decimate_by_) /** @@ -441,7 +441,7 @@ extern "C" { * @see f_type_fll_idss_append() */ #if !defined(_di_f_type_fll_ids_append_) || !defined(_di_f_type_fll_idss_append_) - extern f_status_t private_f_type_fll_ids_append(const f_fll_ids_t source, f_fll_ids_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_type_fll_ids_append(const f_fll_ids_t source, f_fll_ids_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_fll_ids_append_) || !defined(_di_f_type_fll_idss_append_) /** @@ -466,7 +466,7 @@ extern "C" { * @see f_type_fll_idss_append() */ #if !defined(_di_f_type_fll_ids_resize_) || !defined(_di_f_type_fll_ids_append_) || !defined(_di_f_type_fll_ids_decimate_by_) || !defined(_di_f_type_fll_idss_append_) - extern f_status_t private_f_type_fll_ids_resize(const f_array_length_t length, f_fll_ids_t *ids) f_attribute_visibility_internal; + extern f_status_t private_f_type_fll_ids_resize(const f_array_length_t length, f_fll_ids_t *ids) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_fll_ids_resize_) || !defined(_di_f_type_fll_ids_append_) || !defined(_di_f_type_fll_ids_decimate_by_) || !defined(_di_f_type_fll_idss_append_) /** @@ -494,7 +494,7 @@ extern "C" { * @see f_type_fll_idss_decimate_by() */ #if !defined(_di_f_type_fll_idss_adjust_) || !defined(_di_f_type_fll_idss_decimate_by_) - extern f_status_t private_f_type_fll_idss_adjust(const f_array_length_t length, f_fll_idss_t *idss) f_attribute_visibility_internal; + extern f_status_t private_f_type_fll_idss_adjust(const f_array_length_t length, f_fll_idss_t *idss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_fll_idss_adjust_) || !defined(_di_f_type_fll_idss_decimate_by_) /** @@ -524,7 +524,7 @@ extern "C" { * @see f_type_fll_idss_resize() */ #if !defined(_di_f_type_fll_idss_decrease_by_) || !defined(_di_f_type_fll_idss_increase_) || !defined(_di_f_type_fll_idss_increase_by_) || !defined(_di_f_type_fll_idss_resize_) - extern f_status_t private_f_type_fll_idss_resize(const f_array_length_t length, f_fll_idss_t *idss) f_attribute_visibility_internal; + extern f_status_t private_f_type_fll_idss_resize(const f_array_length_t length, f_fll_idss_t *idss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_fll_idss_decrease_by_) || !defined(_di_f_type_fll_idss_increase_) || !defined(_di_f_type_fll_idss_increase_by_) || !defined(_di_f_type_fll_idss_resize_) /** * Private implementation for resizing the array_lengths array. @@ -546,7 +546,7 @@ extern "C" { * @see f_type_array_lengths_decimate_by() */ #if !defined(_di_f_type_array_lengths_adjust_) || !defined(_di_f_type_array_lengths_decimate_by_) - extern f_status_t private_f_type_array_lengths_adjust(const f_array_length_t length, f_array_lengths_t *lengths) f_attribute_visibility_internal; + extern f_status_t private_f_type_array_lengths_adjust(const f_array_length_t length, f_array_lengths_t *lengths) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_array_lengths_adjust_) || !defined(_di_f_type_array_lengths_decimate_by_) /** @@ -568,7 +568,7 @@ extern "C" { * @see f_type_array_lengthss_append() */ #if !defined(_di_f_type_array_lengths_append_) || !defined(_di_f_type_array_lengthss_append_) - extern f_status_t private_f_type_array_lengths_append(const f_array_lengths_t source, f_array_lengths_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_type_array_lengths_append(const f_array_lengths_t source, f_array_lengths_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_array_lengths_append_) || !defined(_di_f_type_array_lengthss_append_) /** @@ -593,7 +593,7 @@ extern "C" { * @see f_type_array_lengthss_append() */ #if !defined(_di_f_type_array_lengths_resize_) || !defined(_di_f_type_array_lengths_append_) || !defined(_di_f_type_array_lengths_decimate_by_) || !defined(_di_f_type_array_lengthss_append_) - extern f_status_t private_f_type_array_lengths_resize(const f_array_length_t length, f_array_lengths_t *lengths) f_attribute_visibility_internal; + extern f_status_t private_f_type_array_lengths_resize(const f_array_length_t length, f_array_lengths_t *lengths) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_array_lengths_resize_) || !defined(_di_f_type_array_lengths_append_) || !defined(_di_f_type_array_lengths_decimate_by_) || !defined(_di_f_type_array_lengthss_append_) /** @@ -621,7 +621,7 @@ extern "C" { * @see f_type_array_lengthss_decimate_by() */ #if !defined(_di_f_type_array_lengthss_adjust_) || !defined(_di_f_type_array_lengthss_decimate_by_) - extern f_status_t private_f_type_array_lengthss_adjust(const f_array_length_t length, f_array_lengthss_t *lengthss) f_attribute_visibility_internal; + extern f_status_t private_f_type_array_lengthss_adjust(const f_array_length_t length, f_array_lengthss_t *lengthss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_array_lengthss_adjust_) || !defined(_di_f_type_array_lengthss_decimate_by_) /** @@ -651,7 +651,7 @@ extern "C" { * @see f_type_array_lengthss_resize() */ #if !defined(_di_f_type_array_lengthss_decrease_by_) || !defined(_di_f_type_array_lengthss_increase_) || !defined(_di_f_type_array_lengthss_increase_by_) || !defined(_di_f_type_array_lengthss_resize_) - extern f_status_t private_f_type_array_lengthss_resize(const f_array_length_t length, f_array_lengthss_t *lengthss) f_attribute_visibility_internal; + extern f_status_t private_f_type_array_lengthss_resize(const f_array_length_t length, f_array_lengthss_t *lengthss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_array_lengthss_decrease_by_) || !defined(_di_f_type_array_lengthss_increase_) || !defined(_di_f_type_array_lengthss_increase_by_) || !defined(_di_f_type_array_lengthss_resize_) /** @@ -674,7 +674,7 @@ extern "C" { * @see f_type_int8s_decimate_by() */ #if !defined(_di_f_type_int8s_adjust_) || !defined(_di_f_type_int8s_decimate_by_) - extern f_status_t private_f_type_int8s_adjust(const f_array_length_t length, f_int8s_t *int8s) f_attribute_visibility_internal; + extern f_status_t private_f_type_int8s_adjust(const f_array_length_t length, f_int8s_t *int8s) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int8s_adjust_) || !defined(_di_f_type_int8s_decimate_by_) /** @@ -696,7 +696,7 @@ extern "C" { * @see f_type_int8ss_append() */ #if !defined(_di_f_type_int8s_append_) || !defined(_di_f_type_int8ss_append_) - extern f_status_t private_f_type_int8s_append(const f_int8s_t source, f_int8s_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_type_int8s_append(const f_int8s_t source, f_int8s_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int8s_append_) || !defined(_di_f_type_int8ss_append_) /** @@ -721,7 +721,7 @@ extern "C" { * @see f_type_int8ss_append() */ #if !defined(_di_f_type_int8s_resize_) || !defined(_di_f_type_int8s_append_) || !defined(_di_f_type_int8s_decimate_by_) || !defined(_di_f_type_int8ss_append_) - extern f_status_t private_f_type_int8s_resize(const f_array_length_t length, f_int8s_t *int8s) f_attribute_visibility_internal; + extern f_status_t private_f_type_int8s_resize(const f_array_length_t length, f_int8s_t *int8s) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int8s_resize_) || !defined(_di_f_type_int8s_append_) || !defined(_di_f_type_int8s_decimate_by_) || !defined(_di_f_type_int8ss_append_) /** @@ -749,7 +749,7 @@ extern "C" { * @see f_type_int8ss_decimate_by() */ #if !defined(_di_f_type_int8ss_adjust_) || !defined(_di_f_type_int8ss_decimate_by_) - extern f_status_t private_f_type_int8ss_adjust(const f_array_length_t length, f_int8ss_t *int8ss) f_attribute_visibility_internal; + extern f_status_t private_f_type_int8ss_adjust(const f_array_length_t length, f_int8ss_t *int8ss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int8ss_adjust_) || !defined(_di_f_type_int8ss_decimate_by_) /** @@ -779,7 +779,7 @@ extern "C" { * @see f_type_int8ss_resize() */ #if !defined(_di_f_type_int8ss_decrease_by_) || !defined(_di_f_type_int8ss_increase_) || !defined(_di_f_type_int8ss_increase_by_) || !defined(_di_f_type_int8ss_resize_) - extern f_status_t private_f_type_int8ss_resize(const f_array_length_t length, f_int8ss_t *int8ss) f_attribute_visibility_internal; + extern f_status_t private_f_type_int8ss_resize(const f_array_length_t length, f_int8ss_t *int8ss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int8ss_decrease_by_) || !defined(_di_f_type_int8ss_increase_) || !defined(_di_f_type_int8ss_increase_by_) || !defined(_di_f_type_int8ss_resize_) /** @@ -802,7 +802,7 @@ extern "C" { * @see f_type_uint8s_decimate_by() */ #if !defined(_di_f_type_uint8s_adjust_) || !defined(_di_f_type_uint8s_decimate_by_) - extern f_status_t private_f_type_uint8s_adjust(const f_array_length_t length, f_uint8s_t *uint8s) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint8s_adjust(const f_array_length_t length, f_uint8s_t *uint8s) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint8s_adjust_) || !defined(_di_f_type_uint8s_decimate_by_) /** @@ -824,7 +824,7 @@ extern "C" { * @see f_type_uint8ss_append() */ #if !defined(_di_f_type_uint8s_append_) || !defined(_di_f_type_uint8ss_append_) - extern f_status_t private_f_type_uint8s_append(const f_uint8s_t source, f_uint8s_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint8s_append(const f_uint8s_t source, f_uint8s_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint8s_append_) || !defined(_di_f_type_uint8ss_append_) /** @@ -849,7 +849,7 @@ extern "C" { * @see f_type_uint8ss_append() */ #if !defined(_di_f_type_uint8s_resize_) || !defined(_di_f_type_uint8s_append_) || !defined(_di_f_type_uint8s_decimate_by_) || !defined(_di_f_type_uint8ss_append_) - extern f_status_t private_f_type_uint8s_resize(const f_array_length_t length, f_uint8s_t *uint8s) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint8s_resize(const f_array_length_t length, f_uint8s_t *uint8s) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint8s_resize_) || !defined(_di_f_type_uint8s_append_) || !defined(_di_f_type_uint8s_decimate_by_) || !defined(_di_f_type_uint8ss_append_) /** @@ -877,7 +877,7 @@ extern "C" { * @see f_type_uint8ss_decimate_by() */ #if !defined(_di_f_type_uint8ss_adjust_) || !defined(_di_f_type_uint8ss_decimate_by_) - extern f_status_t private_f_type_uint8ss_adjust(const f_array_length_t length, f_uint8ss_t *uint8ss) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint8ss_adjust(const f_array_length_t length, f_uint8ss_t *uint8ss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint8ss_adjust_) || !defined(_di_f_type_uint8ss_decimate_by_) /** @@ -907,7 +907,7 @@ extern "C" { * @see f_type_uint8ss_resize() */ #if !defined(_di_f_type_uint8ss_decrease_by_) || !defined(_di_f_type_uint8ss_increase_) || !defined(_di_f_type_uint8ss_increase_by_) || !defined(_di_f_type_uint8ss_resize_) - extern f_status_t private_f_type_uint8ss_resize(const f_array_length_t length, f_uint8ss_t *uint8ss) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint8ss_resize(const f_array_length_t length, f_uint8ss_t *uint8ss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint8ss_decrease_by_) || !defined(_di_f_type_uint8ss_increase_) || !defined(_di_f_type_uint8ss_increase_by_) || !defined(_di_f_type_uint8ss_resize_) /** @@ -930,7 +930,7 @@ extern "C" { * @see f_type_int16s_decimate_by() */ #if !defined(_di_f_type_int16s_adjust_) || !defined(_di_f_type_int16s_decimate_by_) - extern f_status_t private_f_type_int16s_adjust(const f_array_length_t length, f_int16s_t *int16s) f_attribute_visibility_internal; + extern f_status_t private_f_type_int16s_adjust(const f_array_length_t length, f_int16s_t *int16s) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int16s_adjust_) || !defined(_di_f_type_int16s_decimate_by_) /** @@ -952,7 +952,7 @@ extern "C" { * @see f_type_int16ss_append() */ #if !defined(_di_f_type_int16s_append_) || !defined(_di_f_type_int16ss_append_) - extern f_status_t private_f_type_int16s_append(const f_int16s_t source, f_int16s_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_type_int16s_append(const f_int16s_t source, f_int16s_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int16s_append_) || !defined(_di_f_type_int16ss_append_) /** @@ -977,7 +977,7 @@ extern "C" { * @see f_type_int16ss_append() */ #if !defined(_di_f_type_int16s_resize_) || !defined(_di_f_type_int16s_append_) || !defined(_di_f_type_int16s_decimate_by_) || !defined(_di_f_type_int16ss_append_) - extern f_status_t private_f_type_int16s_resize(const f_array_length_t length, f_int16s_t *int16s) f_attribute_visibility_internal; + extern f_status_t private_f_type_int16s_resize(const f_array_length_t length, f_int16s_t *int16s) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int16s_resize_) || !defined(_di_f_type_int16s_append_) || !defined(_di_f_type_int16s_decimate_by_) || !defined(_di_f_type_int16ss_append_) /** @@ -1005,7 +1005,7 @@ extern "C" { * @see f_type_int16ss_decimate_by() */ #if !defined(_di_f_type_int16ss_adjust_) || !defined(_di_f_type_int16ss_decimate_by_) - extern f_status_t private_f_type_int16ss_adjust(const f_array_length_t length, f_int16ss_t *int16ss) f_attribute_visibility_internal; + extern f_status_t private_f_type_int16ss_adjust(const f_array_length_t length, f_int16ss_t *int16ss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int16ss_adjust_) || !defined(_di_f_type_int16ss_decimate_by_) /** @@ -1035,7 +1035,7 @@ extern "C" { * @see f_type_int16ss_resize() */ #if !defined(_di_f_type_int16ss_decrease_by_) || !defined(_di_f_type_int16ss_increase_) || !defined(_di_f_type_int16ss_increase_by_) || !defined(_di_f_type_int16ss_resize_) - extern f_status_t private_f_type_int16ss_resize(const f_array_length_t length, f_int16ss_t *int16ss) f_attribute_visibility_internal; + extern f_status_t private_f_type_int16ss_resize(const f_array_length_t length, f_int16ss_t *int16ss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int16ss_decrease_by_) || !defined(_di_f_type_int16ss_increase_) || !defined(_di_f_type_int16ss_increase_by_) || !defined(_di_f_type_int16ss_resize_) /** @@ -1058,7 +1058,7 @@ extern "C" { * @see f_type_uint16s_decimate_by() */ #if !defined(_di_f_type_uint16s_adjust_) || !defined(_di_f_type_uint16s_decimate_by_) - extern f_status_t private_f_type_uint16s_adjust(const f_array_length_t length, f_uint16s_t *uint16s) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint16s_adjust(const f_array_length_t length, f_uint16s_t *uint16s) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint16s_adjust_) || !defined(_di_f_type_uint16s_decimate_by_) /** @@ -1080,7 +1080,7 @@ extern "C" { * @see f_type_uint16ss_append() */ #if !defined(_di_f_type_uint16s_append_) || !defined(_di_f_type_uint16ss_append_) - extern f_status_t private_f_type_uint16s_append(const f_uint16s_t source, f_uint16s_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint16s_append(const f_uint16s_t source, f_uint16s_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint16s_append_) || !defined(_di_f_type_uint16ss_append_) /** @@ -1105,7 +1105,7 @@ extern "C" { * @see f_type_uint16ss_append() */ #if !defined(_di_f_type_uint16s_resize_) || !defined(_di_f_type_uint16s_append_) || !defined(_di_f_type_uint16s_decimate_by_) || !defined(_di_f_type_uint16ss_append_) - extern f_status_t private_f_type_uint16s_resize(const f_array_length_t length, f_uint16s_t *uint16s) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint16s_resize(const f_array_length_t length, f_uint16s_t *uint16s) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint16s_resize_) || !defined(_di_f_type_uint16s_append_) || !defined(_di_f_type_uint16s_decimate_by_) || !defined(_di_f_type_uint16ss_append_) /** @@ -1133,7 +1133,7 @@ extern "C" { * @see f_type_uint16ss_decimate_by() */ #if !defined(_di_f_type_uint16ss_adjust_) || !defined(_di_f_type_uint16ss_decimate_by_) - extern f_status_t private_f_type_uint16ss_adjust(const f_array_length_t length, f_uint16ss_t *uint16ss) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint16ss_adjust(const f_array_length_t length, f_uint16ss_t *uint16ss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint16ss_adjust_) || !defined(_di_f_type_uint16ss_decimate_by_) /** @@ -1163,7 +1163,7 @@ extern "C" { * @see f_type_uint16ss_resize() */ #if !defined(_di_f_type_uint16ss_decrease_by_) || !defined(_di_f_type_uint16ss_increase_) || !defined(_di_f_type_uint16ss_increase_by_) || !defined(_di_f_type_uint16ss_resize_) - extern f_status_t private_f_type_uint16ss_resize(const f_array_length_t length, f_uint16ss_t *uint16ss) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint16ss_resize(const f_array_length_t length, f_uint16ss_t *uint16ss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint16ss_decrease_by_) || !defined(_di_f_type_uint16ss_increase_) || !defined(_di_f_type_uint16ss_increase_by_) || !defined(_di_f_type_uint16ss_resize_) /** @@ -1186,7 +1186,7 @@ extern "C" { * @see f_type_int32s_decimate_by() */ #if !defined(_di_f_type_int32s_adjust_) || !defined(_di_f_type_int32s_decimate_by_) - extern f_status_t private_f_type_int32s_adjust(const f_array_length_t length, f_int32s_t *int32s) f_attribute_visibility_internal; + extern f_status_t private_f_type_int32s_adjust(const f_array_length_t length, f_int32s_t *int32s) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int32s_adjust_) || !defined(_di_f_type_int32s_decimate_by_) /** @@ -1208,7 +1208,7 @@ extern "C" { * @see f_type_int32ss_append() */ #if !defined(_di_f_type_int32s_append_) || !defined(_di_f_type_int32ss_append_) - extern f_status_t private_f_type_int32s_append(const f_int32s_t source, f_int32s_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_type_int32s_append(const f_int32s_t source, f_int32s_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int32s_append_) || !defined(_di_f_type_int32ss_append_) /** @@ -1233,7 +1233,7 @@ extern "C" { * @see f_type_int32ss_append() */ #if !defined(_di_f_type_int32s_resize_) || !defined(_di_f_type_int32s_append_) || !defined(_di_f_type_int32s_decimate_by_) || !defined(_di_f_type_int32ss_append_) - extern f_status_t private_f_type_int32s_resize(const f_array_length_t length, f_int32s_t *int32s) f_attribute_visibility_internal; + extern f_status_t private_f_type_int32s_resize(const f_array_length_t length, f_int32s_t *int32s) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int32s_resize_) || !defined(_di_f_type_int32s_append_) || !defined(_di_f_type_int32s_decimate_by_) || !defined(_di_f_type_int32ss_append_) /** @@ -1261,7 +1261,7 @@ extern "C" { * @see f_type_int32ss_decimate_by() */ #if !defined(_di_f_type_int32ss_adjust_) || !defined(_di_f_type_int32ss_decimate_by_) - extern f_status_t private_f_type_int32ss_adjust(const f_array_length_t length, f_int32ss_t *int32ss) f_attribute_visibility_internal; + extern f_status_t private_f_type_int32ss_adjust(const f_array_length_t length, f_int32ss_t *int32ss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int32ss_adjust_) || !defined(_di_f_type_int32ss_decimate_by_) /** @@ -1291,7 +1291,7 @@ extern "C" { * @see f_type_int32ss_resize() */ #if !defined(_di_f_type_int32ss_decrease_by_) || !defined(_di_f_type_int32ss_increase_) || !defined(_di_f_type_int32ss_increase_by_) || !defined(_di_f_type_int32ss_resize_) - extern f_status_t private_f_type_int32ss_resize(const f_array_length_t length, f_int32ss_t *int32ss) f_attribute_visibility_internal; + extern f_status_t private_f_type_int32ss_resize(const f_array_length_t length, f_int32ss_t *int32ss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int32ss_decrease_by_) || !defined(_di_f_type_int32ss_increase_) || !defined(_di_f_type_int32ss_increase_by_) || !defined(_di_f_type_int32ss_resize_) /** @@ -1314,7 +1314,7 @@ extern "C" { * @see f_type_uint32s_decimate_by() */ #if !defined(_di_f_type_uint32s_adjust_) || !defined(_di_f_type_uint32s_decimate_by_) - extern f_status_t private_f_type_uint32s_adjust(const f_array_length_t length, f_uint32s_t *uint32s) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint32s_adjust(const f_array_length_t length, f_uint32s_t *uint32s) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint32s_adjust_) || !defined(_di_f_type_uint32s_decimate_by_) /** @@ -1336,7 +1336,7 @@ extern "C" { * @see f_type_uint32ss_append() */ #if !defined(_di_f_type_uint32s_append_) || !defined(_di_f_type_uint32ss_append_) - extern f_status_t private_f_type_uint32s_append(const f_uint32s_t source, f_uint32s_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint32s_append(const f_uint32s_t source, f_uint32s_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint32s_append_) || !defined(_di_f_type_uint32ss_append_) /** @@ -1361,7 +1361,7 @@ extern "C" { * @see f_type_uint32ss_append() */ #if !defined(_di_f_type_uint32s_resize_) || !defined(_di_f_type_uint32s_append_) || !defined(_di_f_type_uint32s_decimate_by_) || !defined(_di_f_type_uint32ss_append_) - extern f_status_t private_f_type_uint32s_resize(const f_array_length_t length, f_uint32s_t *uint32s) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint32s_resize(const f_array_length_t length, f_uint32s_t *uint32s) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint32s_resize_) || !defined(_di_f_type_uint32s_append_) || !defined(_di_f_type_uint32s_decimate_by_) || !defined(_di_f_type_uint32ss_append_) /** @@ -1389,7 +1389,7 @@ extern "C" { * @see f_type_uint32ss_decimate_by() */ #if !defined(_di_f_type_uint32ss_adjust_) || !defined(_di_f_type_uint32ss_decimate_by_) - extern f_status_t private_f_type_uint32ss_adjust(const f_array_length_t length, f_uint32ss_t *uint32ss) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint32ss_adjust(const f_array_length_t length, f_uint32ss_t *uint32ss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint32ss_adjust_) || !defined(_di_f_type_uint32ss_decimate_by_) /** @@ -1419,7 +1419,7 @@ extern "C" { * @see f_type_uint32ss_resize() */ #if !defined(_di_f_type_uint32ss_decrease_by_) || !defined(_di_f_type_uint32ss_increase_) || !defined(_di_f_type_uint32ss_increase_by_) || !defined(_di_f_type_uint32ss_resize_) - extern f_status_t private_f_type_uint32ss_resize(const f_array_length_t length, f_uint32ss_t *uint32ss) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint32ss_resize(const f_array_length_t length, f_uint32ss_t *uint32ss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint32ss_decrease_by_) || !defined(_di_f_type_uint32ss_increase_) || !defined(_di_f_type_uint32ss_increase_by_) || !defined(_di_f_type_uint32ss_resize_) /** @@ -1442,7 +1442,7 @@ extern "C" { * @see f_type_int64s_decimate_by() */ #if !defined(_di_f_type_int64s_adjust_) || !defined(_di_f_type_int64s_decimate_by_) - extern f_status_t private_f_type_int64s_adjust(const f_array_length_t length, f_int64s_t *int64s) f_attribute_visibility_internal; + extern f_status_t private_f_type_int64s_adjust(const f_array_length_t length, f_int64s_t *int64s) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int64s_adjust_) || !defined(_di_f_type_int64s_decimate_by_) /** @@ -1464,7 +1464,7 @@ extern "C" { * @see f_type_int64ss_append() */ #if !defined(_di_f_type_int64s_append_) || !defined(_di_f_type_int64ss_append_) - extern f_status_t private_f_type_int64s_append(const f_int64s_t source, f_int64s_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_type_int64s_append(const f_int64s_t source, f_int64s_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int64s_append_) || !defined(_di_f_type_int64ss_append_) /** @@ -1489,7 +1489,7 @@ extern "C" { * @see f_type_int64ss_append() */ #if !defined(_di_f_type_int64s_resize_) || !defined(_di_f_type_int64s_append_) || !defined(_di_f_type_int64s_decimate_by_) || !defined(_di_f_type_int64ss_append_) - extern f_status_t private_f_type_int64s_resize(const f_array_length_t length, f_int64s_t *int64s) f_attribute_visibility_internal; + extern f_status_t private_f_type_int64s_resize(const f_array_length_t length, f_int64s_t *int64s) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int64s_resize_) || !defined(_di_f_type_int64s_append_) || !defined(_di_f_type_int64s_decimate_by_) || !defined(_di_f_type_int64ss_append_) /** @@ -1517,7 +1517,7 @@ extern "C" { * @see f_type_int64ss_decimate_by() */ #if !defined(_di_f_type_int64ss_adjust_) || !defined(_di_f_type_int64ss_decimate_by_) - extern f_status_t private_f_type_int64ss_adjust(const f_array_length_t length, f_int64ss_t *int64ss) f_attribute_visibility_internal; + extern f_status_t private_f_type_int64ss_adjust(const f_array_length_t length, f_int64ss_t *int64ss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int64ss_adjust_) || !defined(_di_f_type_int64ss_decimate_by_) /** @@ -1547,7 +1547,7 @@ extern "C" { * @see f_type_int64ss_resize() */ #if !defined(_di_f_type_int64ss_decrease_by_) || !defined(_di_f_type_int64ss_increase_) || !defined(_di_f_type_int64ss_increase_by_) || !defined(_di_f_type_int64ss_resize_) - extern f_status_t private_f_type_int64ss_resize(const f_array_length_t length, f_int64ss_t *int64ss) f_attribute_visibility_internal; + extern f_status_t private_f_type_int64ss_resize(const f_array_length_t length, f_int64ss_t *int64ss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int64ss_decrease_by_) || !defined(_di_f_type_int64ss_increase_) || !defined(_di_f_type_int64ss_increase_by_) || !defined(_di_f_type_int64ss_resize_) /** @@ -1570,7 +1570,7 @@ extern "C" { * @see f_type_uint64s_decimate_by() */ #if !defined(_di_f_type_uint64s_adjust_) || !defined(_di_f_type_uint64s_decimate_by_) - extern f_status_t private_f_type_uint64s_adjust(const f_array_length_t length, f_uint64s_t *uint64s) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint64s_adjust(const f_array_length_t length, f_uint64s_t *uint64s) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint64s_adjust_) || !defined(_di_f_type_uint64s_decimate_by_) /** @@ -1592,7 +1592,7 @@ extern "C" { * @see f_type_uint64ss_append() */ #if !defined(_di_f_type_uint64s_append_) || !defined(_di_f_type_uint64ss_append_) - extern f_status_t private_f_type_uint64s_append(const f_uint64s_t source, f_uint64s_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint64s_append(const f_uint64s_t source, f_uint64s_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint64s_append_) || !defined(_di_f_type_uint64ss_append_) /** @@ -1617,7 +1617,7 @@ extern "C" { * @see f_type_uint64ss_append() */ #if !defined(_di_f_type_uint64s_resize_) || !defined(_di_f_type_uint64s_append_) || !defined(_di_f_type_uint64s_decimate_by_) || !defined(_di_f_type_uint64ss_append_) - extern f_status_t private_f_type_uint64s_resize(const f_array_length_t length, f_uint64s_t *uint64s) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint64s_resize(const f_array_length_t length, f_uint64s_t *uint64s) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint64s_resize_) || !defined(_di_f_type_uint64s_append_) || !defined(_di_f_type_uint64s_decimate_by_) || !defined(_di_f_type_uint64ss_append_) /** @@ -1645,7 +1645,7 @@ extern "C" { * @see f_type_uint64ss_decimate_by() */ #if !defined(_di_f_type_uint64ss_adjust_) || !defined(_di_f_type_uint64ss_decimate_by_) - extern f_status_t private_f_type_uint64ss_adjust(const f_array_length_t length, f_uint64ss_t *uint64ss) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint64ss_adjust(const f_array_length_t length, f_uint64ss_t *uint64ss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint64ss_adjust_) || !defined(_di_f_type_uint64ss_decimate_by_) /** @@ -1675,7 +1675,7 @@ extern "C" { * @see f_type_uint64ss_resize() */ #if !defined(_di_f_type_uint64ss_decrease_by_) || !defined(_di_f_type_uint64ss_increase_) || !defined(_di_f_type_uint64ss_increase_by_) || !defined(_di_f_type_uint64ss_resize_) - extern f_status_t private_f_type_uint64ss_resize(const f_array_length_t length, f_uint64ss_t *uint64ss) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint64ss_resize(const f_array_length_t length, f_uint64ss_t *uint64ss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint64ss_decrease_by_) || !defined(_di_f_type_uint64ss_increase_) || !defined(_di_f_type_uint64ss_increase_by_) || !defined(_di_f_type_uint64ss_resize_) /** @@ -1698,7 +1698,7 @@ extern "C" { * @see f_type_int128s_decimate_by() */ #if !defined(_di_f_type_int128s_adjust_) || !defined(_di_f_type_int128s_decimate_by_) - extern f_status_t private_f_type_int128s_adjust(const f_array_length_t length, f_int128s_t *int128s) f_attribute_visibility_internal; + extern f_status_t private_f_type_int128s_adjust(const f_array_length_t length, f_int128s_t *int128s) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int128s_adjust_) || !defined(_di_f_type_int128s_decimate_by_) /** @@ -1720,7 +1720,7 @@ extern "C" { * @see f_type_int128ss_append() */ #if !defined(_di_f_type_int128s_append_) || !defined(_di_f_type_int128ss_append_) - extern f_status_t private_f_type_int128s_append(const f_int128s_t source, f_int128s_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_type_int128s_append(const f_int128s_t source, f_int128s_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int128s_append_) || !defined(_di_f_type_int128ss_append_) /** @@ -1745,7 +1745,7 @@ extern "C" { * @see f_type_int128ss_append() */ #if !defined(_di_f_type_int128s_resize_) || !defined(_di_f_type_int128s_append_) || !defined(_di_f_type_int128s_decimate_by_) || !defined(_di_f_type_int128ss_append_) - extern f_status_t private_f_type_int128s_resize(const f_array_length_t length, f_int128s_t *int128s) f_attribute_visibility_internal; + extern f_status_t private_f_type_int128s_resize(const f_array_length_t length, f_int128s_t *int128s) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int128s_resize_) || !defined(_di_f_type_int128s_append_) || !defined(_di_f_type_int128s_decimate_by_) || !defined(_di_f_type_int128ss_append_) /** @@ -1773,7 +1773,7 @@ extern "C" { * @see f_type_int128ss_decimate_by() */ #if !defined(_di_f_type_int128ss_adjust_) || !defined(_di_f_type_int128ss_decimate_by_) - extern f_status_t private_f_type_int128ss_adjust(const f_array_length_t length, f_int128ss_t *int128ss) f_attribute_visibility_internal; + extern f_status_t private_f_type_int128ss_adjust(const f_array_length_t length, f_int128ss_t *int128ss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int128ss_adjust_) || !defined(_di_f_type_int128ss_decimate_by_) /** @@ -1803,7 +1803,7 @@ extern "C" { * @see f_type_int128ss_resize() */ #if !defined(_di_f_type_int128ss_decrease_by_) || !defined(_di_f_type_int128ss_increase_) || !defined(_di_f_type_int128ss_increase_by_) || !defined(_di_f_type_int128ss_resize_) - extern f_status_t private_f_type_int128ss_resize(const f_array_length_t length, f_int128ss_t *int128ss) f_attribute_visibility_internal; + extern f_status_t private_f_type_int128ss_resize(const f_array_length_t length, f_int128ss_t *int128ss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_int128ss_decrease_by_) || !defined(_di_f_type_int128ss_increase_) || !defined(_di_f_type_int128ss_increase_by_) || !defined(_di_f_type_int128ss_resize_) /** @@ -1826,7 +1826,7 @@ extern "C" { * @see f_type_uint128s_decimate_by() */ #if !defined(_di_f_type_uint128s_adjust_) || !defined(_di_f_type_uint128s_decimate_by_) - extern f_status_t private_f_type_uint128s_adjust(const f_array_length_t length, f_uint128s_t *uint128s) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint128s_adjust(const f_array_length_t length, f_uint128s_t *uint128s) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint128s_adjust_) || !defined(_di_f_type_uint128s_decimate_by_) /** @@ -1848,7 +1848,7 @@ extern "C" { * @see f_type_uint128ss_append() */ #if !defined(_di_f_type_uint128s_append_) || !defined(_di_f_type_uint128ss_append_) - extern f_status_t private_f_type_uint128s_append(const f_uint128s_t source, f_uint128s_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint128s_append(const f_uint128s_t source, f_uint128s_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint128s_append_) || !defined(_di_f_type_uint128ss_append_) /** @@ -1873,7 +1873,7 @@ extern "C" { * @see f_type_uint128ss_append() */ #if !defined(_di_f_type_uint128s_resize_) || !defined(_di_f_type_uint128s_append_) || !defined(_di_f_type_uint128s_decimate_by_) || !defined(_di_f_type_uint128ss_append_) - extern f_status_t private_f_type_uint128s_resize(const f_array_length_t length, f_uint128s_t *uint128s) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint128s_resize(const f_array_length_t length, f_uint128s_t *uint128s) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint128s_resize_) || !defined(_di_f_type_uint128s_append_) || !defined(_di_f_type_uint128s_decimate_by_) || !defined(_di_f_type_uint128ss_append_) /** @@ -1901,7 +1901,7 @@ extern "C" { * @see f_type_uint128ss_decimate_by() */ #if !defined(_di_f_type_uint128ss_adjust_) || !defined(_di_f_type_uint128ss_decimate_by_) - extern f_status_t private_f_type_uint128ss_adjust(const f_array_length_t length, f_uint128ss_t *uint128ss) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint128ss_adjust(const f_array_length_t length, f_uint128ss_t *uint128ss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint128ss_adjust_) || !defined(_di_f_type_uint128ss_decimate_by_) /** @@ -1931,7 +1931,7 @@ extern "C" { * @see f_type_uint128ss_resize() */ #if !defined(_di_f_type_uint128ss_decrease_by_) || !defined(_di_f_type_uint128ss_increase_) || !defined(_di_f_type_uint128ss_increase_by_) || !defined(_di_f_type_uint128ss_resize_) - extern f_status_t private_f_type_uint128ss_resize(const f_array_length_t length, f_uint128ss_t *uint128ss) f_attribute_visibility_internal; + extern f_status_t private_f_type_uint128ss_resize(const f_array_length_t length, f_uint128ss_t *uint128ss) F_attribute_visibility_internal_d; #endif // !defined(_di_f_type_uint128ss_decrease_by_) || !defined(_di_f_type_uint128ss_increase_) || !defined(_di_f_type_uint128ss_increase_by_) || !defined(_di_f_type_uint128ss_resize_) #ifdef __cplusplus diff --git a/level_0/f_type_array/c/type_array.c b/level_0/f_type_array/c/type_array.c index eb3625c..fe09afb 100644 --- a/level_0/f_type_array/c/type_array.c +++ b/level_0/f_type_array/c/type_array.c @@ -67,12 +67,12 @@ extern "C" { if (statuss->used + 1 > statuss->size) { f_array_length_t size = statuss->used + step; - if (size > f_array_length_t_size) { - if (statuss->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (statuss->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_statuss_resize(size, statuss); @@ -90,7 +90,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (statuss->used + amount > statuss->size) { - if (statuss->used + amount > f_array_length_t_size) { + if (statuss->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -185,12 +185,12 @@ extern "C" { if (statusss->used + 1 > statusss->size) { f_array_length_t size = statusss->used + step; - if (size > f_array_length_t_size) { - if (statusss->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (statusss->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_statusss_resize(size, statusss); @@ -208,7 +208,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (statusss->used + amount > statusss->size) { - if (statusss->used + amount > f_array_length_t_size) { + if (statusss->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -291,12 +291,12 @@ extern "C" { if (states->used + 1 > states->size) { f_array_length_t size = states->used + step; - if (size > f_array_length_t_size) { - if (states->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (states->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_states_resize(size, states); @@ -314,7 +314,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (states->used + amount > states->size) { - if (states->used + amount > f_array_length_t_size) { + if (states->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -409,12 +409,12 @@ extern "C" { if (statess->used + 1 > statess->size) { f_array_length_t size = statess->used + step; - if (size > f_array_length_t_size) { - if (statess->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (statess->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_statess_resize(size, statess); @@ -432,7 +432,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (statess->used + amount > statess->size) { - if (statess->used + amount > f_array_length_t_size) { + if (statess->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -515,12 +515,12 @@ extern "C" { if (cells->used + 1 > cells->size) { f_array_length_t size = cells->used + step; - if (size > f_array_length_t_size) { - if (cells->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (cells->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_cells_resize(size, cells); @@ -538,7 +538,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (cells->used + amount > cells->size) { - if (cells->used + amount > f_array_length_t_size) { + if (cells->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -633,12 +633,12 @@ extern "C" { if (cellss->used + 1 > cellss->size) { f_array_length_t size = cellss->used + step; - if (size > f_array_length_t_size) { - if (cellss->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (cellss->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_cellss_resize(size, cellss); @@ -656,7 +656,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (cellss->used + amount > cellss->size) { - if (cellss->used + amount > f_array_length_t_size) { + if (cellss->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -739,12 +739,12 @@ extern "C" { if (ids->used + 1 > ids->size) { f_array_length_t size = ids->used + step; - if (size > f_array_length_t_size) { - if (ids->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (ids->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_fll_ids_resize(size, ids); @@ -762,7 +762,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (ids->used + amount > ids->size) { - if (ids->used + amount > f_array_length_t_size) { + if (ids->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -857,12 +857,12 @@ extern "C" { if (idss->used + 1 > idss->size) { f_array_length_t size = idss->used + step; - if (size > f_array_length_t_size) { - if (idss->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (idss->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_fll_idss_resize(size, idss); @@ -880,7 +880,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (idss->used + amount > idss->size) { - if (idss->used + amount > f_array_length_t_size) { + if (idss->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -963,12 +963,12 @@ extern "C" { if (lengths->used + 1 > lengths->size) { f_array_length_t size = lengths->used + step; - if (size > f_array_length_t_size) { - if (lengths->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (lengths->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_array_lengths_resize(size, lengths); @@ -986,7 +986,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (lengths->used + amount > lengths->size) { - if (lengths->used + amount > f_array_length_t_size) { + if (lengths->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -1081,12 +1081,12 @@ extern "C" { if (lengthss->used + 1 > lengthss->size) { f_array_length_t size = lengthss->used + step; - if (size > f_array_length_t_size) { - if (lengthss->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (lengthss->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_array_lengthss_resize(size, lengthss); @@ -1104,7 +1104,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (lengthss->used + amount > lengthss->size) { - if (lengthss->used + amount > f_array_length_t_size) { + if (lengthss->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -1187,12 +1187,12 @@ extern "C" { if (int8s->used + 1 > int8s->size) { f_array_length_t size = int8s->used + step; - if (size > f_array_length_t_size) { - if (int8s->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (int8s->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_int8s_resize(size, int8s); @@ -1210,7 +1210,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (int8s->used + amount > int8s->size) { - if (int8s->used + amount > f_array_length_t_size) { + if (int8s->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -1305,12 +1305,12 @@ extern "C" { if (int8ss->used + 1 > int8ss->size) { f_array_length_t size = int8ss->used + step; - if (size > f_array_length_t_size) { - if (int8ss->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (int8ss->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_int8ss_resize(size, int8ss); @@ -1328,7 +1328,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (int8ss->used + amount > int8ss->size) { - if (int8ss->used + amount > f_array_length_t_size) { + if (int8ss->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -1411,12 +1411,12 @@ extern "C" { if (uint8s->used + 1 > uint8s->size) { f_array_length_t size = uint8s->used + step; - if (size > f_array_length_t_size) { - if (uint8s->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (uint8s->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_uint8s_resize(size, uint8s); @@ -1434,7 +1434,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (uint8s->used + amount > uint8s->size) { - if (uint8s->used + amount > f_array_length_t_size) { + if (uint8s->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -1529,12 +1529,12 @@ extern "C" { if (uint8ss->used + 1 > uint8ss->size) { f_array_length_t size = uint8ss->used + step; - if (size > f_array_length_t_size) { - if (uint8ss->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (uint8ss->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_uint8ss_resize(size, uint8ss); @@ -1552,7 +1552,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (uint8ss->used + amount > uint8ss->size) { - if (uint8ss->used + amount > f_array_length_t_size) { + if (uint8ss->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -1635,12 +1635,12 @@ extern "C" { if (int16s->used + 1 > int16s->size) { f_array_length_t size = int16s->used + step; - if (size > f_array_length_t_size) { - if (int16s->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (int16s->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_int16s_resize(size, int16s); @@ -1658,7 +1658,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (int16s->used + amount > int16s->size) { - if (int16s->used + amount > f_array_length_t_size) { + if (int16s->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -1753,12 +1753,12 @@ extern "C" { if (int16ss->used + 1 > int16ss->size) { f_array_length_t size = int16ss->used + step; - if (size > f_array_length_t_size) { - if (int16ss->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (int16ss->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_int16ss_resize(size, int16ss); @@ -1776,7 +1776,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (int16ss->used + amount > int16ss->size) { - if (int16ss->used + amount > f_array_length_t_size) { + if (int16ss->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -1859,12 +1859,12 @@ extern "C" { if (uint16s->used + 1 > uint16s->size) { f_array_length_t size = uint16s->used + step; - if (size > f_array_length_t_size) { - if (uint16s->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (uint16s->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_uint16s_resize(size, uint16s); @@ -1882,7 +1882,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (uint16s->used + amount > uint16s->size) { - if (uint16s->used + amount > f_array_length_t_size) { + if (uint16s->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -1977,12 +1977,12 @@ extern "C" { if (uint16ss->used + 1 > uint16ss->size) { f_array_length_t size = uint16ss->used + step; - if (size > f_array_length_t_size) { - if (uint16ss->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (uint16ss->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_uint16ss_resize(size, uint16ss); @@ -2000,7 +2000,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (uint16ss->used + amount > uint16ss->size) { - if (uint16ss->used + amount > f_array_length_t_size) { + if (uint16ss->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -2083,12 +2083,12 @@ extern "C" { if (int32s->used + 1 > int32s->size) { f_array_length_t size = int32s->used + step; - if (size > f_array_length_t_size) { - if (int32s->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (int32s->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_int32s_resize(size, int32s); @@ -2106,7 +2106,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (int32s->used + amount > int32s->size) { - if (int32s->used + amount > f_array_length_t_size) { + if (int32s->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -2201,12 +2201,12 @@ extern "C" { if (int32ss->used + 1 > int32ss->size) { f_array_length_t size = int32ss->used + step; - if (size > f_array_length_t_size) { - if (int32ss->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (int32ss->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_int32ss_resize(size, int32ss); @@ -2224,7 +2224,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (int32ss->used + amount > int32ss->size) { - if (int32ss->used + amount > f_array_length_t_size) { + if (int32ss->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -2307,12 +2307,12 @@ extern "C" { if (uint32s->used + 1 > uint32s->size) { f_array_length_t size = uint32s->used + step; - if (size > f_array_length_t_size) { - if (uint32s->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (uint32s->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_uint32s_resize(size, uint32s); @@ -2330,7 +2330,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (uint32s->used + amount > uint32s->size) { - if (uint32s->used + amount > f_array_length_t_size) { + if (uint32s->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -2425,12 +2425,12 @@ extern "C" { if (uint32ss->used + 1 > uint32ss->size) { f_array_length_t size = uint32ss->used + step; - if (size > f_array_length_t_size) { - if (uint32ss->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (uint32ss->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_uint32ss_resize(size, uint32ss); @@ -2448,7 +2448,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (uint32ss->used + amount > uint32ss->size) { - if (uint32ss->used + amount > f_array_length_t_size) { + if (uint32ss->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -2531,12 +2531,12 @@ extern "C" { if (int64s->used + 1 > int64s->size) { f_array_length_t size = int64s->used + step; - if (size > f_array_length_t_size) { - if (int64s->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (int64s->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_int64s_resize(size, int64s); @@ -2554,7 +2554,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (int64s->used + amount > int64s->size) { - if (int64s->used + amount > f_array_length_t_size) { + if (int64s->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -2649,12 +2649,12 @@ extern "C" { if (int64ss->used + 1 > int64ss->size) { f_array_length_t size = int64ss->used + step; - if (size > f_array_length_t_size) { - if (int64ss->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (int64ss->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_int64ss_resize(size, int64ss); @@ -2672,7 +2672,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (int64ss->used + amount > int64ss->size) { - if (int64ss->used + amount > f_array_length_t_size) { + if (int64ss->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -2755,12 +2755,12 @@ extern "C" { if (uint64s->used + 1 > uint64s->size) { f_array_length_t size = uint64s->used + step; - if (size > f_array_length_t_size) { - if (uint64s->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (uint64s->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_uint64s_resize(size, uint64s); @@ -2778,7 +2778,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (uint64s->used + amount > uint64s->size) { - if (uint64s->used + amount > f_array_length_t_size) { + if (uint64s->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -2873,12 +2873,12 @@ extern "C" { if (uint64ss->used + 1 > uint64ss->size) { f_array_length_t size = uint64ss->used + step; - if (size > f_array_length_t_size) { - if (uint64ss->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (uint64ss->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_uint64ss_resize(size, uint64ss); @@ -2896,7 +2896,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (uint64ss->used + amount > uint64ss->size) { - if (uint64ss->used + amount > f_array_length_t_size) { + if (uint64ss->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -2979,12 +2979,12 @@ extern "C" { if (int128s->used + 1 > int128s->size) { f_array_length_t size = int128s->used + step; - if (size > f_array_length_t_size) { - if (int128s->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (int128s->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_int128s_resize(size, int128s); @@ -3002,7 +3002,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (int128s->used + amount > int128s->size) { - if (int128s->used + amount > f_array_length_t_size) { + if (int128s->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -3097,12 +3097,12 @@ extern "C" { if (int128ss->used + 1 > int128ss->size) { f_array_length_t size = int128ss->used + step; - if (size > f_array_length_t_size) { - if (int128ss->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (int128ss->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_int128ss_resize(size, int128ss); @@ -3120,7 +3120,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (int128ss->used + amount > int128ss->size) { - if (int128ss->used + amount > f_array_length_t_size) { + if (int128ss->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -3203,12 +3203,12 @@ extern "C" { if (uint128s->used + 1 > uint128s->size) { f_array_length_t size = uint128s->used + step; - if (size > f_array_length_t_size) { - if (uint128s->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (uint128s->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_uint128s_resize(size, uint128s); @@ -3226,7 +3226,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (uint128s->used + amount > uint128s->size) { - if (uint128s->used + amount > f_array_length_t_size) { + if (uint128s->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -3321,12 +3321,12 @@ extern "C" { if (uint128ss->used + 1 > uint128ss->size) { f_array_length_t size = uint128ss->used + step; - if (size > f_array_length_t_size) { - if (uint128ss->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (uint128ss->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_type_uint128ss_resize(size, uint128ss); @@ -3344,7 +3344,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (uint128ss->used + amount > uint128ss->size) { - if (uint128ss->used + amount > f_array_length_t_size) { + if (uint128ss->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } diff --git a/level_0/f_type_array/c/type_array.h b/level_0/f_type_array/c/type_array.h index 2340312..f94a979 100644 --- a/level_0/f_type_array/c/type_array.h +++ b/level_0/f_type_array/c/type_array.h @@ -112,7 +112,7 @@ extern "C" { /** * Increase the size of the string statuss array, but only if necesary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -138,7 +138,7 @@ extern "C" { * Resize the string statuss array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -289,7 +289,7 @@ extern "C" { /** * Increase the size of the string statusss array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -315,7 +315,7 @@ extern "C" { * Resize the string statusss array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -444,7 +444,7 @@ extern "C" { /** * Increase the size of the string states array, but only if necesary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -470,7 +470,7 @@ extern "C" { * Resize the string states array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -621,7 +621,7 @@ extern "C" { /** * Increase the size of the string statess array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -647,7 +647,7 @@ extern "C" { * Resize the string statess array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -776,7 +776,7 @@ extern "C" { /** * Increase the size of the string cells array, but only if necesary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -802,7 +802,7 @@ extern "C" { * Resize the string cells array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -953,7 +953,7 @@ extern "C" { /** * Increase the size of the string cellss array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -979,7 +979,7 @@ extern "C" { * Resize the string cellss array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -1108,7 +1108,7 @@ extern "C" { /** * Increase the size of the string ids array, but only if necesary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -1134,7 +1134,7 @@ extern "C" { * Resize the string ids array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -1285,7 +1285,7 @@ extern "C" { /** * Increase the size of the string idss array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -1311,7 +1311,7 @@ extern "C" { * Resize the string idss array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -1440,7 +1440,7 @@ extern "C" { /** * Increase the size of the string lengths array, but only if necesary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -1466,7 +1466,7 @@ extern "C" { * Resize the string lengths array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -1617,7 +1617,7 @@ extern "C" { /** * Increase the size of the string lengthss array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -1643,7 +1643,7 @@ extern "C" { * Resize the string lengthss array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -1772,7 +1772,7 @@ extern "C" { /** * Increase the size of the string int8s array, but only if necesary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -1798,7 +1798,7 @@ extern "C" { * Resize the string int8s array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -1949,7 +1949,7 @@ extern "C" { /** * Increase the size of the string int8ss array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -1975,7 +1975,7 @@ extern "C" { * Resize the string int8ss array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -2104,7 +2104,7 @@ extern "C" { /** * Increase the size of the string uint8s array, but only if necesary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -2130,7 +2130,7 @@ extern "C" { * Resize the string uint8s array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -2281,7 +2281,7 @@ extern "C" { /** * Increase the size of the string uint8ss array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -2307,7 +2307,7 @@ extern "C" { * Resize the string uint8ss array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -2436,7 +2436,7 @@ extern "C" { /** * Increase the size of the string int16s array, but only if necesary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -2462,7 +2462,7 @@ extern "C" { * Resize the string int16s array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -2613,7 +2613,7 @@ extern "C" { /** * Increase the size of the string int16ss array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -2639,7 +2639,7 @@ extern "C" { * Resize the string int16ss array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -2768,7 +2768,7 @@ extern "C" { /** * Increase the size of the string uint16s array, but only if necesary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -2794,7 +2794,7 @@ extern "C" { * Resize the string uint16s array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -2945,7 +2945,7 @@ extern "C" { /** * Increase the size of the string uint16ss array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -2971,7 +2971,7 @@ extern "C" { * Resize the string uint16ss array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -3100,7 +3100,7 @@ extern "C" { /** * Increase the size of the string int32s array, but only if necesary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -3126,7 +3126,7 @@ extern "C" { * Resize the string int32s array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -3277,7 +3277,7 @@ extern "C" { /** * Increase the size of the string int32ss array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -3303,7 +3303,7 @@ extern "C" { * Resize the string int32ss array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -3432,7 +3432,7 @@ extern "C" { /** * Increase the size of the string uint32s array, but only if necesary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -3458,7 +3458,7 @@ extern "C" { * Resize the string uint32s array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -3609,7 +3609,7 @@ extern "C" { /** * Increase the size of the string uint32ss array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -3635,7 +3635,7 @@ extern "C" { * Resize the string uint32ss array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -3764,7 +3764,7 @@ extern "C" { /** * Increase the size of the string int64s array, but only if necesary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -3790,7 +3790,7 @@ extern "C" { * Resize the string int64s array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -3941,7 +3941,7 @@ extern "C" { /** * Increase the size of the string int64ss array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -3967,7 +3967,7 @@ extern "C" { * Resize the string int64ss array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -4096,7 +4096,7 @@ extern "C" { /** * Increase the size of the string uint64s array, but only if necesary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -4122,7 +4122,7 @@ extern "C" { * Resize the string uint64s array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -4273,7 +4273,7 @@ extern "C" { /** * Increase the size of the string uint64ss array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -4299,7 +4299,7 @@ extern "C" { * Resize the string uint64ss array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -4428,7 +4428,7 @@ extern "C" { /** * Increase the size of the string int128s array, but only if necesary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -4454,7 +4454,7 @@ extern "C" { * Resize the string int128s array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -4605,7 +4605,7 @@ extern "C" { /** * Increase the size of the string int128ss array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -4631,7 +4631,7 @@ extern "C" { * Resize the string int128ss array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -4760,7 +4760,7 @@ extern "C" { /** * Increase the size of the string uint128s array, but only if necesary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -4786,7 +4786,7 @@ extern "C" { * Resize the string uint128s array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -4937,7 +4937,7 @@ extern "C" { /** * Increase the size of the string uint128ss array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -4963,7 +4963,7 @@ extern "C" { * Resize the string uint128ss array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount diff --git a/level_0/f_utf/c/private-utf.c b/level_0/f_utf/c/private-utf.c index 82ce4c2..98d76fd 100644 --- a/level_0/f_utf/c/private-utf.c +++ b/level_0/f_utf/c/private-utf.c @@ -2270,7 +2270,7 @@ extern "C" { #if !defined(_di_f_utf_string_append_assure_nulless_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_assure_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_dynamic_partial_append_assure_nulless_) || !defined(_di_f_utf_string_dynamic_partial_append_nulless_) || !defined(_di_f_utf_string_dynamic_partial_mash_nulless_) || !defined(_di_f_utf_string_mash_nulless_) f_status_t private_f_utf_string_append_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) { - if (destination->used + length > f_string_t_size) { + if (destination->used + length > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -2340,7 +2340,7 @@ extern "C" { f_status_t private_f_utf_string_dynamic_increase_by(const f_array_length_t amount, f_utf_string_dynamic_t *dynamic) { if (dynamic->used + amount > dynamic->size) { - if (dynamic->used + amount > f_string_t_size) { + if (dynamic->used + amount > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -2371,7 +2371,7 @@ extern "C" { #if !defined(_di_f_utf_string_dynamics_adjust_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_dynamics_decimate_by_) || !defined(_di_f_utf_string_map_multis_adjust_) || !defined(_di_f_utf_string_map_multis_append_) f_status_t private_f_utf_string_dynamics_adjust(const f_array_length_t length, f_utf_string_dynamics_t *dynamics) { - if (dynamics->used + length > f_array_length_t_size) { + if (dynamics->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -2423,7 +2423,7 @@ extern "C" { #if !defined(_di_f_utf_string_dynamics_decrease_by_) || !defined(_di_f_utf_string_dynamics_increase_) || !defined(_di_f_utf_string_dynamics_increase_by_) f_status_t private_f_utf_string_dynamics_resize(const f_array_length_t length, f_utf_string_dynamics_t *dynamics) { - if (dynamics->used + length > f_array_length_t_size) { + if (dynamics->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -2451,7 +2451,7 @@ extern "C" { #if !defined(_di_f_utf_string_map_multis_adjust_) || !defined(_di_f_utf_string_map_multis_decimate_by_) f_status_t private_f_utf_string_map_multis_adjust(const f_array_length_t length, f_utf_string_map_multis_t *map_multis) { - if (map_multis->used + length > f_array_length_t_size) { + if (map_multis->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -2483,7 +2483,7 @@ extern "C" { #if !defined(_di_f_utf_string_map_multis_decrease_by_) || !defined(_di_f_utf_string_map_multis_increase_) || !defined(_di_f_utf_string_map_multis_increase_by_) || !defined(_di_f_utf_string_map_multis_terminate_) || !defined(_di_f_utf_string_map_multis_terminate_after_) f_status_t private_f_utf_string_map_multis_resize(const f_array_length_t length, f_utf_string_map_multis_t *map_multis) { - if (map_multis->used + length > f_array_length_t_size) { + if (map_multis->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -2515,7 +2515,7 @@ extern "C" { #if !defined(_di_f_utf_string_maps_adjust_) || !defined(_di_f_utf_string_maps_decimate_by_) f_status_t private_f_utf_string_maps_adjust(const f_array_length_t length, f_utf_string_maps_t *maps) { - if (maps->used + length > f_array_length_t_size) { + if (maps->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -2547,7 +2547,7 @@ extern "C" { #if !defined(_di_f_utf_string_maps_decrease_by_) || !defined(_di_f_utf_string_maps_increase_) || !defined(_di_f_utf_string_maps_increase_by_) || !defined(_di_f_utf_string_maps_terminate_) || !defined(_di_f_utf_string_maps_terminate_after_) f_status_t private_f_utf_string_maps_resize(const f_array_length_t length, f_utf_string_maps_t *maps) { - if (maps->used + length > f_array_length_t_size) { + if (maps->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -2579,7 +2579,7 @@ extern "C" { #if !defined(_di_f_utf_string_dynamic_mish_) || !defined(_di_f_utf_string_dynamic_partial_mish_) || !defined(_di_f_utf_string_dynamic_partial_prepend_assure_) || !defined(_di_f_utf_string_dynamic_partial_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_assure_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_mish_) || !defined(_di_f_utf_string_prepend_assure_) || !defined(_di_f_utf_string_prepend_) f_status_t private_f_utf_string_prepend(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) { - if (destination->used + length > f_string_t_size) { + if (destination->used + length > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -2604,7 +2604,7 @@ extern "C" { #if !defined(_di_f_utf_string_dynamic_mish_nulless_) || !defined(_di_f_utf_string_dynamic_partial_mish_nulless_) || !defined(_di_f_utf_string_dynamic_partial_prepend_assure_nulless_) || !defined(_di_f_utf_string_dynamic_partial_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_assure_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) || !defined(_di_f_utf_string_mish_nulless_) || !defined(_di_f_utf_string_prepend_assure_nulless_) || !defined(_di_f_utf_string_prepend_nulless_) f_status_t private_f_utf_string_prepend_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) { - if (destination->used + length > f_string_t_size) { + if (destination->used + length > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -2670,7 +2670,7 @@ extern "C" { #if !defined(_di_f_utf_string_triples_adjust_) || !defined(_di_f_utf_string_triples_decimate_by_) f_status_t private_f_utf_string_triples_adjust(const f_array_length_t length, f_utf_string_triples_t *triples) { - if (triples->used + length > f_array_length_t_size) { + if (triples->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -2705,7 +2705,7 @@ extern "C" { #if !defined(_di_f_utf_string_triples_decrease_) || !defined(_di_f_utf_string_triples_decrease_by_) || !defined(_di_f_utf_string_triples_increase_) || !defined(_di_f_utf_string_triples_increase_by_) || !defined(_di_f_utf_string_triples_terminate_) || !defined(_di_f_utf_string_triples_terminate_after_) f_status_t private_f_utf_string_triples_resize(const f_array_length_t length, f_utf_string_triples_t *triples) { - if (triples->used + length > f_array_length_t_size) { + if (triples->used + length > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } diff --git a/level_0/f_utf/c/private-utf.h b/level_0/f_utf/c/private-utf.h index 66a1e9b..3687553 100644 --- a/level_0/f_utf/c/private-utf.h +++ b/level_0/f_utf/c/private-utf.h @@ -68,7 +68,7 @@ extern "C" { * @see f_utf_unicode_to() */ #if !defined(_di_f_utf_char_to_character_) || !defined(_di_f_utf_is_alpha_) || !defined(_di_f_utf_is_alpha_digit_) || !defined(_di_f_utf_is_alpha_numeric_) || !defined(_di_f_utf_is_ascii_) || !defined(_di_f_utf_is_combining_) || !defined(_di_f_utf_is_control_) || !defined(_di_f_utf_is_control_picture_) || !defined(_di_f_utf_is_digit_) || !defined(_di_f_utf_is_emoji_) || !defined(_di_f_utf_is_graph_) || !defined(_di_f_utf_is_numeric_) || !defined(_di_f_utf_is_phonetic_) || !defined(_di_f_utf_is_private_) || !defined(_di_f_utf_is_punctuation_) || !defined(_di_f_utf_is_symbol_) || !defined(_di_f_utf_is_unassigned_) || !defined(_di_f_utf_is_valid_) || !defined(_di_f_utf_is_whitespace_) || !defined(_di_f_utf_is_whitespace_modifier_) || !defined(_di_f_utf_is_whitespace_other_) || !defined(_di_f_utf_is_word_) || !defined(_di_f_utf_is_word_dash_) || !defined(_di_f_utf_is_word_dash_plus_) || !defined(_di_f_utf_is_zero_width_) || !defined(f_utf_unicode_to) - extern f_status_t private_f_utf_char_to_character(const f_string_t character, const f_array_length_t width_max, f_utf_character_t *character_utf) f_attribute_visibility_internal; + extern f_status_t private_f_utf_char_to_character(const f_string_t character, const f_array_length_t width_max, f_utf_character_t *character_utf) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_char_to_character_) || !defined(_di_f_utf_is_alpha_) || !defined(_di_f_utf_is_alpha_digit_) || !defined(_di_f_utf_is_alpha_numeric_) || !defined(_di_f_utf_is_ascii_) || !defined(_di_f_utf_is_combining_) || !defined(_di_f_utf_is_control_) || !defined(_di_f_utf_is_control_picture_) || !defined(_di_f_utf_is_digit_) || !defined(_di_f_utf_is_emoji_) || !defined(_di_f_utf_is_graph_) || !defined(_di_f_utf_is_numeric_) || !defined(_di_f_utf_is_phonetic_) || !defined(_di_f_utf_is_private_) || !defined(_di_f_utf_is_punctuation_) || !defined(_di_f_utf_is_symbol_) || !defined(_di_f_utf_is_unassigned_) || !defined(_di_f_utf_is_valid_) || !defined(_di_f_utf_is_whitespace_) || !defined(_di_f_utf_is_whitespace_modifier_) || !defined(_di_f_utf_is_whitespace_other_) || !defined(_di_f_utf_is_word_) || !defined(_di_f_utf_is_word_dash_) || !defined(_di_f_utf_is_word_dash_plus_) || !defined(_di_f_utf_is_zero_width_) || !defined(f_utf_unicode_to) /** @@ -91,7 +91,7 @@ extern "C" { * @see f_utf_is_alpha() */ #if !defined(_di_f_utf_character_is_alpha_) || !defined(_di_f_utf_is_alpha_) - extern f_status_t private_f_utf_character_is_alpha(const f_utf_character_t character, const uint8_t width) f_attribute_visibility_internal; + extern f_status_t private_f_utf_character_is_alpha(const f_utf_character_t character, const uint8_t width) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_character_is_alpha_) || !defined(_di_f_utf_is_alpha_) /** @@ -114,7 +114,7 @@ extern "C" { * @see f_utf_is_alpha_digit() */ #if !defined(_di_f_utf_character_is_alpha_digit_) || !defined(_di_f_utf_is_alpha_digit_) - extern f_status_t private_f_utf_character_is_alpha_digit(const f_utf_character_t character, const uint8_t width) f_attribute_visibility_internal; + extern f_status_t private_f_utf_character_is_alpha_digit(const f_utf_character_t character, const uint8_t width) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_character_is_alpha_digit_) || !defined(_di_f_utf_is_alpha_digit_) /** @@ -137,7 +137,7 @@ extern "C" { * @see f_utf_is_alpha_numeric() */ #if !defined(_di_f_utf_character_is_alpha_numeric_) || !defined(_di_f_utf_is_alpha_numeric_) - extern f_status_t private_f_utf_character_is_alpha_numeric(const f_utf_character_t character, const uint8_t width) f_attribute_visibility_internal; + extern f_status_t private_f_utf_character_is_alpha_numeric(const f_utf_character_t character, const uint8_t width) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_character_is_alpha_numeric_) || !defined(_di_f_utf_is_alpha_numeric_) /** @@ -160,7 +160,7 @@ extern "C" { * @see f_utf_is_ascii() */ #if !defined(_di_f_utf_character_is_ascii_) || !defined(_di_f_utf_is_ascii_) - extern f_status_t private_f_utf_character_is_ascii(const f_utf_character_t character, const uint8_t width) f_attribute_visibility_internal; + extern f_status_t private_f_utf_character_is_ascii(const f_utf_character_t character, const uint8_t width) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_character_is_ascii_) || !defined(_di_f_utf_is_ascii_) /** @@ -183,7 +183,7 @@ extern "C" { * @see f_utf_is_combining() */ #if !defined(_di_f_utf_character_is_combining_) || !defined(_di_f_utf_is_combining_) - extern f_status_t private_f_utf_character_is_combining(const f_utf_character_t character, const uint8_t width) f_attribute_visibility_internal; + extern f_status_t private_f_utf_character_is_combining(const f_utf_character_t character, const uint8_t width) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_character_is_combining_) || !defined(_di_f_utf_is_combining_) /** @@ -206,7 +206,7 @@ extern "C" { * @see f_utf_is_control() */ #if !defined(_di_f_utf_character_is_control_) || !defined(_di_f_utf_is_control_) - extern f_status_t private_f_utf_character_is_control(const f_utf_character_t character, const uint8_t width) f_attribute_visibility_internal; + extern f_status_t private_f_utf_character_is_control(const f_utf_character_t character, const uint8_t width) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_character_is_control_) || !defined(_di_f_utf_is_control_) /** @@ -229,7 +229,7 @@ extern "C" { * @see f_utf_is_control_picture() */ #if !defined(_di_f_utf_character_is_control_picture_) || !defined(_di_f_utf_is_control_picture_) - extern f_status_t private_f_utf_character_is_control_picture(const f_utf_character_t character, const uint8_t width) f_attribute_visibility_internal; + extern f_status_t private_f_utf_character_is_control_picture(const f_utf_character_t character, const uint8_t width) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_character_is_control_picture_) || !defined(_di_f_utf_is_control_picture_) /** @@ -252,7 +252,7 @@ extern "C" { * @see f_utf_is_digit() */ #if !defined(_di_f_utf_character_is_digit_) || !defined(_di_f_utf_is_digit_) - extern f_status_t private_f_utf_character_is_digit(const f_utf_character_t character, const uint8_t width) f_attribute_visibility_internal; + extern f_status_t private_f_utf_character_is_digit(const f_utf_character_t character, const uint8_t width) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_character_is_digit_) || !defined(_di_f_utf_is_digit_) /** @@ -275,7 +275,7 @@ extern "C" { * @see f_utf_is_emoji() */ #if !defined(_di_f_utf_character_is_emoji_) || !defined(_di_f_utf_is_emoji_) - extern f_status_t private_f_utf_character_is_emoji(const f_utf_character_t character, const uint8_t width) f_attribute_visibility_internal; + extern f_status_t private_f_utf_character_is_emoji(const f_utf_character_t character, const uint8_t width) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_character_is_emoji_) || !defined(_di_f_utf_is_emoji_) /** @@ -298,7 +298,7 @@ extern "C" { * @see f_utf_is_numeric() */ #if !defined(_di_f_utf_character_is_numeric_) || !defined(_di_f_utf_is_numeric_) - extern f_status_t private_f_utf_character_is_numeric(const f_utf_character_t character, const uint8_t width) f_attribute_visibility_internal; + extern f_status_t private_f_utf_character_is_numeric(const f_utf_character_t character, const uint8_t width) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_character_is_numeric_) || !defined(_di_f_utf_is_numeric_) /** @@ -321,7 +321,7 @@ extern "C" { * @see f_utf_is_phonetic() */ #if !defined(_di_f_utf_character_is_phonetic_) || !defined(_di_f_utf_is_phonetic_) - extern f_status_t private_f_utf_character_is_phonetic(const f_utf_character_t character, const uint8_t width) f_attribute_visibility_internal; + extern f_status_t private_f_utf_character_is_phonetic(const f_utf_character_t character, const uint8_t width) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_character_is_phonetic_) || !defined(_di_f_utf_is_phonetic_) /** @@ -344,7 +344,7 @@ extern "C" { * @see f_utf_is_private() */ #if !defined(_di_f_utf_character_is_private_) || !defined(_di_f_utf_is_private_) - extern f_status_t private_f_utf_character_is_private(const f_utf_character_t character, const uint8_t width) f_attribute_visibility_internal; + extern f_status_t private_f_utf_character_is_private(const f_utf_character_t character, const uint8_t width) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_character_is_private_) || !defined(_di_f_utf_is_private_) /** @@ -367,7 +367,7 @@ extern "C" { * @see f_utf_is_punctuation() */ #if !defined(_di_f_utf_character_is_punctuation_) || !defined(_di_f_utf_is_punctuation_) - extern f_status_t private_f_utf_character_is_punctuation(const f_utf_character_t character, const uint8_t width) f_attribute_visibility_internal; + extern f_status_t private_f_utf_character_is_punctuation(const f_utf_character_t character, const uint8_t width) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_character_is_punctuation_) || !defined(_di_f_utf_is_punctuation_) /** @@ -390,7 +390,7 @@ extern "C" { * @see f_utf_is_symbol() */ #if !defined(_di_f_utf_character_is_symbol_) || !defined(_di_f_utf_is_symbol_) - extern f_status_t private_f_utf_character_is_symbol(const f_utf_character_t character, const uint8_t width) f_attribute_visibility_internal; + extern f_status_t private_f_utf_character_is_symbol(const f_utf_character_t character, const uint8_t width) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_character_is_symbol_) || !defined(_di_f_utf_is_symbol_) /** @@ -413,7 +413,7 @@ extern "C" { * @see f_utf_is_unassigned() */ #if !defined(_di_f_utf_character_is_unassigned_) || !defined(_di_f_utf_is_unassigned_) - extern f_status_t private_f_utf_character_is_unassigned(const f_utf_character_t character, const uint8_t width) f_attribute_visibility_internal; + extern f_status_t private_f_utf_character_is_unassigned(const f_utf_character_t character, const uint8_t width) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_character_is_unassigned_) || !defined(_di_f_utf_is_unassigned_) /** @@ -436,7 +436,7 @@ extern "C" { * @see f_utf_is_valid() */ #if !defined(_di_f_utf_character_is_valid_) || !defined(_di_f_utf_is_valid_) - extern f_status_t private_f_utf_character_is_valid(const f_utf_character_t character, const uint8_t width) f_attribute_visibility_internal; + extern f_status_t private_f_utf_character_is_valid(const f_utf_character_t character, const uint8_t width) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_character_is_valid_) || !defined(_di_f_utf_is_valid_) /** @@ -459,7 +459,7 @@ extern "C" { * @see f_utf_is_whitespace() */ #if !defined(_di_f_utf_character_is_whitespace_) || !defined(_di_f_utf_is_whitespace_) - extern f_status_t private_f_utf_character_is_whitespace(const f_utf_character_t character, const uint8_t width) f_attribute_visibility_internal; + extern f_status_t private_f_utf_character_is_whitespace(const f_utf_character_t character, const uint8_t width) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_character_is_whitespace_) || !defined(_di_f_utf_is_whitespace_) /** @@ -482,7 +482,7 @@ extern "C" { * @see f_utf_is_whitespace_modifier() */ #if !defined(_di_f_utf_character_is_whitespace_modifier_) || !defined(_di_f_utf_is_whitespace_modifier_) - extern f_status_t private_f_utf_character_is_whitespace_modifier(const f_utf_character_t character, const uint8_t width) f_attribute_visibility_internal; + extern f_status_t private_f_utf_character_is_whitespace_modifier(const f_utf_character_t character, const uint8_t width) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_character_is_whitespace_modifier_) || !defined(_di_f_utf_is_whitespace_modifier_) /** @@ -505,7 +505,7 @@ extern "C" { * @see f_utf_is_whitespace_other() */ #if !defined(_di_f_utf_character_is_whitespace_other_) || !defined(_di_f_utf_is_whitespace_other_) - extern f_status_t private_f_utf_character_is_whitespace_other(const f_utf_character_t character, const uint8_t width) f_attribute_visibility_internal; + extern f_status_t private_f_utf_character_is_whitespace_other(const f_utf_character_t character, const uint8_t width) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_character_is_whitespace_other_) || !defined(_di_f_utf_is_whitespace_other_) /** @@ -532,7 +532,7 @@ extern "C" { * @see f_utf_is_word() */ #if !defined(_di_f_utf_character_is_word_) || !defined(_di_f_utf_is_word_) - extern f_status_t private_f_utf_character_is_word(const f_utf_character_t character, const uint8_t width, const bool strict) f_attribute_visibility_internal; + extern f_status_t private_f_utf_character_is_word(const f_utf_character_t character, const uint8_t width, const bool strict) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_character_is_word_) || !defined(_di_f_utf_is_word_) /** @@ -559,7 +559,7 @@ extern "C" { * @see f_utf_is_word_dash() */ #if !defined(_di_f_utf_character_is_word_dash_) || !defined(_di_f_utf_is_word_dash_) - extern f_status_t private_f_utf_character_is_word_dash(const f_utf_character_t character, const uint8_t width, const bool strict) f_attribute_visibility_internal; + extern f_status_t private_f_utf_character_is_word_dash(const f_utf_character_t character, const uint8_t width, const bool strict) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_character_is_word_dash_) || !defined(_di_f_utf_is_word_dash_) /** @@ -586,7 +586,7 @@ extern "C" { * @see f_utf_is_word_dash_plus() */ #if !defined(_di_f_utf_character_is_word_dash_plus_) || !defined(_di_f_utf_is_word_dash_plus_) - extern f_status_t private_f_utf_character_is_word_dash_plus(const f_utf_character_t character, const uint8_t width, const bool strict) f_attribute_visibility_internal; + extern f_status_t private_f_utf_character_is_word_dash_plus(const f_utf_character_t character, const uint8_t width, const bool strict) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_character_is_word_dash_plus_) || !defined(_di_f_utf_is_word_dash_plus_) /** @@ -609,7 +609,7 @@ extern "C" { * @see f_utf_is_zero_width() */ #if !defined(_di_f_utf_character_is_zero_width_) || !defined(_di_f_utf_is_zero_width_) - extern f_status_t private_f_utf_character_is_zero_width(const f_utf_character_t character, const uint8_t width) f_attribute_visibility_internal; + extern f_status_t private_f_utf_character_is_zero_width(const f_utf_character_t character, const uint8_t width) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_character_is_zero_width_) || !defined(_di_f_utf_is_zero_width_) /** @@ -648,7 +648,7 @@ extern "C" { * @see f_utf_string_triples_append() */ #if !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_append_assure_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_append_assure_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(f_utf_string_dynamic_partial_append) || !defined(_di_f_utf_string_dynamic_partial_append_assure_) || !defined(_di_f_utf_string_dynamic_partial_mash_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_mash_) || !defined(_di_f_utf_string_maps_append_) || !defined(_di_f_utf_string_triples_append_) - extern f_status_t private_f_utf_string_append(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_utf_string_append(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_append_assure_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_append_assure_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(f_utf_string_dynamic_partial_append) || !defined(_di_f_utf_string_dynamic_partial_append_assure_) || !defined(_di_f_utf_string_dynamic_partial_mash_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_mash_) || !defined(_di_f_utf_string_maps_append_) || !defined(_di_f_utf_string_triples_append_) /** @@ -681,7 +681,7 @@ extern "C" { * @see f_utf_string_mash_nulless() */ #if !defined(_di_f_utf_string_append_assure_nulless_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_assure_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_dynamic_partial_append_assure_nulless_) || !defined(_di_f_utf_string_dynamic_partial_append_nulless_) || !defined(_di_f_utf_string_dynamic_partial_mash_nulless_) || !defined(_di_f_utf_string_mash_nulless_) - extern f_status_t private_f_utf_string_append_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_utf_string_append_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_string_append_assure_nulless_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_assure_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_dynamic_partial_append_assure_nulless_) || !defined(_di_f_utf_string_dynamic_partial_append_nulless_) || !defined(_di_f_utf_string_dynamic_partial_mash_nulless_) || !defined(_di_f_utf_string_mash_nulless_) /** @@ -711,7 +711,7 @@ extern "C" { * @see f_utf_string_triples_decimate_by() */ #if !defined(_di_f_utf_string_dynamic_adjust_) || !defined(_di_f_utf_string_dynamic_decimate_by_) || !defined(_di_f_utf_string_dynamics_adjust_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_dynamics_decimate_by_) || !defined(_di_f_utf_string_map_multis_adjust_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_triples_adjust_) || !defined(_di_f_utf_string_triples_decimate_by_) - extern f_status_t private_f_utf_string_dynamic_adjust(const f_array_length_t length, f_utf_string_dynamic_t *string) f_attribute_visibility_internal; + extern f_status_t private_f_utf_string_dynamic_adjust(const f_array_length_t length, f_utf_string_dynamic_t *string) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_string_dynamic_adjust_) || !defined(_di_f_utf_string_dynamic_decimate_by_) || !defined(_di_f_utf_string_dynamics_adjust_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_dynamics_decimate_by_) || !defined(_di_f_utf_string_map_multis_adjust_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_triples_adjust_) || !defined(_di_f_utf_string_triples_decimate_by_) /** @@ -759,7 +759,7 @@ extern "C" { * @see f_utf_string_triples_append() */ #if !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_append_assure_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_append_assure_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_dynamic_partial_append_) || !defined(_di_f_utf_string_dynamic_partial_append_assure_) || !defined(_di_f_utf_string_dynamic_partial_mash_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_mash_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_maps_append_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_triples_append_) - extern f_status_t private_f_utf_string_dynamic_increase_by(const f_array_length_t amount, f_utf_string_dynamic_t *string) f_attribute_visibility_internal; + extern f_status_t private_f_utf_string_dynamic_increase_by(const f_array_length_t amount, f_utf_string_dynamic_t *string) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_append_assure_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_append_assure_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_dynamic_partial_append_) || !defined(_di_f_utf_string_dynamic_partial_append_assure_) || !defined(_di_f_utf_string_dynamic_partial_mash_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_mash_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_maps_append_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_triples_append_) /** @@ -807,7 +807,7 @@ extern "C" { * @see f_utf_string_triples_append() */ #if !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_append_assure_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_append_assure_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_decrease_by_) || !defined(_di_f_utf_string_dynamic_increase_) || !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(f_utf_string_dynamic_partial_append) || !defined(_di_f_utf_string_dynamic_partial_append_assure_) || !defined(_di_f_utf_string_dynamic_partial_mash_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_terminate_) || !defined(_di_f_utf_string_dynamic_terminate_after_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_mash_) || !defined(_di_f_utf_string_maps_append_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_triples_append_) - extern f_status_t private_f_utf_string_dynamic_resize(const f_array_length_t length, f_utf_string_dynamic_t *string) f_attribute_visibility_internal; + extern f_status_t private_f_utf_string_dynamic_resize(const f_array_length_t length, f_utf_string_dynamic_t *string) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_append_assure_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_append_assure_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_decrease_by_) || !defined(_di_f_utf_string_dynamic_increase_) || !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(f_utf_string_dynamic_partial_append) || !defined(_di_f_utf_string_dynamic_partial_append_assure_) || !defined(_di_f_utf_string_dynamic_partial_mash_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_terminate_) || !defined(_di_f_utf_string_dynamic_terminate_after_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_mash_) || !defined(_di_f_utf_string_maps_append_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_triples_append_) /** @@ -835,7 +835,7 @@ extern "C" { * @see f_utf_string_map_multis_append() */ #if !defined(_di_f_utf_string_dynamics_adjust_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_dynamics_decimate_by_) || !defined(_di_f_utf_string_map_multis_adjust_) || !defined(_di_f_utf_string_map_multis_append_) - extern f_status_t private_f_utf_string_dynamics_adjust(const f_array_length_t length, f_utf_string_dynamics_t *strings) f_attribute_visibility_internal; + extern f_status_t private_f_utf_string_dynamics_adjust(const f_array_length_t length, f_utf_string_dynamics_t *strings) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_string_dynamics_adjust_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_dynamics_decimate_by_) || !defined(_di_f_utf_string_map_multis_adjust_) || !defined(_di_f_utf_string_map_multis_append_) /** @@ -859,7 +859,7 @@ extern "C" { * @see f_utf_string_map_multis_append() */ #if !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_) - extern f_status_t private_f_utf_string_dynamics_append(const f_utf_string_dynamics_t source, f_utf_string_dynamics_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_utf_string_dynamics_append(const f_utf_string_dynamics_t source, f_utf_string_dynamics_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_) /** @@ -885,7 +885,7 @@ extern "C" { * @see f_utf_string_dynamics_increase_by() */ #if !defined(_di_f_utf_string_dynamics_decrease_by_) || !defined(_di_f_utf_string_dynamics_increase_) || !defined(_di_f_utf_string_dynamics_increase_by_) - extern f_status_t private_f_utf_string_dynamics_resize(const f_array_length_t length, f_utf_string_dynamics_t *strings) f_attribute_visibility_internal; + extern f_status_t private_f_utf_string_dynamics_resize(const f_array_length_t length, f_utf_string_dynamics_t *strings) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_string_dynamics_decrease_by_) || !defined(_di_f_utf_string_dynamics_increase_) || !defined(_di_f_utf_string_dynamics_increase_by_) /** @@ -909,7 +909,7 @@ extern "C" { * @see f_utf_string_map_multis_adjust() */ #if !defined(_di_f_utf_string_map_multis_adjust_) || !defined(_di_f_utf_string_map_multis_decimate_by_) - extern f_status_t private_f_utf_string_map_multis_adjust(const f_array_length_t length, f_utf_string_map_multis_t *map_multis) f_attribute_visibility_internal; + extern f_status_t private_f_utf_string_map_multis_adjust(const f_array_length_t length, f_utf_string_map_multis_t *map_multis) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_string_map_multis_adjust_) || !defined(_di_f_utf_string_map_multis_decimate_by_) /** @@ -937,7 +937,7 @@ extern "C" { * @see f_utf_string_map_multis_terminate_after() */ #if !defined(_di_f_utf_string_map_multis_decrease_by_) || !defined(_di_f_utf_string_map_multis_increase_) || !defined(_di_f_utf_string_map_multis_increase_by_) || !defined(_di_f_utf_string_map_multis_terminate_) || !defined(_di_f_utf_string_map_multis_terminate_after_) - extern f_status_t private_f_utf_string_map_multis_resize(const f_array_length_t length, f_utf_string_map_multis_t *map_multis) f_attribute_visibility_internal; + extern f_status_t private_f_utf_string_map_multis_resize(const f_array_length_t length, f_utf_string_map_multis_t *map_multis) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_string_map_multis_decrease_by_) || !defined(_di_f_utf_string_map_multis_increase_) || !defined(_di_f_utf_string_map_multis_increase_by_) || !defined(_di_f_utf_string_map_multis_terminate_) || !defined(_di_f_utf_string_map_multis_terminate_after_) /** @@ -961,7 +961,7 @@ extern "C" { * @see f_utf_string_maps_adjust() */ #if !defined(_di_f_utf_string_maps_adjust_) || !defined(_di_f_utf_string_maps_decimate_by_) - extern f_status_t private_f_utf_string_maps_adjust(const f_array_length_t length, f_utf_string_maps_t *maps) f_attribute_visibility_internal; + extern f_status_t private_f_utf_string_maps_adjust(const f_array_length_t length, f_utf_string_maps_t *maps) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_string_maps_adjust_) || !defined(_di_f_utf_string_maps_decimate_by_) /** @@ -989,7 +989,7 @@ extern "C" { * @see f_utf_string_maps_terminate_after() */ #if !defined(_di_f_utf_string_maps_decrease_by_) || !defined(_di_f_utf_string_maps_increase_) || !defined(_di_f_utf_string_maps_increase_by_) || !defined(_di_f_utf_string_maps_terminate_) || !defined(_di_f_utf_string_maps_terminate_after_) - extern f_status_t private_f_utf_string_maps_resize(const f_array_length_t length, f_utf_string_maps_t *maps) f_attribute_visibility_internal; + extern f_status_t private_f_utf_string_maps_resize(const f_array_length_t length, f_utf_string_maps_t *maps) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_string_maps_decrease_by_) || !defined(_di_f_utf_string_maps_increase_) || !defined(_di_f_utf_string_maps_increase_by_) || !defined(_di_f_utf_string_maps_terminate_) || !defined(_di_f_utf_string_maps_terminate_after_) /** @@ -1025,7 +1025,7 @@ extern "C" { * @see f_utf_string_prepend() */ #if !defined(_di_f_utf_string_dynamic_mish_) || !defined(_di_f_utf_string_dynamic_partial_mish_) || !defined(_di_f_utf_string_dynamic_partial_prepend_assure_) || !defined(_di_f_utf_string_dynamic_partial_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_assure_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_mish_) || !defined(_di_f_utf_string_prepend_assure_) || !defined(_di_f_utf_string_prepend_) - extern f_status_t private_f_utf_string_prepend(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_utf_string_prepend(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_string_dynamic_mish_) || !defined(_di_f_utf_string_dynamic_partial_mish_) || !defined(_di_f_utf_string_dynamic_partial_prepend_assure_) || !defined(_di_f_utf_string_dynamic_partial_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_assure_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_mish_) || !defined(_di_f_utf_string_prepend_assure_) || !defined(_di_f_utf_string_prepend_) /** @@ -1061,7 +1061,7 @@ extern "C" { * @see f_utf_string_prepend_nulless() */ #if !defined(_di_f_utf_string_dynamic_mish_nulless_) || !defined(_di_f_utf_string_dynamic_partial_mish_nulless_) || !defined(_di_f_utf_string_dynamic_partial_prepend_assure_nulless_) || !defined(_di_f_utf_string_dynamic_partial_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_assure_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) || !defined(_di_f_utf_string_mish_nulless_) || !defined(_di_f_utf_string_prepend_assure_nulless_) || !defined(_di_f_utf_string_prepend_nulless_) - extern f_status_t private_f_utf_string_prepend_nulless(const f_utf_string_t source, f_array_length_t length, f_utf_string_dynamic_t *destination) f_attribute_visibility_internal; + extern f_status_t private_f_utf_string_prepend_nulless(const f_utf_string_t source, f_array_length_t length, f_utf_string_dynamic_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_string_dynamic_mish_nulless_) || !defined(_di_f_utf_string_dynamic_partial_mish_nulless_) || !defined(_di_f_utf_string_dynamic_partial_prepend_assure_nulless_) || !defined(_di_f_utf_string_dynamic_partial_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_assure_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) || !defined(_di_f_utf_string_mish_nulless_) || !defined(_di_f_utf_string_prepend_assure_nulless_) || !defined(_di_f_utf_string_prepend_nulless_) /** @@ -1086,7 +1086,7 @@ extern "C" { * @see f_utf_string_triples_decimate_by() */ #if !defined(_di_f_utf_string_triples_adjust_) || !defined(_di_f_utf_string_triples_decimate_by_) - extern f_status_t private_f_utf_string_triples_adjust(const f_array_length_t length, f_utf_string_triples_t *triples) f_attribute_visibility_internal; + extern f_status_t private_f_utf_string_triples_adjust(const f_array_length_t length, f_utf_string_triples_t *triples) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_string_triples_adjust_) || !defined(_di_f_utf_string_triples_decimate_by_) /** @@ -1114,7 +1114,7 @@ extern "C" { * @see f_utf_string_triples_terminate_after() */ #if !defined(_di_f_utf_string_triples_decrease_by_) || !defined(_di_f_utf_string_triples_increase_) || !defined(_di_f_utf_string_triples_increase_by_) || !defined(_di_f_utf_string_triples_terminate_) || !defined(_di_f_utf_string_triples_terminate_after_) - extern f_status_t private_f_utf_string_triples_resize(const f_array_length_t length, f_utf_string_triples_t *triples) f_attribute_visibility_internal; + extern f_status_t private_f_utf_string_triples_resize(const f_array_length_t length, f_utf_string_triples_t *triples) F_attribute_visibility_internal_d; #endif // !defined(_di_f_utf_string_triples_decrease_by_) || !defined(_di_f_utf_string_triples_increase_) || !defined(_di_f_utf_string_triples_increase_by_) || !defined(_di_f_utf_string_triples_terminate_) || !defined(_di_f_utf_string_triples_terminate_after_) #ifdef __cplusplus diff --git a/level_0/f_utf/c/utf-common.c b/level_0/f_utf/c/utf-common.c index 0fe6517..ecfcf7f 100644 --- a/level_0/f_utf/c/utf-common.c +++ b/level_0/f_utf/c/utf-common.c @@ -6,42 +6,42 @@ extern "C" { #endif #ifndef _di_f_utf_space_ - const uint8_t f_utf_space_em_s[f_utf_space_em_length] = { 0xe2, 0x80, 0x83 }; - const uint8_t f_utf_space_em_quad_s[f_utf_space_em_quad_length] = { 0xe2, 0x80, 0x81 }; - const uint8_t f_utf_space_em_per_three_s[f_utf_space_em_per_three_length] = { 0xe2, 0x80, 0x84 }; - const uint8_t f_utf_space_em_per_four_s[f_utf_space_em_per_four_length] = { 0xe2, 0x80, 0x85 }; - const uint8_t f_utf_space_em_per_six_s[f_utf_space_em_per_six_length] = { 0xe2, 0x80, 0x86 }; + const uint8_t f_utf_space_em_s[F_utf_space_em_s_length] = { 0xe2, 0x80, 0x83 }; + const uint8_t f_utf_space_em_quad_s[F_utf_space_em_quad_s_length] = { 0xe2, 0x80, 0x81 }; + const uint8_t f_utf_space_em_per_three_s[F_utf_space_em_per_three_s_length] = { 0xe2, 0x80, 0x84 }; + const uint8_t f_utf_space_em_per_four_s[F_utf_space_em_per_four_s_length] = { 0xe2, 0x80, 0x85 }; + const uint8_t f_utf_space_em_per_six_s[F_utf_space_em_per_six_s_length] = { 0xe2, 0x80, 0x86 }; - const uint8_t f_utf_space_en_s[f_utf_space_en_length] = { 0xe2, 0x80, 0x82 }; - const uint8_t f_utf_space_en_quad_s[f_utf_space_en_quad_length] = { 0xe2, 0x80, 0x80 }; + const uint8_t f_utf_space_en_s[F_utf_space_en_s_length] = { 0xe2, 0x80, 0x82 }; + const uint8_t f_utf_space_en_quad_s[F_utf_space_en_quad_s_length] = { 0xe2, 0x80, 0x80 }; - const uint8_t f_utf_space_line_feed_reverse_s[f_utf_space_line_feed_reverse_length] = { 0xc2, 0x8d }; - const uint8_t f_utf_space_line_next_s[f_utf_space_line_next_length] = { 0xc2, 0x85 }; + const uint8_t f_utf_space_line_feed_reverse_s[F_utf_space_line_feed_reverse_s_length] = { 0xc2, 0x8d }; + const uint8_t f_utf_space_line_next_s[F_utf_space_line_next_s_length] = { 0xc2, 0x85 }; - const uint8_t f_utf_space_medium_mathematical_s[f_utf_space_medium_mathematical_length] = { 0xe2, 0x81, 0x9f }; + const uint8_t f_utf_space_medium_mathematical_s[F_utf_space_medium_mathematical_s_length] = { 0xe2, 0x81, 0x9f }; - const uint8_t f_utf_space_no_break_s[f_utf_space_no_break_length] = { 0xc2, 0xa0 }; - const uint8_t f_utf_space_no_break_narrow_s[f_utf_space_no_break_narrow_length] = { 0xe2, 0x80, 0xaf }; + const uint8_t f_utf_space_no_break_s[F_utf_space_no_break_s_length] = { 0xc2, 0xa0 }; + const uint8_t f_utf_space_no_break_narrow_s[F_utf_space_no_break_narrow_s_length] = { 0xe2, 0x80, 0xaf }; - const uint8_t f_utf_space_ogham_s[f_utf_space_ogham_length] = { 0xe1, 0x9a, 0x80 }; - const uint8_t f_utf_space_figure_s[f_utf_space_figure_length] = { 0xe2, 0x80, 0x87 }; - const uint8_t f_utf_space_punctuation_s[f_utf_space_punctuation_length] = { 0xe2, 0x80, 0x88 }; - const uint8_t f_utf_space_thin_s[f_utf_space_thin_length] = { 0xe2, 0x80, 0x89 }; - const uint8_t f_utf_space_hair_s[f_utf_space_hair_length] = { 0xe2, 0x80, 0x8a }; - const uint8_t f_utf_space_ideographic_s[f_utf_space_ideographic_length] = { 0xe3, 0x80, 0x80 }; + const uint8_t f_utf_space_ogham_s[F_utf_space_ogham_s_length] = { 0xe1, 0x9a, 0x80 }; + const uint8_t f_utf_space_figure_s[F_utf_space_figure_s_length] = { 0xe2, 0x80, 0x87 }; + const uint8_t f_utf_space_punctuation_s[F_utf_space_punctuation_s_length] = { 0xe2, 0x80, 0x88 }; + const uint8_t f_utf_space_thin_s[F_utf_space_thin_s_length] = { 0xe2, 0x80, 0x89 }; + const uint8_t f_utf_space_hair_s[F_utf_space_hair_s_length] = { 0xe2, 0x80, 0x8a }; + const uint8_t f_utf_space_ideographic_s[F_utf_space_ideographic_s_length] = { 0xe3, 0x80, 0x80 }; - const uint8_t f_utf_space_separator_line_s[f_utf_space_separator_line_length] = { 0xe2, 0x80, 0xa8 }; - const uint8_t f_utf_space_separator_paragraph_s[f_utf_space_separator_paragraph_length] = { 0xe2, 0x80, 0xa8 }; + const uint8_t f_utf_space_separator_line_s[F_utf_space_separator_line_s_length] = { 0xe2, 0x80, 0xa8 }; + const uint8_t f_utf_space_separator_paragraph_s[F_utf_space_separator_paragraph_s_length] = { 0xe2, 0x80, 0xa8 }; #endif // _di_f_utf_space_ #ifndef _di_f_utf_substitute_ - const uint8_t f_utf_substitute_symbol_blank_s[f_utf_substitute_symbol_blank_length] = { 0xe2, 0x90, 0xa2 }; - const uint8_t f_utf_substitute_symbol_space_s[f_utf_substitute_symbol_space_length] = { 0xe2, 0x90, 0xa0 }; + const uint8_t f_utf_substitute_symbol_blank_s[F_utf_substitute_symbol_blank_s_length] = { 0xe2, 0x90, 0xa2 }; + const uint8_t f_utf_substitute_symbol_space_s[F_utf_substitute_symbol_space_s_length] = { 0xe2, 0x90, 0xa0 }; - const uint8_t f_utf_substitute_middle_dot_s[f_utf_substitute_middle_dot_length] = { 0xc2, 0xb7 }; + const uint8_t f_utf_substitute_middle_dot_s[F_utf_substitute_middle_dot_s_length] = { 0xc2, 0xb7 }; - const uint8_t f_utf_substitute_open_box_s[f_utf_substitute_open_box_length] = { 0xe2, 0x90, 0xa3 }; - const uint8_t f_utf_substitute_open_box_shouldered_s[f_utf_substitute_open_box_shouldered_length] = { 0xe2, 0x8d, 0xbd }; + const uint8_t f_utf_substitute_open_box_s[F_utf_substitute_open_box_d_length] = { 0xe2, 0x90, 0xa3 }; + const uint8_t f_utf_substitute_open_box_shouldered_s[F_utf_substitute_open_box_shouldered_d_length] = { 0xe2, 0x8d, 0xbd }; #endif // _di_f_utf_substitute_ #ifdef __cplusplus diff --git a/level_0/f_utf/c/utf-common.h b/level_0/f_utf/c/utf-common.h index b2110bf..2d16acd 100644 --- a/level_0/f_utf/c/utf-common.h +++ b/level_0/f_utf/c/utf-common.h @@ -27,7 +27,7 @@ extern "C" { * * The f_utf_byte_is method will return non-zero if the character is a UTF-8 character of any width. * - * The f_utf_byte_1 is specifically used only on UTF-8 fragments. + * The F_utf_byte_1_d is specifically used only on UTF-8 fragments. * For example, with the 2-byte-wide UTF-8 character '1100x xxxx 10yy yyyy', the 8-byte block '10yy yyyy' would be a fragment. * * The macro_f_utf_byte_is_* macros are used to determine a width of the character (either 1, 2, 3, or 4, respectively). @@ -36,22 +36,22 @@ extern "C" { * The macro_f_utf_byte_width_is is identical to macro_f_utf_byte_width, except it returns 0 when character is ASCII. */ #ifndef _di_f_utf_byte_ - #define f_utf_byte_1 0x80 // 1000 0000 - #define f_utf_byte_2 0xc0 // 1100 0000 - #define f_utf_byte_3 0xe0 // 1110 0000 - #define f_utf_byte_4 0xf0 // 1111 0000 + #define F_utf_byte_1_d 0x80 // 1000 0000 + #define F_utf_byte_2_d 0xc0 // 1100 0000 + #define F_utf_byte_3_d 0xe0 // 1110 0000 + #define F_utf_byte_4_d 0xf0 // 1111 0000 - #define f_utf_byte_off_1 0xc0 // 1100 0000 - #define f_utf_byte_off_2 0xe0 // 1110 0000 - #define f_utf_byte_off_3 0xf0 // 1111 0000 - #define f_utf_byte_off_4 0xf8 // 1111 1000 + #define F_utf_byte_off_1_d 0xc0 // 1100 0000 + #define F_utf_byte_off_2_d 0xe0 // 1110 0000 + #define F_utf_byte_off_3_d 0xf0 // 1111 0000 + #define F_utf_byte_off_4_d 0xf8 // 1111 1000 - #define macro_f_utf_byte_is(character) ((character) & f_utf_byte_1) + #define macro_f_utf_byte_is(character) ((character) & F_utf_byte_1_d) - #define macro_f_utf_byte_is_1(character) (((character) & f_utf_byte_off_1) == f_utf_byte_1) // (10xx xxxx & 1100 0000) == 1000 0000 - #define macro_f_utf_byte_is_2(character) (((character) & f_utf_byte_off_2) == f_utf_byte_2) // (110x xxxx & 1110 0000) == 1100 0000 - #define macro_f_utf_byte_is_3(character) (((character) & f_utf_byte_off_3) == f_utf_byte_3) // (1110 xxxx & 1111 0000) == 1110 0000 - #define macro_f_utf_byte_is_4(character) (((character) & f_utf_byte_off_4) == f_utf_byte_4) // (1111 0xxx & 1111 1000) == 1111 0000 + #define macro_f_utf_byte_is_1(character) (((character) & F_utf_byte_off_1_d) == F_utf_byte_1_d) // (10xx xxxx & 1100 0000) == 1000 0000 + #define macro_f_utf_byte_is_2(character) (((character) & F_utf_byte_off_2_d) == F_utf_byte_2_d) // (110x xxxx & 1110 0000) == 1100 0000 + #define macro_f_utf_byte_is_3(character) (((character) & F_utf_byte_off_3_d) == F_utf_byte_3_d) // (1110 xxxx & 1111 0000) == 1110 0000 + #define macro_f_utf_byte_is_4(character) (((character) & F_utf_byte_off_4_d) == F_utf_byte_4_d) // (1111 0xxx & 1111 1000) == 1111 0000 #define macro_f_utf_byte_width(character) ((!macro_f_utf_byte_is(character) || macro_f_utf_byte_is_1(character)) ? 1 : (macro_f_utf_byte_is_2(character) ? 2 : (macro_f_utf_byte_is_3(character) ? 3 : 4))) #define macro_f_utf_byte_width_is(character) (macro_f_utf_byte_is(character) ? (macro_f_utf_byte_is_1(character) ? 1 : (macro_f_utf_byte_is_2(character) ? 2 : (macro_f_utf_byte_is_3(character) ? 3 : 4))) : 0) @@ -65,32 +65,32 @@ extern "C" { * This does not provide whitespace codes for standard ascii whitespaces, such as '\t' or '\r'. */ #ifndef _di_f_utf_space_ - #define f_utf_space_em_length 3 - #define f_utf_space_em_quad_length 3 - #define f_utf_space_em_per_three_length 3 - #define f_utf_space_em_per_four_length 3 - #define f_utf_space_em_per_six_length 3 + #define F_utf_space_em_s_length 3 + #define F_utf_space_em_quad_s_length 3 + #define F_utf_space_em_per_three_s_length 3 + #define F_utf_space_em_per_four_s_length 3 + #define F_utf_space_em_per_six_s_length 3 - #define f_utf_space_en_length 3 - #define f_utf_space_en_quad_length 3 + #define F_utf_space_en_s_length 3 + #define F_utf_space_en_quad_s_length 3 - #define f_utf_space_line_feed_reverse_length 2 - #define f_utf_space_line_next_length 2 + #define F_utf_space_line_feed_reverse_s_length 2 + #define F_utf_space_line_next_s_length 2 - #define f_utf_space_medium_mathematical_length 3 + #define F_utf_space_medium_mathematical_s_length 3 - #define f_utf_space_no_break_length 2 - #define f_utf_space_no_break_narrow_length 3 + #define F_utf_space_no_break_s_length 2 + #define F_utf_space_no_break_narrow_s_length 3 - #define f_utf_space_ogham_length 3 - #define f_utf_space_figure_length 3 - #define f_utf_space_punctuation_length 3 - #define f_utf_space_thin_length 3 - #define f_utf_space_hair_length 3 - #define f_utf_space_ideographic_length 3 + #define F_utf_space_ogham_s_length 3 + #define F_utf_space_figure_s_length 3 + #define F_utf_space_punctuation_s_length 3 + #define F_utf_space_thin_s_length 3 + #define F_utf_space_hair_s_length 3 + #define F_utf_space_ideographic_s_length 3 - #define f_utf_space_separator_line_length 3 - #define f_utf_space_separator_paragraph_length 3 + #define F_utf_space_separator_line_s_length 3 + #define F_utf_space_separator_paragraph_s_length 3 extern const uint8_t f_utf_space_em_s[]; extern const uint8_t f_utf_space_em_quad_s[]; @@ -130,13 +130,13 @@ extern "C" { * This does not provide substitute whitespace codes for standard ascii whitespaces, such as '\t' or '\r'. */ #ifndef _di_f_utf_substitute_ - #define f_utf_substitute_symbol_blank_length 3 - #define f_utf_substitute_symbol_space_length 3 + #define F_utf_substitute_symbol_blank_s_length 3 + #define F_utf_substitute_symbol_space_s_length 3 - #define f_utf_substitute_middle_dot_length 2 + #define F_utf_substitute_middle_dot_s_length 2 - #define f_utf_substitute_open_box_length 3 - #define f_utf_substitute_open_box_shouldered_length 3 + #define F_utf_substitute_open_box_d_length 3 + #define F_utf_substitute_open_box_shouldered_d_length 3 extern const uint8_t f_utf_substitute_symbol_blank_s[]; extern const uint8_t f_utf_substitute_symbol_space_s[]; @@ -176,34 +176,34 @@ extern "C" { #ifndef _di_f_utf_character_t_ typedef uint32_t f_utf_character_t; - #define f_utf_character_mask_byte_1 0xff000000 // 1111 1111, 0000 0000, 0000 0000, 0000 0000 - #define f_utf_character_mask_byte_2 0xffff0000 // 1111 1111, 1111 1111, 0000 0000, 0000 0000 - #define f_utf_character_mask_byte_3 0xffffff00 // 1111 1111, 1111 1111, 1111 1111, 0000 0000 - #define f_utf_character_mask_byte_4 0xffffffff // 1111 1111, 1111 1111, 1111 1111, 1111 1111 + #define F_utf_character_mask_byte_1_d 0xff000000 // 1111 1111, 0000 0000, 0000 0000, 0000 0000 + #define F_utf_character_mask_byte_2_d 0xffff0000 // 1111 1111, 1111 1111, 0000 0000, 0000 0000 + #define F_utf_character_mask_byte_3_d 0xffffff00 // 1111 1111, 1111 1111, 1111 1111, 0000 0000 + #define F_utf_character_mask_byte_4_d 0xffffffff // 1111 1111, 1111 1111, 1111 1111, 1111 1111 - #define f_utf_character_mask_char_1 0xff000000 // 1111 1111, 0000 0000, 0000 0000, 0000 0000 - #define f_utf_character_mask_char_2 0x00ff0000 // 0000 0000, 1111 1111, 0000 0000, 0000 0000 - #define f_utf_character_mask_char_3 0x0000ff00 // 0000 0000, 0000 0000, 1111 1111, 0000 0000 - #define f_utf_character_mask_char_4 0x000000ff // 0000 0000, 0000 0000, 0000 0000, 1111 1111 + #define F_utf_character_mask_char_1_d 0xff000000 // 1111 1111, 0000 0000, 0000 0000, 0000 0000 + #define F_utf_character_mask_char_2_d 0x00ff0000 // 0000 0000, 1111 1111, 0000 0000, 0000 0000 + #define F_utf_character_mask_char_3_d 0x0000ff00 // 0000 0000, 0000 0000, 1111 1111, 0000 0000 + #define F_utf_character_mask_char_4_d 0x000000ff // 0000 0000, 0000 0000, 0000 0000, 1111 1111 - #define macro_f_utf_character_t_to_char_1(character) (((character) & f_utf_character_mask_char_1) >> 24) // grab first byte. - #define macro_f_utf_character_t_to_char_2(character) (((character) & f_utf_character_mask_char_2) >> 16) // grab second byte. - #define macro_f_utf_character_t_to_char_3(character) (((character) & f_utf_character_mask_char_3) >> 8) // grab third byte. - #define macro_f_utf_character_t_to_char_4(character) ((character) & f_utf_character_mask_char_4) // grab fourth byte. + #define macro_f_utf_character_t_to_char_1(character) (((character) & F_utf_character_mask_char_1_d) >> 24) // grab first byte. + #define macro_f_utf_character_t_to_char_2(character) (((character) & F_utf_character_mask_char_2_d) >> 16) // grab second byte. + #define macro_f_utf_character_t_to_char_3(character) (((character) & F_utf_character_mask_char_3_d) >> 8) // grab third byte. + #define macro_f_utf_character_t_to_char_4(character) ((character) & F_utf_character_mask_char_4_d) // grab fourth byte. - #define macro_f_utf_character_t_from_char_1(character) (((character) << 24) & f_utf_character_mask_char_1) // shift to first byte. - #define macro_f_utf_character_t_from_char_2(character) (((character) << 16) & f_utf_character_mask_char_2) // shift to second byte. - #define macro_f_utf_character_t_from_char_3(character) (((character) << 8) & f_utf_character_mask_char_3) // shift to third byte. - #define macro_f_utf_character_t_from_char_4(character) ((character) & f_utf_character_mask_char_4) // shift to fourth byte. + #define macro_f_utf_character_t_from_char_1(character) (((character) << 24) & F_utf_character_mask_char_1_d) // shift to first byte. + #define macro_f_utf_character_t_from_char_2(character) (((character) << 16) & F_utf_character_mask_char_2_d) // shift to second byte. + #define macro_f_utf_character_t_from_char_3(character) (((character) << 8) & F_utf_character_mask_char_3_d) // shift to third byte. + #define macro_f_utf_character_t_from_char_4(character) ((character) & F_utf_character_mask_char_4_d) // shift to fourth byte. #define macro_f_utf_character_t_width(character) (macro_f_utf_byte_width(macro_f_utf_character_t_to_char_1(character))) #define macro_f_utf_character_t_width_is(character) (macro_f_utf_byte_width_is(macro_f_utf_character_t_to_char_1(character))) #endif // _di_f_utf_character_t_ #ifndef _di_f_utf_character_t_codes_ - #define f_utf_character_t_eol 0x0a000000 // 0000 1010, 0000 0000, 0000 0000, 0000 0000 - #define f_utf_character_t_eos 0x00000000 // 0000 0000, 0000 0000, 0000 0000, 0000 0000 - #define f_utf_character_t_placeholder 0x00000000 // 0000 0000, 0000 0000, 0000 0000, 0000 0000 + #define F_utf_character_t_eol_d 0x0a000000 // 0000 1010, 0000 0000, 0000 0000, 0000 0000 + #define F_utf_character_t_eos_d 0x00000000 // 0000 0000, 0000 0000, 0000 0000, 0000 0000 + #define F_utf_character_t_placeholder_d 0x00000000 // 0000 0000, 0000 0000, 0000 0000, 0000 0000 #endif // _di_f_utf_character_t_codes_ /** diff --git a/level_0/f_utf/c/utf.c b/level_0/f_utf/c/utf.c index 870657e..984246f 100644 --- a/level_0/f_utf/c/utf.c +++ b/level_0/f_utf/c/utf.c @@ -1906,7 +1906,7 @@ extern "C" { return F_data_not_stop; } - while (string[range->start] != f_utf_character_t_eol) { + while (string[range->start] != F_utf_character_t_eol_d) { if (macro_f_utf_character_t_width_is(string[range->start]) == 1) { return F_status_set_error(F_utf); @@ -1939,7 +1939,7 @@ extern "C" { return F_status_set_error(F_utf); } - if (string[range->start] == f_utf_character_t_eol) { + if (string[range->start] == F_utf_character_t_eol_d) { return F_none_eol; } @@ -2068,8 +2068,8 @@ extern "C" { } // U+0080 -> U+07FF - (*character)[0] = f_utf_byte_2 | ((char) ((unicode & 0x7c0) >> 6)); - (*character)[1] = f_utf_byte_1 | ((char) (unicode & 0x3f)); + (*character)[0] = F_utf_byte_2_d | ((char) ((unicode & 0x7c0) >> 6)); + (*character)[1] = F_utf_byte_1_d | ((char) (unicode & 0x3f)); if (width_max > 2) { (*character)[2] = 0; @@ -2085,9 +2085,9 @@ extern "C" { } // U+0800 -> U+FFFF - (*character)[0] = f_utf_byte_3 | ((char) ((unicode & 0xf000) >> 12)); - (*character)[1] = f_utf_byte_1 | ((char) ((unicode & 0xfc0) >> 6)); - (*character)[2] = f_utf_byte_1 | ((char) (unicode & 0x3f)); + (*character)[0] = F_utf_byte_3_d | ((char) ((unicode & 0xf000) >> 12)); + (*character)[1] = F_utf_byte_1_d | ((char) ((unicode & 0xfc0) >> 6)); + (*character)[2] = F_utf_byte_1_d | ((char) (unicode & 0x3f)); if (width_max > 3) { character[3] = 0; @@ -2099,10 +2099,10 @@ extern "C" { } // U+10000 -> U+10FFFF - (*character)[0] = f_utf_byte_4 | ((char) ((unicode & 0x1c0000) >> 18)); - (*character)[1] = f_utf_byte_1 | ((char) ((unicode & 0x3f000) >> 12)); - (*character)[2] = f_utf_byte_1 | ((char) ((unicode & 0xfc0) >> 6)); - (*character)[3] = f_utf_byte_1 | ((char) (unicode & 0x3f)); + (*character)[0] = F_utf_byte_4_d | ((char) ((unicode & 0x1c0000) >> 18)); + (*character)[1] = F_utf_byte_1_d | ((char) ((unicode & 0x3f000) >> 12)); + (*character)[2] = F_utf_byte_1_d | ((char) ((unicode & 0xfc0) >> 6)); + (*character)[3] = F_utf_byte_1_d | ((char) (unicode & 0x3f)); } return F_none; diff --git a/level_0/f_utf/c/utf_dynamic.c b/level_0/f_utf/c/utf_dynamic.c index 3a04aea..c8f48ef 100644 --- a/level_0/f_utf/c/utf_dynamic.c +++ b/level_0/f_utf/c/utf_dynamic.c @@ -166,12 +166,12 @@ extern "C" { if (dynamic->used + 1 > dynamic->size) { f_array_length_t size = dynamic->used + step; - if (size > f_string_t_size) { - if (dynamic->used + 1 > f_string_t_size) { + if (size > F_string_t_size_d) { + if (dynamic->used + 1 > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } - size = f_string_t_size; + size = F_string_t_size_d; } return private_f_utf_string_dynamic_resize(size, dynamic); @@ -756,7 +756,7 @@ extern "C" { if (!buffer.used) return F_data_not_eos; if (range->start > range->stop) return F_data_not_stop; - while (buffer.string[range->start] != f_utf_character_t_eol) { + while (buffer.string[range->start] != F_utf_character_t_eol_d) { if (macro_f_utf_character_t_width_is(buffer.string[range->start]) == 1) { return F_status_set_error(F_utf); @@ -787,7 +787,7 @@ extern "C" { return F_status_set_error(F_utf); } - if (buffer.string[range->start] == f_utf_character_t_eol) return F_none_eol; + if (buffer.string[range->start] == F_utf_character_t_eol_d) return F_none_eol; ++range->start; @@ -835,7 +835,7 @@ extern "C" { return F_none; } - if (destination->used == f_string_t_size) { + if (destination->used == F_string_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -868,7 +868,7 @@ extern "C" { } // for } - if (destination->used == f_string_t_size) { + if (destination->used == F_string_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -948,12 +948,12 @@ extern "C" { if (dynamics->used + 1 > dynamics->size) { f_array_length_t size = dynamics->used + step; - if (size > f_array_length_t_size) { - if (dynamics->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (dynamics->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_utf_string_dynamics_resize(size, dynamics); @@ -970,7 +970,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (dynamics->used + amount > dynamics->size) { - if (dynamics->used + amount > f_array_length_t_size) { + if (dynamics->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } diff --git a/level_0/f_utf/c/utf_dynamic.h b/level_0/f_utf/c/utf_dynamic.h index 1dd6bfd..6a4b1c4 100644 --- a/level_0/f_utf/c/utf_dynamic.h +++ b/level_0/f_utf/c/utf_dynamic.h @@ -281,7 +281,7 @@ extern "C" { * Resize the dynamic string to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -307,7 +307,7 @@ extern "C" { * Resize the dynamic string to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -1113,7 +1113,7 @@ extern "C" { /** * Increase the size of the dynamic string array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -1139,7 +1139,7 @@ extern "C" { * Resize the dynamic string array to a larger size. * * This will resize making the array larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount diff --git a/level_0/f_utf/c/utf_map.c b/level_0/f_utf/c/utf_map.c index 04eb898..58601a2 100644 --- a/level_0/f_utf/c/utf_map.c +++ b/level_0/f_utf/c/utf_map.c @@ -88,12 +88,12 @@ extern "C" { if (map_multis->used + 1 > map_multis->size) { f_array_length_t size = map_multis->used + step; - if (size > f_array_length_t_size) { - if (map_multis->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (map_multis->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_utf_string_map_multis_resize(size, map_multis); @@ -111,7 +111,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (map_multis->used + amount > map_multis->size) { - if (map_multis->used + amount > f_array_length_t_size) { + if (map_multis->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -217,12 +217,12 @@ extern "C" { if (maps->used + 1 > maps->size) { f_array_length_t size = maps->used + step; - if (size > f_array_length_t_size) { - if (maps->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (maps->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_utf_string_maps_resize(size, maps); @@ -240,7 +240,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (maps->used + amount > maps->size) { - if (maps->used + amount > f_array_length_t_size) { + if (maps->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } diff --git a/level_0/f_utf/c/utf_map.h b/level_0/f_utf/c/utf_map.h index 694b041..2adf956 100644 --- a/level_0/f_utf/c/utf_map.h +++ b/level_0/f_utf/c/utf_map.h @@ -221,7 +221,7 @@ extern "C" { /** * Increase the size of the map_multis array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -247,7 +247,7 @@ extern "C" { * Resize the map_multis array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount @@ -376,7 +376,7 @@ extern "C" { /** * Increase the size of the string maps array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -402,7 +402,7 @@ extern "C" { * Resize the string maps array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount diff --git a/level_0/f_utf/c/utf_triple.c b/level_0/f_utf/c/utf_triple.c index 7929799..99bd571 100644 --- a/level_0/f_utf/c/utf_triple.c +++ b/level_0/f_utf/c/utf_triple.c @@ -98,12 +98,12 @@ extern "C" { if (triples->used + 1 > triples->size) { f_array_length_t size = triples->used + step; - if (size > f_array_length_t_size) { - if (triples->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (triples->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return private_f_utf_string_triples_resize(size, triples); @@ -121,7 +121,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (triples->used + amount > triples->size) { - if (triples->used + amount > f_array_length_t_size) { + if (triples->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } diff --git a/level_0/f_utf/c/utf_triple.h b/level_0/f_utf/c/utf_triple.h index 9315f83..2253c68 100644 --- a/level_0/f_utf/c/utf_triple.h +++ b/level_0/f_utf/c/utf_triple.h @@ -173,7 +173,7 @@ extern "C" { /** * Increase the size of the string triples array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param step @@ -199,7 +199,7 @@ extern "C" { * Resize the string triples array to a larger size. * * This will resize making the string larger based on the given length. - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param amount diff --git a/level_1/fl_control_group/c/control_group.c b/level_1/fl_control_group/c/control_group.c index edb09d5..156b168 100644 --- a/level_1/fl_control_group/c/control_group.c +++ b/level_1/fl_control_group/c/control_group.c @@ -21,7 +21,7 @@ extern "C" { } } - f_file_t file = macro_f_file_t_initialize2(0, -1, f_file_flag_write_only); + f_file_t file = macro_f_file_t_initialize2(0, -1, F_file_flag_write_only_d); f_status_t status = F_none; f_array_length_t length = 0; @@ -29,7 +29,7 @@ extern "C" { if (!control_group.groups.array[i].used) continue; - length = control_group.path.used + control_group.groups.array[i].used + f_control_group_path_system_suffix_length; + length = control_group.path.used + control_group.groups.array[i].used + F_control_group_path_system_suffix_s_length; char path[length + 1]; @@ -38,7 +38,7 @@ extern "C" { } memcpy(path + control_group.path.used, control_group.groups.array[i].string, control_group.groups.array[i].used); - memcpy(path + control_group.path.used + f_control_group_path_system_default_length, f_control_group_path_system_suffix, f_control_group_path_system_suffix_length); + memcpy(path + control_group.path.used + F_control_group_path_system_default_s_length, F_control_group_path_system_suffix_s, F_control_group_path_system_suffix_s_length); path[length] = 0; diff --git a/level_1/fl_conversion/c/private-conversion.c b/level_1/fl_conversion/c/private-conversion.c index 0736800..7dc15e8 100644 --- a/level_1/fl_conversion/c/private-conversion.c +++ b/level_1/fl_conversion/c/private-conversion.c @@ -27,7 +27,7 @@ extern "C" { ++digits; if (negative) { - if (digits > f_conversion_digits_binary_signed) { + if (digits > F_conversion_digits_binary_signed_d) { return F_status_set_error(F_number_underflow); } @@ -35,7 +35,7 @@ extern "C" { converted -= digit; } else { - if (digits > f_conversion_digits_binary_signed) { + if (digits > F_conversion_digits_binary_signed_d) { return F_status_set_error(F_number_overflow); } @@ -85,7 +85,7 @@ extern "C" { if (digits) { ++digits; - if (digits > f_conversion_digits_binary_unsigned) { + if (digits > F_conversion_digits_binary_unsigned_d) { return F_status_set_error(F_number_overflow); } @@ -130,8 +130,8 @@ extern "C" { ++digits; if (negative) { - if (digits > f_conversion_digits_decimal_signed) { - if ((converted * 10) - digit < f_number_t_size_negative || (converted * 10) - digit > converted) { + if (digits > F_conversion_digits_decimal_signed_d) { + if ((converted * 10) - digit < F_number_t_size_negative_d || (converted * 10) - digit > converted) { return F_status_set_error(F_number_underflow); } } @@ -140,8 +140,8 @@ extern "C" { converted -= digit; } else { - if (digits > f_conversion_digits_decimal_signed) { - if ((converted * 10) + digit > f_number_t_size_positive || (converted * 10) + digit < converted) { + if (digits > F_conversion_digits_decimal_signed_d) { + if ((converted * 10) + digit > F_number_t_size_positive_d || (converted * 10) + digit < converted) { return F_status_set_error(F_number_overflow); } } @@ -193,8 +193,8 @@ extern "C" { if (digits) { ++digits; - if (digits > f_conversion_digits_decimal_unsigned) { - if ((converted * 10) + digit > f_number_t_size_unsigned || (converted * 10) + digit < converted) { + if (digits > F_conversion_digits_decimal_unsigned_d) { + if ((converted * 10) + digit > F_number_t_size_unsigned_d || (converted * 10) + digit < converted) { return F_status_set_error(F_number_overflow); } } @@ -240,8 +240,8 @@ extern "C" { ++digits; if (negative) { - if (digits > f_conversion_digits_duodecimal_signed) { - if ((converted * 12) - digit < f_number_t_size_negative || (converted * 12) - digit > converted) { + if (digits > F_conversion_digits_duodecimal_signed_d) { + if ((converted * 12) - digit < F_number_t_size_negative_d || (converted * 12) - digit > converted) { return F_status_set_error(F_number_underflow); } } @@ -250,8 +250,8 @@ extern "C" { converted -= digit; } else { - if (digits > f_conversion_digits_duodecimal_signed) { - if ((converted * 12) + digit > f_number_t_size_positive || (converted * 12) + digit < converted) { + if (digits > F_conversion_digits_duodecimal_signed_d) { + if ((converted * 12) + digit > F_number_t_size_positive_d || (converted * 12) + digit < converted) { return F_status_set_error(F_number_overflow); } } @@ -303,8 +303,8 @@ extern "C" { if (digits) { ++digits; - if (digits > f_conversion_digits_duodecimal_unsigned) { - if ((converted * 12) + digit > f_number_t_size_unsigned || (converted * 12) + digit < converted) { + if (digits > F_conversion_digits_duodecimal_unsigned_d) { + if ((converted * 12) + digit > F_number_t_size_unsigned_d || (converted * 12) + digit < converted) { return F_status_set_error(F_number_overflow); } } @@ -350,8 +350,8 @@ extern "C" { ++digits; if (negative) { - if (digits > f_conversion_digits_hexidecimal_signed) { - if ((converted << 4) - digit < f_number_t_size_negative || (converted << 4) - digit > converted) { + if (digits > F_conversion_digits_hexidecimal_signed_d) { + if ((converted << 4) - digit < F_number_t_size_negative_d || (converted << 4) - digit > converted) { return F_status_set_error(F_number_underflow); } } @@ -360,8 +360,8 @@ extern "C" { converted -= digit; } else { - if (digits > f_conversion_digits_hexidecimal_signed) { - if ((converted << 4) + digit > f_number_t_size_positive || (converted << 4) + digit < converted) { + if (digits > F_conversion_digits_hexidecimal_signed_d) { + if ((converted << 4) + digit > F_number_t_size_positive_d || (converted << 4) + digit < converted) { return F_status_set_error(F_number_overflow); } } @@ -413,8 +413,8 @@ extern "C" { if (digits) { ++digits; - if (digits > f_conversion_digits_hexidecimal_unsigned) { - if ((converted << 4) + digit > f_number_t_size_unsigned || (converted << 4) + digit < converted) { + if (digits > F_conversion_digits_hexidecimal_unsigned_d) { + if ((converted << 4) + digit > F_number_t_size_unsigned_d || (converted << 4) + digit < converted) { return F_status_set_error(F_number_overflow); } } @@ -460,8 +460,8 @@ extern "C" { ++digits; if (negative) { - if (digits > f_conversion_digits_octal_signed) { - if ((converted << 3) - digit < f_number_t_size_negative || (converted << 3) - digit > converted) { + if (digits > F_conversion_digits_octal_signed_d) { + if ((converted << 3) - digit < F_number_t_size_negative_d || (converted << 3) - digit > converted) { return F_status_set_error(F_number_underflow); } } @@ -470,8 +470,8 @@ extern "C" { converted -= digit; } else { - if (digits > f_conversion_digits_octal_signed) { - if ((converted << 3) + digit > f_number_t_size_positive || (converted << 3) + digit < converted) { + if (digits > F_conversion_digits_octal_signed_d) { + if ((converted << 3) + digit > F_number_t_size_positive_d || (converted << 3) + digit < converted) { return F_status_set_error(F_number_overflow); } } @@ -523,8 +523,8 @@ extern "C" { if (digits) { ++digits; - if (digits > f_conversion_digits_octal_unsigned) { - if ((converted << 3) + digit > f_number_t_size_unsigned || (converted << 3) + digit < converted) { + if (digits > F_conversion_digits_octal_unsigned_d) { + if ((converted << 3) + digit > F_number_t_size_unsigned_d || (converted << 3) + digit < converted) { return F_status_set_error(F_number_overflow); } } diff --git a/level_1/fl_directory/c/directory.h b/level_1/fl_directory/c/directory.h index 32bdd52..4006755 100644 --- a/level_1/fl_directory/c/directory.h +++ b/level_1/fl_directory/c/directory.h @@ -72,7 +72,7 @@ extern "C" { * If 0, then this and statuses are ignored. */ #ifndef _di_fl_directory_recurse_t_ - #define fl_directory_recurse_depth_max 65535 + #define FL_directory_recurse_depth_max_d 65535 typedef struct { f_number_unsigned_t depth_max; @@ -86,7 +86,7 @@ extern "C" { f_directory_statuss_t *failures; } fl_directory_recurse_t; - #define fl_directory_recurse_t_initialize { fl_directory_recurse_depth_max, f_file_default_read_size, F_false, macro_f_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), 0, 0 } + #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 } #endif // _di_fl_directory_recurse_t_ /** diff --git a/level_1/fl_directory/c/private-directory.c b/level_1/fl_directory/c/private-directory.c index 0ce4b7a..6efd35f 100644 --- a/level_1/fl_directory/c/private-directory.c +++ b/level_1/fl_directory/c/private-directory.c @@ -164,7 +164,7 @@ extern "C" { const f_status_t status_failure = status; - macro_f_memory_structure_increment(status, (*recurse.failures), 1, f_memory_default_allocation_small, macro_f_directory_statuss_t_resize, F_array_too_large); + macro_f_memory_structure_increment(status, (*recurse.failures), 1, F_memory_default_allocation_small_d, macro_f_directory_statuss_t_resize, F_array_too_large); if (F_status_is_error(status)) return status; f_directory_status_t failure = f_directory_status_t_initialize; @@ -178,7 +178,7 @@ extern "C" { status = f_file_stat(source.string, F_false, &source_stat); if (F_status_is_error(status)) { if (status == F_status_set_error(F_string_too_large)) { - size = f_string_t_size - 1; + size = F_string_t_size_d - 1; } else { size = source.used + file.used + 1; @@ -192,7 +192,7 @@ extern "C" { } else { if (status == F_status_set_error(F_string_too_large)) { - size = f_string_t_size - 1; + size = F_string_t_size_d - 1; } else { size = destination.used + file.used + 1; @@ -369,7 +369,7 @@ extern "C" { const f_status_t status_failure = status; - macro_f_memory_structure_increment(status, (*recurse.failures), 1, f_memory_default_allocation_small, macro_f_directory_statuss_t_resize, F_array_too_large); + macro_f_memory_structure_increment(status, (*recurse.failures), 1, F_memory_default_allocation_small_d, macro_f_directory_statuss_t_resize, F_array_too_large); if (F_status_is_error(status)) return status; f_directory_status_t failure = f_directory_status_t_initialize; @@ -384,7 +384,7 @@ extern "C" { if (F_status_is_error(status)) { if (status == F_status_set_error(F_string_too_large)) { - size = f_string_t_size - 1; + size = F_string_t_size_d - 1; } else { size = source.used + file.used + 1; @@ -398,7 +398,7 @@ extern "C" { } else { if (status == F_status_set_error(F_string_too_large)) { - size = f_string_t_size - 1; + size = F_string_t_size_d - 1; } else { size = destination.used + file.used + 1; @@ -500,7 +500,7 @@ extern "C" { for (; i < length; ++i) { - size = strnlen(entity[i]->d_name, f_directory_name_max); + size = strnlen(entity[i]->d_name, F_directory_name_max_d); // There is no reason to include "." and ".." in the directory listing. if (!strncmp(entity[i]->d_name, "..", 3) || !strncmp(entity[i]->d_name, ".", 2)) { @@ -516,25 +516,25 @@ extern "C" { mode = macro_f_file_type_get(file_stat.st_mode); - if (mode == f_file_type_block) { + if (mode == F_file_type_block_d) { names = &listing->block; } - else if (mode == f_file_type_character) { + else if (mode == F_file_type_character_d) { names = &listing->character; } - else if (mode == f_file_type_directory) { + else if (mode == F_file_type_directory_d) { names = &listing->directory; } - else if (mode == f_file_type_regular) { + else if (mode == F_file_type_regular_d) { names = &listing->regular; } - else if (mode == f_file_type_link) { + else if (mode == F_file_type_link_d) { names = &listing->link; } - else if (mode == f_file_type_fifo) { + else if (mode == F_file_type_fifo_d) { names = &listing->fifo; } - else if (mode == f_file_type_socket) { + else if (mode == F_file_type_socket_d) { names = &listing->socket; } else { @@ -542,7 +542,7 @@ extern "C" { } if (names->used == names->size) { - macro_f_string_dynamics_t_resize(status, (*names), names->size + f_directory_default_allocation_step); + macro_f_string_dynamics_t_resize(status, (*names), names->size + F_directory_default_allocation_step_d); if (F_status_is_error(status)) break; } @@ -551,7 +551,7 @@ extern "C" { if (F_status_is_error(status)) break; if (names->array[names->used].used > 0 && names->array[names->used].string[names->array[names->used].used - 1] != 0) { - if (names->array[names->used].used == f_string_t_size) { + if (names->array[names->used].used == F_string_t_size_d) { status = F_status_set_error(F_string_too_large); break; } @@ -766,7 +766,7 @@ extern "C" { total += length_truncated - start; if (destination->used + total > destination->size) { - if (destination->used + total > f_string_t_size) { + if (destination->used + total > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } diff --git a/level_1/fl_directory/c/private-directory.h b/level_1/fl_directory/c/private-directory.h index 512b879..e75e447 100644 --- a/level_1/fl_directory/c/private-directory.h +++ b/level_1/fl_directory/c/private-directory.h @@ -42,7 +42,7 @@ extern "C" { * @see fl_directory_clone() */ #if !defined(_di_fl_directory_clone_) - extern f_status_t private_fl_directory_clone(const f_string_static_t source, const f_string_static_t destination, const bool role, const fl_directory_recurse_t recurse, const f_number_unsigned_t depth) f_attribute_visibility_internal; + extern f_status_t private_fl_directory_clone(const f_string_static_t source, const f_string_static_t destination, const bool role, const fl_directory_recurse_t recurse, const f_number_unsigned_t depth) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_directory_clone_) /** @@ -75,7 +75,7 @@ extern "C" { * @see fl_directory_clone() */ #if !defined(_di_fl_directory_clone_file_) - extern f_status_t private_fl_directory_clone_file(const f_string_static_t file, const f_string_static_t source, const f_string_static_t destination, const bool role, const fl_directory_recurse_t recurse) f_attribute_visibility_internal; + extern f_status_t private_fl_directory_clone_file(const f_string_static_t file, const f_string_static_t source, const f_string_static_t destination, const bool role, const fl_directory_recurse_t recurse) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_directory_clone_file_) /** @@ -104,7 +104,7 @@ extern "C" { * @see fl_directory_copy() */ #if !defined(_di_fl_directory_copy_) - extern f_status_t private_fl_directory_copy(const f_string_static_t source, const f_string_static_t destination, const f_mode_t mode, const fl_directory_recurse_t recurse, const f_number_unsigned_t depth) f_attribute_visibility_internal; + extern f_status_t private_fl_directory_copy(const f_string_static_t source, const f_string_static_t destination, const f_mode_t mode, const fl_directory_recurse_t recurse, const f_number_unsigned_t depth) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_directory_copy_) /** @@ -135,7 +135,7 @@ extern "C" { * @see fl_directory_copy() */ #if !defined(_di_fl_directory_copy_file_) - extern f_status_t private_fl_directory_copy_file(const f_string_static_t file, const f_string_static_t source, const f_string_static_t destination, const f_mode_t mode, const fl_directory_recurse_t recurse) f_attribute_visibility_internal; + extern f_status_t private_fl_directory_copy_file(const f_string_static_t file, const f_string_static_t source, const f_string_static_t destination, const f_mode_t mode, const fl_directory_recurse_t recurse) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_directory_copy_file_) /** @@ -176,7 +176,7 @@ extern "C" { * @see fl_directory_list() */ #if !defined(_di_fl_directory_list_) - extern f_status_t private_fl_directory_list(const f_string_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t *listing) f_attribute_visibility_internal; + extern f_status_t private_fl_directory_list(const f_string_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t *listing) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_directory_list_) /** @@ -208,7 +208,7 @@ extern "C" { * @see fl_directory_path_push_dynamic() */ #if !defined(_di_fl_directory_path_push_) || !defined(_di_fl_directory_path_push_dynamic_) - extern f_status_t private_fl_directory_path_push(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) f_attribute_visibility_internal; + extern f_status_t private_fl_directory_path_push(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_directory_path_push_) || !defined(_di_fl_directory_path_push_dynamic_) #ifdef __cplusplus diff --git a/level_1/fl_environment/c/environment.c b/level_1/fl_environment/c/environment.c index 404388e..f9ecea8 100644 --- a/level_1/fl_environment/c/environment.c +++ b/level_1/fl_environment/c/environment.c @@ -15,7 +15,7 @@ extern "C" { return F_data_not; } - f_status_t status = f_string_maps_increase(f_memory_default_allocation_small, environment); + f_status_t status = f_string_maps_increase(F_memory_default_allocation_small_d, environment); if (F_status_is_error(status)) return status; environment->array[environment->used].name.used = 0; @@ -102,7 +102,7 @@ extern "C" { // When PATH is "", this is actually a valid search path for PWD. // Append an equivalent representation of PWD (string used length is 0). - macro_f_memory_structure_increment(status, (*paths), 1, f_memory_default_allocation_small, macro_f_string_dynamics_t_resize, F_array_too_large); + macro_f_memory_structure_increment(status, (*paths), 1, F_memory_default_allocation_small_d, macro_f_string_dynamics_t_resize, F_array_too_large); if (F_status_is_error(status)) return status; macro_f_string_dynamic_t_clear(paths->array[paths->used]); @@ -118,7 +118,7 @@ extern "C" { for (i = 0; i <= length; ++i) { if (i == length || path[i] == f_path_separator_variable_s[0]) { - macro_f_memory_structure_increment(status, (*paths), 1, f_memory_default_allocation_small, macro_f_string_dynamics_t_resize, F_array_too_large); + macro_f_memory_structure_increment(status, (*paths), 1, F_memory_default_allocation_small_d, macro_f_string_dynamics_t_resize, F_array_too_large); if (F_status_is_error(status)) return status; if (!i) { @@ -178,7 +178,7 @@ extern "C" { // When PATH is "", this is actually a valid search path for PWD. // Therefore append an equivalent representation of PWD (string used length is 0). - macro_f_memory_structure_increment(status, (*paths), 1, f_memory_default_allocation_small, macro_f_string_dynamics_t_resize, F_array_too_large); + macro_f_memory_structure_increment(status, (*paths), 1, F_memory_default_allocation_small_d, macro_f_string_dynamics_t_resize, F_array_too_large); if (F_status_is_error(status)) return status; macro_f_string_dynamic_t_clear(paths->array[paths->used]); @@ -197,7 +197,7 @@ extern "C" { for (i = 0; i <= path.used; ++i) { if (i == path.used || path.string[i] == f_path_separator_variable_s[0]) { - macro_f_memory_structure_increment(status, (*paths), 1, f_memory_default_allocation_small, macro_f_string_dynamics_t_resize, F_array_too_large); + macro_f_memory_structure_increment(status, (*paths), 1, F_memory_default_allocation_small_d, macro_f_string_dynamics_t_resize, F_array_too_large); if (F_status_is_error(status)) return status; if (!i) { @@ -258,7 +258,7 @@ extern "C" { // When PATH is "", this is actually a valid search path for PWD. // Therefore append an equivalent representation of PWD (string used length is 0). - macro_f_memory_structure_increment(status, (*paths), 1, f_memory_default_allocation_small, macro_f_string_dynamics_t_resize, F_array_too_large); + macro_f_memory_structure_increment(status, (*paths), 1, F_memory_default_allocation_small_d, macro_f_string_dynamics_t_resize, F_array_too_large); if (F_status_is_error(status)) return status; paths->array[paths->used].string = 0; @@ -279,7 +279,7 @@ extern "C" { for (; i > 0; --i, --j) { if (!j || path[j] == f_path_separator_variable_s[0]) { - macro_f_memory_structure_increment(status, (*paths), 1, f_memory_default_allocation_small, macro_f_string_dynamics_t_resize, F_array_too_large); + macro_f_memory_structure_increment(status, (*paths), 1, F_memory_default_allocation_small_d, macro_f_string_dynamics_t_resize, F_array_too_large); if (F_status_is_error(status)) return status; if (path[j] == f_path_separator_variable_s[0]) { @@ -355,7 +355,7 @@ extern "C" { // When PATH is "", this is actually a valid search path for PWD. // Therefore append an equivalent representation of PWD (string used length is 0). - macro_f_memory_structure_increment(status, (*paths), 1, f_memory_default_allocation_small, macro_f_string_dynamics_t_resize, F_array_too_large); + macro_f_memory_structure_increment(status, (*paths), 1, F_memory_default_allocation_small_d, macro_f_string_dynamics_t_resize, F_array_too_large); if (F_status_is_error(status)) return status; macro_f_string_dynamic_t_clear(paths->array[paths->used]); @@ -376,7 +376,7 @@ extern "C" { for (; i > 0; --i, --j) { if (!j || path.string[j] == f_path_separator_variable_s[0]) { - macro_f_memory_structure_increment(status, (*paths), 1, f_memory_default_allocation_small, macro_f_string_dynamics_t_resize, F_array_too_large); + macro_f_memory_structure_increment(status, (*paths), 1, F_memory_default_allocation_small_d, macro_f_string_dynamics_t_resize, F_array_too_large); if (F_status_is_error(status)) return status; if (path.string[j] == f_path_separator_variable_s[0]) { diff --git a/level_1/fl_execute/c/execute-common.h b/level_1/fl_execute/c/execute-common.h index 838c3e9..5bbf7e9 100644 --- a/level_1/fl_execute/c/execute-common.h +++ b/level_1/fl_execute/c/execute-common.h @@ -19,13 +19,13 @@ extern "C" { /** * A structure for containing additional parameters for the execute functions that call the execv() family of functions. * - * bitwise options: - * fl_execute_parameter_option_exit: used to desginate to exit after calling child otherwise child process will return. - * fl_execute_parameter_option_path: used to designate that the full path to the program is to be passed in argument[0] instead of the program name (such as '/bin/bash' instead of 'bash'). - * fl_execute_parameter_option_threadsafe: used to designate that threadsafe functions are to be used (such as: f_thread_signal_mask instead of f_signal_mask). - * fl_execute_parameter_option_return: used to designate that the parent process will immediately return instead of waiting for the child process to complete. + * FL_execute_parameter_option_*: + * - exit: used to desginate to exit after calling child otherwise child process will return. + * - path: used to designate that the full path to the program is to be passed in argument[0] instead of the program name (such as '/bin/bash' instead of 'bash'). + * - threadsafe: used to designate that threadsafe functions are to be used (such as: f_thread_signal_mask instead of f_signal_mask). + * - return: used to designate that the parent process will immediately return instead of waiting for the child process to complete. * - * If thread support is disabled in the library, then fl_execute_parameter_option_threadsafe will fallback to non-threadsafe. + * If thread support is disabled in the library, then FL_execute_parameter_option_threadsafe_d will fallback to non-threadsafe. * * option: Accepts the bitwise options * wait: Represents options passed to waitpid(), such as WUNTRACED. @@ -34,10 +34,10 @@ extern "C" { * data: The data to pipe to the child process, set to 0 to not use. */ #ifndef _di_fl_execute_parameter_t_ - #define fl_execute_parameter_option_exit 0x1 - #define fl_execute_parameter_option_path 0x2 - #define fl_execute_parameter_option_threadsafe 0x4 - #define fl_execute_parameter_option_return 0x8 + #define FL_execute_parameter_option_exit_d 0x1 + #define FL_execute_parameter_option_path_d 0x2 + #define FL_execute_parameter_option_threadsafe_d 0x4 + #define FL_execute_parameter_option_return_d 0x8 typedef struct { uint8_t option; diff --git a/level_1/fl_fss/c/fss_basic.c b/level_1/fl_fss/c/fss_basic.c index 676bf94..094caf3 100644 --- a/level_1/fl_fss/c/fss_basic.c +++ b/level_1/fl_fss/c/fss_basic.c @@ -76,7 +76,7 @@ extern "C" { return status; } - if (buffer.string[range->start] == f_fss_basic_close) break; + if (buffer.string[range->start] == f_fss_basic_close_s[0]) break; } // for if (F_status_is_error(status)) { @@ -101,7 +101,7 @@ extern "C" { const f_array_length_t destination_used = destination->used; - f_status_t status = private_fl_fss_basic_write(F_true, object, quote ? quote : f_fss_delimit_quote_double, state, range, destination); + f_status_t status = private_fl_fss_basic_write(F_true, object, quote ? quote : F_fss_delimit_quote_double_s, state, range, destination); if (status == F_data_not_stop || status == F_data_not_eos) { @@ -114,8 +114,8 @@ extern "C" { return status_allocation; } - destination->string[destination->used++] = quote ? quote : f_fss_delimit_quote_double; - destination->string[destination->used++] = quote ? quote : f_fss_delimit_quote_double; + destination->string[destination->used++] = quote ? quote : F_fss_delimit_quote_double_s; + destination->string[destination->used++] = quote ? quote : F_fss_delimit_quote_double_s; } if (complete == f_fss_complete_partial || complete == f_fss_complete_partial_trim || complete == f_fss_complete_full || complete == f_fss_complete_full_trim) { @@ -123,7 +123,7 @@ extern "C" { f_status_t status2 = F_none; if (complete == f_fss_complete_full_trim) { - status2 = private_fl_fss_basic_write_object_trim(quote ? quote : f_fss_delimit_quote_double, destination_used, state, destination); + status2 = private_fl_fss_basic_write_object_trim(quote ? quote : F_fss_delimit_quote_double_s, destination_used, state, destination); if (F_status_is_error(status2)) { destination->used = destination_used; @@ -139,7 +139,7 @@ extern "C" { return status2; } - destination->string[destination->used++] = f_fss_basic_open; + destination->string[destination->used++] = f_fss_basic_open_s[0]; } } @@ -170,7 +170,7 @@ extern "C" { status = f_string_dynamic_increase(state.step_large, destination); if (F_status_is_error(status)) return status; - destination->string[destination->used++] = f_fss_basic_close; + destination->string[destination->used++] = f_fss_basic_close_s[0]; } if (range->start > range->stop) { @@ -196,13 +196,13 @@ extern "C" { } } - if (content.string[range->start] == f_fss_eol) { + if (content.string[range->start] == f_fss_eol_s[0]) { destination->used = destination_used; return F_status_set_error(F_none_eol); } - if (content.string[range->start] == f_fss_delimit_placeholder) { + if (content.string[range->start] == F_fss_delimit_placeholder_s) { continue; } @@ -210,7 +210,7 @@ extern "C" { } // for if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim || complete == f_fss_complete_end) { - destination->string[destination->used++] = f_fss_basic_close; + destination->string[destination->used++] = f_fss_basic_close_s[0]; } if (range->start > range->stop) { diff --git a/level_1/fl_fss/c/fss_basic_list.c b/level_1/fl_fss/c/fss_basic_list.c index 4437dc7..73cf0a1 100644 --- a/level_1/fl_fss/c/fss_basic_list.c +++ b/level_1/fl_fss/c/fss_basic_list.c @@ -39,7 +39,7 @@ extern "C" { found->start = range->start; // ignore all comment lines. - if (buffer.string[range->start] == f_fss_comment) { + if (buffer.string[range->start] == f_fss_comment_s[0]) { status = f_fss_seek_to_eol(buffer, range); if (F_status_is_error(status)) return status; @@ -66,7 +66,7 @@ extern "C" { bool graph_first = F_true; // identify where the object ends. - while (range->start <= range->stop && range->start < buffer.used && buffer.string[range->start] != f_fss_eol) { + while (range->start <= range->stop && range->start < buffer.used && buffer.string[range->start] != f_fss_eol_s[0]) { if (state.interrupt) { status = state.interrupt((void *) &state, 0); @@ -77,7 +77,7 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_delimit_slash) { + if (buffer.string[range->start] == F_fss_delimit_slash_s) { slash_first = range->start; slash_count = 1; @@ -92,9 +92,9 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_delimit_placeholder) { + if (buffer.string[range->start] == F_fss_delimit_placeholder_s) { continue; - } else if (buffer.string[range->start] != f_fss_delimit_slash) { + } else if (buffer.string[range->start] != F_fss_delimit_slash_s) { break; } @@ -103,7 +103,7 @@ extern "C" { private_macro_fl_fss_object_return_on_overflow((buffer), (*range), (*found), (*delimits), delimits_used, F_data_not_eos, F_data_not_stop); - if (buffer.string[range->start] == f_fss_basic_list_open) { + if (buffer.string[range->start] == f_fss_basic_list_open_s[0]) { graph_first = F_false; stop = range->start - 1; @@ -121,7 +121,7 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_eol) break; + if (buffer.string[range->start] == f_fss_eol_s[0]) break; status = f_fss_is_space(buffer, *range); if (F_status_is_error(status)) break; @@ -134,7 +134,7 @@ extern "C" { private_macro_fl_fss_object_return_on_overflow((buffer), (*range), (*found), (*delimits), delimits_used, F_data_not_eos, F_data_not_stop); - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { start = range->start; range->start = slash_first; @@ -145,7 +145,7 @@ extern "C" { if (slash_count % 2 == 0) { while (slash_count > 0) { - if (buffer.string[range->start] == f_fss_delimit_slash) { + if (buffer.string[range->start] == F_fss_delimit_slash_s) { if (slash_count % 2 == 1) { delimits->array[delimits->used] = range->start; ++delimits->used; @@ -174,7 +174,7 @@ extern "C" { return FL_fss_found_object_not; } } - else if (graph_first && buffer.string[range->start] == f_fss_comment) { + else if (graph_first && buffer.string[range->start] == f_fss_comment_s[0]) { graph_first = F_false; // comments may only have whitespace before the '#', therefore only the first slash needs to be delimited. @@ -190,7 +190,7 @@ extern "C" { continue; } - else if (buffer.string[range->start] == f_fss_basic_list_open) { + else if (buffer.string[range->start] == f_fss_basic_list_open_s[0]) { graph_first = F_false; stop = range->start - 1; @@ -208,7 +208,7 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_eol) break; + if (buffer.string[range->start] == f_fss_eol_s[0]) break; status = f_fss_is_space(buffer, *range); if (F_status_is_error(status)) break; @@ -221,7 +221,7 @@ extern "C" { private_macro_fl_fss_object_return_on_overflow_delimited((buffer), (*range), (*found), F_none_eos, F_none_stop); - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { found->stop = stop; status = f_utf_buffer_increment(buffer, range, 1); @@ -311,7 +311,7 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { if (graph_first == 0x2) { macro_f_fss_delimits_t_increase(status, state.step_small, (*delimits)); if (F_status_is_error(status)) break; @@ -326,7 +326,7 @@ extern "C" { continue; } - if (buffer.string[range->start] == f_fss_delimit_slash) { + if (buffer.string[range->start] == F_fss_delimit_slash_s) { slash_first = range->start; slash_count = 1; @@ -341,9 +341,9 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_delimit_placeholder) { + if (buffer.string[range->start] == F_fss_delimit_placeholder_s) { continue; - } else if (buffer.string[range->start] != f_fss_delimit_slash) { + } else if (buffer.string[range->start] != F_fss_delimit_slash_s) { break; } @@ -352,7 +352,7 @@ extern "C" { if (range->start > range->stop || range->start >= buffer.used) break; - if (buffer.string[range->start] == f_fss_basic_list_open) { + if (buffer.string[range->start] == f_fss_basic_list_open_s[0]) { graph_first = 0x0; ++range->start; @@ -367,7 +367,7 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_eol) break; + if (buffer.string[range->start] == f_fss_eol_s[0]) break; status = f_fss_is_space(buffer, *range); if (F_status_is_error(status)) break; @@ -380,7 +380,7 @@ extern "C" { if (range->start > range->stop || range->start >= buffer.used) break; - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { start = range->start; range->start = slash_first; @@ -396,7 +396,7 @@ extern "C" { while (slash_count > 0) { - if (buffer.string[range->start] == f_fss_delimit_slash) { + if (buffer.string[range->start] == F_fss_delimit_slash_s) { if (slash_count % 2 == 1) { delimits->array[delimits->used++] = range->start; } @@ -421,7 +421,7 @@ extern "C" { range->start = start + 1; } } - else if (graph_first == 0x1 && buffer.string[range->start] == f_fss_comment) { + else if (graph_first == 0x1 && buffer.string[range->start] == f_fss_comment_s[0]) { graph_first = 0x2; comment_delimit = slash_first; ++range->start; @@ -430,7 +430,7 @@ extern "C" { continue; } - if (buffer.string[range->start] == f_fss_basic_list_open) { + if (buffer.string[range->start] == f_fss_basic_list_open_s[0]) { ++range->start; graph_first = 0x0; @@ -445,7 +445,7 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_eol) break; + if (buffer.string[range->start] == f_fss_eol_s[0]) break; status = f_fss_is_space(buffer, *range); if (F_status_is_error(status)) break; @@ -461,9 +461,9 @@ extern "C" { if (range->start > range->stop || range->start >= buffer.used) break; // found a valid object, set stop point to last newline. - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { - if (newline_last == found->array[found->used].start && buffer.string[found->array[found->used].start] != f_fss_eol) { + if (newline_last == found->array[found->used].start && buffer.string[found->array[found->used].start] != f_fss_eol_s[0]) { range->start = newline_last; return FL_fss_found_content_not; } @@ -475,7 +475,7 @@ extern "C" { return FL_fss_found_content; } - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { if (graph_first == 0x2) { macro_f_fss_delimits_t_increase(status, state.step_small, (*delimits)); if (F_status_is_error(status)) break; @@ -490,7 +490,7 @@ extern "C" { continue; } - if (graph_first == 0x1 && buffer.string[range->start] == f_fss_comment) { + if (graph_first == 0x1 && buffer.string[range->start] == f_fss_comment_s[0]) { start = range->start; status = f_fss_seek_to_eol(buffer, range); @@ -553,10 +553,10 @@ extern "C" { const f_status_t status_allocation = f_string_dynamic_increase_by(2, destination); if (F_status_is_error(status_allocation)) return status_allocation; - destination->string[destination->used++] = f_fss_basic_list_open; + destination->string[destination->used++] = f_fss_basic_list_open_s[0]; if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim) { - destination->string[destination->used++] = f_fss_basic_list_open_end; + destination->string[destination->used++] = f_fss_basic_list_open_end_s[0]; } } @@ -590,13 +590,13 @@ extern "C" { } } - if (object.string[range->start] == f_fss_comment) { + if (object.string[range->start] == f_fss_comment_s[0]) { // when a comment is found, escape it. status = f_string_dynamic_increase(state.step_large, destination); if (F_status_is_error(status)) break; - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; break; } @@ -606,8 +606,8 @@ extern "C" { if (status == F_true) break; // objects will not have leading whitespaces, but having this does not result in an invalid object, so just write the provided spaces. - if (object.string[range->start] != f_fss_delimit_placeholder) { - if (object.string[range->start] == f_fss_eol) { + if (object.string[range->start] != F_fss_delimit_placeholder_s) { + if (object.string[range->start] == f_fss_eol_s[0]) { status = F_status_set_error(F_none_eol); break; } @@ -648,7 +648,7 @@ extern "C" { } } - if (object.string[range->start] == f_fss_delimit_slash) { + if (object.string[range->start] == F_fss_delimit_slash_s) { slash_count = 1; for (++range->start; range->start <= range->stop && range->start < object.used; ++range->start) { @@ -662,9 +662,9 @@ extern "C" { } } - if (object.string[range->start] == f_fss_delimit_placeholder) { + if (object.string[range->start] == F_fss_delimit_placeholder_s) { continue; - } else if (object.string[range->start] != f_fss_delimit_slash) { + } else if (object.string[range->start] != F_fss_delimit_slash_s) { break; } @@ -683,7 +683,7 @@ extern "C" { if (F_status_is_error(status)) break; while (--slash_count) { - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; } // while if (range->start > range->stop || range->start >= object.used) { @@ -691,8 +691,8 @@ extern "C" { } } - if (object.string[range->start] != f_fss_delimit_placeholder) { - if (object.string[range->start] == f_fss_eol) { + if (object.string[range->start] != F_fss_delimit_placeholder_s) { + if (object.string[range->start] == f_fss_eol_s[0]) { status = F_status_set_error(F_none_eol); break; } @@ -736,10 +736,10 @@ extern "C" { return status; } - destination->string[destination->used++] = f_fss_basic_list_open; + destination->string[destination->used++] = f_fss_basic_list_open_s[0]; if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim) { - destination->string[destination->used++] = f_fss_basic_list_open_end; + destination->string[destination->used++] = f_fss_basic_list_open_end_s[0]; } } @@ -770,7 +770,7 @@ extern "C" { const f_status_t status_allocation = f_string_dynamic_increase(state.step_large, destination); if (F_status_is_error(status_allocation)) return status_allocation; - destination->string[destination->used++] = f_fss_basic_list_close; + destination->string[destination->used++] = f_fss_basic_list_close_s[0]; } if (status == F_none_stop) { @@ -807,7 +807,7 @@ extern "C" { } } - if (content.string[range->start] == f_fss_delimit_slash && !is_comment) { + if (content.string[range->start] == F_fss_delimit_slash_s && !is_comment) { slash_count = 1; if (do_prepend) { @@ -831,31 +831,31 @@ extern "C" { } } - if (content.string[range->start] == f_fss_delimit_placeholder) continue; - if (content.string[range->start] != f_fss_delimit_slash) break; + if (content.string[range->start] == F_fss_delimit_placeholder_s) continue; + if (content.string[range->start] != F_fss_delimit_slash_s) break; - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; ++slash_count; } // for - if (content.string[range->start] == f_fss_basic_list_open) { + if (content.string[range->start] == f_fss_basic_list_open_s[0]) { start = range->start++; status = f_fss_skip_past_space(content, range); if (F_status_is_error(status)) break; - if (content.string[range->start] == f_fss_eol || range->start >= content.used || range->start > range->stop) { + if (content.string[range->start] == f_fss_eol_s[0] || range->start >= content.used || range->start > range->stop) { // increase by total slashes + 1, along with the basic list open and possible newline. status = f_string_dynamic_increase_by(slash_count + 3, destination); if (F_status_is_error(status)) break; while (--slash_count) { - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; } // while - destination->string[destination->used++] = f_fss_delimit_slash; - destination->string[destination->used++] = f_fss_basic_list_open; + destination->string[destination->used++] = F_fss_delimit_slash_s; + destination->string[destination->used++] = f_fss_basic_list_open_s[0]; range->start = start + 1; @@ -868,12 +868,12 @@ extern "C" { status = f_string_dynamic_increase(state.step_large, destination); if (F_status_is_error(status)) break; - destination->string[destination->used++] = f_fss_basic_list_open; + destination->string[destination->used++] = f_fss_basic_list_open_s[0]; range->start = start + 1; continue; } } - else if (content.string[range->start] == f_fss_basic_list_open && !is_comment) { + else if (content.string[range->start] == f_fss_basic_list_open_s[0] && !is_comment) { start = range->start++; if (do_prepend) { @@ -888,14 +888,14 @@ extern "C" { status = f_fss_skip_past_space(content, range); if (F_status_is_error(status)) break; - if (content.string[range->start] == f_fss_eol || range->start >= content.used || range->start > range->stop) { + if (content.string[range->start] == f_fss_eol_s[0] || range->start >= content.used || range->start > range->stop) { // increase by slash and basic list open and possible newline. status = f_string_dynamic_increase_by(3, destination); if (F_status_is_error(status)) break; - destination->string[destination->used++] = f_fss_delimit_slash; - destination->string[destination->used++] = f_fss_basic_list_open; + destination->string[destination->used++] = F_fss_delimit_slash_s; + destination->string[destination->used++] = f_fss_basic_list_open_s[0]; range->start = start + 1; @@ -908,14 +908,14 @@ extern "C" { status = f_string_dynamic_increase(state.step_large, destination); if (F_status_is_error(status)) break; - destination->string[destination->used++] = f_fss_basic_list_open; + destination->string[destination->used++] = f_fss_basic_list_open_s[0]; range->start = start + 1; continue; } - else if (content.string[range->start] == f_fss_comment && !has_graph) { + else if (content.string[range->start] == f_fss_comment_s[0] && !has_graph) { is_comment = F_true; } - else if (content.string[range->start] == f_fss_eol) { + else if (content.string[range->start] == f_fss_eol_s[0]) { has_graph = F_false; is_comment = F_false; } @@ -930,7 +930,7 @@ extern "C" { } } - if (content.string[range->start] != f_fss_delimit_placeholder) { + if (content.string[range->start] != F_fss_delimit_placeholder_s) { if (do_prepend) { status = f_string_dynamic_prepend(*prepend, destination); if (F_status_is_error(status)) break; @@ -938,7 +938,7 @@ extern "C" { do_prepend = F_false; } - if (content.string[range->start] == f_fss_eol) { + if (content.string[range->start] == f_fss_eol_s[0]) { do_prepend = F_true; } @@ -969,12 +969,12 @@ extern "C" { // check to see if a newline exists, at the end. if (destination->used) { for (i = destination->used - 1; i > 0; --i) { - if (destination->string[i] != f_fss_delimit_placeholder) break; + if (destination->string[i] != F_fss_delimit_placeholder_s) break; } // for } - if (!destination->used || destination->string[i] != f_fss_eol) { - destination->string[destination->used++] = f_fss_basic_list_close; + if (!destination->used || destination->string[i] != f_fss_eol_s[0]) { + destination->string[destination->used++] = f_fss_basic_list_close_s[0]; } } diff --git a/level_1/fl_fss/c/fss_embedded_list.c b/level_1/fl_fss/c/fss_embedded_list.c index 737b8ec..baa2b32 100644 --- a/level_1/fl_fss/c/fss_embedded_list.c +++ b/level_1/fl_fss/c/fss_embedded_list.c @@ -36,7 +36,7 @@ extern "C" { } // return found nothing if this line only contains whitespace and delimit placeholders. - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { // move the start position to after the EOL. ++range->start; @@ -48,7 +48,7 @@ extern "C" { found->start = range->start; // ignore all comment lines. - if (buffer.string[range->start] == f_fss_comment) { + if (buffer.string[range->start] == f_fss_comment_s[0]) { status = f_fss_seek_to_eol(buffer, range); if (F_status_is_error(status)) { @@ -79,7 +79,7 @@ extern "C" { bool graph_first = F_true; // identify where the object ends. - while (range->start <= range->stop && range->start < buffer.used && buffer.string[range->start] != f_fss_eol) { + while (range->start <= range->stop && range->start < buffer.used && buffer.string[range->start] != f_fss_eol_s[0]) { if (state.interrupt) { status = state.interrupt((void *) &state, 0); @@ -90,14 +90,14 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_delimit_slash) { + if (buffer.string[range->start] == F_fss_delimit_slash_s) { slash_first = range->start; slash_count = 1; status = f_utf_buffer_increment(buffer, range, 1); if (F_status_is_error(status)) break; - while (range->start <= range->stop && range->start < buffer.used && (buffer.string[range->start] == f_fss_delimit_placeholder || buffer.string[range->start] == f_fss_delimit_slash)) { + while (range->start <= range->stop && range->start < buffer.used && (buffer.string[range->start] == F_fss_delimit_placeholder_s || buffer.string[range->start] == F_fss_delimit_slash_s)) { if (state.interrupt) { status = state.interrupt((void *) &state, 0); @@ -108,7 +108,7 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_delimit_slash) slash_count++; + if (buffer.string[range->start] == F_fss_delimit_slash_s) slash_count++; status = f_utf_buffer_increment(buffer, range, 1); if (F_status_is_error(status)) break; @@ -118,7 +118,7 @@ extern "C" { private_macro_fl_fss_object_return_on_overflow((buffer), (*range), (*found), (*delimits), delimits_used, F_data_not_eos, F_data_not_stop); - if (buffer.string[range->start] == f_fss_embedded_list_open) { + if (buffer.string[range->start] == f_fss_embedded_list_open_s[0]) { graph_first = F_false; stop = range->start - 1; ++range->start; @@ -134,7 +134,7 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_eol) break; + if (buffer.string[range->start] == f_fss_eol_s[0]) break; status = f_fss_is_graph(buffer, *range); if (F_status_is_error(status)) break; @@ -147,7 +147,7 @@ extern "C" { private_macro_fl_fss_object_return_on_overflow((buffer), (*range), (*found), (*delimits), delimits_used, F_data_not_eos, F_data_not_stop); - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { start = range->start; range->start = slash_first; @@ -158,7 +158,7 @@ extern "C" { if (slash_count % 2 == 0) { while (slash_count > 0) { - if (buffer.string[range->start] == f_fss_delimit_slash) { + if (buffer.string[range->start] == F_fss_delimit_slash_s) { if (slash_count % 2 == 1) { delimits->array[delimits->used] = range->start; ++delimits->used; @@ -183,7 +183,7 @@ extern "C" { return FL_fss_found_object_not; } } - else if (graph_first && buffer.string[range->start] == f_fss_comment) { + else if (graph_first && buffer.string[range->start] == f_fss_comment_s[0]) { graph_first = F_false; // comments may only have whitespace before the '#', therefore only the first slash needs to be delimited. @@ -199,7 +199,7 @@ extern "C" { continue; } - else if (buffer.string[range->start] == f_fss_embedded_list_open) { + else if (buffer.string[range->start] == f_fss_embedded_list_open_s[0]) { graph_first = F_false; stop = range->start - 1; @@ -217,7 +217,7 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_eol) break; + if (buffer.string[range->start] == f_fss_eol_s[0]) break; status = f_fss_is_space(buffer, *range); if (F_status_is_error(status)) break; @@ -232,7 +232,7 @@ extern "C" { private_macro_fl_fss_object_return_on_overflow_delimited((buffer), (*range), (*found), F_none_eos, F_none_stop); - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { found->stop = stop; // move the start position to after the EOL. @@ -262,7 +262,7 @@ extern "C" { } // seek to the end of the line when no valid object is found. - while (range->start <= range->stop && range->start < buffer.used && buffer.string[range->start] != f_fss_eol) { + while (range->start <= range->stop && range->start < buffer.used && buffer.string[range->start] != f_fss_eol_s[0]) { if (state.interrupt) { status = state.interrupt((void *) &state, 0); @@ -380,7 +380,7 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { if (graph_first == 0x2) { macro_f_fss_delimits_t_increase(status, state.step_small, (*delimits)); if (F_status_is_error(status)) break; @@ -403,14 +403,14 @@ extern "C" { continue; } - if (buffer.string[range->start] == f_fss_delimit_slash) { + if (buffer.string[range->start] == F_fss_delimit_slash_s) { slash_first = range->start; slash_last = range->start; slashes.array[depth] = 1; position_previous = range->start++; - while (range->start <= range->stop && range->start < buffer.used && (buffer.string[range->start] == f_fss_delimit_placeholder || buffer.string[range->start] == f_fss_delimit_slash)) { + while (range->start <= range->stop && range->start < buffer.used && (buffer.string[range->start] == F_fss_delimit_placeholder_s || buffer.string[range->start] == F_fss_delimit_slash_s)) { if (state.interrupt) { status = state.interrupt((void *) &state, 0); @@ -423,7 +423,7 @@ extern "C" { position_previous = range->start; - if (buffer.string[range->start] == f_fss_delimit_slash) { + if (buffer.string[range->start] == F_fss_delimit_slash_s) { slash_last = range->start++; ++slashes.array[depth]; } @@ -447,7 +447,7 @@ extern "C" { // Only the first slash before a close is delimited, all others are maintained. // for example '}' = valid close, '\}' represents '}', '\\}' represents '\}', '\\\}' represents '\\}', '\\\\}' represents '\\\}', and so on.. // When slash is odd and a (delimited) valid open/close is found, then save delimited positions and continue. - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { if (graph_first == 0x2) { macro_f_fss_delimits_t_increase(status, state.step_small, (*delimits)); if (F_status_is_error(status)) break; @@ -460,12 +460,12 @@ extern "C" { line_start = range->start; graph_first = 0x1; } - else if (buffer.string[range->start] == f_fss_embedded_list_open || buffer.string[range->start] == f_fss_embedded_list_close) { + else if (buffer.string[range->start] == f_fss_embedded_list_open_s[0] || buffer.string[range->start] == f_fss_embedded_list_close_s[0]) { before_list_open = position_previous; is_open = F_false; graph_first = 0x0; - if (buffer.string[range->start] == f_fss_embedded_list_open) { + if (buffer.string[range->start] == f_fss_embedded_list_open_s[0]) { is_open = F_true; } @@ -482,7 +482,7 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { if (graph_first == 0x2) { macro_f_fss_delimits_t_increase(status, state.step_small, (*delimits)); if (F_status_is_error(status)) break; @@ -496,7 +496,7 @@ extern "C" { break; } - if (buffer.string[range->start] != f_fss_delimit_placeholder) { + if (buffer.string[range->start] != F_fss_delimit_placeholder_s) { status = f_fss_is_space(buffer, *range); if (F_status_is_error(status)) break; @@ -519,7 +519,7 @@ extern "C" { } // this is a valid object open/close that has been delimited, save the slash delimit positions. - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { newline_last = range->start; line_start = range->start + 1; graph_first = 0x1; @@ -539,7 +539,7 @@ extern "C" { // apply slash delimits, only slashes and placeholders should be present. while (slashes.array[depth]) { - if (buffer.string[range->start] == f_fss_delimit_slash) { + if (buffer.string[range->start] == F_fss_delimit_slash_s) { if (slashes.array[depth]-- % 2 == 1) { delimits->array[delimits->used++] = range->start; } @@ -589,7 +589,7 @@ extern "C" { range->start = newline_last; } } - else if (graph_first == 0x1 && buffer.string[range->start] == f_fss_comment) { + else if (graph_first == 0x1 && buffer.string[range->start] == f_fss_comment_s[0]) { graph_first = 0x2; comment_delimit = slash_first; } @@ -597,7 +597,7 @@ extern "C" { graph_first = 0x0; } } - else if (buffer.string[range->start] == f_fss_embedded_list_open) { + else if (buffer.string[range->start] == f_fss_embedded_list_open_s[0]) { graph_first = 0x0; before_list_open = position_previous; position_previous = range->start; @@ -616,9 +616,9 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_eol) break; + if (buffer.string[range->start] == f_fss_eol_s[0]) break; - if (buffer.string[range->start] != f_fss_delimit_placeholder) { + if (buffer.string[range->start] != F_fss_delimit_placeholder_s) { status = f_fss_is_space(buffer, *range); if (F_status_is_error(status)) break; @@ -640,7 +640,7 @@ extern "C" { private_macro_fl_fss_nest_return_on_overflow((buffer), (*range), (*found), (*delimits), delimits_used, (*comments), comments_used, positions_start, objects, slashes, F_data_not_eos, F_data_not_stop); } - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { ++depth; if (depth >= positions_start.size) { @@ -705,7 +705,7 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { newline_last = range->start; line_start = range->start + 1; break; @@ -727,7 +727,7 @@ extern "C" { } } } - else if (buffer.string[range->start] == f_fss_embedded_list_close) { + else if (buffer.string[range->start] == f_fss_embedded_list_close_s[0]) { graph_first = 0x0; while (range->start <= range->stop && range->start < buffer.used) { @@ -746,11 +746,11 @@ extern "C" { status = f_utf_buffer_increment(buffer, range, 1); if (F_status_is_error(status)) break; - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { break; } - if (buffer.string[range->start] != f_fss_delimit_placeholder) { + if (buffer.string[range->start] != F_fss_delimit_placeholder_s) { status = f_fss_is_space(buffer, *range); if (F_status_is_error(status)) break; @@ -769,7 +769,7 @@ extern "C" { private_macro_fl_fss_nest_return_on_overflow((buffer), (*range), (*found), (*delimits), delimits_used, (*comments), comments_used, positions_start, objects, slashes, F_data_not_eos, F_data_not_stop); } - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { macro_f_fss_nest_t_increase(status, state.step_small, (*found)); if (F_status_is_error(status)) break; @@ -845,7 +845,7 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { if (graph_first == 0x2) { macro_f_fss_delimits_t_increase(status, state.step_small, (*delimits)); if (F_status_is_error(status)) break; @@ -875,7 +875,7 @@ extern "C" { } } } - else if (graph_first == 0x1 && buffer.string[range->start] == f_fss_comment) { + else if (graph_first == 0x1 && buffer.string[range->start] == f_fss_comment_s[0]) { position = range->start; status = f_fss_seek_to_eol(buffer, range); @@ -903,7 +903,7 @@ extern "C" { comments->array[comments->used++].stop = range->start++; continue; } - else if (buffer.string[range->start] != f_fss_eol) { + else if (buffer.string[range->start] != f_fss_eol_s[0]) { position_previous = range->start; if (graph_first == 0x1) { @@ -979,10 +979,10 @@ extern "C" { const f_status_t status_allocation = f_string_dynamic_increase_by(2, destination); if (F_status_is_error(status_allocation)) return status_allocation; - destination->string[destination->used++] = f_fss_embedded_list_open; + destination->string[destination->used++] = f_fss_embedded_list_open_s[0]; if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim) { - destination->string[destination->used++] = f_fss_embedded_list_open_end; + destination->string[destination->used++] = f_fss_embedded_list_open_end_s[0]; } } @@ -1014,13 +1014,13 @@ extern "C" { } } - if (object.string[range->start] == f_fss_comment) { + if (object.string[range->start] == f_fss_comment_s[0]) { // when a comment is found, escape it. status = f_string_dynamic_increase(state.step_large, destination); if (F_status_is_error(status)) break; - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; break; } @@ -1030,8 +1030,8 @@ extern "C" { if (status == F_true) break; // objects will not have leading whitespaces, but having this does not result in an invalid object, so just write the provided spaces. - if (object.string[range->start] != f_fss_delimit_placeholder) { - if (object.string[range->start] == f_fss_eol) { + if (object.string[range->start] != F_fss_delimit_placeholder_s) { + if (object.string[range->start] == f_fss_eol_s[0]) { status = F_status_set_error(F_none_eol); break; } @@ -1072,7 +1072,7 @@ extern "C" { } } - if (object.string[range->start] == f_fss_delimit_slash) { + if (object.string[range->start] == F_fss_delimit_slash_s) { slash_count = 1; for (++range->start; range->start <= range->stop && range->start < object.used; ++range->start) { @@ -1086,9 +1086,9 @@ extern "C" { } } - if (object.string[range->start] == f_fss_delimit_placeholder) { + if (object.string[range->start] == F_fss_delimit_placeholder_s) { continue; - } else if (object.string[range->start] != f_fss_delimit_slash) { + } else if (object.string[range->start] != F_fss_delimit_slash_s) { break; } @@ -1107,7 +1107,7 @@ extern "C" { if (F_status_is_error(status)) break; while (--slash_count) { - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; } // while if (range->start > range->stop || range->start >= object.used) { @@ -1116,8 +1116,8 @@ extern "C" { } } - if (object.string[range->start] != f_fss_delimit_placeholder) { - if (object.string[range->start] == f_fss_eol) { + if (object.string[range->start] != F_fss_delimit_placeholder_s) { + if (object.string[range->start] == f_fss_eol_s[0]) { status = F_status_set_error(F_none_eol); break; } @@ -1170,13 +1170,13 @@ extern "C" { } if (!ends_on_space) { - destination->string[destination->used++] = f_fss_space; + destination->string[destination->used++] = F_fss_space_s[0]; } - destination->string[destination->used++] = f_fss_embedded_list_open; + destination->string[destination->used++] = f_fss_embedded_list_open_s[0]; if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim) { - destination->string[destination->used++] = f_fss_embedded_list_open_end; + destination->string[destination->used++] = f_fss_embedded_list_open_end_s[0]; } } @@ -1214,8 +1214,8 @@ extern "C" { const f_status_t status_allocation = f_string_dynamic_increase_by(2, destination); if (F_status_is_error(status_allocation)) return status_allocation; - destination->string[destination->used++] = f_fss_embedded_list_close; - destination->string[destination->used++] = f_fss_embedded_list_close_end; + destination->string[destination->used++] = f_fss_embedded_list_close_s[0]; + destination->string[destination->used++] = f_fss_embedded_list_close_end_s[0]; } return status; @@ -1251,7 +1251,7 @@ extern "C" { } } - if (content.string[range->start] == f_fss_delimit_slash && !is_comment) { + if (content.string[range->start] == F_fss_delimit_slash_s && !is_comment) { slash_count = 1; if (do_prepend) { @@ -1274,32 +1274,32 @@ extern "C" { } } - if (content.string[range->start] == f_fss_delimit_placeholder) continue; - if (content.string[range->start] != f_fss_delimit_slash) break; + if (content.string[range->start] == F_fss_delimit_placeholder_s) continue; + if (content.string[range->start] != F_fss_delimit_slash_s) break; - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; ++slash_count; } // for - if (content.string[range->start] == f_fss_embedded_list_open || content.string[range->start] == f_fss_embedded_list_close) { + if (content.string[range->start] == f_fss_embedded_list_open_s[0] || content.string[range->start] == f_fss_embedded_list_close_s[0]) { start = range->start++; status = f_fss_skip_past_space(content, range); if (F_status_is_error(status)) break; - if (range->start >= content.used || range->start > range->stop || content.string[range->start] == f_fss_eol) { + if (range->start >= content.used || range->start > range->stop || content.string[range->start] == f_fss_eol_s[0]) { // increase by total slashes + 1 embedded list open/close. status = f_string_dynamic_increase_by(slash_count + 2, destination); if (F_status_is_error(status)) break; - if (content.string[range->start] == f_fss_embedded_list_open) { + if (content.string[range->start] == f_fss_embedded_list_open_s[0]) { while (--slash_count) { - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; } // while } - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; destination->string[destination->used++] = content.string[start]; range->start = start + 1; @@ -1307,7 +1307,7 @@ extern "C" { status = private_fl_fss_basic_list_write_add_until_end(content, state, range, destination); if (F_status_is_error(status)) break; - if (content.string[range->start] != f_fss_eol) { + if (content.string[range->start] != f_fss_eol_s[0]) { has_graph = F_true; } @@ -1320,8 +1320,8 @@ extern "C" { destination->string[destination->used++] = content.string[start]; - if (content.string[range->start] == f_fss_eol) { - destination->string[destination->used++] = f_fss_eol; + if (content.string[range->start] == f_fss_eol_s[0]) { + destination->string[destination->used++] = f_fss_eol_s[0]; ends_on_eol = F_true; } else { @@ -1332,7 +1332,7 @@ extern "C" { continue; } } - else if ((content.string[range->start] == f_fss_embedded_list_open || (!has_graph && content.string[range->start] == f_fss_embedded_list_close)) && !is_comment) { + else if ((content.string[range->start] == f_fss_embedded_list_open_s[0] || (!has_graph && content.string[range->start] == f_fss_embedded_list_close_s[0])) && !is_comment) { start = range->start++; if (do_prepend) { @@ -1347,9 +1347,9 @@ extern "C" { status = f_fss_skip_past_space(content, range); if (F_status_is_error(status)) break; - if (range->start >= content.used || range->start > range->stop || content.string[range->start] == f_fss_eol) { + if (range->start >= content.used || range->start > range->stop || content.string[range->start] == f_fss_eol_s[0]) { - if (content.string[range->start] == f_fss_eol) { + if (content.string[range->start] == f_fss_eol_s[0]) { do_prepend = F_true; ends_on_eol = F_true; } @@ -1377,7 +1377,7 @@ extern "C" { status = f_string_dynamic_increase_by(3, destination); if (F_status_is_error(status)) break; - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; destination->string[destination->used++] = content.string[start]; range->start = start + 1; @@ -1395,10 +1395,10 @@ extern "C" { range->start = start + 1; continue; } - else if (content.string[range->start] == f_fss_comment && !has_graph) { + else if (content.string[range->start] == f_fss_comment_s[0] && !has_graph) { is_comment = F_true; } - else if (content.string[range->start] == f_fss_eol) { + else if (content.string[range->start] == f_fss_eol_s[0]) { has_graph = F_false; is_comment = F_false; } @@ -1409,7 +1409,7 @@ extern "C" { break; } - if (content.string[range->start] != f_fss_delimit_placeholder) { + if (content.string[range->start] != F_fss_delimit_placeholder_s) { if (do_prepend) { status = f_string_dynamic_prepend(*prepend, destination); if (F_status_is_error(status)) break; @@ -1417,7 +1417,7 @@ extern "C" { do_prepend = F_false; } - if (content.string[range->start] == f_fss_eol) { + if (content.string[range->start] == f_fss_eol_s[0]) { do_prepend = F_true; ends_on_eol = F_true; } @@ -1449,11 +1449,11 @@ extern "C" { if (F_status_is_error(status)) return status; if (!ends_on_eol) { - destination->string[destination->used++] = f_fss_eol; + destination->string[destination->used++] = f_fss_eol_s[0]; } - destination->string[destination->used++] = f_fss_embedded_list_close; - destination->string[destination->used++] = f_fss_embedded_list_close_end; + destination->string[destination->used++] = f_fss_embedded_list_close_s[0]; + destination->string[destination->used++] = f_fss_embedded_list_close_end_s[0]; } if (range->start > range->stop) { diff --git a/level_1/fl_fss/c/fss_extended.c b/level_1/fl_fss/c/fss_extended.c index e0ebe47..d720654 100644 --- a/level_1/fl_fss/c/fss_extended.c +++ b/level_1/fl_fss/c/fss_extended.c @@ -154,7 +154,7 @@ f_status_t fl_fss_extended_object_write_string(const f_string_static_t object, c const f_array_length_t used_start = destination->used; - f_status_t status = private_fl_fss_basic_write(F_true, object, quote ? quote : f_fss_delimit_quote_double, state, range, destination); + f_status_t status = private_fl_fss_basic_write(F_true, object, quote ? quote : F_fss_delimit_quote_double_s, state, range, destination); if (status == F_data_not_stop || status == F_data_not_eos) { @@ -162,8 +162,8 @@ f_status_t fl_fss_extended_object_write_string(const f_string_static_t object, c const f_status_t status_allocation = f_string_dynamic_increase_by(2, destination); if (F_status_is_error(status_allocation)) return status_allocation; - destination->string[destination->used++] = quote ? quote : f_fss_delimit_quote_double; - destination->string[destination->used++] = quote ? quote : f_fss_delimit_quote_double; + destination->string[destination->used++] = quote ? quote : F_fss_delimit_quote_double_s; + destination->string[destination->used++] = quote ? quote : F_fss_delimit_quote_double_s; } if (complete == f_fss_complete_partial || complete == f_fss_complete_partial_trim || complete == f_fss_complete_full || complete == f_fss_complete_full_trim) { @@ -171,14 +171,14 @@ f_status_t fl_fss_extended_object_write_string(const f_string_static_t object, c f_status_t status2 = F_none; if (complete == f_fss_complete_full_trim) { - status2 = private_fl_fss_basic_write_object_trim(quote ? quote : f_fss_delimit_quote_double, used_start, state, destination); + status2 = private_fl_fss_basic_write_object_trim(quote ? quote : F_fss_delimit_quote_double_s, used_start, state, destination); if (F_status_is_error(status2)) return status2; } status2 = f_string_dynamic_increase(state.step_large, destination); if (F_status_is_error(status2)) return status2; - destination->string[destination->used++] = f_fss_extended_open; + destination->string[destination->used++] = f_fss_extended_open_s[0]; } } @@ -194,7 +194,7 @@ f_status_t fl_fss_extended_object_write_string(const f_string_static_t object, c #endif // _di_level_1_parameter_checking_ // this operates exactly like an object, syntax-wise. - const f_status_t status = private_fl_fss_basic_write(F_false, content, quote ? quote : f_fss_delimit_quote_double, state, range, destination); + const f_status_t status = private_fl_fss_basic_write(F_false, content, quote ? quote : F_fss_delimit_quote_double_s, state, range, destination); if (status == F_data_not_stop || status == F_data_not_eos) { @@ -202,16 +202,16 @@ f_status_t fl_fss_extended_object_write_string(const f_string_static_t object, c const f_status_t status_allocation = f_string_dynamic_increase_by(4, destination); if (F_status_is_error(status_allocation)) return status_allocation; - destination->string[destination->used++] = quote ? quote : f_fss_delimit_quote_double; - destination->string[destination->used++] = quote ? quote : f_fss_delimit_quote_double; + destination->string[destination->used++] = quote ? quote : F_fss_delimit_quote_double_s; + destination->string[destination->used++] = quote ? quote : F_fss_delimit_quote_double_s; // content should be terminated, even if empty. if (complete == f_fss_complete_partial || complete == f_fss_complete_partial_trim || complete == f_fss_complete_full || complete == f_fss_complete_full_trim || complete == f_fss_complete_next) { - destination->string[destination->used++] = f_fss_extended_next; + destination->string[destination->used++] = f_fss_extended_next_s[0]; } if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim || complete == f_fss_complete_end) { - destination->string[destination->used++] = f_fss_extended_close; + destination->string[destination->used++] = f_fss_extended_close_s[0]; } if (status == F_data_not_stop) { @@ -226,11 +226,11 @@ f_status_t fl_fss_extended_object_write_string(const f_string_static_t object, c if (F_status_is_error(status_allocation)) return status_allocation; if (complete == f_fss_complete_partial || complete == f_fss_complete_partial_trim || complete == f_fss_complete_full || complete == f_fss_complete_full_trim || complete == f_fss_complete_next) { - destination->string[destination->used++] = f_fss_extended_next; + destination->string[destination->used++] = f_fss_extended_next_s[0]; } if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim || complete == f_fss_complete_end) { - destination->string[destination->used++] = f_fss_extended_close; + destination->string[destination->used++] = f_fss_extended_close_s[0]; } } diff --git a/level_1/fl_fss/c/fss_extended_list.c b/level_1/fl_fss/c/fss_extended_list.c index b6d8dea..a486110 100644 --- a/level_1/fl_fss/c/fss_extended_list.c +++ b/level_1/fl_fss/c/fss_extended_list.c @@ -36,7 +36,7 @@ extern "C" { } // return found nothing if this line only contains whitespace and delimit placeholders. - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { // move the start position to after the EOL. ++range->start; @@ -48,7 +48,7 @@ extern "C" { found->start = range->start; // ignore all comment lines. - if (buffer.string[range->start] == f_fss_comment) { + if (buffer.string[range->start] == f_fss_comment_s[0]) { status = f_fss_seek_to_eol(buffer, range); if (F_status_is_error(status)) { @@ -79,7 +79,7 @@ extern "C" { bool graph_first = F_true; // identify where the object ends. - while (range->start <= range->stop && range->start < buffer.used && buffer.string[range->start] != f_fss_eol) { + while (range->start <= range->stop && range->start < buffer.used && buffer.string[range->start] != f_fss_eol_s[0]) { if (state.interrupt) { status = state.interrupt((void *) &state, 0); @@ -90,14 +90,14 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_delimit_slash) { + if (buffer.string[range->start] == F_fss_delimit_slash_s) { slash_first = range->start; slash_count = 1; status = f_utf_buffer_increment(buffer, range, 1); if (F_status_is_error(status)) break; - while (range->start <= range->stop && range->start < buffer.used && (buffer.string[range->start] == f_fss_delimit_placeholder || buffer.string[range->start] == f_fss_delimit_slash)) { + while (range->start <= range->stop && range->start < buffer.used && (buffer.string[range->start] == F_fss_delimit_placeholder_s || buffer.string[range->start] == F_fss_delimit_slash_s)) { if (state.interrupt) { status = state.interrupt((void *) &state, 0); @@ -108,7 +108,7 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_delimit_slash) ++slash_count; + if (buffer.string[range->start] == F_fss_delimit_slash_s) ++slash_count; status = f_utf_buffer_increment(buffer, range, 1); if (F_status_is_error(status)) break; @@ -118,7 +118,7 @@ extern "C" { private_macro_fl_fss_object_return_on_overflow((buffer), (*range), (*found), (*delimits), delimits_used, F_data_not_eos, F_data_not_stop); - if (buffer.string[range->start] == f_fss_extended_list_open) { + if (buffer.string[range->start] == f_fss_extended_list_open_s[0]) { graph_first = F_false; stop = range->start - 1; ++range->start; @@ -134,7 +134,7 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_eol) break; + if (buffer.string[range->start] == f_fss_eol_s[0]) break; status = f_fss_is_graph(buffer, *range); if (F_status_is_error(status)) break; @@ -147,7 +147,7 @@ extern "C" { private_macro_fl_fss_object_return_on_overflow((buffer), (*range), (*found), (*delimits), delimits_used, F_data_not_eos, F_data_not_stop); - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { start = range->start; range->start = slash_first; @@ -158,7 +158,7 @@ extern "C" { if (slash_count % 2 == 0) { while (slash_count > 0) { - if (buffer.string[range->start] == f_fss_delimit_slash) { + if (buffer.string[range->start] == F_fss_delimit_slash_s) { if (slash_count % 2 == 1) { delimits->array[delimits->used] = range->start; ++delimits->used; @@ -183,7 +183,7 @@ extern "C" { return FL_fss_found_object_not; } } - else if (graph_first && buffer.string[range->start] == f_fss_comment) { + else if (graph_first && buffer.string[range->start] == f_fss_comment_s[0]) { graph_first = F_false; // comments may only have whitespace before the '#', therefore only the first slash needs to be delimited. @@ -199,7 +199,7 @@ extern "C" { continue; } - else if (buffer.string[range->start] == f_fss_extended_list_open) { + else if (buffer.string[range->start] == f_fss_extended_list_open_s[0]) { graph_first = F_false; stop = range->start - 1; @@ -217,7 +217,7 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_eol) break; + if (buffer.string[range->start] == f_fss_eol_s[0]) break; status = f_fss_is_space(buffer, *range); if (F_status_is_error(status)) break; @@ -232,7 +232,7 @@ extern "C" { private_macro_fl_fss_object_return_on_overflow_delimited((buffer), (*range), (*found), F_none_eos, F_none_stop); - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { found->stop = stop; // move the start position to after the EOL. @@ -263,7 +263,7 @@ extern "C" { } // seek to the end of the line when no valid object is found. - while (range->start <= range->stop && range->start < buffer.used && buffer.string[range->start] != f_fss_eol) { + while (range->start <= range->stop && range->start < buffer.used && buffer.string[range->start] != f_fss_eol_s[0]) { if (state.interrupt) { status = state.interrupt((void *) &state, 0); @@ -348,7 +348,7 @@ extern "C" { if (status == F_none_eos || status == F_none_stop) break; - if (buffer.string[range->start] == f_fss_delimit_slash) { + if (buffer.string[range->start] == F_fss_delimit_slash_s) { slash_first = range->start; slash_count = 1; @@ -363,9 +363,9 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_delimit_placeholder) { + if (buffer.string[range->start] == F_fss_delimit_placeholder_s) { continue; - } else if (buffer.string[range->start] != f_fss_delimit_slash) { + } else if (buffer.string[range->start] != F_fss_delimit_slash_s) { break; } @@ -377,7 +377,7 @@ extern "C" { // Only the first slash before a close is delimited, all others are maintained. // For example '}' = valid close, '\}' represents '}', '\\}' represents '\}', '\\\}' represents '\\}', '\\\\}' represents '\\\}', and so on.. // With one or more slashes, even if delimited, this line may never designate a valid content close. - if (buffer.string[range->start] == f_fss_extended_list_close) { + if (buffer.string[range->start] == f_fss_extended_list_close_s[0]) { ++range->start; while (range->start <= range->stop && range->start < buffer.used) { @@ -391,7 +391,7 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_eol) break; + if (buffer.string[range->start] == f_fss_eol_s[0]) break; status = f_fss_is_space(buffer, *range); if (F_status_is_error(status)) break; @@ -404,7 +404,7 @@ extern "C" { if (range->start > range->stop || range->start >= buffer.used) break; - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { macro_f_fss_delimits_t_increase(status, state.step_small, (*delimits)); if (F_status_is_error(status)) break; @@ -412,7 +412,7 @@ extern "C" { continue; } } - else if (buffer.string[range->start] == f_fss_comment) { + else if (buffer.string[range->start] == f_fss_comment_s[0]) { macro_f_fss_delimits_t_increase(status, state.step_small, (*delimits)); if (F_status_is_error(status)) break; @@ -425,7 +425,7 @@ extern "C" { continue; } - if (buffer.string[range->start] == f_fss_extended_list_close) { + if (buffer.string[range->start] == f_fss_extended_list_close_s[0]) { ++range->start; while (range->start <= range->stop && range->start < buffer.used) { @@ -439,7 +439,7 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_eol) break; + if (buffer.string[range->start] == f_fss_eol_s[0]) break; status = f_fss_is_space(buffer, *range); if (F_status_is_error(status)) break; @@ -455,7 +455,7 @@ extern "C" { if (range->start > range->stop || range->start >= buffer.used) break; // found a valid content close, set stop point to last newline. - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { ++range->start; // If the last newline is the entire start, then there is no Content. @@ -474,7 +474,7 @@ extern "C" { continue; } - if (buffer.string[range->start] == f_fss_comment) { + if (buffer.string[range->start] == f_fss_comment_s[0]) { start = range->start; status = f_fss_seek_to_eol(buffer, range); @@ -532,10 +532,10 @@ extern "C" { const f_status_t status_allocation = f_string_dynamic_increase_by(2, destination); if (F_status_is_error(status_allocation)) return status_allocation; - destination->string[destination->used++] = f_fss_extended_list_open; + destination->string[destination->used++] = f_fss_extended_list_open_s[0]; if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim) { - destination->string[destination->used++] = f_fss_extended_list_open_end; + destination->string[destination->used++] = f_fss_extended_list_open_end_s[0]; } } @@ -567,13 +567,13 @@ extern "C" { } } - if (object.string[range->start] == f_fss_comment) { + if (object.string[range->start] == f_fss_comment_s[0]) { // when a comment is found, escape it. status = f_string_dynamic_increase(state.step_large, destination); if (F_status_is_error(status)) break; - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; break; } @@ -583,8 +583,8 @@ extern "C" { if (status == F_true) break; // objects will not have leading whitespaces, but having this does not result in an invalid object, so just write the provided spaces. - if (object.string[range->start] != f_fss_delimit_placeholder) { - if (object.string[range->start] == f_fss_eol) { + if (object.string[range->start] != F_fss_delimit_placeholder_s) { + if (object.string[range->start] == f_fss_eol_s[0]) { status = F_status_set_error(F_none_eol); break; } @@ -625,7 +625,7 @@ extern "C" { } } - if (object.string[range->start] == f_fss_delimit_slash) { + if (object.string[range->start] == F_fss_delimit_slash_s) { slash_count = 1; for (++range->start; range->start <= range->stop && range->start < object.used; ++range->start) { @@ -639,9 +639,9 @@ extern "C" { } } - if (object.string[range->start] == f_fss_delimit_placeholder) { + if (object.string[range->start] == F_fss_delimit_placeholder_s) { continue; - } else if (object.string[range->start] != f_fss_delimit_slash) { + } else if (object.string[range->start] != F_fss_delimit_slash_s) { break; } @@ -660,7 +660,7 @@ extern "C" { if (F_status_is_error(status)) break; while (--slash_count) { - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; } // while if (range->start > range->stop || range->start >= object.used) { @@ -669,8 +669,8 @@ extern "C" { } } - if (object.string[range->start] != f_fss_delimit_placeholder) { - if (object.string[range->start] == f_fss_eol) { + if (object.string[range->start] != F_fss_delimit_placeholder_s) { + if (object.string[range->start] == f_fss_eol_s[0]) { status = F_status_set_error(F_none_eol); break; } @@ -722,13 +722,13 @@ extern "C" { } if (!ends_on_space) { - destination->string[destination->used++] = f_fss_space; + destination->string[destination->used++] = f_fss_space_s[0]; } - destination->string[destination->used++] = f_fss_extended_list_open; + destination->string[destination->used++] = f_fss_extended_list_open_s[0]; if (complete == f_fss_complete_full || complete == f_fss_complete_full_trim) { - destination->string[destination->used++] = f_fss_extended_list_open_end; + destination->string[destination->used++] = f_fss_extended_list_open_end_s[0]; } } @@ -766,8 +766,8 @@ extern "C" { const f_status_t status_allocation = f_string_dynamic_increase_by(2, destination); if (F_status_is_error(status_allocation)) return status_allocation; - destination->string[destination->used++] = f_fss_extended_list_close; - destination->string[destination->used++] = f_fss_extended_list_close_end; + destination->string[destination->used++] = f_fss_extended_list_close_s[0]; + destination->string[destination->used++] = f_fss_extended_list_close_end_s[0]; } return status; @@ -803,7 +803,7 @@ extern "C" { } } - if (content.string[range->start] == f_fss_delimit_slash && !is_comment) { + if (content.string[range->start] == F_fss_delimit_slash_s && !is_comment) { slash_count = 1; if (do_prepend) { @@ -826,14 +826,14 @@ extern "C" { } } - if (content.string[range->start] == f_fss_delimit_placeholder) continue; - if (content.string[range->start] != f_fss_delimit_slash) break; + if (content.string[range->start] == F_fss_delimit_placeholder_s) continue; + if (content.string[range->start] != F_fss_delimit_slash_s) break; - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; ++slash_count; } // for - if (content.string[range->start] == f_fss_extended_list_close) { + if (content.string[range->start] == f_fss_extended_list_close_s[0]) { start = range->start++; status = f_fss_skip_past_space(content, range); @@ -842,21 +842,21 @@ extern "C" { if (has_graph) { // do nothing. } - else if (content.string[range->start] == f_fss_eol || range->start >= content.used || range->start > range->stop) { + else if (content.string[range->start] == f_fss_eol_s[0] || range->start >= content.used || range->start > range->stop) { // increase by total slashes + 1 and extended list close. status = f_string_dynamic_increase_by(2, destination); if (F_status_is_error(status)) break; - destination->string[destination->used++] = f_fss_delimit_slash; - destination->string[destination->used++] = f_fss_extended_list_close; + destination->string[destination->used++] = F_fss_delimit_slash_s; + destination->string[destination->used++] = f_fss_extended_list_close_s[0]; range->start = start + 1; status = private_fl_fss_basic_list_write_add_until_end(content, state, range, destination); if (F_status_is_error(status)) break; - if (content.string[range->start] != f_fss_eol) { + if (content.string[range->start] != f_fss_eol_s[0]) { has_graph = F_true; } @@ -869,8 +869,8 @@ extern "C" { destination->string[destination->used++] = content.string[start]; - if (content.string[range->start] == f_fss_eol) { - destination->string[destination->used++] = f_fss_eol; + if (content.string[range->start] == f_fss_eol_s[0]) { + destination->string[destination->used++] = f_fss_eol_s[0]; ends_on_eol = F_true; } else { @@ -881,7 +881,7 @@ extern "C" { continue; } } - else if (!has_graph && content.string[range->start] == f_fss_extended_list_close && !is_comment) { + else if (!has_graph && content.string[range->start] == f_fss_extended_list_close_s[0] && !is_comment) { start = range->start++; if (do_prepend) { @@ -896,9 +896,9 @@ extern "C" { status = f_fss_skip_past_space(content, range); if (F_status_is_error(status)) break; - if (content.string[range->start] == f_fss_eol || range->start >= content.used || range->start > range->stop) { + if (content.string[range->start] == f_fss_eol_s[0] || range->start >= content.used || range->start > range->stop) { - if (content.string[range->start] == f_fss_eol) { + if (content.string[range->start] == f_fss_eol_s[0]) { do_prepend = F_true; ends_on_eol = F_true; } @@ -927,7 +927,7 @@ extern "C" { status = f_string_dynamic_increase_by(2, destination); if (F_status_is_error(status)) break; - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; destination->string[destination->used++] = content.string[start]; range->start = start + 1; @@ -945,10 +945,10 @@ extern "C" { range->start = start + 1; continue; } - else if (content.string[range->start] == f_fss_comment && !has_graph) { + else if (content.string[range->start] == f_fss_comment_s[0] && !has_graph) { is_comment = F_true; } - else if (content.string[range->start] == f_fss_eol) { + else if (content.string[range->start] == f_fss_eol_s[0]) { has_graph = F_false; is_comment = F_false; } @@ -959,7 +959,7 @@ extern "C" { break; } - if (content.string[range->start] != f_fss_delimit_placeholder) { + if (content.string[range->start] != F_fss_delimit_placeholder_s) { if (do_prepend) { status = f_string_dynamic_prepend(*prepend, destination); if (F_status_is_error(status)) break; @@ -967,7 +967,7 @@ extern "C" { do_prepend = F_false; } - if (content.string[range->start] == f_fss_eol) { + if (content.string[range->start] == f_fss_eol_s[0]) { do_prepend = F_true; ends_on_eol = F_true; } @@ -1000,11 +1000,11 @@ extern "C" { if (F_status_is_error(status)) return status; if (!ends_on_eol) { - destination->string[destination->used++] = f_fss_eol; + destination->string[destination->used++] = f_fss_eol_s[0]; } - destination->string[destination->used++] = f_fss_extended_list_close; - destination->string[destination->used++] = f_fss_extended_list_close_end; + destination->string[destination->used++] = f_fss_extended_list_close_s[0]; + destination->string[destination->used++] = f_fss_extended_list_close_end_s[0]; } if (range->start > range->stop) { diff --git a/level_1/fl_fss/c/private-fss.c b/level_1/fl_fss/c/private-fss.c index e174742..8adf3ac 100644 --- a/level_1/fl_fss/c/private-fss.c +++ b/level_1/fl_fss/c/private-fss.c @@ -28,7 +28,7 @@ extern "C" { } } - if (destination->string[destination_range.start] != f_fss_delimit_placeholder) break; + if (destination->string[destination_range.start] != F_fss_delimit_placeholder_s) break; } // for if (destination->string[destination_range.start] == quote) { @@ -46,7 +46,7 @@ extern "C" { } } - if (destination->string[destination_range.start] == f_fss_delimit_placeholder) { + if (destination->string[destination_range.start] == F_fss_delimit_placeholder_s) { continue; } @@ -63,7 +63,7 @@ extern "C" { width = macro_f_utf_byte_width(destination->string[destination_range.start]); for (i = 0; i < width; ++i) { - destination->string[destination_range.start + i] = f_fss_delimit_placeholder; + destination->string[destination_range.start + i] = F_fss_delimit_placeholder_s; } // for } // for @@ -100,7 +100,7 @@ extern "C" { } } - if (destination->string[destination_range.start] == f_fss_delimit_placeholder) { + if (destination->string[destination_range.start] == F_fss_delimit_placeholder_s) { continue; } @@ -120,7 +120,7 @@ extern "C" { width = macro_f_utf_byte_width(destination->string[destination_range.start]); for (i = 0; i < width; ++i) { - destination->string[destination_range.start + i] = f_fss_delimit_placeholder; + destination->string[destination_range.start + i] = F_fss_delimit_placeholder_s; } // for } // for @@ -149,8 +149,8 @@ extern "C" { } // for if (destination_range.start == rear) { - destination->string[front] = f_fss_delimit_placeholder; - destination->string[rear] = f_fss_delimit_placeholder; + destination->string[front] = F_fss_delimit_placeholder_s; + destination->string[rear] = F_fss_delimit_placeholder_s; } } @@ -173,8 +173,8 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_delimit_placeholder) continue; - if (buffer.string[range->start] == f_fss_eol) break; + if (buffer.string[range->start] == F_fss_delimit_placeholder_s) continue; + if (buffer.string[range->start] == f_fss_eol_s[0]) break; status = f_string_dynamic_increase(state.step_large, destination); if (F_status_is_error(status)) break; @@ -205,7 +205,7 @@ extern "C" { } } - if (destination->string[destination_range.start] == f_fss_delimit_placeholder) { + if (destination->string[destination_range.start] == F_fss_delimit_placeholder_s) { continue; } @@ -222,7 +222,7 @@ extern "C" { width = macro_f_utf_byte_width(destination->string[destination_range.start]); for (i = 0; i < width; ++i) { - destination->string[destination_range.start + i] = f_fss_delimit_placeholder; + destination->string[destination_range.start + i] = F_fss_delimit_placeholder_s; } // for } // for @@ -236,7 +236,7 @@ extern "C" { } } - if (destination->string[destination_range.start] == f_fss_delimit_placeholder) { + if (destination->string[destination_range.start] == F_fss_delimit_placeholder_s) { --destination->used; continue; @@ -302,9 +302,9 @@ extern "C" { found->start = range->start; // ignore all comment lines. - if (object_as && buffer.string[range->start] == f_fss_comment) { + if (object_as && buffer.string[range->start] == f_fss_comment_s[0]) { - while (buffer.string[range->start] != f_fss_eol) { + while (buffer.string[range->start] != f_fss_eol_s[0]) { if (state.interrupt) { status = state.interrupt((void *) &state, 0); @@ -339,7 +339,7 @@ extern "C" { } // identify where the object begins. - if (buffer.string[range->start] == f_fss_delimit_slash) { + if (buffer.string[range->start] == F_fss_delimit_slash_s) { f_array_length_t first_slash = range->start; found->start = range->start; @@ -368,7 +368,7 @@ extern "C" { continue; } - if (buffer.string[range->start] != f_fss_delimit_slash) { + if (buffer.string[range->start] != F_fss_delimit_slash_s) { status = f_fss_is_space(buffer, *range); if (F_status_is_error(status)) break; @@ -379,7 +379,7 @@ extern "C" { status = f_utf_buffer_increment(buffer, range, 1); if (F_status_is_error(status)) break; - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { return FL_fss_found_object_content_not; } @@ -407,7 +407,7 @@ extern "C" { return F_none_stop; } - if (buffer.string[range->start] == f_fss_delimit_quote_single || buffer.string[range->start] == f_fss_delimit_quote_double || (object_as && buffer.string[range->start] == f_fss_comment)) { + if (buffer.string[range->start] == F_fss_delimit_quote_single_s || buffer.string[range->start] == F_fss_delimit_quote_double_s || (object_as && buffer.string[range->start] == f_fss_comment_s[0])) { // only the first slash before a quoted needs to be escaped (or not) as once there is a slash before a quoted, this cannot ever be a quote object. // this simplifies the number of slashes needed. @@ -421,7 +421,7 @@ extern "C" { if (F_status_is_error(status)) return status; } } - else if (buffer.string[range->start] == f_fss_delimit_quote_single || buffer.string[range->start] == f_fss_delimit_quote_double) { + else if (buffer.string[range->start] == F_fss_delimit_quote_single_s || buffer.string[range->start] == F_fss_delimit_quote_double_s) { quote_found = buffer.string[range->start]; status = f_utf_buffer_increment(buffer, range, 1); @@ -458,7 +458,7 @@ extern "C" { found->stop = range->start - 1; - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { // move the start position to after the EOL. ++range->start; @@ -486,7 +486,7 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_delimit_slash) { + if (buffer.string[range->start] == F_fss_delimit_slash_s) { first_slash = range->start; slash_count = 1; @@ -503,13 +503,13 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_delimit_placeholder) { + if (buffer.string[range->start] == F_fss_delimit_placeholder_s) { status = f_utf_buffer_increment(buffer, range, 1); if (F_status_is_error(status)) return status; continue; } - else if (buffer.string[range->start] != f_fss_delimit_slash) { + else if (buffer.string[range->start] != F_fss_delimit_slash_s) { break; } @@ -561,10 +561,10 @@ extern "C" { if (status == F_true) { if (quote) { - if (quote_found == f_fss_delimit_quote_single) { + if (quote_found == F_fss_delimit_quote_single_s) { *quote = f_fss_quote_type_single; } - else if (quote_found == f_fss_delimit_quote_double) { + else if (quote_found == F_fss_delimit_quote_double_s) { *quote = f_fss_quote_type_double; } } @@ -577,7 +577,7 @@ extern "C" { while (slash_count > 0) { - if (buffer.string[range->start] == f_fss_delimit_slash) { + if (buffer.string[range->start] == F_fss_delimit_slash_s) { if (slash_count % 2 == 1) { delimits->array[delimits->used] = range->start; ++delimits->used; @@ -592,7 +592,7 @@ extern "C" { range->start = location + 1; - while (buffer.string[range->start] == f_fss_delimit_placeholder) { + while (buffer.string[range->start] == F_fss_delimit_placeholder_s) { if (state.interrupt) { status = state.interrupt((void *) &state, 0); @@ -613,7 +613,7 @@ extern "C" { if (status == F_true) { - while (range->start <= range->stop && range->start < buffer.used && buffer.string[range->start] != f_fss_eol) { + while (range->start <= range->stop && range->start < buffer.used && buffer.string[range->start] != f_fss_eol_s[0]) { if (state.interrupt) { status = state.interrupt((void *) &state, 0); @@ -643,7 +643,7 @@ extern "C" { return FL_fss_found_object_not; } - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { found->stop = location - 1; // move the start position to after the EOL. @@ -665,7 +665,7 @@ extern "C" { while (slash_count > 0) { - if (buffer.string[range->start] == f_fss_delimit_slash) { + if (buffer.string[range->start] == F_fss_delimit_slash_s) { if (slash_count % 2 == 1) { delimits->array[delimits->used] = range->start; ++delimits->used; @@ -717,10 +717,10 @@ extern "C" { if (status == F_true) { if (quote) { - if (quote_found == f_fss_delimit_quote_single) { + if (quote_found == F_fss_delimit_quote_single_s) { *quote = f_fss_quote_type_single; } - else if (quote_found == f_fss_delimit_quote_double) { + else if (quote_found == F_fss_delimit_quote_double_s) { *quote = f_fss_quote_type_double; } } @@ -740,7 +740,7 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_eol) { + if (buffer.string[range->start] == f_fss_eol_s[0]) { // move the start position to after the EOL. ++range->start; @@ -758,9 +758,9 @@ extern "C" { return FL_fss_found_object; } - if (buffer.string[range->start] != f_fss_delimit_placeholder) { + if (buffer.string[range->start] != F_fss_delimit_placeholder_s) { - while (range->start <= range->stop && range->start < buffer.used && buffer.string[range->start] != f_fss_eol) { + while (range->start <= range->stop && range->start < buffer.used && buffer.string[range->start] != f_fss_eol_s[0]) { if (state.interrupt) { status = state.interrupt((void *) &state, 0); @@ -809,7 +809,7 @@ extern "C" { } } } - else if (buffer.string[range->start] == f_fss_eol) { + else if (buffer.string[range->start] == f_fss_eol_s[0]) { // move the start position to after the EOL. ++range->start; @@ -874,14 +874,14 @@ extern "C" { f_array_length_t i = 0; // use placeholders for potential quote and potential delimited quote to avoid doing things such as memmove(). - destination->string[destination->used++] = f_fss_delimit_placeholder; - destination->string[destination->used++] = f_fss_delimit_placeholder; + destination->string[destination->used++] = F_fss_delimit_placeholder_s; + destination->string[destination->used++] = F_fss_delimit_placeholder_s; // if there is an initial quote, then this must be quoted and the existing quote must be delimited. if (object.string[input_start] == quote) { quoted = F_true; } - else if (object_as && object.string[input_start] == f_fss_comment) { + else if (object_as && object.string[input_start] == f_fss_comment_s[0]) { commented = F_true; } @@ -898,7 +898,7 @@ extern "C" { } } - if (object.string[range->start] == f_fss_delimit_slash) { + if (object.string[range->start] == F_fss_delimit_slash_s) { item_first = range->start++; item_total = 1; @@ -913,10 +913,10 @@ extern "C" { } } - if (object.string[range->start] == f_fss_delimit_slash) { + if (object.string[range->start] == F_fss_delimit_slash_s) { ++item_total; } - else if (object.string[range->start] != f_fss_delimit_placeholder) { + else if (object.string[range->start] != F_fss_delimit_placeholder_s) { break; } } // for @@ -931,14 +931,14 @@ extern "C" { status = f_string_dynamic_increase(state.step_large, destination); if (F_status_is_error(status)) break; - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; } else { status = f_string_dynamic_increase_by(item_total, destination); if (F_status_is_error(status)) break; for (i = 0; i < item_total; ++i) { - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; } // for } } @@ -947,13 +947,13 @@ extern "C" { if (F_status_is_error(status)) break; for (i = 0; i < item_total; ++i) { - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; } // for break; } - if (object.string[range->start] == f_fss_eol) { + if (object.string[range->start] == f_fss_eol_s[0]) { status = F_status_set_error(F_none_eol); break; } @@ -970,7 +970,7 @@ extern "C" { if (F_status_is_error(status)) break; for (i = 0; i < item_total; ++i) { - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; } // for destination->string[destination->used++] = quote; @@ -993,14 +993,14 @@ extern "C" { status = f_string_dynamic_increase(state.step_large, destination); if (F_status_is_error(status)) break; - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; } else { status = f_string_dynamic_increase_by(item_total, destination); if (F_status_is_error(status)) break; for (i = 0; i < item_total; ++i) { - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; } // for } } @@ -1011,7 +1011,7 @@ extern "C" { if (F_status_is_error(status)) break; for (i = 0; i < item_total; ++i) { - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; } // for destination->string[destination->used++] = quote; @@ -1020,7 +1020,7 @@ extern "C" { destination->string[destination->used++] = object.string[range->start + i]; } // for } - else if (object_as && object.string[range->start] == f_fss_comment) { + else if (object_as && object.string[range->start] == f_fss_comment_s[0]) { // only the first slash needs to be escaped for a comment, and then only if not quoted. if (item_first == input_start) { @@ -1031,7 +1031,7 @@ extern "C" { if (F_status_is_error(status)) break; for (i = 0; i < item_total; ++i) { - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; } // for destination->string[destination->used++] = object.string[range->start]; @@ -1056,7 +1056,7 @@ extern "C" { // there is nothing to delimit, so all slashes should be printed as is. for (i = 0; i < item_total; ++i) { - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; } // for status = f_string_dynamic_increase_by(width, destination); @@ -1075,7 +1075,7 @@ extern "C" { status = f_string_dynamic_increase(state.step_large, destination); if (F_status_is_error(status)) break; - destination->string[used_start + 1] = f_fss_delimit_slash; + destination->string[used_start + 1] = F_fss_delimit_slash_s; } status = f_fss_skip_past_delimit(object, range); @@ -1109,7 +1109,7 @@ extern "C" { status = f_string_dynamic_increase(state.step_large, destination); if (F_status_is_error(status)) break; - destination->string[destination->used++] = f_fss_delimit_slash; + destination->string[destination->used++] = F_fss_delimit_slash_s; } quoted = F_true; @@ -1126,11 +1126,11 @@ extern "C" { destination->string[destination->used++] = object.string[range->start + i]; } // for } - else if (object.string[range->start] == f_fss_eol) { + else if (object.string[range->start] == f_fss_eol_s[0]) { status = F_status_set_error(F_none_eol); break; } - else if (object.string[range->start] != f_fss_delimit_placeholder) { + else if (object.string[range->start] != F_fss_delimit_placeholder_s) { if (!quoted) { status = f_fss_is_space(object, *range); if (F_status_is_error(status)) break; @@ -1185,7 +1185,7 @@ extern "C" { } } - if (object.string[i] != f_fss_delimit_placeholder) break; + if (object.string[i] != F_fss_delimit_placeholder_s) break; } // for // only when followed by a space must the start quote be delimited. @@ -1203,13 +1203,13 @@ extern "C" { } if (status == F_false) { - destination->string[used_start + 1] = f_fss_delimit_placeholder; + destination->string[used_start + 1] = F_fss_delimit_placeholder_s; } } } } else if (commented) { - destination->string[used_start] = f_fss_delimit_slash; + destination->string[used_start] = F_fss_delimit_slash_s; } if (range->start > range->stop) { diff --git a/level_1/fl_fss/c/private-fss.h b/level_1/fl_fss/c/private-fss.h index 3258bc9..af1f2ac 100644 --- a/level_1/fl_fss/c/private-fss.h +++ b/level_1/fl_fss/c/private-fss.h @@ -46,7 +46,7 @@ extern "C" { * @see fl_fss_extended_object_write_string() */ #if !defined(_di_fl_fss_basic_object_write_string_) || !defined(_di_fl_fss_extended_object_write_string_) - extern f_status_t private_fl_fss_basic_write_object_trim(const f_fss_quote_t quote, const f_array_length_t used_start, f_state_t state, f_string_dynamic_t *destination) f_attribute_visibility_internal; + extern f_status_t private_fl_fss_basic_write_object_trim(const f_fss_quote_t quote, const f_array_length_t used_start, f_state_t state, f_string_dynamic_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_fss_basic_object_write_string_) || !defined(_di_fl_fss_extended_object_write_string_) /** @@ -81,7 +81,7 @@ extern "C" { * @see f_string_dynamic_increase() */ #if !defined(_di_fl_fss_basic_list_content_write_string_) || !defined(_di_fl_fss_extended_list_content_write_string_) || !defined(_di_fl_fss_embedded_list_content_write_string_) - extern f_status_t private_fl_fss_basic_list_write_add_until_end(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination) f_attribute_visibility_internal; + extern f_status_t private_fl_fss_basic_list_write_add_until_end(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_fss_basic_list_content_write_string_) || !defined(_di_fl_fss_extended_list_content_write_string_) || !defined(_di_fl_fss_embedded_list_content_write_string_) /** @@ -112,7 +112,7 @@ extern "C" { * @see fl_fss_extended_list_object_write_string() */ #if !defined(_di_fl_fss_basic_list_object_write_string_) || !defined(_di_fl_fss_extended_list_object_write_string_) - extern f_status_t private_fl_fss_basic_list_write_object_trim(const f_array_length_t used_start, f_state_t state, f_string_dynamic_t *destination) f_attribute_visibility_internal; + extern f_status_t private_fl_fss_basic_list_write_object_trim(const f_array_length_t used_start, f_state_t state, f_string_dynamic_t *destination) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_fss_basic_list_object_write_string_) || !defined(_di_fl_fss_extended_list_object_write_string_) /** @@ -182,7 +182,7 @@ extern "C" { * @see fl_fss_extended_content_read() */ #if !defined(_di_fl_fss_basic_object_read_) || !defined(_di_fl_fss_extended_object_read_) || !defined(_di_fl_fss_extended_content_read_) - extern f_status_t private_fl_fss_basic_read(const f_string_static_t buffer, const bool object_as, f_state_t state, f_string_range_t *range, f_fss_object_t *found, f_fss_quote_t *quoted, f_fss_delimits_t *delimits) f_attribute_visibility_internal; + extern f_status_t private_fl_fss_basic_read(const f_string_static_t buffer, const bool object_as, f_state_t state, f_string_range_t *range, f_fss_object_t *found, f_fss_quote_t *quoted, f_fss_delimits_t *delimits) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_fss_basic_object_read_) || !defined(_di_fl_fss_extended_object_read_) || !defined(_di_fl_fss_extended_content_read_) /** @@ -239,7 +239,7 @@ extern "C" { * @see fl_fss_extended_content_write_string() */ #if !defined(fl_fss_basic_object_write_string) || !defined(fl_fss_extended_object_write_string) || !defined(_di_fl_fss_extended_content_write_string_) - extern f_status_t private_fl_fss_basic_write(const bool object_as, const f_string_static_t object, const f_fss_quote_t quoted, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination) f_attribute_visibility_internal; + extern f_status_t private_fl_fss_basic_write(const bool object_as, const f_string_static_t object, const f_fss_quote_t quoted, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination) F_attribute_visibility_internal_d; #endif // !defined(fl_fss_basic_object_write_string) || !defined(fl_fss_extended_object_write_string) || !defined(_di_fl_fss_extended_content_write_string_) #ifdef __cplusplus diff --git a/level_1/fl_print/c/print-common.h b/level_1/fl_print/c/print-common.h index 843c2d0..7cfa65e 100644 --- a/level_1/fl_print/c/print-common.h +++ b/level_1/fl_print/c/print-common.h @@ -53,7 +53,7 @@ extern "C" { } fl_print_t; #define fl_print_t_initialize { \ - macro_f_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \ + macro_f_file_t_initialize2(F_type_output_d, F_type_descriptor_output_d, F_file_flag_write_only_d), \ f_console_verbosity_normal, \ 0, \ 0, \ @@ -63,12 +63,12 @@ extern "C" { } #define macro_fl_print_t_initialize(to, verbosity, prefix, suffix, context, notable, set) { to, verbosity, prefix, suffix, context, notable, set } - #define macro_fl_print_t_initialize_debug() macro_fl_print_t_initialize(macro_f_file_t_initialize2(f_type_debug, f_type_descriptor_debug, f_file_flag_write_only), f_console_verbosity_normal, fl_print_debug_s, 0, f_color_set_t_initialize, f_color_set_t_initialize, 0) - #define macro_fl_print_t_initialize_debug2(suffix, set) macro_fl_print_t_initialize(macro_f_file_t_initialize2(f_type_debug, f_type_descriptor_debug, f_file_flag_write_only), f_console_verbosity_normal, fl_print_debug_s, suffix, f_color_set_t_initialize, f_color_set_t_initialize, set) - #define macro_fl_print_t_initialize_error() macro_fl_print_t_initialize(macro_f_file_t_initialize2(f_type_error, f_type_descriptor_error, f_file_flag_write_only), f_console_verbosity_normal, fl_print_error_s, 0, f_color_set_t_initialize, f_color_set_t_initialize, 0) - #define macro_fl_print_t_initialize_error2(suffix, set) macro_fl_print_t_initialize(macro_f_file_t_initialize2(f_type_error, f_type_descriptor_error, f_file_flag_write_only), f_console_verbosity_normal, fl_print_error_s, suffix, f_color_set_t_initialize, f_color_set_t_initialize, set) - #define macro_fl_print_t_initialize_warning() macro_fl_print_t_initialize(macro_f_file_t_initialize2(f_type_warning, f_type_descriptor_warning, f_file_flag_write_only), f_console_verbosity_normal, fl_print_warning_s, 0, f_color_set_t_initialize, f_color_set_t_initialize, 0) - #define macro_fl_print_t_initialize_warning2(suffix, set) macro_fl_print_t_initialize(macro_f_file_t_initialize2(f_type_warning, f_type_descriptor_warning, f_file_flag_write_only), f_console_verbosity_normal, fl_print_warning_s, suffix, f_color_set_t_initialize, f_color_set_t_initialize, set) + #define macro_fl_print_t_initialize_debug() macro_fl_print_t_initialize(macro_f_file_t_initialize2(F_type_debug_d, F_type_descriptor_debug_d, F_file_flag_write_only_d), f_console_verbosity_normal, fl_print_debug_s, 0, f_color_set_t_initialize, f_color_set_t_initialize, 0) + #define macro_fl_print_t_initialize_debug2(suffix, set) macro_fl_print_t_initialize(macro_f_file_t_initialize2(F_type_debug_d, F_type_descriptor_debug_d, F_file_flag_write_only_d), f_console_verbosity_normal, fl_print_debug_s, suffix, f_color_set_t_initialize, f_color_set_t_initialize, set) + #define macro_fl_print_t_initialize_error() macro_fl_print_t_initialize(macro_f_file_t_initialize2(F_type_error_d, F_type_descriptor_error_d, F_file_flag_write_only_d), f_console_verbosity_normal, fl_print_error_s, 0, f_color_set_t_initialize, f_color_set_t_initialize, 0) + #define macro_fl_print_t_initialize_error2(suffix, set) macro_fl_print_t_initialize(macro_f_file_t_initialize2(F_type_error_d, F_type_descriptor_error_d, F_file_flag_write_only_d), f_console_verbosity_normal, fl_print_error_s, suffix, f_color_set_t_initialize, f_color_set_t_initialize, set) + #define macro_fl_print_t_initialize_warning() macro_fl_print_t_initialize(macro_f_file_t_initialize2(F_type_warning_d, F_type_descriptor_warning_d, F_file_flag_write_only_d), f_console_verbosity_normal, fl_print_warning_s, 0, f_color_set_t_initialize, f_color_set_t_initialize, 0) + #define macro_fl_print_t_initialize_warning2(suffix, set) macro_fl_print_t_initialize(macro_f_file_t_initialize2(F_type_warning_d, F_type_descriptor_warning_d, F_file_flag_write_only_d), f_console_verbosity_normal, fl_print_warning_s, suffix, f_color_set_t_initialize, f_color_set_t_initialize, set) #endif // _di_fl_print_t_ #ifdef __cplusplus diff --git a/level_1/fl_print/c/private-print.c b/level_1/fl_print/c/private-print.c index 2719d13..dc53539 100644 --- a/level_1/fl_print/c/private-print.c +++ b/level_1/fl_print/c/private-print.c @@ -30,7 +30,7 @@ extern "C" { if (*string < 0x2c) { if (*string == f_string_ascii_space_s[0]) { - flag |= f_print_format_flag_sign_pad; + flag |= F_print_format_flag_sign_pad_d; continue; } @@ -40,7 +40,7 @@ extern "C" { continue; } else if (*string == f_string_ascii_pound_s[0]) { - flag |= f_print_format_flag_convert; + flag |= F_print_format_flag_convert_d; continue; } @@ -74,7 +74,7 @@ extern "C" { continue; } else if (*string == f_string_ascii_plus_s[0]) { - flag |= f_print_format_flag_sign_always; + flag |= F_print_format_flag_sign_always_d; continue; } @@ -86,7 +86,7 @@ extern "C" { } else if (*string < 0x41) { if (*string == f_string_ascii_minus_s[0]) { - flag |= f_print_format_flag_align_left; + flag |= F_print_format_flag_align_left_d; continue; } @@ -113,19 +113,19 @@ extern "C" { continue; } else if (*string == f_string_ascii_slash_forward_s[0]) { - flag |= f_print_format_flag_range; + flag |= F_print_format_flag_range_d; continue; } else if (*string > 0x2f && *string < 0x3a) { - if (!(flag & f_print_format_flag_width)) { + if (!(flag & F_print_format_flag_width_d)) { if (*string == f_string_ascii_0_s[0]) { - flag |= f_print_format_flag_zeros_leading; + flag |= F_print_format_flag_zeros_leading_d; continue; } - flag |= f_print_format_flag_width; + flag |= F_print_format_flag_width_d; string = private_fl_print_convert_number(string, ap, &width, status); if (F_status_is_error(*status)) return string; @@ -141,17 +141,17 @@ extern "C" { } } else if (*string == f_string_ascii_colon_s[0]) { - flag |= f_print_format_flag_ignore_range; + flag |= F_print_format_flag_ignore_range_d; continue; } else if (*string == f_string_ascii_colon_semi_s[0]) { - flag |= f_print_format_flag_ignore_index; + flag |= F_print_format_flag_ignore_index_d; continue; } else if (*string == f_string_ascii_equal_s[0]) { - flag |= f_print_format_flag_trim; + flag |= F_print_format_flag_trim_d; continue; } @@ -176,7 +176,7 @@ extern "C" { } else if (*string == f_string_ascii_I_s[0]) { type = f_print_format_type_signed_32; - flag |= f_print_format_flag_uppercase; + flag |= F_print_format_flag_uppercase_d; if (*(string + 1) == f_string_ascii_I_s[0]) { if (*(string + 2) == f_string_ascii_I_s[0]) { @@ -200,21 +200,21 @@ extern "C" { } else if (*(string + 1) == f_string_ascii_N_s[0]) { type = f_print_format_type_signed_number; - flag |= f_print_format_flag_uppercase; + flag |= F_print_format_flag_uppercase_d; ++string; } } else if (*string == f_string_ascii_Q_s[0]) { const f_string_static_t value = va_arg(*ap, f_string_static_t); - if (flag & f_print_format_flag_range) { + if (flag & F_print_format_flag_range_d) { const f_string_range_t partial = va_arg(*ap, f_string_range_t); - if (flag & f_print_format_flag_ignore_index) { + if (flag & F_print_format_flag_ignore_index_d) { const f_array_lengths_t except_at = va_arg(*ap, f_array_lengths_t); f_string_ranges_t except_in = f_string_ranges_t_initialize; - if (flag & f_print_format_flag_ignore_range) { + if (flag & F_print_format_flag_ignore_range_d) { except_in = va_arg(*ap, f_string_ranges_t); } @@ -230,14 +230,14 @@ extern "C" { length = value.used - partial.start; } - if (flag & f_print_format_flag_trim) { + if (flag & F_print_format_flag_trim_d) { *status = private_fl_print_trim_except_in_safely(value.string, partial.start, length, except_at, except_in, output); } else { *status = f_print_except_in_safely(value.string, partial.start, length, except_at, except_in, output); } } - else if (flag & f_print_format_flag_ignore_range) { + else if (flag & F_print_format_flag_ignore_range_d) { const f_array_lengths_t except_at = f_array_lengths_t_initialize; const f_string_ranges_t except_in = va_arg(*ap, f_string_ranges_t); @@ -253,7 +253,7 @@ extern "C" { length = value.used - partial.start; } - if (flag & f_print_format_flag_trim) { + if (flag & F_print_format_flag_trim_d) { *status = private_fl_print_trim_except_in_safely(value.string, partial.start, length, except_at, except_in, output); } else { @@ -276,7 +276,7 @@ extern "C" { length = value.used - partial.start; } - if (flag & f_print_format_flag_trim) { + if (flag & F_print_format_flag_trim_d) { *status = private_fl_print_trim_safely(value.string + partial.start, length, output); } else { @@ -284,26 +284,26 @@ extern "C" { } } } - else if (flag & f_print_format_flag_ignore_index) { + else if (flag & F_print_format_flag_ignore_index_d) { const f_array_lengths_t except_at = va_arg(*ap, f_array_lengths_t); f_string_ranges_t except_in = f_string_ranges_t_initialize; - if (flag & f_print_format_flag_ignore_range) { + if (flag & F_print_format_flag_ignore_range_d) { except_in = va_arg(*ap, f_string_ranges_t); } - if (flag & f_print_format_flag_trim) { + if (flag & F_print_format_flag_trim_d) { *status = private_fl_print_trim_except_in_safely(value.string, 0, value.used, except_at, except_in, output); } else { *status = f_print_except_in_dynamic_safely(value, except_at, except_in, output); } } - else if (flag & f_print_format_flag_ignore_range) { + else if (flag & F_print_format_flag_ignore_range_d) { const f_array_lengths_t except_at = f_array_lengths_t_initialize; const f_string_ranges_t except_in = va_arg(*ap, f_string_ranges_t); - if (flag & f_print_format_flag_trim) { + if (flag & F_print_format_flag_trim_d) { *status = private_fl_print_trim_except_in_safely(value.string, 0, value.used, except_at, except_in, output); } else { @@ -311,7 +311,7 @@ extern "C" { } } else { - if (flag & f_print_format_flag_trim) { + if (flag & F_print_format_flag_trim_d) { *status = private_fl_print_trim_safely(value.string, value.used, output); } else { @@ -330,7 +330,7 @@ extern "C" { } else if (*string == f_string_ascii_U_s[0]) { type = f_print_format_type_unsigned_32; - flag |= f_print_format_flag_uppercase; + flag |= F_print_format_flag_uppercase_d; if (*(string + 1) == f_string_ascii_I_s[0]) { if (*(string + 2) == f_string_ascii_I_s[0]) { @@ -366,7 +366,7 @@ extern "C" { else if (*string < 0x60) { if (*string == f_string_ascii_Z_s[0]) { type = f_print_format_type_size; - flag |= f_print_format_flag_uppercase; + flag |= F_print_format_flag_uppercase_d; } else if (*string == f_string_ascii_bracket_open_s[0]) { const f_color_set_t value = va_arg(*ap, f_color_set_t); @@ -443,14 +443,14 @@ extern "C" { else if (*string == f_string_ascii_q_s[0]) { const f_string_static_t value = va_arg(*ap, f_string_static_t); - if (flag & f_print_format_flag_range) { + if (flag & F_print_format_flag_range_d) { const f_string_range_t partial = va_arg(*ap, f_string_range_t); - if (flag & f_print_format_flag_ignore_index) { + if (flag & F_print_format_flag_ignore_index_d) { const f_array_lengths_t except_at = va_arg(*ap, f_array_lengths_t); f_string_ranges_t except_in = f_string_ranges_t_initialize; - if (flag & f_print_format_flag_ignore_range) { + if (flag & F_print_format_flag_ignore_range_d) { except_in = va_arg(*ap, f_string_ranges_t); } @@ -466,14 +466,14 @@ extern "C" { length = value.used - partial.start; } - if (flag & f_print_format_flag_trim) { + if (flag & F_print_format_flag_trim_d) { *status = private_fl_print_trim_except_in(value.string, partial.start, length, except_at, except_in, output); } else { *status = f_print_except_in(value.string, partial.start, length, except_at, except_in, output); } } - else if (flag & f_print_format_flag_ignore_range) { + else if (flag & F_print_format_flag_ignore_range_d) { const f_array_lengths_t except_at = f_array_lengths_t_initialize; const f_string_ranges_t except_in = va_arg(*ap, f_string_ranges_t); @@ -489,7 +489,7 @@ extern "C" { length = value.used - partial.start; } - if (flag & f_print_format_flag_trim) { + if (flag & F_print_format_flag_trim_d) { *status = private_fl_print_trim_except_in(value.string, partial.start, length, except_at, except_in, output); } else { @@ -512,7 +512,7 @@ extern "C" { length = value.used - partial.start; } - if (flag & f_print_format_flag_trim) { + if (flag & F_print_format_flag_trim_d) { *status = private_fl_print_trim(value.string + partial.start, length, output); } else { @@ -520,26 +520,26 @@ extern "C" { } } } - else if (flag & f_print_format_flag_ignore_index) { + else if (flag & F_print_format_flag_ignore_index_d) { const f_array_lengths_t except_at = va_arg(*ap, f_array_lengths_t); f_string_ranges_t except_in = f_string_ranges_t_initialize; - if (flag & f_print_format_flag_ignore_range) { + if (flag & F_print_format_flag_ignore_range_d) { except_in = va_arg(*ap, f_string_ranges_t); } - if (flag & f_print_format_flag_trim) { + if (flag & F_print_format_flag_trim_d) { *status = private_fl_print_trim_except_in(value.string, 0, value.used, except_at, except_in, output); } else { *status = f_print_except_in_dynamic(value, except_at, except_in, output); } } - else if (flag & f_print_format_flag_ignore_range) { + else if (flag & F_print_format_flag_ignore_range_d) { const f_array_lengths_t except_at = f_array_lengths_t_initialize; const f_string_ranges_t except_in = va_arg(*ap, f_string_ranges_t); - if (flag & f_print_format_flag_trim) { + if (flag & F_print_format_flag_trim_d) { *status = private_fl_print_trim_except_in(value.string, 0, value.used, except_at, except_in, output); } else { @@ -547,7 +547,7 @@ extern "C" { } } else { - if (flag & f_print_format_flag_trim) { + if (flag & F_print_format_flag_trim_d) { *status = private_fl_print_trim(value.string, value.used, output); } else { @@ -567,14 +567,14 @@ extern "C" { if (*string == f_string_ascii_r_s[0]) { const f_string_static_t value = va_arg(*ap, f_string_static_t); - if (flag & f_print_format_flag_range) { + if (flag & F_print_format_flag_range_d) { const f_string_range_t partial = va_arg(*ap, f_string_range_t); - if (flag & f_print_format_flag_ignore_index) { + if (flag & F_print_format_flag_ignore_index_d) { const f_array_lengths_t except_at = va_arg(*ap, f_array_lengths_t); f_string_ranges_t except_in = f_string_ranges_t_initialize; - if (flag & f_print_format_flag_ignore_range) { + if (flag & F_print_format_flag_ignore_range_d) { except_in = va_arg(*ap, f_string_ranges_t); } @@ -590,14 +590,14 @@ extern "C" { length = value.used - partial.start; } - if (flag & f_print_format_flag_trim) { + if (flag & F_print_format_flag_trim_d) { *status = private_fl_print_trim_except_in_raw(value.string, partial.start, length, except_at, except_in, output); } else { *status = f_print_except_in_raw(value.string, partial.start, length, except_at, except_in, output); } } - else if (flag & f_print_format_flag_ignore_range) { + else if (flag & F_print_format_flag_ignore_range_d) { const f_array_lengths_t except_at = f_array_lengths_t_initialize; const f_string_ranges_t except_in = va_arg(*ap, f_string_ranges_t); @@ -613,7 +613,7 @@ extern "C" { length = value.used - partial.start; } - if (flag & f_print_format_flag_trim) { + if (flag & F_print_format_flag_trim_d) { *status = private_fl_print_trim_except_in_raw(value.string, partial.start, length, except_at, except_in, output); } else { @@ -636,7 +636,7 @@ extern "C" { length = value.used - partial.start; } - if (flag & f_print_format_flag_trim) { + if (flag & F_print_format_flag_trim_d) { *status = private_fl_print_trim_raw(value.string + partial.start, length, output); } else { @@ -644,26 +644,26 @@ extern "C" { } } } - else if (flag & f_print_format_flag_ignore_index) { + else if (flag & F_print_format_flag_ignore_index_d) { const f_array_lengths_t except_at = va_arg(*ap, f_array_lengths_t); f_string_ranges_t except_in = f_string_ranges_t_initialize; - if (flag & f_print_format_flag_ignore_range) { + if (flag & F_print_format_flag_ignore_range_d) { except_in = va_arg(*ap, f_string_ranges_t); } - if (flag & f_print_format_flag_trim) { + if (flag & F_print_format_flag_trim_d) { *status = private_fl_print_trim_except_in_raw(value.string, 0, value.used, except_at, except_in, output); } else { *status = f_print_except_in_dynamic_raw(value, except_at, except_in, output); } } - else if (flag & f_print_format_flag_ignore_range) { + else if (flag & F_print_format_flag_ignore_range_d) { const f_array_lengths_t except_at = f_array_lengths_t_initialize; const f_string_ranges_t except_in = va_arg(*ap, f_string_ranges_t); - if (flag & f_print_format_flag_trim) { + if (flag & F_print_format_flag_trim_d) { *status = private_fl_print_trim_except_in_raw(value.string, 0, value.used, except_at, except_in, output); } else { @@ -671,7 +671,7 @@ extern "C" { } } else { - if (flag & f_print_format_flag_trim) { + if (flag & F_print_format_flag_trim_d) { *status = private_fl_print_trim_raw(value.string, value.used, output); } else { @@ -728,34 +728,34 @@ extern "C" { f_conversion_data_t conversion_data = macro_f_conversion_data_t_initialize(base, 0, 1); - if (flag & f_print_format_flag_align_left) { - conversion_data.flag |= f_conversion_data_flag_align_left; + if (flag & F_print_format_flag_align_left_d) { + conversion_data.flag |= F_conversion_data_flag_align_left_d; } - if (flag & f_print_format_flag_convert) { - conversion_data.flag |= f_conversion_data_flag_base_prepend; + if (flag & F_print_format_flag_convert_d) { + conversion_data.flag |= F_conversion_data_flag_base_prepend_d; } - if (flag & f_print_format_flag_sign_always) { - conversion_data.flag |= f_conversion_data_flag_sign_always; + if (flag & F_print_format_flag_sign_always_d) { + conversion_data.flag |= F_conversion_data_flag_sign_always_d; } - if (flag & f_print_format_flag_sign_pad) { - conversion_data.flag |= f_conversion_data_flag_sign_pad; + if (flag & F_print_format_flag_sign_pad_d) { + conversion_data.flag |= F_conversion_data_flag_sign_pad_d; } - if (flag & f_print_format_flag_uppercase) { - conversion_data.flag |= f_conversion_data_flag_base_upper; + if (flag & F_print_format_flag_uppercase_d) { + conversion_data.flag |= F_conversion_data_flag_base_upper_d; } - if (flag & f_print_format_flag_zeros_leading) { - conversion_data.flag |= f_conversion_data_flag_zeros_leading; + if (flag & F_print_format_flag_zeros_leading_d) { + conversion_data.flag |= F_conversion_data_flag_zeros_leading_d; } - if (flag & f_print_format_flag_width) { + if (flag & F_print_format_flag_width_d) { conversion_data.width = width; } - else if (flag & f_print_format_flag_precision) { + else if (flag & F_print_format_flag_precision_d) { conversion_data.width = precision; } diff --git a/level_1/fl_print/c/private-print.h b/level_1/fl_print/c/private-print.h index 957e296..5c32fa8 100644 --- a/level_1/fl_print/c/private-print.h +++ b/level_1/fl_print/c/private-print.h @@ -71,7 +71,7 @@ extern "C" { * @see private_fl_print_convert_number() */ #if !defined(_di_fl_print_format_) || !defined(_di_fl_print_format_convert_) - extern f_string_t private_fl_print_format_convert(f_string_t string, FILE *output, va_list *ap, f_status_t *status) f_attribute_visibility_internal; + extern f_string_t private_fl_print_format_convert(f_string_t string, FILE *output, va_list *ap, f_status_t *status) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_print_format_) || !defined(_di_fl_print_format_convert_) /** @@ -95,7 +95,7 @@ extern "C" { * @see va_arg() */ #if !defined(_di_fl_print_format_) || !defined(_di_fl_print_format_convert_) - extern f_string_t private_fl_print_convert_number(f_string_t string, va_list *ap, unsigned int *number, f_status_t *status) f_attribute_visibility_internal; + extern f_string_t private_fl_print_convert_number(f_string_t string, va_list *ap, unsigned int *number, f_status_t *status) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_print_format_) || !defined(_di_fl_print_format_convert_) /** @@ -140,7 +140,7 @@ extern "C" { * @see fl_print_trim_except_in_dynamic_partial() */ #if !defined(_di_fl_print_trim_except_) || !defined(_di_fl_print_trim_except_dynamic_) || !defined(_di_fl_print_trim_except_dynamic_partial_) || !defined(_di_fl_print_trim_except_in_) || !defined(_di_fl_print_trim_except_in_dynamic_) || !defined(_di_fl_print_trim_except_in_dynamic_partial_) - extern f_status_t private_fl_print_trim_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) f_attribute_visibility_internal; + extern f_status_t private_fl_print_trim_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_print_trim_except_) || !defined(_di_fl_print_trim_except_dynamic_) || !defined(_di_fl_print_trim_except_dynamic_partial_) || !defined(_di_fl_print_trim_except_in_) || !defined(_di_fl_print_trim_except_in_dynamic_) || !defined(_di_fl_print_trim_except_in_dynamic_partial_) /** @@ -183,7 +183,7 @@ extern "C" { * @see fl_print_trim_except_in_dynamic_partial_raw() */ #if !defined(_di_fl_print_trim_except_raw_) || !defined(_di_fl_print_trim_except_dynamic_raw_) || !defined(_di_fl_print_trim_except_dynamic_partial_raw_) || !defined(_di_fl_print_trim_except_in_raw_) || !defined(_di_fl_print_trim_except_in_dynamic_raw_) || !defined(_di_fl_print_trim_except_in_dynamic_partial_raw_) - extern f_status_t private_fl_print_trim_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) f_attribute_visibility_internal; + extern f_status_t private_fl_print_trim_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_print_trim_except_raw_) || !defined(_di_fl_print_trim_except_dynamic_raw_) || !defined(_di_fl_print_trim_except_dynamic_partial_raw_) || !defined(_di_fl_print_trim_except_in_raw_) || !defined(_di_fl_print_trim_except_in_dynamic_raw_) || !defined(_di_fl_print_trim_except_in_dynamic_partial_raw_) /** @@ -227,7 +227,7 @@ extern "C" { * @see fl_print_trim_except_in_dynamic_partial_safely() */ #if !defined(_di_fl_print_trim_except_safely_) || !defined(_di_fl_print_trim_except_dynamic_safely_) || !defined(_di_fl_print_trim_except_dynamic_partial_safely_) || !defined(_di_fl_print_trim_except_in_safely_) || !defined(_di_fl_print_trim_except_in_dynamic_safely_) || !defined(_di_fl_print_trim_except_in_dynamic_partial_safely_) - extern f_status_t private_fl_print_trim_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) f_attribute_visibility_internal; + extern f_status_t private_fl_print_trim_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_print_trim_except_safely_) || !defined(_di_fl_print_trim_except_dynamic_safely_) || !defined(_di_fl_print_trim_except_dynamic_partial_safely_) || !defined(_di_fl_print_trim_except_in_safely_) || !defined(_di_fl_print_trim_except_in_dynamic_safely_) || !defined(_di_fl_print_trim_except_in_dynamic_partial_safely_) /** @@ -261,7 +261,7 @@ extern "C" { * @see fl_print_trim_dynamic_partial() */ #if !defined(_di_fl_print_trim_) || !defined(_di_fl_print_trim_dynamic_) || !defined(_di_fl_print_trim_dynamic_partial_) - extern f_status_t private_fl_print_trim(const f_string_t string, const f_array_length_t length, FILE *output) f_attribute_visibility_internal; + extern f_status_t private_fl_print_trim(const f_string_t string, const f_array_length_t length, FILE *output) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_print_trim_) || !defined(_di_fl_print_trim_dynamic_) || !defined(_di_fl_print_trim_dynamic_partial_) /** @@ -293,7 +293,7 @@ extern "C" { * @see fl_print_trim_dynamic_partial_raw() */ #if !defined(_di_fl_print_trim_raw_) || !defined(_di_fl_print_trim_dynamic_raw_) || !defined(_di_fl_print_trim_dynamic_partial_raw_) - extern f_status_t private_fl_print_trim_raw(const f_string_t string, const f_array_length_t length, FILE *output) f_attribute_visibility_internal; + extern f_status_t private_fl_print_trim_raw(const f_string_t string, const f_array_length_t length, FILE *output) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_print_trim_raw_) || !defined(_di_fl_print_trim_dynamic_raw_) || !defined(_di_fl_print_trim_dynamic_partial_raw_) /** @@ -326,7 +326,7 @@ extern "C" { * @see fl_print_trim_dynamic_partial_safely() */ #if !defined(_di_fl_print_trim_safely_) || !defined(_di_fl_print_trim_dynamic_safely_) || !defined(_di_fl_print_trim_dynamic_partial_safely_) - extern f_status_t private_fl_print_trim_safely(const f_string_t string, const f_array_length_t length, FILE *output) f_attribute_visibility_internal; + extern f_status_t private_fl_print_trim_safely(const f_string_t string, const f_array_length_t length, FILE *output) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_print_trim_safely_) || !defined(_di_fl_print_trim_dynamic_safely_) || !defined(_di_fl_print_trim_dynamic_partial_safely_) #ifdef __cplusplus diff --git a/level_1/fl_string/c/private-string.h b/level_1/fl_string/c/private-string.h index 2389cfd..95b2ba6 100644 --- a/level_1/fl_string/c/private-string.h +++ b/level_1/fl_string/c/private-string.h @@ -42,7 +42,7 @@ extern "C" { * @see fl_string_dynamic_partial_compare() */ #if !defined(_di_fl_string_compare_) || !defined(_di_fl_string_dynamic_compare_) || !defined(_di_fl_string_dynamic_partial_compare_) - extern f_status_t private_fl_string_compare(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) f_attribute_visibility_internal; + extern f_status_t private_fl_string_compare(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_string_compare_) || !defined(_di_fl_string_dynamic_compare_) || !defined(_di_fl_string_dynamic_partial_compare_) /** @@ -78,7 +78,7 @@ extern "C" { * @see fl_string_dynamic_partial_compare_except() */ #if !defined(_di_fl_string_compare_except_) || !defined(_di_fl_string_dynamic_compare_except_) || !defined(_di_fl_string_dynamic_partial_compare_except_) - extern f_status_t private_fl_string_compare_except(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2, const f_array_lengths_t except1, const f_array_lengths_t except2) f_attribute_visibility_internal; + extern f_status_t private_fl_string_compare_except(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2, const f_array_lengths_t except1, const f_array_lengths_t except2) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_string_compare_except_) || !defined(_di_fl_string_dynamic_compare_except_) || !defined(_di_fl_string_dynamic_partial_compare_except_) /** @@ -119,7 +119,7 @@ extern "C" { * @see fl_string_dynamic_partial_compare_except_trim() */ #if !defined(_di_fl_string_compare_except_trim_) || !defined(_di_fl_string_dynamic_compare_except_trim_) || !defined(_di_fl_string_dynamic_partial_compare_except_trim_) - extern f_status_t private_fl_string_compare_except_trim(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2, const f_array_lengths_t except1, const f_array_lengths_t except2) f_attribute_visibility_internal; + extern f_status_t private_fl_string_compare_except_trim(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2, const f_array_lengths_t except1, const f_array_lengths_t except2) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_string_compare_except_trim_) || !defined(_di_fl_string_dynamic_compare_except_trim_) || !defined(_di_fl_string_dynamic_partial_compare_except_trim_) /** @@ -154,7 +154,7 @@ extern "C" { * @see fl_string_dynamic_partial_compare_trim() */ #if !defined(_di_fl_string_compare_trim_) || !defined(_di_fl_string_dynamic_compare_trim_) || !defined(_di_fl_string_dynamic_partial_compare_trim_) - extern f_status_t private_fl_string_compare_trim(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) f_attribute_visibility_internal; + extern f_status_t private_fl_string_compare_trim(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_string_compare_trim_) || !defined(_di_fl_string_dynamic_compare_trim_) || !defined(_di_fl_string_dynamic_partial_compare_trim_) /** @@ -185,7 +185,7 @@ extern "C" { * @see fl_string_dynamic_rip_nulless() */ #if !defined(_di_fl_string_rip_) || !defined(_di_fl_string_dynamic_rip_) || !defined(_di_fl_string_rip_nulless_) || !defined(_di_fl_string_dynamic_rip_nulless_) - extern f_status_t private_fl_string_rip_find_range(const f_string_t source, f_array_length_t *start, f_array_length_t *stop) f_attribute_visibility_internal; + extern f_status_t private_fl_string_rip_find_range(const f_string_t source, f_array_length_t *start, f_array_length_t *stop) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_string_rip_) || !defined(_di_fl_string_dynamic_rip_) || !defined(_di_fl_string_rip_nulless_) || !defined(_di_fl_string_dynamic_rip_nulless_) #ifdef __cplusplus diff --git a/level_1/fl_string/c/string.c b/level_1/fl_string/c/string.c index 2598ee6..3d419ce 100644 --- a/level_1/fl_string/c/string.c +++ b/level_1/fl_string/c/string.c @@ -790,7 +790,7 @@ extern "C" { range->start += macro_f_utf_byte_width(buffer[range->start]); } // for - if (range->start > range->stop || buffer[range->start] != f_string_ascii_minus[0]) { + if (range->start > range->stop || buffer[range->start] != F_string_ascii_minus_s[0]) { // Increment until stop, while taking into consideration UTF-8 character widths. for (; range->start <= range->stop; ) { @@ -919,7 +919,7 @@ extern "C" { for (f_array_length_t j = i, i = 0; j <= range->stop; ++j) { if (!buffer[j]) continue; - if (buffer[j] == f_string_ascii_minus[0]) break; + if (buffer[j] == F_string_ascii_minus_s[0]) break; id->name[i] = buffer[j]; ++i; diff --git a/level_1/fl_utf/c/private-utf.h b/level_1/fl_utf/c/private-utf.h index 0fbb28b..f06516e 100644 --- a/level_1/fl_utf/c/private-utf.h +++ b/level_1/fl_utf/c/private-utf.h @@ -44,7 +44,7 @@ extern "C" { * @see fl_utf_string_dynamic_partial_compare() */ #if !defined(_di_fl_utfl_string_compare_) || !defined(_di_fl_utfl_string_dynamic_compare_) || !defined(_di_fl_utfl_string_dynamic_partial_compare_) - extern f_status_t private_fl_utf_string_compare(const f_utf_string_t string1, const f_utf_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) f_attribute_visibility_internal; + extern f_status_t private_fl_utf_string_compare(const f_utf_string_t string1, const f_utf_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_utfl_string_compare_) || !defined(_di_fl_utfl_string_dynamic_compare_) || !defined(_di_fl_utfl_string_dynamic_partial_compare_) /** @@ -76,7 +76,7 @@ extern "C" { * @see fl_utf_string_dynamic_partial_compare_trim() */ #if !defined(_di_fl_utf_string_compare_trim_) || !defined(_di_fl_utf_string_dynamic_compare_trim_) || !defined(_di_fl_utf_string_dynamic_partial_compare_trim_) - extern f_status_t private_fl_utf_string_compare_trim(const f_utf_string_t string1, const f_utf_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) f_attribute_visibility_internal; + extern f_status_t private_fl_utf_string_compare_trim(const f_utf_string_t string1, const f_utf_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_utf_string_compare_trim_) || !defined(_di_fl_utf_string_dynamic_compare_trim_) || !defined(_di_fl_utf_string_dynamic_partial_compare_trim_) /** @@ -104,7 +104,7 @@ extern "C" { * @see fl_utf_string_rip() */ #if !defined(_di_fl_utf_string_rip_) || !defined(_di_fl_utf_string_dynamic_rip_) || !defined(_di_fl_utf_string_rip_nulless_) || !defined(_di_fl_utf_string_dynamic_rip_nulless_) - extern f_status_t private_fl_utf_string_rip_find_range(const f_utf_string_t source, f_array_length_t *start, f_array_length_t *stop) f_attribute_visibility_internal; + extern f_status_t private_fl_utf_string_rip_find_range(const f_utf_string_t source, f_array_length_t *start, f_array_length_t *stop) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_utf_string_rip_) || !defined(_di_fl_utf_string_dynamic_rip_) || !defined(_di_fl_utf_string_rip_nulless_) || !defined(_di_fl_utf_string_dynamic_rip_nulless_) #ifdef __cplusplus diff --git a/level_1/fl_utf/c/utf.c b/level_1/fl_utf/c/utf.c index b790009..71f92d7 100644 --- a/level_1/fl_utf/c/utf.c +++ b/level_1/fl_utf/c/utf.c @@ -114,7 +114,7 @@ extern "C" { while (buffer.string[range->start] != seek_to_character) { - if (buffer.string[range->start] == f_utf_character_t_eol) { + if (buffer.string[range->start] == F_utf_character_t_eol_d) { return F_none_eol; } @@ -164,7 +164,7 @@ extern "C" { return status; } - if (buffer.string[range->start] == f_utf_character_t_eol) { + if (buffer.string[range->start] == F_utf_character_t_eol_d) { return F_none_eol; } @@ -210,7 +210,7 @@ extern "C" { while (buffer.string[range->start] == placeholder || (status = f_utf_character_is_whitespace(buffer.string[range->start])) == F_false) { if (F_status_is_error(status)) return status; - if (buffer.string[range->start] == f_utf_character_t_eol) return F_none_eol; + if (buffer.string[range->start] == F_utf_character_t_eol_d) return F_none_eol; ++range->start; @@ -342,7 +342,7 @@ extern "C" { return F_status_set_error(F_utf); } - if (string[range->start] == f_utf_character_t_eol) { + if (string[range->start] == F_utf_character_t_eol_d) { return F_none_eol; } @@ -377,7 +377,7 @@ extern "C" { return status; } - if (string[range->start] == f_utf_character_t_eol) { + if (string[range->start] == F_utf_character_t_eol_d) { return F_none_eol; } @@ -422,7 +422,7 @@ extern "C" { return status; } - if (string[range->start] == f_utf_character_t_eol) { + if (string[range->start] == F_utf_character_t_eol_d) { return F_none_eol; } diff --git a/level_1/fl_utf_file/c/private-utf_file.h b/level_1/fl_utf_file/c/private-utf_file.h index fe774ed..57f4efa 100644 --- a/level_1/fl_utf_file/c/private-utf_file.h +++ b/level_1/fl_utf_file/c/private-utf_file.h @@ -40,7 +40,7 @@ extern "C" { * @see fl_utf_file_read_until() */ #if !defined(_di_fl_utf_file_read_) || !defined(_di_fl_utf_file_read_until_) || !defined(_di_fl_utf_file_read_range_) - void private_fl_utf_file_process_read_buffer(const char *buffer_read, const ssize_t size_read, f_utf_string_dynamic_t *buffer, char buffer_char[], uint8_t *width, int8_t *width_last) f_attribute_visibility_internal; + void private_fl_utf_file_process_read_buffer(const char *buffer_read, const ssize_t size_read, f_utf_string_dynamic_t *buffer, char buffer_char[], uint8_t *width, int8_t *width_last) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_utf_file_read_) || !defined(_di_fl_utf_file_read_until_) || !defined(_di_fl_utf_file_read_range_) /** @@ -79,7 +79,7 @@ extern "C" { * @see fl_utf_file_write_until() */ #if !defined(_di_fl_utf_file_write_) || !defined(_di_fl_utf_file_write_until_) || !defined(_di_fl_utf_file_write_range_) - extern f_status_t private_fl_utf_file_write_until(const f_file_t file, const f_utf_string_t string, const f_array_length_t total, f_array_length_t *written) f_attribute_visibility_internal; + extern f_status_t private_fl_utf_file_write_until(const f_file_t file, const f_utf_string_t string, const f_array_length_t total, f_array_length_t *written) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_utf_file_write_) || !defined(_di_fl_utf_file_write_until_) || !defined(_di_fl_utf_file_write_range_) #ifdef __cplusplus diff --git a/level_1/fl_utf_file/c/utf_file.c b/level_1/fl_utf_file/c/utf_file.c index 613a9f0..15a56a0 100644 --- a/level_1/fl_utf_file/c/utf_file.c +++ b/level_1/fl_utf_file/c/utf_file.c @@ -34,7 +34,7 @@ extern "C" { while ((size_read = read(file.id, buffer_read, file.size_read)) > 0) { if (buffer->used + size_read > buffer->size) { - if (buffer->size + size_read > f_string_t_size) { + if (buffer->size + size_read > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -94,7 +94,7 @@ extern "C" { if ((size_read = read(file.id, buffer_read, file.size_read)) > 0) { if (buffer->used + size_read > buffer->size) { - if (buffer->size + size_read > f_string_t_size) { + if (buffer->size + size_read > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } @@ -167,7 +167,7 @@ extern "C" { while (buffer_count < total && (size_read = read(file.id, buffer_read, buffer_size)) > 0) { if (buffer->used + size_read > buffer->size) { - if (buffer->size + size_read > f_string_t_size) { + if (buffer->size + size_read > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } diff --git a/level_2/fll_control_group/c/control_group.c b/level_2/fll_control_group/c/control_group.c index 0e99fe3..8a5c052 100644 --- a/level_2/fll_control_group/c/control_group.c +++ b/level_2/fll_control_group/c/control_group.c @@ -34,7 +34,7 @@ extern "C" { memcpy(path + control_group.path.used, control_group.groups.array[i].string, control_group.groups.array[i].used); path[length] = 0; - status = fl_directory_create(path, length, f_file_mode_all_rwx); + status = fl_directory_create(path, length, F_file_mode_all_rwx_d); if (F_status_is_error(status)) break; } // for diff --git a/level_2/fll_error/c/error-common.c b/level_2/fll_error/c/error-common.c index 7f7cb5c..cc9521c 100644 --- a/level_2/fll_error/c/error-common.c +++ b/level_2/fll_error/c/error-common.c @@ -6,9 +6,9 @@ extern "C" { #endif #ifndef _di_fll_error_file_type_ - const f_string_t fll_error_file_type_string_directory_s = fll_error_file_type_string_directory; - const f_string_t fll_error_file_type_string_file_s = fll_error_file_type_string_file; - const f_string_t fll_error_file_type_string_pipe_s = fll_error_file_type_string_pipe; + const f_string_t fll_error_file_type_directory_s = FLL_error_file_type_directory_s; + const f_string_t fll_error_file_type_file_s = FLL_error_file_type_file_s; + const f_string_t fll_error_file_type_pipe_s = FLL_error_file_type_pipe_s; #endif // _di_fll_error_file_type_ #ifdef __cplusplus diff --git a/level_2/fll_error/c/error-common.h b/level_2/fll_error/c/error-common.h index 3b98c29..7151601 100644 --- a/level_2/fll_error/c/error-common.h +++ b/level_2/fll_error/c/error-common.h @@ -26,17 +26,17 @@ extern "C" { fll_error_file_type_pipe, }; - #define fll_error_file_type_string_directory "directory" - #define fll_error_file_type_string_file "file" - #define fll_error_file_type_string_pipe "pipe" + #define FLL_error_file_type_directory_s "directory" + #define FLL_error_file_type_file_s "file" + #define FLL_error_file_type_pipe_s "pipe" - #define fll_error_file_type_length_directory 9 - #define fll_error_file_type_length_file 4 - #define fll_error_file_type_length_pipe 4 + #define FLL_error_file_type_directory_s_length 9 + #define FLL_error_file_type_file_s_length 4 + #define FLL_error_file_type_pipe_s_length 4 - extern const f_string_t fll_error_file_type_string_directory_s; - extern const f_string_t fll_error_file_type_string_file_s; - extern const f_string_t fll_error_file_type_string_pipe_s; + extern const f_string_t fll_error_file_type_directory_s; + extern const f_string_t fll_error_file_type_file_s; + extern const f_string_t fll_error_file_type_pipe_s; #endif // _di_fll_error_file_type_ #ifdef __cplusplus diff --git a/level_2/fll_error/c/error.c b/level_2/fll_error/c/error.c index 717703d..d78b0dd 100644 --- a/level_2/fll_error/c/error.c +++ b/level_2/fll_error/c/error.c @@ -15,13 +15,13 @@ extern "C" { #ifndef _di_fll_error_file_print_ f_status_t fll_error_file_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_t name, const f_string_t operation, const uint8_t type) { - const char *type_name = fll_error_file_type_string_file; + const char *type_name = FLL_error_file_type_file_s; if (type == fll_error_file_type_directory) { - type_name = fll_error_file_type_string_directory; + type_name = FLL_error_file_type_directory_s; } else if (type == fll_error_file_type_pipe) { - type_name = fll_error_file_type_string_pipe; + type_name = FLL_error_file_type_pipe_s; } if (status == F_access_denied) { diff --git a/level_2/fll_error/c/private-error.h b/level_2/fll_error/c/private-error.h index 7d6fae5..d57bf09 100644 --- a/level_2/fll_error/c/private-error.h +++ b/level_2/fll_error/c/private-error.h @@ -39,7 +39,7 @@ extern "C" { * @see fll_error_file_print() */ #if !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_) || !defined(_di_fll_error_number_print_) - extern f_status_t private_fll_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback) f_attribute_visibility_internal; + extern f_status_t private_fll_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback) F_attribute_visibility_internal_d; #endif // !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_) || !defined(_di_fll_error_number_print_) /** @@ -61,7 +61,7 @@ extern "C" { * @see fll_error_file_print() */ #if !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_) || !defined(_di_fll_error_number_print_) - void private_fll_error_print_function(const fl_print_t print, const f_string_t function) f_attribute_visibility_internal; + void private_fll_error_print_function(const fl_print_t print, const f_string_t function) F_attribute_visibility_internal_d; #endif // !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_) || !defined(_di_fll_error_number_print_) #ifdef __cplusplus diff --git a/level_2/fll_execute/c/execute.c b/level_2/fll_execute/c/execute.c index 5d074f7..3c10731 100644 --- a/level_2/fll_execute/c/execute.c +++ b/level_2/fll_execute/c/execute.c @@ -140,7 +140,7 @@ extern "C" { f_string_t fixed_arguments[arguments.used + 2]; const f_string_t last_slash = strrchr(program ? program : arguments.array[0].string, f_path_separator_s[0]); - const f_array_length_t size_name = last_slash ? strnlen(last_slash + 1, f_path_length_max) : strnlen(program ? program : arguments.array[0].string, f_path_length_max); + const f_array_length_t size_name = last_slash ? strnlen(last_slash + 1, F_path_length_max_d) : strnlen(program ? program : arguments.array[0].string, F_path_length_max_d); char program_name[size_name + 1]; @@ -149,7 +149,7 @@ extern "C" { int code = 0; // full path is explicitly requested. - if (option & fl_execute_parameter_option_path) { + if (option & FL_execute_parameter_option_path_d) { f_string_dynamic_t path = f_string_dynamic_t_initialize; f_string_dynamics_t paths = f_string_dynamics_t_initialize; f_string_dynamic_t *found = 0; @@ -166,7 +166,7 @@ extern "C" { } path.string = program ? program : arguments.array[0].string; - path.used = strnlen(program ? program : arguments.array[0].string, f_path_length_max); + path.used = strnlen(program ? program : arguments.array[0].string, F_path_length_max_d); found = &path; } else { @@ -302,7 +302,7 @@ extern "C" { *r = code; } - if (option & fl_execute_parameter_option_exit) { + if (option & FL_execute_parameter_option_exit_d) { exit(code); } @@ -325,14 +325,14 @@ extern "C" { f_string_t fixed_arguments[arguments.used + 2]; const f_string_t last_slash = strrchr(program ? program : arguments.array[0].string, f_path_separator_s[0]); - const f_array_length_t size_name = last_slash ? strnlen(last_slash + 1, f_path_length_max) : strnlen(program ? program : arguments.array[0].string, f_path_length_max); + const f_array_length_t size_name = last_slash ? strnlen(last_slash + 1, F_path_length_max_d) : strnlen(program ? program : arguments.array[0].string, F_path_length_max_d); char program_name[size_name + 1]; private_fll_execute_path_arguments_fixate(program ? program : arguments.array[0].string, arguments, last_slash, !program, size_name, program_name, fixed_arguments); // determine full path when the environment is to be cleared or full path is explicitly requested. - if (parameter && parameter->environment || parameter && (parameter->option & fl_execute_parameter_option_path)) { + if (parameter && parameter->environment || parameter && (parameter->option & FL_execute_parameter_option_path_d)) { f_string_dynamic_t path = f_string_dynamic_t_initialize; f_string_dynamics_t paths = f_string_dynamics_t_initialize; f_string_dynamic_t *found = 0; @@ -349,7 +349,7 @@ extern "C" { } path.string = program ? program : arguments.array[0].string; - path.used = strnlen(program ? program : arguments.array[0].string, f_path_length_max); + path.used = strnlen(program ? program : arguments.array[0].string, F_path_length_max_d); found = &path; } else { @@ -429,7 +429,7 @@ extern "C" { status = macro_f_string_dynamics_t_delete_simple(paths); if (F_status_is_error(status)) return status; - if (parameter && (parameter->option & fl_execute_parameter_option_path)) { + if (parameter && (parameter->option & FL_execute_parameter_option_path_d)) { fixed_arguments[0] = program_path; } diff --git a/level_2/fll_execute/c/execute.h b/level_2/fll_execute/c/execute.h index f177426..0419960 100644 --- a/level_2/fll_execute/c/execute.h +++ b/level_2/fll_execute/c/execute.h @@ -360,9 +360,9 @@ extern "C" { * @param arguments * An array of strings representing the arguments. * @param option - * A bitwise set of options, such as: fl_execute_parameter_option_exit and fl_execute_parameter_option_path. - * If fl_execute_parameter_option_exit: this will call exit() at the end of execution (be it success or failure). - * If fl_execute_parameter_option_path: use the whole program path (such as "/bin/bash" instead "bash" when populating argument[0]. + * A bitwise set of options, such as: FL_execute_parameter_option_exit_d and FL_execute_parameter_option_path_d. + * If FL_execute_parameter_option_exit_d: this will call exit() at the end of execution (be it success or failure). + * If FL_execute_parameter_option_path_d: use the whole program path (such as "/bin/bash" instead "bash" when populating argument[0]. * @param environment * (optional) An map of strings representing the environment variable names and their respective values. * Completely clears the environment and then creates environment variables for each name and value pair in this map. @@ -397,7 +397,7 @@ extern "C" { * When the path has a slash "/" or the environment is to be cleared, then this does validate the path to the program. * Otherwise, this does not validate the path to the program. * - * When the parameter.option has the fl_execute_parameter_option_exit bit set, then this calls exit() when the child process returns. + * When the parameter.option has the FL_execute_parameter_option_exit_d bit set, then this calls exit() when the child process returns. * Otherwise, this returns F_child and assigns the child's return code to result for the child process. * The caller is expected to handle the appropriate exit procedures and memory deallocation for the child process when F_child is returned. * @@ -414,7 +414,7 @@ extern "C" { * @param parameter * (optional) This and most of its fields are optional and are disabled when set to 0. * option: - * A bitwise set of options, such as: fl_execute_parameter_option_exit and fl_execute_parameter_option_path. + * A bitwise set of options, such as: FL_execute_parameter_option_exit_d and FL_execute_parameter_option_path_d. * environment: * An map of strings representing the environment variable names and their respective values. * Completely clears the environment and then creates environment variables for each name and value pair in this map. @@ -434,14 +434,14 @@ extern "C" { * (optional) This and most of its fields are optional and are disabled when set to NULL. * @param result * (optional) The execute status code returned after finishing or attempting to finish execution of program. - * When fl_execute_parameter_option_return is passed via parameter.option, then this instead stores the child process id (PID). - * This is should be of (int *) except when fl_execute_parameter_option_return this should instead be (pid_t *). + * When FL_execute_parameter_option_return_d is passed via parameter.option, then this instead stores the child process id (PID). + * This is should be of (int *) except when FL_execute_parameter_option_return_d this should instead be (pid_t *). * Set to NULL to not use. * * @return * F_none on success. * F_child on success and this is the child thread. - * F_parent on success and this is the parent thread (only happens when fl_execute_parameter_option_return is passed). + * F_parent on success and this is the parent thread (only happens when FL_execute_parameter_option_return_d is passed). * * F_capability (with error bit) on failure to set capabilities in the child (only the child process returns this). * F_control_group (with error bit) on failure to set control group in the child (only the parent process returns this). diff --git a/level_2/fll_execute/c/private-execute.c b/level_2/fll_execute/c/private-execute.c index 27d0204..3cb1f1d 100644 --- a/level_2/fll_execute/c/private-execute.c +++ b/level_2/fll_execute/c/private-execute.c @@ -8,7 +8,7 @@ extern "C" { #if !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_) || !defined(_di_fll_execute_arguments_dynamic_add_) || !defined(_di_fll_execute_arguments_dynamic_add_set_) f_status_t private_fll_execute_arguments_add(const f_string_t source, const f_array_length_t length, f_string_dynamics_t *arguments) { - f_status_t status = f_string_dynamics_increase(f_memory_default_allocation_small, arguments); + f_status_t status = f_string_dynamics_increase(F_memory_default_allocation_small_d, arguments); if (F_status_is_error(status)) return status; f_string_dynamic_t argument = f_string_dynamic_t_initialize; @@ -42,7 +42,7 @@ extern "C" { #if !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_set_) f_status_t private_fll_execute_arguments_add_parameter(const f_string_t prefix, const f_array_length_t prefix_length, const f_string_t name, const f_array_length_t name_length, const f_string_t value, const f_array_length_t value_length, f_string_dynamics_t *arguments) { - f_status_t status = f_string_dynamics_increase(f_memory_default_allocation_small, arguments); + f_status_t status = f_string_dynamics_increase(F_memory_default_allocation_small_d, arguments); if (F_status_is_error(status)) return status; f_string_dynamic_t argument = f_string_dynamic_t_initialize; @@ -99,7 +99,7 @@ extern "C" { return status; } - status = f_string_dynamics_increase(f_memory_default_allocation_small, arguments); + status = f_string_dynamics_increase(F_memory_default_allocation_small_d, arguments); if (F_status_is_error(status)) { f_string_dynamic_resize(0, &argument); @@ -122,7 +122,7 @@ extern "C" { errno = 0; if (nice(*as.nice) == -1 && errno == -1) { - if (parameter && parameter->option & fl_execute_parameter_option_exit) { + if (parameter && parameter->option & FL_execute_parameter_option_exit_d) { exit(F_execute_nice); } @@ -135,7 +135,7 @@ extern "C" { const f_status_t status = f_capability_process_set(as.capability); if (F_status_is_error(status) && F_status_set_fine(status) != F_supported_not) { - if (parameter && parameter->option & fl_execute_parameter_option_exit) { + if (parameter && parameter->option & FL_execute_parameter_option_exit_d) { exit(F_execute_capability); } @@ -147,7 +147,7 @@ extern "C" { if (as.id_groups) { if (setgroups(as.id_groups->used, (const gid_t *) as.id_groups->array) == -1) { - if (parameter && parameter->option & fl_execute_parameter_option_exit) { + if (parameter && parameter->option & FL_execute_parameter_option_exit_d) { exit(F_execute_group); } @@ -158,7 +158,7 @@ extern "C" { if (as.id_group) { if (setgid(*as.id_group) == -1) { - if (parameter && parameter->option & fl_execute_parameter_option_exit) { + if (parameter && parameter->option & FL_execute_parameter_option_exit_d) { exit(F_execute_group); } @@ -169,7 +169,7 @@ extern "C" { if (as.id_user) { if (setuid(*as.id_user) == -1) { - if (parameter && parameter->option & fl_execute_parameter_option_exit) { + if (parameter && parameter->option & FL_execute_parameter_option_exit_d) { exit(F_execute_user); } @@ -282,7 +282,7 @@ extern "C" { { char string_result[2] = { '0', 0 }; - const f_file_t file = macro_f_file_t_initialize2(0, descriptors[1], f_file_flag_write_only); + const f_file_t file = macro_f_file_t_initialize2(0, descriptors[1], F_file_flag_write_only_d); f_string_static_t buffer = f_string_static_t_initialize; @@ -304,7 +304,7 @@ extern "C" { } } - if (parameter && parameter->option & fl_execute_parameter_option_return) { + if (parameter && parameter->option & FL_execute_parameter_option_return_d) { if (result != 0) { pid_t *r = (pid_t *) result; @@ -342,7 +342,7 @@ extern "C" { response.used = 0; response.size = 2; - const f_file_t file = macro_f_file_t_initialize(0, descriptors[0], f_file_flag_read_only, 1, 1); + const f_file_t file = macro_f_file_t_initialize(0, descriptors[0], F_file_flag_read_only_d, 1, 1); f_file_read_block(file, &response); @@ -354,7 +354,7 @@ extern "C" { *r = F_execute_failure; } - if (parameter && parameter->option & fl_execute_parameter_option_exit) { + if (parameter && parameter->option & FL_execute_parameter_option_exit_d) { exit(F_execute_failure); } @@ -367,7 +367,7 @@ extern "C" { f_signal_mask(SIG_BLOCK, ¶meter->signals->block, 0); f_signal_mask(SIG_UNBLOCK, ¶meter->signals->block_not, 0); #else // _di_pthread_support_ - if (parameter->option & fl_execute_parameter_option_threadsafe) { + if (parameter->option & FL_execute_parameter_option_threadsafe_d) { f_thread_signal_mask(SIG_BLOCK, ¶meter->signals->block, 0); f_thread_signal_mask(SIG_UNBLOCK, ¶meter->signals->block_not, 0); } @@ -428,7 +428,7 @@ extern "C" { *r = code; } - if (parameter && parameter->option & fl_execute_parameter_option_exit) { + if (parameter && parameter->option & FL_execute_parameter_option_exit_d) { exit(code); } @@ -462,7 +462,7 @@ extern "C" { { char string_result[2] = { '0', 0 }; - const f_file_t file = macro_f_file_t_initialize2(0, descriptors[1], f_file_flag_write_only); + const f_file_t file = macro_f_file_t_initialize2(0, descriptors[1], F_file_flag_write_only_d); f_status_t status = F_none; @@ -495,7 +495,7 @@ extern "C" { } } - if (parameter && parameter->option & fl_execute_parameter_option_return) { + if (parameter && parameter->option & FL_execute_parameter_option_return_d) { if (result != 0) { pid_t *r = (pid_t *) result; @@ -533,7 +533,7 @@ extern "C" { response.used = 0; response.size = 2; - const f_file_t file = macro_f_file_t_initialize(0, descriptors[0], f_file_flag_read_only, 1, 1); + const f_file_t file = macro_f_file_t_initialize(0, descriptors[0], F_file_flag_read_only_d, 1, 1); f_file_read_block(file, &response); @@ -545,7 +545,7 @@ extern "C" { *r = F_status_set_error(F_failure); } - if (parameter && parameter->option & fl_execute_parameter_option_exit) { + if (parameter && parameter->option & FL_execute_parameter_option_exit_d) { exit(-1); } @@ -558,7 +558,7 @@ extern "C" { f_signal_mask(SIG_BLOCK, ¶meter->signals->block, 0); f_signal_mask(SIG_UNBLOCK, ¶meter->signals->block_not, 0); #else // _di_pthread_support_ - if (parameter->option & fl_execute_parameter_option_threadsafe) { + if (parameter->option & FL_execute_parameter_option_threadsafe_d) { f_thread_signal_mask(SIG_BLOCK, ¶meter->signals->block, 0); f_thread_signal_mask(SIG_UNBLOCK, ¶meter->signals->block_not, 0); } @@ -577,7 +577,7 @@ extern "C" { } // for } - dup2(descriptors[0], f_type_descriptor_input); + dup2(descriptors[0], F_type_descriptor_input_d); if (as) { const f_status_t status = private_fll_execute_as_child(*as, parameter, (int *) result); @@ -620,7 +620,7 @@ extern "C" { *r = code; } - if (parameter && parameter->option & fl_execute_parameter_option_exit) { + if (parameter && parameter->option & FL_execute_parameter_option_exit_d) { exit(code); } diff --git a/level_2/fll_execute/c/private-execute.h b/level_2/fll_execute/c/private-execute.h index f0bf921..09d6df1 100644 --- a/level_2/fll_execute/c/private-execute.h +++ b/level_2/fll_execute/c/private-execute.h @@ -45,7 +45,7 @@ extern "C" { * @see fll_execute_arguments_dynamic_add_set() */ #if !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_) || !defined(_di_fll_execute_arguments_dynamic_add_) || !defined(_di_fll_execute_arguments_dynamic_add_set_) - extern f_status_t private_fll_execute_arguments_add(const f_string_t source, const f_array_length_t length, f_string_dynamics_t *arguments) f_attribute_visibility_internal; + extern f_status_t private_fll_execute_arguments_add(const f_string_t source, const f_array_length_t length, f_string_dynamics_t *arguments) F_attribute_visibility_internal_d; #endif // !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_) || !defined(_di_fll_execute_arguments_dynamic_add_) || !defined(_di_fll_execute_arguments_dynamic_add_set_) /** @@ -86,7 +86,7 @@ extern "C" { * @see fll_execute_arguments_dynamic_add_parameter_set() */ #if !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_set_) - extern f_status_t private_fll_execute_arguments_add_parameter(const f_string_t prefix, const f_array_length_t prefix_length, const f_string_t name, const f_array_length_t name_length, const f_string_t value, const f_array_length_t value_length, f_string_dynamics_t *arguments) f_attribute_visibility_internal; + extern f_status_t private_fll_execute_arguments_add_parameter(const f_string_t prefix, const f_array_length_t prefix_length, const f_string_t name, const f_array_length_t name_length, const f_string_t value, const f_array_length_t value_length, f_string_dynamics_t *arguments) F_attribute_visibility_internal_d; #endif // !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_set_) /** @@ -100,7 +100,7 @@ extern "C" { * (optional) This and most of its fields are optional and are disabled when set to 0. * This function only cares about "option" on this structure. * option: - * A bitwise set of options, such as: fl_execute_parameter_option_exit, and fl_execute_parameter_option_path. + * A bitwise set of options, such as: FL_execute_parameter_option_exit_d, and FL_execute_parameter_option_path_d. * @param result * The code returned after finishing execution of program. * @@ -125,7 +125,7 @@ extern "C" { * @see fll_execute_program() */ #if !defined(_di_fll_execute_program_) - extern f_status_t private_fll_execute_as_child(const fl_execute_as_t as, fl_execute_parameter_t * const parameter, int *result) f_attribute_visibility_internal; + extern f_status_t private_fll_execute_as_child(const fl_execute_as_t as, fl_execute_parameter_t * const parameter, int *result) F_attribute_visibility_internal_d; #endif // !defined(_di_fll_execute_program_) /** @@ -141,7 +141,7 @@ extern "C" { * (optional) This and most of its fields are optional and are disabled when set to 0. * This function only cares about "option" on this structure. * option: - * A bitwise set of options, such as: fl_execute_parameter_option_exit, and fl_execute_parameter_option_path. + * A bitwise set of options, such as: FL_execute_parameter_option_exit_d, and FL_execute_parameter_option_path_d. * @param result * A NULL termianted 2-byte string array where the first character represents the return code ('0' for success, '1' for failure). * @@ -167,7 +167,7 @@ extern "C" { * @see fll_execute_program() */ #if !defined(_di_fll_execute_program_) - extern f_status_t private_fll_execute_as_parent(const fl_execute_as_t as, const pid_t id_child, fl_execute_parameter_t * const parameter, char *result) f_attribute_visibility_internal; + extern f_status_t private_fll_execute_as_parent(const fl_execute_as_t as, const pid_t id_child, fl_execute_parameter_t * const parameter, char *result) F_attribute_visibility_internal_d; #endif // !defined(_di_fll_execute_program_) /** @@ -185,7 +185,7 @@ extern "C" { * @param parameter * (optional) This and most of its fields are optional and are disabled when set to 0. * option: - * A bitwise set of options, such as: fl_execute_parameter_option_exit, and fl_execute_parameter_option_path. + * A bitwise set of options, such as: FL_execute_parameter_option_exit_d, and FL_execute_parameter_option_path_d. * names: * An array of strings representing the environment variable names. * At most names.used variables are created. @@ -204,14 +204,14 @@ extern "C" { * (optional) This and most of its fields are optional and are disabled when set to NULL. * @param result * (optional) The execute status code returned after finishing or attempting to finish execution of program. - * When fl_execute_parameter_option_return is passed via parameter.option, then this instead stores the child process id (PID). - * This is should be of (int *) except when fl_execute_parameter_option_return this should instead be (pid_t *). + * When FL_execute_parameter_option_return_d is passed via parameter.option, then this instead stores the child process id (PID). + * This is should be of (int *) except when FL_execute_parameter_option_return_d this should instead be (pid_t *). * Set to NULL to not use. * * @return * F_none on success. * F_child on success and this is the child thread. - * F_parent on success and this is the parent thread (only happens when fl_execute_parameter_option_return is passed). + * F_parent on success and this is the parent thread (only happens when FL_execute_parameter_option_return_d is passed). * * F_capability (with error bit) on failure to set capabilities in the child (only the child process returns this). * F_control_group (with error bit) on failure to set control group in the child (only the parent process returns this). @@ -243,7 +243,7 @@ extern "C" { * @see fll_execute_program() */ #if !defined(_di_fll_execute_program_) - extern f_status_t private_fll_execute_fork(const bool direct, const f_string_t program, const f_string_t fixed_arguments[], fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void *result) f_attribute_visibility_internal; + extern f_status_t private_fll_execute_fork(const bool direct, const f_string_t program, const f_string_t fixed_arguments[], fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void *result) F_attribute_visibility_internal_d; #endif // !defined(_di_fll_execute_program_) /** @@ -261,7 +261,7 @@ extern "C" { * @param parameter * (optional) This and most of its fields are optional and are disabled when set to 0. * option: - * A bitwise set of options, such as: fl_execute_parameter_option_exit, and fl_execute_parameter_option_path. + * A bitwise set of options, such as: FL_execute_parameter_option_exit_d, and FL_execute_parameter_option_path_d. * names: * An array of strings representing the environment variable names. * At most names.used variables are created. @@ -280,14 +280,14 @@ extern "C" { * (optional) This and most of its fields are optional and are disabled when set to NULL. * @param result * (optional) The execute status code returned after finishing or attempting to finish execution of program. - * When fl_execute_parameter_option_return is passed via parameter.option, then this instead stores the child process id (PID). - * This is should be of (int *) except when fl_execute_parameter_option_return this should instead be (pid_t *). + * When FL_execute_parameter_option_return_d is passed via parameter.option, then this instead stores the child process id (PID). + * This is should be of (int *) except when FL_execute_parameter_option_return_d this should instead be (pid_t *). * Set to NULL to not use. * * @return * F_none on success. * F_child on success and this is the child thread. - * F_parent on success and this is the parent thread (only happens when fl_execute_parameter_option_return is passed). + * F_parent on success and this is the parent thread (only happens when FL_execute_parameter_option_return_d is passed). * * F_capability (with error bit) on failure to set capabilities in the child (only the child process returns this). * F_control_group (with error bit) on failure to set control group in the child (only the parent process returns this). @@ -318,7 +318,7 @@ extern "C" { * @see fll_execute_program() */ #if !defined(_di_fll_execute_program_) - extern f_status_t private_fll_execute_fork_data(const bool direct, const f_string_t program, const f_string_t fixed_arguments[], fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void *result) f_attribute_visibility_internal; + extern f_status_t private_fll_execute_fork_data(const bool direct, const f_string_t program, const f_string_t fixed_arguments[], fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void *result) F_attribute_visibility_internal_d; #endif // !defined(_di_fll_execute_program_) /** @@ -347,7 +347,7 @@ extern "C" { * @see fll_execute_program() */ #if !defined(_di_fll_execute_program_) - extern void private_fll_execute_path_arguments_fixate(const f_string_t program_path, const f_string_statics_t arguments, const f_string_t last_slash, const bool fixated_is, const f_array_length_t name_size, char program_name[], f_string_t fixed_arguments[]) f_attribute_visibility_internal; + extern void private_fll_execute_path_arguments_fixate(const f_string_t program_path, const f_string_statics_t arguments, const f_string_t last_slash, const bool fixated_is, const f_array_length_t name_size, char program_name[], f_string_t fixed_arguments[]) F_attribute_visibility_internal_d; #endif // !defined(_di_fll_execute_program_) #ifdef __cplusplus diff --git a/level_2/fll_file/c/file.c b/level_2/fll_file/c/file.c index b3e5bed..aa4d416 100644 --- a/level_2/fll_file/c/file.c +++ b/level_2/fll_file/c/file.c @@ -32,7 +32,7 @@ extern "C" { return status; } - status = f_file_is(source, f_file_type_directory, F_false); + status = f_file_is(source, F_file_type_directory_d, F_false); if (status == F_file_found_not) { return F_status_set_error(status); diff --git a/level_2/fll_file/c/private-file.c b/level_2/fll_file/c/private-file.c index 820f6a6..7e77cab 100644 --- a/level_2/fll_file/c/private-file.c +++ b/level_2/fll_file/c/private-file.c @@ -28,7 +28,7 @@ extern "C" { status = F_none; - const f_array_length_t path_length = strnlen(path, f_path_length_max); + const f_array_length_t path_length = strnlen(path, F_path_length_max_d); { f_string_dynamics_t * const list[] = { @@ -126,7 +126,7 @@ extern "C" { status = F_none; - const f_array_length_t path_length = strnlen(path, f_path_length_max); + const f_array_length_t path_length = strnlen(path, F_path_length_max_d); { f_string_dynamics_t * const list[] = { diff --git a/level_2/fll_file/c/private-file.h b/level_2/fll_file/c/private-file.h index abefd0a..c0ba776 100644 --- a/level_2/fll_file/c/private-file.h +++ b/level_2/fll_file/c/private-file.h @@ -46,7 +46,7 @@ extern "C" { * F_failure (with error bit) for any other error. */ #if !defined(_di_fll_file_mode_set_all_) - extern f_status_t private_fll_file_mode_set_all(const f_string_t path, const mode_t mode, const f_number_unsigned_t depth_max, const f_number_unsigned_t depth) f_attribute_visibility_internal; + extern f_status_t private_fll_file_mode_set_all(const f_string_t path, const mode_t mode, const f_number_unsigned_t depth_max, const f_number_unsigned_t depth) F_attribute_visibility_internal_d; #endif // !defined(_di_fll_file_mode_set_all_) /** @@ -86,7 +86,7 @@ extern "C" { * F_failure (with error bit) for any other error. */ #if !defined(_di_fll_file_role_change_all_) - extern f_status_t private_fll_file_role_change_all(const f_string_t path, const uid_t uid, const gid_t gid, const bool dereference, const f_number_unsigned_t depth_max, const f_number_unsigned_t depth) f_attribute_visibility_internal; + extern f_status_t private_fll_file_role_change_all(const f_string_t path, const uid_t uid, const gid_t gid, const bool dereference, const f_number_unsigned_t depth_max, const f_number_unsigned_t depth) F_attribute_visibility_internal_d; #endif // !defined(_di_fll_file_role_change_all_) #ifdef __cplusplus diff --git a/level_2/fll_fss/c/fss.c b/level_2/fll_fss/c/fss.c index ca483e3..3c27a27 100644 --- a/level_2/fll_fss/c/fss.c +++ b/level_2/fll_fss/c/fss.c @@ -120,7 +120,7 @@ extern "C" { do { if (ids && ids->used + 1 > ids->size) { - status = f_type_fll_ids_increase(f_fss_default_allocation_step_small, ids); + status = f_type_fll_ids_increase(F_fss_default_allocation_step_small_d, ids); } if (F_status_is_error_not(status)) { @@ -149,7 +149,7 @@ extern "C" { } if (ids) { - status = f_type_fll_ids_increase(f_fss_default_allocation_step_small, ids); + status = f_type_fll_ids_increase(F_fss_default_allocation_step_small_d, ids); if (F_status_is_error(status)) { if (ids) { @@ -281,7 +281,7 @@ extern "C" { } if (values[j]->used + contents.array[i].used > values[j]->size) { - if (values[j]->used + contents.array[i].used > f_array_length_t_size) { + if (values[j]->used + contents.array[i].used > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -390,8 +390,8 @@ extern "C" { } if (values[j]->used == values[j]->size) { - if (values[j]->used + f_fss_default_allocation_step > f_array_length_t_size) { - if (values[j]->used == f_array_length_t_size) { + if (values[j]->used + F_fss_default_allocation_step_d > F_array_length_t_size_d) { + if (values[j]->used == F_array_length_t_size_d) { macro_f_string_dynamic_t_delete_simple(name); return F_status_set_error(F_array_too_large); @@ -411,7 +411,7 @@ extern "C" { } } else { - macro_f_string_maps_t_resize(status, (*values[j]), values[j]->used + f_fss_default_allocation_step); + macro_f_string_maps_t_resize(status, (*values[j]), values[j]->used + F_fss_default_allocation_step_d); if (F_status_is_error(status)) { macro_f_string_dynamic_t_delete_simple(name); @@ -420,7 +420,7 @@ extern "C" { } if (indexs) { - macro_f_array_lengths_t_resize(status, (*indexs[j]), indexs[j]->used + f_fss_default_allocation_step); + macro_f_array_lengths_t_resize(status, (*indexs[j]), indexs[j]->used + F_fss_default_allocation_step_d); if (F_status_is_error(status)) return status; } } @@ -496,11 +496,11 @@ extern "C" { matches[j] = F_true; } - status = f_string_map_multis_increase(f_fss_default_allocation_step_small, values[j]); + status = f_string_map_multis_increase(F_fss_default_allocation_step_small_d, values[j]); if (F_status_is_error(status)) return status; if (indexs) { - macro_f_array_lengths_t_increase(status, f_fss_default_allocation_step_small, (*indexs[j])); + macro_f_array_lengths_t_increase(status, F_fss_default_allocation_step_small_d, (*indexs[j])); if (F_status_is_error(status)) return status; } @@ -573,11 +573,11 @@ extern "C" { matches[j] = F_true; } - status = f_string_maps_increase(f_fss_default_allocation_step_small, values[j]); + status = f_string_maps_increase(F_fss_default_allocation_step_small_d, values[j]); if (F_status_is_error(status)) return status; if (indexs) { - macro_f_array_lengths_t_increase(status, f_fss_default_allocation_step_small, (*indexs[j])); + macro_f_array_lengths_t_increase(status, F_fss_default_allocation_step_small_d, (*indexs[j])); if (F_status_is_error(status)) return status; } @@ -683,11 +683,11 @@ extern "C" { map_multi = &values[j]->array[k]; } else { - status = f_string_map_multis_increase(f_fss_default_allocation_step_small, values[j]); + status = f_string_map_multis_increase(F_fss_default_allocation_step_small_d, values[j]); if (F_status_is_error(status)) return status; if (indexs) { - macro_f_array_lengths_t_increase(status, f_fss_default_allocation_step_small, (*indexs[j])); + macro_f_array_lengths_t_increase(status, F_fss_default_allocation_step_small_d, (*indexs[j])); if (F_status_is_error(status)) return status; } @@ -708,7 +708,7 @@ extern "C" { if (contents.array[i].used == 1) continue; } - status = f_string_dynamics_increase(f_fss_default_allocation_step_small, &map_multi->value); + status = f_string_dynamics_increase(F_fss_default_allocation_step_small_d, &map_multi->value); if (F_status_is_error(status)) return status; for (k = 1; k < contents.array[i].used; ++k) { @@ -803,11 +803,11 @@ extern "C" { map = &values[j]->array[k]; } else { - status = f_string_maps_increase(f_fss_default_allocation_step_small, values[j]); + status = f_string_maps_increase(F_fss_default_allocation_step_small_d, values[j]); if (F_status_is_error(status)) return status; if (indexs) { - macro_f_array_lengths_t_increase(status, f_fss_default_allocation_step_small, (*indexs[j])); + macro_f_array_lengths_t_increase(status, F_fss_default_allocation_step_small_d, (*indexs[j])); if (F_status_is_error(status)) return status; } @@ -937,11 +937,11 @@ extern "C" { matches[j] = F_true; } - status = f_string_dynamics_increase(f_fss_default_allocation_step_small, values[j]); + status = f_string_dynamics_increase(F_fss_default_allocation_step_small_d, values[j]); if (F_status_is_error(status)) return status; if (indexs) { - macro_f_array_lengths_t_increase(status, f_fss_default_allocation_step_small, (*indexs[j])); + macro_f_array_lengths_t_increase(status, F_fss_default_allocation_step_small_d, (*indexs[j])); if (F_status_is_error(status)) return status; } diff --git a/level_2/fll_fss/c/fss_basic.c b/level_2/fll_fss/c/fss_basic.c index abce4ed..5fa5d56 100644 --- a/level_2/fll_fss/c/fss_basic.c +++ b/level_2/fll_fss/c/fss_basic.c @@ -23,14 +23,14 @@ extern "C" { do { if (objects->used == objects->size) { - macro_f_fss_objects_t_increase(status2, f_fss_default_allocation_step_small, (*objects)) + macro_f_fss_objects_t_increase(status2, F_fss_default_allocation_step_small_d, (*objects)) if (F_status_is_error(status2)) return status2; - macro_f_fss_contents_t_increase(status2, f_fss_default_allocation_step_small, (*contents)) + macro_f_fss_contents_t_increase(status2, F_fss_default_allocation_step_small_d, (*contents)) if (F_status_is_error(status2)) return status2; if (objects_quoted) { - macro_f_fss_quotes_t_increase(status2, f_fss_default_allocation_step_small, (*objects_quoted)) + macro_f_fss_quotes_t_increase(status2, F_fss_default_allocation_step_small_d, (*objects_quoted)) if (F_status_is_error(status2)) return status2; } } @@ -51,7 +51,7 @@ extern "C" { ++objects_quoted->used; } - macro_f_fss_content_t_increase(status2, f_fss_default_allocation_step_small, contents->array[contents->used]) + macro_f_fss_content_t_increase(status2, F_fss_default_allocation_step_small_d, contents->array[contents->used]) if (F_status_is_error(status2)) return status2; ++contents->used; @@ -86,7 +86,7 @@ extern "C" { else if (status == FL_fss_found_object_content_not) { found_data = F_true; - macro_f_fss_content_t_increase(status2, f_fss_default_allocation_step_small, contents->array[contents->used]) + macro_f_fss_content_t_increase(status2, F_fss_default_allocation_step_small_d, contents->array[contents->used]) if (F_status_is_error(status2)) return status2; break; @@ -147,7 +147,7 @@ extern "C" { ++objects_quoted->used; } - } while (range->start < f_string_t_size); + } while (range->start < F_string_t_size_d); return F_status_is_error(F_number_overflow); } @@ -177,7 +177,7 @@ extern "C" { if (F_status_is_error(status)) return status; } else { - status = f_string_dynamic_increase(f_fss_default_allocation_step_small, destination); + status = f_string_dynamic_increase(F_fss_default_allocation_step_small_d, destination); if (F_status_is_error(status)) return status; destination->string[destination->used++] = f_string_eol_s[0]; diff --git a/level_2/fll_fss/c/fss_basic_list.c b/level_2/fll_fss/c/fss_basic_list.c index 966b8fe..a6b8af3 100644 --- a/level_2/fll_fss/c/fss_basic_list.c +++ b/level_2/fll_fss/c/fss_basic_list.c @@ -21,10 +21,10 @@ extern "C" { do { if (objects->used == objects->size) { - macro_f_fss_objects_t_resize(status2, (*objects), objects->used + f_fss_default_allocation_step); + macro_f_fss_objects_t_resize(status2, (*objects), objects->used + F_fss_default_allocation_step_d); if (F_status_is_error(status)) return status; - macro_f_fss_contents_t_resize(status2, (*contents), contents->used + f_fss_default_allocation_step); + macro_f_fss_contents_t_resize(status2, (*contents), contents->used + F_fss_default_allocation_step_d); if (F_status_is_error(status)) return status; } @@ -36,7 +36,7 @@ extern "C" { if (status == FL_fss_found_object || status == FL_fss_found_object_content_not) { ++objects->used; - macro_f_fss_content_t_increase(status2, f_fss_default_allocation_step_small, contents->array[contents->used]) + macro_f_fss_content_t_increase(status2, F_fss_default_allocation_step_small_d, contents->array[contents->used]) if (F_status_is_error(status2)) return status2; ++contents->used; @@ -71,7 +71,7 @@ extern "C" { else if (status == FL_fss_found_object_content_not) { found_data = F_true; - macro_f_fss_content_t_increase(status2, f_fss_default_allocation_step_small, contents->array[contents->used]) + macro_f_fss_content_t_increase(status2, F_fss_default_allocation_step_small_d, contents->array[contents->used]) if (F_status_is_error(status2)) return status2; break; @@ -121,7 +121,7 @@ extern "C" { ++objects->used; ++contents->used; - } while (range->start < f_string_t_size); + } while (range->start < F_string_t_size_d); return F_status_is_error(F_number_overflow); } diff --git a/level_2/fll_fss/c/fss_embedded_list.c b/level_2/fll_fss/c/fss_embedded_list.c index bbd2fc5..e5922ec 100644 --- a/level_2/fll_fss/c/fss_embedded_list.c +++ b/level_2/fll_fss/c/fss_embedded_list.c @@ -20,7 +20,7 @@ extern "C" { bool found_data = F_false; if (!nest->used) { - macro_f_fss_nest_t_resize(status2, (*nest), f_fss_default_allocation_step); + macro_f_fss_nest_t_resize(status2, (*nest), F_fss_default_allocation_step_d); if (F_status_is_error(status2)) return status2; } else { @@ -30,7 +30,7 @@ extern "C" { do { do { if (nest->depth[0].used == nest->depth[0].size) { - macro_f_fss_items_t_resize(status2, nest->depth[0], nest->depth[0].used + f_fss_default_allocation_step); + macro_f_fss_items_t_resize(status2, nest->depth[0], nest->depth[0].used + F_fss_default_allocation_step_d); if (F_status_is_error(status)) return status; } @@ -119,7 +119,7 @@ extern "C" { return F_none_stop; } - } while (range->start < f_string_t_size); + } while (range->start < F_string_t_size_d); return F_status_is_error(F_number_overflow); } diff --git a/level_2/fll_fss/c/fss_extended.c b/level_2/fll_fss/c/fss_extended.c index 7909de0..69ed891 100644 --- a/level_2/fll_fss/c/fss_extended.c +++ b/level_2/fll_fss/c/fss_extended.c @@ -24,19 +24,19 @@ extern "C" { do { if (objects->used == objects->size) { - macro_f_fss_objects_t_increase(status2, f_fss_default_allocation_step_small, (*objects)); + macro_f_fss_objects_t_increase(status2, F_fss_default_allocation_step_small_d, (*objects)); if (F_status_is_error(status2)) return status2; - macro_f_fss_contents_t_increase(status2, f_fss_default_allocation_step_small, (*contents)); + macro_f_fss_contents_t_increase(status2, F_fss_default_allocation_step_small_d, (*contents)); if (F_status_is_error(status2)) return status2; if (objects_quoted) { - macro_f_fss_quotes_t_increase(status2, f_fss_default_allocation_step_small, (*objects_quoted)); + macro_f_fss_quotes_t_increase(status2, F_fss_default_allocation_step_small_d, (*objects_quoted)); if (F_status_is_error(status2)) return status2; } if (contents_quoted) { - macro_f_fss_quotess_t_increase(status2, f_fss_default_allocation_step_small, (*contents_quoted)); + macro_f_fss_quotess_t_increase(status2, F_fss_default_allocation_step_small_d, (*contents_quoted)); if (F_status_is_error(status2)) return status2; } } @@ -57,13 +57,13 @@ extern "C" { ++objects_quoted->used; } - macro_f_fss_content_t_increase(status2, f_fss_default_allocation_step_small, contents->array[contents->used]) + macro_f_fss_content_t_increase(status2, F_fss_default_allocation_step_small_d, contents->array[contents->used]) if (F_status_is_error(status2)) return status2; ++contents->used; if (contents_quoted) { - macro_f_fss_quotes_t_increase(status2, f_fss_default_allocation_step_small, contents_quoted->array[contents_quoted->used]) + macro_f_fss_quotes_t_increase(status2, F_fss_default_allocation_step_small_d, contents_quoted->array[contents_quoted->used]) if (F_status_is_error(status2)) return status2; ++contents_quoted->used; @@ -91,7 +91,7 @@ extern "C" { found_data = F_true; if (contents_quoted) { - macro_f_fss_quotes_t_increase(status2, f_fss_default_allocation_step_small, contents_quoted->array[contents_quoted->used]) + macro_f_fss_quotes_t_increase(status2, F_fss_default_allocation_step_small_d, contents_quoted->array[contents_quoted->used]) if (F_status_is_error(status2)) return status2; quoted_content = &contents_quoted->array[contents_quoted->used]; @@ -186,7 +186,7 @@ extern "C" { ++contents_quoted->used; } - } while (range->start < f_string_t_size); + } while (range->start < F_string_t_size_d); return F_status_is_error(F_number_overflow); } diff --git a/level_2/fll_fss/c/fss_extended_list.c b/level_2/fll_fss/c/fss_extended_list.c index 2e0313a..abb13c5 100644 --- a/level_2/fll_fss/c/fss_extended_list.c +++ b/level_2/fll_fss/c/fss_extended_list.c @@ -21,10 +21,10 @@ extern "C" { do { if (objects->used == objects->size) { - macro_f_fss_objects_t_resize(status2, (*objects), objects->used + f_fss_default_allocation_step); + macro_f_fss_objects_t_resize(status2, (*objects), objects->used + F_fss_default_allocation_step_d); if (F_status_is_error(status)) return status; - macro_f_fss_contents_t_resize(status2, (*contents), contents->used + f_fss_default_allocation_step); + macro_f_fss_contents_t_resize(status2, (*contents), contents->used + F_fss_default_allocation_step_d); if (F_status_is_error(status)) return status; } @@ -36,7 +36,7 @@ extern "C" { if (status == FL_fss_found_object || status == FL_fss_found_object_content_not) { ++objects->used; - macro_f_fss_content_t_increase(status2, f_fss_default_allocation_step_small, contents->array[contents->used]) + macro_f_fss_content_t_increase(status2, F_fss_default_allocation_step_small_d, contents->array[contents->used]) if (F_status_is_error(status2)) return status2; ++contents->used; @@ -71,7 +71,7 @@ extern "C" { else if (status == FL_fss_found_object_content_not) { found_data = F_true; - macro_f_fss_content_t_increase(status2, f_fss_default_allocation_step_small, contents->array[contents->used]) + macro_f_fss_content_t_increase(status2, F_fss_default_allocation_step_small_d, contents->array[contents->used]) if (F_status_is_error(status2)) return status2; break; @@ -121,7 +121,7 @@ extern "C" { ++objects->used; ++contents->used; - } while (range->start < f_string_t_size); + } while (range->start < F_string_t_size_d); return F_status_is_error(F_number_overflow); } diff --git a/level_2/fll_fss/c/fss_status.c b/level_2/fll_fss/c/fss_status.c index 81b7a11..77b848a 100644 --- a/level_2/fll_fss/c/fss_status.c +++ b/level_2/fll_fss/c/fss_status.c @@ -29,13 +29,13 @@ extern "C" { } #ifndef _di_fll_fss_status_error_ - if (fl_string_compare(string, fll_fss_status_string_format, length, fll_fss_status_string_format_length) == F_equal_to) { + if (fl_string_compare(string, FLL_fss_status_format_s, length, FLL_fss_status_format_s_length) == F_equal_to) { *code = FL_fss_format; return F_none; } - if (fl_string_compare(string, fll_fss_status_string_format_eos, length, fll_fss_status_string_format_eos_length) == F_equal_to) { + if (fl_string_compare(string, FLL_fss_status_format_eos_s, length, FLL_fss_status_format_eos_s_length) == F_equal_to) { *code = FL_fss_format_eos; return F_none; @@ -43,13 +43,13 @@ extern "C" { #endif // _di_fll_fss_status_error_ #ifndef _di_fll_fss_status_warning_ - if (fl_string_compare(string, fll_fss_status_string_accepted_invalid, length, fll_fss_status_string_accepted_invalid_length) == F_equal_to) { + if (fl_string_compare(string, FLL_fss_status_accepted_invalid_s, length, FLL_fss_status_accepted_invalid_s_length) == F_equal_to) { *code = FL_fss_accepted_invalid; return F_none; } - if (fl_string_compare(string, fll_fss_status_string_accepted_invalid_eos, length, fll_fss_status_string_accepted_invalid_eos_length) == F_equal_to) { + if (fl_string_compare(string, FLL_fss_status_accepted_invalid_eos_s, length, FLL_fss_status_accepted_invalid_eos_s_length) == F_equal_to) { *code = FL_fss_accepted_invalid_eos; return F_none; @@ -57,31 +57,31 @@ extern "C" { #endif // _di_fll_fss_status_warning_ #ifndef _di_fll_fss_status_success_ - if (fl_string_compare(string, fll_fss_status_string_found_object, length, fll_fss_status_string_found_object_length) == F_equal_to) { + if (fl_string_compare(string, FLL_fss_status_found_object_s, length, FLL_fss_status_found_object_s_length) == F_equal_to) { *code = FL_fss_found_object; return F_none; } - if (fl_string_compare(string, fll_fss_status_string_found_content, length, fll_fss_status_string_found_content_length) == F_equal_to) { + if (fl_string_compare(string, FLL_fss_status_found_content_s, length, FLL_fss_status_found_content_s_length) == F_equal_to) { *code = FL_fss_found_content; return F_none; } - if (fl_string_compare(string, fll_fss_status_string_found_object_not, length, fll_fss_status_string_found_object_not_length) == F_equal_to) { + if (fl_string_compare(string, FLL_fss_status_found_object_not_s, length, FLL_fss_status_found_object_not_s_length) == F_equal_to) { *code = FL_fss_found_object_not; return F_none; } - if (fl_string_compare(string, fll_fss_status_string_found_content_not, length, fll_fss_status_string_found_content_not_length) == F_equal_to) { + if (fl_string_compare(string, FLL_fss_status_found_content_not_s, length, FLL_fss_status_found_content_not_s_length) == F_equal_to) { *code = FL_fss_found_content_not; return F_none; } - if (fl_string_compare(string, fll_fss_status_string_found_object_content_not, length, fll_fss_status_string_found_object_content_not_length) == F_equal_to) { + if (fl_string_compare(string, FLL_fss_status_found_object_content_not_s, length, FLL_fss_status_found_object_content_not_s_length) == F_equal_to) { *code = FL_fss_found_object_content_not; return F_none; @@ -89,20 +89,20 @@ extern "C" { #endif // _di_fll_fss_status_success_ #ifndef _di_fll_fss_status_codes_ - if (fl_string_compare(string, fll_fss_status_string_found_comment, length, fll_fss_status_string_found_comment_length) == F_equal_to) { + if (fl_string_compare(string, FLL_fss_status_found_comment_s, length, FLL_fss_status_found_comment_length_s) == F_equal_to) { *code = FL_fss_found_object; return F_none; } #endif // _di_fll_fss_status_codes_ - if (fl_string_compare(string, fll_fss_status_string_status_code_first, length, fll_fss_status_string_status_code_first_length) == F_equal_to) { + if (fl_string_compare(string, FLL_fss_status_status_code_first_s, length, FLL_fss_status_status_code_first_s_length) == F_equal_to) { *code = FL_fss_status_code_first; return F_none; } - if (fl_string_compare(string, fll_fss_status_string_status_code_last, length, fll_fss_status_string_status_code_last_length) == F_equal_to) { + if (fl_string_compare(string, FLL_fss_status_status_code_last_s, length, FLL_fss_status_status_code_last_s_length) == F_equal_to) { *code = FL_fss_status_code_last; return F_none; @@ -123,52 +123,52 @@ extern "C" { switch (unmasked_code) { #ifndef _di_fll_fss_status_error_ case FL_fss_format: - *string = fll_fss_status_string_format; + *string = FLL_fss_status_format_s; break; case FL_fss_format_eos: - *string = fll_fss_status_string_format_eos; + *string = FLL_fss_status_format_eos_s; break; #endif // _di_fll_fss_status_error_ #ifndef _di_fll_fss_status_warning_ case FL_fss_accepted_invalid: - *string = fll_fss_status_string_accepted_invalid; + *string = FLL_fss_status_accepted_invalid_s; break; case FL_fss_accepted_invalid_eos: - *string = fll_fss_status_string_accepted_invalid_eos; + *string = FLL_fss_status_accepted_invalid_eos_s; break; #endif // _di_fll_fss_status_warning_ #ifndef _di_fll_fss_status_success_ case FL_fss_found_object: - *string = fll_fss_status_string_found_object; + *string = FLL_fss_status_found_object_s; break; case FL_fss_found_content: - *string = fll_fss_status_string_found_content; + *string = FLL_fss_status_found_content_s; break; case FL_fss_found_object_not: - *string = fll_fss_status_string_found_object_not; + *string = FLL_fss_status_found_object_not_s; break; case FL_fss_found_content_not: - *string = fll_fss_status_string_found_content_not; + *string = FLL_fss_status_found_content_not_s; break; case FL_fss_found_object_content_not: - *string = fll_fss_status_string_found_object_content_not; + *string = FLL_fss_status_found_object_content_not_s; break; #endif // _di_fll_fss_status_success_ #ifndef _di_fll_fss_status_codes_ case FL_fss_found_comment: - *string = fll_fss_status_string_found_comment; + *string = FLL_fss_status_found_comment_s; break; #endif // _di_fll_fss_status_codes_ case FL_fss_status_code_first: - *string = fll_fss_status_string_status_code_first; + *string = FLL_fss_status_status_code_first_s; break; case FL_fss_status_code_last: - *string = fll_fss_status_string_status_code_last; + *string = FLL_fss_status_status_code_last_s; break; default: diff --git a/level_2/fll_fss/c/fss_status.h b/level_2/fll_fss/c/fss_status.h index c2becf3..6e196c4 100644 --- a/level_2/fll_fss/c/fss_status.h +++ b/level_2/fll_fss/c/fss_status.h @@ -31,48 +31,48 @@ extern "C" { #ifndef _di_fll_fss_status_string_ #ifndef _di_fll_fss_status_error_ - #define fll_fss_status_string_format "FL_fss_format" - #define fll_fss_status_string_format_length 13 + #define FLL_fss_status_format_s "FL_fss_format" + #define FLL_fss_status_format_s_length 13 - #define fll_fss_status_string_format_eos "FL_fss_format_eos" - #define fll_fss_status_string_format_eos_length 17 + #define FLL_fss_status_format_eos_s "FL_fss_format_eos" + #define FLL_fss_status_format_eos_s_length 17 #endif // _di_fll_fss_status_error_ #ifndef _di_fll_fss_status_warning_ - #define fll_fss_status_string_accepted_invalid "FL_fss_accepted_invalid" - #define fll_fss_status_string_accepted_invalid_length 23 + #define FLL_fss_status_accepted_invalid_s "FL_fss_accepted_invalid" + #define FLL_fss_status_accepted_invalid_s_length 23 - #define fll_fss_status_string_accepted_invalid_eos "FL_fss_accepted_invalid_eos" - #define fll_fss_status_string_accepted_invalid_eos_length 27 + #define FLL_fss_status_accepted_invalid_eos_s "FL_fss_accepted_invalid_eos" + #define FLL_fss_status_accepted_invalid_eos_s_length 27 #endif // _di_fll_fss_status_warning_ #ifndef _di_fll_fss_status_success_ - #define fll_fss_status_string_found_object "FL_fss_found_object" - #define fll_fss_status_string_found_object_length 19 + #define FLL_fss_status_found_object_s "FL_fss_found_object" + #define FLL_fss_status_found_object_s_length 19 - #define fll_fss_status_string_found_content "FL_fss_found_content" - #define fll_fss_status_string_found_content_length 20 + #define FLL_fss_status_found_content_s "FL_fss_found_content" + #define FLL_fss_status_found_content_s_length 20 - #define fll_fss_status_string_found_object_not "FL_fss_found_object_not" - #define fll_fss_status_string_found_object_not_length 23 + #define FLL_fss_status_found_object_not_s "FL_fss_found_object_not" + #define FLL_fss_status_found_object_not_s_length 23 - #define fll_fss_status_string_found_content_not "FL_fss_found_content_not" - #define fll_fss_status_string_found_content_not_length 24 + #define FLL_fss_status_found_content_not_s "FL_fss_found_content_not" + #define FLL_fss_status_found_content_not_s_length 24 - #define fll_fss_status_string_found_object_content_not "FL_fss_found_object_content_not" - #define fll_fss_status_string_found_object_content_not_length 31 + #define FLL_fss_status_found_object_content_not_s "FL_fss_found_object_content_not" + #define FLL_fss_status_found_object_content_not_s_length 31 #endif // _di_fll_fss_status_success_ #ifndef _di_fll_fss_status_codes_ - #define fll_fss_status_string_found_comment "FL_fss_found_comment" - #define fll_fss_status_string_found_comment_length 14 + #define FLL_fss_status_found_comment_s "FL_fss_found_comment" + #define FLL_fss_status_found_comment_length_s 14 #endif // _di_fll_fss_status_codes_ - #define fll_fss_status_string_status_code_first "FL_fss_status_code_first" - #define fll_fss_status_string_status_code_first_length 24 + #define FLL_fss_status_status_code_first_s "FL_fss_status_code_first" + #define FLL_fss_status_status_code_first_s_length 24 - #define fll_fss_status_string_status_code_last "FL_fss_status_code_last" - #define fll_fss_status_string_status_code_last_length 22 + #define FLL_fss_status_status_code_last_s "FL_fss_status_code_last" + #define FLL_fss_status_status_code_last_s_length 22 #endif // _di_fll_fss_status_string_ /** diff --git a/level_2/fll_iki/c/iki.c b/level_2/fll_iki/c/iki.c index 0ce214f..f9b6d05 100644 --- a/level_2/fll_iki/c/iki.c +++ b/level_2/fll_iki/c/iki.c @@ -9,7 +9,7 @@ extern "C" { f_status_t fll_iki_content_escape(const f_string_static_t content, const uint8_t quote, f_string_dynamic_t *escaped) { #ifndef _di_level_2_parameter_checking_ if (content.used > content.size) return F_status_set_error(F_parameter); - if (quote != f_iki_syntax_quote_single && quote != f_iki_syntax_quote_double) return F_status_set_error(F_parameter); + if (quote != F_iki_syntax_quote_single_s && quote != F_iki_syntax_quote_double_s) return F_status_set_error(F_parameter); if (escaped->used > escaped->size) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ @@ -25,7 +25,7 @@ extern "C" { if (content.used > content.size) return F_status_set_error(F_parameter); if (range.start > range.stop) return F_status_set_error(F_parameter); if (range.start >= content.used) return F_status_set_error(F_parameter); - if (quote != f_iki_syntax_quote_single && quote != f_iki_syntax_quote_double) return F_status_set_error(F_parameter); + if (quote != F_iki_syntax_quote_single_s && quote != F_iki_syntax_quote_double_s) return F_status_set_error(F_parameter); if (escaped->used > escaped->size) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ @@ -39,7 +39,7 @@ extern "C" { if (content.used > content.size) return F_status_set_error(F_parameter); if (range.start > range.stop) return F_status_set_error(F_parameter); if (range.start >= content.used) return F_status_set_error(F_parameter); - if (quote != f_iki_syntax_quote_single && quote != f_iki_syntax_quote_double) return F_status_set_error(F_parameter); + if (quote != F_iki_syntax_quote_single_s && quote != F_iki_syntax_quote_double_s) return F_status_set_error(F_parameter); if (unescaped->used > unescaped->size) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ @@ -51,7 +51,7 @@ extern "C" { f_status_t fll_iki_content_unescape(const f_string_static_t content, const uint8_t quote, f_string_dynamic_t *unescaped) { #ifndef _di_level_2_parameter_checking_ if (content.used > content.size) return F_status_set_error(F_parameter); - if (quote != f_iki_syntax_quote_single && quote != f_iki_syntax_quote_double) return F_status_set_error(F_parameter); + if (quote != F_iki_syntax_quote_single_s && quote != F_iki_syntax_quote_double_s) return F_status_set_error(F_parameter); if (unescaped->used > unescaped->size) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ diff --git a/level_2/fll_iki/c/private-iki.c b/level_2/fll_iki/c/private-iki.c index ecd9868..a7aeaba 100644 --- a/level_2/fll_iki/c/private-iki.c +++ b/level_2/fll_iki/c/private-iki.c @@ -28,21 +28,21 @@ extern "C" { } for (j = 0; j < delimits; ++j) { - escaped->string[escaped->used++] = f_iki_syntax_slash; + escaped->string[escaped->used++] = F_iki_syntax_slash_s; } // for - escaped->string[escaped->used++] = f_iki_syntax_slash; + escaped->string[escaped->used++] = F_iki_syntax_slash_s; escaped->string[escaped->used++] = quote; delimits = 0; } else if (content.string[i]) { if (escaped->used + 1 > escaped->size) { - status = f_string_dynamic_increase_by(f_memory_default_allocation_small, escaped); + status = f_string_dynamic_increase_by(F_memory_default_allocation_small_d, escaped); if (F_status_is_error(status)) return status; } - if (content.string[i] == f_iki_syntax_slash) { + if (content.string[i] == F_iki_syntax_slash_s) { ++delimits; } else { @@ -61,7 +61,7 @@ extern "C" { } for (j = 0; j < delimits; ++j) { - escaped->string[escaped->used++] = f_iki_syntax_slash; + escaped->string[escaped->used++] = F_iki_syntax_slash_s; } // for } @@ -94,7 +94,7 @@ extern "C" { return F_status_set_error(F_syntax); } - else if (content.string[i] == f_iki_syntax_slash) { + else if (content.string[i] == F_iki_syntax_slash_s) { delimits = 1; if (i + 1 < content.used) { @@ -118,14 +118,14 @@ extern "C" { } for (j = 0; j < delimits; ++j) { - unescaped->string[unescaped->used++] = f_iki_syntax_slash; + unescaped->string[unescaped->used++] = F_iki_syntax_slash_s; } // for delimits = 0; unescaped->string[unescaped->used++] = quote; break; } - else if (content.string[j] == f_iki_syntax_slash) { + else if (content.string[j] == F_iki_syntax_slash_s) { ++delimits; } else if (content.string[j]) { @@ -165,7 +165,7 @@ extern "C" { } for (j = 0; j < delimits; ++j) { - unescaped->string[unescaped->used++] = f_iki_syntax_slash; + unescaped->string[unescaped->used++] = F_iki_syntax_slash_s; } // for break; @@ -173,7 +173,7 @@ extern "C" { } else if (content.string[i]) { if (unescaped->used + 1 > unescaped->size) { - status = f_string_dynamic_increase_by(f_memory_default_allocation_small, unescaped); + status = f_string_dynamic_increase_by(F_memory_default_allocation_small_d, unescaped); if (F_status_is_error(status)) return status; } diff --git a/level_2/fll_iki/c/private-iki.h b/level_2/fll_iki/c/private-iki.h index dfbc2cd..8d047c9 100644 --- a/level_2/fll_iki/c/private-iki.h +++ b/level_2/fll_iki/c/private-iki.h @@ -40,7 +40,7 @@ extern "C" { * Errors (with error bit) from: f_string_dynamic_increase_by(). */ #if !defined(_di_fll_iki_content_escape_) || !defined(_di_fll_iki_content_partial_escape_) - extern f_status_t private_fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const uint8_t quote, f_string_dynamic_t *escaped) f_attribute_visibility_internal; + extern f_status_t private_fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const uint8_t quote, f_string_dynamic_t *escaped) F_attribute_visibility_internal_d; #endif // !defined(_di_fll_iki_content_escape_) || !defined(_di_fll_iki_content_partial_escape_) /** @@ -69,7 +69,7 @@ extern "C" { * Errors (with error bit) from: f_string_dynamic_increase_by(). */ #if !defined(_di_fll_iki_content_unescape_) || !defined(_di_fll_iki_content_partial_unescape_) - extern f_status_t private_fll_iki_content_partial_unescape(const f_string_static_t content, const f_string_range_t range, const uint8_t quote, f_string_dynamic_t *unescaped) f_attribute_visibility_internal; + extern f_status_t private_fll_iki_content_partial_unescape(const f_string_static_t content, const f_string_range_t range, const uint8_t quote, f_string_dynamic_t *unescaped) F_attribute_visibility_internal_d; #endif // !defined(_di_fll_iki_content_unescape_) || !defined(_di_fll_iki_content_partial_unescape_) #ifdef __cplusplus diff --git a/level_2/fll_path/c/path.h b/level_2/fll_path/c/path.h index 476db37..637aeb6 100644 --- a/level_2/fll_path/c/path.h +++ b/level_2/fll_path/c/path.h @@ -30,7 +30,7 @@ extern "C" { * This does not check if the path exists or not. * This processes the relative parts: './', '../', and extra '/'. * This does not process symbolic links. - * This has a max size of f_string_t_size. + * This has a max size of F_string_t_size_d. * * @param path * The source path to determine what the canonical path is. diff --git a/level_2/fll_program/c/program.c b/level_2/fll_program/c/program.c index 6296db7..b41a670 100644 --- a/level_2/fll_program/c/program.c +++ b/level_2/fll_program/c/program.c @@ -98,7 +98,7 @@ extern "C" { // load colors unless told not to. if (decision == choices.id[0]) { - context->mode = f_color_mode_no_color; + context->mode = F_color_mode_no_color_d; } else { f_status_t allocation_status = F_none; @@ -159,7 +159,7 @@ extern "C" { status = F_none; } else { - macro_f_memory_structure_increment(status, (*destination), 1, f_memory_default_allocation_small, macro_f_string_dynamics_t_resize, F_array_too_large); + macro_f_memory_structure_increment(status, (*destination), 1, F_memory_default_allocation_small_d, macro_f_string_dynamics_t_resize, F_array_too_large); if (F_status_is_error(status)) break; destination->array[destination->used++] = ripped; @@ -231,7 +231,7 @@ extern "C" { status = F_none; } else { - macro_f_string_dynamics_t_increase(status, f_memory_default_allocation_small, (*destination)); + macro_f_string_dynamics_t_increase(status, F_memory_default_allocation_small_d, (*destination)); if (F_status_is_error(status)) return status; destination->array[destination->used++] = ripped; diff --git a/level_3/byte_dump/c/byte_dump.c b/level_3/byte_dump/c/byte_dump.c index 02c57c7..5c81bfc 100644 --- a/level_3/byte_dump/c/byte_dump.c +++ b/level_3/byte_dump/c/byte_dump.c @@ -11,7 +11,7 @@ extern "C" { flockfile(file.stream); - fll_program_print_help_header(file, context, byte_dump_name_long, byte_dump_version); + fll_program_print_help_header(file, context, byte_dump_program_name_long_s, byte_dump_version_s); fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); @@ -25,44 +25,44 @@ extern "C" { f_print_character(f_string_eol_s[0], file.stream); - fll_program_print_help_option(file, context, byte_dump_short_binary, byte_dump_long_binary, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display binary representation."); - fll_program_print_help_option(file, context, byte_dump_short_decimal, byte_dump_long_decimal, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display decimal representation."); - fll_program_print_help_option(file, context, byte_dump_short_duodecimal, byte_dump_long_duodecimal, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display duodecimal representation."); - fll_program_print_help_option(file, context, byte_dump_short_hexidecimal, byte_dump_long_hexidecimal, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Display hexadecimal representation."); - fll_program_print_help_option(file, context, byte_dump_short_octal, byte_dump_long_octal, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display octal representation."); - fll_program_print_help_option(file, context, byte_dump_short_unicode, byte_dump_long_unicode, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display using Unicode representation for valid Unicode (like: U+0000)."); + fll_program_print_help_option(file, context, byte_dump_short_binary_s, byte_dump_long_binary_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display binary representation."); + fll_program_print_help_option(file, context, byte_dump_short_decimal_s, byte_dump_long_decimal_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display decimal representation."); + fll_program_print_help_option(file, context, byte_dump_short_duodecimal_s, byte_dump_long_duodecimal_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display duodecimal representation."); + fll_program_print_help_option(file, context, byte_dump_short_hexidecimal_s, byte_dump_long_hexidecimal_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Display hexadecimal representation."); + fll_program_print_help_option(file, context, byte_dump_short_octal_s, byte_dump_long_octal_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display octal representation."); + fll_program_print_help_option(file, context, byte_dump_short_unicode_s, byte_dump_long_unicode_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display using Unicode representation for valid Unicode (like: U+0000)."); f_print_character(f_string_eol_s[0], file.stream); - fll_program_print_help_option(file, context, byte_dump_short_first, byte_dump_long_first, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Start reading at this byte offset."); - fll_program_print_help_option(file, context, byte_dump_short_last, byte_dump_long_last, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Stop reading at this (inclusive) byte offset."); - fll_program_print_help_option(file, context, byte_dump_short_width, byte_dump_long_width, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Set number of columns of Bytes to display."); + fll_program_print_help_option(file, context, byte_dump_short_first_s, byte_dump_long_first_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Start reading at this byte offset."); + fll_program_print_help_option(file, context, byte_dump_short_last_s, byte_dump_long_last_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Stop reading at this (inclusive) byte offset."); + fll_program_print_help_option(file, context, byte_dump_short_width_s, byte_dump_long_width_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Set number of columns of Bytes to display."); f_print_character(f_string_eol_s[0], file.stream); - fll_program_print_help_option(file, context, byte_dump_short_text, byte_dump_long_text, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include a column of text when displaying the bytes."); - fll_program_print_help_option(file, context, byte_dump_short_placeholder, byte_dump_long_placeholder, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Use a placeholder character instead of a space for placeholders."); + fll_program_print_help_option(file, context, byte_dump_short_text_s, byte_dump_long_text_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include a column of text when displaying the bytes."); + fll_program_print_help_option(file, context, byte_dump_short_placeholder_s, byte_dump_long_placeholder_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Use a placeholder character instead of a space for placeholders."); f_print_character(f_string_eol_s[0], file.stream); f_print_character(f_string_eol_s[0], file.stream); fl_print_format(" %[Special Options:%] ", file.stream, context.set.important, context.set.important); - fll_program_print_help_option_long(file, context, byte_dump_long_normal, f_console_symbol_long_enable_s, " Display UTF-8 symbols for ASCII control codes."); - fll_program_print_help_option_long(file, context, byte_dump_long_simple, f_console_symbol_long_enable_s, " Display spaces for ASCII control codes."); - fll_program_print_help_option_long(file, context, byte_dump_long_classic, f_console_symbol_long_enable_s, "Display periods for ASCII control codes."); + fll_program_print_help_option_long(file, context, byte_dump_long_normal_s, f_console_symbol_long_enable_s, " Display UTF-8 symbols for ASCII control codes."); + fll_program_print_help_option_long(file, context, byte_dump_long_simple_s, f_console_symbol_long_enable_s, " Display spaces for ASCII control codes."); + fll_program_print_help_option_long(file, context, byte_dump_long_classic_s, f_console_symbol_long_enable_s, "Display periods for ASCII control codes."); - fll_program_print_help_usage(file, context, byte_dump_name, "filename(s)"); + fll_program_print_help_usage(file, context, byte_dump_program_name_s, "filename(s)"); - fl_print_format(" When using the %[%s%s%] option, some UTF-8 characters may be replaced by your instance and cause display alignment issues.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_text, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" When using the %[%s%s%] option, some UTF-8 characters may be replaced by your instance and cause display alignment issues.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_text_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" Special UTF-8 characters and non-spacing UTF-8 characters may be replaced with a space (or a placeholder when the %[%s%s%] option is used).%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_placeholder, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" Special UTF-8 characters and non-spacing UTF-8 characters may be replaced with a space (or a placeholder when the %[%s%s%] option is used).%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_placeholder_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); fl_print_format(" UTF-8 \"Combining\" characters might have a space appended to allow a proper display but this may cause copy and paste issues.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" When %[%s%s%] is used, any UTF-8 sequences will still be printed in full should any part is found within the requested range.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_last, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" When %[%s%s%] is used, any UTF-8 sequences will still be printed in full should any part is found within the requested range.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_last_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" When using the %[%s%s%] option, invalid Unicode will fallback to being displayed using one of the other modes.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_unicode, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" When using the %[%s%s%] option, invalid Unicode will fallback to being displayed using one of the other modes.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_unicode_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); funlockfile(file.stream); @@ -76,7 +76,7 @@ extern "C" { f_status_t status = F_none; { - const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, byte_dump_total_parameters); + const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, byte_dump_total_parameters_d); // Identify priority of color parameters. { @@ -212,7 +212,7 @@ extern "C" { } if (main->parameters[byte_dump_parameter_version].result == f_console_result_found) { - fll_program_print_version(main->output.to, byte_dump_version); + fll_program_print_version(main->output.to, byte_dump_version_s); byte_dump_main_delete(main); return F_none; @@ -223,7 +223,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%[%SThe parameter '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error); - fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_width, main->context.set.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_width_s, main->context.set.notable); fl_print_format("%[' was specified, but no value was given.%]%c", main->error.to.stream, main->context.set.error, main->context.set.error, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -243,7 +243,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%[%SThe parameter '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error); - fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_width, main->context.set.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_width_s, main->context.set.notable); fl_print_format("%[' value can only be a number (inclusively) between %]", main->error.to.stream, main->context.set.error, main->context.set.error); fl_print_format("%[1%]", main->error.to.stream, main->context.set.notable, main->context.set.notable); fl_print_format(" %[and%] ", main->error.to.stream, main->context.set.error, main->context.set.error); @@ -263,7 +263,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%[%SThe parameter '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error); - fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_first, main->context.set.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_first_s, main->context.set.notable); fl_print_format("%[' was specified, but no value was given.%]%c", main->error.to.stream, main->context.set.error, main->context.set.error, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -279,15 +279,15 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number); - if (F_status_is_error(status) || number > f_number_t_size_unsigned) { + if (F_status_is_error(status) || number > F_number_t_size_unsigned_d) { flockfile(main->error.to.stream); fl_print_format("%[%SThe parameter '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error); - fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_first, main->context.set.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_first_s, main->context.set.notable); fl_print_format("%[' value can only be a number (inclusively) between %]", main->error.to.stream, main->context.set.error, main->context.set.error); fl_print_format("%[0%]", main->error.to.stream, main->context.set.notable, main->context.set.notable); fl_print_format(" %[and%] ", main->error.to.stream, main->context.set.error, main->context.set.error); - fl_print_format("%[%un%]", main->error.to.stream, main->context.set.notable, f_number_t_size_unsigned, main->context.set.notable); + fl_print_format("%[%un%]", main->error.to.stream, main->context.set.notable, F_number_t_size_unsigned_d, main->context.set.notable); fl_print_format("%[.%]%c", main->error.to.stream, main->context.set.error, main->context.set.error, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -303,7 +303,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%[%SThe parameter '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error); - fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_last, main->context.set.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_last_s, main->context.set.notable); fl_print_format("%[' was specified, but no value was given.%]%c", main->error.to.stream, main->context.set.error, main->context.set.error, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -319,15 +319,15 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number); - if (F_status_is_error(status) || number < 0 || number > f_number_t_size_unsigned) { + if (F_status_is_error(status) || number < 0 || number > F_number_t_size_unsigned_d) { flockfile(main->error.to.stream); fl_print_format("%[%SThe parameter '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error); - fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_last, main->context.set.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_last_s, main->context.set.notable); fl_print_format("%[' value can only be a number (inclusively) between %]", main->error.to.stream, main->context.set.error, main->context.set.error); fl_print_format("%[0%]", main->error.to.stream, main->context.set.notable, main->context.set.notable); fl_print_format(" %[and%] ", main->error.to.stream, main->context.set.error, main->context.set.error); - fl_print_format("%[%un%]", main->error.to.stream, main->context.set.notable, f_number_t_size_unsigned, main->context.set.notable); + fl_print_format("%[%un%]", main->error.to.stream, main->context.set.notable, F_number_t_size_unsigned_d, main->context.set.notable); fl_print_format("%[.%]%c", main->error.to.stream, main->context.set.error, main->context.set.error, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -344,9 +344,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%[%SThe parameter '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error); - fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_first, main->context.set.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_first_s, main->context.set.notable); fl_print_format("%[' value cannot be greater than the parameter '%]", main->error.to.stream, main->context.set.error, main->context.set.error); - fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_last, main->context.set.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_last_s, main->context.set.notable); fl_print_format("%[' value.%]%c", main->error.to.stream, main->context.set.error, main->context.set.error, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -362,8 +362,8 @@ extern "C" { if (main->process_pipe) { f_file_t file = f_file_t_initialize; - file.id = f_type_descriptor_input; - file.stream = f_type_input; + file.id = F_type_descriptor_input_d; + file.stream = F_type_input_d; flockfile(main->output.to.stream); @@ -499,7 +499,7 @@ extern "C" { #ifndef _di_byte_dump_main_delete_ f_status_t byte_dump_main_delete(byte_dump_main_t *main) { - for (f_array_length_t i = 0; i < byte_dump_total_parameters; ++i) { + for (f_array_length_t i = 0; i < byte_dump_total_parameters_d; ++i) { macro_f_array_lengths_t_delete_simple(main->parameters[i].locations); macro_f_array_lengths_t_delete_simple(main->parameters[i].locations_sub); macro_f_array_lengths_t_delete_simple(main->parameters[i].values); diff --git a/level_3/byte_dump/c/byte_dump.h b/level_3/byte_dump/c/byte_dump.h index e0d469a..70a3827 100644 --- a/level_3/byte_dump/c/byte_dump.h +++ b/level_3/byte_dump/c/byte_dump.h @@ -49,30 +49,32 @@ extern "C" { #endif -#ifndef _di_byte_dump_version_ - #define byte_dump_major_version f_string_ascii_0 - #define byte_dump_minor_version f_string_ascii_5 - #define byte_dump_micro_version f_string_ascii_6 +#ifndef _di_byte_dump_program_version_ + #define byte_dump_program_version_major_s F_string_ascii_0_s + #define byte_dump_program_version_minor_s F_string_ascii_5_s + #define byte_dump_program_version_micro_s F_string_ascii_6_s - #ifndef byte_dump_nano_version_prefix - #define byte_dump_nano_version_prefix + #ifndef byte_dump_program_version_nano_prefix_s + #define byte_dump_program_version_nano_prefix_s #endif - #ifndef byte_dump_nano_version - #define byte_dump_nano_version + #ifndef byte_dump_program_version_nano_s + #define byte_dump_program_version_nano_s #endif - #define byte_dump_version byte_dump_major_version f_string_ascii_period byte_dump_minor_version f_string_ascii_period byte_dump_micro_version byte_dump_nano_version_prefix byte_dump_nano_version -#endif // _di_byte_dump_version_ + #define byte_dump_version_s byte_dump_program_version_major_s F_string_ascii_period_s byte_dump_program_version_minor_s F_string_ascii_period_s byte_dump_program_version_micro_s byte_dump_program_version_nano_prefix_s byte_dump_program_version_nano_s +#endif // _di_byte_dump_program_version_ -#ifndef _di_byte_dump_name_ - #define byte_dump_name "byte_dump" - #define byte_dump_name_long "Byte Dump" -#endif // _di_byte_dump_name_ +#ifndef _di_byte_dump_program_name_ + #define byte_dump_program_name_s "byte_dump" + #define byte_dump_program_name_long_s "Byte Dump" +#endif // _di_byte_dump_program_name_ +/** + * Set to at least 4 to provide a UTF-8 friendly allocation step. + */ #ifndef _di_byte_dump_default_allocation_step_ - // Set to at least 4 to provide a UTF-8 friendly allocation step. - #define byte_dump_default_allocation_step 4 + #define byte_dump_default_allocation_step_d 4 #endif // _di_byte_dump_default_allocation_step_ #ifndef _di_byte_dump_defines_ @@ -90,77 +92,77 @@ extern "C" { byte_dump_presentation_classic, }; - #define byte_dump_sequence_acknowledge "␆" - #define byte_dump_sequence_acknowledge_negative "␕" - #define byte_dump_sequence_backspace "␈" - #define byte_dump_sequence_bell "␇" - #define byte_dump_sequence_cancel "␘" - #define byte_dump_sequence_carriage_return "␍" - #define byte_dump_sequence_data_link_escape "␐" - #define byte_dump_sequence_delete "␡" - #define byte_dump_sequence_device_control_1 "␑" - #define byte_dump_sequence_device_control_2 "␒" - #define byte_dump_sequence_device_control_3 "␓" - #define byte_dump_sequence_device_control_4 "␔" - #define byte_dump_sequence_end_of_enquiry "␅" - #define byte_dump_sequence_end_of_medium "␙" - #define byte_dump_sequence_end_of_text "␃" - #define byte_dump_sequence_end_of_transmission "␄" - #define byte_dump_sequence_end_of_transmission_block "␗" - #define byte_dump_sequence_escape "␛" - #define byte_dump_sequence_file_separator "␜" - #define byte_dump_sequence_form_feed "␌" - #define byte_dump_sequence_group_separator "␝" - #define byte_dump_sequence_line_feed "␊" - #define byte_dump_sequence_new_line "␤" - #define byte_dump_sequence_null "␀" - #define byte_dump_sequence_record_separator "␞" - #define byte_dump_sequence_shift_in "␏" - #define byte_dump_sequence_shift_out "␎" - #define byte_dump_sequence_space "␠" - #define byte_dump_sequence_start_of_header "␁" - #define byte_dump_sequence_start_of_text "␂" - #define byte_dump_sequence_substitute "␚" - #define byte_dump_sequence_synchronous_idle "␖" - #define byte_dump_sequence_tab "␉" - #define byte_dump_sequence_tab_vertical "␋" - #define byte_dump_sequence_unit_separator "␟" - - #define byte_dump_character_wall "|" - #define byte_dump_character_placeholder "␣" // other likely choices: (substitute form 1: '␚', substitute form 2: '␦'). - #define byte_dump_character_incomplete "�" - #define byte_dump_character_unused "�" - - #define byte_dump_short_binary "b" - #define byte_dump_short_decimal "d" - #define byte_dump_short_duodecimal "D" - #define byte_dump_short_hexidecimal "x" - #define byte_dump_short_octal "o" - #define byte_dump_short_unicode "U" - - #define byte_dump_short_first "f" - #define byte_dump_short_last "l" - #define byte_dump_short_text "t" - #define byte_dump_short_width "w" - #define byte_dump_short_placeholder "p" - - #define byte_dump_long_binary "binary" - #define byte_dump_long_decimal "decimal" - #define byte_dump_long_duodecimal "duodecimal" - #define byte_dump_long_hexidecimal "hexidecimal" - #define byte_dump_long_octal "octal" - #define byte_dump_long_unicode "unicode" - - #define byte_dump_long_first "first" // first offset byte size. - #define byte_dump_long_last "last" // last offset byte size. - #define byte_dump_long_width "width" // number of characters to display per row. - - #define byte_dump_long_text "text" // display text - #define byte_dump_long_placeholder "placeholder" // display (colored) placeholders to signify codes that are UTF-8 fragments. - - #define byte_dump_long_normal "normal" // use normal presentation, displaying UTF-8 sequence codes for ASCII special codes. - #define byte_dump_long_simple "simple" // use simple presentation, displaying spaces for ASCII special codes instead of UTF-8 sequence codes. - #define byte_dump_long_classic "classic" // use classic presentation, displaying periods for ASCII special codes instead of UTF-8 sequence codes. + #define byte_dump_sequence_acknowledge_s "␆" + #define byte_dump_sequence_acknowledge_negative_s "␕" + #define byte_dump_sequence_backspace_s "␈" + #define byte_dump_sequence_bell_s "␇" + #define byte_dump_sequence_cancel_s "␘" + #define byte_dump_sequence_carriage_return_s "␍" + #define byte_dump_sequence_data_link_escape_s "␐" + #define byte_dump_sequence_delete_s "␡" + #define byte_dump_sequence_device_control_1_s "␑" + #define byte_dump_sequence_device_control_2_s "␒" + #define byte_dump_sequence_device_control_3_s "␓" + #define byte_dump_sequence_device_control_4_s "␔" + #define byte_dump_sequence_end_of_enquiry_s "␅" + #define byte_dump_sequence_end_of_medium_s "␙" + #define byte_dump_sequence_end_of_text_s "␃" + #define byte_dump_sequence_end_of_transmission_s "␄" + #define byte_dump_sequence_end_of_transmission_block_s "␗" + #define byte_dump_sequence_escape_s "␛" + #define byte_dump_sequence_file_separator_s "␜" + #define byte_dump_sequence_form_feed_s "␌" + #define byte_dump_sequence_group_separator_s "␝" + #define byte_dump_sequence_line_feed_s "␊" + #define byte_dump_sequence_new_line_s "␤" + #define byte_dump_sequence_null_s "␀" + #define byte_dump_sequence_record_separator_s "␞" + #define byte_dump_sequence_shift_in_s "␏" + #define byte_dump_sequence_shift_out_s "␎" + #define byte_dump_sequence_space_s "␠" + #define byte_dump_sequence_start_of_header_s "␁" + #define byte_dump_sequence_start_of_text_s "␂" + #define byte_dump_sequence_substitute_s "␚" + #define byte_dump_sequence_synchronous_idle_s "␖" + #define byte_dump_sequence_tab_s "␉" + #define byte_dump_sequence_tab_vertical_s "␋" + #define byte_dump_sequence_unit_separator_s "␟" + + #define byte_dump_character_wall_s "|" + #define byte_dump_character_placeholder_s "␣" // other likely choices: (substitute form 1: '␚', substitute form 2: '␦'). + #define byte_dump_character_incomplete_s "�" + #define byte_dump_character_unused_s "�" + + #define byte_dump_short_binary_s "b" + #define byte_dump_short_decimal_s "d" + #define byte_dump_short_duodecimal_s "D" + #define byte_dump_short_hexidecimal_s "x" + #define byte_dump_short_octal_s "o" + #define byte_dump_short_unicode_s "U" + + #define byte_dump_short_first_s "f" + #define byte_dump_short_last_s "l" + #define byte_dump_short_text_s "t" + #define byte_dump_short_width_s "w" + #define byte_dump_short_placeholder_s "p" + + #define byte_dump_long_binary_s "binary" + #define byte_dump_long_decimal_s "decimal" + #define byte_dump_long_duodecimal_s "duodecimal" + #define byte_dump_long_hexidecimal_s "hexidecimal" + #define byte_dump_long_octal_s "octal" + #define byte_dump_long_unicode_s "unicode" + + #define byte_dump_long_first_s "first" // first offset byte size. + #define byte_dump_long_last_s "last" // last offset byte size. + #define byte_dump_long_width_s "width" // number of characters to display per row. + + #define byte_dump_long_text_s "text" // display text + #define byte_dump_long_placeholder_s "placeholder" // display (colored) placeholders to signify codes that are UTF-8 fragments. + + #define byte_dump_long_normal_s "normal" // use normal presentation, displaying UTF-8 sequence codes for ASCII special codes. + #define byte_dump_long_simple_s "simple" // use simple presentation, displaying spaces for ASCII special codes instead of UTF-8 sequence codes. + #define byte_dump_long_classic_s "classic" // use classic presentation, displaying periods for ASCII special codes instead of UTF-8 sequence codes. enum { byte_dump_parameter_help, @@ -203,28 +205,28 @@ extern "C" { f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(byte_dump_short_binary, byte_dump_long_binary, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(byte_dump_short_decimal, byte_dump_long_decimal, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(byte_dump_short_duodecimal, byte_dump_long_duodecimal, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(byte_dump_short_hexidecimal, byte_dump_long_hexidecimal, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(byte_dump_short_octal, byte_dump_long_octal, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(byte_dump_short_unicode, byte_dump_long_unicode, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(byte_dump_short_first, byte_dump_long_first, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(byte_dump_short_last, byte_dump_long_last, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(byte_dump_short_width, byte_dump_long_width, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(byte_dump_short_text, byte_dump_long_text, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(byte_dump_short_placeholder, byte_dump_long_placeholder, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(0, byte_dump_long_normal, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(0, byte_dump_long_simple, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(0, byte_dump_long_classic, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(byte_dump_short_binary_s, byte_dump_long_binary_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(byte_dump_short_decimal_s, byte_dump_long_decimal_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(byte_dump_short_duodecimal_s, byte_dump_long_duodecimal_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(byte_dump_short_hexidecimal_s, byte_dump_long_hexidecimal_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(byte_dump_short_octal_s, byte_dump_long_octal_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(byte_dump_short_unicode_s, byte_dump_long_unicode_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(byte_dump_short_first_s, byte_dump_long_first_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(byte_dump_short_last_s, byte_dump_long_last_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(byte_dump_short_width_s, byte_dump_long_width_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(byte_dump_short_text_s, byte_dump_long_text_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(byte_dump_short_placeholder_s, byte_dump_long_placeholder_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(0, byte_dump_long_normal_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(0, byte_dump_long_simple_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(0, byte_dump_long_classic_s, 0, 0, f_console_type_normal), \ } - #define byte_dump_total_parameters 23 + #define byte_dump_total_parameters_d 23 #endif // _di_byte_dump_defines_ #ifndef _di_byte_dump_main_t_ typedef struct { - f_console_parameter_t parameters[byte_dump_total_parameters]; + f_console_parameter_t parameters[byte_dump_total_parameters_d]; f_array_lengths_t remaining; bool process_pipe; diff --git a/level_3/byte_dump/c/main.c b/level_3/byte_dump/c/main.c index d399fda..2e16cbd 100644 --- a/level_3/byte_dump/c/main.c +++ b/level_3/byte_dump/c/main.c @@ -12,13 +12,13 @@ int main(const int argc, const f_string_t *argv) { const f_status_t status = byte_dump_main(arguments, &data); // flush output pipes before closing. - fflush(f_type_output); - fflush(f_type_error); + fflush(F_type_output_d); + fflush(F_type_error_d); // close all open file descriptors. - close(f_type_descriptor_output); - close(f_type_descriptor_input); - close(f_type_descriptor_error); + close(F_type_descriptor_output_d); + close(F_type_descriptor_input_d); + close(F_type_descriptor_error_d); if (F_status_is_error(status)) { return 1; diff --git a/level_3/byte_dump/c/private-byte_dump.c b/level_3/byte_dump/c/private-byte_dump.c index 92cf34d..f0399c3 100644 --- a/level_3/byte_dump/c/private-byte_dump.c +++ b/level_3/byte_dump/c/private-byte_dump.c @@ -562,7 +562,7 @@ extern "C" { char byte[5] = { 0, 0, 0, 0, 0 }; f_print_terminated(" ", main.output.to.stream); - fl_print_color_terminated(byte_dump_character_wall, main.context.set.notable, main.output.to.stream); + fl_print_color_terminated(byte_dump_character_wall_s, main.context.set.notable, main.output.to.stream); f_print_character(f_string_space_s[0], main.output.to.stream); if (*offset) { @@ -582,7 +582,7 @@ extern "C" { f_print_terminated(" ", main.output.to.stream); if (main.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) { - fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.warning, main.output.to.stream); + fl_print_color_terminated(byte_dump_character_placeholder_s, main.context.set.warning, main.output.to.stream); } else { fl_print_color_terminated(f_string_space_s, main.context.set.warning, main.output.to.stream); @@ -608,13 +608,13 @@ extern "C" { for (; j < previous->bytes && j < main.width; ++j) { if (previous->invalid) { - fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.error, main.output.to.stream); + fl_print_color_terminated(byte_dump_character_placeholder_s, main.context.set.error, main.output.to.stream); } else if (main.parameters[byte_dump_parameter_classic].result == f_console_result_found) { f_print_character(f_string_ascii_period_s[0], main.output.to.stream); } else { - fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.warning, main.output.to.stream); + fl_print_color_terminated(byte_dump_character_placeholder_s, main.context.set.warning, main.output.to.stream); } } // for } @@ -640,7 +640,7 @@ extern "C" { width_utf = macro_f_utf_byte_width_is(c); if (invalid[i]) { - fl_print_color_terminated(byte_dump_character_incomplete, main.context.set.error, main.output.to.stream); + fl_print_color_terminated(byte_dump_character_incomplete_s, main.context.set.error, main.output.to.stream); } else if (f_utf_character_is_control(characters.string[i]) == F_true) { if (main.presentation == byte_dump_presentation_normal) { @@ -717,7 +717,7 @@ extern "C" { } else { fl_print_color_before(main.context.set.notable, main.output.to.stream); - fl_print_color_terminated(byte_dump_sequence_space, main.context.set.warning, main.output.to.stream); + fl_print_color_terminated(byte_dump_sequence_space_s, main.context.set.warning, main.output.to.stream); fl_print_color_after(main.context.set.notable, main.output.to.stream); } } @@ -727,7 +727,7 @@ extern "C" { } else if (main.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) { fl_print_color_before(main.context.set.notable, main.output.to.stream); - fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.warning, main.output.to.stream); + fl_print_color_terminated(byte_dump_character_placeholder_s, main.context.set.warning, main.output.to.stream); fl_print_color_after(main.context.set.notable, main.output.to.stream); } else { @@ -774,10 +774,10 @@ extern "C" { // print invalid placeholder for invalid UTF-8 widths. if (invalid[i]) { - fl_print_color_terminated(byte_dump_character_incomplete, main.context.set.error, main.output.to.stream); + fl_print_color_terminated(byte_dump_character_incomplete_s, main.context.set.error, main.output.to.stream); } else { - fl_print_color_terminated(byte_dump_character_incomplete, main.context.set.warning, main.output.to.stream); + fl_print_color_terminated(byte_dump_character_incomplete_s, main.context.set.warning, main.output.to.stream); } } else if (width_utf) { @@ -841,13 +841,13 @@ extern "C" { if (width_utf > 1 && j + 1 < main.width) { if (main.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) { if (invalid[i]) { - fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.error, main.output.to.stream); + fl_print_color_terminated(byte_dump_character_placeholder_s, main.context.set.error, main.output.to.stream); } else if (main.parameters[byte_dump_parameter_classic].result == f_console_result_found) { f_print_character(f_string_ascii_period_s[0], main.output.to.stream); } else { - fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.warning, main.output.to.stream); + fl_print_color_terminated(byte_dump_character_placeholder_s, main.context.set.warning, main.output.to.stream); } } else { @@ -859,13 +859,13 @@ extern "C" { if (width_utf > 2 && j + 1 < main.width) { if (main.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) { if (invalid[i]) { - fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.error, main.output.to.stream); + fl_print_color_terminated(byte_dump_character_placeholder_s, main.context.set.error, main.output.to.stream); } else if (main.parameters[byte_dump_parameter_classic].result == f_console_result_found) { f_print_character(f_string_ascii_period_s[0], main.output.to.stream); } else { - fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.warning, main.output.to.stream); + fl_print_color_terminated(byte_dump_character_placeholder_s, main.context.set.warning, main.output.to.stream); } } else { @@ -877,13 +877,13 @@ extern "C" { if (width_utf > 3 && j + 1 < main.width) { if (main.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) { if (invalid[i]) { - fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.error, main.output.to.stream); + fl_print_color_terminated(byte_dump_character_placeholder_s, main.context.set.error, main.output.to.stream); } else if (main.parameters[byte_dump_parameter_classic].result == f_console_result_found) { f_print_character(f_string_ascii_period_s[0], main.output.to.stream); } else { - fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.warning, main.output.to.stream); + fl_print_color_terminated(byte_dump_character_placeholder_s, main.context.set.warning, main.output.to.stream); } } else { @@ -901,13 +901,13 @@ extern "C" { for (; j < main.width; ++j) { if (invalid[j]) { - fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.error, main.output.to.stream); + fl_print_color_terminated(byte_dump_character_placeholder_s, main.context.set.error, main.output.to.stream); } else if (main.parameters[byte_dump_parameter_classic].result == f_console_result_found) { f_print_character(f_string_ascii_period_s[0], main.output.to.stream); } else { - fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.warning, main.output.to.stream); + fl_print_color_terminated(byte_dump_character_placeholder_s, main.context.set.warning, main.output.to.stream); } } // for } @@ -918,7 +918,7 @@ extern "C" { } f_print_character(f_string_space_s[0], main.output.to.stream); - fl_print_color_terminated(byte_dump_character_wall, main.context.set.notable, main.output.to.stream); + fl_print_color_terminated(byte_dump_character_wall_s, main.context.set.notable, main.output.to.stream); f_print_character(f_string_eol_s[0], main.output.to.stream); } #endif // _di_byte_dump_file_ diff --git a/level_3/byte_dump/c/private-byte_dump.h b/level_3/byte_dump/c/private-byte_dump.h index 9fb714a..0a08309 100644 --- a/level_3/byte_dump/c/private-byte_dump.h +++ b/level_3/byte_dump/c/private-byte_dump.h @@ -28,7 +28,7 @@ extern "C" { * F_failure (with error bit) on failure, usually when read() fails. */ #ifndef _di_byte_dump_file_ - extern f_status_t byte_dump_file(const byte_dump_main_t main, const f_string_t file_name, const f_file_t file) f_attribute_visibility_internal; + extern f_status_t byte_dump_file(const byte_dump_main_t main, const f_string_t file_name, const f_file_t file) F_attribute_visibility_internal_d; #endif // _di_byte_dump_file_ /** @@ -69,7 +69,7 @@ extern "C" { * @see byte_dump_print_text() */ #ifndef _di_byte_dump_print_character_fragment_ - extern bool byte_dump_print_character_fragment(const byte_dump_main_t main, const f_utf_string_static_t characters, const char invalid[], const uint8_t width_utf, const char byte_current, byte_dump_previous_t *previous, byte_dump_cell_t *cell, uint8_t *offset) f_attribute_visibility_internal; + extern bool byte_dump_print_character_fragment(const byte_dump_main_t main, const f_utf_string_static_t characters, const char invalid[], const uint8_t width_utf, const char byte_current, byte_dump_previous_t *previous, byte_dump_cell_t *cell, uint8_t *offset) F_attribute_visibility_internal_d; #endif // _di_byte_dump_print_character_fragment_ /** @@ -91,7 +91,7 @@ extern "C" { * Will be reduced to 0 once used. */ #ifndef _di_byte_dump_print_text_ - extern void byte_dump_print_text(const byte_dump_main_t main, const f_utf_string_static_t characters, const char invalid[], byte_dump_previous_t *previous, uint8_t *offset) f_attribute_visibility_internal; + extern void byte_dump_print_text(const byte_dump_main_t main, const f_utf_string_static_t characters, const char invalid[], byte_dump_previous_t *previous, uint8_t *offset) F_attribute_visibility_internal_d; #endif // _di_byte_dump_print_text_ #ifdef __cplusplus diff --git a/level_3/control/c/control.c b/level_3/control/c/control.c index 4b12b82..8ae92cc 100644 --- a/level_3/control/c/control.c +++ b/level_3/control/c/control.c @@ -11,7 +11,7 @@ extern "C" { flockfile(file.stream); - fll_program_print_help_header(file, context, control_name_long, control_version); + fll_program_print_help_header(file, context, control_program_name_long_s, control_program_version_s); fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); @@ -23,7 +23,7 @@ extern "C" { fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal file."); fll_program_print_help_option(file, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); - fll_program_print_help_usage(file, context, control_name, f_string_empty_s); + fll_program_print_help_usage(file, context, control_program_name_s, f_string_empty_s); funlockfile(file.stream); @@ -37,7 +37,7 @@ extern "C" { f_status_t status = F_none; { - const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, control_total_parameters); + const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, control_total_parameters_d); { f_console_parameter_id_t ids[3] = { control_parameter_no_color, control_parameter_light, control_parameter_dark }; @@ -115,7 +115,7 @@ extern "C" { } if (main->parameters[control_parameter_version].result == f_console_result_found) { - fll_program_print_version(main->output.to, control_version); + fll_program_print_version(main->output.to, control_program_version_s); control_main_delete(main); return F_none; @@ -138,7 +138,7 @@ extern "C" { #ifndef _di_control_main_delete_ f_status_t control_main_delete(control_main_t *main) { - for (f_array_length_t i = 0; i < control_total_parameters; ++i) { + for (f_array_length_t i = 0; i < control_total_parameters_d; ++i) { macro_f_array_lengths_t_delete_simple(main->parameters[i].locations); macro_f_array_lengths_t_delete_simple(main->parameters[i].locations_sub); macro_f_array_lengths_t_delete_simple(main->parameters[i].values); diff --git a/level_3/control/c/control.h b/level_3/control/c/control.h index 43474d2..7c36ab0 100644 --- a/level_3/control/c/control.h +++ b/level_3/control/c/control.h @@ -42,26 +42,26 @@ extern "C" { #endif -#ifndef _di_control_version_ - #define control_major_version f_string_ascii_0 - #define control_minor_version f_string_ascii_5 - #define control_micro_version f_string_ascii_6 +#ifndef _di_control_program_version_ + #define control_program_version_major_s F_string_ascii_0_s + #define control_program_version_minor_s F_string_ascii_5_s + #define control_program_version_micro_s F_string_ascii_6_s - #ifndef control_nano_version_prefix - #define control_nano_version_prefix + #ifndef control_program_version_nano_prefix_s + #define control_program_version_nano_prefix_s #endif - #ifndef control_nano_version - #define control_nano_version + #ifndef control_program_version_nano_s + #define control_program_version_nano_s #endif - #define control_version control_major_version f_string_ascii_period control_minor_version f_string_ascii_period control_micro_version control_nano_version_prefix control_nano_version -#endif // _di_control_version_ + #define control_program_version_s control_program_version_major_s F_string_ascii_period_s control_program_version_minor_s F_string_ascii_period_s control_program_version_micro_s control_program_version_nano_prefix_s control_program_version_nano_s +#endif // _di_control_program_version_ -#ifndef _di_control_name_ - #define control_name "control" - #define control_name_long "Control Program" -#endif // _di_control_name_ +#ifndef _di_control_program_name_ + #define control_program_name_s "control" + #define control_program_name_long_s "Control Program" +#endif // _di_control_program_name_ #ifndef _di_control_defines_ @@ -90,12 +90,12 @@ extern "C" { f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ } - #define control_total_parameters 9 + #define control_total_parameters_d 9 #endif // _di_control_defines_ #ifndef _di_control_data_t_ typedef struct { - f_console_parameter_t parameters[control_total_parameters]; + f_console_parameter_t parameters[control_total_parameters_d]; f_array_lengths_t remaining; bool process_pipe; diff --git a/level_3/control/c/main.c b/level_3/control/c/main.c index 63db5c8..8976711 100644 --- a/level_3/control/c/main.c +++ b/level_3/control/c/main.c @@ -12,13 +12,13 @@ int main(const int argc, const f_string_t *argv) { const f_status_t status = control_main(arguments, &data); // flush output pipes before closing. - fflush(f_type_output); - fflush(f_type_error); + fflush(F_type_output_d); + fflush(F_type_error_d); // close all open file descriptors. - close(f_type_descriptor_output); - close(f_type_descriptor_input); - close(f_type_descriptor_error); + close(F_type_descriptor_output_d); + close(F_type_descriptor_input_d); + close(F_type_descriptor_error_d); if (F_status_is_error(status)) { return 1; diff --git a/level_3/controller/c/controller.c b/level_3/controller/c/controller.c index a31bd65..fc74525 100644 --- a/level_3/controller/c/controller.c +++ b/level_3/controller/c/controller.c @@ -15,7 +15,7 @@ extern "C" { controller_print_lock(main.output.to, 0); - fll_program_print_help_header(main.output.to, main.context, main.program_name_long, controller_version); + fll_program_print_help_header(main.output.to, main.context, main.program_name_long, controller_program_version_s); fll_program_print_help_option(main.output.to, main.context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); fll_program_print_help_option(main.output.to, main.context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); @@ -29,24 +29,24 @@ extern "C" { f_print_character(f_string_eol_s[0], main.output.to.stream); - fll_program_print_help_option(main.output.to, main.context, controller_short_control, controller_long_control, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom control group file path, such as '" f_control_group_path_system_prefix f_control_group_path_system_default "'."); - fll_program_print_help_option(main.output.to, main.context, controller_short_daemon, controller_long_daemon, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Run in daemon only mode (do not process the entry)."); - fll_program_print_help_option(main.output.to, main.context, controller_short_init, controller_long_init, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The program will run as an init replacement."); - fll_program_print_help_option(main.output.to, main.context, controller_short_interruptable, controller_long_interruptable, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate that this program can be interrupted by a signal."); - fll_program_print_help_option(main.output.to, main.context, controller_short_pid, controller_long_pid, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom pid file path, such as '" controller_path_pid controller_string_default controller_path_suffix "'."); - fll_program_print_help_option(main.output.to, main.context, controller_short_settings, controller_long_settings, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom settings path, such as '" controller_path_settings "'."); - fll_program_print_help_option(main.output.to, main.context, controller_short_simulate, controller_long_simulate, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Run as a simulation."); - fll_program_print_help_option(main.output.to, main.context, controller_short_uninterruptable, controller_long_uninterruptable, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Designate that this program cannot be interrupted by a signal."); - fll_program_print_help_option(main.output.to, main.context, controller_short_validate, controller_long_validate, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Validate the settings (entry and rules) without running (does not simulate)."); + fll_program_print_help_option(main.output.to, main.context, controller_short_control_s, controller_long_control_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom control group file path, such as '" F_control_group_path_system_prefix_s F_control_group_path_system_default_s "'."); + fll_program_print_help_option(main.output.to, main.context, controller_short_daemon_s, controller_long_daemon_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Run in daemon only mode (do not process the entry)."); + fll_program_print_help_option(main.output.to, main.context, controller_short_init_s, controller_long_init_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The program will run as an init replacement."); + fll_program_print_help_option(main.output.to, main.context, controller_short_interruptable_s, controller_long_interruptable_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate that this program can be interrupted by a signal."); + fll_program_print_help_option(main.output.to, main.context, controller_short_pid_s, controller_long_pid_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom pid file path, such as '" controller_path_pid_s CONTROLLER_default_s controller_path_suffix_s "'."); + fll_program_print_help_option(main.output.to, main.context, controller_short_settings_s, controller_long_settings_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom settings path, such as '" controller_path_settings_s "'."); + fll_program_print_help_option(main.output.to, main.context, controller_short_simulate_s, controller_long_simulate_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Run as a simulation."); + fll_program_print_help_option(main.output.to, main.context, controller_short_uninterruptable_s, controller_long_uninterruptable_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Designate that this program cannot be interrupted by a signal."); + fll_program_print_help_option(main.output.to, main.context, controller_short_validate_s, controller_long_validate_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Validate the settings (entry and rules) without running (does not simulate)."); fll_program_print_help_usage(main.output.to, main.context, main.program_name, "entry"); - fl_print_format(" When both the %[%s%s%] parameter and the", main.output.to.stream, main.context.set.notable, f_console_symbol_long_enable_s, controller_long_simulate, main.context.set.notable); - fl_print_format(" %[%s%s%] parameter are specified, then additional information on each would be executed rule is printed but no simulation is performed.%c%c", main.output.to.stream, main.context.set.notable, f_console_symbol_long_enable_s, controller_long_validate, main.context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" When both the %[%s%s%] parameter and the", main.output.to.stream, main.context.set.notable, f_console_symbol_long_enable_s, controller_long_simulate_s, main.context.set.notable); + fl_print_format(" %[%s%s%] parameter are specified, then additional information on each would be executed rule is printed but no simulation is performed.%c%c", main.output.to.stream, main.context.set.notable, f_console_symbol_long_enable_s, controller_long_validate_s, main.context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The default interrupt behavior is to operate as if the %[%s%s%] parameter is passed.%c%c", main.output.to.stream, main.context.set.notable, f_console_symbol_long_enable_s, main.setting_default.used ? controller_long_uninterruptable : controller_long_interruptable, main.context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" The default interrupt behavior is to operate as if the %[%s%s%] parameter is passed.%c%c", main.output.to.stream, main.context.set.notable, f_console_symbol_long_enable_s, main.setting_default.used ? controller_long_uninterruptable_s : controller_long_interruptable_s, main.context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" Specify an empty string for the %[%s%s%] parameter to disable pid file creation for this program.%c%c", main.output.to.stream, main.context.set.notable, f_console_symbol_long_enable_s, controller_long_pid, main.context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" Specify an empty string for the %[%s%s%] parameter to disable pid file creation for this program.%c%c", main.output.to.stream, main.context.set.notable, f_console_symbol_long_enable_s, controller_long_pid_s, main.context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); controller_print_unlock_flush(main.output.to, 0); @@ -60,7 +60,7 @@ extern "C" { f_status_t status = F_none; { - const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, controller_total_parameters); + const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, controller_total_parameters_d); { f_console_parameter_id_t ids[3] = { controller_parameter_no_color, controller_parameter_light, controller_parameter_dark }; @@ -140,7 +140,7 @@ extern "C" { if (main->parameters[controller_parameter_version].result == f_console_result_found) { controller_print_lock(main->output.to, 0); - fll_program_print_version(main->output.to, controller_version); + fll_program_print_version(main->output.to, controller_program_version_s); controller_print_unlock_flush(main->output.to, 0); @@ -154,7 +154,7 @@ extern "C" { status = f_string_append_nulless(arguments.argv[main->remaining.array[0]], strnlen(arguments.argv[main->remaining.array[0]], f_console_parameter_size), &setting.name_entry); } else { - status = f_string_append_nulless(controller_string_default_s, controller_string_default_length, &setting.name_entry); + status = f_string_append_nulless(controller_default_s, controller_default_s_length, &setting.name_entry); } if (F_status_is_error(status)) { @@ -186,7 +186,7 @@ extern "C" { controller_print_lock(main->error.to, 0); fl_print_format("%c%[%SThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix ? main->error.prefix : f_string_empty_s, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, controller_long_settings, main->context.set.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, controller_long_settings_s, main->context.set.notable); fl_print_format("%[' was specified, but no value was given.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); controller_print_unlock_flush(main->error.to, 0); @@ -205,13 +205,13 @@ extern "C" { } else { if (main->parameters[controller_parameter_init].result == f_console_result_found && !main->as_init) { - status = f_string_append(controller_path_settings_init, controller_path_settings_init_length, &setting.path_setting); + status = f_string_append(controller_path_settings_init_s, controller_path_settings_init_s_length, &setting.path_setting); } else if (main->setting_default.used) { status = f_string_append(main->setting_default.string, main->setting_default.used, &setting.path_setting); } else { - status = f_string_append(controller_path_settings, controller_path_settings_length, &setting.path_setting); + status = f_string_append(controller_path_settings_s, controller_path_settings_s_length, &setting.path_setting); } if (F_status_is_error(status)) { @@ -225,7 +225,7 @@ extern "C" { controller_print_lock(main->error.to, 0); fl_print_format("%c%[%SThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix ? main->error.prefix : f_string_empty_s, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, controller_long_pid, main->context.set.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, controller_long_pid_s, main->context.set.notable); fl_print_format("%[' was specified, but no value was given.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); controller_print_unlock_flush(main->error.to, 0); @@ -252,7 +252,7 @@ extern "C" { if (F_status_is_error_not(status) && !setting.path_pid.used && !main->parameters[controller_parameter_pid].locations.used) { if (main->parameters[controller_parameter_init].result == f_console_result_found) { - status = f_string_append(controller_path_pid_init, controller_path_pid_init_length, &setting.path_pid); + status = f_string_append(controller_path_pid_init_s, controller_path_pid_init_s_length, &setting.path_pid); } else { status = f_string_append(main->path_pid.string, main->path_pid.used, &setting.path_pid); @@ -263,7 +263,7 @@ extern "C" { } if (F_status_is_error_not(status)) { - status = f_string_append(controller_path_suffix, controller_path_suffix_length, &setting.path_pid); + status = f_string_append(controller_path_suffix_s, controller_path_suffix_s_length, &setting.path_pid); } if (F_status_is_error(status)) { @@ -277,7 +277,7 @@ extern "C" { controller_print_lock(main->error.to, 0); fl_print_format("%c%[%SThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix ? main->error.prefix : f_string_empty_s, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, controller_long_control, main->context.set.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, controller_long_control_s, main->context.set.notable); fl_print_format("%[' was specified, but no value was given.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); controller_print_unlock_flush(main->error.to, 0); @@ -295,7 +295,7 @@ extern "C" { fll_error_print(main->error, F_status_set_fine(status), "fll_path_canonical", F_true); } else { - status = f_string_append_assure(f_path_separator, 1, &setting.path_control); + status = f_string_append_assure(F_path_separator_s, 1, &setting.path_control); if (F_status_is_error(status)) { fll_error_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true); @@ -314,7 +314,7 @@ extern "C" { controller_print_lock(main->warning.to, 0); fl_print_format("%c%[%SThe parameter '%]", main->warning.to.stream, f_string_eol_s[0], main->warning.context, main->warning.prefix ? main->warning.prefix : f_string_empty_s, main->warning.context); - fl_print_format("%[%s%s%]", main->warning.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, controller_long_control, main->context.set.notable); + fl_print_format("%[%s%s%]", main->warning.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, controller_long_control_s, main->context.set.notable); fl_print_format("%[' must be a file directory path but instead is an empty string, falling back to the default.%]%c", main->warning.to.stream, main->warning.context, main->warning.context, f_string_eol_s[0]); controller_print_unlock_flush(main->warning.to, 0); @@ -330,7 +330,7 @@ extern "C" { fl_print_format("%c%[%SThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix ? main->error.prefix : f_string_empty_s, main->error.context); fl_print_format("%[' must not be specified with the parameter '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, controller_long_daemon, main->context.set.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, controller_long_daemon_s, main->context.set.notable); fl_print_format("%['.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); controller_print_unlock_flush(main->error.to, 0); @@ -378,17 +378,17 @@ extern "C" { // a control file path is required. if (!setting.path_control.used) { - status = f_string_append_nulless(f_control_group_path_system_prefix, f_control_group_path_system_prefix_length, &setting.path_control); + status = f_string_append_nulless(F_control_group_path_system_prefix_s, F_control_group_path_system_prefix_s_length, &setting.path_control); if (F_status_is_error_not(status)) { - status = f_string_append_nulless(f_control_group_path_system_default, f_control_group_path_system_default_length, &setting.path_control); + status = f_string_append_nulless(F_control_group_path_system_default_s, F_control_group_path_system_default_s_length, &setting.path_control); } if (F_status_is_error(status)) { fll_error_print(main->error, F_status_set_fine(status), "f_string_append_nulless", F_true); } else { - status = f_string_append_assure(f_path_separator, 1, &setting.path_control); + status = f_string_append_assure(F_path_separator_s, 1, &setting.path_control); if (F_status_is_error(status)) { fll_error_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true); @@ -452,7 +452,7 @@ extern "C" { #ifndef _di_controller_main_delete_ f_status_t controller_main_delete(controller_main_t *main) { - for (f_array_length_t i = 0; i < controller_total_parameters; ++i) { + for (f_array_length_t i = 0; i < controller_total_parameters_d; ++i) { macro_f_array_lengths_t_delete_simple(main->parameters[i].locations); macro_f_array_lengths_t_delete_simple(main->parameters[i].locations_sub); macro_f_array_lengths_t_delete_simple(main->parameters[i].values); diff --git a/level_3/controller/c/controller.h b/level_3/controller/c/controller.h index e8dc47b..aa48ee0 100644 --- a/level_3/controller/c/controller.h +++ b/level_3/controller/c/controller.h @@ -84,89 +84,89 @@ extern "C" { #endif -#ifndef _di_controller_version_ - #define controller_major_version f_string_ascii_0 - #define controller_minor_version f_string_ascii_5 - #define controller_micro_version f_string_ascii_6 +#ifndef _di_controller_program_version_ + #define controller_program_version_major_s F_string_ascii_0_s + #define controller_program_version_minor_s F_string_ascii_5_s + #define controller_program_version_micro_s F_string_ascii_6_s - #ifndef controller_nano_version_prefix - #define controller_nano_version_prefix + #ifndef controller_program_version_nano_prefix_s + #define controller_program_version_nano_prefix_s #endif - #ifndef controller_nano_version - #define controller_nano_version + #ifndef controller_program_version_nano_s + #define controller_program_version_nano_s #endif - #define controller_version controller_major_version f_string_ascii_period controller_minor_version f_string_ascii_period controller_micro_version controller_nano_version_prefix controller_nano_version -#endif // _di_controller_version_ + #define controller_program_version_s controller_program_version_major_s F_string_ascii_period_s controller_program_version_minor_s F_string_ascii_period_s controller_program_version_micro_s controller_program_version_nano_prefix_s controller_program_version_nano_s +#endif // _di_controller_program_version_ -#ifndef _di_controller_name_ - #define controller_name "controller" - #define controller_name_long "Controller Program" +#ifndef _di_controller_program_name_ + #define controller_program_name_s "controller" + #define controller_program_name_long_s "Controller Program" - #define controller_name_init "init" - #define controller_name_init_long "Init Program" -#endif // _di_controller_name_ + #define controller_program_name_init_s "init" + #define controller_program_name_init_long_s "Init Program" +#endif // _di_controller_program_name_ #ifndef _di_controller_defines_ // the init pid path is a system-specific path and needs to be more easily contolled at compile time. #if defined(_override_controller_path_pid_init_) && defined(_override_controller_path_pid_init_length_) - #define controller_path_pid_init _override_controller_path_pid_init_ - #define controller_path_pid_init_length _override_controller_path_pid_init_length_ + #define controller_path_pid_init_s _override_controller_path_pid_init_ + #define controller_path_pid_init_s_length _override_controller_path_pid_init_length_ #elif defined(_controller_as_init_) - #define controller_path_pid_init "/var/run/init/init-" - #define controller_path_pid_init_length 19 + #define controller_path_pid_init_s "/var/run/init/init-" + #define controller_path_pid_init_s_length 19 #else - #define controller_path_pid_init "/var/run/controller/controller-" - #define controller_path_pid_init_length 31 + #define controller_path_pid_init_s "/var/run/controller/controller-" + #define controller_path_pid_init_s_length 31 #endif /* defined(_override_controller_path_pid_init_) && defined(_override_controller_path_pid_init_length_) */ // the settings path is a system-specific path and needs to be more easily contolled at compile time. #if defined(_override_controller_path_settings_init_) && defined(_override_controller_path_settings_init_length_) - #define controller_path_settings_init _override_controller_path_settings_init_ - #define controller_path_settings_init_length _override_controller_path_settings_init_length_ + #define controller_path_settings_init_s _override_controller_path_settings_init_ + #define controller_path_settings_init_s_length _override_controller_path_settings_init_length_ #elif defined(_controller_as_init_) - #define controller_path_settings_init "/etc/init" - #define controller_path_settings_init_length 9 + #define controller_path_settings_init_s "/etc/init" + #define controller_path_settings_init_s_length 9 #else - #define controller_path_settings_init "/etc/controller" - #define controller_path_settings_init_length 15 + #define controller_path_settings_init_s "/etc/controller" + #define controller_path_settings_init_s_length 15 #endif /* defined(_override_controller_path_settings_init_) && defined(_override_controller_path_settings_init_length_) */ #ifdef _override_controller_default_program_script_ - #define controller_default_program_script _override_controller_default_program_script_ + #define controller_default_program_script_s _override_controller_default_program_script_ #else - #define controller_default_program_script "bash" + #define controller_default_program_script_s "bash" #endif // _override_controller_default_program_script_ - #define controller_path_pid "controller/run/controller-" - #define controller_path_settings "controller" - #define controller_path_suffix ".pid" - - #define controller_path_pid_length 26 - #define controller_path_settings_length 10 - #define controller_path_suffix_length 4 - - #define controller_short_control "c" - #define controller_short_daemon "d" - #define controller_short_init "I" - #define controller_short_interruptable "i" - #define controller_short_pid "p" - #define controller_short_settings "s" - #define controller_short_simulate "S" - #define controller_short_uninterruptable "U" - #define controller_short_validate "v" - - #define controller_long_control "control" - #define controller_long_daemon "daemon" - #define controller_long_init "init" - #define controller_long_interruptable "interruptable" - #define controller_long_pid "pid" - #define controller_long_settings "settings" - #define controller_long_simulate "simulate" - #define controller_long_uninterruptable "uninterruptable" - #define controller_long_validate "validate" + #define controller_path_pid_s "controller/run/controller-" + #define controller_path_settings_s "controller" + #define controller_path_suffix_s ".pid" + + #define controller_path_pid_s_length 26 + #define controller_path_settings_s_length 10 + #define controller_path_suffix_s_length 4 + + #define controller_short_control_s "c" + #define controller_short_daemon_s "d" + #define controller_short_init_s "I" + #define controller_short_interruptable_s "i" + #define controller_short_pid_s "p" + #define controller_short_settings_s "s" + #define controller_short_simulate_s "S" + #define controller_short_uninterruptable_s "U" + #define controller_short_validate_s "v" + + #define controller_long_control_s "control" + #define controller_long_daemon_s "daemon" + #define controller_long_init_s "init" + #define controller_long_interruptable_s "interruptable" + #define controller_long_pid_s "pid" + #define controller_long_settings_s "settings" + #define controller_long_simulate_s "simulate" + #define controller_long_uninterruptable_s "uninterruptable" + #define controller_long_validate_s "validate" enum { controller_parameter_help, @@ -201,23 +201,23 @@ extern "C" { f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(controller_short_control, controller_long_control, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(controller_short_daemon, controller_long_daemon, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(controller_short_init, controller_long_init, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(controller_short_interruptable, controller_long_interruptable, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(controller_short_pid, controller_long_pid, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(controller_short_settings, controller_long_settings, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(controller_short_simulate, controller_long_simulate, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(controller_short_uninterruptable, controller_long_uninterruptable, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(controller_short_validate, controller_long_validate, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(controller_short_control_s, controller_long_control_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(controller_short_daemon_s, controller_long_daemon_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(controller_short_init_s, controller_long_init_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(controller_short_interruptable_s, controller_long_interruptable_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(controller_short_pid_s, controller_long_pid_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(controller_short_settings_s, controller_long_settings_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(controller_short_simulate_s, controller_long_simulate_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(controller_short_uninterruptable_s, controller_long_uninterruptable_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(controller_short_validate_s, controller_long_validate_s, 0, 0, f_console_type_normal), \ } - #define controller_total_parameters 18 + #define controller_total_parameters_d 18 #endif // _di_controller_defines_ #ifndef _di_controller_main_t_ typedef struct { - f_console_parameter_t parameters[controller_total_parameters]; + f_console_parameter_t parameters[controller_total_parameters_d]; f_array_lengths_t remaining; bool process_pipe; diff --git a/level_3/controller/c/main.c b/level_3/controller/c/main.c index be3a7aa..352d08e 100644 --- a/level_3/controller/c/main.c +++ b/level_3/controller/c/main.c @@ -37,30 +37,30 @@ int main(const int argc, const f_string_t *argv) { // when run as "init" by default, provide the default system-level init path. // this change must only exist within this main file so that the change only exists within the program rather than the library. #ifdef _controller_as_init_ - data.program_name = controller_name_init; - data.program_name_long = controller_name_init_long; - data.setting_default.string = controller_path_settings_init; - data.setting_default.used = controller_path_settings_init_length; - data.path_pid.string = controller_path_pid_init; - data.path_pid.used = controller_path_pid_init_length; + data.program_name = controller_program_name_init_s; + data.program_name_long = controller_program_name_init_long_s; + data.setting_default.string = controller_path_settings_init_s; + data.setting_default.used = controller_path_settings_init_s_length; + data.path_pid.string = controller_path_pid_init_s; + data.path_pid.used = controller_path_pid_init_s_length; data.as_init = F_true; #else - data.program_name = controller_name; - data.program_name_long = controller_name_long; - data.path_pid.string = controller_path_pid; - data.path_pid.used = controller_path_pid_length; + data.program_name = controller_program_name_s; + data.program_name_long = controller_program_name_long_s; + data.path_pid.string = controller_path_pid_s; + data.path_pid.used = controller_path_pid_s_length; #endif // _controller_as_init_ status = controller_main(arguments, &data); // flush output pipes before closing. - fflush(f_type_output); - fflush(f_type_error); + fflush(F_type_output_d); + fflush(F_type_error_d); // close all open file descriptors. - close(f_type_descriptor_output); - close(f_type_descriptor_input); - close(f_type_descriptor_error); + close(F_type_descriptor_output_d); + close(F_type_descriptor_input_d); + close(F_type_descriptor_error_d); f_signal_close(&data.signal); diff --git a/level_3/controller/c/private-common.c b/level_3/controller/c/private-common.c index 634b4d2..1e45f24 100644 --- a/level_3/controller/c/private-common.c +++ b/level_3/controller/c/private-common.c @@ -8,113 +8,113 @@ extern "C" { #endif #ifndef _di_controller_string_s_ - const f_string_t controller_string_action_s = controller_string_action; - const f_string_t controller_string_actions_s = controller_string_actions; - const f_string_t controller_string_affinity_s = controller_string_affinity; - const f_string_t controller_string_as_s = controller_string_as; - const f_string_t controller_string_asynchronous_s = controller_string_asynchronous; - const f_string_t controller_string_bash_s = controller_string_bash; - const f_string_t controller_string_batch_s = controller_string_batch; - const f_string_t controller_string_capability_s = controller_string_capability; - const f_string_t controller_string_create_s = controller_string_create; - const f_string_t controller_string_command_s = controller_string_command; - const f_string_t controller_string_consider_s = controller_string_consider; - const f_string_t controller_string_control_s = controller_string_control; - const f_string_t controller_string_control_group_s = controller_string_control_group; - const f_string_t controller_string_cpu_s = controller_string_cpu; - const f_string_t controller_string_core_s = controller_string_core; - const f_string_t controller_string_data_s = controller_string_data; - const f_string_t controller_string_deadline_s = controller_string_deadline; - const f_string_t controller_string_default_s = controller_string_default; - const f_string_t controller_string_define_s = controller_string_define; - const f_string_t controller_string_delay_s = controller_string_delay; - const f_string_t controller_string_disable_s = controller_string_disable; - const f_string_t controller_string_entry_s = controller_string_entry; - const f_string_t controller_string_entries_s = controller_string_entries; - const f_string_t controller_string_environment_s = controller_string_environment; - const f_string_t controller_string_execute_s = controller_string_execute; - const f_string_t controller_string_existing_s = controller_string_existing; - const f_string_t controller_string_exit_s = controller_string_exit; - const f_string_t controller_string_exits_s = controller_string_exits; - const f_string_t controller_string_fail_s = controller_string_fail; - const f_string_t controller_string_failsafe_s = controller_string_failsafe; - const f_string_t controller_string_failure_s = controller_string_failure; - const f_string_t controller_string_fifo_s = controller_string_fifo; - const f_string_t controller_string_freeze_s = controller_string_freeze; - const f_string_t controller_string_fsize_s = controller_string_fsize; - const f_string_t controller_string_full_path_s = controller_string_full_path; - const f_string_t controller_string_group_s = controller_string_group; - const f_string_t controller_string_groups_s = controller_string_groups; - const f_string_t controller_string_how_s = controller_string_how; - const f_string_t controller_string_idle_s = controller_string_idle; - const f_string_t controller_string_item_s = controller_string_item; - const f_string_t controller_string_init_s = controller_string_init; - const f_string_t controller_string_kill_s = controller_string_kill; - const f_string_t controller_string_limit_s = controller_string_limit; - const f_string_t controller_string_locks_s = controller_string_locks; - const f_string_t controller_string_main_s = controller_string_main; - const f_string_t controller_string_max_s = controller_string_max; - const f_string_t controller_string_memlock_s = controller_string_memlock; - const f_string_t controller_string_method_s = controller_string_method; - const f_string_t controller_string_mode_s = controller_string_mode; - const f_string_t controller_string_msgqueue_s = controller_string_msgqueue; - const f_string_t controller_string_name_s = controller_string_name; - const f_string_t controller_string_need_s = controller_string_need; - const f_string_t controller_string_new_s = controller_string_new; - const f_string_t controller_string_nice_s = controller_string_nice; - const f_string_t controller_string_no_s = controller_string_no; - const f_string_t controller_string_nofile_s = controller_string_nofile; - const f_string_t controller_string_normal_s = controller_string_normal; - const f_string_t controller_string_nproc_s = controller_string_nproc; - const f_string_t controller_string_on_s = controller_string_on; - const f_string_t controller_string_optional_s = controller_string_optional; - const f_string_t controller_string_other_s = controller_string_other; - const f_string_t controller_string_parameter_s = controller_string_parameter; - const f_string_t controller_string_parameters_s = controller_string_parameters; - const f_string_t controller_string_path_s = controller_string_path; - const f_string_t controller_string_pause_s = controller_string_pause; - const f_string_t controller_string_pid_s = controller_string_pid; - const f_string_t controller_string_pid_file_s = controller_string_pid_file; - const f_string_t controller_string_processor_s = controller_string_processor; - const f_string_t controller_string_program_s = controller_string_program; - const f_string_t controller_string_ready_s = controller_string_ready; - const f_string_t controller_string_reload_s = controller_string_reload; - const f_string_t controller_string_require_s = controller_string_require; - const f_string_t controller_string_required_s = controller_string_required; - const f_string_t controller_string_rerun_s = controller_string_rerun; - const f_string_t controller_string_reset_s = controller_string_reset; - const f_string_t controller_string_restart_s = controller_string_restart; - const f_string_t controller_string_resume_s = controller_string_resume; - const f_string_t controller_string_round_robin_s = controller_string_round_robin; - const f_string_t controller_string_rss_s = controller_string_rss; - const f_string_t controller_string_rtprio_s = controller_string_rtprio; - const f_string_t controller_string_rttime_s = controller_string_rttime; - const f_string_t controller_string_rule_s = controller_string_rule; - const f_string_t controller_string_rules_s = controller_string_rules; - const f_string_t controller_string_scheduler_s = controller_string_scheduler; - const f_string_t controller_string_script_s = controller_string_script; - const f_string_t controller_string_service_s = controller_string_service; - const f_string_t controller_string_setting_s = controller_string_setting; - const f_string_t controller_string_show_s = controller_string_show; - const f_string_t controller_string_sigpending_s = controller_string_sigpending; - const f_string_t controller_string_stack_s = controller_string_stack; - const f_string_t controller_string_start_s = controller_string_start; - const f_string_t controller_string_stop_s = controller_string_stop; - const f_string_t controller_string_succeed_s = controller_string_succeed; - const f_string_t controller_string_success_s = controller_string_success; - const f_string_t controller_string_synchronous_s = controller_string_synchronous; - const f_string_t controller_string_thaw_s = controller_string_thaw; - const f_string_t controller_string_timeout_s = controller_string_timeout; - const f_string_t controller_string_type_s = controller_string_type; - const f_string_t controller_string_use_s = controller_string_use; - const f_string_t controller_string_user_s = controller_string_user; - const f_string_t controller_string_utility_s = controller_string_utility; - const f_string_t controller_string_value_s = controller_string_value; - const f_string_t controller_string_wait_s = controller_string_wait; - const f_string_t controller_string_want_s = controller_string_want; - const f_string_t controller_string_wish_s = controller_string_wish; - const f_string_t controller_string_with_s = controller_string_with; - const f_string_t controller_string_yes_s = controller_string_yes; + const f_string_t controller_action_s = CONTROLLER_action_s; + const f_string_t controller_actions_s = CONTROLLER_actions_s; + const f_string_t controller_affinity_s = CONTROLLER_affinity_s; + const f_string_t controller_as_s = CONTROLLER_as_s; + const f_string_t controller_asynchronous_s = CONTROLLER_asynchronous_s; + const f_string_t controller_bash_s = CONTROLLER_bash_s; + const f_string_t controller_batch_s = CONTROLLER_batch_s; + const f_string_t controller_capability_s = CONTROLLER_capability_s; + const f_string_t controller_create_s = CONTROLLER_create_s; + const f_string_t controller_command_s = CONTROLLER_command_s; + const f_string_t controller_consider_s = CONTROLLER_consider_s; + const f_string_t controller_control_s = CONTROLLER_control_s; + const f_string_t controller_control_group_s = CONTROLLER_control_group_s; + const f_string_t controller_cpu_s = CONTROLLER_cpu_s; + const f_string_t controller_core_s = CONTROLLER_core_s; + const f_string_t controller_data_s = CONTROLLER_data_s; + const f_string_t controller_deadline_s = CONTROLLER_deadline_s; + const f_string_t controller_default_s = CONTROLLER_default_s; + const f_string_t controller_define_s = CONTROLLER_define_s; + const f_string_t controller_delay_s = CONTROLLER_delay_s; + const f_string_t controller_disable_s = CONTROLLER_disable_s; + const f_string_t controller_entry_s = CONTROLLER_entry_s; + const f_string_t controller_entries_s = CONTROLLER_entries_s; + const f_string_t controller_environment_s = CONTROLLER_environment_s; + const f_string_t controller_execute_s = CONTROLLER_execute_s; + const f_string_t controller_existing_s = CONTROLLER_existing_s; + const f_string_t controller_exit_s = CONTROLLER_exit_s; + const f_string_t controller_exits_s = CONTROLLER_exits_s; + const f_string_t controller_fail_s = CONTROLLER_fail_s; + const f_string_t controller_failsafe_s = CONTROLLER_failsafe_s; + const f_string_t controller_failure_s = CONTROLLER_failure_s; + const f_string_t controller_fifo_s = CONTROLLER_fifo_s; + const f_string_t controller_freeze_s = CONTROLLER_freeze_s; + const f_string_t controller_fsize_s = CONTROLLER_fsize_s; + const f_string_t controller_full_path_s = CONTROLLER_full_path_s; + const f_string_t controller_group_s = CONTROLLER_group_s; + const f_string_t controller_groups_s = CONTROLLER_groups_s; + const f_string_t controller_how_s = CONTROLLER_how_s; + const f_string_t controller_idle_s = CONTROLLER_idle_s; + const f_string_t controller_item_s = CONTROLLER_item_s; + const f_string_t controller_init_s = CONTROLLER_init_s; + const f_string_t controller_kill_s = CONTROLLER_kill_s; + const f_string_t controller_limit_s = CONTROLLER_limit_s; + const f_string_t controller_locks_s = CONTROLLER_locks_s; + const f_string_t controller_main_s = CONTROLLER_main_s; + const f_string_t controller_max_s = CONTROLLER_max_s; + const f_string_t controller_memlock_s = CONTROLLER_memlock_s; + const f_string_t controller_method_s = CONTROLLER_method_s; + const f_string_t controller_mode_s = CONTROLLER_mode_s; + const f_string_t controller_msgqueue_s = CONTROLLER_msgqueue_s; + const f_string_t controller_name_s = CONTROLLER_name_s; + const f_string_t controller_need_s = CONTROLLER_need_s; + const f_string_t controller_new_s = CONTROLLER_new_s; + const f_string_t controller_nice_s = CONTROLLER_nice_s; + const f_string_t controller_no_s = CONTROLLER_no_s; + const f_string_t controller_nofile_s = CONTROLLER_nofile_s; + const f_string_t controller_normal_s = CONTROLLER_normal_s; + const f_string_t controller_nproc_s = CONTROLLER_nproc_s; + const f_string_t controller_on_s = CONTROLLER_on_s; + const f_string_t controller_optional_s = CONTROLLER_optional_s; + const f_string_t controller_other_s = CONTROLLER_other_s; + const f_string_t controller_parameter_s = CONTROLLER_parameter_s; + const f_string_t controller_parameters_s = CONTROLLER_parameters_s; + const f_string_t controller_path_s = CONTROLLER_path_s; + const f_string_t controller_pause_s = CONTROLLER_pause_s; + const f_string_t controller_pid_s = CONTROLLER_pid_s; + const f_string_t controller_pid_file_s = CONTROLLER_pid_file_s; + const f_string_t controller_processor_s = CONTROLLER_processor_s; + const f_string_t controller_program_s = CONTROLLER_program_s; + const f_string_t controller_ready_s = CONTROLLER_ready_s; + const f_string_t controller_reload_s = CONTROLLER_reload_s; + const f_string_t controller_require_s = CONTROLLER_require_s; + const f_string_t controller_required_s = CONTROLLER_required_s; + const f_string_t controller_rerun_s = CONTROLLER_rerun_s; + const f_string_t controller_reset_s = CONTROLLER_reset_s; + const f_string_t controller_restart_s = CONTROLLER_restart_s; + const f_string_t controller_resume_s = CONTROLLER_resume_s; + const f_string_t controller_round_robin_s = CONTROLLER_round_robin_s; + const f_string_t controller_rss_s = CONTROLLER_rss_s; + const f_string_t controller_rtprio_s = CONTROLLER_rtprio_s; + const f_string_t controller_rttime_s = CONTROLLER_rttime_s; + const f_string_t controller_rule_s = CONTROLLER_rule_s; + const f_string_t controller_rules_s = CONTROLLER_rules_s; + const f_string_t controller_scheduler_s = CONTROLLER_scheduler_s; + const f_string_t controller_script_s = CONTROLLER_script_s; + const f_string_t controller_service_s = CONTROLLER_service_s; + const f_string_t controller_setting_s = CONTROLLER_setting_s; + const f_string_t controller_show_s = CONTROLLER_show_s; + const f_string_t controller_sigpending_s = CONTROLLER_sigpending_s; + const f_string_t controller_stack_s = CONTROLLER_stack_s; + const f_string_t controller_start_s = CONTROLLER_start_s; + const f_string_t controller_stop_s = CONTROLLER_stop_s; + const f_string_t controller_succeed_s = CONTROLLER_succeed_s; + const f_string_t controller_success_s = CONTROLLER_success_s; + const f_string_t controller_synchronous_s = CONTROLLER_synchronous_s; + const f_string_t controller_thaw_s = CONTROLLER_thaw_s; + const f_string_t controller_timeout_s = CONTROLLER_timeout_s; + const f_string_t controller_type_s = CONTROLLER_type_s; + const f_string_t controller_use_s = CONTROLLER_use_s; + const f_string_t controller_user_s = CONTROLLER_user_s; + const f_string_t controller_utility_s = CONTROLLER_utility_s; + const f_string_t controller_value_s = CONTROLLER_value_s; + const f_string_t controller_wait_s = CONTROLLER_wait_s; + const f_string_t controller_want_s = CONTROLLER_want_s; + const f_string_t controller_wish_s = CONTROLLER_wish_s; + const f_string_t controller_with_s = CONTROLLER_with_s; + const f_string_t controller_yes_s = CONTROLLER_yes_s; #endif // _di_controller_string_s_ #ifndef _di_controller_cache_action_delete_simple_ @@ -350,7 +350,7 @@ extern "C" { for (;;) { - controller_time(controller_thread_lock_read_timeout_seconds, controller_thread_lock_read_timeout_nanoseconds, &time); + controller_time(controller_thread_lock_read_timeout_seconds_d, controller_thread_lock_read_timeout_nanoseconds_d, &time); status = f_thread_lock_read_timed(&time, lock); @@ -391,7 +391,7 @@ extern "C" { for (;;) { - controller_time(controller_thread_lock_write_timeout_seconds, controller_thread_lock_write_timeout_nanoseconds, &time); + controller_time(controller_thread_lock_write_timeout_seconds_d, controller_thread_lock_write_timeout_nanoseconds_d, &time); status = f_thread_lock_write_timed(&time, lock); @@ -427,14 +427,14 @@ extern "C" { f_status_t controller_pids_increase(controller_pids_t *pids) { if (pids->used + 1 > pids->size) { - f_array_length_t size = pids->used + controller_common_allocation_small; + f_array_length_t size = pids->used + controller_common_allocation_small_d; - if (size > f_array_length_t_size) { - if (pids->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (pids->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return controller_pids_resize(size, pids); @@ -529,17 +529,17 @@ extern "C" { do { f_thread_mutex_lock(&process->wait_lock); - if (count < controller_thread_wait_timeout_1_before) { - controller_time(controller_thread_wait_timeout_1_seconds, controller_thread_wait_timeout_1_nanoseconds, &time); + if (count < controller_thread_wait_timeout_1_before_d) { + controller_time(controller_thread_wait_timeout_1_seconds_d, controller_thread_wait_timeout_1_nanoseconds_d, &time); } - else if (count < controller_thread_wait_timeout_2_before) { - controller_time(controller_thread_wait_timeout_2_seconds, controller_thread_wait_timeout_2_nanoseconds, &time); + else if (count < controller_thread_wait_timeout_2_before_d) { + controller_time(controller_thread_wait_timeout_2_seconds_d, controller_thread_wait_timeout_2_nanoseconds_d, &time); } - else if (count < controller_thread_wait_timeout_3_before) { - controller_time(controller_thread_wait_timeout_3_seconds, controller_thread_wait_timeout_3_nanoseconds, &time); + else if (count < controller_thread_wait_timeout_3_before_d) { + controller_time(controller_thread_wait_timeout_3_seconds_d, controller_thread_wait_timeout_3_nanoseconds_d, &time); } else { - controller_time(controller_thread_wait_timeout_4_seconds, controller_thread_wait_timeout_4_nanoseconds, &time); + controller_time(controller_thread_wait_timeout_4_seconds_d, controller_thread_wait_timeout_4_nanoseconds_d, &time); } status = f_thread_condition_wait_timed(&time, &process->wait, &process->wait_lock); @@ -570,20 +570,20 @@ extern "C" { else if (status != F_time) { // move up the wait timer after a trigger was received. - if (count < controller_thread_wait_timeout_2_before) { + if (count < controller_thread_wait_timeout_2_before_d) { count = 0; } - else if (count < controller_thread_wait_timeout_3_before) { - count = controller_thread_wait_timeout_1_before; + else if (count < controller_thread_wait_timeout_3_before_d) { + count = controller_thread_wait_timeout_1_before_d; } else { - count = controller_thread_wait_timeout_2_before; + count = controller_thread_wait_timeout_2_before_d; } } f_thread_unlock(&process->lock); - if (count < controller_thread_wait_timeout_3_before) { + if (count < controller_thread_wait_timeout_3_before_d) { ++count; } @@ -604,14 +604,14 @@ extern "C" { f_status_t controller_processs_increase(controller_processs_t *processs) { if (processs->used + 1 > processs->size) { - f_array_length_t size = processs->used + controller_common_allocation_small; + f_array_length_t size = processs->used + controller_common_allocation_small_d; - if (size > f_array_length_t_size) { - if (processs->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (processs->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return controller_processs_resize(size, processs); @@ -785,14 +785,14 @@ extern "C" { f_status_t controller_rule_ons_increase(controller_rule_ons_t *ons) { if (ons->used + 1 > ons->size) { - f_array_length_t size = ons->used + controller_common_allocation_small; + f_array_length_t size = ons->used + controller_common_allocation_small_d; - if (size > f_array_length_t_size) { - if (ons->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (ons->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return controller_rule_ons_resize(size, ons); @@ -836,14 +836,14 @@ extern "C" { f_status_t controller_rules_increase(controller_rules_t *rules) { if (rules->used + 1 > rules->size) { - f_array_length_t size = rules->used + controller_common_allocation_small; + f_array_length_t size = rules->used + controller_common_allocation_small_d; - if (size > f_array_length_t_size) { - if (rules->used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (rules->used + 1 > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } - size = f_array_length_t_size; + size = F_array_length_t_size_d; } return controller_rules_resize(size, rules); diff --git a/level_3/controller/c/private-common.h b/level_3/controller/c/private-common.h index e0c72fc..69bfa8b 100644 --- a/level_3/controller/c/private-common.h +++ b/level_3/controller/c/private-common.h @@ -18,329 +18,329 @@ extern "C" { * These are generally the names to match, representing some action or setting. */ #ifndef _di_controller_string_s_ - #define controller_string_action "action" - #define controller_string_actions "actions" - #define controller_string_affinity "affinity" - #define controller_string_as "as" - #define controller_string_asynchronous "asynchronous" - #define controller_string_bash "bash" - #define controller_string_batch "batch" - #define controller_string_capability "capability" - #define controller_string_create "create" - #define controller_string_command "command" - #define controller_string_consider "consider" - #define controller_string_control "control" - #define controller_string_control_group "control_group" - #define controller_string_cpu "cpu" - #define controller_string_core "core" - #define controller_string_data "data" - #define controller_string_deadline "deadline" - #define controller_string_default "default" - #define controller_string_define "define" - #define controller_string_delay "delay" - #define controller_string_disable "disable" - #define controller_string_entry "entry" - #define controller_string_entries "entries" - #define controller_string_environment "environment" - #define controller_string_execute "execute" - #define controller_string_existing "existing" - #define controller_string_exit "exit" - #define controller_string_exits "exits" - #define controller_string_fail "fail" - #define controller_string_failsafe "failsafe" - #define controller_string_failure "failure" - #define controller_string_fifo "fifo" - #define controller_string_freeze "freeze" - #define controller_string_fsize "fsize" - #define controller_string_full_path "full_path" - #define controller_string_group "group" - #define controller_string_groups "groups" - #define controller_string_how "how" - #define controller_string_idle "idle" - #define controller_string_item "item" - #define controller_string_init "init" - #define controller_string_kill "kill" - #define controller_string_limit "limit" - #define controller_string_locks "locks" - #define controller_string_main "main" - #define controller_string_max "max" - #define controller_string_memlock "memlock" - #define controller_string_method "method" - #define controller_string_mode "mode" - #define controller_string_msgqueue "msgqueue" - #define controller_string_name "name" - #define controller_string_need "need" - #define controller_string_new "new" - #define controller_string_nice "nice" - #define controller_string_no "no" - #define controller_string_nofile "nofile" - #define controller_string_normal "normal" - #define controller_string_nproc "nproc" - #define controller_string_on "on" - #define controller_string_optional "optional" - #define controller_string_other "other" - #define controller_string_parameter "parameter" - #define controller_string_parameters "parameters" - #define controller_string_path "path" - #define controller_string_pause "pause" - #define controller_string_pid "pid" - #define controller_string_pid_file "pid_file" - #define controller_string_processor "processor" - #define controller_string_program "program" - #define controller_string_ready "ready" - #define controller_string_reload "reload" - #define controller_string_require "require" - #define controller_string_required "required" - #define controller_string_rerun "rerun" - #define controller_string_reset "reset" - #define controller_string_restart "restart" - #define controller_string_resume "resume" - #define controller_string_round_robin "round_robin" - #define controller_string_rss "rss" - #define controller_string_rtprio "rtprio" - #define controller_string_rttime "rttime" - #define controller_string_rule "rule" - #define controller_string_rules "rules" - #define controller_string_scheduler "scheduler" - #define controller_string_script "script" - #define controller_string_service "service" - #define controller_string_setting "setting" - #define controller_string_sigpending "sigpending" - #define controller_string_show "show" - #define controller_string_stack "stack" - #define controller_string_start "start" - #define controller_string_stop "stop" - #define controller_string_succeed "succeed" - #define controller_string_success "success" - #define controller_string_synchronous "synchronous" - #define controller_string_thaw "thaw" - #define controller_string_timeout "timeout" - #define controller_string_type "type" - #define controller_string_use "use" - #define controller_string_user "user" - #define controller_string_utility "utility" - #define controller_string_value "value" - #define controller_string_wait "wait" - #define controller_string_want "want" - #define controller_string_wish "wish" - #define controller_string_with "with" - #define controller_string_yes "yes" - - #define controller_string_action_length 6 - #define controller_string_actions_length 7 - #define controller_string_affinity_length 8 - #define controller_string_as_length 2 - #define controller_string_asynchronous_length 12 - #define controller_string_bash_length 4 - #define controller_string_batch_length 5 - #define controller_string_capability_length 10 - #define controller_string_create_length 6 - #define controller_string_command_length 7 - #define controller_string_consider_length 8 - #define controller_string_control_length 7 - #define controller_string_control_group_length 13 - #define controller_string_core_length 4 - #define controller_string_cpu_length 3 - #define controller_string_data_length 4 - #define controller_string_deadline_length 8 - #define controller_string_default_length 7 - #define controller_string_define_length 6 - #define controller_string_delay_length 5 - #define controller_string_disable_length 7 - #define controller_string_entry_length 5 - #define controller_string_entries_length 7 - #define controller_string_environment_length 11 - #define controller_string_existing_length 8 - #define controller_string_execute_length 7 - #define controller_string_exit_length 4 - #define controller_string_exits_length 5 - #define controller_string_fail_length 4 - #define controller_string_failure_length 7 - #define controller_string_failsafe_length 8 - #define controller_string_fifo_length 4 - #define controller_string_freeze_length 6 - #define controller_string_fsize_length 5 - #define controller_string_full_path_length 9 - #define controller_string_group_length 5 - #define controller_string_groups_length 6 - #define controller_string_how_length 3 - #define controller_string_idle_length 4 - #define controller_string_init_length 4 - #define controller_string_item_length 4 - #define controller_string_kill_length 4 - #define controller_string_limit_length 5 - #define controller_string_locks_length 5 - #define controller_string_main_length 4 - #define controller_string_max_length 3 - #define controller_string_memlock_length 7 - #define controller_string_method_length 6 - #define controller_string_mode_length 4 - #define controller_string_msgqueue_length 8 - #define controller_string_name_length 4 - #define controller_string_need_length 4 - #define controller_string_new_length 3 - #define controller_string_nice_length 4 - #define controller_string_no_length 2 - #define controller_string_nofile_length 6 - #define controller_string_normal_length 6 - #define controller_string_nproc_length 5 - #define controller_string_on_length 2 - #define controller_string_optional_length 8 - #define controller_string_other_length 5 - #define controller_string_parameter_length 9 - #define controller_string_parameters_length 10 - #define controller_string_path_length 4 - #define controller_string_pause_length 5 - #define controller_string_pid_length 3 - #define controller_string_pid_file_length 8 - #define controller_string_processor_length 9 - #define controller_string_program_length 7 - #define controller_string_ready_length 5 - #define controller_string_reload_length 6 - #define controller_string_require_length 7 - #define controller_string_required_length 8 - #define controller_string_rerun_length 5 - #define controller_string_reset_length 5 - #define controller_string_restart_length 7 - #define controller_string_resume_length 6 - #define controller_string_round_robin_length 11 - #define controller_string_rss_length 3 - #define controller_string_rtprio_length 6 - #define controller_string_rttime_length 6 - #define controller_string_rule_length 4 - #define controller_string_rules_length 5 - #define controller_string_scheduler_length 9 - #define controller_string_script_length 6 - #define controller_string_service_length 7 - #define controller_string_setting_length 7 - #define controller_string_show_length 4 - #define controller_string_sigpending_length 10 - #define controller_string_stack_length 5 - #define controller_string_start_length 5 - #define controller_string_stop_length 4 - #define controller_string_succeed_length 7 - #define controller_string_success_length 7 - #define controller_string_synchronous_length 11 - #define controller_string_thaw_length 4 - #define controller_string_timeout_length 7 - #define controller_string_type_length 4 - #define controller_string_use_length 3 - #define controller_string_user_length 4 - #define controller_string_utility_length 7 - #define controller_string_value_length 5 - #define controller_string_wait_length 4 - #define controller_string_want_length 4 - #define controller_string_wish_length 4 - #define controller_string_with_length 4 - #define controller_string_yes_length 3 - - extern const f_string_t controller_string_action_s; - extern const f_string_t controller_string_actions_s; - extern const f_string_t controller_string_affinity_s; - extern const f_string_t controller_string_as_s; - extern const f_string_t controller_string_asynchronous_s; - extern const f_string_t controller_string_bash_s; - extern const f_string_t controller_string_batch_s; - extern const f_string_t controller_string_capability_s; - extern const f_string_t controller_string_create_s; - extern const f_string_t controller_string_command_s; - extern const f_string_t controller_string_consider_s; - extern const f_string_t controller_string_control_s; - extern const f_string_t controller_string_control_group_s; - extern const f_string_t controller_string_core_s; - extern const f_string_t controller_string_cpu_s; - extern const f_string_t controller_string_data_s; - extern const f_string_t controller_string_deadline_s; - extern const f_string_t controller_string_default_s; - extern const f_string_t controller_string_define_s; - extern const f_string_t controller_string_delay_s; - extern const f_string_t controller_string_disable_s; - extern const f_string_t controller_string_entry_s; - extern const f_string_t controller_string_entries_s; - extern const f_string_t controller_string_environment_s; - extern const f_string_t controller_string_existing_s; - extern const f_string_t controller_string_execute_s; - extern const f_string_t controller_string_exit_s; - extern const f_string_t controller_string_exits_s; - extern const f_string_t controller_string_fail_s; - extern const f_string_t controller_string_failsafe_s; - extern const f_string_t controller_string_failure_s; - extern const f_string_t controller_string_fifo_s; - extern const f_string_t controller_string_freeze_s; - extern const f_string_t controller_string_fsize_s; - extern const f_string_t controller_string_full_path_s; - extern const f_string_t controller_string_group_s; - extern const f_string_t controller_string_groups_s; - extern const f_string_t controller_string_how_s; - extern const f_string_t controller_string_idle_s; - extern const f_string_t controller_string_init_s; - extern const f_string_t controller_string_item_s; - extern const f_string_t controller_string_kill_s; - extern const f_string_t controller_string_limit_s; - extern const f_string_t controller_string_locks_s; - extern const f_string_t controller_string_main_s; - extern const f_string_t controller_string_max_s; - extern const f_string_t controller_string_memlock_s; - extern const f_string_t controller_string_method_s; - extern const f_string_t controller_string_mode_s; - extern const f_string_t controller_string_msgqueue_s; - extern const f_string_t controller_string_name_s; - extern const f_string_t controller_string_need_s; - extern const f_string_t controller_string_new_s; - extern const f_string_t controller_string_nice_s; - extern const f_string_t controller_string_no_s; - extern const f_string_t controller_string_nofile_s; - extern const f_string_t controller_string_normal_s; - extern const f_string_t controller_string_nproc_s; - extern const f_string_t controller_string_on_s; - extern const f_string_t controller_string_optional_s; - extern const f_string_t controller_string_other_s; - extern const f_string_t controller_string_parameter_s; - extern const f_string_t controller_string_parameters_s; - extern const f_string_t controller_string_path_s; - extern const f_string_t controller_string_pause_s; - extern const f_string_t controller_string_pid_s; - extern const f_string_t controller_string_pid_file_s; - extern const f_string_t controller_string_processor_s; - extern const f_string_t controller_string_program_s; - extern const f_string_t controller_string_ready_s; - extern const f_string_t controller_string_reload_s; - extern const f_string_t controller_string_require_s; - extern const f_string_t controller_string_required_s; - extern const f_string_t controller_string_rerun_s; - extern const f_string_t controller_string_reset_s; - extern const f_string_t controller_string_restart_s; - extern const f_string_t controller_string_resume_s; - extern const f_string_t controller_string_round_robin_s; - extern const f_string_t controller_string_rss_s; - extern const f_string_t controller_string_rtprio_s; - extern const f_string_t controller_string_rttime_s; - extern const f_string_t controller_string_rule_s; - extern const f_string_t controller_string_rules_s; - extern const f_string_t controller_string_scheduler_s; - extern const f_string_t controller_string_script_s; - extern const f_string_t controller_string_service_s; - extern const f_string_t controller_string_setting_s; - extern const f_string_t controller_string_show_s; - extern const f_string_t controller_string_sigpending_s; - extern const f_string_t controller_string_stack_s; - extern const f_string_t controller_string_start_s; - extern const f_string_t controller_string_stop_s; - extern const f_string_t controller_string_succeed_s; - extern const f_string_t controller_string_success_s; - extern const f_string_t controller_string_synchronous_s; - extern const f_string_t controller_string_thaw_s; - extern const f_string_t controller_string_timeout_s; - extern const f_string_t controller_string_type_s; - extern const f_string_t controller_string_use_s; - extern const f_string_t controller_string_user_s; - extern const f_string_t controller_string_utility_s; - extern const f_string_t controller_string_value_s; - extern const f_string_t controller_string_wait_s; - extern const f_string_t controller_string_want_s; - extern const f_string_t controller_string_wish_s; - extern const f_string_t controller_string_with_s; - extern const f_string_t controller_string_yes_s; + #define CONTROLLER_action_s "action" + #define CONTROLLER_actions_s "actions" + #define CONTROLLER_affinity_s "affinity" + #define CONTROLLER_as_s "as" + #define CONTROLLER_asynchronous_s "asynchronous" + #define CONTROLLER_bash_s "bash" + #define CONTROLLER_batch_s "batch" + #define CONTROLLER_capability_s "capability" + #define CONTROLLER_create_s "create" + #define CONTROLLER_command_s "command" + #define CONTROLLER_consider_s "consider" + #define CONTROLLER_control_s "control" + #define CONTROLLER_control_group_s "control_group" + #define CONTROLLER_cpu_s "cpu" + #define CONTROLLER_core_s "core" + #define CONTROLLER_data_s "data" + #define CONTROLLER_deadline_s "deadline" + #define CONTROLLER_default_s "default" + #define CONTROLLER_define_s "define" + #define CONTROLLER_delay_s "delay" + #define CONTROLLER_disable_s "disable" + #define CONTROLLER_entry_s "entry" + #define CONTROLLER_entries_s "entries" + #define CONTROLLER_environment_s "environment" + #define CONTROLLER_execute_s "execute" + #define CONTROLLER_existing_s "existing" + #define CONTROLLER_exit_s "exit" + #define CONTROLLER_exits_s "exits" + #define CONTROLLER_fail_s "fail" + #define CONTROLLER_failsafe_s "failsafe" + #define CONTROLLER_failure_s "failure" + #define CONTROLLER_fifo_s "fifo" + #define CONTROLLER_freeze_s "freeze" + #define CONTROLLER_fsize_s "fsize" + #define CONTROLLER_full_path_s "full_path" + #define CONTROLLER_group_s "group" + #define CONTROLLER_groups_s "groups" + #define CONTROLLER_how_s "how" + #define CONTROLLER_idle_s "idle" + #define CONTROLLER_item_s "item" + #define CONTROLLER_init_s "init" + #define CONTROLLER_kill_s "kill" + #define CONTROLLER_limit_s "limit" + #define CONTROLLER_locks_s "locks" + #define CONTROLLER_main_s "main" + #define CONTROLLER_max_s "max" + #define CONTROLLER_memlock_s "memlock" + #define CONTROLLER_method_s "method" + #define CONTROLLER_mode_s "mode" + #define CONTROLLER_msgqueue_s "msgqueue" + #define CONTROLLER_name_s "name" + #define CONTROLLER_need_s "need" + #define CONTROLLER_new_s "new" + #define CONTROLLER_nice_s "nice" + #define CONTROLLER_no_s "no" + #define CONTROLLER_nofile_s "nofile" + #define CONTROLLER_normal_s "normal" + #define CONTROLLER_nproc_s "nproc" + #define CONTROLLER_on_s "on" + #define CONTROLLER_optional_s "optional" + #define CONTROLLER_other_s "other" + #define CONTROLLER_parameter_s "parameter" + #define CONTROLLER_parameters_s "parameters" + #define CONTROLLER_path_s "path" + #define CONTROLLER_pause_s "pause" + #define CONTROLLER_pid_s "pid" + #define CONTROLLER_pid_file_s "pid_file" + #define CONTROLLER_processor_s "processor" + #define CONTROLLER_program_s "program" + #define CONTROLLER_ready_s "ready" + #define CONTROLLER_reload_s "reload" + #define CONTROLLER_require_s "require" + #define CONTROLLER_required_s "required" + #define CONTROLLER_rerun_s "rerun" + #define CONTROLLER_reset_s "reset" + #define CONTROLLER_restart_s "restart" + #define CONTROLLER_resume_s "resume" + #define CONTROLLER_round_robin_s "round_robin" + #define CONTROLLER_rss_s "rss" + #define CONTROLLER_rtprio_s "rtprio" + #define CONTROLLER_rttime_s "rttime" + #define CONTROLLER_rule_s "rule" + #define CONTROLLER_rules_s "rules" + #define CONTROLLER_scheduler_s "scheduler" + #define CONTROLLER_script_s "script" + #define CONTROLLER_service_s "service" + #define CONTROLLER_setting_s "setting" + #define CONTROLLER_sigpending_s "sigpending" + #define CONTROLLER_show_s "show" + #define CONTROLLER_stack_s "stack" + #define CONTROLLER_start_s "start" + #define CONTROLLER_stop_s "stop" + #define CONTROLLER_succeed_s "succeed" + #define CONTROLLER_success_s "success" + #define CONTROLLER_synchronous_s "synchronous" + #define CONTROLLER_thaw_s "thaw" + #define CONTROLLER_timeout_s "timeout" + #define CONTROLLER_type_s "type" + #define CONTROLLER_use_s "use" + #define CONTROLLER_user_s "user" + #define CONTROLLER_utility_s "utility" + #define CONTROLLER_value_s "value" + #define CONTROLLER_wait_s "wait" + #define CONTROLLER_want_s "want" + #define CONTROLLER_wish_s "wish" + #define CONTROLLER_with_s "with" + #define CONTROLLER_yes_s "yes" + + #define controller_action_s_length 6 + #define controller_actions_s_length 7 + #define controller_affinity_s_length 8 + #define controller_as_s_length 2 + #define controller_asynchronous_s_length 12 + #define controller_bash_s_length 4 + #define controller_batch_s_length 5 + #define controller_capability_s_length 10 + #define controller_create_s_length 6 + #define controller_command_s_length 7 + #define controller_consider_s_length 8 + #define controller_control_s_length 7 + #define controller_control_group_s_length 13 + #define controller_core_s_length 4 + #define controller_cpu_s_length 3 + #define controller_data_s_length 4 + #define controller_deadline_s_length 8 + #define controller_default_s_length 7 + #define controller_define_s_length 6 + #define controller_delay_s_length 5 + #define controller_disable_s_length 7 + #define controller_entry_s_length 5 + #define controller_entries_s_length 7 + #define controller_environment_s_length 11 + #define controller_existing_s_length 8 + #define controller_execute_s_length 7 + #define controller_exit_s_length 4 + #define controller_exits_s_length 5 + #define controller_fail_s_length 4 + #define controller_failure_s_length 7 + #define controller_failsafe_s_length 8 + #define controller_fifo_s_length 4 + #define controller_freeze_s_length 6 + #define controller_fsize_s_length 5 + #define controller_full_path_s_length 9 + #define controller_group_s_length 5 + #define controller_groups_s_length 6 + #define controller_how_s_length 3 + #define controller_idle_s_length 4 + #define controller_init_s_length 4 + #define controller_item_s_length 4 + #define controller_kill_s_length 4 + #define controller_limit_s_length 5 + #define controller_locks_s_length 5 + #define controller_main_s_length 4 + #define controller_max_s_length 3 + #define controller_memlock_s_length 7 + #define controller_method_s_length 6 + #define controller_mode_s_length 4 + #define controller_msgqueue_s_length 8 + #define controller_name_s_length 4 + #define controller_need_s_length 4 + #define controller_new_s_length 3 + #define controller_nice_s_length 4 + #define controller_no_s_length 2 + #define controller_nofile_s_length 6 + #define controller_normal_s_length 6 + #define controller_nproc_s_length 5 + #define controller_on_s_length 2 + #define controller_optional_s_length 8 + #define controller_other_s_length 5 + #define controller_parameter_s_length 9 + #define controller_parameters_s_length 10 + #define controller_path_s_length 4 + #define controller_pause_s_length 5 + #define controller_pid_s_length 3 + #define controller_pid_file_s_length 8 + #define controller_processor_s_length 9 + #define controller_program_s_length 7 + #define controller_ready_s_length 5 + #define controller_reload_s_length 6 + #define controller_require_s_length 7 + #define controller_required_s_length 8 + #define controller_rerun_s_length 5 + #define controller_reset_s_length 5 + #define controller_restart_s_length 7 + #define controller_resume_s_length 6 + #define controller_round_robin_s_length 11 + #define controller_rss_s_length 3 + #define controller_rtprio_s_length 6 + #define controller_rttime_s_length 6 + #define controller_rule_s_length 4 + #define controller_rules_s_length 5 + #define controller_scheduler_s_length 9 + #define controller_script_s_length 6 + #define controller_service_s_length 7 + #define controller_setting_s_length 7 + #define controller_show_s_length 4 + #define controller_sigpending_s_length 10 + #define controller_stack_s_length 5 + #define controller_start_s_length 5 + #define controller_stop_s_length 4 + #define controller_succeed_s_length 7 + #define controller_success_s_length 7 + #define controller_synchronous_s_length 11 + #define controller_thaw_s_length 4 + #define controller_timeout_s_length 7 + #define controller_type_s_length 4 + #define controller_use_s_length 3 + #define controller_user_s_length 4 + #define controller_utility_s_length 7 + #define controller_value_s_length 5 + #define controller_wait_s_length 4 + #define controller_want_s_length 4 + #define controller_wish_s_length 4 + #define controller_with_s_length 4 + #define controller_yes_s_length 3 + + extern const f_string_t controller_action_s; + extern const f_string_t controller_actions_s; + extern const f_string_t controller_affinity_s; + extern const f_string_t controller_as_s; + extern const f_string_t controller_asynchronous_s; + extern const f_string_t controller_bash_s; + extern const f_string_t controller_batch_s; + extern const f_string_t controller_capability_s; + extern const f_string_t controller_create_s; + extern const f_string_t controller_command_s; + extern const f_string_t controller_consider_s; + extern const f_string_t controller_control_s; + extern const f_string_t controller_control_group_s; + extern const f_string_t controller_core_s; + extern const f_string_t controller_cpu_s; + extern const f_string_t controller_data_s; + extern const f_string_t controller_deadline_s; + extern const f_string_t controller_default_s; + extern const f_string_t controller_define_s; + extern const f_string_t controller_delay_s; + extern const f_string_t controller_disable_s; + extern const f_string_t controller_entry_s; + extern const f_string_t controller_entries_s; + extern const f_string_t controller_environment_s; + extern const f_string_t controller_existing_s; + extern const f_string_t controller_execute_s; + extern const f_string_t controller_exit_s; + extern const f_string_t controller_exits_s; + extern const f_string_t controller_fail_s; + extern const f_string_t controller_failsafe_s; + extern const f_string_t controller_failure_s; + extern const f_string_t controller_fifo_s; + extern const f_string_t controller_freeze_s; + extern const f_string_t controller_fsize_s; + extern const f_string_t controller_full_path_s; + extern const f_string_t controller_group_s; + extern const f_string_t controller_groups_s; + extern const f_string_t controller_how_s; + extern const f_string_t controller_idle_s; + extern const f_string_t controller_init_s; + extern const f_string_t controller_item_s; + extern const f_string_t controller_kill_s; + extern const f_string_t controller_limit_s; + extern const f_string_t controller_locks_s; + extern const f_string_t controller_main_s; + extern const f_string_t controller_max_s; + extern const f_string_t controller_memlock_s; + extern const f_string_t controller_method_s; + extern const f_string_t controller_mode_s; + extern const f_string_t controller_msgqueue_s; + extern const f_string_t controller_name_s; + extern const f_string_t controller_need_s; + extern const f_string_t controller_new_s; + extern const f_string_t controller_nice_s; + extern const f_string_t controller_no_s; + extern const f_string_t controller_nofile_s; + extern const f_string_t controller_normal_s; + extern const f_string_t controller_nproc_s; + extern const f_string_t controller_on_s; + extern const f_string_t controller_optional_s; + extern const f_string_t controller_other_s; + extern const f_string_t controller_parameter_s; + extern const f_string_t controller_parameters_s; + extern const f_string_t controller_path_s; + extern const f_string_t controller_pause_s; + extern const f_string_t controller_pid_s; + extern const f_string_t controller_pid_file_s; + extern const f_string_t controller_processor_s; + extern const f_string_t controller_program_s; + extern const f_string_t controller_ready_s; + extern const f_string_t controller_reload_s; + extern const f_string_t controller_require_s; + extern const f_string_t controller_required_s; + extern const f_string_t controller_rerun_s; + extern const f_string_t controller_reset_s; + extern const f_string_t controller_restart_s; + extern const f_string_t controller_resume_s; + extern const f_string_t controller_round_robin_s; + extern const f_string_t controller_rss_s; + extern const f_string_t controller_rtprio_s; + extern const f_string_t controller_rttime_s; + extern const f_string_t controller_rule_s; + extern const f_string_t controller_rules_s; + extern const f_string_t controller_scheduler_s; + extern const f_string_t controller_script_s; + extern const f_string_t controller_service_s; + extern const f_string_t controller_setting_s; + extern const f_string_t controller_show_s; + extern const f_string_t controller_sigpending_s; + extern const f_string_t controller_stack_s; + extern const f_string_t controller_start_s; + extern const f_string_t controller_stop_s; + extern const f_string_t controller_succeed_s; + extern const f_string_t controller_success_s; + extern const f_string_t controller_synchronous_s; + extern const f_string_t controller_thaw_s; + extern const f_string_t controller_timeout_s; + extern const f_string_t controller_type_s; + extern const f_string_t controller_use_s; + extern const f_string_t controller_user_s; + extern const f_string_t controller_utility_s; + extern const f_string_t controller_value_s; + extern const f_string_t controller_wait_s; + extern const f_string_t controller_want_s; + extern const f_string_t controller_wish_s; + extern const f_string_t controller_with_s; + extern const f_string_t controller_yes_s; #endif // _di_controller_string_s_ /** @@ -372,15 +372,15 @@ extern "C" { /** * Provide common/generic definitions. * - * The controller_common_allocation_large or controller_common_allocation_small must be at least 2 for this project. + * The controller_common_allocation_large_d or controller_common_allocation_small_d must be at least 2 for this project. * * controller_common_allocation_*: * - large: An allocation step used for buffers that are anticipated to have large buffers. * - small: An allocation step used for buffers that are anticipated to have small buffers. */ #ifndef _di_controller_common_ - #define controller_common_allocation_large 256 - #define controller_common_allocation_small 16 + #define controller_common_allocation_large_d 256 + #define controller_common_allocation_small_d 16 #endif // _di_controller_common_ /** @@ -585,10 +585,10 @@ extern "C" { * max_success: The maximum number of times to "rerun" (with 0 representing "rerun" infinitely) for successful executions. */ #ifndef _di_controller_rule_rerun_t_ - #define controller_rule_rerun_is_failure 0x1 - #define controller_rule_rerun_is_failure_reset 0x2 - #define controller_rule_rerun_is_success 0x4 - #define controller_rule_rerun_is_success_reset 0x8 + #define controller_rule_rerun_is_failure_d 0x1 + #define controller_rule_rerun_is_failure_reset_d 0x2 + #define controller_rule_rerun_is_success_d 0x4 + #define controller_rule_rerun_is_success_reset_d 0x8 typedef struct { uint8_t is; @@ -633,11 +633,11 @@ extern "C" { * parameters: All parameters associated with the Rule Action. */ #ifndef _di_controller_rule_action_t_ - #define controller_rule_action_method_string_extended "FSS-0001 (Extended)" - #define controller_rule_action_method_string_extended_list "FSS-0003 (Extended List)" + #define controller_rule_action_method_string_extended_s "FSS-0001 (Extended)" + #define controller_rule_action_method_string_extended_list_s "FSS-0003 (Extended List)" - #define controller_rule_action_method_string_extended_length 19 - #define controller_rule_action_method_string_extended_list_length 24 + #define controller_rule_action_method_string_extended_s_length 19 + #define controller_rule_action_method_string_extended_list_s_length 24 enum { controller_rule_action_method_extended = 1, @@ -915,17 +915,17 @@ extern "C" { }; // bitwise codes representing properties on controller_rule_t that have been found in the rule file. - #define controller_rule_has_control_group 0x1 - #define controller_rule_has_environment 0x2 - #define controller_rule_has_group 0x4 - #define controller_rule_has_nice 0x8 - #define controller_rule_has_scheduler 0x10 - #define controller_rule_has_user 0x20 + #define controller_rule_has_control_group_d 0x1 + #define controller_rule_has_environment_d 0x2 + #define controller_rule_has_group_d 0x4 + #define controller_rule_has_nice_d 0x8 + #define controller_rule_has_scheduler_d 0x10 + #define controller_rule_has_user_d 0x20 // Designate codes for timeout settings to be used during the loading of the rule timeout settings. - #define controller_rule_timeout_code_kill 1 - #define controller_rule_timeout_code_start 2 - #define controller_rule_timeout_code_stop 3 + #define controller_rule_timeout_code_kill_d 1 + #define controller_rule_timeout_code_start_d 2 + #define controller_rule_timeout_code_stop_d 3 typedef struct { f_status_t status[controller_rule_action_type__enum_size]; @@ -1032,7 +1032,7 @@ extern "C" { * A set of codes representing different with flags. */ #ifndef _di_controller_with_defines_ - #define controller_with_full_path 0x1 + #define controller_with_full_path_d 0x1 #endif // _di_controller_with_defines_ /** @@ -1096,11 +1096,11 @@ extern "C" { * main_thread: Used for passing the controller_thread_t data to the process thread (to populate controller_global_t). */ #ifndef _di_controller_process_t_ - #define controller_process_option_asynchronous 0x1 - #define controller_process_option_require 0x2 - #define controller_process_option_simulate 0x4 - #define controller_process_option_validate 0x8 - #define controller_process_option_wait 0x10 + #define controller_process_option_asynchronous_d 0x1 + #define controller_process_option_require_d 0x2 + #define controller_process_option_simulate_d 0x4 + #define controller_process_option_validate_d 0x8 + #define controller_process_option_wait_d 0x10 enum { controller_process_state_idle = 1, @@ -1241,13 +1241,13 @@ extern "C" { controller_entry_action_type_thaw, }; - #define controller_entry_rule_code_asynchronous 0x1 - #define controller_entry_rule_code_require 0x2 - #define controller_entry_rule_code_wait 0x4 + #define controller_entry_rule_code_asynchronous_d 0x1 + #define controller_entry_rule_code_require_d 0x2 + #define controller_entry_rule_code_wait_d 0x4 - #define controller_entry_timeout_code_kill 0x1 - #define controller_entry_timeout_code_start 0x2 - #define controller_entry_timeout_code_stop 0x4 + #define controller_entry_timeout_code_kill_d 0x1 + #define controller_entry_timeout_code_start_d 0x2 + #define controller_entry_timeout_code_stop_d 0x4 typedef struct { uint8_t type; @@ -1499,35 +1499,35 @@ extern "C" { * cache: A cache used by the main entry/rule processing thread for synchronous operations. */ #ifndef _di_controller_thread_t_ - #define controller_thread_cleanup_interval_long 3600 // 1 hour in seconds. - #define controller_thread_cleanup_interval_short 180 // 3 minutes in seconds. - #define controller_thread_exit_process_cancel_wait 600000000 // 0.6 seconds in nanoseconds. - #define controller_thread_exit_process_cancel_total 150 // 90 seconds in multiples of wait. - #define controller_thread_simulation_timeout 200000 // 0.2 seconds in microseconds. - - #define controller_thread_signal_wait_timeout_seconds 70 - #define controller_thread_signal_wait_timeout_nanoseconds 0 - - #define controller_thread_lock_read_timeout_seconds 3 - #define controller_thread_lock_read_timeout_nanoseconds 0 - #define controller_thread_lock_write_timeout_seconds 3 - #define controller_thread_lock_write_timeout_nanoseconds 0 - - #define controller_thread_wait_timeout_1_before 4 - #define controller_thread_wait_timeout_2_before 12 - #define controller_thread_wait_timeout_3_before 28 - - #define controller_thread_wait_timeout_1_seconds 0 - #define controller_thread_wait_timeout_1_nanoseconds 20000000 // 0.02 seconds in nanoseconds. - #define controller_thread_wait_timeout_2_seconds 0 - #define controller_thread_wait_timeout_2_nanoseconds 200000000 // 0.2 seconds in nanoseconds. - #define controller_thread_wait_timeout_3_seconds 2 - #define controller_thread_wait_timeout_3_nanoseconds 0 - #define controller_thread_wait_timeout_4_seconds 20 - #define controller_thread_wait_timeout_4_nanoseconds 0 - - #define controller_thread_exit_ready_timeout_seconds 0 - #define controller_thread_exit_ready_timeout_nanoseconds 500000000 // 0.5 seconds in nanoseconds. + #define controller_thread_cleanup_interval_long_d 3600 // 1 hour in seconds. + #define controller_thread_cleanup_interval_short_d 180 // 3 minutes in seconds. + #define controller_thread_exit_process_cancel_wait_d 600000000 // 0.6 seconds in nanoseconds. + #define controller_thread_exit_process_cancel_total_d 150 // 90 seconds in multiples of wait. + #define controller_thread_simulation_timeout_d 200000 // 0.2 seconds in microseconds. + + #define controller_thread_signal_wait_timeout_seconds_d 70 + #define controller_thread_signal_wait_timeout_nanoseconds_d 0 + + #define controller_thread_lock_read_timeout_seconds_d 3 + #define controller_thread_lock_read_timeout_nanoseconds_d 0 + #define controller_thread_lock_write_timeout_seconds_d 3 + #define controller_thread_lock_write_timeout_nanoseconds_d 0 + + #define controller_thread_wait_timeout_1_before_d 4 + #define controller_thread_wait_timeout_2_before_d 12 + #define controller_thread_wait_timeout_3_before_d 28 + + #define controller_thread_wait_timeout_1_seconds_d 0 + #define controller_thread_wait_timeout_1_nanoseconds_d 20000000 // 0.02 seconds in nanoseconds. + #define controller_thread_wait_timeout_2_seconds_d 0 + #define controller_thread_wait_timeout_2_nanoseconds_d 200000000 // 0.2 seconds in nanoseconds. + #define controller_thread_wait_timeout_3_seconds_d 2 + #define controller_thread_wait_timeout_3_nanoseconds_d 0 + #define controller_thread_wait_timeout_4_seconds_d 20 + #define controller_thread_wait_timeout_4_nanoseconds_d 0 + + #define controller_thread_exit_ready_timeout_seconds_d 0 + #define controller_thread_exit_ready_timeout_nanoseconds_d 500000000 // 0.5 seconds in nanoseconds. /** * States for enabled, designating how to stop the process. @@ -1670,7 +1670,7 @@ extern "C" { * @see f_string_dynamic_resize() */ #ifndef _di_controller_cache_action_delete_simple_ - extern void controller_cache_action_delete_simple(controller_cache_action_t *cache) f_attribute_visibility_internal; + extern void controller_cache_action_delete_simple(controller_cache_action_t *cache) F_attribute_visibility_internal_d; #endif // _di_controller_cache_action_delete_simple_ /** @@ -1688,7 +1688,7 @@ extern "C" { * @see f_string_rangess_resize() */ #ifndef _di_controller_cache_delete_simple_ - extern void controller_cache_delete_simple(controller_cache_t *cache) f_attribute_visibility_internal; + extern void controller_cache_delete_simple(controller_cache_t *cache) F_attribute_visibility_internal_d; #endif // _di_controller_cache_delete_simple_ /** @@ -1700,7 +1700,7 @@ extern "C" { * @see f_string_dynamics_resize() */ #ifndef _di_controller_entry_action_delete_simple_ - extern void controller_entry_action_delete_simple(controller_entry_action_t *action) f_attribute_visibility_internal; + extern void controller_entry_action_delete_simple(controller_entry_action_t *action) F_attribute_visibility_internal_d; #endif // _di_controller_entry_action_delete_simple_ /** @@ -1713,7 +1713,7 @@ extern "C" { * @see f_memory_delete() */ #ifndef _di_controller_entry_actions_delete_simple_ - extern void controller_entry_actions_delete_simple(controller_entry_actions_t *actions) f_attribute_visibility_internal; + extern void controller_entry_actions_delete_simple(controller_entry_actions_t *actions) F_attribute_visibility_internal_d; #endif // _di_controller_entry_actions_delete_simple_ /** @@ -1725,7 +1725,7 @@ extern "C" { * @see f_string_dynamic_resize() */ #ifndef _di_controller_entry_item_delete_simple_ - extern void controller_entry_item_delete_simple(controller_entry_item_t *item) f_attribute_visibility_internal; + extern void controller_entry_item_delete_simple(controller_entry_item_t *item) F_attribute_visibility_internal_d; #endif // _di_controller_entry_item_delete_simple_ /** @@ -1738,7 +1738,7 @@ extern "C" { * @see f_memory_delete() */ #ifndef _di_controller_entry_items_delete_simple_ - extern void controller_entry_items_delete_simple(controller_entry_items_t *items) f_attribute_visibility_internal; + extern void controller_entry_items_delete_simple(controller_entry_items_t *items) F_attribute_visibility_internal_d; #endif // _di_controller_entry_items_delete_simple_ /** @@ -1767,7 +1767,7 @@ extern "C" { * @see fll_error_file_print() */ #ifndef _di_controller_error_file_print_ - extern void controller_error_file_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_t name, const f_string_t operation, const uint8_t type, controller_thread_t *thread) f_attribute_visibility_internal; + extern void controller_error_file_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_t name, const f_string_t operation, const uint8_t type, controller_thread_t *thread) F_attribute_visibility_internal_d; #endif // _di_controller_error_file_print_ /** @@ -1790,7 +1790,7 @@ extern "C" { * @see fll_error_print() */ #ifndef _di_controller_error_print_ - extern void controller_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, controller_thread_t *thread) f_attribute_visibility_internal; + extern void controller_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, controller_thread_t *thread) F_attribute_visibility_internal_d; #endif // _di_controller_error_print_ /** @@ -1809,7 +1809,7 @@ extern "C" { * @see f_thread_mutex_delete() */ #ifndef _di_controller_lock_create_ - extern f_status_t controller_lock_create(controller_lock_t *lock) f_attribute_visibility_internal; + extern f_status_t controller_lock_create(controller_lock_t *lock) F_attribute_visibility_internal_d; #endif // _di_controller_lock_create_ /** @@ -1820,7 +1820,7 @@ extern "C" { * Will be set to NULLif delete succeeded. */ #ifndef _di_controller_lock_delete_mutex_ - extern void controller_lock_delete_mutex(f_thread_mutex_t *mutex) f_attribute_visibility_internal; + extern void controller_lock_delete_mutex(f_thread_mutex_t *mutex) F_attribute_visibility_internal_d; #endif // _di_controller_lock_delete_mutex_ /** @@ -1831,7 +1831,7 @@ extern "C" { * Will be set to NULL if delete succeeded. */ #ifndef _di_controller_lock_delete_rw_ - extern void controller_lock_delete_rw(f_thread_lock_t *lock) f_attribute_visibility_internal; + extern void controller_lock_delete_rw(f_thread_lock_t *lock) F_attribute_visibility_internal_d; #endif // _di_controller_lock_delete_rw_ /** @@ -1844,7 +1844,7 @@ extern "C" { * @see f_thread_mutex_delete() */ #ifndef _di_controller_lock_delete_simple_ - extern void controller_lock_delete_simple(controller_lock_t *lock) f_attribute_visibility_internal; + extern void controller_lock_delete_simple(controller_lock_t *lock) F_attribute_visibility_internal_d; #endif // _di_controller_lock_delete_simple_ /** @@ -1867,7 +1867,7 @@ extern "C" { * @see controller_entry_error_print_cache() */ #ifndef _di_controller_lock_error_critical_print_ - extern void controller_lock_error_critical_print(const fl_print_t print, const f_status_t status, const bool read, controller_thread_t *thread) f_attribute_visibility_internal; + extern void controller_lock_error_critical_print(const fl_print_t print, const f_status_t status, const bool read, controller_thread_t *thread) F_attribute_visibility_internal_d; #endif // _di_controller_lock_error_critical_print_ /** @@ -1895,7 +1895,7 @@ extern "C" { * @see f_thread_lock_read_timed() */ #ifndef _di_controller_lock_read_ - extern f_status_t controller_lock_read(const bool is_normal, controller_thread_t * const thread, f_thread_lock_t *lock) f_attribute_visibility_internal; + extern f_status_t controller_lock_read(const bool is_normal, controller_thread_t * const thread, f_thread_lock_t *lock) F_attribute_visibility_internal_d; #endif // _di_controller_lock_read_ /** @@ -1919,7 +1919,7 @@ extern "C" { * @see controller_lock_read() */ #ifndef _di_controller_lock_read_process_ - extern f_status_t controller_lock_read_process(controller_process_t * const process, controller_thread_t * const thread, f_thread_lock_t *lock) f_attribute_visibility_internal; + extern f_status_t controller_lock_read_process(controller_process_t * const process, controller_thread_t * const thread, f_thread_lock_t *lock) F_attribute_visibility_internal_d; #endif // _di_controller_lock_read_process_ /** @@ -1943,7 +1943,7 @@ extern "C" { * @see controller_lock_read() */ #ifndef _di_controller_lock_read_process_type_ - extern f_status_t controller_lock_read_process_type(const uint8_t type, controller_thread_t * const thread, f_thread_lock_t *lock) f_attribute_visibility_internal; + extern f_status_t controller_lock_read_process_type(const uint8_t type, controller_thread_t * const thread, f_thread_lock_t *lock) F_attribute_visibility_internal_d; #endif // _di_controller_lock_read_process_type_ /** @@ -1971,7 +1971,7 @@ extern "C" { * @see f_thread_lock_write_timed() */ #ifndef _di_controller_lock_write_ - extern f_status_t controller_lock_write(const bool is_normal, controller_thread_t * const thread, f_thread_lock_t *lock) f_attribute_visibility_internal; + extern f_status_t controller_lock_write(const bool is_normal, controller_thread_t * const thread, f_thread_lock_t *lock) F_attribute_visibility_internal_d; #endif // _di_controller_lock_write_ /** @@ -1995,7 +1995,7 @@ extern "C" { * @see controller_lock_write_process_type() */ #ifndef _di_controller_lock_write_process_ - extern f_status_t controller_lock_write_process(controller_process_t * const process, controller_thread_t * const thread, f_thread_lock_t *lock) f_attribute_visibility_internal; + extern f_status_t controller_lock_write_process(controller_process_t * const process, controller_thread_t * const thread, f_thread_lock_t *lock) F_attribute_visibility_internal_d; #endif // _di_controller_lock_write_process_ /** @@ -2019,13 +2019,13 @@ extern "C" { * @see controller_lock_write() */ #ifndef _di_controller_lock_write_process_type_ - extern f_status_t controller_lock_write_process_type(const uint8_t type, controller_thread_t * const thread, f_thread_lock_t *lock) f_attribute_visibility_internal; + extern f_status_t controller_lock_write_process_type(const uint8_t type, controller_thread_t * const thread, f_thread_lock_t *lock) F_attribute_visibility_internal_d; #endif // _di_controller_lock_write_process_type_ /** * Increase the size of the pid array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param pids @@ -2033,7 +2033,7 @@ extern "C" { * * @return * F_none on success. - * F_data_not on success, but there is no reason to increase size (used + controller_common_allocation_small <= size). + * F_data_not on success, but there is no reason to increase size (used + controller_common_allocation_small_d <= size). * * F_array_too_large (with error bit) if the new array length is too large. * F_memory_not (with error bit) on out of memory. @@ -2042,7 +2042,7 @@ extern "C" { * @see controller_pids_resize() */ #ifndef _di_controller_pids_increase_ - extern f_status_t controller_pids_increase(controller_pids_t *pids) f_attribute_visibility_internal; + extern f_status_t controller_pids_increase(controller_pids_t *pids) F_attribute_visibility_internal_d; #endif // _di_controller_rule_increase_ /** @@ -2062,7 +2062,7 @@ extern "C" { * @see f_memory_resize() */ #ifndef _di_controller_pids_resize_ - extern f_status_t controller_pids_resize(const f_array_length_t length, controller_pids_t *pids) f_attribute_visibility_internal; + extern f_status_t controller_pids_resize(const f_array_length_t length, controller_pids_t *pids) F_attribute_visibility_internal_d; #endif // _di_controller_pids_resize_ /** @@ -2080,7 +2080,7 @@ extern "C" { * @see f_thread_mutex_unlock() */ #ifndef _di_controller_print_lock_ - extern void controller_print_lock(const f_file_t to, controller_thread_t * const thread) f_attribute_visibility_internal; + extern void controller_print_lock(const f_file_t to, controller_thread_t * const thread) F_attribute_visibility_internal_d; #endif // _di_controller_print_lock_ /** @@ -2103,7 +2103,7 @@ extern "C" { * @see f_thread_mutex_unlock() */ #ifndef _di_controller_print_unlock_flush_ - void controller_print_unlock_flush(const f_file_t to, controller_thread_t * const thread) f_attribute_visibility_internal; + void controller_print_unlock_flush(const f_file_t to, controller_thread_t * const thread) F_attribute_visibility_internal_d; #endif // _di_controller_print_unlock_flush_ /** @@ -2117,7 +2117,7 @@ extern "C" { * @see f_thread_mutex_delete() */ #ifndef _di_controller_process_delete_simple_ - extern void controller_process_delete_simple(controller_process_t *process) f_attribute_visibility_internal; + extern void controller_process_delete_simple(controller_process_t *process) F_attribute_visibility_internal_d; #endif // _di_controller_process_delete_simple_ /*** @@ -2139,7 +2139,7 @@ extern "C" { * @see f_thread_condition_wait_timed() */ #ifndef _di_controller_process_wait_ - extern f_status_t controller_process_wait(const controller_global_t global, controller_process_t *process) f_attribute_visibility_internal; + extern f_status_t controller_process_wait(const controller_global_t global, controller_process_t *process) F_attribute_visibility_internal_d; #endif // _di_controller_process_wait_ /** @@ -2151,13 +2151,13 @@ extern "C" { * @see controller_processs_resize() */ #ifndef _di_controller_processs_delete_simple_ - extern void controller_processs_delete_simple(controller_processs_t *processs) f_attribute_visibility_internal; + extern void controller_processs_delete_simple(controller_processs_t *processs) F_attribute_visibility_internal_d; #endif // _di_controller_processs_delete_simple_ /** * Increase the size of the rule array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param processs @@ -2165,7 +2165,7 @@ extern "C" { * * @return * F_none on success. - * F_data_not on success, but there is no reason to increase size (used + controller_common_allocation_small <= size). + * F_data_not on success, but there is no reason to increase size (used + controller_common_allocation_small_d <= size). * * F_array_too_large (with error bit) if the new array length is too large. * F_memory_not (with error bit) on out of memory. @@ -2174,7 +2174,7 @@ extern "C" { * @see controller_processs_resize() */ #ifndef _di_controller_processs_increase_ - extern f_status_t controller_processs_increase(controller_processs_t *processs) f_attribute_visibility_internal; + extern f_status_t controller_processs_increase(controller_processs_t *processs) F_attribute_visibility_internal_d; #endif // _di_controller_rule_increase_ /** @@ -2199,7 +2199,7 @@ extern "C" { * @see f_thread_lock_create() */ #ifndef _di_controller_processs_resize_ - extern f_status_t controller_processs_resize(const f_array_length_t length, controller_processs_t *processs) f_attribute_visibility_internal; + extern f_status_t controller_processs_resize(const f_array_length_t length, controller_processs_t *processs) F_attribute_visibility_internal_d; #endif // _di_controller_processs_resize_ /** @@ -2211,7 +2211,7 @@ extern "C" { * @see f_string_dynamics_resize() */ #ifndef _di_controller_rule_action_delete_simple_ - extern void controller_rule_action_delete_simple(controller_rule_action_t *action) f_attribute_visibility_internal; + extern void controller_rule_action_delete_simple(controller_rule_action_t *action) F_attribute_visibility_internal_d; #endif // _di_controller_rule_action_delete_simple_ /** @@ -2224,7 +2224,7 @@ extern "C" { * @see f_memory_delete() */ #ifndef _di_controller_rule_actions_delete_simple_ - extern void controller_rule_actions_delete_simple(controller_rule_actions_t *actions) f_attribute_visibility_internal; + extern void controller_rule_actions_delete_simple(controller_rule_actions_t *actions) F_attribute_visibility_internal_d; #endif // _di_controller_rule_actions_delete_simple_ /** @@ -2246,7 +2246,7 @@ extern "C" { * @see f_string_dynamic_resize() */ #ifndef _di_controller_rule_delete_simple_ - extern void controller_rule_delete_simple(controller_rule_t *rule) f_attribute_visibility_internal; + extern void controller_rule_delete_simple(controller_rule_t *rule) F_attribute_visibility_internal_d; #endif // _di_controller_rule_delete_simple_ /** @@ -2258,7 +2258,7 @@ extern "C" { * @see f_string_dynamic_resize() */ #ifndef _di_controller_rule_item_delete_simple_ - extern void controller_rule_item_delete_simple(controller_rule_item_t *item) f_attribute_visibility_internal; + extern void controller_rule_item_delete_simple(controller_rule_item_t *item) F_attribute_visibility_internal_d; #endif // _di_controller_rule_item_delete_simple_ /** @@ -2271,7 +2271,7 @@ extern "C" { * @see f_memory_delete() */ #ifndef _di_controller_rule_items_delete_simple_ - extern void controller_rule_items_delete_simple(controller_rule_items_t *items) f_attribute_visibility_internal; + extern void controller_rule_items_delete_simple(controller_rule_items_t *items) F_attribute_visibility_internal_d; #endif // _di_controller_rule_items_delete_simple_ /** @@ -2283,7 +2283,7 @@ extern "C" { * @see f_string_dynamic_resize() */ #ifndef _di_controller_rule_on_delete_simple_ - extern void controller_rule_on_delete_simple(controller_rule_on_t *on) f_attribute_visibility_internal; + extern void controller_rule_on_delete_simple(controller_rule_on_t *on) F_attribute_visibility_internal_d; #endif // _di_controller_rule_on_delete_simple_ /** @@ -2296,13 +2296,13 @@ extern "C" { * @see f_memory_delete() */ #ifndef _di_controller_rule_ons_delete_simple_ - extern void controller_rule_ons_delete_simple(controller_rule_ons_t *ons) f_attribute_visibility_internal; + extern void controller_rule_ons_delete_simple(controller_rule_ons_t *ons) F_attribute_visibility_internal_d; #endif // _di_controller_rule_ons_delete_simple_ /** * Increase the size of the rule array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param ons @@ -2310,7 +2310,7 @@ extern "C" { * * @return * F_none on success. - * F_data_not on success, but there is no reason to increase size (used + controller_common_allocation_small <= size). + * F_data_not on success, but there is no reason to increase size (used + controller_common_allocation_small_d <= size). * * F_array_too_large (with error bit) if the new array length is too large. * F_memory_not (with error bit) on out of memory. @@ -2319,7 +2319,7 @@ extern "C" { * @see controller_rule_ons_resize() */ #ifndef _di_controller_rule_ons_increase_ - extern f_status_t controller_rule_ons_increase(controller_rule_ons_t *ons) f_attribute_visibility_internal; + extern f_status_t controller_rule_ons_increase(controller_rule_ons_t *ons) F_attribute_visibility_internal_d; #endif // _di_controller_rule_increase_ /** @@ -2339,7 +2339,7 @@ extern "C" { * @see f_memory_resize() */ #ifndef _di_controller_rule_ons_resize_ - extern f_status_t controller_rule_ons_resize(const f_array_length_t length, controller_rule_ons_t *ons) f_attribute_visibility_internal; + extern f_status_t controller_rule_ons_resize(const f_array_length_t length, controller_rule_ons_t *ons) F_attribute_visibility_internal_d; #endif // _di_controller_rule_ons_resize_ /** @@ -2351,13 +2351,13 @@ extern "C" { * @see controller_rules_resize() */ #ifndef _di_controller_rules_delete_simple_ - extern void controller_rules_delete_simple(controller_rules_t *rules) f_attribute_visibility_internal; + extern void controller_rules_delete_simple(controller_rules_t *rules) F_attribute_visibility_internal_d; #endif // _di_controller_rules_delete_simple_ /** * Increase the size of the rule array, but only if necessary. * - * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size). + * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_d). * If already set to the maximum buffer size, then the resize will fail. * * @param rules @@ -2365,7 +2365,7 @@ extern "C" { * * @return * F_none on success. - * F_data_not on success, but there is no reason to increase size (used + controller_common_allocation_small <= size). + * F_data_not on success, but there is no reason to increase size (used + controller_common_allocation_small_d <= size). * * F_array_too_large (with error bit) if the new array length is too large. * F_memory_not (with error bit) on out of memory. @@ -2374,7 +2374,7 @@ extern "C" { * @see controller_rules_resize() */ #ifndef _di_controller_rules_increase_ - extern f_status_t controller_rules_increase(controller_rules_t *rules) f_attribute_visibility_internal; + extern f_status_t controller_rules_increase(controller_rules_t *rules) F_attribute_visibility_internal_d; #endif // _di_controller_rule_increase_ /** @@ -2394,7 +2394,7 @@ extern "C" { * @see f_memory_resize() */ #ifndef _di_controller_rules_resize_ - extern f_status_t controller_rules_resize(const f_array_length_t length, controller_rules_t *rules) f_attribute_visibility_internal; + extern f_status_t controller_rules_resize(const f_array_length_t length, controller_rules_t *rules) F_attribute_visibility_internal_d; #endif // _di_controller_rules_resize_ /** @@ -2408,7 +2408,7 @@ extern "C" { * @see f_string_dynamic_resize() */ #ifndef _di_controller_setting_delete_simple_ - extern void controller_setting_delete_simple(controller_setting_t *setting) f_attribute_visibility_internal; + extern void controller_setting_delete_simple(controller_setting_t *setting) F_attribute_visibility_internal_d; #endif // _di_controller_setting_delete_simple_ /** @@ -2421,7 +2421,7 @@ extern "C" { * @see f_thread_mutex_unlock() */ #ifndef _di_controller_thread_delete_simple_ - extern void controller_thread_delete_simple(controller_thread_t *thread) f_attribute_visibility_internal; + extern void controller_thread_delete_simple(controller_thread_t *thread) F_attribute_visibility_internal_d; #endif // _di_controller_thread_delete_simple_ /** @@ -2438,7 +2438,7 @@ extern "C" { * The resulting current time. */ #ifndef _di_controller_time_ - void controller_time(const time_t seconds, const long nanoseconds, struct timespec *time) f_attribute_visibility_internal; + void controller_time(const time_t seconds, const long nanoseconds, struct timespec *time) F_attribute_visibility_internal_d; #endif // _di_controller_time_ /** @@ -2451,7 +2451,7 @@ extern "C" { * A time structure suitable for passing to nanosleep() and similar functions. */ #ifndef _di_controller_time_micro_ - extern struct timespec controller_time_micro(const f_number_unsigned_t microseconds) f_attribute_visibility_internal; + extern struct timespec controller_time_micro(const f_number_unsigned_t microseconds) F_attribute_visibility_internal_d; #endif // _di_controller_time_micro_ #ifdef __cplusplus diff --git a/level_3/controller/c/private-controller.c b/level_3/controller/c/private-controller.c index 5b7af95..d75368d 100644 --- a/level_3/controller/c/private-controller.c +++ b/level_3/controller/c/private-controller.c @@ -31,7 +31,7 @@ extern "C" { #endif // _di_controller_range_after_number_sign_ #ifndef _di_controller_string_dynamic_rip_nulless_terminated_ - f_status_t controller_string_dynamic_rip_nulless_terminated(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) { + f_status_t controller_dynamic_rip_nulless_terminated(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) { f_status_t status = fl_string_dynamic_rip_nulless(source, range, destination); if (F_status_is_error(status)) return status; @@ -41,7 +41,7 @@ extern "C" { #endif // _di_controller_string_dynamic_rip_nulless_terminated_ #ifndef _di_controller_string_dynamic_append_terminated_ - f_status_t controller_string_dynamic_append_terminated(const f_string_static_t source, f_string_dynamic_t *destination) { + f_status_t controller_dynamic_append_terminated(const f_string_static_t source, f_string_dynamic_t *destination) { f_status_t status = f_string_dynamic_append_nulless(source, destination); if (F_status_is_error(status)) return status; @@ -51,7 +51,7 @@ extern "C" { #endif // _di_controller_string_dynamic_append_terminated_ #ifndef _di_controller_string_dynamic_partial_append_terminated_ - f_status_t controller_string_dynamic_partial_append_terminated(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) { + f_status_t controller_dynamic_partial_append_terminated(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) { f_status_t status = f_string_dynamic_partial_append(source, range, destination); if (F_status_is_error(status)) return status; @@ -74,7 +74,7 @@ extern "C" { status = f_string_append(path_prefix, path_prefix_length, &cache->action.name_file); if (F_status_is_error_not(status)) { - status = f_string_append(f_path_separator_s, f_path_separator_length, &cache->action.name_file); + status = f_string_append(f_path_separator_s, F_path_separator_s_length, &cache->action.name_file); } if (F_status_is_error_not(status)) { @@ -82,7 +82,7 @@ extern "C" { } if (F_status_is_error_not(status)) { - status = f_string_append(f_path_extension_separator, f_path_extension_separator_length, &cache->action.name_file); + status = f_string_append(F_path_extension_separator_s, F_path_extension_separator_s_length, &cache->action.name_file); } if (F_status_is_error_not(status)) { @@ -107,12 +107,12 @@ extern "C" { return status; } - const f_array_length_t path_length = global.setting->path_setting.used ? global.setting->path_setting.used + f_path_separator_length + cache->action.name_file.used : cache->action.name_file.used; + const f_array_length_t path_length = global.setting->path_setting.used ? global.setting->path_setting.used + F_path_separator_s_length + cache->action.name_file.used : cache->action.name_file.used; char path[path_length + 1]; if (global.setting->path_setting.used) { memcpy(path, global.setting->path_setting.string, global.setting->path_setting.used); - memcpy(path + global.setting->path_setting.used + f_path_separator_length, cache->action.name_file.string, cache->action.name_file.used); + memcpy(path + global.setting->path_setting.used + F_path_separator_s_length, cache->action.name_file.string, cache->action.name_file.used); path[global.setting->path_setting.used] = f_path_separator_s[0]; } @@ -197,7 +197,7 @@ extern "C" { f_file_t file = f_file_t_initialize; - file.flag = f_file_flag_write_only; + file.flag = F_file_flag_write_only_d; status = f_file_stream_open(path.string, f_file_open_mode_truncate_s, &file); if (F_status_is_error(status)) return status; @@ -364,7 +364,7 @@ extern "C" { return F_status_set_error(status); } - else if (number > f_type_size_32_unsigned) { + else if (number > F_type_size_32_unsigned_d) { return F_status_set_error(F_number_too_large); } @@ -406,7 +406,7 @@ extern "C" { return F_status_set_error(status); } - else if (number > f_type_size_32_unsigned) { + else if (number > F_type_size_32_unsigned_d) { return F_status_set_error(F_number_too_large); } @@ -501,7 +501,7 @@ extern "C" { cache->action.name_action.used = 0; cache->action.name_item.used = 0; - macro_f_array_lengths_t_increase_by(status, cache->ats, controller_common_allocation_small) + macro_f_array_lengths_t_increase_by(status, cache->ats, controller_common_allocation_small_d) if (F_status_is_error(status)) { controller_entry_error_print(is_entry, global.main->error, cache->action, F_status_set_fine(status), "macro_f_array_lengths_t_increase_by", F_true, global.thread); @@ -517,10 +517,10 @@ extern "C" { cache->action.line_item = entry->items.array[0].line; cache->action.name_item.used = 0; - status = controller_string_dynamic_append_terminated(entry->items.array[0].name, &cache->action.name_item); + status = controller_dynamic_append_terminated(entry->items.array[0].name, &cache->action.name_item); if (F_status_is_error(status)) { - controller_entry_error_print(is_entry, global.main->error, cache->action, F_status_set_fine(status), "controller_string_dynamic_append_terminated", F_true, global.thread); + controller_entry_error_print(is_entry, global.main->error, cache->action, F_status_set_fine(status), "controller_dynamic_append_terminated", F_true, global.thread); return status; } @@ -534,10 +534,10 @@ extern "C" { cache->action.line_action = actions->array[cache->ats.array[at_j]].line; cache->action.name_action.used = 0; - status2 = controller_string_dynamic_append_terminated(controller_entry_action_type_name(actions->array[cache->ats.array[at_j]].type), &cache->action.name_action); + status2 = controller_dynamic_append_terminated(controller_entry_action_type_name(actions->array[cache->ats.array[at_j]].type), &cache->action.name_action); if (F_status_is_error(status2)) { - controller_entry_error_print(is_entry, global.main->error, cache->action, F_status_set_fine(status2), "controller_string_dynamic_append_terminated", F_true, global.thread); + controller_entry_error_print(is_entry, global.main->error, cache->action, F_status_set_fine(status2), "controller_dynamic_append_terminated", F_true, global.thread); return status2; } @@ -549,8 +549,8 @@ extern "C" { controller_print_lock(global.main->warning.to, global.thread); fl_print_format("%c%[%SMultiple '%]", global.main->warning.to.stream, f_string_eol_s[0], global.main->warning.context, global.main->warning.prefix, global.main->warning.context); - fl_print_format("%[%s%]", global.main->warning.to.stream, global.main->warning.notable, controller_string_ready_s, global.main->warning.notable); - fl_print_format("%[' %s item actions detected; only the first will be used.%]%c", global.main->warning.to.stream, global.main->warning.context, is_entry ? controller_string_entry_s : controller_string_exit_s, global.main->warning.context, f_string_eol_s[0]); + fl_print_format("%[%s%]", global.main->warning.to.stream, global.main->warning.notable, controller_ready_s, global.main->warning.notable); + fl_print_format("%[' %s item actions detected; only the first will be used.%]%c", global.main->warning.to.stream, global.main->warning.context, is_entry ? controller_entry_s : controller_exit_s, global.main->warning.context, f_string_eol_s[0]); controller_entry_error_print_cache(is_entry, global.main->warning, cache->action); @@ -564,10 +564,10 @@ extern "C" { error_has = F_false; // "main" is not allowed to be used for an "item" and "setting" is not an executable "item". - if (fl_string_dynamic_compare_string(controller_string_main_s, actions->array[cache->ats.array[at_j]].parameters.array[0], controller_string_main_length) == F_equal_to) { + if (fl_string_dynamic_compare_string(controller_main_s, actions->array[cache->ats.array[at_j]].parameters.array[0], controller_main_s_length) == F_equal_to) { continue; } - else if (fl_string_dynamic_compare_string(controller_string_setting_s, actions->array[cache->ats.array[at_j]].parameters.array[0], controller_string_setting_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_setting_s, actions->array[cache->ats.array[at_j]].parameters.array[0], controller_setting_s_length) == F_equal_to) { continue; } @@ -583,7 +583,7 @@ extern "C" { if (global.main->error.verbosity != f_console_verbosity_quiet) { controller_print_lock(global.main->error.to, global.thread); - fl_print_format("%c%[%SThe %s item named '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, is_entry ? controller_string_entry_s : controller_string_exit_s, global.main->error.prefix, global.main->error.context); + fl_print_format("%c%[%SThe %s item named '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, is_entry ? controller_entry_s : controller_exit_s, global.main->error.prefix, global.main->error.context); fl_print_format("%[%Q%]", global.main->error.to.stream, global.main->error.notable, entry->items.array[i].name, global.main->error.notable); fl_print_format("%[' cannot be executed because recursion is not allowed.%]%c", global.main->error.to.stream, global.main->error.context, global.main->error.context, f_string_eol_s[0]); @@ -603,7 +603,7 @@ extern "C" { if (error_has) break; - macro_f_array_lengths_t_increase_by(status2, cache->ats, controller_common_allocation_small) + macro_f_array_lengths_t_increase_by(status2, cache->ats, controller_common_allocation_small_d) if (F_status_is_error(status2)) { controller_entry_error_print(is_entry, global.main->error, cache->action, F_status_set_fine(status2), "macro_f_array_lengths_t_increase_by", F_true, global.thread); @@ -628,10 +628,10 @@ extern "C" { cache->action.name_item.used = 0; cache->action.line_item = entry->items.array[i].line; - status2 = controller_string_dynamic_append_terminated(entry->items.array[i].name, &cache->action.name_item); + status2 = controller_dynamic_append_terminated(entry->items.array[i].name, &cache->action.name_item); if (F_status_is_error(status2)) { - controller_entry_error_print(is_entry, global.main->error, cache->action, F_status_set_fine(status2), "controller_string_dynamic_append_terminated", F_true, global.thread); + controller_entry_error_print(is_entry, global.main->error, cache->action, F_status_set_fine(status2), "controller_dynamic_append_terminated", F_true, global.thread); return status2; } @@ -645,7 +645,7 @@ extern "C" { if (global.main->error.verbosity != f_console_verbosity_quiet) { controller_print_lock(global.main->error.to, global.thread); - fl_print_format("%c%[%SThe %s item named '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, is_entry ? controller_string_entry_s : controller_string_exit_s, global.main->error.prefix, global.main->error.context); + fl_print_format("%c%[%SThe %s item named '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, is_entry ? controller_entry_s : controller_exit_s, global.main->error.prefix, global.main->error.context); fl_print_format("%[%Q%]", global.main->error.to.stream, global.main->error.notable, actions->array[cache->ats.array[at_j]].parameters.array[0], global.main->error.notable); fl_print_format("%[' does not exist.%]%c", global.main->error.to.stream, global.main->error.context, global.main->error.context, f_string_eol_s[0]); @@ -683,10 +683,10 @@ extern "C" { cache->action.line_item = entry->items.array[cache->ats.array[at_i]].line; cache->action.name_item.used = 0; - status2 = controller_string_dynamic_append_terminated(entry->items.array[cache->ats.array[at_i]].name, &cache->action.name_item); + status2 = controller_dynamic_append_terminated(entry->items.array[cache->ats.array[at_i]].name, &cache->action.name_item); if (F_status_is_error(status2)) { - controller_entry_error_print(is_entry, global.main->error, cache->action, F_status_set_fine(status2), "controller_string_dynamic_append_terminated", F_true, global.thread); + controller_entry_error_print(is_entry, global.main->error, cache->action, F_status_set_fine(status2), "controller_dynamic_append_terminated", F_true, global.thread); return status2; } @@ -737,7 +737,7 @@ extern "C" { cache->action.name_action.used = 0; cache->action.name_item.used = 0; - macro_f_array_lengths_t_increase_by(status, cache->ats, controller_common_allocation_small) + macro_f_array_lengths_t_increase_by(status, cache->ats, controller_common_allocation_small_d) if (F_status_is_error(status)) { controller_entry_error_print(is_entry, global->main->error, cache->action, F_status_set_fine(status), "macro_f_array_lengths_t_increase_by", F_true, global->thread); @@ -753,10 +753,10 @@ extern "C" { cache->action.line_item = entry->items.array[cache->ats.array[0]].line; cache->action.name_item.used = 0; - status = controller_string_dynamic_append_terminated(entry->items.array[cache->ats.array[0]].name, &cache->action.name_item); + status = controller_dynamic_append_terminated(entry->items.array[cache->ats.array[0]].name, &cache->action.name_item); if (F_status_is_error(status)) { - controller_entry_error_print(is_entry, global->main->error, cache->action, F_status_set_fine(status), "controller_string_dynamic_append_terminated", F_true, global->thread); + controller_entry_error_print(is_entry, global->main->error, cache->action, F_status_set_fine(status), "controller_dynamic_append_terminated", F_true, global->thread); return status; } @@ -765,7 +765,7 @@ extern "C" { if (global->main->error.verbosity != f_console_verbosity_quiet) { controller_print_lock(global->main->output.to, global->thread); - fl_print_format("%cProcessing %s%s item '", global->main->output.to.stream, f_string_eol_s[0], failsafe ? "failsafe " : "", is_entry ? controller_string_entry_s : controller_string_exit_s); + fl_print_format("%cProcessing %s%s item '", global->main->output.to.stream, f_string_eol_s[0], failsafe ? "failsafe " : "", is_entry ? controller_entry_s : controller_exit_s); fl_print_format("%[%Q%]'.%c", global->main->output.to.stream, global->main->context.set.notable, cache->action.name_item, global->main->context.set.notable, f_string_eol_s[0]); controller_print_unlock_flush(global->main->output.to, global->thread); @@ -783,10 +783,10 @@ extern "C" { cache->action.line_action = entry_action->line; cache->action.name_action.used = 0; - status = controller_string_dynamic_append_terminated(controller_entry_action_type_name(entry_action->type), &cache->action.name_action); + status = controller_dynamic_append_terminated(controller_entry_action_type_name(entry_action->type), &cache->action.name_action); if (F_status_is_error(status)) { - controller_entry_error_print(is_entry, global->main->error, cache->action, F_status_set_fine(status), "controller_string_dynamic_append_terminated", F_true, global->thread); + controller_entry_error_print(is_entry, global->main->error, cache->action, F_status_set_fine(status), "controller_dynamic_append_terminated", F_true, global->thread); return status; } @@ -796,7 +796,7 @@ extern "C" { if (global->main->error.verbosity != f_console_verbosity_quiet) { controller_print_lock(global->main->output.to, global->thread); - fl_print_format("%cThe %s item action '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_string_entry_s : controller_string_exit_s); + fl_print_format("%cThe %s item action '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_entry_s : controller_exit_s); fl_print_format("%[%Q%]", global->main->output.to.stream, global->main->context.set.title, cache->action.name_action, global->main->context.set.title); if (entry_action->parameters.used) { @@ -807,7 +807,7 @@ extern "C" { fl_print_format("%]", global->main->output.to.stream, global->main->context.set.notable); } - fl_print_format("' is %[%s%] and is in a ", global->main->output.to.stream, global->main->context.set.notable, entry_action->code & controller_entry_rule_code_require ? "required" : "optional", global->main->context.set.notable); + fl_print_format("' is %[%s%] and is in a ", global->main->output.to.stream, global->main->context.set.notable, entry_action->code & controller_entry_rule_code_require_d ? "required" : "optional", global->main->context.set.notable); fl_print_format("%[failed%] state, skipping.%c", global->main->output.to.stream, global->main->context.set.notable, global->main->context.set.notable, global->main->context.set.notable, f_string_eol_s[0]); @@ -815,10 +815,10 @@ extern "C" { } } else { - if ((entry_action->code & controller_entry_rule_code_require) && global->main->error.verbosity != f_console_verbosity_quiet || !(entry_action->code & controller_entry_rule_code_require) && (global->main->warning.verbosity == f_console_verbosity_verbose || global->main->warning.verbosity == f_console_verbosity_debug)) { + if ((entry_action->code & controller_entry_rule_code_require_d) && global->main->error.verbosity != f_console_verbosity_quiet || !(entry_action->code & controller_entry_rule_code_require_d) && (global->main->warning.verbosity == f_console_verbosity_verbose || global->main->warning.verbosity == f_console_verbosity_debug)) { fl_print_t *output = 0; - if (entry_action->code & controller_entry_rule_code_require) { + if (entry_action->code & controller_entry_rule_code_require_d) { output = &global->main->error; } else { @@ -827,7 +827,7 @@ extern "C" { controller_print_lock(output->to, global->thread); - fl_print_format("%c%[%SThe %s item action '%]", output->to.stream, f_string_eol_s[0], output->context, output->prefix ? output->prefix : f_string_empty_s, is_entry ? controller_string_entry_s : controller_string_exit_s, output->context); + fl_print_format("%c%[%SThe %s item action '%]", output->to.stream, f_string_eol_s[0], output->context, output->prefix ? output->prefix : f_string_empty_s, is_entry ? controller_entry_s : controller_exit_s, output->context); fl_print_format("%[%Q%]", output->to.stream, output->notable, cache->action.name_action, output->notable); @@ -839,7 +839,7 @@ extern "C" { fl_print_format("%]", output->to.stream, global->main->context.set.notable); } - if (entry_action->code & controller_entry_rule_code_require) { + if (entry_action->code & controller_entry_rule_code_require_d) { fl_print_format("%[' is%] %[required%]", output->to.stream, output->context, output->context, output->notable, output->notable); } else { @@ -848,7 +848,7 @@ extern "C" { fl_print_format(" %[and is in a%] %[failed%]", output->to.stream, output->context, output->context, output->notable, output->notable); - if (entry_action->code & controller_entry_rule_code_require) { + if (entry_action->code & controller_entry_rule_code_require_d) { fl_print_format(" %[state, aborting.%]%c", output->to.stream, output->context, output->context, f_string_eol_s[0]); } else { @@ -860,7 +860,7 @@ extern "C" { controller_print_unlock_flush(output->to, global->thread); } - if (controller_entry_action_type_is_rule(entry_action->type) && entry_action->code & controller_entry_rule_code_require) { + if (controller_entry_action_type_is_rule(entry_action->type) && entry_action->code & controller_entry_rule_code_require_d) { return F_status_is_error(F_require); } } @@ -869,13 +869,13 @@ extern "C" { } if (entry_action->type == controller_entry_action_type_ready) { - if ((entry_action->code & controller_entry_rule_code_wait) || global->setting->ready == controller_setting_ready_wait) { + if ((entry_action->code & controller_entry_rule_code_wait_d) || global->setting->ready == controller_setting_ready_wait) { if (global->main->parameters[controller_parameter_simulate].result == f_console_result_found || global->main->error.verbosity == f_console_verbosity_verbose || global->main->error.verbosity == f_console_verbosity_debug || entry->show == controller_entry_show_init) { if (global->main->output.verbosity != f_console_verbosity_quiet) { controller_print_lock(global->main->output.to, global->thread); - fl_print_format("%cWaiting before processing %s item action '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_string_entry_s : controller_string_exit_s); - fl_print_format("%[%s%]", global->main->output.to.stream, global->main->context.set.title, controller_string_ready_s, global->main->context.set.title); + fl_print_format("%cWaiting before processing %s item action '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_entry_s : controller_exit_s); + fl_print_format("%[%s%]", global->main->output.to.stream, global->main->context.set.title, controller_ready_s, global->main->context.set.title); fl_print_format("'.%c", global->main->output.to.stream, f_string_eol_s[0]); controller_print_unlock_flush(global->main->output.to, global->thread); @@ -892,8 +892,8 @@ extern "C" { if (global->main->output.verbosity != f_console_verbosity_quiet) { controller_print_lock(global->main->output.to, global->thread); - fl_print_format("%cIgnoring %s item action '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_string_entry_s : controller_string_exit_s); - fl_print_format("%[%s%]", global->main->output.to.stream, global->main->context.set.title, controller_string_ready_s, global->main->context.set.title); + fl_print_format("%cIgnoring %s item action '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_entry_s : controller_exit_s); + fl_print_format("%[%s%]", global->main->output.to.stream, global->main->context.set.title, controller_ready_s, global->main->context.set.title); fl_print_format("', state already is ready.%c", global->main->output.to.stream, f_string_eol_s[0]); controller_print_unlock_flush(global->main->output.to, global->thread); @@ -902,7 +902,7 @@ extern "C" { } else { if (!failsafe && (global->main->error.verbosity == f_console_verbosity_verbose || entry->show == controller_entry_show_init) && global->main->parameters[controller_parameter_simulate].result == f_console_result_none) { - fl_print_format("%cState is now '%[%s%]'.%c", global->main->output.to.stream, f_string_eol_s[0], global->main->context.set.notable, controller_string_ready_s, global->main->context.set.notable, f_string_eol_s[0]); + fl_print_format("%cState is now '%[%s%]'.%c", global->main->output.to.stream, f_string_eol_s[0], global->main->context.set.notable, controller_ready_s, global->main->context.set.notable, f_string_eol_s[0]); } status = controller_perform_ready(is_entry, *global, cache); @@ -916,7 +916,7 @@ extern "C" { if (global->main->error.verbosity != f_console_verbosity_quiet) { controller_print_lock(global->main->error.to, global->thread); - fl_print_format("%c%[Invalid %s item index '%]", global->main->error.to.stream, f_string_eol_s[0], global->main->error.context, is_entry ? controller_string_entry_s : controller_string_exit_s, global->main->error.context); + fl_print_format("%c%[Invalid %s item index '%]", global->main->error.to.stream, f_string_eol_s[0], global->main->error.context, is_entry ? controller_entry_s : controller_exit_s, global->main->error.context); fl_print_format("%[%un%]", global->main->error.to.stream, global->main->error.notable, entry_action->number, global->main->error.notable); fl_print_format("%[' detected.%]%c", global->main->error.to.stream, global->main->error.context, global->main->error.context, f_string_eol_s[0]); @@ -928,7 +928,7 @@ extern "C" { return F_status_is_error(F_critical); } - macro_f_array_lengths_t_increase_by(status, cache->ats, controller_common_allocation_small) + macro_f_array_lengths_t_increase_by(status, cache->ats, controller_common_allocation_small_d) if (F_status_is_error(status)) { controller_entry_error_print(is_entry, global->main->error, cache->action, F_status_set_fine(status), "macro_f_array_lengths_t_increase_by", F_true, global->thread); @@ -951,10 +951,10 @@ extern "C" { cache->action.name_item.used = 0; cache->action.line_item = entry->items.array[cache->ats.array[at_i]].line; - status = controller_string_dynamic_append_terminated(entry->items.array[cache->ats.array[at_i]].name, &cache->action.name_item); + status = controller_dynamic_append_terminated(entry->items.array[cache->ats.array[at_i]].name, &cache->action.name_item); if (F_status_is_error(status)) { - controller_entry_error_print(is_entry, global->main->error, cache->action, F_status_set_fine(status), "controller_string_dynamic_append_terminated", F_true, global->thread); + controller_entry_error_print(is_entry, global->main->error, cache->action, F_status_set_fine(status), "controller_dynamic_append_terminated", F_true, global->thread); return status; } @@ -963,7 +963,7 @@ extern "C" { if (global->main->output.verbosity != f_console_verbosity_quiet) { controller_print_lock(global->main->output.to, global->thread); - fl_print_format("%cProcessing %s item '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_string_entry_s : controller_string_exit_s); + fl_print_format("%cProcessing %s item '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_entry_s : controller_exit_s); fl_print_format("%[%Q%]", global->main->output.to.stream, global->main->context.set.title, cache->action.name_item, global->main->context.set.title); fl_print_format("'.%c", global->main->output.to.stream, f_string_eol_s[0]); @@ -1018,18 +1018,18 @@ extern "C" { if (global->main->output.verbosity != f_console_verbosity_quiet) { controller_print_lock(global->main->output.to, global->thread); - fl_print_format("%c%s %s item rule ", global->main->output.to.stream, f_string_eol_s[0], entry_action->type == controller_entry_action_type_consider ? "Considering" : "Processing", is_entry ? controller_string_entry_s : controller_string_exit_s); + fl_print_format("%c%s %s item rule ", global->main->output.to.stream, f_string_eol_s[0], entry_action->type == controller_entry_action_type_consider ? "Considering" : "Processing", is_entry ? controller_entry_s : controller_exit_s); fl_print_format("'%[%Q%]'", global->main->output.to.stream, global->main->context.set.title, alias_rule, global->main->context.set.title); if (entry->show == controller_entry_show_init && global->main->parameters[controller_parameter_simulate].result == f_console_result_none) { - fl_print_format(" [%[%s%]]", global->main->output.to.stream, global->main->context.set.notable, entry_action->code == controller_entry_rule_code_asynchronous ? controller_string_asynchronous_s : controller_string_synchronous_s, global->main->context.set.notable); + fl_print_format(" [%[%s%]]", global->main->output.to.stream, global->main->context.set.notable, entry_action->code == controller_entry_rule_code_asynchronous_d ? controller_asynchronous_s : controller_synchronous_s, global->main->context.set.notable); - if (entry_action->code == controller_entry_rule_code_wait) { - fl_print_format(" [%[%s%]]", global->main->output.to.stream, global->main->context.set.notable, controller_string_wait_s, global->main->context.set.notable); + if (entry_action->code == controller_entry_rule_code_wait_d) { + fl_print_format(" [%[%s%]]", global->main->output.to.stream, global->main->context.set.notable, controller_wait_s, global->main->context.set.notable); } - if (entry_action->code == controller_entry_rule_code_require) { - fl_print_format(" [%[%s%]]", global->main->output.to.stream, global->main->context.set.notable, controller_string_required_s, global->main->context.set.notable); + if (entry_action->code == controller_entry_rule_code_require_d) { + fl_print_format(" [%[%s%]]", global->main->output.to.stream, global->main->context.set.notable, controller_required_s, global->main->context.set.notable); } } @@ -1111,7 +1111,7 @@ extern "C" { if (global->main->parameters[controller_parameter_simulate].result == f_console_result_none) { f_thread_unlock(&global->thread->lock.rule); - if (entry_action->code & controller_entry_rule_code_require) { + if (entry_action->code & controller_entry_rule_code_require_d) { return F_status_set_error(F_require); } @@ -1131,27 +1131,27 @@ extern "C" { options_process = 0; if (global->main->parameters[controller_parameter_simulate].result == f_console_result_found) { - options_process |= controller_process_option_simulate; + options_process |= controller_process_option_simulate_d; } - if (entry_action->code & controller_entry_rule_code_require) { - options_process |= controller_process_option_require; + if (entry_action->code & controller_entry_rule_code_require_d) { + options_process |= controller_process_option_require_d; } - if (entry_action->code & controller_entry_rule_code_wait) { - options_process |= controller_process_option_wait; + if (entry_action->code & controller_entry_rule_code_wait_d) { + options_process |= controller_process_option_wait_d; } if (global->main->parameters[controller_parameter_validate].result == f_console_result_found) { - options_process |= controller_process_option_validate; + options_process |= controller_process_option_validate_d; } - if (entry_action->code & controller_entry_rule_code_asynchronous) { + if (entry_action->code & controller_entry_rule_code_asynchronous_d) { if (global->main->parameters[controller_parameter_validate].result == f_console_result_none) { - options_force |= controller_process_option_asynchronous; + options_force |= controller_process_option_asynchronous_d; } - options_process |= controller_process_option_asynchronous; + options_process |= controller_process_option_asynchronous_d; } status = controller_rule_process_begin(options_force, alias_rule, controller_entry_action_type_to_rule_action_type(entry_action->type), options_process, is_entry ? controller_process_type_entry : controller_process_type_exit, stack, *global, *cache); @@ -1160,7 +1160,7 @@ extern "C" { break; } - if (F_status_is_error(status) && global->main->parameters[controller_parameter_simulate].result == f_console_result_none && (entry_action->code & controller_entry_rule_code_require)) { + if (F_status_is_error(status) && global->main->parameters[controller_parameter_simulate].result == f_console_result_none && (entry_action->code & controller_entry_rule_code_require_d)) { return F_status_set_error(F_require); } } @@ -1170,7 +1170,7 @@ extern "C" { if (global->main->output.verbosity != f_console_verbosity_quiet) { controller_print_lock(global->main->output.to, global->thread); - fl_print_format("%c%s is executing '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_string_entry_s : controller_string_exit_s); + fl_print_format("%c%s is executing '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_entry_s : controller_exit_s); for (f_array_length_t k = 0; k < entry_action->parameters.used; ++k) { @@ -1195,7 +1195,7 @@ extern "C" { int result = 0; - status = fll_execute_into(0, entry_action->parameters, fl_execute_parameter_option_path, 0, (void *) &result); + status = fll_execute_into(0, entry_action->parameters, FL_execute_parameter_option_path_d, 0, (void *) &result); if (F_status_is_error(status)) { if (F_status_set_fine(status) == F_file_found_not) { @@ -1238,20 +1238,20 @@ extern "C" { else if (entry_action->type == controller_entry_action_type_timeout) { const f_string_t suffix = " MegaTime (milliseconds)"; - if (entry_action->code == controller_entry_timeout_code_kill) { + if (entry_action->code == controller_entry_timeout_code_kill_d) { entry->timeout_kill = entry_action->number; - controller_process_entry_print_simulate_setting_value(is_entry, *global, controller_string_timeout_s, controller_string_kill_s, entry->items.array[global->setting->failsafe_item_id].name, suffix); + controller_process_entry_print_simulate_setting_value(is_entry, *global, controller_timeout_s, controller_kill_s, entry->items.array[global->setting->failsafe_item_id].name, suffix); } - else if (entry_action->code == controller_entry_timeout_code_start) { + else if (entry_action->code == controller_entry_timeout_code_start_d) { entry->timeout_start = entry_action->number; - controller_process_entry_print_simulate_setting_value(is_entry, *global, controller_string_timeout_s, controller_string_start_s, entry->items.array[global->setting->failsafe_item_id].name, suffix); + controller_process_entry_print_simulate_setting_value(is_entry, *global, controller_timeout_s, controller_start_s, entry->items.array[global->setting->failsafe_item_id].name, suffix); } - else if (entry_action->code == controller_entry_timeout_code_stop) { + else if (entry_action->code == controller_entry_timeout_code_stop_d) { entry->timeout_stop = entry_action->number; - controller_process_entry_print_simulate_setting_value(is_entry, *global, controller_string_timeout_s, controller_string_stop_s, entry->items.array[global->setting->failsafe_item_id].name, suffix); + controller_process_entry_print_simulate_setting_value(is_entry, *global, controller_timeout_s, controller_stop_s, entry->items.array[global->setting->failsafe_item_id].name, suffix); } } else if (entry_action->type == controller_entry_action_type_failsafe) { @@ -1274,7 +1274,7 @@ extern "C" { if (global->main->error.verbosity != f_console_verbosity_quiet) { controller_print_lock(global->main->error.to, global->thread); - fl_print_format("%c%[%SInvalid %s item index '%]", global->main->error.to.stream, f_string_eol_s[0], global->main->error.context, global->main->error.prefix ? global->main->error.prefix : f_string_empty_s, is_entry ? controller_string_entry_s : controller_string_exit_s, global->main->error.context); + fl_print_format("%c%[%SInvalid %s item index '%]", global->main->error.to.stream, f_string_eol_s[0], global->main->error.context, global->main->error.prefix ? global->main->error.prefix : f_string_empty_s, is_entry ? controller_entry_s : controller_exit_s, global->main->error.context); fl_print_format("%[%un%]", global->main->error.to.stream, global->main->error.notable, entry_action->number, global->main->error.notable); fl_print_format("%[' detected.%]%c", global->main->error.to.stream, global->main->error.context, global->main->error.context, f_string_eol_s[0]); @@ -1289,7 +1289,7 @@ extern "C" { global->setting->failsafe_enabled = F_true; global->setting->failsafe_item_id = entry_action->number; - controller_process_entry_print_simulate_setting_value(is_entry, *global, controller_string_failsafe_s, 0, entry->items.array[global->setting->failsafe_item_id].name, 0); + controller_process_entry_print_simulate_setting_value(is_entry, *global, controller_failsafe_s, 0, entry->items.array[global->setting->failsafe_item_id].name, 0); } } } @@ -1321,10 +1321,10 @@ extern "C" { cache->action.line_item = entry->items.array[cache->ats.array[at_i]].line; cache->action.name_item.used = 0; - status = controller_string_dynamic_append_terminated(entry->items.array[cache->ats.array[at_i]].name, &cache->action.name_item); + status = controller_dynamic_append_terminated(entry->items.array[cache->ats.array[at_i]].name, &cache->action.name_item); if (F_status_is_error(status)) { - controller_entry_error_print(is_entry, global->main->error, cache->action, F_status_set_fine(status), "controller_string_dynamic_append_terminated", F_true, global->thread); + controller_entry_error_print(is_entry, global->main->error, cache->action, F_status_set_fine(status), "controller_dynamic_append_terminated", F_true, global->thread); break; } @@ -1359,8 +1359,8 @@ extern "C" { if ((global->main->parameters[controller_parameter_simulate].result == f_console_result_found && global->main->error.verbosity != f_console_verbosity_quiet) || global->main->error.verbosity == f_console_verbosity_verbose) { controller_print_lock(global->main->output.to, global->thread); - fl_print_format("%cDone processing %s item '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_string_entry_s : controller_string_exit_s); - fl_print_format("%[%s%]", global->main->output.to.stream, global->main->context.set.title, controller_string_main_s, global->main->context.set.title); + fl_print_format("%cDone processing %s item '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_entry_s : controller_exit_s); + fl_print_format("%[%s%]", global->main->output.to.stream, global->main->context.set.title, controller_main_s, global->main->context.set.title); fl_print_format("'.%c", global->main->output.to.stream, f_string_eol_s[0]); // failsafe should not print the extra newline because the failure exit from controller_main should handle this. @@ -1384,7 +1384,7 @@ extern "C" { controller_print_lock(global.main->output.to, global.thread); - fl_print_format("%cProcessing %s item action '", global.main->output.to.stream, f_string_eol_s[0], is_entry ? controller_string_entry_s : controller_string_exit_s); + fl_print_format("%cProcessing %s item action '", global.main->output.to.stream, f_string_eol_s[0], is_entry ? controller_entry_s : controller_exit_s); fl_print_format("%[%S%]' setting ", global.main->output.to.stream, global.main->context.set.title, name, global.main->context.set.title); diff --git a/level_3/controller/c/private-controller.h b/level_3/controller/c/private-controller.h index 81422f8..c0651d7 100644 --- a/level_3/controller/c/private-controller.h +++ b/level_3/controller/c/private-controller.h @@ -29,7 +29,7 @@ extern "C" { * The start range will be past the stop range on overflow or on any failure. */ #ifndef _di_controller_range_after_number_sign_ - extern f_string_range_t controller_range_after_number_sign(const f_string_static_t buffer, const f_string_range_t range) f_attribute_visibility_internal; + extern f_string_range_t controller_range_after_number_sign(const f_string_static_t buffer, const f_string_range_t range) F_attribute_visibility_internal_d; #endif // _di_controller_range_after_number_sign_ /** @@ -50,7 +50,7 @@ extern "C" { * @see fl_string_dynamic_rip_nulless() */ #ifndef _di_controller_string_dynamic_rip_nulless_terminated_ - extern f_status_t controller_string_dynamic_rip_nulless_terminated(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) f_attribute_visibility_internal; + extern f_status_t controller_dynamic_rip_nulless_terminated(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) F_attribute_visibility_internal_d; #endif // _di_controller_string_dynamic_rip_nulless_terminated_ /** @@ -71,7 +71,7 @@ extern "C" { * @see f_string_dynamic_terminate_after() */ #ifndef _di_controller_string_dynamic_append_terminated_ - extern f_status_t controller_string_dynamic_append_terminated(const f_string_static_t from, f_string_dynamic_t *destination) f_attribute_visibility_internal; + extern f_status_t controller_dynamic_append_terminated(const f_string_static_t from, f_string_dynamic_t *destination) F_attribute_visibility_internal_d; #endif // _di_controller_string_dynamic_append_terminated_ /** @@ -94,7 +94,7 @@ extern "C" { * @see f_string_dynamic_terminate_after() */ #ifndef _di_controller_string_dynamic_partial_append_terminated_ - extern f_status_t controller_string_dynamic_partial_append_terminated(const f_string_static_t from, const f_string_range_t range, f_string_dynamic_t *destination) f_attribute_visibility_internal; + extern f_status_t controller_dynamic_partial_append_terminated(const f_string_static_t from, const f_string_range_t range, f_string_dynamic_t *destination) F_attribute_visibility_internal_d; #endif // _di_controller_string_dynamic_partial_append_terminated_ /** @@ -138,7 +138,7 @@ extern "C" { * @see f_string_dynamic_terminate_after() */ #ifndef _di_controller_file_load_ - extern f_status_t controller_file_load(const bool required, const f_string_t path_prefix, const f_string_static_t path_name, const f_string_t path_suffix, const f_array_length_t path_prefix_length, const f_array_length_t path_suffix_length, controller_global_t global, controller_cache_t *cache) f_attribute_visibility_internal; + extern f_status_t controller_file_load(const bool required, const f_string_t path_prefix, const f_string_static_t path_name, const f_string_t path_suffix, const f_array_length_t path_prefix_length, const f_array_length_t path_suffix_length, controller_global_t global, controller_cache_t *cache) F_attribute_visibility_internal_d; #endif // _di_controller_file_load_ /** @@ -163,7 +163,7 @@ extern "C" { * @see f_file_stream_open() */ #ifndef _di_controller_file_pid_create_ - f_status_t controller_file_pid_create(const pid_t pid, const f_string_static_t path) f_attribute_visibility_internal; + f_status_t controller_file_pid_create(const pid_t pid, const f_string_static_t path) F_attribute_visibility_internal_d; #endif // _di_controller_file_pid_create_ /** @@ -187,7 +187,7 @@ extern "C" { * Errors (with error bit) from: fl_conversion_string_to_decimal_unsigned() */ #ifndef _di_controller_file_pid_delete_ - f_status_t controller_file_pid_delete(const pid_t pid, const f_string_static_t path) f_attribute_visibility_internal; + f_status_t controller_file_pid_delete(const pid_t pid, const f_string_static_t path) F_attribute_visibility_internal_d; #endif // _di_controller_file_pid_delete_ /** @@ -207,7 +207,7 @@ extern "C" { * Errors (with error bit) from: fl_conversion_string_to_decimal_unsigned() */ #ifndef _di_controller_file_pid_read_ - f_status_t controller_file_pid_read(const f_string_static_t path, pid_t *pid) f_attribute_visibility_internal; + f_status_t controller_file_pid_read(const f_string_static_t path, pid_t *pid) F_attribute_visibility_internal_d; #endif // _di_controller_file_pid_read_ /** @@ -234,7 +234,7 @@ extern "C" { * F_true if there is a process found (address is stored in "at"). */ #ifndef _di_controller_find_process_ - f_status_t controller_find_process(const f_array_length_t action, const f_string_static_t alias, const controller_processs_t processs, f_array_length_t *at) f_attribute_visibility_internal; + f_status_t controller_find_process(const f_array_length_t action, const f_string_static_t alias, const controller_processs_t processs, f_array_length_t *at) F_attribute_visibility_internal_d; #endif // _di_controller_find_process_ /** @@ -261,7 +261,7 @@ extern "C" { * @see fl_conversion_string_to_number_unsigned() */ #ifndef _di_controller_get_id_user_ - f_status_t controller_get_id_user(const f_string_static_t buffer, const f_string_range_t range, controller_cache_t *cache, uid_t *id) f_attribute_visibility_internal; + f_status_t controller_get_id_user(const f_string_static_t buffer, const f_string_range_t range, controller_cache_t *cache, uid_t *id) F_attribute_visibility_internal_d; #endif // _di_controller_get_id_user_ /** @@ -288,7 +288,7 @@ extern "C" { * @see fl_conversion_string_to_number_unsigned() */ #ifndef _di_controller_get_id_group_ - f_status_t controller_get_id_group(const f_string_static_t buffer, const f_string_range_t range, controller_cache_t *cache, gid_t *id) f_attribute_visibility_internal; + f_status_t controller_get_id_group(const f_string_static_t buffer, const f_string_range_t range, controller_cache_t *cache, gid_t *id) F_attribute_visibility_internal_d; #endif // _di_controller_get_id_group_ /** @@ -314,7 +314,7 @@ extern "C" { * @see controller_file_pid_create() */ #ifndef _di_controller_perform_ready_ - extern f_status_t controller_perform_ready(const bool is_entry, controller_global_t global, controller_cache_t *cache) f_attribute_visibility_internal; + extern f_status_t controller_perform_ready(const bool is_entry, controller_global_t global, controller_cache_t *cache) F_attribute_visibility_internal_d; #endif // _di_controller_perform_ready_ /** @@ -345,7 +345,7 @@ extern "C" { * @see f_string_dynamic_terminate_after() */ #ifndef _di_controller_preprocess_entry_ - extern f_status_t controller_preprocess_entry(const bool is_entry, controller_global_t global, controller_cache_t *cache) f_attribute_visibility_internal; + extern f_status_t controller_preprocess_entry(const bool is_entry, controller_global_t global, controller_cache_t *cache) F_attribute_visibility_internal_d; #endif // _di_controller_preprocess_entry_ /** @@ -372,14 +372,14 @@ extern "C" { * * Errors (with error bit) from: macro_f_array_lengths_t_increase_by(). * Errors (with error bit) from: controller_perform_ready(). - * Errors (with error bit) from: controller_string_dynamic_append_terminated(). + * Errors (with error bit) from: controller_dynamic_append_terminated(). * * @see macro_f_array_lengths_t_increase_by() * @see controller_perform_ready() - * @see controller_string_dynamic_append_terminated() + * @see controller_dynamic_append_terminated() */ #ifndef _di_controller_process_entry_ - extern f_status_t controller_process_entry(const bool failsafe, const bool is_entry, controller_global_t *global, controller_cache_t *cache) f_attribute_visibility_internal; + extern f_status_t controller_process_entry(const bool failsafe, const bool is_entry, controller_global_t *global, controller_cache_t *cache) F_attribute_visibility_internal_d; #endif // _di_controller_process_entry_ /** @@ -401,7 +401,7 @@ extern "C" { * An additional message to append at the end (before the final period). */ #ifndef _di_controller_process_entry_print_simulate_setting_value_ - extern void controller_process_entry_print_simulate_setting_value(const bool is_entry, const controller_global_t global, const f_string_t name, const f_string_t name_sub, const f_string_static_t value, const f_string_t suffix) f_attribute_visibility_internal; + extern void controller_process_entry_print_simulate_setting_value(const bool is_entry, const controller_global_t global, const f_string_t name, const f_string_t name_sub, const f_string_static_t value, const f_string_t suffix) F_attribute_visibility_internal_d; #endif // _di_controller_process_entry_print_simulate_setting_value_ /** @@ -445,7 +445,7 @@ extern "C" { * @see controller_lock_write() */ #ifndef _di_controller_process_prepare_ - extern f_status_t controller_process_prepare(const bool is_normal, const uint8_t action, const f_string_static_t alias, const controller_global_t global, f_array_length_t *id) f_attribute_visibility_internal; + extern f_status_t controller_process_prepare(const bool is_normal, const uint8_t action, const f_string_static_t alias, const controller_global_t global, f_array_length_t *id) F_attribute_visibility_internal_d; #endif // _di_controller_process_prepare_ /** @@ -478,7 +478,7 @@ extern "C" { * @see controller_process_prepare() */ #ifndef _di_controller_process_prepare_process_type_ - extern f_status_t controller_process_prepare_process_type(const uint8_t type, const uint8_t action, const f_string_static_t alias, const controller_global_t global, f_array_length_t *id) f_attribute_visibility_internal; + extern f_status_t controller_process_prepare_process_type(const uint8_t type, const uint8_t action, const f_string_static_t alias, const controller_global_t global, f_array_length_t *id) F_attribute_visibility_internal_d; #endif // _di_controller_process_prepare_process_type_ /** @@ -491,7 +491,7 @@ extern "C" { * A subset of status codes with error bit. */ #ifndef _di_controller_status_simplify_error_ - extern f_status_t controller_status_simplify_error(const f_status_t status) f_attribute_visibility_internal; + extern f_status_t controller_status_simplify_error(const f_status_t status) F_attribute_visibility_internal_d; #endif // _di_controller_status_simplify_error_ /** @@ -516,7 +516,7 @@ extern "C" { * @see f_utf_is_alpha_digit() */ #ifndef _di_controller_validate_define_name_ - extern f_status_t controller_validate_environment_name(const f_string_static_t name) f_attribute_visibility_internal; + extern f_status_t controller_validate_environment_name(const f_string_static_t name) F_attribute_visibility_internal_d; #endif // _di_controller_validate_define_name_ /** @@ -535,7 +535,7 @@ extern "C" { * @see f_utf_is_graph() */ #ifndef _di_controller_validate_has_graph_ - extern f_status_t controller_validate_has_graph(const f_string_static_t name) f_attribute_visibility_internal; + extern f_status_t controller_validate_has_graph(const f_string_static_t name) F_attribute_visibility_internal_d; #endif // _di_controller_validate_has_graph_ #ifdef __cplusplus diff --git a/level_3/controller/c/private-entry.c b/level_3/controller/c/private-entry.c index 36d2a82..e827bb7 100644 --- a/level_3/controller/c/private-entry.c +++ b/level_3/controller/c/private-entry.c @@ -51,78 +51,78 @@ extern "C" { switch (type) { case controller_entry_action_type_consider: - buffer.string = controller_string_consider_s; - buffer.used = controller_string_consider_length; + buffer.string = controller_consider_s; + buffer.used = controller_consider_s_length; break; case controller_entry_action_type_execute: - buffer.string = controller_string_execute_s; - buffer.used = controller_string_execute_length; + buffer.string = controller_execute_s; + buffer.used = controller_execute_s_length; break; case controller_entry_action_type_failsafe: - buffer.string = controller_string_failsafe_s; - buffer.used = controller_string_failsafe_length; + buffer.string = controller_failsafe_s; + buffer.used = controller_failsafe_s_length; break; case controller_entry_action_type_freeze: - buffer.string = controller_string_freeze_s; - buffer.used = controller_string_freeze_length; + buffer.string = controller_freeze_s; + buffer.used = controller_freeze_s_length; break; case controller_entry_action_type_item: - buffer.string = controller_string_item_s; - buffer.used = controller_string_item_length; + buffer.string = controller_item_s; + buffer.used = controller_item_s_length; break; case controller_entry_action_type_kill: - buffer.string = controller_string_kill_s; - buffer.used = controller_string_kill_length; + buffer.string = controller_kill_s; + buffer.used = controller_kill_s_length; break; case controller_entry_action_type_pause: - buffer.string = controller_string_pause_s; - buffer.used = controller_string_pause_length; + buffer.string = controller_pause_s; + buffer.used = controller_pause_s_length; break; case controller_entry_action_type_ready: - buffer.string = controller_string_ready_s; - buffer.used = controller_string_ready_length; + buffer.string = controller_ready_s; + buffer.used = controller_ready_s_length; break; case controller_entry_action_type_reload: - buffer.string = controller_string_reload_s; - buffer.used = controller_string_reload_length; + buffer.string = controller_reload_s; + buffer.used = controller_reload_s_length; break; case controller_entry_action_type_restart: - buffer.string = controller_string_restart_s; - buffer.used = controller_string_restart_length; + buffer.string = controller_restart_s; + buffer.used = controller_restart_s_length; break; case controller_entry_action_type_resume: - buffer.string = controller_string_resume_s; - buffer.used = controller_string_resume_length; + buffer.string = controller_resume_s; + buffer.used = controller_resume_s_length; break; case controller_entry_action_type_start: - buffer.string = controller_string_start_s; - buffer.used = controller_string_start_length; + buffer.string = controller_start_s; + buffer.used = controller_start_s_length; break; case controller_entry_action_type_stop: - buffer.string = controller_string_stop_s; - buffer.used = controller_string_stop_length; + buffer.string = controller_stop_s; + buffer.used = controller_stop_s_length; break; case controller_entry_action_type_thaw: - buffer.string = controller_string_thaw_s; - buffer.used = controller_string_thaw_length; + buffer.string = controller_thaw_s; + buffer.used = controller_thaw_s_length; break; case controller_entry_action_type_timeout: - buffer.string = controller_string_timeout_s; - buffer.used = controller_string_timeout_length; + buffer.string = controller_timeout_s; + buffer.used = controller_timeout_s_length; break; } @@ -172,7 +172,7 @@ extern "C" { f_status_t controller_entry_actions_increase_by(const f_array_length_t amount, controller_entry_actions_t *actions) { if (actions->used + amount > actions->size) { - if (actions->used + amount > f_array_length_t_size) { + if (actions->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -212,7 +212,7 @@ extern "C" { { controller_state_interrupt_t custom = macro_controller_state_interrupt_t_initialize(is_entry, global.thread); - f_state_t state = macro_f_state_t_initialize(controller_common_allocation_large, controller_common_allocation_small, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0); + f_state_t state = macro_f_state_t_initialize(controller_common_allocation_large_d, controller_common_allocation_small_d, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0); f_string_range_t range = content_range; status = fll_fss_extended_read(cache->buffer_file, state, &range, &cache->object_actions, &cache->content_actions, 0, 0, &cache->delimits, 0); @@ -273,63 +273,63 @@ extern "C" { action->line = ++cache->action.line_action; - status = controller_string_dynamic_rip_nulless_terminated(cache->buffer_file, cache->object_actions.array[i], &cache->action.name_action); + status = controller_dynamic_rip_nulless_terminated(cache->buffer_file, cache->object_actions.array[i], &cache->action.name_action); if (F_status_is_error(status)) { - controller_entry_error_print(is_entry, global.main->error, cache->action, F_status_set_fine(status), "controller_string_dynamic_rip_nulless_terminated", F_true, global.thread); + controller_entry_error_print(is_entry, global.main->error, cache->action, F_status_set_fine(status), "controller_dynamic_rip_nulless_terminated", F_true, global.thread); break; } - if (fl_string_dynamic_compare_string(controller_string_consider_s, cache->action.name_action, controller_string_consider_length) == F_equal_to) { + if (fl_string_dynamic_compare_string(controller_consider_s, cache->action.name_action, controller_consider_s_length) == F_equal_to) { actions->array[actions->used].type = controller_entry_action_type_consider; } - else if (fl_string_dynamic_compare_string(controller_string_execute_s, cache->action.name_action, controller_string_execute_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_execute_s, cache->action.name_action, controller_execute_s_length) == F_equal_to) { actions->array[actions->used].type = controller_entry_action_type_execute; } - else if (fl_string_dynamic_compare_string(controller_string_failsafe_s, cache->action.name_action, controller_string_failsafe_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_failsafe_s, cache->action.name_action, controller_failsafe_s_length) == F_equal_to) { actions->array[actions->used].type = controller_entry_action_type_failsafe; } - else if (fl_string_dynamic_compare_string(controller_string_freeze_s, cache->action.name_action, controller_string_freeze_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_freeze_s, cache->action.name_action, controller_freeze_s_length) == F_equal_to) { actions->array[actions->used].type = controller_entry_action_type_freeze; } - else if (fl_string_dynamic_compare_string(controller_string_item_s, cache->action.name_action, controller_string_item_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_item_s, cache->action.name_action, controller_item_s_length) == F_equal_to) { actions->array[actions->used].type = controller_entry_action_type_item; } - else if (fl_string_dynamic_compare_string(controller_string_kill_s, cache->action.name_action, controller_string_kill_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_kill_s, cache->action.name_action, controller_kill_s_length) == F_equal_to) { actions->array[actions->used].type = controller_entry_action_type_kill; } - else if (fl_string_dynamic_compare_string(controller_string_pause_s, cache->action.name_action, controller_string_pause_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_pause_s, cache->action.name_action, controller_pause_s_length) == F_equal_to) { actions->array[actions->used].type = controller_entry_action_type_pause; } - else if (fl_string_dynamic_compare_string(controller_string_ready_s, cache->action.name_action, controller_string_ready_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_ready_s, cache->action.name_action, controller_ready_s_length) == F_equal_to) { actions->array[actions->used].type = controller_entry_action_type_ready; } - else if (fl_string_dynamic_compare_string(controller_string_reload_s, cache->action.name_action, controller_string_reload_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_reload_s, cache->action.name_action, controller_reload_s_length) == F_equal_to) { actions->array[actions->used].type = controller_entry_action_type_reload; } - else if (fl_string_dynamic_compare_string(controller_string_restart_s, cache->action.name_action, controller_string_restart_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_restart_s, cache->action.name_action, controller_restart_s_length) == F_equal_to) { actions->array[actions->used].type = controller_entry_action_type_restart; } - else if (fl_string_dynamic_compare_string(controller_string_resume_s, cache->action.name_action, controller_string_resume_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_resume_s, cache->action.name_action, controller_resume_s_length) == F_equal_to) { actions->array[actions->used].type = controller_entry_action_type_resume; } - else if (fl_string_dynamic_compare_string(controller_string_start_s, cache->action.name_action, controller_string_start_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_start_s, cache->action.name_action, controller_start_s_length) == F_equal_to) { actions->array[actions->used].type = controller_entry_action_type_start; } - else if (fl_string_dynamic_compare_string(controller_string_stop_s, cache->action.name_action, controller_string_stop_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_stop_s, cache->action.name_action, controller_stop_s_length) == F_equal_to) { actions->array[actions->used].type = controller_entry_action_type_stop; } - else if (fl_string_dynamic_compare_string(controller_string_thaw_s, cache->action.name_action, controller_string_thaw_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_thaw_s, cache->action.name_action, controller_thaw_s_length) == F_equal_to) { actions->array[actions->used].type = controller_entry_action_type_thaw; } - else if (fl_string_dynamic_compare_string(controller_string_timeout_s, cache->action.name_action, controller_string_timeout_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_timeout_s, cache->action.name_action, controller_timeout_s_length) == F_equal_to) { actions->array[actions->used].type = controller_entry_action_type_timeout; } else { if (global.main->warning.verbosity == f_console_verbosity_debug) { controller_print_lock(global.main->warning.to, global.thread); - fl_print_format("%c%[%SUnknown %s item action '%]", global.main->warning.to.stream, f_string_eol_s[0], global.main->warning.context, global.main->warning.prefix, is_entry ? controller_string_entry_s : controller_string_exit_s, global.main->warning.context); + fl_print_format("%c%[%SUnknown %s item action '%]", global.main->warning.to.stream, f_string_eol_s[0], global.main->warning.context, global.main->warning.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->warning.context); fl_print_format("%[%S%]", global.main->warning.to.stream, global.main->warning.notable, cache->action.name_action, global.main->warning.notable); fl_print_format("%['.%]%c", global.main->warning.to.stream, global.main->warning.context, global.main->warning.context, f_string_eol_s[0]); @@ -375,7 +375,7 @@ extern "C" { flockfile(global.main->error.to.stream); - fl_print_format("%c%[%SThe %s item action '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_string_entry_s : controller_string_exit_s, global.main->error.context); + fl_print_format("%c%[%SThe %s item action '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context); fl_print_format("%[%Q%]", global.main->error.to.stream, global.main->error.notable, cache->action.name_action, global.main->error.notable); fl_print_format("%[' requires ", global.main->error.to.stream, global.main->error.context); @@ -482,7 +482,7 @@ extern "C" { } if (global.main->error.verbosity != f_console_verbosity_quiet) { - fll_print_format("%c%[%SThe %s item action must not have an empty string for a path (the first parameter).%]%c", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_string_entry_s : controller_string_exit_s, global.main->error.context, f_string_eol_s[0]); + fll_print_format("%c%[%SThe %s item action must not have an empty string for a path (the first parameter).%]%c", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context, f_string_eol_s[0]); } } @@ -525,7 +525,7 @@ extern "C" { flockfile(global.main->error.to.stream); - fl_print_format("%c%[%SThe %s item action second parameter '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_string_entry_s : controller_string_exit_s, global.main->error.context); + fl_print_format("%c%[%SThe %s item action second parameter '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context); fl_print_format("%[%Q%]", global.main->error.to.stream, global.main->error.notable, action->parameters.array[1], global.main->error.notable); fl_print_format("%[' must be a base path name, such as '%]", global.main->error.to.stream, global.main->error.context, global.main->error.context); fl_print_format("%[%Q%]", global.main->error.to.stream, global.main->error.notable, cache->buffer_path, global.main->error.notable); @@ -550,20 +550,20 @@ extern "C" { } if (global.main->error.verbosity != f_console_verbosity_quiet) { - fll_print_format("%c%[%SThe %s item action must not have an empty string for a rule name (the second parameter).%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_string_entry_s : controller_string_exit_s, global.main->error.context, f_string_eol_s[0]); + fll_print_format("%c%[%SThe %s item action must not have an empty string for a rule name (the second parameter).%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context, f_string_eol_s[0]); } } for (j = 2; j < action->parameters.used; ++j) { - if (fl_string_dynamic_compare_string(controller_string_asynchronous_s, action->parameters.array[j], controller_string_asynchronous_length) == F_equal_to) { - action->code |= controller_entry_rule_code_asynchronous; + if (fl_string_dynamic_compare_string(controller_asynchronous_s, action->parameters.array[j], controller_asynchronous_s_length) == F_equal_to) { + action->code |= controller_entry_rule_code_asynchronous_d; } - else if (fl_string_dynamic_compare_string(controller_string_require_s, action->parameters.array[j], controller_string_require_length) == F_equal_to) { - action->code |= controller_entry_rule_code_require; + else if (fl_string_dynamic_compare_string(controller_require_s, action->parameters.array[j], controller_require_s_length) == F_equal_to) { + action->code |= controller_entry_rule_code_require_d; } - else if (fl_string_dynamic_compare_string(controller_string_wait_s, action->parameters.array[j], controller_string_wait_length) == F_equal_to) { - action->code |= controller_entry_rule_code_wait; + else if (fl_string_dynamic_compare_string(controller_wait_s, action->parameters.array[j], controller_wait_s_length) == F_equal_to) { + action->code |= controller_entry_rule_code_wait_d; } else { if (action->status == F_none) { @@ -577,12 +577,12 @@ extern "C" { if (global.main->error.verbosity != f_console_verbosity_quiet) { flockfile(global.main->error.to.stream); - fl_print_format("%c%[%SThe %s item action third parameter (and beyond) must be one of '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_string_entry_s : controller_string_exit_s, global.main->error.context); - fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_string_asynchronous_s, global.main->error.notable); + fl_print_format("%c%[%SThe %s item action third parameter (and beyond) must be one of '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context); + fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_asynchronous_s, global.main->error.notable); fl_print_format("%[', '%]", global.main->error.to.stream, global.main->error.context, global.main->error.context); - fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_string_require_s, global.main->error.notable); + fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_require_s, global.main->error.notable); fl_print_format("%[', or '%]", global.main->error.to.stream, global.main->error.context, global.main->error.context); - fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_string_wait_s, global.main->error.notable); + fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_wait_s, global.main->error.notable); fl_print_format("%[' but instead has '%]", global.main->error.to.stream, global.main->error.context, global.main->error.context); fl_print_format("%[%Q%]", global.main->error.to.stream, global.main->error.notable, action->parameters.array[j], global.main->error.notable); fl_print_format("%['.%]", global.main->error.to.stream, global.main->error.context, global.main->error.context, f_string_eol_s[0]); @@ -593,7 +593,7 @@ extern "C" { } // for } else if (action->type == controller_entry_action_type_failsafe || action->type == controller_entry_action_type_item) { - if (fl_string_dynamic_compare_string(controller_string_main_s, action->parameters.array[0], controller_string_main_length) == F_equal_to) { + if (fl_string_dynamic_compare_string(controller_main_s, action->parameters.array[0], controller_main_s_length) == F_equal_to) { action->status = F_status_set_error(F_supported_not); if (F_status_is_error_not(status_action)) { @@ -603,8 +603,8 @@ extern "C" { if (global.main->error.verbosity != f_console_verbosity_quiet) { flockfile(global.main->error.to.stream); - fl_print_format("%c%[%SThe %s item action may not specify the reserved item '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_string_entry_s : controller_string_exit_s, global.main->error.context); - fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_string_main_s, global.main->error.notable); + fl_print_format("%c%[%SThe %s item action may not specify the reserved item '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context); + fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_main_s, global.main->error.notable); fl_print_format("%['.%]", global.main->error.to.stream, global.main->error.context, global.main->error.context, f_string_eol_s[0]); funlockfile(global.main->error.to.stream); @@ -613,14 +613,14 @@ extern "C" { } else if (action->type == controller_entry_action_type_timeout) { - if (fl_string_dynamic_compare_string(controller_string_kill_s, action->parameters.array[0], controller_string_kill_length) == F_equal_to) { - action->code = controller_entry_timeout_code_kill; + if (fl_string_dynamic_compare_string(controller_kill_s, action->parameters.array[0], controller_kill_s_length) == F_equal_to) { + action->code = controller_entry_timeout_code_kill_d; } - else if (fl_string_dynamic_compare_string(controller_string_start_s, action->parameters.array[0], controller_string_start_length) == F_equal_to) { - action->code = controller_entry_timeout_code_start; + else if (fl_string_dynamic_compare_string(controller_start_s, action->parameters.array[0], controller_start_s_length) == F_equal_to) { + action->code = controller_entry_timeout_code_start_d; } - else if (fl_string_dynamic_compare_string(controller_string_stop_s, action->parameters.array[0], controller_string_stop_length) == F_equal_to) { - action->code = controller_entry_timeout_code_stop; + else if (fl_string_dynamic_compare_string(controller_stop_s, action->parameters.array[0], controller_stop_s_length) == F_equal_to) { + action->code = controller_entry_timeout_code_stop_d; } else { action->status = F_status_set_error(F_supported_not); @@ -632,12 +632,12 @@ extern "C" { if (global.main->error.verbosity != f_console_verbosity_quiet) { flockfile(global.main->error.to.stream); - fl_print_format("%c%[%SThe %s item action must have one of '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_string_entry_s : controller_string_exit_s, global.main->error.context); - fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_string_kill_s, global.main->error.notable); + fl_print_format("%c%[%SThe %s item action must have one of '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context); + fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_kill_s, global.main->error.notable); fl_print_format("%[', '%]", global.main->error.to.stream, global.main->error.context, global.main->error.context); - fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_string_start_s, global.main->error.notable); + fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_start_s, global.main->error.notable); fl_print_format("%[', or '%]", global.main->error.to.stream, global.main->error.context, global.main->error.context); - fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_string_stop_s, global.main->error.notable); + fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_stop_s, global.main->error.notable); fl_print_format("%[' but instead has '%]", global.main->error.to.stream, global.main->error.context, global.main->error.context); fl_print_format("%[%Q%]", global.main->error.to.stream, global.main->error.notable, action->parameters.array[0], global.main->error.notable); fl_print_format("%['.%]", global.main->error.to.stream, global.main->error.context, global.main->error.context, f_string_eol_s[0]); @@ -671,7 +671,7 @@ extern "C" { if (global.main->error.verbosity != f_console_verbosity_quiet) { flockfile(global.main->error.to.stream); - fl_print_format("%c%[%SThe %s item action parameter '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_string_entry_s : controller_string_exit_s, global.main->error.context); + fl_print_format("%c%[%SThe %s item action parameter '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context); fl_print_format("%[%Q%]", global.main->error.to.stream, global.main->error.notable, action->parameters.array[1], global.main->error.notable); fl_print_format("%[' is not a valid supported number.%]", global.main->error.to.stream, global.main->error.context, global.main->error.context, f_string_eol_s[0]); @@ -682,8 +682,8 @@ extern "C" { } else if (action->type == controller_entry_action_type_ready) { if (action->parameters.used) { - if (fl_string_dynamic_compare_string(controller_string_wait_s, action->parameters.array[0], controller_string_wait_length) == F_equal_to) { - action->code |= controller_entry_rule_code_wait; + if (fl_string_dynamic_compare_string(controller_wait_s, action->parameters.array[0], controller_wait_s_length) == F_equal_to) { + action->code |= controller_entry_rule_code_wait_d; } else { action->status = F_status_set_error(F_supported_not); @@ -691,8 +691,8 @@ extern "C" { if (global.main->error.verbosity != f_console_verbosity_quiet) { flockfile(global.main->error.to.stream); - fl_print_format("%c%[%SThe %s item action may only have '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_string_entry_s : controller_string_exit_s, global.main->error.context); - fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_string_wait_s, global.main->error.notable); + fl_print_format("%c%[%SThe %s item action may only have '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context); + fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_wait_s, global.main->error.notable); fl_print_format("%[' but instead has '%]", global.main->error.to.stream, global.main->error.context, global.main->error.context); fl_print_format("%[%Q%]", global.main->error.to.stream, global.main->error.notable, action->parameters.array[0], global.main->error.notable); fl_print_format("%['.%]", global.main->error.to.stream, global.main->error.context, global.main->error.context, f_string_eol_s[0]); @@ -749,7 +749,7 @@ extern "C" { } if (cache.name_item.used) { - fl_print_format("%s item '%]", output.to.stream, is_entry ? controller_string_entry_s : controller_string_exit_s, output.context); + fl_print_format("%s item '%]", output.to.stream, is_entry ? controller_entry_s : controller_exit_s, output.context); fl_print_format("%[%Q%]", output.to.stream, output.notable, cache.name_item, output.notable); fl_print_format("%[' on line%] ", output.to.stream, output.context, output.context); fl_print_format("%[%un%]", output.to.stream, output.notable, cache.line_item, output.notable); @@ -757,7 +757,7 @@ extern "C" { } if (cache.name_file.used) { - fl_print_format("%s file '%]", output.to.stream, is_entry ? controller_string_entry_s : controller_string_exit_s, output.context); + fl_print_format("%s file '%]", output.to.stream, is_entry ? controller_entry_s : controller_exit_s, output.context); fl_print_format("%[%Q%]%['", output.to.stream, output.notable, cache.name_file, output.notable, output.context); } @@ -769,7 +769,7 @@ extern "C" { f_status_t controller_entry_items_increase_by(const f_array_length_t amount, controller_entry_items_t *items) { if (items->used + amount > items->size) { - if (items->used + amount > f_array_length_t_size) { + if (items->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -832,10 +832,10 @@ extern "C" { cache->action.name_item.used = 0; if (is_entry) { - status = controller_file_load(F_true, controller_string_entries_s, global.setting->name_entry, controller_string_entry_s, controller_string_entries_length, controller_string_entry_length, global, cache); + status = controller_file_load(F_true, controller_entries_s, global.setting->name_entry, controller_entry_s, controller_entries_s_length, controller_entry_s_length, global, cache); } else { - status = controller_file_load(F_false, controller_string_exits_s, global.setting->name_entry, controller_string_exit_s, controller_string_exits_length, controller_string_exit_length, global, cache); + status = controller_file_load(F_false, controller_exits_s, global.setting->name_entry, controller_exit_s, controller_exits_s_length, controller_exit_s_length, global, cache); if (status == F_file_found_not) { return F_file_found_not; @@ -845,7 +845,7 @@ extern "C" { if (F_status_is_error_not(status)) { if (cache->buffer_file.used) { controller_state_interrupt_t custom = macro_controller_state_interrupt_t_initialize(is_entry, global.thread); - f_state_t state = macro_f_state_t_initialize(controller_common_allocation_large, controller_common_allocation_small, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0); + f_state_t state = macro_f_state_t_initialize(controller_common_allocation_large_d, controller_common_allocation_small_d, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0); f_string_range_t range = macro_f_string_range_t_initialize(cache->buffer_file.used); status = fll_fss_basic_list_read(cache->buffer_file, state, &range, &cache->object_items, &cache->content_items, &cache->delimits, 0, &cache->comments); @@ -865,7 +865,7 @@ extern "C" { if (global.main->error.verbosity != f_console_verbosity_quiet) { controller_print_lock(global.main->error.to, global.thread); - fll_print_format("%c%[%SThe %s file is empty.%]%c", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_string_entry_s : is_entry ? controller_string_entry_s : controller_string_exit_s, global.main->error.context, f_string_eol_s[0]); + fll_print_format("%c%[%SThe %s file is empty.%]%c", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : is_entry ? controller_entry_s : controller_exit_s, global.main->error.context, f_string_eol_s[0]); controller_print_unlock_flush(global.main->error.to, global.thread); } @@ -916,17 +916,17 @@ extern "C" { cache->action.name_action.used = 0; cache->action.name_item.used = 0; - status = controller_entry_items_increase_by(controller_common_allocation_small, &entry->items); + status = controller_entry_items_increase_by(controller_common_allocation_small_d, &entry->items); if (F_status_is_error(status)) { controller_entry_error_print(is_entry, global.main->error, cache->action, F_status_set_fine(status), "controller_entry_items_increase_by", F_true, global.thread); break; } - status = controller_string_dynamic_partial_append_terminated(cache->buffer_file, cache->object_items.array[i], &cache->action.name_item); + status = controller_dynamic_partial_append_terminated(cache->buffer_file, cache->object_items.array[i], &cache->action.name_item); if (F_status_is_error(status)) { - controller_entry_error_print(is_entry, global.main->error, cache->action, F_status_set_fine(status), "controller_string_dynamic_partial_append_terminated", F_true, global.thread); + controller_entry_error_print(is_entry, global.main->error, cache->action, F_status_set_fine(status), "controller_dynamic_partial_append_terminated", F_true, global.thread); break; } @@ -945,7 +945,7 @@ extern "C" { if (global.main->warning.verbosity == f_console_verbosity_debug) { controller_print_lock(global.main->warning.to, global.thread); - fl_print_format("%c%[%SIgnoring duplicate %s item '%]", global.main->warning.to.stream, f_string_eol_s[0], global.main->warning.context, global.main->warning.prefix, is_entry ? controller_string_entry_s : controller_string_exit_s, global.main->warning.context); + fl_print_format("%c%[%SIgnoring duplicate %s item '%]", global.main->warning.to.stream, f_string_eol_s[0], global.main->warning.context, global.main->warning.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->warning.context); fl_print_format("%[%Q%]", global.main->warning.to.stream, global.main->warning.notable, cache->action.name_file, global.main->warning.notable); fl_print_format("%['.%]%c", global.main->warning.to.stream, global.main->warning.context, global.main->warning.context, f_string_eol_s[0]); @@ -963,7 +963,7 @@ extern "C" { range = &cache->content_items.array[i].array[0]; - if (fl_string_dynamic_compare_string(controller_string_main_s, cache->action.name_item, controller_string_main_length) == F_equal_to) { + if (fl_string_dynamic_compare_string(controller_main_s, cache->action.name_item, controller_main_s_length) == F_equal_to) { code |= 0x1; at = 0; @@ -972,7 +972,7 @@ extern "C" { entry->items.used = 1; } } - else if (fl_string_dynamic_compare_string(controller_string_setting_s, cache->action.name_item, controller_string_setting_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_setting_s, cache->action.name_item, controller_setting_s_length) == F_equal_to) { status = controller_entry_settings_read(is_entry, *range, global, cache); continue; @@ -991,10 +991,10 @@ extern "C" { entry->items.array[at].line = cache->action.line_item; - status = controller_string_dynamic_append_terminated(cache->action.name_item, &entry->items.array[at].name); + status = controller_dynamic_append_terminated(cache->action.name_item, &entry->items.array[at].name); if (F_status_is_error(status)) { - controller_error_print(global.main->error, F_status_set_fine(status), "controller_string_dynamic_append_terminated", F_true, global.thread); + controller_error_print(global.main->error, F_status_set_fine(status), "controller_dynamic_append_terminated", F_true, global.thread); break; } @@ -1028,8 +1028,8 @@ extern "C" { if (global.main->error.verbosity != f_console_verbosity_quiet) { controller_print_lock(global.main->error.to, global.thread); - fl_print_format("%c%[%SThe required %s item '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_string_entry_s : controller_string_exit_s, global.main->error.context); - fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_string_main_s, global.main->error.notable); + fl_print_format("%c%[%SThe required %s item '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context); + fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_main_s, global.main->error.notable); fl_print_format("%[' was not found.%]%c", global.main->error.to.stream, global.main->error.context, global.main->error.context, f_string_eol_s[0]); controller_print_unlock_flush(global.main->error.to, global.thread); @@ -1079,17 +1079,17 @@ extern "C" { cache->action.line_action = action->line; cache->action.line_item = entry->items.array[i].line; - status = controller_string_dynamic_append_terminated(entry->items.array[i].name, &cache->action.name_item); + status = controller_dynamic_append_terminated(entry->items.array[i].name, &cache->action.name_item); if (F_status_is_error(status)) { - controller_error_print(global.main->error, F_status_set_fine(status), "controller_string_dynamic_append_terminated", F_true, global.thread); + controller_error_print(global.main->error, F_status_set_fine(status), "controller_dynamic_append_terminated", F_true, global.thread); break; } if (global.main->error.verbosity != f_console_verbosity_quiet) { controller_print_lock(global.main->error.to, global.thread); - fl_print_format("%c%[%SThe required %s item '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_string_entry_s : controller_string_exit_s, global.main->error.context); + fl_print_format("%c%[%SThe required %s item '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context); fl_print_format("%[%Q%]", global.main->error.to.stream, global.main->error.notable, action->parameters.array[0], global.main->error.notable); fl_print_format("%[' does not exist.%]%c", global.main->error.to.stream, global.main->error.context, global.main->error.context, f_string_eol_s[0]); @@ -1137,7 +1137,7 @@ extern "C" { { controller_state_interrupt_t custom = macro_controller_state_interrupt_t_initialize(is_entry, global.thread); - f_state_t state = macro_f_state_t_initialize(controller_common_allocation_large, controller_common_allocation_small, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0); + f_state_t state = macro_f_state_t_initialize(controller_common_allocation_large_d, controller_common_allocation_small_d, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0); f_string_range_t range = content_range; status = fll_fss_extended_read(cache->buffer_file, state, &range, &cache->object_actions, &cache->content_actions, 0, 0, &cache->delimits, 0); @@ -1177,24 +1177,24 @@ extern "C" { line = ++cache->action.line_action; cache->action.name_action.used = 0; - status = controller_string_dynamic_rip_nulless_terminated(cache->buffer_file, cache->object_actions.array[i], &cache->action.name_action); + status = controller_dynamic_rip_nulless_terminated(cache->buffer_file, cache->object_actions.array[i], &cache->action.name_action); if (F_status_is_error(status)) { - controller_entry_error_print(is_entry, global.main->error, cache->action, F_status_set_fine(status), "controller_string_dynamic_rip_nulless_terminated", F_true, global.thread); + controller_entry_error_print(is_entry, global.main->error, cache->action, F_status_set_fine(status), "controller_dynamic_rip_nulless_terminated", F_true, global.thread); break; } - if (is_entry && fl_string_dynamic_compare_string(controller_string_mode_s, cache->action.name_action, controller_string_mode_length) == F_equal_to) { + if (is_entry && fl_string_dynamic_compare_string(controller_mode_s, cache->action.name_action, controller_mode_s_length) == F_equal_to) { if (cache->content_actions.array[i].used < 0 || cache->content_actions.array[i].used > 1) { controller_entry_settings_read_print_setting_requires_exactly(is_entry, global, *cache, 1); continue; } - if (fl_string_dynamic_partial_compare_string(controller_string_service_s, cache->buffer_file, controller_string_service_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + if (fl_string_dynamic_partial_compare_string(controller_service_s, cache->buffer_file, controller_service_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { global.setting->mode = controller_setting_mode_service; } - else if (fl_string_dynamic_partial_compare_string(controller_string_program_s, cache->buffer_file, controller_string_program_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_program_s, cache->buffer_file, controller_program_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { global.setting->mode = controller_setting_mode_program; } else { @@ -1203,20 +1203,20 @@ extern "C" { continue; } } - else if (fl_string_dynamic_compare_string(controller_string_pid_s, cache->action.name_action, controller_string_pid_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_pid_s, cache->action.name_action, controller_pid_s_length) == F_equal_to) { if (cache->content_actions.array[i].used < 0 || cache->content_actions.array[i].used > 1) { controller_entry_settings_read_print_setting_requires_exactly(is_entry, global, *cache, 1); continue; } - if (fl_string_dynamic_partial_compare_string(controller_string_disable_s, cache->buffer_file, controller_string_disable_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + if (fl_string_dynamic_partial_compare_string(controller_disable_s, cache->buffer_file, controller_disable_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { entry->pid = controller_entry_pid_disable; } - else if (fl_string_dynamic_partial_compare_string(controller_string_ready_s, cache->buffer_file, controller_string_ready_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_ready_s, cache->buffer_file, controller_ready_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { entry->pid = controller_entry_pid_ready; } - else if (fl_string_dynamic_partial_compare_string(controller_string_require_s, cache->buffer_file, controller_string_require_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_require_s, cache->buffer_file, controller_require_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { entry->pid = controller_entry_pid_require; } else { @@ -1225,17 +1225,17 @@ extern "C" { continue; } } - else if (fl_string_dynamic_compare_string(controller_string_show_s, cache->action.name_action, controller_string_show_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_show_s, cache->action.name_action, controller_show_s_length) == F_equal_to) { if (cache->content_actions.array[i].used < 0 || cache->content_actions.array[i].used > 1) { controller_entry_settings_read_print_setting_requires_exactly(is_entry, global, *cache, 1); continue; } - if (fl_string_dynamic_partial_compare_string(controller_string_normal_s, cache->buffer_file, controller_string_normal_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + if (fl_string_dynamic_partial_compare_string(controller_normal_s, cache->buffer_file, controller_normal_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { entry->show = controller_entry_show_normal; } - else if (fl_string_dynamic_partial_compare_string(controller_string_init_s, cache->buffer_file, controller_string_init_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_init_s, cache->buffer_file, controller_init_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { entry->show = controller_entry_show_init; } else { @@ -1262,11 +1262,11 @@ extern "C" { controller_print_lock(global.main->error.to, global.thread); - fl_print_format("%c%[%SThe %s item setting '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_string_entry_s : controller_string_exit_s, global.main->error.context); + fl_print_format("%c%[%SThe %s item setting '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context); fl_print_format("%[%Q%]", global.main->error.to.stream, global.main->error.notable, cache.action.name_action, global.main->error.notable); fl_print_format("%[' requires exactly %]", global.main->error.to.stream, global.main->error.context, global.main->error.context); fl_print_format("%[%un%]", global.main->error.to.stream, global.main->error.notable, total, global.main->error.notable); - fl_print_format("%[' %s.%]%c", global.main->error.to.stream, global.main->error.context, total > 1 ? controller_string_parameters_s : controller_string_parameter_s, global.main->error.context, f_string_eol_s[0]); + fl_print_format("%[' %s.%]%c", global.main->error.to.stream, global.main->error.context, total > 1 ? controller_parameters_s : controller_parameter_s, global.main->error.context, f_string_eol_s[0]); controller_entry_error_print_cache(is_entry, global.main->error, cache.action); @@ -1281,7 +1281,7 @@ extern "C" { controller_print_lock(global.main->warning.to, global.thread); - fl_print_format("%c%[%SUnknown %s item setting '%]", global.main->warning.to.stream, f_string_eol_s[0], global.main->warning.context, global.main->warning.prefix, is_entry ? controller_string_entry_s : controller_string_exit_s, global.main->warning.context); + fl_print_format("%c%[%SUnknown %s item setting '%]", global.main->warning.to.stream, f_string_eol_s[0], global.main->warning.context, global.main->warning.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->warning.context); fl_print_format("%[%Q%]", global.main->warning.to.stream, global.main->warning.notable, cache.action.name_action, global.main->warning.notable); fl_print_format("%['.%]%c", global.main->warning.to.stream, global.main->warning.context, global.main->warning.context, f_string_eol_s[0]); @@ -1298,9 +1298,9 @@ extern "C" { controller_print_lock(global.main->warning.to, global.thread); - fl_print_format("%c%[%SThe %s item setting '%]", global.main->warning.to.stream, f_string_eol_s[0], global.main->warning.context, global.main->warning.prefix, is_entry ? controller_string_entry_s : controller_string_exit_s, global.main->warning.context); + fl_print_format("%c%[%SThe %s item setting '%]", global.main->warning.to.stream, f_string_eol_s[0], global.main->warning.context, global.main->warning.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->warning.context); fl_print_format("%[%Q%]", global.main->warning.to.stream, global.main->warning.notable, cache.action.name_action, global.main->warning.notable); - fl_print_format("%[' has an unknown value '%]", global.main->warning.to.stream, f_string_eol_s[0], global.main->warning.context, global.main->warning.prefix, is_entry ? controller_string_entry_s : controller_string_exit_s, global.main->warning.context); + fl_print_format("%[' has an unknown value '%]", global.main->warning.to.stream, f_string_eol_s[0], global.main->warning.context, global.main->warning.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->warning.context); fl_print_format("%[%Q%]", global.main->warning.to.stream, global.main->warning.notable, cache.content_actions.array[index].array[0], global.main->warning.notable); fl_print_format("%['.%]%c", global.main->warning.to.stream, global.main->warning.context, global.main->warning.context, f_string_eol_s[0]); diff --git a/level_3/controller/c/private-entry.h b/level_3/controller/c/private-entry.h index 616c67f..3692cf2 100644 --- a/level_3/controller/c/private-entry.h +++ b/level_3/controller/c/private-entry.h @@ -21,7 +21,7 @@ extern "C" { * The entry action whose parameters will be printed. */ #ifndef _di_controller_entry_action_parameters_print_ - extern void controller_entry_action_parameters_print(FILE * const stream, const controller_entry_action_t action) f_attribute_visibility_internal; + extern void controller_entry_action_parameters_print(FILE * const stream, const controller_entry_action_t action) F_attribute_visibility_internal_d; #endif // _di_controller_entry_action_parameters_print_ /** @@ -35,7 +35,7 @@ extern "C" { * FALSE otherwise. */ #ifndef _di_controller_entry_action_type_is_rule_ - extern f_status_t controller_entry_action_type_is_rule(uint8_t type) f_attribute_visibility_internal; + extern f_status_t controller_entry_action_type_is_rule(uint8_t type) F_attribute_visibility_internal_d; #endif // _di_controller_entry_action_type_is_rule_ /** @@ -49,7 +49,7 @@ extern "C" { * The string with used == 0 if no match was found. */ #ifndef _di_controller_entry_action_type_name_ - extern f_string_static_t controller_entry_action_type_name(const uint8_t type) f_attribute_visibility_internal; + extern f_string_static_t controller_entry_action_type_name(const uint8_t type) F_attribute_visibility_internal_d; #endif // _di_controller_entry_action_type_name_ /** @@ -63,7 +63,7 @@ extern "C" { * FALSE otherwise. */ #ifndef _di_controller_entry_action_type_to_rule_action_type_ - extern uint8_t controller_entry_action_type_to_rule_action_type(uint8_t type) f_attribute_visibility_internal; + extern uint8_t controller_entry_action_type_to_rule_action_type(uint8_t type) F_attribute_visibility_internal_d; #endif // _di_controller_entry_action_type_to_rule_action_type_ /** @@ -85,7 +85,7 @@ extern "C" { * @see f_memory_resize() */ #ifndef _di_controller_entry_actions_increase_by_ - extern f_status_t controller_entry_actions_increase_by(const f_array_length_t amount, controller_entry_actions_t *actions) f_attribute_visibility_internal; + extern f_status_t controller_entry_actions_increase_by(const f_array_length_t amount, controller_entry_actions_t *actions) F_attribute_visibility_internal_d; #endif // _di_controller_entry_actions_increase_by_ /** @@ -125,7 +125,7 @@ extern "C" { * @see fll_fss_extended_read() */ #ifndef _di_controller_entry_actions_read_ - extern f_status_t controller_entry_actions_read(const bool is_entry, const f_string_range_t content_range, controller_global_t global, controller_cache_t *cache, controller_entry_actions_t *actions) f_attribute_visibility_internal; + extern f_status_t controller_entry_actions_read(const bool is_entry, const f_string_range_t content_range, controller_global_t global, controller_cache_t *cache, controller_entry_actions_t *actions) F_attribute_visibility_internal_d; #endif // _di_controller_entry_actions_read_ /** @@ -153,7 +153,7 @@ extern "C" { * @see controller_entry_error_print_cache() */ #ifndef _di_controller_entry_error_print_ - extern void controller_entry_error_print(const bool is_entry, const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const f_string_t function, const bool fallback, controller_thread_t *thread) f_attribute_visibility_internal; + extern void controller_entry_error_print(const bool is_entry, const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const f_string_t function, const bool fallback, controller_thread_t *thread) F_attribute_visibility_internal_d; #endif // _di_controller_entry_error_print_ /** @@ -175,7 +175,7 @@ extern "C" { * @see controller_entry_read() */ #ifndef _di_controller_entry_error_print_cache_ - extern void controller_entry_error_print_cache(const bool is_entry, const fl_print_t output, const controller_cache_action_t cache) f_attribute_visibility_internal; + extern void controller_entry_error_print_cache(const bool is_entry, const fl_print_t output, const controller_cache_action_t cache) F_attribute_visibility_internal_d; #endif // _di_controller_entry_error_print_cache_ /** @@ -197,7 +197,7 @@ extern "C" { * @see f_memory_resize() */ #ifndef _di_controller_entry_items_increase_by_ - extern f_status_t controller_entry_items_increase_by(const f_array_length_t amount, controller_entry_items_t *items) f_attribute_visibility_internal; + extern f_status_t controller_entry_items_increase_by(const f_array_length_t amount, controller_entry_items_t *items) F_attribute_visibility_internal_d; #endif // _di_controller_entry_items_increase_by_ /** @@ -220,8 +220,8 @@ extern "C" { * Errors (with error bit) from: controller_entry_items_increase_by(). * Errors (with error bit) from: controller_file_load(). * Errors (with error bit) from: controller_status_simplify_error(). - * Errors (with error bit) from: controller_string_dynamic_append_terminated(). - * Errors (with error bit) from: controller_string_dynamic_partial_append_terminated(). + * Errors (with error bit) from: controller_dynamic_append_terminated(). + * Errors (with error bit) from: controller_dynamic_partial_append_terminated(). * Errors (with error bit) from: f_fss_count_lines(). * Errors (with error bit) from: fl_fss_apply_delimit(). * Errors (with error bit) from: f_string_dynamic_append(). @@ -233,8 +233,8 @@ extern "C" { * @see controller_entry_items_increase_by() * @see controller_file_load() * @see controller_status_simplify_error() - * @see controller_string_dynamic_append_terminated() - * @see controller_string_dynamic_partial_append_terminated() + * @see controller_dynamic_append_terminated() + * @see controller_dynamic_partial_append_terminated() * @see f_fss_count_lines() * @see fl_fss_apply_delimit() * @see f_string_dynamic_append() @@ -243,7 +243,7 @@ extern "C" { * @see fll_fss_basic_list_read() */ #ifndef _di_controller_entry_read_ - extern f_status_t controller_entry_read(const bool is_entry, controller_global_t global, controller_cache_t *cache) f_attribute_visibility_internal; + extern f_status_t controller_entry_read(const bool is_entry, controller_global_t global, controller_cache_t *cache) F_attribute_visibility_internal_d; #endif // _di_controller_entry_read_ /** @@ -260,7 +260,7 @@ extern "C" { * A structure for containing and caching relevant data. */ #ifndef _di_controller_entry_settings_read_ - extern f_status_t controller_entry_settings_read(const bool is_entry, const f_string_range_t content_range, controller_global_t global, controller_cache_t *cache) f_attribute_visibility_internal; + extern f_status_t controller_entry_settings_read(const bool is_entry, const f_string_range_t content_range, controller_global_t global, controller_cache_t *cache) F_attribute_visibility_internal_d; #endif // _di_controller_entry_settings_read_ /** @@ -277,7 +277,7 @@ extern "C" { * The expected number of arguments. */ #ifndef _di_controller_entry_settings_read_print_setting_requires_exactly_ - extern void controller_entry_settings_read_print_setting_requires_exactly(const bool is_entry, const controller_global_t global, const controller_cache_t cache, const f_number_unsigned_t total) f_attribute_visibility_internal; + extern void controller_entry_settings_read_print_setting_requires_exactly(const bool is_entry, const controller_global_t global, const controller_cache_t cache, const f_number_unsigned_t total) F_attribute_visibility_internal_d; #endif // _di_controller_entry_settings_read_print_setting_requires_exactly_ /** @@ -292,7 +292,7 @@ extern "C" { * A structure for containing and caching relevant data. */ #ifndef _di_controller_entry_settings_read_print_setting_unknown_action_ - extern void controller_entry_settings_read_print_setting_unknown_action(const bool is_entry, const controller_global_t global, const controller_cache_t cache) f_attribute_visibility_internal; + extern void controller_entry_settings_read_print_setting_unknown_action(const bool is_entry, const controller_global_t global, const controller_cache_t cache) F_attribute_visibility_internal_d; #endif // _di_controller_entry_settings_read_print_setting_unknown_action_ /** @@ -311,7 +311,7 @@ extern "C" { * The location in the content actions array representing the action value. */ #ifndef _di_controller_entry_settings_read_print_setting_unknown_action_value_ - extern void controller_entry_settings_read_print_setting_unknown_action_value(const bool is_entry, const controller_global_t global, const controller_cache_t cache, const f_array_length_t index) f_attribute_visibility_internal; + extern void controller_entry_settings_read_print_setting_unknown_action_value(const bool is_entry, const controller_global_t global, const controller_cache_t cache, const f_array_length_t index) F_attribute_visibility_internal_d; #endif // _di_controller_entry_settings_read_print_setting_unknown_action_value_ #ifdef __cplusplus diff --git a/level_3/controller/c/private-rule.c b/level_3/controller/c/private-rule.c index 0080a11..795a453 100644 --- a/level_3/controller/c/private-rule.c +++ b/level_3/controller/c/private-rule.c @@ -16,13 +16,13 @@ extern "C" { switch (type) { case controller_rule_action_method_extended: - buffer.string = controller_rule_action_method_string_extended; - buffer.used = controller_rule_action_method_string_extended_length; + buffer.string = controller_rule_action_method_string_extended_s; + buffer.used = controller_rule_action_method_string_extended_s_length; break; case controller_rule_action_method_extended_list: - buffer.string = controller_rule_action_method_string_extended_list; - buffer.used = controller_rule_action_method_string_extended_list_length; + buffer.string = controller_rule_action_method_string_extended_list_s; + buffer.used = controller_rule_action_method_string_extended_list_s_length; break; } @@ -60,7 +60,7 @@ extern "C" { if (object && object->start <= object->start) { - status = f_string_dynamics_increase(controller_common_allocation_small, parameters); + status = f_string_dynamics_increase(controller_common_allocation_small_d, parameters); if (F_status_is_error(status)) { controller_error_print(global.main->error, F_status_set_fine(status), "f_string_dynamics_increase", F_true, global.thread); @@ -95,7 +95,7 @@ extern "C" { if (content->array[i].start > content->array[i].start) continue; - status = f_string_dynamics_increase(controller_common_allocation_small, parameters); + status = f_string_dynamics_increase(controller_common_allocation_small_d, parameters); if (F_status_is_error(status)) { controller_error_print(global.main->error, F_status_set_fine(status), "f_string_dynamics_increase", F_true, global.thread); @@ -179,73 +179,73 @@ extern "C" { switch (type) { case controller_rule_action_type_freeze: - buffer.string = controller_string_freeze_s; - buffer.used = controller_string_freeze_length; + buffer.string = controller_freeze_s; + buffer.used = controller_freeze_s_length; break; case controller_rule_action_type_group: - buffer.string = controller_string_group_s; - buffer.used = controller_string_group_length; + buffer.string = controller_group_s; + buffer.used = controller_group_s_length; break; case controller_rule_action_type_kill: - buffer.string = controller_string_kill_s; - buffer.used = controller_string_kill_length; + buffer.string = controller_kill_s; + buffer.used = controller_kill_s_length; break; case controller_rule_action_type_pause: - buffer.string = controller_string_pause_s; - buffer.used = controller_string_pause_length; + buffer.string = controller_pause_s; + buffer.used = controller_pause_s_length; break; case controller_rule_action_type_pid_file: - buffer.string = controller_string_pid_file_s; - buffer.used = controller_string_pid_file_length; + buffer.string = controller_pid_file_s; + buffer.used = controller_pid_file_s_length; break; case controller_rule_action_type_rerun: - buffer.string = controller_string_rerun_s; - buffer.used = controller_string_rerun_length; + buffer.string = controller_rerun_s; + buffer.used = controller_rerun_s_length; break; case controller_rule_action_type_reload: - buffer.string = controller_string_reload_s; - buffer.used = controller_string_reload_length; + buffer.string = controller_reload_s; + buffer.used = controller_reload_s_length; break; case controller_rule_action_type_restart: - buffer.string = controller_string_restart_s; - buffer.used = controller_string_restart_length; + buffer.string = controller_restart_s; + buffer.used = controller_restart_s_length; break; case controller_rule_action_type_resume: - buffer.string = controller_string_resume_s; - buffer.used = controller_string_resume_length; + buffer.string = controller_resume_s; + buffer.used = controller_resume_s_length; break; case controller_rule_action_type_start: - buffer.string = controller_string_start_s; - buffer.used = controller_string_start_length; + buffer.string = controller_start_s; + buffer.used = controller_start_s_length; break; case controller_rule_action_type_stop: - buffer.string = controller_string_stop_s; - buffer.used = controller_string_stop_length; + buffer.string = controller_stop_s; + buffer.used = controller_stop_s_length; break; case controller_rule_action_type_thaw: - buffer.string = controller_string_thaw_s; - buffer.used = controller_string_thaw_length; + buffer.string = controller_thaw_s; + buffer.used = controller_thaw_s_length; break; case controller_rule_action_type_user: - buffer.string = controller_string_user_s; - buffer.used = controller_string_user_length; + buffer.string = controller_user_s; + buffer.used = controller_user_s_length; break; case controller_rule_action_type_with: - buffer.string = controller_string_with_s; - buffer.used = controller_string_with_length; + buffer.string = controller_with_s; + buffer.used = controller_with_s_length; break; } @@ -262,48 +262,48 @@ extern "C" { switch (type) { case controller_rule_action_type_execute_freeze: - buffer.string = controller_string_freeze_s; - buffer.used = controller_string_freeze_length; + buffer.string = controller_freeze_s; + buffer.used = controller_freeze_s_length; break; case controller_rule_action_type_execute_kill: - buffer.string = controller_string_kill_s; - buffer.used = controller_string_kill_length; + buffer.string = controller_kill_s; + buffer.used = controller_kill_s_length; break; case controller_rule_action_type_execute_pause: - buffer.string = controller_string_pause_s; - buffer.used = controller_string_pause_length; + buffer.string = controller_pause_s; + buffer.used = controller_pause_s_length; break; case controller_rule_action_type_execute_reload: - buffer.string = controller_string_reload_s; - buffer.used = controller_string_reload_length; + buffer.string = controller_reload_s; + buffer.used = controller_reload_s_length; break; case controller_rule_action_type_execute_restart: - buffer.string = controller_string_restart_s; - buffer.used = controller_string_restart_length; + buffer.string = controller_restart_s; + buffer.used = controller_restart_s_length; break; case controller_rule_action_type_execute_resume: - buffer.string = controller_string_resume_s; - buffer.used = controller_string_resume_length; + buffer.string = controller_resume_s; + buffer.used = controller_resume_s_length; break; case controller_rule_action_type_execute_start: - buffer.string = controller_string_start_s; - buffer.used = controller_string_start_length; + buffer.string = controller_start_s; + buffer.used = controller_start_s_length; break; case controller_rule_action_type_execute_stop: - buffer.string = controller_string_stop_s; - buffer.used = controller_string_stop_length; + buffer.string = controller_stop_s; + buffer.used = controller_stop_s_length; break; case controller_rule_action_type_execute_thaw: - buffer.string = controller_string_thaw_s; - buffer.used = controller_string_thaw_length; + buffer.string = controller_thaw_s; + buffer.used = controller_thaw_s_length; break; } @@ -317,7 +317,7 @@ extern "C" { f_status_t controller_rule_actions_increase_by(const f_array_length_t amount, controller_rule_actions_t *actions) { if (actions->used + amount > actions->size) { - if (actions->used + amount > f_array_length_t_size) { + if (actions->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -352,7 +352,7 @@ extern "C" { { controller_state_interrupt_t custom = macro_controller_state_interrupt_t_initialize(is_normal, global.thread); - f_state_t state = macro_f_state_t_initialize(controller_common_allocation_large, controller_common_allocation_small, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0); + f_state_t state = macro_f_state_t_initialize(controller_common_allocation_large_d, controller_common_allocation_small_d, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0); status = fl_fss_extended_list_content_read(cache->buffer_item, state, range, &cache->content_action, &cache->delimits, &cache->comments); } @@ -372,7 +372,7 @@ extern "C" { if (item->type == controller_rule_item_type_script || item->type == controller_rule_item_type_utility) { actions->array[actions->used].parameters.used = 0; - status = f_string_dynamics_increase(controller_common_allocation_small, &actions->array[actions->used].parameters); + status = f_string_dynamics_increase(controller_common_allocation_small_d, &actions->array[actions->used].parameters); if (F_status_is_error(status)) { controller_error_print(global.main->error, F_status_set_fine(status), "f_string_dynamics_increase", F_true, global.thread); @@ -404,7 +404,7 @@ extern "C" { { controller_state_interrupt_t custom = macro_controller_state_interrupt_t_initialize(is_normal, global.thread); - f_state_t state = macro_f_state_t_initialize(controller_common_allocation_large, controller_common_allocation_small, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0); + f_state_t state = macro_f_state_t_initialize(controller_common_allocation_large_d, controller_common_allocation_small_d, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0); cache->delimits.used = 0; @@ -426,7 +426,7 @@ extern "C" { f_array_length_t j = 0; for (; i < cache->object_actions.used; ++i) { - status = controller_rule_actions_increase_by(controller_common_allocation_small, actions); + status = controller_rule_actions_increase_by(controller_common_allocation_small_d, actions); if (F_status_is_error(status)) { controller_error_print(global.main->error, F_status_set_fine(status), "controller_rule_actions_increase_by", F_true, global.thread); @@ -445,7 +445,7 @@ extern "C" { actions->array[actions->used].parameters.used = 0; actions->array[actions->used].status = F_known_not; - status = f_string_dynamics_increase(controller_common_allocation_small, &actions->array[actions->used].parameters); + status = f_string_dynamics_increase(controller_common_allocation_small_d, &actions->array[actions->used].parameters); if (F_status_is_error(status)) { controller_error_print(global.main->error, F_status_set_fine(status), "f_string_dynamics_increase", F_true, global.thread); @@ -474,7 +474,7 @@ extern "C" { { controller_state_interrupt_t custom = macro_controller_state_interrupt_t_initialize(is_normal, global.thread); - f_state_t state = macro_f_state_t_initialize(controller_common_allocation_large, controller_common_allocation_small, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0); + f_state_t state = macro_f_state_t_initialize(controller_common_allocation_large_d, controller_common_allocation_small_d, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0); status = fl_fss_extended_content_read(cache->buffer_item, state, range, &cache->content_action, 0, &cache->delimits); } @@ -508,31 +508,31 @@ extern "C" { uint8_t type = 0; if (cache->content_action.used) { - if (fl_string_dynamic_partial_compare_string(controller_string_freeze_s, cache->buffer_item, controller_string_freeze_length, cache->content_action.array[0]) == F_equal_to) { + if (fl_string_dynamic_partial_compare_string(controller_freeze_s, cache->buffer_item, controller_freeze_s_length, cache->content_action.array[0]) == F_equal_to) { type = controller_rule_action_type_execute_freeze; } - if (fl_string_dynamic_partial_compare_string(controller_string_kill_s, cache->buffer_item, controller_string_kill_length, cache->content_action.array[0]) == F_equal_to) { + if (fl_string_dynamic_partial_compare_string(controller_kill_s, cache->buffer_item, controller_kill_s_length, cache->content_action.array[0]) == F_equal_to) { type = controller_rule_action_type_execute_kill; } - else if (fl_string_dynamic_partial_compare_string(controller_string_pause_s, cache->buffer_item, controller_string_pause_length, cache->content_action.array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_pause_s, cache->buffer_item, controller_pause_s_length, cache->content_action.array[0]) == F_equal_to) { type = controller_rule_action_type_execute_pause; } - else if (fl_string_dynamic_partial_compare_string(controller_string_reload_s, cache->buffer_item, controller_string_reload_length, cache->content_action.array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_reload_s, cache->buffer_item, controller_reload_s_length, cache->content_action.array[0]) == F_equal_to) { type = controller_rule_action_type_execute_reload; } - else if (fl_string_dynamic_partial_compare_string(controller_string_restart_s, cache->buffer_item, controller_string_restart_length, cache->content_action.array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_restart_s, cache->buffer_item, controller_restart_s_length, cache->content_action.array[0]) == F_equal_to) { type = controller_rule_action_type_execute_restart; } - else if (fl_string_dynamic_partial_compare_string(controller_string_resume_s, cache->buffer_item, controller_string_resume_length, cache->content_action.array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_resume_s, cache->buffer_item, controller_resume_s_length, cache->content_action.array[0]) == F_equal_to) { type = controller_rule_action_type_execute_resume; } - else if (fl_string_dynamic_partial_compare_string(controller_string_start_s, cache->buffer_item, controller_string_start_length, cache->content_action.array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_start_s, cache->buffer_item, controller_start_s_length, cache->content_action.array[0]) == F_equal_to) { type = controller_rule_action_type_execute_start; } - else if (fl_string_dynamic_partial_compare_string(controller_string_stop_s, cache->buffer_item, controller_string_stop_length, cache->content_action.array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_stop_s, cache->buffer_item, controller_stop_s_length, cache->content_action.array[0]) == F_equal_to) { type = controller_rule_action_type_execute_stop; } - else if (fl_string_dynamic_partial_compare_string(controller_string_thaw_s, cache->buffer_item, controller_string_thaw_length, cache->content_action.array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_thaw_s, cache->buffer_item, controller_thaw_s_length, cache->content_action.array[0]) == F_equal_to) { type = controller_rule_action_type_execute_thaw; } } @@ -542,19 +542,19 @@ extern "C" { controller_print_lock(global.main->error.to, global.thread); fl_print_format("%c%[%SRule item action '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, global.main->error.context); - fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_string_rerun_s, global.main->error.notable); + fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_rerun_s, global.main->error.notable); fl_print_format("%[' has '%]", global.main->error.to.stream, global.main->error.context, global.main->error.context); fl_print_format("%[%/Q%]", global.main->error.to.stream, global.main->error.notable, cache->buffer_item, cache->content_action.array[0], global.main->error.notable); fl_print_format("%[' as the first value, only the following are allowed: '%]", global.main->error.to.stream, global.main->error.context, global.main->error.context); - fl_print_format("%[%s%]%[', '%]", global.main->error.to.stream, global.main->error.notable, controller_string_freeze_s, global.main->error.notable, global.main->error.context, global.main->error.context); - fl_print_format("%[%s%]%[', '%]", global.main->error.to.stream, global.main->error.notable, controller_string_kill_s, global.main->error.notable, global.main->error.context, global.main->error.context); - fl_print_format("%[%s%]%[', '%]", global.main->error.to.stream, global.main->error.notable, controller_string_pause_s, global.main->error.notable, global.main->error.context, global.main->error.context); - fl_print_format("%[%s%]%[', '%]", global.main->error.to.stream, global.main->error.notable, controller_string_reload_s, global.main->error.notable, global.main->error.context, global.main->error.context); - fl_print_format("%[%s%]%[', '%]", global.main->error.to.stream, global.main->error.notable, controller_string_restart_s, global.main->error.notable, global.main->error.context, global.main->error.context); - fl_print_format("%[%s%]%[', '%]", global.main->error.to.stream, global.main->error.notable, controller_string_resume_s, global.main->error.notable, global.main->error.context, global.main->error.context); - fl_print_format("%[%s%]%[', '%]", global.main->error.to.stream, global.main->error.notable, controller_string_start_s, global.main->error.notable, global.main->error.context, global.main->error.context); - fl_print_format("%[%s%]%[', or '%]", global.main->error.to.stream, global.main->error.notable, controller_string_stop_s, global.main->error.notable, global.main->error.context, global.main->error.context); - fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_string_thaw_s, global.main->error.notable, global.main->error.context); + fl_print_format("%[%s%]%[', '%]", global.main->error.to.stream, global.main->error.notable, controller_freeze_s, global.main->error.notable, global.main->error.context, global.main->error.context); + fl_print_format("%[%s%]%[', '%]", global.main->error.to.stream, global.main->error.notable, controller_kill_s, global.main->error.notable, global.main->error.context, global.main->error.context); + fl_print_format("%[%s%]%[', '%]", global.main->error.to.stream, global.main->error.notable, controller_pause_s, global.main->error.notable, global.main->error.context, global.main->error.context); + fl_print_format("%[%s%]%[', '%]", global.main->error.to.stream, global.main->error.notable, controller_reload_s, global.main->error.notable, global.main->error.context, global.main->error.context); + fl_print_format("%[%s%]%[', '%]", global.main->error.to.stream, global.main->error.notable, controller_restart_s, global.main->error.notable, global.main->error.context, global.main->error.context); + fl_print_format("%[%s%]%[', '%]", global.main->error.to.stream, global.main->error.notable, controller_resume_s, global.main->error.notable, global.main->error.context, global.main->error.context); + fl_print_format("%[%s%]%[', '%]", global.main->error.to.stream, global.main->error.notable, controller_start_s, global.main->error.notable, global.main->error.context, global.main->error.context); + fl_print_format("%[%s%]%[', or '%]", global.main->error.to.stream, global.main->error.notable, controller_stop_s, global.main->error.notable, global.main->error.context, global.main->error.context); + fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_thaw_s, global.main->error.notable, global.main->error.context); fl_print_format("%['.%]%c", global.main->error.to.stream, global.main->error.context, global.main->error.context, f_string_eol_s[0]); controller_rule_error_print_cache(global.main->error, cache->action, F_true); @@ -568,13 +568,13 @@ extern "C" { controller_rule_rerun_item_t *rerun_item = 0; if (cache->content_action.used > 1) { - if (fl_string_dynamic_partial_compare_string(controller_string_failure_s, cache->buffer_item, controller_string_failure_length, cache->content_action.array[1]) == F_equal_to) { + if (fl_string_dynamic_partial_compare_string(controller_failure_s, cache->buffer_item, controller_failure_s_length, cache->content_action.array[1]) == F_equal_to) { rerun_item = &item->reruns[type].failure; - item->reruns[type].is |= controller_rule_rerun_is_failure; + item->reruns[type].is |= controller_rule_rerun_is_failure_d; } - else if (fl_string_dynamic_partial_compare_string(controller_string_success_s, cache->buffer_item, controller_string_success_length, cache->content_action.array[1]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_success_s, cache->buffer_item, controller_success_s_length, cache->content_action.array[1]) == F_equal_to) { rerun_item = &item->reruns[type].success; - item->reruns[type].is |= controller_rule_rerun_is_success; + item->reruns[type].is |= controller_rule_rerun_is_success_d; } } else { @@ -582,12 +582,12 @@ extern "C" { controller_print_lock(global.main->error.to, global.thread); fl_print_format("%c%[%SRule item action '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, global.main->error.context); - fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_string_rerun_s, global.main->error.notable); + fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_rerun_s, global.main->error.notable); fl_print_format("%[' has '%]", global.main->error.to.stream, global.main->error.context, global.main->error.context); fl_print_format("%[%/Q%]", global.main->error.to.stream, global.main->error.notable, cache->buffer_item, cache->content_action.array[1], global.main->error.notable); fl_print_format("%[' as the second value, only the following are allowed: '%]", global.main->error.to.stream, global.main->error.context, global.main->error.context); - fl_print_format("%[%s%]%[' or '%]", global.main->error.to.stream, global.main->error.notable, controller_string_stop_s, global.main->error.notable, global.main->error.context, global.main->error.context); - fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_string_thaw_s, global.main->error.notable, global.main->error.context); + fl_print_format("%[%s%]%[' or '%]", global.main->error.to.stream, global.main->error.notable, controller_stop_s, global.main->error.notable, global.main->error.context, global.main->error.context); + fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_thaw_s, global.main->error.notable, global.main->error.context); fl_print_format("%['.%]%c", global.main->error.to.stream, global.main->error.context, global.main->error.context, f_string_eol_s[0]); controller_rule_error_print_cache(global.main->error, cache->action, F_true); @@ -600,21 +600,21 @@ extern "C" { for (f_array_length_t i = 2; i < cache->content_action.used; ++i) { - if (fl_string_dynamic_partial_compare_string(controller_string_delay_s, cache->buffer_item, controller_string_delay_length, cache->content_action.array[i]) == F_equal_to) { - status = controller_rule_action_read_rerun_number(global, controller_string_delay_s, cache, &i, &rerun_item->delay); + if (fl_string_dynamic_partial_compare_string(controller_delay_s, cache->buffer_item, controller_delay_s_length, cache->content_action.array[i]) == F_equal_to) { + status = controller_rule_action_read_rerun_number(global, controller_delay_s, cache, &i, &rerun_item->delay); } - else if (fl_string_dynamic_partial_compare_string(controller_string_max_s, cache->buffer_item, controller_string_max_length, cache->content_action.array[i]) == F_equal_to) { - status = controller_rule_action_read_rerun_number(global, controller_string_max_s, cache, &i, &rerun_item->max); + else if (fl_string_dynamic_partial_compare_string(controller_max_s, cache->buffer_item, controller_max_s_length, cache->content_action.array[i]) == F_equal_to) { + status = controller_rule_action_read_rerun_number(global, controller_max_s, cache, &i, &rerun_item->max); } - else if (fl_string_dynamic_partial_compare_string(controller_string_reset_s, cache->buffer_item, controller_string_reset_length, cache->content_action.array[i]) == F_equal_to) { - item->reruns[type].is |= rerun_item == &item->reruns[type].failure ? controller_rule_rerun_is_failure_reset : controller_rule_rerun_is_success_reset; + else if (fl_string_dynamic_partial_compare_string(controller_reset_s, cache->buffer_item, controller_reset_s_length, cache->content_action.array[i]) == F_equal_to) { + item->reruns[type].is |= rerun_item == &item->reruns[type].failure ? controller_rule_rerun_is_failure_reset_d : controller_rule_rerun_is_success_reset_d; } else { if (global.main->error.verbosity != f_console_verbosity_quiet) { controller_print_lock(global.main->error.to, global.thread); fl_print_format("%c%[%SRule item action '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, global.main->error.context); - fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_string_rerun_s, global.main->error.notable); + fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_rerun_s, global.main->error.notable); fl_print_format("%[' has an unknown value '%]", global.main->error.to.stream, global.main->error.context, global.main->error.context); fl_print_format("%[%/Q%]", global.main->error.to.stream, global.main->error.notable, cache->buffer_item, cache->content_action.array[i], global.main->error.notable); fl_print_format("%['.%]%c", global.main->error.to.stream, global.main->error.context, global.main->error.context, f_string_eol_s[0]); @@ -633,8 +633,8 @@ extern "C" { for (f_array_length_t i = 0; i < cache->content_action.used; ++i) { - if (fl_string_dynamic_partial_compare_string(controller_string_full_path_s, cache->buffer_item, controller_string_full_path_length, cache->content_action.array[i]) == F_equal_to) { - item->with |= controller_with_full_path; + if (fl_string_dynamic_partial_compare_string(controller_full_path_s, cache->buffer_item, controller_full_path_s_length, cache->content_action.array[i]) == F_equal_to) { + item->with |= controller_with_full_path_d; } else { if (global.main->error.verbosity != f_console_verbosity_quiet) { @@ -642,7 +642,7 @@ extern "C" { fl_print_format("%c%[%SUnknown value '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, global.main->error.context); fl_print_format("%[%/Q%]", global.main->error.to.stream, global.main->error.notable, cache->buffer_item, cache->content_action.array[i], global.main->error.notable); - fl_print_format("%[' for rule item action '%]%[%s%]", global.main->error.to.stream, global.main->error.context, global.main->error.context, global.main->error.notable, controller_string_with_s, global.main->error.notable); + fl_print_format("%[' for rule item action '%]%[%s%]", global.main->error.to.stream, global.main->error.context, global.main->error.context, global.main->error.notable, controller_with_s, global.main->error.notable); fl_print_format("%['.%]%c", global.main->error.to.stream, global.main->error.context, global.main->error.context, f_string_eol_s[0]); controller_rule_error_print_cache(global.main->error, cache->action, F_true); @@ -656,7 +656,7 @@ extern "C" { } // for } else if (item->type == controller_rule_item_type_script || item->type == controller_rule_item_type_utility) { - status = f_string_dynamics_increase(controller_common_allocation_small, &actions->array[actions->used].parameters); + status = f_string_dynamics_increase(controller_common_allocation_small_d, &actions->array[actions->used].parameters); if (F_status_is_error(status)) { controller_error_print(global.main->error, F_status_set_fine(status), "f_string_dynamics_increase", F_true, global.thread); @@ -671,7 +671,7 @@ extern "C" { for (f_array_length_t i = 0; i < cache->content_action.used; ++i) { - status = f_string_dynamic_partial_mash_nulless(f_string_space_s, f_string_space_s_length, cache->buffer_item, cache->content_action.array[i], &actions->array[actions->used].parameters.array[0]); + status = f_string_dynamic_partial_mash_nulless(f_string_space_s, F_string_space_s_length, cache->buffer_item, cache->content_action.array[i], &actions->array[actions->used].parameters.array[0]); if (F_status_is_error(status)) break; } // for @@ -768,7 +768,7 @@ extern "C" { controller_print_lock(global.main->error.to, global.thread); fl_print_format("%c%[%SRule item action '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, global.main->error.context); - fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_string_rerun_s, global.main->error.notable); + fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_rerun_s, global.main->error.notable); fl_print_format("%[' requires a positive whole number or 0 for the '%]", global.main->error.to.stream, global.main->error.context, global.main->error.context); fl_print_format("%[%S%]", global.main->error.to.stream, global.main->error.notable, name, global.main->error.notable); fl_print_format("%[' value", global.main->error.to.stream, global.main->error.context, global.main->error.context); @@ -1046,7 +1046,7 @@ extern "C" { fl_print_format("%c%[%SWhile processing ", print.to.stream, f_string_eol_s[0], print.context, print.prefix); if (cache.name_action.used) { - fl_print_format("%s '%]", print.to.stream, item ? controller_string_action_s : controller_string_value_s, print.context); + fl_print_format("%s '%]", print.to.stream, item ? controller_action_s : controller_value_s, print.context); fl_print_format("%[%Q%]", print.to.stream, print.notable, cache.name_action, print.notable); fl_print_format("%[' on line%] ", print.to.stream, print.context, print.context); fl_print_format("%[%un%]", print.to.stream, print.notable, cache.line_action, print.notable); @@ -1054,7 +1054,7 @@ extern "C" { } if (cache.name_item.used) { - fl_print_format("rule %s '%]", print.to.stream, item ? controller_string_item_s : controller_string_setting_s, print.context); + fl_print_format("rule %s '%]", print.to.stream, item ? controller_item_s : controller_setting_s, print.context); fl_print_format("%[%Q%]", print.to.stream, print.notable, cache.name_item, print.notable); fl_print_format("%[' on line%] ", print.to.stream, print.context, print.context); fl_print_format("%[%un%]", print.to.stream, print.notable, cache.line_item, print.notable); @@ -1094,7 +1094,7 @@ extern "C" { controller_print_lock(print->to, (controller_thread_t *) process->main_thread); - fl_print_format("%c%[%SThe %s '%]", print->to.stream, f_string_eol_s[0], print->context, print->prefix, script_is ? controller_string_script_s : controller_string_program_s, print->context); + fl_print_format("%c%[%SThe %s '%]", print->to.stream, f_string_eol_s[0], print->context, print->prefix, script_is ? controller_script_s : controller_program_s, print->context); fl_print_format("%[%S%]", print->to.stream, print->notable, name, print->notable); if (status == F_control_group || status == F_limit || status == F_processor || status == F_schedule) { @@ -1102,16 +1102,16 @@ extern "C" { fl_print_color_before(print->notable, print->to.stream); if (status == F_control_group) { - f_print_terminated(controller_string_control_group_s, print->to.stream); + f_print_terminated(controller_control_group_s, print->to.stream); } else if (status == F_limit) { - f_print_terminated(controller_string_limit_s, print->to.stream); + f_print_terminated(controller_limit_s, print->to.stream); } else if (status == F_processor) { - f_print_terminated(controller_string_processor_s, print->to.stream); + f_print_terminated(controller_processor_s, print->to.stream); } else if (status == F_schedule) { - f_print_terminated(controller_string_scheduler_s, print->to.stream); + f_print_terminated(controller_scheduler_s, print->to.stream); } fl_print_color_after(print->notable, print->to.stream); @@ -1274,7 +1274,7 @@ extern "C" { const f_string_dynamics_t arguments_none = f_string_dynamics_t_initialize; - controller_execute_set_t execute_set = macro_controller_execute_set_t_initialize(0, 0, process->rule.has & controller_rule_has_environment ? &environment : 0, &signals, 0, fl_execute_as_t_initialize); + controller_execute_set_t execute_set = macro_controller_execute_set_t_initialize(0, 0, process->rule.has & controller_rule_has_environment_d ? &environment : 0, &signals, 0, fl_execute_as_t_initialize); if (process->rule.affinity.used) { execute_set.as.affinity = &process->rule.affinity; @@ -1284,7 +1284,7 @@ extern "C" { execute_set.as.capability = process->rule.capability; } - if (process->rule.has & controller_rule_has_control_group) { + if (process->rule.has & controller_rule_has_control_group_d) { execute_set.as.control_group = &process->rule.control_group; // make sure all required cgroup directories exist. @@ -1299,7 +1299,7 @@ extern "C" { } } - if (process->rule.has & controller_rule_has_group) { + if (process->rule.has & controller_rule_has_group_d) { execute_set.as.id_group = &process->rule.group; if (process->rule.groups.used) { @@ -1311,15 +1311,15 @@ extern "C" { execute_set.as.limits = &process->rule.limits; } - if (process->rule.has & controller_rule_has_scheduler) { + if (process->rule.has & controller_rule_has_scheduler_d) { execute_set.as.scheduler = &process->rule.scheduler; } - if (process->rule.has & controller_rule_has_nice) { + if (process->rule.has & controller_rule_has_nice_d) { execute_set.as.nice = &process->rule.nice; } - if (process->rule.has & controller_rule_has_user) { + if (process->rule.has & controller_rule_has_user_d) { execute_set.as.id_user = &process->rule.user; } @@ -1346,10 +1346,10 @@ extern "C" { if (process->rule.items.array[i].actions.array[j].type != action) continue; execute_set.parameter.data = 0; - execute_set.parameter.option = fl_execute_parameter_option_threadsafe | fl_execute_parameter_option_return; + execute_set.parameter.option = FL_execute_parameter_option_threadsafe_d | FL_execute_parameter_option_return_d; - if (process->rule.items.array[i].with & controller_with_full_path) { - execute_set.parameter.option |= fl_execute_parameter_option_path; + if (process->rule.items.array[i].with & controller_with_full_path_d) { + execute_set.parameter.option |= FL_execute_parameter_option_path_d; } if (process->rule.items.array[i].type == controller_rule_item_type_command) { @@ -1372,7 +1372,7 @@ extern "C" { if (F_status_is_error(status)) { process->rule.items.array[i].actions.array[j].status = F_status_set_error(F_failure); - if (!(options & controller_process_option_simulate)) break; + if (!(options & controller_process_option_simulate_d)) break; success = F_status_set_error(F_failure); } @@ -1385,7 +1385,7 @@ extern "C" { for (;;) { - status = controller_rule_execute_foreground(process->rule.items.array[i].type, process->rule.script.used ? process->rule.script.string : controller_default_program_script, arguments_none, options, &execute_set, process); + status = controller_rule_execute_foreground(process->rule.items.array[i].type, process->rule.script.used ? process->rule.script.string : controller_default_program_script_s, arguments_none, options, &execute_set, process); if (status == F_child || status == F_signal || F_status_set_fine(status) == F_lock) break; if (F_status_is_error(status) && F_status_set_fine(status) != F_failure) break; @@ -1402,7 +1402,7 @@ extern "C" { if (F_status_is_error(status)) { process->rule.items.array[i].actions.array[j].status = F_status_set_error(F_failure); - if (!(options & controller_process_option_simulate)) break; + if (!(options & controller_process_option_simulate_d)) break; success = F_status_set_error(F_failure); } @@ -1431,7 +1431,7 @@ extern "C" { if (F_status_is_error(status)) { process->rule.items.array[i].actions.array[j].status = F_status_set_error(F_failure); - if (!(options & controller_process_option_simulate)) break; + if (!(options & controller_process_option_simulate_d)) break; success = F_status_set_error(F_failure); } @@ -1452,7 +1452,7 @@ extern "C" { for (;;) { - status = controller_rule_execute_pid_with(process->rule.items.array[i].pid_file, process->rule.items.array[i].type, process->rule.script.used ? process->rule.script.string : controller_default_program_script, arguments_none, options, process->rule.items.array[i].with, &execute_set, process); + status = controller_rule_execute_pid_with(process->rule.items.array[i].pid_file, process->rule.items.array[i].type, process->rule.script.used ? process->rule.script.string : controller_default_program_script_s, arguments_none, options, process->rule.items.array[i].with, &execute_set, process); if (status == F_child || status == F_signal || F_status_set_fine(status) == F_lock) break; if (F_status_is_error(status) && F_status_set_fine(status) != F_failure) break; @@ -1469,7 +1469,7 @@ extern "C" { if (F_status_is_error(status)) { process->rule.items.array[i].actions.array[j].status = F_status_set_error(F_failure); - if (!(options & controller_process_option_simulate)) break; + if (!(options & controller_process_option_simulate_d)) break; success = F_status_set_error(F_failure); } @@ -1503,7 +1503,7 @@ extern "C" { } } // for - if (status == F_child || status == F_signal || F_status_is_error(status) && !(options & controller_process_option_simulate)) { + if (status == F_child || status == F_signal || F_status_is_error(status) && !(options & controller_process_option_simulate_d)) { break; } } // for @@ -1579,7 +1579,7 @@ extern "C" { } } - if (options & controller_process_option_simulate) { + if (options & controller_process_option_simulate_d) { if (main->output.verbosity != f_console_verbosity_quiet) { controller_print_lock(main->output.to, thread); @@ -1611,15 +1611,15 @@ extern "C" { // sleep for less than a second to better show simulation of synchronous vs asynchronous. { - struct timespec delay = controller_time_micro(controller_thread_simulation_timeout); + struct timespec delay = controller_time_micro(controller_thread_simulation_timeout_d); nanosleep(&delay, 0); } const f_string_static_t simulated_program = macro_f_string_static_t_initialize(f_string_empty_s, 0); const f_string_statics_t simulated_arguments = f_string_statics_t_initialize; - fl_execute_parameter_t simulated_parameter = macro_fl_execute_parameter_t_initialize(execute_set->parameter.option, execute_set->parameter.wait, process->rule.has & controller_rule_has_environment ? execute_set->parameter.environment : 0, execute_set->parameter.signals, &simulated_program); + fl_execute_parameter_t simulated_parameter = macro_fl_execute_parameter_t_initialize(execute_set->parameter.option, execute_set->parameter.wait, process->rule.has & controller_rule_has_environment_d ? execute_set->parameter.environment : 0, execute_set->parameter.signals, &simulated_program); - status = fll_execute_program(controller_default_program_script, simulated_arguments, &simulated_parameter, &execute_set->as, (void *) &result); + status = fll_execute_program(controller_default_program_script_s, simulated_arguments, &simulated_parameter, &execute_set->as, (void *) &result); } else { status = fll_execute_program(program, arguments, &execute_set->parameter, &execute_set->as, (void *) &result); @@ -1773,7 +1773,7 @@ extern "C" { return status; } - status = f_string_dynamics_increase(controller_common_allocation_small, &process->path_pids); + status = f_string_dynamics_increase(controller_common_allocation_small_d, &process->path_pids); if (F_status_is_error(status)) { controller_error_print(main->error, F_status_set_fine(status), "f_string_dynamics_increase", F_true, thread); @@ -1822,15 +1822,15 @@ extern "C" { return F_status_set_error(F_file_found); } - status = controller_string_dynamic_append_terminated(pid_file, child_pid_file); + status = controller_dynamic_append_terminated(pid_file, child_pid_file); if (F_status_is_error(status)) { - controller_error_print(main->error, F_status_set_fine(status), "controller_string_dynamic_append_terminated", F_true, thread); + controller_error_print(main->error, F_status_set_fine(status), "controller_dynamic_append_terminated", F_true, thread); return status; } - if (options & controller_process_option_simulate) { + if (options & controller_process_option_simulate_d) { if (main->error.verbosity != f_console_verbosity_quiet) { controller_print_lock(main->error.to, thread); @@ -1862,15 +1862,15 @@ extern "C" { // sleep for less than a second to better show simulation of synchronous vs asynchronous. { - struct timespec delay = controller_time_micro(controller_thread_simulation_timeout); + struct timespec delay = controller_time_micro(controller_thread_simulation_timeout_d); nanosleep(&delay, 0); } const f_string_static_t simulated_program = macro_f_string_static_t_initialize(f_string_empty_s, 0); const f_string_statics_t simulated_arguments = f_string_statics_t_initialize; - fl_execute_parameter_t simulated_parameter = macro_fl_execute_parameter_t_initialize(execute_set->parameter.option, execute_set->parameter.wait, process->rule.has & controller_rule_has_environment ? execute_set->parameter.environment : 0, execute_set->parameter.signals, &simulated_program); + fl_execute_parameter_t simulated_parameter = macro_fl_execute_parameter_t_initialize(execute_set->parameter.option, execute_set->parameter.wait, process->rule.has & controller_rule_has_environment_d ? execute_set->parameter.environment : 0, execute_set->parameter.signals, &simulated_program); - status = fll_execute_program(controller_default_program_script, simulated_arguments, &simulated_parameter, &execute_set->as, (void *) &result); + status = fll_execute_program(controller_default_program_script_s, simulated_arguments, &simulated_parameter, &execute_set->as, (void *) &result); } else { status = fll_execute_program(program, arguments, &execute_set->parameter, &execute_set->as, (void *) &result); @@ -2010,7 +2010,7 @@ extern "C" { const int result = WIFEXITED(process->result) ? WEXITSTATUS(process->result) : 0; - if (item->reruns[action].is & (result ? controller_rule_rerun_is_failure : controller_rule_rerun_is_success)) { + if (item->reruns[action].is & (result ? controller_rule_rerun_is_failure_d : controller_rule_rerun_is_success_d)) { controller_main_t * const main = (controller_main_t *) process->main_data; controller_thread_t * const thread = (controller_thread_t *) process->main_thread; controller_rule_rerun_item_t *rerun_item = result ? &item->reruns[action].failure : &item->reruns[action].success; @@ -2026,7 +2026,7 @@ extern "C" { f_print_terminated("' '", main->output.to.stream); fl_print_format("%[%q%]", main->output.to.stream, main->context.set.notable, controller_rule_action_type_execute_name(action), main->context.set.notable); f_print_terminated("' with a ", main->output.to.stream); - fl_print_format("%[%s%]", main->output.to.stream, main->context.set.notable, controller_string_delay_s, main->context.set.notable); + fl_print_format("%[%s%]", main->output.to.stream, main->context.set.notable, controller_delay_s, main->context.set.notable); f_print_terminated(" of ", main->output.to.stream); fl_print_format("%[%ul%] MegaTime", main->output.to.stream, main->context.set.notable, rerun_item->delay, main->context.set.notable); @@ -2034,12 +2034,12 @@ extern "C" { f_print_terminated(" for ", main->output.to.stream); fl_print_format("%[%ul%]", main->output.to.stream, main->context.set.notable, rerun_item->count, main->context.set.notable); f_print_terminated(" of ", main->output.to.stream); - fl_print_format("%[%s%] ", main->output.to.stream, main->context.set.notable, controller_string_max_s, main->context.set.notable); + fl_print_format("%[%s%] ", main->output.to.stream, main->context.set.notable, controller_max_s, main->context.set.notable); fl_print_format("%[%ul%]", main->output.to.stream, main->context.set.notable, rerun_item->max, main->context.set.notable); fl_print_format(".%c", main->output.to.stream, f_string_eol_s[0]); } else { - fl_print_format(" with no %[%s%].%c", main->output.to.stream, main->context.set.notable, controller_string_max_s, main->context.set.notable, f_string_eol_s[0]); + fl_print_format(" with no %[%s%].%c", main->output.to.stream, main->context.set.notable, controller_max_s, main->context.set.notable, f_string_eol_s[0]); } controller_print_unlock_flush(main->output.to, thread); @@ -2055,7 +2055,7 @@ extern "C" { if (!controller_thread_is_enabled_process(process, thread)) return -2; } - if (item->reruns[action].is & (result ? controller_rule_rerun_is_failure_reset : controller_rule_rerun_is_success_reset)) { + if (item->reruns[action].is & (result ? controller_rule_rerun_is_failure_reset_d : controller_rule_rerun_is_success_reset_d)) { if (result) { item->reruns[action].success.count = 0; } @@ -2091,7 +2091,7 @@ extern "C" { return status; } - status = f_string_append(f_path_separator_s, f_path_separator_length, alias); + status = f_string_append(f_path_separator_s, F_path_separator_s_length, alias); if (F_status_is_error(status)) { controller_error_print(global.main->error, F_status_set_fine(status), "f_string_append", F_true, global.thread); @@ -2136,7 +2136,7 @@ extern "C" { f_status_t status = F_none; controller_state_interrupt_t custom = macro_controller_state_interrupt_t_initialize(is_normal, global.thread); - f_state_t state = macro_f_state_t_initialize(controller_common_allocation_large, controller_common_allocation_small, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0); + f_state_t state = macro_f_state_t_initialize(controller_common_allocation_large_d, controller_common_allocation_small_d, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0); f_string_range_t range = macro_f_string_range_t_initialize(cache->buffer_item.used); f_array_length_t last = 0; @@ -2195,53 +2195,53 @@ extern "C" { cache->action.line_action += ++item->line; cache->action.name_action.used = 0; - status = controller_string_dynamic_rip_nulless_terminated(cache->buffer_item, cache->range_action, &cache->action.name_action); + status = controller_dynamic_rip_nulless_terminated(cache->buffer_item, cache->range_action, &cache->action.name_action); if (F_status_is_error(status)) { - controller_error_print(global.main->error, F_status_set_fine(status), "controller_string_dynamic_rip_nulless_terminated", F_true, global.thread); + controller_error_print(global.main->error, F_status_set_fine(status), "controller_dynamic_rip_nulless_terminated", F_true, global.thread); break; } - if (fl_string_dynamic_compare_string(controller_string_freeze_s, cache->action.name_action, controller_string_freeze_length) == F_equal_to) { + if (fl_string_dynamic_compare_string(controller_freeze_s, cache->action.name_action, controller_freeze_s_length) == F_equal_to) { type = controller_rule_action_type_freeze; } - else if (fl_string_dynamic_compare_string(controller_string_group_s, cache->action.name_action, controller_string_group_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_group_s, cache->action.name_action, controller_group_s_length) == F_equal_to) { type = controller_rule_action_type_group; } - else if (fl_string_dynamic_compare_string(controller_string_kill_s, cache->action.name_action, controller_string_kill_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_kill_s, cache->action.name_action, controller_kill_s_length) == F_equal_to) { type = controller_rule_action_type_kill; } - else if (fl_string_dynamic_compare_string(controller_string_pause_s, cache->action.name_action, controller_string_pause_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_pause_s, cache->action.name_action, controller_pause_s_length) == F_equal_to) { type = controller_rule_action_type_pause; } - else if (fl_string_dynamic_compare_string(controller_string_pid_file_s, cache->action.name_action, controller_string_pid_file_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_pid_file_s, cache->action.name_action, controller_pid_file_s_length) == F_equal_to) { type = controller_rule_action_type_pid_file; } - else if (fl_string_dynamic_compare_string(controller_string_reload_s, cache->action.name_action, controller_string_reload_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_reload_s, cache->action.name_action, controller_reload_s_length) == F_equal_to) { type = controller_rule_action_type_reload; } - else if (fl_string_dynamic_compare_string(controller_string_rerun_s, cache->action.name_action, controller_string_rerun_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_rerun_s, cache->action.name_action, controller_rerun_s_length) == F_equal_to) { type = controller_rule_action_type_rerun; } - else if (fl_string_dynamic_compare_string(controller_string_restart_s, cache->action.name_action, controller_string_restart_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_restart_s, cache->action.name_action, controller_restart_s_length) == F_equal_to) { type = controller_rule_action_type_restart; } - else if (fl_string_dynamic_compare_string(controller_string_resume_s, cache->action.name_action, controller_string_resume_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_resume_s, cache->action.name_action, controller_resume_s_length) == F_equal_to) { type = controller_rule_action_type_resume; } - else if (fl_string_dynamic_compare_string(controller_string_start_s, cache->action.name_action, controller_string_start_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_start_s, cache->action.name_action, controller_start_s_length) == F_equal_to) { type = controller_rule_action_type_start; } - else if (fl_string_dynamic_compare_string(controller_string_stop_s, cache->action.name_action, controller_string_stop_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_stop_s, cache->action.name_action, controller_stop_s_length) == F_equal_to) { type = controller_rule_action_type_stop; } - else if (fl_string_dynamic_compare_string(controller_string_thaw_s, cache->action.name_action, controller_string_thaw_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_thaw_s, cache->action.name_action, controller_thaw_s_length) == F_equal_to) { type = controller_rule_action_type_thaw; } - else if (fl_string_dynamic_compare_string(controller_string_user_s, cache->action.name_action, controller_string_user_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_user_s, cache->action.name_action, controller_user_s_length) == F_equal_to) { type = controller_rule_action_type_user; } - else if (fl_string_dynamic_compare_string(controller_string_with_s, cache->action.name_action, controller_string_with_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_with_s, cache->action.name_action, controller_with_s_length) == F_equal_to) { type = controller_rule_action_type_with; } else { @@ -2283,7 +2283,7 @@ extern "C" { method = controller_rule_action_method_extended; } - status = controller_rule_actions_increase_by(controller_common_allocation_small, &item->actions); + status = controller_rule_actions_increase_by(controller_common_allocation_small_d, &item->actions); if (F_status_is_error(status)) { controller_error_print(global.main->error, F_status_set_fine(status), "controller_rule_actions_increase_by", F_true, global.thread); @@ -2305,28 +2305,28 @@ extern "C" { switch (type) { case controller_rule_item_type_command: - buffer.string = controller_string_command_s; - buffer.used = controller_string_command_length; + buffer.string = controller_command_s; + buffer.used = controller_command_s_length; break; case controller_rule_item_type_script: - buffer.string = controller_string_script_s; - buffer.used = controller_string_script_length; + buffer.string = controller_script_s; + buffer.used = controller_script_s_length; break; case controller_rule_item_type_service: - buffer.string = controller_string_service_s; - buffer.used = controller_string_service_length; + buffer.string = controller_service_s; + buffer.used = controller_service_s_length; break; case controller_rule_item_type_setting: - buffer.string = controller_string_setting_s; - buffer.used = controller_string_setting_length; + buffer.string = controller_setting_s; + buffer.used = controller_setting_s_length; break; case controller_rule_item_type_utility: - buffer.string = controller_string_utility_s; - buffer.used = controller_string_utility_length; + buffer.string = controller_utility_s; + buffer.used = controller_utility_s_length; break; } @@ -2340,7 +2340,7 @@ extern "C" { f_status_t controller_rule_items_increase_by(const f_array_length_t amount, controller_rule_items_t *items) { if (items->used + amount > items->size) { - if (items->used + amount > f_array_length_t_size) { + if (items->used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } @@ -2364,83 +2364,83 @@ extern "C" { switch (type) { case controller_resource_limit_type_as: - buffer.string = controller_string_as_s; - buffer.used = controller_string_as_length; + buffer.string = controller_as_s; + buffer.used = controller_as_s_length; break; case controller_resource_limit_type_core: - buffer.string = controller_string_core_s; - buffer.used = controller_string_core_length; + buffer.string = controller_core_s; + buffer.used = controller_core_s_length; break; case controller_resource_limit_type_cpu: - buffer.string = controller_string_cpu_s; - buffer.used = controller_string_cpu_length; + buffer.string = controller_cpu_s; + buffer.used = controller_cpu_s_length; break; case controller_resource_limit_type_data: - buffer.string = controller_string_data_s; - buffer.used = controller_string_data_length; + buffer.string = controller_data_s; + buffer.used = controller_data_s_length; break; case controller_resource_limit_type_fsize: - buffer.string = controller_string_fsize_s; - buffer.used = controller_string_fsize_length; + buffer.string = controller_fsize_s; + buffer.used = controller_fsize_s_length; break; case controller_resource_limit_type_locks: - buffer.string = controller_string_locks_s; - buffer.used = controller_string_locks_length; + buffer.string = controller_locks_s; + buffer.used = controller_locks_s_length; break; case controller_resource_limit_type_memlock: - buffer.string = controller_string_memlock_s; - buffer.used = controller_string_memlock_length; + buffer.string = controller_memlock_s; + buffer.used = controller_memlock_s_length; break; case controller_resource_limit_type_msgqueue: - buffer.string = controller_string_msgqueue_s; - buffer.used = controller_string_msgqueue_length; + buffer.string = controller_msgqueue_s; + buffer.used = controller_msgqueue_s_length; break; case controller_resource_limit_type_nice: - buffer.string = controller_string_nice_s; - buffer.used = controller_string_nice_length; + buffer.string = controller_nice_s; + buffer.used = controller_nice_s_length; break; case controller_resource_limit_type_nofile: - buffer.string = controller_string_nofile_s; - buffer.used = controller_string_nofile_length; + buffer.string = controller_nofile_s; + buffer.used = controller_nofile_s_length; break; case controller_resource_limit_type_nproc: - buffer.string = controller_string_nproc_s; - buffer.used = controller_string_nproc_length; + buffer.string = controller_nproc_s; + buffer.used = controller_nproc_s_length; break; case controller_resource_limit_type_rss: - buffer.string = controller_string_rss_s; - buffer.used = controller_string_rss_length; + buffer.string = controller_rss_s; + buffer.used = controller_rss_s_length; break; case controller_resource_limit_type_rtprio: - buffer.string = controller_string_rtprio_s; - buffer.used = controller_string_rtprio_length; + buffer.string = controller_rtprio_s; + buffer.used = controller_rtprio_s_length; break; case controller_resource_limit_type_rttime: - buffer.string = controller_string_rttime_s; - buffer.used = controller_string_rttime_length; + buffer.string = controller_rttime_s; + buffer.used = controller_rttime_s_length; break; case controller_resource_limit_type_sigpending: - buffer.string = controller_string_sigpending_s; - buffer.used = controller_string_sigpending_length; + buffer.string = controller_sigpending_s; + buffer.used = controller_sigpending_s_length; break; case controller_resource_limit_type_stack: - buffer.string = controller_string_stack_s; - buffer.used = controller_string_stack_length; + buffer.string = controller_stack_s; + buffer.used = controller_stack_s_length; break; } @@ -2488,10 +2488,10 @@ extern "C" { process->cache.action.name_item.used = 0; process->cache.action.name_file.used = 0; - status = f_string_append(controller_string_rules_s, controller_string_rules_length, &process->cache.action.name_file); + status = f_string_append(controller_rules_s, controller_rules_s_length, &process->cache.action.name_file); if (F_status_is_error_not(status)) { - status = f_string_append(f_path_separator_s, f_path_separator_length, &process->cache.action.name_file); + status = f_string_append(f_path_separator_s, F_path_separator_s_length, &process->cache.action.name_file); } if (F_status_is_error(status)) { @@ -2508,10 +2508,10 @@ extern "C" { return status; } - status = f_string_append(f_path_extension_separator, f_path_extension_separator_length, &process->cache.action.name_file); + status = f_string_append(F_path_extension_separator_s, F_path_extension_separator_s_length, &process->cache.action.name_file); if (F_status_is_error_not(status)) { - status = f_string_append(controller_string_rule_s, controller_string_rule_length, &process->cache.action.name_file); + status = f_string_append(controller_rule_s, controller_rule_s_length, &process->cache.action.name_file); } if (F_status_is_error(status)) { @@ -2528,7 +2528,7 @@ extern "C" { return status; } - if ((process->options & controller_process_option_simulate) && (process->options & controller_process_option_validate)) { + if ((process->options & controller_process_option_simulate_d) && (process->options & controller_process_option_validate_d)) { controller_rule_validate(process->rule, process->action, process->options, global, &process->cache); } @@ -2662,7 +2662,7 @@ extern "C" { status = F_status_set_error(F_found_not); - if (!(process->options & controller_process_option_simulate)) { + if (!(process->options & controller_process_option_simulate_d)) { if (dependency) { f_thread_unlock(&dependency->active); } @@ -2717,7 +2717,7 @@ extern "C" { status = controller_process_wait(global, dependency); - if (F_status_is_error(status) && !(process->options & controller_process_option_simulate)) break; + if (F_status_is_error(status) && !(process->options & controller_process_option_simulate_d)) break; status = dependency->rule.status[process->action]; } @@ -2738,11 +2738,11 @@ extern "C" { options_process = 0; if (global.main->parameters[controller_parameter_simulate].result == f_console_result_found) { - options_process |= controller_process_option_simulate; + options_process |= controller_process_option_simulate_d; } - if (process->options & controller_process_option_validate) { - options_process |= controller_process_option_validate; + if (process->options & controller_process_option_validate_d) { + options_process |= controller_process_option_validate_d; } // synchronously execute dependency. @@ -2763,7 +2763,7 @@ extern "C" { controller_print_unlock_flush(global.main->error.to, global.thread); - if (!(dependency->options & controller_process_option_simulate) || F_status_set_fine(status) == F_memory_not) { + if (!(dependency->options & controller_process_option_simulate_d) || F_status_set_fine(status) == F_memory_not) { f_thread_unlock(&dependency->active); break; @@ -2825,7 +2825,7 @@ extern "C" { status = F_status_set_error(F_found_not); - if (!(dependency->options & controller_process_option_simulate)) { + if (!(dependency->options & controller_process_option_simulate_d)) { f_thread_unlock(&dependency->active); break; @@ -2855,7 +2855,7 @@ extern "C" { if (status == F_child || status == F_signal) break; - if (F_status_is_error(status) && !(process->options & controller_process_option_simulate)) break; + if (F_status_is_error(status) && !(process->options & controller_process_option_simulate_d)) break; } // for } @@ -2867,7 +2867,7 @@ extern "C" { return F_signal; } - if ((process->options & controller_process_option_wait) && F_status_is_error_not(status) && (process->options & controller_process_option_validate)) { + if ((process->options & controller_process_option_wait_d) && F_status_is_error_not(status) && (process->options & controller_process_option_validate_d)) { status_lock = controller_rule_wait_all_process_type(process->type, global, F_false, process); @@ -2876,10 +2876,10 @@ extern "C" { } } - if (!(process->options & controller_process_option_validate) && F_status_is_error_not(status)) { + if (!(process->options & controller_process_option_validate_d) && F_status_is_error_not(status)) { // find at least one of the requested action when the rule is required. - if (process->options & controller_process_option_require) { + if (process->options & controller_process_option_require_d) { bool missing = F_true; f_array_length_t j = 0; @@ -2910,15 +2910,15 @@ extern "C" { fl_print_format("%c%[%SThe rule '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, global.main->error.context); fl_print_format("%[%Q%]", global.main->error.to.stream, global.main->error.notable, process->rule.name, global.main->error.notable); fl_print_format("%[ has no known '%]", global.main->error.to.stream, global.main->error.context, global.main->error.context); - fl_print_format("%[%s %s%]", global.main->error.to.stream, global.main->error.notable, controller_string_rule_s, controller_string_type_s, global.main->error.notable); + fl_print_format("%[%s %s%]", global.main->error.to.stream, global.main->error.notable, controller_rule_s, controller_type_s, global.main->error.notable); fl_print_format("%[' (such as '%]", global.main->error.to.stream, global.main->error.context, global.main->error.context); - fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_string_command_s, global.main->error.notable); + fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_command_s, global.main->error.notable); fl_print_format("%[', '%]", global.main->error.to.stream, global.main->error.context, global.main->error.context); - fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_string_service_s, global.main->error.notable); + fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_service_s, global.main->error.notable); fl_print_format("%[', '%]", global.main->error.to.stream, global.main->error.context, global.main->error.context); - fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_string_script_s, global.main->error.notable); + fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_script_s, global.main->error.notable); fl_print_format("%[', or '%]", global.main->error.to.stream, global.main->error.context, global.main->error.context); - fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_string_utility_s, global.main->error.notable); + fl_print_format("%[%s%]", global.main->error.to.stream, global.main->error.notable, controller_utility_s, global.main->error.notable); fl_print_format("%[') to execute.%]%c", global.main->error.to.stream, global.main->error.context, global.main->error.context, f_string_eol_s[0]); } @@ -3190,7 +3190,7 @@ extern "C" { f_thread_unlock(&process->lock); if (F_status_is_error_not(status)) { - if (process->action && (options_force & controller_process_option_asynchronous)) { + if (process->action && (options_force & controller_process_option_asynchronous_d)) { if (process->type == controller_process_type_exit) { status = f_thread_create(0, &process->id_thread, controller_thread_process_other, (void *) process); } @@ -3225,7 +3225,7 @@ extern "C" { return status; } - if (!action || (options_force & controller_process_option_asynchronous)) { + if (!action || (options_force & controller_process_option_asynchronous_d)) { process->state = controller_process_state_done; } else { @@ -3257,7 +3257,7 @@ extern "C" { controller_global_t global = macro_controller_global_t_initialize((controller_main_t *) process->main_data, (controller_setting_t *) process->main_setting, (controller_thread_t *) process->main_thread); // the process and active locks shall be held for the duration of this processing (aside from switching between read to/from write). - if (options_force & controller_process_option_asynchronous) { + if (options_force & controller_process_option_asynchronous_d) { status_lock = controller_lock_read_process(process, global.thread, &process->active); if (status_lock == F_signal || F_status_is_error(status_lock)) { @@ -3272,7 +3272,7 @@ extern "C" { if (status_lock == F_signal || F_status_is_error(status_lock)) { controller_lock_error_critical_print(global.main->error, F_status_set_fine(status_lock), F_true, global.thread); - if (options_force & controller_process_option_asynchronous) { + if (options_force & controller_process_option_asynchronous_d) { f_thread_unlock(&process->active); } @@ -3292,7 +3292,7 @@ extern "C" { f_thread_unlock(&process->lock); - if (options_force & controller_process_option_asynchronous) { + if (options_force & controller_process_option_asynchronous_d) { f_thread_unlock(&process->active); } @@ -3309,7 +3309,7 @@ extern "C" { f_thread_unlock(&global.thread->lock.rule); - if (options_force & controller_process_option_asynchronous) { + if (options_force & controller_process_option_asynchronous_d) { f_thread_unlock(&process->active); } @@ -3329,7 +3329,7 @@ extern "C" { f_thread_unlock(&global.thread->lock.rule); - if (options_force & controller_process_option_asynchronous) { + if (options_force & controller_process_option_asynchronous_d) { f_thread_unlock(&process->active); } @@ -3346,7 +3346,7 @@ extern "C" { // this is a "consider" Action, so do not actually execute the rule. f_thread_unlock(&process->lock); - if (options_force & controller_process_option_asynchronous) { + if (options_force & controller_process_option_asynchronous_d) { f_thread_unlock(&process->active); } @@ -3378,7 +3378,7 @@ extern "C" { if (!controller_thread_is_enabled_process(process, global.thread)) { f_thread_unlock(&process->lock); - if (options_force & controller_process_option_asynchronous) { + if (options_force & controller_process_option_asynchronous_d) { f_thread_unlock(&process->active); } @@ -3386,7 +3386,7 @@ extern "C" { } if (F_status_is_error_not(status)) { - status = f_type_array_lengths_increase(controller_common_allocation_small, &process->stack); + status = f_type_array_lengths_increase(controller_common_allocation_small_d, &process->stack); if (F_status_is_error(status)) { controller_error_print(global.main->error, F_status_set_fine(status), "f_type_array_lengths_increase", F_true, global.thread); @@ -3399,7 +3399,7 @@ extern "C" { if (status_lock == F_signal || F_status_is_error(status_lock)) { controller_lock_error_critical_print(global.main->error, F_status_set_fine(status_lock), F_false, global.thread); - if (options_force & controller_process_option_asynchronous) { + if (options_force & controller_process_option_asynchronous_d) { f_thread_unlock(&process->active); } @@ -3415,7 +3415,7 @@ extern "C" { if (status_lock == F_signal || F_status_is_error(status_lock)) { controller_lock_error_critical_print(global.main->error, F_status_set_fine(status_lock), F_true, global.thread); - if (options_force & controller_process_option_asynchronous) { + if (options_force & controller_process_option_asynchronous_d) { f_thread_unlock(&process->active); } @@ -3447,7 +3447,7 @@ extern "C" { if (status == F_child) { f_thread_unlock(&process->lock); - if (options_force & controller_process_option_asynchronous) { + if (options_force & controller_process_option_asynchronous_d) { f_thread_unlock(&process->active); } @@ -3463,7 +3463,7 @@ extern "C" { f_thread_unlock(&process->lock); } - if (options_force & controller_process_option_asynchronous) { + if (options_force & controller_process_option_asynchronous_d) { f_thread_unlock(&process->active); } @@ -3486,7 +3486,7 @@ extern "C" { } if (status == F_signal || F_status_set_fine(status) == F_lock && !controller_thread_is_enabled_process(process, global.thread)) { - if (options_force & controller_process_option_asynchronous) { + if (options_force & controller_process_option_asynchronous_d) { f_thread_unlock(&process->active); } @@ -3498,14 +3498,14 @@ extern "C" { if (status_lock == F_signal || F_status_is_error(status_lock)) { controller_lock_error_critical_print(global.main->error, F_status_set_fine(status_lock), F_false, global.thread); - if (options_force & controller_process_option_asynchronous) { + if (options_force & controller_process_option_asynchronous_d) { f_thread_unlock(&process->active); } return status_lock; } - if (options_force & controller_process_option_asynchronous) { + if (options_force & controller_process_option_asynchronous_d) { process->state = controller_process_state_done; } else { @@ -3521,7 +3521,7 @@ extern "C" { f_thread_unlock(&process->lock); - if (options_force & controller_process_option_asynchronous) { + if (options_force & controller_process_option_asynchronous_d) { f_thread_unlock(&process->active); } @@ -3633,7 +3633,7 @@ extern "C" { controller_error_print(global.main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true, global.thread); } else { - status = controller_file_load(F_true, controller_string_rules_s, rule->alias, controller_string_rule_s, controller_string_rules_length, controller_string_rule_length, global, cache); + status = controller_file_load(F_true, controller_rules_s, rule->alias, controller_rule_s, controller_rules_s_length, controller_rule_s_length, global, cache); } } @@ -3642,7 +3642,7 @@ extern "C" { if (cache->buffer_file.used) { controller_state_interrupt_t custom = macro_controller_state_interrupt_t_initialize(is_normal, global.thread); - f_state_t state = macro_f_state_t_initialize(controller_common_allocation_large, controller_common_allocation_small, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0); + f_state_t state = macro_f_state_t_initialize(controller_common_allocation_large_d, controller_common_allocation_small_d, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0); f_string_range_t range = macro_f_string_range_t_initialize(cache->buffer_file.used); status = fll_fss_basic_list_read(cache->buffer_file, state, &range, &cache->object_items, &cache->content_items, &cache->delimits, 0, &cache->comments); @@ -3707,26 +3707,26 @@ extern "C" { rule->items.array[rule->items.used].line = ++cache->action.line_item; - status = controller_string_dynamic_rip_nulless_terminated(cache->buffer_file, cache->object_items.array[i], &cache->action.name_item); + status = controller_dynamic_rip_nulless_terminated(cache->buffer_file, cache->object_items.array[i], &cache->action.name_item); if (F_status_is_error(status)) { - controller_error_print(global.main->error, F_status_set_fine(status), "controller_string_dynamic_rip_nulless_terminated", F_true, global.thread); + controller_error_print(global.main->error, F_status_set_fine(status), "controller_dynamic_rip_nulless_terminated", F_true, global.thread); break; } - if (fl_string_dynamic_compare_string(controller_string_setting_s, cache->action.name_item, controller_string_setting_length) == F_equal_to) { + if (fl_string_dynamic_compare_string(controller_setting_s, cache->action.name_item, controller_setting_s_length) == F_equal_to) { rule->items.array[rule->items.used].type = 0; } - else if (fl_string_dynamic_compare_string(controller_string_command_s, cache->action.name_item, controller_string_command_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_command_s, cache->action.name_item, controller_command_s_length) == F_equal_to) { rule->items.array[rule->items.used].type = controller_rule_item_type_command; } - else if (fl_string_dynamic_compare_string(controller_string_script_s, cache->action.name_item, controller_string_script_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_script_s, cache->action.name_item, controller_script_s_length) == F_equal_to) { rule->items.array[rule->items.used].type = controller_rule_item_type_script; } - else if (fl_string_dynamic_compare_string(controller_string_service_s, cache->action.name_item, controller_string_service_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_service_s, cache->action.name_item, controller_service_s_length) == F_equal_to) { rule->items.array[rule->items.used].type = controller_rule_item_type_service; } - else if (fl_string_dynamic_compare_string(controller_string_utility_s, cache->action.name_item, controller_string_utility_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_utility_s, cache->action.name_item, controller_utility_s_length) == F_equal_to) { rule->items.array[rule->items.used].type = controller_rule_item_type_utility; } else { @@ -3803,7 +3803,7 @@ extern "C" { { controller_state_interrupt_t custom = macro_controller_state_interrupt_t_initialize(is_normal, global.thread); - f_state_t state = macro_f_state_t_initialize(controller_common_allocation_large, controller_common_allocation_small, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0); + f_state_t state = macro_f_state_t_initialize(controller_common_allocation_large_d, controller_common_allocation_small_d, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0); status = fll_fss_extended_read(cache->buffer_item, state, &range, &cache->object_actions, &cache->content_actions, 0, 0, &cache->delimits, 0); } @@ -3878,53 +3878,53 @@ extern "C" { empty_disallow = F_true; - if (fl_string_dynamic_compare_string(controller_string_affinity_s, cache->action.name_item, controller_string_affinity_length) == F_equal_to) { + if (fl_string_dynamic_compare_string(controller_affinity_s, cache->action.name_item, controller_affinity_s_length) == F_equal_to) { type = controller_rule_setting_type_affinity; } - else if (fl_string_dynamic_compare_string(controller_string_capability_s, cache->action.name_item, controller_string_capability_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_capability_s, cache->action.name_item, controller_capability_s_length) == F_equal_to) { type = controller_rule_setting_type_capability; } - else if (fl_string_dynamic_compare_string(controller_string_control_group_s, cache->action.name_item, controller_string_control_group_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_control_group_s, cache->action.name_item, controller_control_group_s_length) == F_equal_to) { type = controller_rule_setting_type_control_group; } - else if (fl_string_dynamic_compare_string(controller_string_define_s, cache->action.name_item, controller_string_define_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_define_s, cache->action.name_item, controller_define_s_length) == F_equal_to) { type = controller_rule_setting_type_define; } - else if (fl_string_dynamic_compare_string(controller_string_environment_s, cache->action.name_item, controller_string_environment_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_environment_s, cache->action.name_item, controller_environment_s_length) == F_equal_to) { type = controller_rule_setting_type_environment; empty_disallow = F_false; } - else if (fl_string_dynamic_compare_string(controller_string_group_s, cache->action.name_item, controller_string_group_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_group_s, cache->action.name_item, controller_group_s_length) == F_equal_to) { type = controller_rule_setting_type_group; } - else if (fl_string_dynamic_compare_string(controller_string_limit_s, cache->action.name_item, controller_string_limit_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_limit_s, cache->action.name_item, controller_limit_s_length) == F_equal_to) { type = controller_rule_setting_type_limit; } - else if (fl_string_dynamic_compare_string(controller_string_name_s, cache->action.name_item, controller_string_name_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_name_s, cache->action.name_item, controller_name_s_length) == F_equal_to) { type = controller_rule_setting_type_name; } - else if (fl_string_dynamic_compare_string(controller_string_nice_s, cache->action.name_item, controller_string_nice_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_nice_s, cache->action.name_item, controller_nice_s_length) == F_equal_to) { type = controller_rule_setting_type_nice; } - else if (fl_string_dynamic_compare_string(controller_string_on_s, cache->action.name_item, controller_string_on_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_on_s, cache->action.name_item, controller_on_s_length) == F_equal_to) { type = controller_rule_setting_type_on; } - else if (fl_string_dynamic_compare_string(controller_string_parameter_s, cache->action.name_item, controller_string_parameter_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_parameter_s, cache->action.name_item, controller_parameter_s_length) == F_equal_to) { type = controller_rule_setting_type_parameter; } - else if (fl_string_dynamic_compare_string(controller_string_path_s, cache->action.name_item, controller_string_path_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_path_s, cache->action.name_item, controller_path_s_length) == F_equal_to) { type = controller_rule_setting_type_path; } - else if (fl_string_dynamic_compare_string(controller_string_scheduler_s, cache->action.name_item, controller_string_scheduler_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_scheduler_s, cache->action.name_item, controller_scheduler_s_length) == F_equal_to) { type = controller_rule_setting_type_scheduler; } - else if (fl_string_dynamic_compare_string(controller_string_script_s, cache->action.name_item, controller_string_script_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_script_s, cache->action.name_item, controller_script_s_length) == F_equal_to) { type = controller_rule_setting_type_script; } - else if (fl_string_dynamic_compare_string(controller_string_timeout_s, cache->action.name_item, controller_string_timeout_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_timeout_s, cache->action.name_item, controller_timeout_s_length) == F_equal_to) { type = controller_rule_setting_type_timeout; } - else if (fl_string_dynamic_compare_string(controller_string_user_s, cache->action.name_item, controller_string_user_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(controller_user_s, cache->action.name_item, controller_user_s_length) == F_equal_to) { type = controller_rule_setting_type_user; } else { @@ -4033,14 +4033,14 @@ extern "C" { // @todo this needs to be in a function such as f_int32s_increase(). if (rule->affinity.used + 1 > rule->affinity.size) { - f_array_length_t size = rule->affinity.used + controller_common_allocation_small; + f_array_length_t size = rule->affinity.used + controller_common_allocation_small_d; - if (size > f_array_length_t_size) { - if (rule->affinity.used + 1 > f_array_length_t_size) { + if (size > F_array_length_t_size_d) { + if (rule->affinity.used + 1 > F_array_length_t_size_d) { status = F_status_set_error(F_array_too_large); } else { - size = f_array_length_t_size; + size = F_array_length_t_size_d; } } @@ -4101,7 +4101,7 @@ extern "C" { rule->affinity.array[rule->affinity.used++] = number; } // for - controller_rule_setting_read_print_values(global, controller_string_affinity_s, i, cache); + controller_rule_setting_read_print_values(global, controller_affinity_s, i, cache); continue; } @@ -4125,7 +4125,7 @@ extern "C" { setting_maps = &rule->parameter; } - status = f_string_maps_increase(controller_common_allocation_small, setting_maps); + status = f_string_maps_increase(controller_common_allocation_small_d, setting_maps); if (F_status_is_error(status)) { controller_rule_error_print(global.main->error, cache->action, F_status_set_fine(status), "f_string_maps_increase", F_true, F_false, global.thread); @@ -4212,7 +4212,7 @@ extern "C" { continue; } - controller_rule_setting_read_print_value(global, type == controller_rule_setting_type_define ? controller_string_define_s : controller_string_parameter_s, 0, setting_maps->array[setting_maps->used].name, 0); + controller_rule_setting_read_print_value(global, type == controller_rule_setting_type_define ? controller_define_s : controller_parameter_s, 0, setting_maps->array[setting_maps->used].name, 0); ++setting_maps->used; @@ -4220,7 +4220,7 @@ extern "C" { } if (type == controller_rule_setting_type_control_group) { - if (cache->content_actions.array[i].used < 2 || rule->has & controller_rule_has_control_group) { + if (cache->content_actions.array[i].used < 2 || rule->has & controller_rule_has_control_group_d) { controller_rule_setting_read_problem_print(global.main->error, "requires two or more Content", i, line_item, global.thread, cache); if (F_status_is_error_not(status_return)) { @@ -4230,10 +4230,10 @@ extern "C" { continue; } - if (fl_string_dynamic_partial_compare_string(controller_string_existing_s, cache->buffer_item, controller_string_existing_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + if (fl_string_dynamic_partial_compare_string(controller_existing_s, cache->buffer_item, controller_existing_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { rule->control_group.as_new = F_false; } - else if (fl_string_dynamic_partial_compare_string(controller_string_new_s, cache->buffer_item, controller_string_new_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_new_s, cache->buffer_item, controller_new_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { rule->control_group.as_new = F_true; } else { @@ -4258,7 +4258,7 @@ extern "C" { for (j = 1; j < cache->content_actions.array[i].used; ++j) { - status = f_string_dynamics_increase(controller_common_allocation_small, &rule->control_group.groups); + status = f_string_dynamics_increase(controller_common_allocation_small_d, &rule->control_group.groups); if (F_status_is_error(status)) { controller_rule_error_print(global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamics_increase", F_true, F_false, global.thread); @@ -4301,9 +4301,9 @@ extern "C" { continue; } - rule->has |= controller_rule_has_control_group; + rule->has |= controller_rule_has_control_group_d; - controller_rule_setting_read_print_values(global, controller_string_control_group_s, i, cache); + controller_rule_setting_read_print_values(global, controller_control_group_s, i, cache); continue; } @@ -4319,52 +4319,52 @@ extern "C" { continue; } - if (fl_string_dynamic_partial_compare_string(controller_string_as_s, cache->buffer_item, controller_string_as_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + if (fl_string_dynamic_partial_compare_string(controller_as_s, cache->buffer_item, controller_as_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { type = controller_resource_limit_type_as; } - else if (fl_string_dynamic_partial_compare_string(controller_string_core_s, cache->buffer_item, controller_string_core_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_core_s, cache->buffer_item, controller_core_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { type = controller_resource_limit_type_core; } - else if (fl_string_dynamic_partial_compare_string(controller_string_cpu_s, cache->buffer_item, controller_string_cpu_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_cpu_s, cache->buffer_item, controller_cpu_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { type = controller_resource_limit_type_cpu; } - else if (fl_string_dynamic_partial_compare_string(controller_string_data_s, cache->buffer_item, controller_string_data_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_data_s, cache->buffer_item, controller_data_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { type = controller_resource_limit_type_data; } - else if (fl_string_dynamic_partial_compare_string(controller_string_fsize_s, cache->buffer_item, controller_string_fsize_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_fsize_s, cache->buffer_item, controller_fsize_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { type = controller_resource_limit_type_fsize; } - else if (fl_string_dynamic_partial_compare_string(controller_string_locks_s, cache->buffer_item, controller_string_locks_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_locks_s, cache->buffer_item, controller_locks_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { type = controller_resource_limit_type_locks; } - else if (fl_string_dynamic_partial_compare_string(controller_string_memlock_s, cache->buffer_item, controller_string_memlock_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_memlock_s, cache->buffer_item, controller_memlock_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { type = controller_resource_limit_type_memlock; } - else if (fl_string_dynamic_partial_compare_string(controller_string_msgqueue_s, cache->buffer_item, controller_string_msgqueue_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_msgqueue_s, cache->buffer_item, controller_msgqueue_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { type = controller_resource_limit_type_msgqueue; } - else if (fl_string_dynamic_partial_compare_string(controller_string_nice_s, cache->buffer_item, controller_string_nice_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_nice_s, cache->buffer_item, controller_nice_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { type = controller_resource_limit_type_nice; } - else if (fl_string_dynamic_partial_compare_string(controller_string_nofile_s, cache->buffer_item, controller_string_nofile_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_nofile_s, cache->buffer_item, controller_nofile_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { type = controller_resource_limit_type_nofile; } - else if (fl_string_dynamic_partial_compare_string(controller_string_nproc_s, cache->buffer_item, controller_string_nproc_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_nproc_s, cache->buffer_item, controller_nproc_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { type = controller_resource_limit_type_nproc; } - else if (fl_string_dynamic_partial_compare_string(controller_string_rss_s, cache->buffer_item, controller_string_rss_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_rss_s, cache->buffer_item, controller_rss_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { type = controller_resource_limit_type_rss; } - else if (fl_string_dynamic_partial_compare_string(controller_string_rtprio_s, cache->buffer_item, controller_string_rtprio_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_rtprio_s, cache->buffer_item, controller_rtprio_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { type = controller_resource_limit_type_rtprio; } - else if (fl_string_dynamic_partial_compare_string(controller_string_rttime_s, cache->buffer_item, controller_string_rttime_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_rttime_s, cache->buffer_item, controller_rttime_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { type = controller_resource_limit_type_rttime; } - else if (fl_string_dynamic_partial_compare_string(controller_string_sigpending_s, cache->buffer_item, controller_string_sigpending_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_sigpending_s, cache->buffer_item, controller_sigpending_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { type = controller_resource_limit_type_sigpending; } - else if (fl_string_dynamic_partial_compare_string(controller_string_stack_s, cache->buffer_item, controller_string_stack_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_stack_s, cache->buffer_item, controller_stack_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { type = controller_resource_limit_type_stack; } else { @@ -4424,7 +4424,7 @@ extern "C" { if (F_status_is_error(status)) continue; - macro_f_limit_sets_t_increase(status, controller_common_allocation_small, rule->limits); + macro_f_limit_sets_t_increase(status, controller_common_allocation_small_d, rule->limits); if (F_status_is_error(status)) { controller_rule_error_print(global.main->error, cache->action, F_status_set_fine(status), "f_limit_sets_increase", F_true, F_false, global.thread); @@ -4509,7 +4509,7 @@ extern "C" { rule->limits.array[rule->limits.used++].type = type; - controller_rule_setting_read_print_values(global, controller_string_limit_s, i, cache); + controller_rule_setting_read_print_values(global, controller_limit_s, i, cache); continue; } @@ -4537,7 +4537,7 @@ extern "C" { } if (type == controller_rule_setting_type_name || type == controller_rule_setting_type_script) { - status = controller_string_dynamic_rip_nulless_terminated(cache->buffer_item, cache->content_actions.array[i].array[0], setting_value); + status = controller_dynamic_rip_nulless_terminated(cache->buffer_item, cache->content_actions.array[i].array[0], setting_value); if (F_status_is_error(status)) { setting_value->used = 0; @@ -4608,7 +4608,7 @@ extern "C" { continue; } - controller_rule_setting_read_print_value(global, type == controller_rule_setting_type_name ? controller_string_name_s : controller_string_script_s, 0, *setting_value, 0); + controller_rule_setting_read_print_value(global, type == controller_rule_setting_type_name ? controller_name_s : controller_script_s, 0, *setting_value, 0); } else if (type == controller_rule_setting_type_path) { status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], setting_value); @@ -4647,7 +4647,7 @@ extern "C" { continue; } - controller_rule_setting_read_print_value(global, controller_string_path_s, 0, *setting_value, 0); + controller_rule_setting_read_print_value(global, controller_path_s, 0, *setting_value, 0); } continue; @@ -4655,7 +4655,7 @@ extern "C" { if (type == controller_rule_setting_type_scheduler) { - if (cache->content_actions.array[i].used < 1 || cache->content_actions.array[i].used > 2 || rule->has & controller_rule_has_scheduler) { + if (cache->content_actions.array[i].used < 1 || cache->content_actions.array[i].used > 2 || rule->has & controller_rule_has_scheduler_d) { controller_rule_setting_read_problem_print(global.main->error, "requires either one or two Content", i, line_item, global.thread, cache); if (F_status_is_error_not(status_return)) { @@ -4665,27 +4665,27 @@ extern "C" { continue; } - if (fl_string_dynamic_partial_compare_string(controller_string_batch_s, cache->buffer_item, controller_string_batch_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + if (fl_string_dynamic_partial_compare_string(controller_batch_s, cache->buffer_item, controller_batch_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { rule->scheduler.policy = SCHED_BATCH; rule->scheduler.priority = 0; } - else if (fl_string_dynamic_partial_compare_string(controller_string_deadline_s, cache->buffer_item, controller_string_deadline_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_deadline_s, cache->buffer_item, controller_deadline_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { rule->scheduler.policy = SCHED_DEADLINE; rule->scheduler.priority = 49; } - else if (fl_string_dynamic_partial_compare_string(controller_string_fifo_s, cache->buffer_item, controller_string_fifo_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_fifo_s, cache->buffer_item, controller_fifo_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { rule->scheduler.policy = SCHED_FIFO; rule->scheduler.priority = 49; } - else if (fl_string_dynamic_partial_compare_string(controller_string_idle_s, cache->buffer_item, controller_string_idle_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_idle_s, cache->buffer_item, controller_idle_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { rule->scheduler.policy = SCHED_IDLE; rule->scheduler.priority = 0; } - else if (fl_string_dynamic_partial_compare_string(controller_string_other_s, cache->buffer_item, controller_string_other_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_other_s, cache->buffer_item, controller_other_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { rule->scheduler.policy = SCHED_OTHER; rule->scheduler.priority = 0; } - else if (fl_string_dynamic_partial_compare_string(controller_string_round_robin_s, cache->buffer_item, controller_string_round_robin_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_round_robin_s, cache->buffer_item, controller_round_robin_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { rule->scheduler.policy = SCHED_RR; rule->scheduler.priority = 49; } @@ -4768,9 +4768,9 @@ extern "C" { rule->scheduler.priority = number; } - rule->has |= controller_rule_has_scheduler; + rule->has |= controller_rule_has_scheduler_d; - controller_rule_setting_read_print_values(global, controller_string_scheduler_s, i, cache); + controller_rule_setting_read_print_values(global, controller_scheduler_s, i, cache); continue; } @@ -4788,14 +4788,14 @@ extern "C" { uint8_t timeout_code = 0; - if (fl_string_dynamic_partial_compare_string(controller_string_kill_s, cache->buffer_item, controller_string_kill_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - timeout_code = controller_rule_timeout_code_kill; + if (fl_string_dynamic_partial_compare_string(controller_kill_s, cache->buffer_item, controller_kill_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + timeout_code = controller_rule_timeout_code_kill_d; } - else if (fl_string_dynamic_partial_compare_string(controller_string_start_s, cache->buffer_item, controller_string_start_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - timeout_code = controller_rule_timeout_code_start; + else if (fl_string_dynamic_partial_compare_string(controller_start_s, cache->buffer_item, controller_start_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + timeout_code = controller_rule_timeout_code_start_d; } - else if (fl_string_dynamic_partial_compare_string(controller_string_stop_s, cache->buffer_item, controller_string_stop_length, cache->content_actions.array[i].array[0]) == F_equal_to) { - timeout_code = controller_rule_timeout_code_stop; + else if (fl_string_dynamic_partial_compare_string(controller_stop_s, cache->buffer_item, controller_stop_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + timeout_code = controller_rule_timeout_code_stop_d; } else { if (global.main->error.verbosity != f_console_verbosity_quiet) { @@ -4810,7 +4810,7 @@ extern "C" { fl_print_format("%c%[%SRule setting's first value has '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, global.main->error.context); fl_print_format("%[%/Q%]", global.main->error.to.stream, global.main->error.notable, cache->buffer_item, cache->content_actions.array[i].array[0], global.main->error.notable); - fl_print_format("%[' but only supports %s, %s, and %s.%]%c", global.main->error.to.stream, global.main->error.context, controller_string_kill_s, controller_string_start_s, controller_string_stop_s, global.main->error.context, f_string_eol_s[0]); + fl_print_format("%[' but only supports %s, %s, and %s.%]%c", global.main->error.to.stream, global.main->error.context, controller_kill_s, controller_start_s, controller_stop_s, global.main->error.context, f_string_eol_s[0]); controller_rule_error_print_cache(global.main->error, cache->action, F_false); @@ -4862,10 +4862,10 @@ extern "C" { } } else { - if (timeout_code == controller_rule_timeout_code_kill) { + if (timeout_code == controller_rule_timeout_code_kill_d) { rule->timeout_kill = number; } - else if (timeout_code == controller_rule_timeout_code_start) { + else if (timeout_code == controller_rule_timeout_code_start_d) { rule->timeout_start = number; } else { @@ -4873,25 +4873,25 @@ extern "C" { } if (global.main->error.verbosity == f_console_verbosity_debug || (global.main->error.verbosity == f_console_verbosity_verbose && global.main->parameters[controller_parameter_simulate].result == f_console_result_found)) { - f_string_t name_sub = controller_string_stop_s; + f_string_t name_sub = controller_stop_s; - if (timeout_code == controller_rule_timeout_code_kill) { - name_sub = controller_string_kill_s; + if (timeout_code == controller_rule_timeout_code_kill_d) { + name_sub = controller_kill_s; } - else if (timeout_code == controller_rule_timeout_code_start) { - name_sub = controller_string_start_s; + else if (timeout_code == controller_rule_timeout_code_start_d) { + name_sub = controller_start_s; } cache->action.generic.used = 0; - status = controller_string_dynamic_rip_nulless_terminated(cache->buffer_item, cache->content_actions.array[i].array[1], &cache->action.generic); + status = controller_dynamic_rip_nulless_terminated(cache->buffer_item, cache->content_actions.array[i].array[1], &cache->action.generic); if (F_status_is_error(status)) { - controller_error_print(global.main->error, F_status_set_fine(status), "controller_string_dynamic_rip_nulless_terminated", F_true, global.thread); + controller_error_print(global.main->error, F_status_set_fine(status), "controller_dynamic_rip_nulless_terminated", F_true, global.thread); break; } - controller_rule_setting_read_print_value(global, controller_string_timeout_s, name_sub, cache->action.generic, 0); + controller_rule_setting_read_print_value(global, controller_timeout_s, name_sub, cache->action.generic, 0); } } @@ -4899,7 +4899,7 @@ extern "C" { } if (type == controller_rule_setting_type_capability || type == controller_rule_setting_type_nice || type == controller_rule_setting_type_user) { - if (cache->content_actions.array[i].used != 1 || type == controller_rule_setting_type_capability && rule->capability || type == controller_rule_setting_type_group && (rule->has & controller_rule_has_group) || type == controller_rule_setting_type_nice && (rule->has & controller_rule_has_nice) || type == controller_rule_setting_type_user && (rule->has & controller_rule_has_user)) { + if (cache->content_actions.array[i].used != 1 || type == controller_rule_setting_type_capability && rule->capability || type == controller_rule_setting_type_group && (rule->has & controller_rule_has_group_d) || type == controller_rule_setting_type_nice && (rule->has & controller_rule_has_nice_d) || type == controller_rule_setting_type_user && (rule->has & controller_rule_has_user_d)) { controller_rule_setting_read_problem_print(global.main->error, "requires exactly one Content", i, line_item, global.thread, cache); if (F_status_is_error_not(status_return)) { @@ -5000,7 +5000,7 @@ extern "C" { continue; } - controller_rule_setting_read_print_value(global, controller_string_capability_s, 0, cache->action.generic, 0); + controller_rule_setting_read_print_value(global, controller_capability_s, 0, cache->action.generic, 0); } else if (type == controller_rule_setting_type_nice) { f_number_signed_t number = 0; @@ -5058,7 +5058,7 @@ extern "C" { } else { rule->nice = number; - rule->has |= controller_rule_has_nice; + rule->has |= controller_rule_has_nice_d; if (global.main->parameters[controller_parameter_simulate].result == f_console_result_found || global.main->error.verbosity == f_console_verbosity_verbose) { cache->action.generic.used = 0; @@ -5096,7 +5096,7 @@ extern "C" { } if (F_status_is_error_not(status)) { - controller_rule_setting_read_print_value(global, controller_string_nice_s, 0, cache->action.generic, 0); + controller_rule_setting_read_print_value(global, controller_nice_s, 0, cache->action.generic, 0); } } } @@ -5137,7 +5137,7 @@ extern "C" { } else { rule->user = number; - rule->has |= controller_rule_has_user; + rule->has |= controller_rule_has_user_d; if (global.main->error.verbosity == f_console_verbosity_debug || (global.main->error.verbosity == f_console_verbosity_verbose && global.main->parameters[controller_parameter_simulate].result == f_console_result_found)) { cache->action.generic.used = 0; @@ -5148,7 +5148,7 @@ extern "C" { status = f_string_dynamic_terminate_after(&cache->action.generic); } - controller_rule_setting_read_print_value(global, controller_string_user_s, 0, cache->action.generic, 0); + controller_rule_setting_read_print_value(global, controller_user_s, 0, cache->action.generic, 0); } } } @@ -5173,7 +5173,7 @@ extern "C" { for (j = 0; j < cache->content_actions.array[i].used; ++j) { - macro_f_int32s_t_increase_by(status, rule->groups, controller_common_allocation_small) + macro_f_int32s_t_increase_by(status, rule->groups, controller_common_allocation_small_d) if (F_status_is_error(status)) { controller_rule_error_print(global.main->error, cache->action, F_status_set_fine(status), "macro_f_array_lengths_t_increase_by", F_true, F_false, global.thread); @@ -5230,17 +5230,17 @@ extern "C" { } } else { - if (rule->has & controller_rule_has_group) { + if (rule->has & controller_rule_has_group_d) { rule->groups.array[rule->groups.used++] = number; } else { rule->group = number; - rule->has |= controller_rule_has_group; + rule->has |= controller_rule_has_group_d; } } } // for - controller_rule_setting_read_print_values(global, controller_string_group_s, i, cache); + controller_rule_setting_read_print_values(global, controller_group_s, i, cache); continue; } @@ -5250,7 +5250,7 @@ extern "C" { for (j = 0; j < cache->content_actions.array[i].used; ++j) { - status = f_string_dynamics_increase(controller_common_allocation_small, setting_values); + status = f_string_dynamics_increase(controller_common_allocation_small_d, setting_values); if (F_status_is_error(status)) { controller_rule_error_print(global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamics_increase", F_true, F_false, global.thread); @@ -5360,16 +5360,16 @@ extern "C" { ++setting_values->used; } // for - rule->has |= controller_rule_has_environment; + rule->has |= controller_rule_has_environment_d; if (cache->content_actions.array[i].used) { - controller_rule_setting_read_print_values(global, controller_string_environment_s, i, cache); + controller_rule_setting_read_print_values(global, controller_environment_s, i, cache); } else { if (global.main->error.verbosity == f_console_verbosity_debug || (global.main->error.verbosity == f_console_verbosity_verbose && global.main->parameters[controller_parameter_simulate].result == f_console_result_found)) { controller_print_lock(global.main->output.to, global.thread); - fl_print_format("%cProcessing rule item action '%[%s%]' setting value to an empty set.%c", global.main->output.to.stream, f_string_eol_s[0], global.main->context.set.title, controller_string_environment_s, global.main->context.set.title, f_string_eol_s[0]); + fl_print_format("%cProcessing rule item action '%[%s%]' setting value to an empty set.%c", global.main->output.to.stream, f_string_eol_s[0], global.main->context.set.title, controller_environment_s, global.main->context.set.title, f_string_eol_s[0]); controller_print_unlock_flush(global.main->output.to, global.thread); } @@ -5389,31 +5389,31 @@ extern "C" { continue; } - if (fl_string_dynamic_partial_compare_string(controller_string_freeze_s, cache->buffer_item, controller_string_freeze_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + if (fl_string_dynamic_partial_compare_string(controller_freeze_s, cache->buffer_item, controller_freeze_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { action = controller_rule_action_type_freeze; } - else if (fl_string_dynamic_partial_compare_string(controller_string_kill_s, cache->buffer_item, controller_string_kill_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_kill_s, cache->buffer_item, controller_kill_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { action = controller_rule_action_type_kill; } - else if (fl_string_dynamic_partial_compare_string(controller_string_pause_s, cache->buffer_item, controller_string_pause_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_pause_s, cache->buffer_item, controller_pause_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { action = controller_rule_action_type_pause; } - else if (fl_string_dynamic_partial_compare_string(controller_string_reload_s, cache->buffer_item, controller_string_reload_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_reload_s, cache->buffer_item, controller_reload_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { action = controller_rule_action_type_reload; } - else if (fl_string_dynamic_partial_compare_string(controller_string_restart_s, cache->buffer_item, controller_string_restart_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_restart_s, cache->buffer_item, controller_restart_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { action = controller_rule_action_type_restart; } - else if (fl_string_dynamic_partial_compare_string(controller_string_resume_s, cache->buffer_item, controller_string_resume_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_resume_s, cache->buffer_item, controller_resume_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { action = controller_rule_action_type_resume; } - else if (fl_string_dynamic_partial_compare_string(controller_string_start_s, cache->buffer_item, controller_string_start_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_start_s, cache->buffer_item, controller_start_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { action = controller_rule_action_type_start; } - else if (fl_string_dynamic_partial_compare_string(controller_string_stop_s, cache->buffer_item, controller_string_stop_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_stop_s, cache->buffer_item, controller_stop_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { action = controller_rule_action_type_stop; } - else if (fl_string_dynamic_partial_compare_string(controller_string_thaw_s, cache->buffer_item, controller_string_thaw_length, cache->content_actions.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_thaw_s, cache->buffer_item, controller_thaw_s_length, cache->content_actions.array[i].array[0]) == F_equal_to) { action = controller_rule_action_type_thaw; } else { @@ -5431,8 +5431,8 @@ extern "C" { fl_print_format("%c%[%SRule setting's second value has '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, global.main->error.context); fl_print_format("%[%/Q%]", global.main->error.to.stream, global.main->error.notable, cache->buffer_item, cache->content_actions.array[i].array[1], global.main->error.notable); - fl_print_format("%[' but only supports %s, %s, %s, %s, %s", global.main->error.to.stream, global.main->error.context, controller_string_freeze_s, controller_string_kill_s, controller_string_pause_s, controller_string_reload_s, controller_string_restart_s); - fl_print_format("%s, %s, %s, and %s.%]%c", global.main->error.to.stream, controller_string_resume_s, controller_string_start_s, controller_string_stop_s, controller_string_thaw_s, global.main->error.context, f_string_eol_s[0]); + fl_print_format("%[' but only supports %s, %s, %s, %s, %s", global.main->error.to.stream, global.main->error.context, controller_freeze_s, controller_kill_s, controller_pause_s, controller_reload_s, controller_restart_s); + fl_print_format("%s, %s, %s, and %s.%]%c", global.main->error.to.stream, controller_resume_s, controller_start_s, controller_stop_s, controller_thaw_s, global.main->error.context, f_string_eol_s[0]); controller_rule_error_print_cache(global.main->error, cache->action, F_false); @@ -5458,13 +5458,13 @@ extern "C" { controller_rule_error_print(global.main->error, cache->action, F_status_set_fine(status), "controller_rule_ons_increase", F_true, F_false, global.thread); } else { - if (fl_string_dynamic_partial_compare_string(controller_string_need_s, cache->buffer_item, controller_string_need_length, cache->content_actions.array[i].array[1]) == F_equal_to) { + if (fl_string_dynamic_partial_compare_string(controller_need_s, cache->buffer_item, controller_need_s_length, cache->content_actions.array[i].array[1]) == F_equal_to) { setting_values = &rule->ons.array[j].need; } - else if (fl_string_dynamic_partial_compare_string(controller_string_want_s, cache->buffer_item, controller_string_want_length, cache->content_actions.array[i].array[1]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_want_s, cache->buffer_item, controller_want_s_length, cache->content_actions.array[i].array[1]) == F_equal_to) { setting_values = &rule->ons.array[j].want; } - else if (fl_string_dynamic_partial_compare_string(controller_string_wish_s, cache->buffer_item, controller_string_wish_length, cache->content_actions.array[i].array[1]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(controller_wish_s, cache->buffer_item, controller_wish_s_length, cache->content_actions.array[i].array[1]) == F_equal_to) { setting_values = &rule->ons.array[j].wish; } else { @@ -5480,7 +5480,7 @@ extern "C" { fl_print_format("%c%[%SRule setting's second value has '%]", global.main->error.to.stream, f_string_eol_s[0], global.main->error.context, global.main->error.prefix, global.main->error.context); fl_print_format("%[%/Q%]", global.main->error.to.stream, global.main->error.notable, cache->buffer_item, cache->content_actions.array[i].array[1], global.main->error.notable); - fl_print_format("%[' but only supports %s, %s, and %s.%]%c", global.main->error.to.stream, global.main->error.context, controller_string_need_s, controller_string_want_s, controller_string_wish_s, global.main->error.context, f_string_eol_s[0]); + fl_print_format("%[' but only supports %s, %s, and %s.%]%c", global.main->error.to.stream, global.main->error.context, controller_need_s, controller_want_s, controller_wish_s, global.main->error.context, f_string_eol_s[0]); controller_rule_error_print_cache(global.main->error, cache->action, F_false); @@ -5494,7 +5494,7 @@ extern "C" { continue; } - status = f_string_dynamics_increase_by(controller_common_allocation_small, setting_values); + status = f_string_dynamics_increase_by(controller_common_allocation_small_d, setting_values); if (F_status_is_error(status)) { controller_rule_error_print(global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamics_increase_by", F_true, F_false, global.thread); @@ -5598,7 +5598,7 @@ extern "C" { if (global.main->error.verbosity == f_console_verbosity_debug || (global.main->error.verbosity == f_console_verbosity_verbose && global.main->parameters[controller_parameter_simulate].result == f_console_result_found)) { controller_print_lock(global.main->output.to, global.thread); - fl_print_format("%cProcessing rule item action '%[%S%]', adding ", global.main->output.to.stream, f_string_eol_s[0], global.main->context.set.title, controller_string_on_s, global.main->context.set.title); + fl_print_format("%cProcessing rule item action '%[%S%]', adding ", global.main->output.to.stream, f_string_eol_s[0], global.main->context.set.title, controller_on_s, global.main->context.set.title); fl_print_format("'%[%/Q%]' of ", global.main->output.to.stream, global.main->context.set.notable, cache->buffer_item, cache->content_actions.array[i].array[1], global.main->context.set.notable); fl_print_format("'%[%/Q%]/", global.main->output.to.stream, global.main->context.set.important, cache->buffer_item, cache->content_actions.array[i].array[2], global.main->context.set.important); fl_print_format("%[%/Q%]'.%c", global.main->output.to.stream, global.main->context.set.important, cache->buffer_item, cache->content_actions.array[i].array[3], global.main->context.set.important, f_string_eol_s[0]); @@ -5779,19 +5779,19 @@ extern "C" { fl_print_format("%cRule '", main->output.to.stream, f_string_eol_s[0]); fl_print_format("%[%Q%]' has no '", main->output.to.stream, main->context.set.title, rule.name, main->context.set.title); fl_print_format("%[%q%]' action to execute and would '", main->output.to.stream, main->context.set.title, controller_rule_action_type_name(action), main->context.set.title); - fl_print_format("%[%s%]' because it is '", main->output.to.stream, main->context.set.important, options & controller_process_option_require ? controller_string_fail_s : controller_string_succeed_s, main->context.set.important); - fl_print_format("%[%s%]'.%c", main->output.to.stream, main->context.set.important, options & controller_process_option_require ? controller_string_required_s : controller_string_optional_s, main->context.set.important, f_string_eol_s[0]); + fl_print_format("%[%s%]' because it is '", main->output.to.stream, main->context.set.important, options & controller_process_option_require_d ? controller_fail_s : controller_succeed_s, main->context.set.important); + fl_print_format("%[%s%]'.%c", main->output.to.stream, main->context.set.important, options & controller_process_option_require_d ? controller_required_s : controller_optional_s, main->context.set.important, f_string_eol_s[0]); } else { fl_print_format("%cRule '", main->output.to.stream, f_string_eol_s[0]); fl_print_format("%[%Q%]' has no known '", main->output.to.stream, main->context.set.title, rule.name, main->context.set.title); - fl_print_format("%[%s %s%]' (such as ", main->output.to.stream, main->context.set.title, controller_string_rule_s, controller_string_type_s, main->context.set.title); - fl_print_format("'%[%s%]', ", main->output.to.stream, main->context.set.title, controller_string_command_s, main->context.set.title); - fl_print_format("'%[%s%]', ", main->output.to.stream, main->context.set.title, controller_string_service_s, main->context.set.title); - fl_print_format("'%[%s%]', or ", main->output.to.stream, main->context.set.title, controller_string_script_s, main->context.set.title); - fl_print_format("'%[%s%]'", main->output.to.stream, main->context.set.title, controller_string_utility_s, main->context.set.title); - fl_print_format(") and would '%[%s%]' because it is '", main->output.to.stream, main->context.set.important, options & controller_process_option_require ? controller_string_fail_s : controller_string_succeed_s, main->context.set.important); - fl_print_format("%[%s%]'.%c", main->output.to.stream, main->context.set.important, options & controller_process_option_require ? controller_string_required_s : controller_string_optional_s, main->context.set.important, f_string_eol_s[0]); + fl_print_format("%[%s %s%]' (such as ", main->output.to.stream, main->context.set.title, controller_rule_s, controller_type_s, main->context.set.title); + fl_print_format("'%[%s%]', ", main->output.to.stream, main->context.set.title, controller_command_s, main->context.set.title); + fl_print_format("'%[%s%]', ", main->output.to.stream, main->context.set.title, controller_service_s, main->context.set.title); + fl_print_format("'%[%s%]', or ", main->output.to.stream, main->context.set.title, controller_script_s, main->context.set.title); + fl_print_format("'%[%s%]'", main->output.to.stream, main->context.set.title, controller_utility_s, main->context.set.title); + fl_print_format(") and would '%[%s%]' because it is '", main->output.to.stream, main->context.set.important, options & controller_process_option_require_d ? controller_fail_s : controller_succeed_s, main->context.set.important); + fl_print_format("%[%s%]'.%c", main->output.to.stream, main->context.set.important, options & controller_process_option_require_d ? controller_required_s : controller_optional_s, main->context.set.important, f_string_eol_s[0]); } controller_print_unlock_flush(main->output.to, global.thread); @@ -5801,10 +5801,10 @@ extern "C" { controller_print_lock(main->output.to, global.thread); fl_print_format("%cRule %[%Q%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.title, rule.alias, main->context.set.title, f_string_eol_s[0]); - fl_print_format(" %[%s%] %Q%c", main->output.to.stream, main->context.set.important, controller_string_name_s, main->context.set.important, rule.name, f_string_eol_s[0]); - fl_print_format(" %[%s%] %s%c", main->output.to.stream, main->context.set.important, controller_string_how_s, main->context.set.important, options & controller_process_option_asynchronous ? controller_string_asynchronous_s : controller_string_synchronous_s, f_string_eol_s[0]); - fl_print_format(" %[%s%] %s%c", main->output.to.stream, main->context.set.important, controller_string_wait_s, main->context.set.important, options & controller_process_option_wait ? controller_string_yes_s : controller_string_no_s, f_string_eol_s[0]); - fl_print_format(" %[%s%] ", main->output.to.stream, main->context.set.important, controller_string_capability_s, main->context.set.important); + fl_print_format(" %[%s%] %Q%c", main->output.to.stream, main->context.set.important, controller_name_s, main->context.set.important, rule.name, f_string_eol_s[0]); + fl_print_format(" %[%s%] %s%c", main->output.to.stream, main->context.set.important, controller_how_s, main->context.set.important, options & controller_process_option_asynchronous_d ? controller_asynchronous_s : controller_synchronous_s, f_string_eol_s[0]); + fl_print_format(" %[%s%] %s%c", main->output.to.stream, main->context.set.important, controller_wait_s, main->context.set.important, options & controller_process_option_wait_d ? controller_yes_s : controller_no_s, f_string_eol_s[0]); + fl_print_format(" %[%s%] ", main->output.to.stream, main->context.set.important, controller_capability_s, main->context.set.important); if (f_capability_supported()) { if (rule.capability) { @@ -5818,13 +5818,13 @@ extern "C" { f_print_terminated(f_string_eol_s, main->output.to.stream); } else { - fl_print_format("%[(unsupported)%]%c", main->output.to.stream, main->context.set.warning, controller_string_capability_s, main->context.set.warning, f_string_eol_s[0]); + fl_print_format("%[(unsupported)%]%c", main->output.to.stream, main->context.set.warning, controller_capability_s, main->context.set.warning, f_string_eol_s[0]); } - fl_print_format(" %[%s%]", main->output.to.stream, main->context.set.important, controller_string_control_group_s, main->context.set.important); + fl_print_format(" %[%s%]", main->output.to.stream, main->context.set.important, controller_control_group_s, main->context.set.important); - if (rule.has & controller_rule_has_control_group) { - fl_print_format(" %s", main->output.to.stream, rule.control_group.as_new ? controller_string_new_s : controller_string_existing_s); + if (rule.has & controller_rule_has_control_group_d) { + fl_print_format(" %s", main->output.to.stream, rule.control_group.as_new ? controller_new_s : controller_existing_s); for (i = 0; i < rule.control_group.groups.used; ++i) { @@ -5834,53 +5834,53 @@ extern "C" { } // for } - fl_print_format("%c %[%s%]", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_nice_s, main->context.set.important); + fl_print_format("%c %[%s%]", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_nice_s, main->context.set.important); - if (rule.has & controller_rule_has_nice) { + if (rule.has & controller_rule_has_nice_d) { fl_print_format(" %i", main->output.to.stream, rule.nice); } - fl_print_format("%c %[%s%]", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_scheduler_s, main->context.set.important); + fl_print_format("%c %[%s%]", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_scheduler_s, main->context.set.important); - if (rule.has & controller_rule_has_scheduler) { + if (rule.has & controller_rule_has_scheduler_d) { f_string_t policy = ""; if (rule.scheduler.policy == SCHED_BATCH) { - policy = controller_string_batch_s; + policy = controller_batch_s; } else if (rule.scheduler.policy == SCHED_DEADLINE) { - policy = controller_string_deadline_s; + policy = controller_deadline_s; } else if (rule.scheduler.policy == SCHED_FIFO) { - policy = controller_string_fifo_s; + policy = controller_fifo_s; } else if (rule.scheduler.policy == SCHED_IDLE) { - policy = controller_string_idle_s; + policy = controller_idle_s; } else if (rule.scheduler.policy == SCHED_OTHER) { - policy = controller_string_other_s; + policy = controller_other_s; } else if (rule.scheduler.policy == SCHED_RR) { - policy = controller_string_round_robin_s; + policy = controller_round_robin_s; } fl_print_format(" %s %i", main->output.to.stream, policy, rule.scheduler.priority); } - fl_print_format("%c %[%s%] %Q%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_script_s, main->context.set.important, rule.script, f_string_eol_s[0]); - fl_print_format(" %[%s%]", main->output.to.stream, main->context.set.important, controller_string_user_s, main->context.set.important); + fl_print_format("%c %[%s%] %Q%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_script_s, main->context.set.important, rule.script, f_string_eol_s[0]); + fl_print_format(" %[%s%]", main->output.to.stream, main->context.set.important, controller_user_s, main->context.set.important); - if (rule.has & controller_rule_has_user) { + if (rule.has & controller_rule_has_user_d) { fl_print_format(" %i", main->output.to.stream, rule.user); } - fl_print_format("%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_affinity_s, main->context.set.important, f_string_eol_s[0]); + fl_print_format("%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_affinity_s, main->context.set.important, f_string_eol_s[0]); for (i = 0; i < rule.affinity.used; ++i) { fl_print_format(" %i%c", main->output.to.stream, rule.affinity.array[i], f_string_eol_s[0]); } // for - fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_define_s, main->context.set.important, f_string_eol_s[0]); + fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_define_s, main->context.set.important, f_string_eol_s[0]); for (i = 0; i < rule.define.used; ++i) { @@ -5889,7 +5889,7 @@ extern "C" { } } // for - fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_environment_s, main->context.set.important, f_string_eol_s[0]); + fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_environment_s, main->context.set.important, f_string_eol_s[0]); for (i = 0; i < rule.environment.used; ++i) { @@ -5898,7 +5898,7 @@ extern "C" { } } // for - fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_parameter_s, main->context.set.important, f_string_eol_s[0]); + fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_parameter_s, main->context.set.important, f_string_eol_s[0]); for (i = 0; i < rule.parameter.used; ++i) { @@ -5907,9 +5907,9 @@ extern "C" { } } // for - fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_group_s, main->context.set.important, f_string_eol_s[0]); + fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_group_s, main->context.set.important, f_string_eol_s[0]); - if (rule.has & controller_rule_has_group) { + if (rule.has & controller_rule_has_group_d) { fl_print_format(" %i%c", main->output.to.stream, rule.group, f_string_eol_s[0]); for (i = 0; i < rule.groups.used; ++i) { @@ -5917,53 +5917,53 @@ extern "C" { } // for } - fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_limit_s, main->context.set.important, f_string_eol_s[0]); + fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_limit_s, main->context.set.important, f_string_eol_s[0]); for (i = 0; i < rule.limits.used; ++i) { fl_print_format(" %Q %[=%] %un %un%c", main->output.to.stream, controller_rule_setting_limit_type_name(rule.limits.array[i].type), main->context.set.important, main->context.set.important, rule.limits.array[i].value.rlim_cur, rule.limits.array[i].value.rlim_max, f_string_eol_s[0]); } // for - fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_on_s, main->context.set.important, f_string_eol_s[0]); + fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_on_s, main->context.set.important, f_string_eol_s[0]); for (i = 0; i < rule.ons.used; ++i) { - fl_print_format(" %[%s%] {%c", main->output.to.stream, main->context.set.important, controller_string_action_s, main->context.set.important, f_string_eol_s[0]); + fl_print_format(" %[%s%] {%c", main->output.to.stream, main->context.set.important, controller_action_s, main->context.set.important, f_string_eol_s[0]); { f_string_t action = ""; if (rule.ons.array[i].action == controller_rule_action_type_freeze) { - action = controller_string_freeze_s; + action = controller_freeze_s; } else if (rule.ons.array[i].action == controller_rule_action_type_kill) { - action = controller_string_kill_s; + action = controller_kill_s; } else if (rule.ons.array[i].action == controller_rule_action_type_pause) { - action = controller_string_pause_s; + action = controller_pause_s; } else if (rule.ons.array[i].action == controller_rule_action_type_reload) { - action = controller_string_reload_s; + action = controller_reload_s; } else if (rule.ons.array[i].action == controller_rule_action_type_restart) { - action = controller_string_restart_s; + action = controller_restart_s; } else if (rule.ons.array[i].action == controller_rule_action_type_resume) { - action = controller_string_resume_s; + action = controller_resume_s; } else if (rule.ons.array[i].action == controller_rule_action_type_start) { - action = controller_string_start_s; + action = controller_start_s; } else if (rule.ons.array[i].action == controller_rule_action_type_stop) { - action = controller_string_stop_s; + action = controller_stop_s; } else if (rule.ons.array[i].action == controller_rule_action_type_thaw) { - action = controller_string_thaw_s; + action = controller_thaw_s; } - fl_print_format(" %[%s%] %s%c", main->output.to.stream, main->context.set.important, controller_string_type_s, main->context.set.important, action, f_string_eol_s[0]); + fl_print_format(" %[%s%] %s%c", main->output.to.stream, main->context.set.important, controller_type_s, main->context.set.important, action, f_string_eol_s[0]); } - fl_print_format(" %[%s%] {%c", main->output.to.stream, main->context.set.important, controller_string_need_s, main->context.set.important, f_string_eol_s[0]); + fl_print_format(" %[%s%] {%c", main->output.to.stream, main->context.set.important, controller_need_s, main->context.set.important, f_string_eol_s[0]); for (j = 0; j < rule.ons.array[i].need.used; ++j) { @@ -5972,7 +5972,7 @@ extern "C" { } } // for - fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_want_s, main->context.set.important, f_string_eol_s[0]); + fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_want_s, main->context.set.important, f_string_eol_s[0]); for (j = 0; j < rule.ons.array[i].want.used; ++j) { @@ -5981,7 +5981,7 @@ extern "C" { } } // for - fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_wish_s, main->context.set.important, f_string_eol_s[0]); + fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_wish_s, main->context.set.important, f_string_eol_s[0]); for (j = 0; j < rule.ons.array[i].wish.used; ++j) { @@ -6008,17 +6008,17 @@ extern "C" { item = &rule.items.array[i]; - fl_print_format(" %[%s%] {%c", main->output.to.stream, main->context.set.important, controller_string_item_s, main->context.set.important, f_string_eol_s[0]); - fl_print_format(" %[%s%] %Q%c", main->output.to.stream, main->context.set.important, controller_string_type_s, main->context.set.important, controller_rule_item_type_name(item->type), f_string_eol_s[0]); + fl_print_format(" %[%s%] {%c", main->output.to.stream, main->context.set.important, controller_item_s, main->context.set.important, f_string_eol_s[0]); + fl_print_format(" %[%s%] %Q%c", main->output.to.stream, main->context.set.important, controller_type_s, main->context.set.important, controller_rule_item_type_name(item->type), f_string_eol_s[0]); - fl_print_format(" %[%s%] {%c", main->output.to.stream, main->context.set.important, controller_string_rerun_s, main->context.set.important, f_string_eol_s[0]); + fl_print_format(" %[%s%] {%c", main->output.to.stream, main->context.set.important, controller_rerun_s, main->context.set.important, f_string_eol_s[0]); for (j = 0; j < controller_rule_action_type_execute__enum_size; ++j) { for (k = 0; k < 2; ++k) { - if (!k && (item->reruns[j].is & controller_rule_rerun_is_failure)) { + if (!k && (item->reruns[j].is & controller_rule_rerun_is_failure_d)) { rerun_item = &item->reruns[j].failure; } - else if (k && (item->reruns[j].is & controller_rule_rerun_is_success)) { + else if (k && (item->reruns[j].is & controller_rule_rerun_is_success_d)) { rerun_item = &item->reruns[j].success; } else { @@ -6029,50 +6029,50 @@ extern "C" { fl_print_format(" %[", main->output.to.stream, main->context.set.important); switch (j) { case controller_rule_action_type_execute_freeze: - f_print_terminated(controller_string_freeze_s, main->output.to.stream); + f_print_terminated(controller_freeze_s, main->output.to.stream); break; case controller_rule_action_type_execute_kill: - f_print_terminated(controller_string_kill_s, main->output.to.stream); + f_print_terminated(controller_kill_s, main->output.to.stream); break; case controller_rule_action_type_execute_pause: - f_print_terminated(controller_string_pause_s, main->output.to.stream); + f_print_terminated(controller_pause_s, main->output.to.stream); break; case controller_rule_action_type_execute_reload: - f_print_terminated(controller_string_reload_s, main->output.to.stream); + f_print_terminated(controller_reload_s, main->output.to.stream); break; case controller_rule_action_type_execute_restart: - f_print_terminated(controller_string_restart_s, main->output.to.stream); + f_print_terminated(controller_restart_s, main->output.to.stream); break; case controller_rule_action_type_execute_resume: - f_print_terminated(controller_string_resume_s, main->output.to.stream); + f_print_terminated(controller_resume_s, main->output.to.stream); break; case controller_rule_action_type_execute_start: - f_print_terminated(controller_string_start_s, main->output.to.stream); + f_print_terminated(controller_start_s, main->output.to.stream); break; case controller_rule_action_type_execute_stop: - f_print_terminated(controller_string_stop_s, main->output.to.stream); + f_print_terminated(controller_stop_s, main->output.to.stream); break; case controller_rule_action_type_execute_thaw: - f_print_terminated(controller_string_thaw_s, main->output.to.stream); + f_print_terminated(controller_thaw_s, main->output.to.stream); break; default: break; } - fl_print_format("%] %s", main->output.to.stream, main->context.set.important, k ? controller_string_success_s : controller_string_failure_s); - fl_print_format(" %s %ul %s %ul", main->output.to.stream, controller_string_delay_s, rerun_item->delay, controller_string_max_s, rerun_item->max); + fl_print_format("%] %s", main->output.to.stream, main->context.set.important, k ? controller_success_s : controller_failure_s); + fl_print_format(" %s %ul %s %ul", main->output.to.stream, controller_delay_s, rerun_item->delay, controller_max_s, rerun_item->max); - if (!k && (item->reruns[j].is & controller_rule_rerun_is_failure_reset) || k && (item->reruns[j].is & controller_rule_rerun_is_success_reset)) { - fl_print_format(" %s", main->output.to.stream, controller_string_reset_s); + if (!k && (item->reruns[j].is & controller_rule_rerun_is_failure_reset_d) || k && (item->reruns[j].is & controller_rule_rerun_is_success_reset_d)) { + fl_print_format(" %s", main->output.to.stream, controller_reset_s); } f_print_terminated(f_string_eol_s, main->output.to.stream); @@ -6080,15 +6080,15 @@ extern "C" { } // for fl_print_format(" }%c", main->output.to.stream, f_string_eol_s[0]); - fl_print_format(" %[%s%]", main->output.to.stream, main->context.set.important, controller_string_pid_file_s, main->context.set.important); + fl_print_format(" %[%s%]", main->output.to.stream, main->context.set.important, controller_pid_file_s, main->context.set.important); if (item->pid_file.used) { fl_print_format(" %Q", main->output.to.stream, item->pid_file); } f_print_terminated(f_string_eol_s, main->output.to.stream); - fl_print_format(" %[%s%]", main->output.to.stream, main->context.set.important, controller_string_with_s, main->context.set.important); - if (item->with & controller_with_full_path) { - fl_print_format(" %s", main->output.to.stream, controller_string_full_path_s); + fl_print_format(" %[%s%]", main->output.to.stream, main->context.set.important, controller_with_s, main->context.set.important); + if (item->with & controller_with_full_path_d) { + fl_print_format(" %s", main->output.to.stream, controller_full_path_s); } f_print_terminated(f_string_eol_s, main->output.to.stream); @@ -6096,11 +6096,11 @@ extern "C" { action = &item->actions.array[j]; - fl_print_format(" %[%s%] {%c", main->output.to.stream, main->context.set.important, controller_string_action_s, main->context.set.important, f_string_eol_s[0]); - fl_print_format(" %[%s%] %q%c", main->output.to.stream, main->context.set.important, controller_string_type_s, main->context.set.important, controller_rule_action_type_name(action->type), f_string_eol_s[0]); + fl_print_format(" %[%s%] {%c", main->output.to.stream, main->context.set.important, controller_action_s, main->context.set.important, f_string_eol_s[0]); + fl_print_format(" %[%s%] %q%c", main->output.to.stream, main->context.set.important, controller_type_s, main->context.set.important, controller_rule_action_type_name(action->type), f_string_eol_s[0]); if (item->type == controller_rule_item_type_script || item->type == controller_rule_item_type_utility) { - fl_print_format(" %[%s%] {%c", main->output.to.stream, main->context.set.important, controller_string_parameter_s, main->context.set.important, f_string_eol_s[0]); + fl_print_format(" %[%s%] {%c", main->output.to.stream, main->context.set.important, controller_parameter_s, main->context.set.important, f_string_eol_s[0]); parameter = &action->parameters.array[0]; @@ -6109,7 +6109,7 @@ extern "C" { for (k = 0; k < parameter->used; ++k) { - if (parameter->string[k] == f_fss_eol) { + if (parameter->string[k] == f_fss_eol_s[0]) { if (k + 1 < parameter->used) { f_print_terminated(f_string_eol_s, main->output.to.stream); f_print_terminated(" ", main->output.to.stream); @@ -6127,7 +6127,7 @@ extern "C" { } else { for (k = 0; k < action->parameters.used; ++k) { - fl_print_format(" %[%s%] %Q%c", main->output.to.stream, main->context.set.important, controller_string_parameter_s, main->context.set.important, action->parameters.array[k], f_string_eol_s[0]); + fl_print_format(" %[%s%] %Q%c", main->output.to.stream, main->context.set.important, controller_parameter_s, main->context.set.important, action->parameters.array[k], f_string_eol_s[0]); } // for } @@ -6289,7 +6289,7 @@ extern "C" { } if (required) { - if (!(process_list[i]->options & controller_process_option_require)) { + if (!(process_list[i]->options & controller_process_option_require_d)) { f_thread_unlock(&process_list[i]->lock); f_thread_unlock(&process_list[i]->active); @@ -6359,7 +6359,7 @@ extern "C" { if (status_lock == F_signal || F_status_is_error(status_lock)) break; } - if (required && (process_list[i]->options & controller_process_option_require)) { + if (required && (process_list[i]->options & controller_process_option_require_d)) { if (controller_rule_status_is_error(process_list[i]->action, process_list[i]->rule)) { status = F_status_set_error(F_require); @@ -6406,7 +6406,7 @@ extern "C" { break; } - if ((process_list[i]->options & controller_process_option_require)) { + if ((process_list[i]->options & controller_process_option_require_d)) { f_thread_unlock(&process_list[i]->lock); if (controller_rule_status_is_error(process_list[i]->action, process_list[i]->rule)) { diff --git a/level_3/controller/c/private-rule.h b/level_3/controller/c/private-rule.h index cb5ea03..16e729c 100644 --- a/level_3/controller/c/private-rule.h +++ b/level_3/controller/c/private-rule.h @@ -23,7 +23,7 @@ extern "C" { * The string with used == 0 if no match was found. */ #ifndef _di_controller_rule_action_method_name_ - extern f_string_static_t controller_rule_action_method_name(const uint8_t type) f_attribute_visibility_internal; + extern f_string_static_t controller_rule_action_method_name(const uint8_t type) F_attribute_visibility_internal_d; #endif // _di_controller_rule_action_method_name_ /** @@ -43,7 +43,7 @@ extern "C" { * F_false on success and rule was not found. */ #ifndef _di_controller_rule_find_ - extern f_status_t controller_rule_find(const f_string_static_t alias, const controller_rules_t rules, f_array_length_t *at) f_attribute_visibility_internal; + extern f_status_t controller_rule_find(const f_string_static_t alias, const controller_rules_t rules, f_array_length_t *at) F_attribute_visibility_internal_d; #endif // _di_controller_rule_find_ /** @@ -76,7 +76,7 @@ extern "C" { * @see f_string_dynamics_increase() */ #ifndef _di_controller_rule_parameters_read_ - extern f_status_t controller_rule_parameters_read(const controller_global_t global, const f_string_static_t buffer, f_fss_object_t *object, f_fss_content_t *content, f_string_dynamics_t *parameters) f_attribute_visibility_internal; + extern f_status_t controller_rule_parameters_read(const controller_global_t global, const f_string_static_t buffer, f_fss_object_t *object, f_fss_content_t *content, f_string_dynamics_t *parameters) F_attribute_visibility_internal_d; #endif // _di_controller_rule_parameters_read_ /** @@ -92,7 +92,7 @@ extern "C" { * */ #ifndef _di_controller_rule_action_type_to_action_execute_type_ - extern uint8_t controller_rule_action_type_to_action_execute_type(const uint8_t type) f_attribute_visibility_internal; + extern uint8_t controller_rule_action_type_to_action_execute_type(const uint8_t type) F_attribute_visibility_internal_d; #endif // _di_controller_rule_action_type_to_action_execute_type_ /** @@ -106,7 +106,7 @@ extern "C" { * The string with used == 0 if no match was found. */ #ifndef _di_controller_rule_action_type_name_ - extern f_string_static_t controller_rule_action_type_name(const uint8_t type) f_attribute_visibility_internal; + extern f_string_static_t controller_rule_action_type_name(const uint8_t type) F_attribute_visibility_internal_d; #endif // _di_controller_rule_action_type_name_ /** @@ -120,7 +120,7 @@ extern "C" { * The string with used == 0 if no match was found. */ #ifndef _di_controller_rule_action_type_execute_name_ - extern f_string_static_t controller_rule_action_type_execute_name(const uint8_t type) f_attribute_visibility_internal; + extern f_string_static_t controller_rule_action_type_execute_name(const uint8_t type) F_attribute_visibility_internal_d; #endif // _di_controller_rule_action_type_execute_name_ /** @@ -140,7 +140,7 @@ extern "C" { * Errors (with error bit) from: f_memory_resize(). */ #ifndef _di_controller_rule_actions_increase_by_ - extern f_status_t controller_rule_actions_increase_by(const f_array_length_t amount, controller_rule_actions_t *actions) f_attribute_visibility_internal; + extern f_status_t controller_rule_actions_increase_by(const f_array_length_t amount, controller_rule_actions_t *actions) F_attribute_visibility_internal_d; #endif // _di_controller_rule_actions_increase_by_ /** @@ -179,7 +179,7 @@ extern "C" { * @see f_fss_count_lines() */ #ifndef _di_controller_rule_action_read_ - extern f_status_t controller_rule_action_read(const bool is_normal, const controller_global_t global, const uint8_t type, const uint8_t method, controller_cache_t *cache, controller_rule_item_t *item, controller_rule_actions_t *actions, f_string_range_t *range) f_attribute_visibility_internal; + extern f_status_t controller_rule_action_read(const bool is_normal, const controller_global_t global, const uint8_t type, const uint8_t method, controller_cache_t *cache, controller_rule_item_t *item, controller_rule_actions_t *actions, f_string_range_t *range) F_attribute_visibility_internal_d; #endif // _di_controller_rule_action_read_ /** @@ -212,7 +212,7 @@ extern "C" { * @see f_type_int32s_append() */ #ifndef _di_controller_rule_copy_ - extern f_status_t controller_rule_copy(const controller_rule_t source, controller_rule_t *destination) f_attribute_visibility_internal; + extern f_status_t controller_rule_copy(const controller_rule_t source, controller_rule_t *destination) F_attribute_visibility_internal_d; #endif // _di_controller_rule_copy_ /** @@ -242,7 +242,7 @@ extern "C" { * @see controller_entry_error_print_cache() */ #ifndef _di_controller_rule_error_print_ - extern void controller_rule_error_print(const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const f_string_t function, const bool fallback, const bool item, controller_thread_t *thread) f_attribute_visibility_internal; + extern void controller_rule_error_print(const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const f_string_t function, const bool fallback, const bool item, controller_thread_t *thread) F_attribute_visibility_internal_d; #endif // _di_controller_rule_error_print_ /** @@ -267,7 +267,7 @@ extern "C" { * @see controller_rule_setting_read() */ #ifndef _di_controller_rule_error_print_cache_ - extern void controller_rule_error_print_cache(const fl_print_t print, const controller_cache_action_t cache, const bool item) f_attribute_visibility_internal; + extern void controller_rule_error_print_cache(const fl_print_t print, const controller_cache_action_t cache, const bool item) F_attribute_visibility_internal_d; #endif // _di_controller_rule_error_print_cache_ /** @@ -290,7 +290,7 @@ extern "C" { * @see controller_rule_error_print_cache() */ #ifndef _di_controller_rule_item_error_print_ - extern void controller_rule_item_error_print(const fl_print_t print, const controller_cache_action_t cache, const bool item, const f_status_t status, controller_thread_t *thread) f_attribute_visibility_internal; + extern void controller_rule_item_error_print(const fl_print_t print, const controller_cache_action_t cache, const bool item, const f_status_t status, controller_thread_t *thread) F_attribute_visibility_internal_d; #endif // _di_controller_rule_item_error_print_ /** @@ -309,7 +309,7 @@ extern "C" { * The process to use. */ #ifndef _di_controller_rule_item_error_print_execute_ - extern void controller_rule_item_error_print_execute(const bool script_is, const f_string_t name, const f_status_t status, controller_process_t * const process) f_attribute_visibility_internal; + extern void controller_rule_item_error_print_execute(const bool script_is, const f_string_t name, const f_status_t status, controller_process_t * const process) F_attribute_visibility_internal_d; #endif // _di_controller_rule_item_error_print_execute_ /** @@ -326,7 +326,7 @@ extern "C" { * A short explanation on why this is an error or warning. */ #ifndef _di_controller_rule_item_error_print_need_want_wish_ - extern void controller_rule_item_error_print_need_want_wish(const fl_print_t print, const f_string_t need_want_wish, const f_string_t value, const f_string_t why) f_attribute_visibility_internal; + extern void controller_rule_item_error_print_need_want_wish(const fl_print_t print, const f_string_t need_want_wish, const f_string_t value, const f_string_t why) F_attribute_visibility_internal_d; #endif // _di_controller_rule_item_error_print_need_want_wish_ /** @@ -338,7 +338,7 @@ extern "C" { * The rule alias of the rule that is not loaded. */ #ifndef _di_controller_rule_item_error_print_rule_not_loaded_ - extern void controller_rule_item_error_print_rule_not_loaded(const fl_print_t print, const f_string_t alias) f_attribute_visibility_internal; + extern void controller_rule_item_error_print_rule_not_loaded(const fl_print_t print, const f_string_t alias) F_attribute_visibility_internal_d; #endif // _di_controller_rule_item_error_print_rule_not_loaded_ /** @@ -350,7 +350,7 @@ extern "C" { * The rule alias of the rule that is missing the pid file designation. */ #ifndef _di_controller_rule_action_error_missing_pid_ - extern void controller_rule_action_error_missing_pid(const fl_print_t print, const f_string_t alias) f_attribute_visibility_internal; + extern void controller_rule_action_error_missing_pid(const fl_print_t print, const f_string_t alias) F_attribute_visibility_internal_d; #endif // _di_controller_rule_action_error_missing_pid_ /** @@ -371,7 +371,7 @@ extern "C" { * - controller_rule_action_type_stop * @param options * Process options to consider when executing. - * If bit controller_process_option_simulate, then the rule execution is in simulation mode (printing a message that the rule would be executed but does not execute the rule). + * If bit controller_process_option_simulate_d, then the rule execution is in simulation mode (printing a message that the rule would be executed but does not execute the rule). * @param global * The global data. * @param process @@ -391,7 +391,7 @@ extern "C" { * On failure, the individual status for the rule is set to an appropriate error status. */ #ifndef _di_controller_rule_execute_ - extern f_status_t controller_rule_execute(const uint8_t action, const uint8_t options, const controller_global_t global, controller_process_t *process) f_attribute_visibility_internal; + extern f_status_t controller_rule_execute(const uint8_t action, const uint8_t options, const controller_global_t global, controller_process_t *process) F_attribute_visibility_internal_d; #endif // _di_controller_rule_execute_ /** @@ -407,7 +407,7 @@ extern "C" { * The arguments to pass to the program. * @param options * Process options to consider when executing. - * If bit controller_process_option_simulate, then the rule execution is in simulation mode (printing a message that the rule would be executed but does not execute the rule). + * If bit controller_process_option_simulate_d, then the rule execution is in simulation mode (printing a message that the rule would be executed but does not execute the rule). * @param execute_set * The execute parameter and as settings. * @param process @@ -425,7 +425,7 @@ extern "C" { * @see fll_execute_program() */ #ifndef _di_controller_rule_execute_foreground_ - extern f_status_t controller_rule_execute_foreground(const uint8_t type, const f_string_t program, const f_string_statics_t arguments, const uint8_t options, controller_execute_set_t * const execute_set, controller_process_t *process) f_attribute_visibility_internal; + extern f_status_t controller_rule_execute_foreground(const uint8_t type, const f_string_t program, const f_string_statics_t arguments, const uint8_t options, controller_execute_set_t * const execute_set, controller_process_t *process) F_attribute_visibility_internal_d; #endif // _di_controller_rule_execute_foreground_ /** @@ -446,7 +446,7 @@ extern "C" { * The arguments to pass to the program. * @param options * Process options to consider when executing. - * If bit controller_process_option_simulate, then the rule execution is in simulation mode (printing a message that the rule would be executed but does not execute the rule). + * If bit controller_process_option_simulate_d, then the rule execution is in simulation mode (printing a message that the rule would be executed but does not execute the rule). * @param with * The "with" option flags. * @param execute_set @@ -467,7 +467,7 @@ extern "C" { * @see fll_execute_program() */ #ifndef _di_controller_rule_execute_pid_with_ - extern f_status_t controller_rule_execute_pid_with(const f_string_dynamic_t pid_file, const uint8_t type, const f_string_t program, const f_string_statics_t arguments, const uint8_t options, const uint8_t with, controller_execute_set_t * const execute_set, controller_process_t *process) f_attribute_visibility_internal; + extern f_status_t controller_rule_execute_pid_with(const f_string_dynamic_t pid_file, const uint8_t type, const f_string_t program, const f_string_statics_t arguments, const uint8_t options, const uint8_t with, controller_execute_set_t * const execute_set, controller_process_t *process) F_attribute_visibility_internal_d; #endif // _di_controller_rule_execute_pid_with_ /** @@ -490,7 +490,7 @@ extern "C" { * -2 to designate exit due to signal/disabled thread. */ #ifndef _di_controller_rule_execute_rerun_ - extern int8_t controller_rule_execute_rerun(const uint8_t action, controller_process_t *process, controller_rule_item_t *item) f_attribute_visibility_internal; + extern int8_t controller_rule_execute_rerun(const uint8_t action, controller_process_t *process, controller_rule_item_t *item) F_attribute_visibility_internal_d; #endif // _di_controller_rule_execute_rerun_ /** @@ -518,7 +518,7 @@ extern "C" { * @see f_string_dynamic_terminate_after() */ #ifndef _di_controller_rule_id_construct_ - extern f_status_t controller_rule_id_construct(const controller_global_t global, const f_string_static_t source, const f_string_range_t directory, const f_string_range_t basename, f_string_dynamic_t *alias) f_attribute_visibility_internal; + extern f_status_t controller_rule_id_construct(const controller_global_t global, const f_string_static_t source, const f_string_range_t directory, const f_string_range_t basename, f_string_dynamic_t *alias) F_attribute_visibility_internal_d; #endif // _di_controller_rule_id_construct_ /** @@ -536,7 +536,7 @@ extern "C" { * F_false on unavailable. */ #ifndef _di_controller_rule_status_is_available_ - extern f_status_t controller_rule_status_is_available(const uint8_t action, const controller_rule_t rule) f_attribute_visibility_internal; + extern f_status_t controller_rule_status_is_available(const uint8_t action, const controller_rule_t rule) F_attribute_visibility_internal_d; #endif // _di_controller_rule_status_is_available_ /** @@ -554,7 +554,7 @@ extern "C" { * F_false if status does not represent an error. */ #ifndef _di_controller_rule_status_is_error_ - extern f_status_t controller_rule_status_is_error(const uint8_t action, const controller_rule_t rule) f_attribute_visibility_internal; + extern f_status_t controller_rule_status_is_error(const uint8_t action, const controller_rule_t rule) F_attribute_visibility_internal_d; #endif // _di_controller_rule_status_is_error_ /** @@ -586,7 +586,7 @@ extern "C" { * @see f_string_dynamic_terminate_after() */ #ifndef _di_controller_rule_item_read_ - extern f_status_t controller_rule_item_read(const bool is_normal, const controller_global_t global, controller_cache_t *cache, controller_rule_item_t *item) f_attribute_visibility_internal; + extern f_status_t controller_rule_item_read(const bool is_normal, const controller_global_t global, controller_cache_t *cache, controller_rule_item_t *item) F_attribute_visibility_internal_d; #endif // _di_controller_rule_item_read_ /** @@ -600,7 +600,7 @@ extern "C" { * The string with used == 0 if no match was found. */ #ifndef _di_controller_rule_item_type_name_ - extern f_string_static_t controller_rule_item_type_name(const uint8_t type) f_attribute_visibility_internal; + extern f_string_static_t controller_rule_item_type_name(const uint8_t type) F_attribute_visibility_internal_d; #endif // _di_controller_rule_item_type_name_ /** @@ -622,7 +622,7 @@ extern "C" { * @see f_memory_resize() */ #ifndef _di_controller_rule_items_increase_by_ - extern f_status_t controller_rule_items_increase_by(const f_array_length_t amount, controller_rule_items_t *items) f_attribute_visibility_internal; + extern f_status_t controller_rule_items_increase_by(const f_array_length_t amount, controller_rule_items_t *items) F_attribute_visibility_internal_d; #endif // _di_controller_rule_items_increase_by_ /** @@ -636,7 +636,7 @@ extern "C" { * The string with used == 0 if no match was found. */ #ifndef _di_controller_rule_setting_limit_type_name_ - extern f_string_static_t controller_rule_setting_limit_type_name(const uint8_t type) f_attribute_visibility_internal; + extern f_string_static_t controller_rule_setting_limit_type_name(const uint8_t type) F_attribute_visibility_internal_d; #endif // di_controller_rule_setting_limit_type_name_ /** @@ -668,7 +668,7 @@ extern "C" { * Errors (with error bit) from: controller_lock_write(). */ #ifndef _di_controller_rule_process_ - extern f_status_t controller_rule_process(const controller_global_t global, controller_process_t *process) f_attribute_visibility_internal; + extern f_status_t controller_rule_process(const controller_global_t global, controller_process_t *process) F_attribute_visibility_internal_d; #endif // _di_controller_rule_process_ /** @@ -677,8 +677,8 @@ extern "C" { * @param options_force * Force the given process options, only supporting a subset of process options. * - * If controller_process_option_asynchronous, then asynchronously execute. - * If not controller_process_option_asynchronous, then synchronously execute. + * If controller_process_option_asynchronous_d, then asynchronously execute. + * If not controller_process_option_asynchronous_d, then synchronously execute. * @param alias_rule * The alias of the rule, such as "boot/init". * @param action @@ -714,7 +714,7 @@ extern "C" { * @see f_thread_create() */ #ifndef _di_controller_rule_process_begin_ - extern f_status_t controller_rule_process_begin(const uint8_t options_force, const f_string_static_t alias_rule, const uint8_t action, const uint8_t options, const uint8_t type, const f_array_lengths_t stack, const controller_global_t global, const controller_cache_t cache) f_attribute_visibility_internal; + extern f_status_t controller_rule_process_begin(const uint8_t options_force, const f_string_static_t alias_rule, const uint8_t action, const uint8_t options, const uint8_t type, const f_array_lengths_t stack, const controller_global_t global, const controller_cache_t cache) F_attribute_visibility_internal_d; #endif // _di_controller_rule_process_begin_ /** @@ -726,8 +726,8 @@ extern "C" { * @param options_force * Force the given process options, only supporting a subset of process options. * - * If controller_process_option_asynchronous, then asynchronously execute. - * If not controller_process_option_asynchronous, then synchronously execute. + * If controller_process_option_asynchronous_d, then asynchronously execute. + * If not controller_process_option_asynchronous_d, then synchronously execute. * @param process * The process data. * @@ -749,7 +749,7 @@ extern "C" { * @see controller_rule_process_begin() */ #ifndef _di_controller_rule_process_do_ - extern f_status_t controller_rule_process_do(const uint8_t options_force, controller_process_t *process) f_attribute_visibility_internal; + extern f_status_t controller_rule_process_do(const uint8_t options_force, controller_process_t *process) F_attribute_visibility_internal_d; #endif // _di_controller_rule_process_do_ /** @@ -787,7 +787,7 @@ extern "C" { * @see fll_fss_basic_list_read(). */ #ifndef _di_controller_rule_read_ - extern f_status_t controller_rule_read(const bool is_normal, const f_string_static_t alias, controller_global_t global, controller_cache_t *cache, controller_entry_t *entry, controller_rule_t *rule) f_attribute_visibility_internal; + extern f_status_t controller_rule_read(const bool is_normal, const f_string_static_t alias, controller_global_t global, controller_cache_t *cache, controller_entry_t *entry, controller_rule_t *rule) F_attribute_visibility_internal_d; #endif // _di_controller_rule_read_ /** @@ -818,7 +818,7 @@ extern "C" { * @see fl_conversion_string_to_number_signed() */ #ifndef _di_controller_rule_action_read_rerun_number_ - extern f_status_t controller_rule_action_read_rerun_number(const controller_global_t global, const f_string_t name, controller_cache_t *cache, f_array_length_t *index, f_number_unsigned_t *number) f_attribute_visibility_internal; + extern f_status_t controller_rule_action_read_rerun_number(const controller_global_t global, const f_string_t name, controller_cache_t *cache, f_array_length_t *index, f_number_unsigned_t *number) F_attribute_visibility_internal_d; #endif // _di_controller_rule_action_read_rerun_number_ /** @@ -860,7 +860,7 @@ extern "C" { * @see fll_path_canonical() */ #ifndef _di_controller_rule_setting_read_ - extern f_status_t controller_rule_setting_read(const bool is_normal, const controller_global_t global, const controller_setting_t setting, controller_cache_t *cache, controller_rule_t *rule) f_attribute_visibility_internal; + extern f_status_t controller_rule_setting_read(const bool is_normal, const controller_global_t global, const controller_setting_t setting, controller_cache_t *cache, controller_rule_t *rule) F_attribute_visibility_internal_d; #endif // _di_controller_rule_setting_read_ /** @@ -879,7 +879,7 @@ extern "C" { * An additional message to append at the end (before the final period). */ #ifndef _di_controller_rule_setting_read_print_value_ - extern void controller_rule_setting_read_print_value(const controller_global_t global, const f_string_t name, const f_string_t name_sub, const f_string_static_t value, const f_string_t suffix) f_attribute_visibility_internal; + extern void controller_rule_setting_read_print_value(const controller_global_t global, const f_string_t name, const f_string_t name_sub, const f_string_static_t value, const f_string_t suffix) F_attribute_visibility_internal_d; #endif // _di_controller_rule_setting_read_print_value_ /** @@ -897,7 +897,7 @@ extern "C" { * A structure for containing and caching relevant data. */ #ifndef _di_controller_rule_setting_read_print_values_ - extern void controller_rule_setting_read_print_values(const controller_global_t global, const f_string_t name, const f_array_length_t index, controller_cache_t *cache) f_attribute_visibility_internal; + extern void controller_rule_setting_read_print_values(const controller_global_t global, const f_string_t name, const f_array_length_t index, controller_cache_t *cache) F_attribute_visibility_internal_d; #endif // _di_controller_rule_setting_read_print_values_ /** @@ -922,7 +922,7 @@ extern "C" { * @see controller_rule_setting_read() */ #ifndef _di_controller_rule_setting_read_problem_print_ - extern void controller_rule_setting_read_problem_print(const fl_print_t print, const f_string_t message, const f_array_length_t index, const f_array_length_t line_item, controller_thread_t *thread, controller_cache_t *cache) f_attribute_visibility_internal; + extern void controller_rule_setting_read_problem_print(const fl_print_t print, const f_string_t message, const f_array_length_t index, const f_array_length_t line_item, controller_thread_t *thread, controller_cache_t *cache) F_attribute_visibility_internal_d; #endif // _di_controller_rule_setting_read_problem_print_ /** @@ -951,7 +951,7 @@ extern "C" { * @see controller_rule_setting_read() */ #ifndef _di_controller_rule_setting_read_problem_print_with_range_ - extern void controller_rule_setting_read_problem_print_with_range(const fl_print_t print, const f_string_t before, const f_string_range_t range, const f_string_t after, const f_array_length_t index, const f_array_length_t line_item, controller_thread_t *thread, controller_cache_t *cache) f_attribute_visibility_internal; + extern void controller_rule_setting_read_problem_print_with_range(const fl_print_t print, const f_string_t before, const f_string_range_t range, const f_string_t after, const f_array_length_t index, const f_array_length_t line_item, controller_thread_t *thread, controller_cache_t *cache) F_attribute_visibility_internal_d; #endif // _di_controller_rule_setting_read_problem_print_with_range_ /** @@ -968,15 +968,15 @@ extern "C" { * @param options * A number using bits to represent specific boolean options. * If no bits set, then operate normally in a synchronous manner. - * If bit controller_process_option_simulate, then the rule execution is in simulation mode (printing a message that the rule would be executed but does not execute the rule). - * If bit controller_process_option_asynchronous, then run asynchronously. + * If bit controller_process_option_simulate_d, then the rule execution is in simulation mode (printing a message that the rule would be executed but does not execute the rule). + * If bit controller_process_option_asynchronous_d, then run asynchronously. * @param global * The global data. * @param cache * A structure for containing and caching relevant data. */ #ifndef _di_controller_rule_validate_ - extern void controller_rule_validate(const controller_rule_t rule, const uint8_t action, const uint8_t options, const controller_global_t global, controller_cache_t *cache) f_attribute_visibility_internal; + extern void controller_rule_validate(const controller_rule_t rule, const uint8_t action, const uint8_t options, const controller_global_t global, controller_cache_t *cache) F_attribute_visibility_internal_d; #endif // _di_controller_rule_validate_ /** @@ -1005,7 +1005,7 @@ extern "C" { * F_require (with error bit set) if a required process is in failed status when required is TRUE. */ #ifndef _di_controller_rule_wait_all_ - extern f_status_t controller_rule_wait_all(const bool is_normal, const controller_global_t global, const bool required, controller_process_t *process) f_attribute_visibility_internal; + extern f_status_t controller_rule_wait_all(const bool is_normal, const controller_global_t global, const bool required, controller_process_t *process) F_attribute_visibility_internal_d; #endif // _di_controller_rule_wait_all_ /** @@ -1032,7 +1032,7 @@ extern "C" { * @see controller_rule_wait_all() */ #ifndef _di_controller_rule_wait_all_process_type_ - extern f_status_t controller_rule_wait_all_process_type(const uint8_t type, const controller_global_t global, const bool required, controller_process_t *caller) f_attribute_visibility_internal; + extern f_status_t controller_rule_wait_all_process_type(const uint8_t type, const controller_global_t global, const bool required, controller_process_t *caller) F_attribute_visibility_internal_d; #endif // _di_controller_rule_wait_all_process_type_ #ifdef __cplusplus diff --git a/level_3/controller/c/private-thread.c b/level_3/controller/c/private-thread.c index 05df9d1..4197497 100644 --- a/level_3/controller/c/private-thread.c +++ b/level_3/controller/c/private-thread.c @@ -18,7 +18,7 @@ extern "C" { if (global->thread->enabled != controller_thread_enabled) return 0; - const unsigned int interval = global->main->parameters[controller_parameter_simulate].result == f_console_result_found ? controller_thread_cleanup_interval_short : controller_thread_cleanup_interval_long; + const unsigned int interval = global->main->parameters[controller_parameter_simulate].result == f_console_result_found ? controller_thread_cleanup_interval_short_d : controller_thread_cleanup_interval_long_d; f_status_t status = F_none; @@ -347,7 +347,7 @@ extern "C" { if (!controller_thread_is_enabled(is_normal, thread)) return; } - const f_status_t status = controller_rule_process_do(controller_process_option_asynchronous, process); + const f_status_t status = controller_rule_process_do(controller_process_option_asynchronous_d, process); if (status == F_child) { @@ -479,7 +479,7 @@ extern "C" { } // for } // for - for (i = 0; i < global->thread->processs.size && spent < controller_thread_exit_process_cancel_total; ++i) { + for (i = 0; i < global->thread->processs.size && spent < controller_thread_exit_process_cancel_total_d; ++i) { if (!global->thread->processs.array[i]) continue; if (caller && i == caller->id) continue; @@ -492,7 +492,7 @@ extern "C" { do { if (!process->id_thread) break; - controller_time(0, controller_thread_exit_process_cancel_wait, &time); + controller_time(0, controller_thread_exit_process_cancel_wait_d, &time); status = f_thread_join_timed(process->id_thread, time, 0); @@ -507,12 +507,12 @@ extern "C" { ++spent; - } while (status == F_time && spent < controller_thread_exit_process_cancel_total); + } while (status == F_time && spent < controller_thread_exit_process_cancel_total_d); if (process->path_pids.used) { for (j = 0; j < process->path_pids.used; ++j) { - for (; spent < controller_thread_exit_process_cancel_total; ++spent) { + for (; spent < controller_thread_exit_process_cancel_total_d; ++spent) { if (process->path_pids.array[j].used && f_file_exists(process->path_pids.array[j].string) == F_true) { status = controller_file_pid_read(process->path_pids.array[j], &pid); @@ -522,7 +522,7 @@ extern "C" { // a hackish way to determine if the pid exists while waiting. if (getpgid(pid) >= 0) { time.tv_sec = 0; - time.tv_nsec = controller_thread_exit_process_cancel_wait; + time.tv_nsec = controller_thread_exit_process_cancel_wait_d; nanosleep(&time, 0); continue; @@ -558,7 +558,7 @@ extern "C" { f_signal_send(F_signal_kill, process->childs.array[j]); time.tv_sec = 0; - time.tv_nsec = controller_thread_exit_process_cancel_wait; + time.tv_nsec = controller_thread_exit_process_cancel_wait_d; process->childs.array[j] = 0; } @@ -649,7 +649,7 @@ extern "C" { break; } - controller_time(controller_thread_exit_ready_timeout_seconds, controller_thread_exit_ready_timeout_nanoseconds, &time); + controller_time(controller_thread_exit_ready_timeout_seconds_d, controller_thread_exit_ready_timeout_nanoseconds_d, &time); status = f_thread_condition_wait_timed(&time, &global->thread->lock.alert_condition, &global->thread->lock.alert); @@ -969,7 +969,7 @@ extern "C" { while (controller_thread_is_enabled(is_normal, global->thread)) { - controller_time(controller_thread_exit_ready_timeout_seconds, controller_thread_exit_ready_timeout_nanoseconds, &time); + controller_time(controller_thread_exit_ready_timeout_seconds_d, controller_thread_exit_ready_timeout_nanoseconds_d, &time); error = sigtimedwait(&global->main->signal.set, &information, &time); diff --git a/level_3/controller/c/private-thread.h b/level_3/controller/c/private-thread.h index aa2f88a..96572c9 100644 --- a/level_3/controller/c/private-thread.h +++ b/level_3/controller/c/private-thread.h @@ -23,7 +23,7 @@ extern "C" { * 0, always. */ #ifndef _di_controller_thread_cleanup_ - extern void * controller_thread_cleanup(void *arguments) f_attribute_visibility_internal; + extern void * controller_thread_cleanup(void *arguments) F_attribute_visibility_internal_d; #endif // _di_controller_thread_cleanup_ /** @@ -37,7 +37,7 @@ extern "C" { * 0, always. */ #ifndef _di_controller_thread_control_ - extern void * controller_thread_control(void *arguments) f_attribute_visibility_internal; + extern void * controller_thread_control(void *arguments) F_attribute_visibility_internal_d; #endif // _di_controller_thread_control_ /** @@ -54,7 +54,7 @@ extern "C" { * FALSE when disabled. */ #ifndef _di_controller_thread_is_enabled_ - extern f_status_t controller_thread_is_enabled(const bool is_normal, controller_thread_t *thread) f_attribute_visibility_internal; + extern f_status_t controller_thread_is_enabled(const bool is_normal, controller_thread_t *thread) F_attribute_visibility_internal_d; #endif // _di_controller_thread_is_enabled_ /** @@ -72,7 +72,7 @@ extern "C" { * @see controller_thread_is_enabled_process_type() */ #ifndef _di_controller_thread_is_enabled_process_ - extern f_status_t controller_thread_is_enabled_process(controller_process_t * const process, controller_thread_t *thread) f_attribute_visibility_internal; + extern f_status_t controller_thread_is_enabled_process(controller_process_t * const process, controller_thread_t *thread) F_attribute_visibility_internal_d; #endif // _di_controller_thread_is_enabled_process_ /** @@ -90,7 +90,7 @@ extern "C" { * @see controller_thread_is_enabled() */ #ifndef _di_controller_thread_is_enabled_process_type_ - extern f_status_t controller_thread_is_enabled_process_type(const uint8_t type, controller_thread_t *thread) f_attribute_visibility_internal; + extern f_status_t controller_thread_is_enabled_process_type(const uint8_t type, controller_thread_t *thread) F_attribute_visibility_internal_d; #endif // _di_controller_thread_is_enabled_process_type_ /** @@ -109,7 +109,7 @@ extern "C" { * F_failure (with error bit) on any failure. */ #ifndef _di_controller_thread_main_ - extern f_status_t controller_thread_main(controller_main_t *main, controller_setting_t *setting) f_attribute_visibility_internal; + extern f_status_t controller_thread_main(controller_main_t *main, controller_setting_t *setting) F_attribute_visibility_internal_d; #endif // _di_controller_thread_main_ /** @@ -124,7 +124,7 @@ extern "C" { * @see controller_rule_process_do() */ #ifndef _di_controller_thread_process_ - extern void controller_thread_process(const bool is_normal, controller_process_t *process) f_attribute_visibility_internal; + extern void controller_thread_process(const bool is_normal, controller_process_t *process) F_attribute_visibility_internal_d; #endif // _di_controller_thread_process_ /** @@ -140,7 +140,7 @@ extern "C" { * @see controller_thread_process() */ #ifndef _di_controller_thread_process_normal_ - extern void * controller_thread_process_normal(void *arguments) f_attribute_visibility_internal; + extern void * controller_thread_process_normal(void *arguments) F_attribute_visibility_internal_d; #endif // _di_controller_thread_process_normal_ /** @@ -156,7 +156,7 @@ extern "C" { * @see controller_thread_process() */ #ifndef _di_controller_thread_process_other_ - extern void * controller_thread_process_other(void *arguments) f_attribute_visibility_internal; + extern void * controller_thread_process_other(void *arguments) F_attribute_visibility_internal_d; #endif // _di_controller_thread_process_other_ /** @@ -178,7 +178,7 @@ extern "C" { * Set to NULL to not use. */ #ifndef _di_controller_thread_process_cancel_ - extern void controller_thread_process_cancel(const bool is_normal, const uint8_t by, controller_global_t *global, controller_process_t *caller) f_attribute_visibility_internal; + extern void controller_thread_process_cancel(const bool is_normal, const uint8_t by, controller_global_t *global, controller_process_t *caller) F_attribute_visibility_internal_d; #endif // _di_controller_thread_process_cancel_ /** @@ -188,7 +188,7 @@ extern "C" { * The global thread data. */ #ifndef _di_controller_thread_process_exit_ - extern void controller_thread_process_exit(controller_global_t *global) f_attribute_visibility_internal; + extern void controller_thread_process_exit(controller_global_t *global) F_attribute_visibility_internal_d; #endif // _di_controller_thread_process_exit_ /** @@ -205,7 +205,7 @@ extern "C" { * 0, always. */ #ifndef _di_controller_thread_entry_ - extern void * controller_thread_entry(void *arguments) f_attribute_visibility_internal; + extern void * controller_thread_entry(void *arguments) F_attribute_visibility_internal_d; #endif // _di_controller_thread_entry_ /** @@ -225,7 +225,7 @@ extern "C" { * 0, always. */ #ifndef _di_controller_thread_exit_ - extern void * controller_thread_exit(void *arguments) f_attribute_visibility_internal; + extern void * controller_thread_exit(void *arguments) F_attribute_visibility_internal_d; #endif // _di_controller_thread_exit_ /*** @@ -246,7 +246,7 @@ extern "C" { * @see f_thread_join() */ #ifndef _di_controller_thread_join_ - extern f_status_t controller_thread_join(f_thread_id_t *id) f_attribute_visibility_internal; + extern f_status_t controller_thread_join(f_thread_id_t *id) F_attribute_visibility_internal_d; #endif // _di_controller_thread_join_ /** @@ -266,7 +266,7 @@ extern "C" { * 0, always. */ #ifndef _di_controller_thread_rule_ - extern void * controller_thread_rule(void *arguments) f_attribute_visibility_internal; + extern void * controller_thread_rule(void *arguments) F_attribute_visibility_internal_d; #endif // _di_controller_thread_rule_ /** @@ -279,7 +279,7 @@ extern "C" { * The global data. */ #ifndef _di_controller_thread_signal_ - extern void controller_thread_signal(const bool is_normal, controller_global_t *global) f_attribute_visibility_internal; + extern void controller_thread_signal(const bool is_normal, controller_global_t *global) F_attribute_visibility_internal_d; #endif // _di_controller_thread_signal_ /** @@ -296,7 +296,7 @@ extern "C" { * F_interrupt (with error bit) if interrupted. */ #ifndef _di_controller_thread_signal_state_fss_ - extern f_status_t controller_thread_signal_state_fss(void *state, void *internal) f_attribute_visibility_internal; + extern f_status_t controller_thread_signal_state_fss(void *state, void *internal) F_attribute_visibility_internal_d; #endif // _di_controller_thread_signal_state_fss_ /** @@ -313,7 +313,7 @@ extern "C" { * F_interrupt (with error bit) if interrupted. */ #ifndef _di_controller_thread_signal_state_iki_ - extern f_status_t controller_thread_signal_state_iki(void *state, void *internal) f_attribute_visibility_internal; + extern f_status_t controller_thread_signal_state_iki(void *state, void *internal) F_attribute_visibility_internal_d; #endif // _di_controller_thread_signal_state_iki_ /** @@ -331,7 +331,7 @@ extern "C" { * @see controller_thread_signal() */ #ifndef _di_controller_thread_signal_normal_ - extern void * controller_thread_signal_normal(void *arguments) f_attribute_visibility_internal; + extern void * controller_thread_signal_normal(void *arguments) F_attribute_visibility_internal_d; #endif // _di_controller_thread_signal_normal_ /** @@ -349,7 +349,7 @@ extern "C" { * @see controller_thread_signal() */ #ifndef _di_controller_thread_signal_other_ - extern void * controller_thread_signal_other(void *arguments) f_attribute_visibility_internal; + extern void * controller_thread_signal_other(void *arguments) F_attribute_visibility_internal_d; #endif // _di_controller_thread_signal_other_ #ifdef __cplusplus diff --git a/level_3/fake/c/fake.c b/level_3/fake/c/fake.c index 5a24b33..8865385 100644 --- a/level_3/fake/c/fake.c +++ b/level_3/fake/c/fake.c @@ -16,7 +16,7 @@ extern "C" { flockfile(file.stream); - fll_program_print_help_header(file, context, fake_name_long, fake_version); + fll_program_print_help_header(file, context, fake_program_name_long_s, fake_program_version_s); fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); @@ -30,49 +30,49 @@ extern "C" { f_print_character(f_string_eol_s[0], file.stream); - fll_program_print_help_option(file, context, fake_short_define, fake_long_define, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Append an additional define after defines from settings file."); - fll_program_print_help_option(file, context, fake_short_fakefile, fake_long_fakefile, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Use this fakefile."); - fll_program_print_help_option(file, context, fake_short_mode, fake_long_mode, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use this mode when processing the build settings."); - fll_program_print_help_option(file, context, fake_short_process, fake_long_process, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Process name for storing build states."); - fll_program_print_help_option(file, context, fake_short_settings, fake_long_settings, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Use this settings file."); + fll_program_print_help_option(file, context, fake_short_define_s, fake_long_define_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Append an additional define after defines from settings file."); + fll_program_print_help_option(file, context, fake_short_fakefile_s, fake_long_fakefile_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Use this fakefile."); + fll_program_print_help_option(file, context, fake_short_mode_s, fake_long_mode_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use this mode when processing the build settings."); + fll_program_print_help_option(file, context, fake_short_process_s, fake_long_process_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Process name for storing build states."); + fll_program_print_help_option(file, context, fake_short_settings_s, fake_long_settings_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Use this settings file."); f_print_character(f_string_eol_s[0], file.stream); - fll_program_print_help_option(file, context, fake_short_path_build, fake_long_path_build, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom build directory."); - fll_program_print_help_option(file, context, fake_short_path_data, fake_long_path_data, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom path to the data files."); - fll_program_print_help_option(file, context, fake_short_path_sources, fake_long_path_sources, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Specify a custom path to the source files."); - fll_program_print_help_option(file, context, fake_short_path_work, fake_long_path_work, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use includes/libraries/programs from this directory instead of system."); + fll_program_print_help_option(file, context, fake_short_path_build_s, fake_long_path_build_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom build directory."); + fll_program_print_help_option(file, context, fake_short_path_data_s, fake_long_path_data_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom path to the data files."); + fll_program_print_help_option(file, context, fake_short_path_sources_s, fake_long_path_sources_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Specify a custom path to the source files."); + fll_program_print_help_option(file, context, fake_short_path_work_s, fake_long_path_work_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use includes/libraries/programs from this directory instead of system."); fl_print_format("%c%c %[Special Options:%] ", file.stream, f_string_eol_s[0], f_string_eol_s[0], context.set.important, context.set.important); - fll_program_print_help_option_long(file, context, fake_long_documents_disabled, f_console_symbol_long_enable_s, " Forcibly do not build documents files."); - fll_program_print_help_option_long(file, context, fake_long_documents_enabled, f_console_symbol_long_enable_s, " Forcibly do build documents files."); - fll_program_print_help_option_long(file, context, fake_long_shared_disabled, f_console_symbol_long_enable_s, "Forcibly do not build shared files."); - fll_program_print_help_option_long(file, context, fake_long_shared_enabled, f_console_symbol_long_enable_s, " Forcibly do build shared files."); - fll_program_print_help_option_long(file, context, fake_long_static_disabled, f_console_symbol_long_enable_s, "Forcibly do not build static files."); - fll_program_print_help_option_long(file, context, fake_long_static_enabled, f_console_symbol_long_enable_s, " Forcibly do build static files."); + fll_program_print_help_option_long(file, context, fake_long_documents_disabled_s, f_console_symbol_long_enable_s, " Forcibly do not build documents files."); + fll_program_print_help_option_long(file, context, fake_long_documents_enabled_s, f_console_symbol_long_enable_s, " Forcibly do build documents files."); + fll_program_print_help_option_long(file, context, fake_long_shared_disabled_s, f_console_symbol_long_enable_s, "Forcibly do not build shared files."); + fll_program_print_help_option_long(file, context, fake_long_shared_enabled_s, f_console_symbol_long_enable_s, " Forcibly do build shared files."); + fll_program_print_help_option_long(file, context, fake_long_static_disabled_s, f_console_symbol_long_enable_s, "Forcibly do not build static files."); + fll_program_print_help_option_long(file, context, fake_long_static_enabled_s, f_console_symbol_long_enable_s, " Forcibly do build static files."); fl_print_format("%c%c %[Operations:%] ", file.stream, f_string_eol_s[0], f_string_eol_s[0], context.set.important, context.set.important); - fll_program_print_help_option_other(file, context, fake_other_operation_build, " Build or compile the code based on build settings file."); - fll_program_print_help_option_other(file, context, fake_other_operation_clean, " Delete all build files."); - fll_program_print_help_option_other(file, context, fake_other_operation_make, " Build or compile the code based on fakefile."); - fll_program_print_help_option_other(file, context, fake_other_operation_skeleton, "Build a skeleton directory structure."); + fll_program_print_help_option_other(file, context, fake_other_operation_build_s, " Build or compile the code based on build settings file."); + fll_program_print_help_option_other(file, context, fake_other_operation_clean_s, " Delete all build files."); + fll_program_print_help_option_other(file, context, fake_other_operation_make_s, " Build or compile the code based on fakefile."); + fll_program_print_help_option_other(file, context, fake_other_operation_skeleton_s, "Build a skeleton directory structure."); - fll_program_print_help_usage(file, context, fake_name, "operation"); + fll_program_print_help_usage(file, context, fake_program_name_s, "operation"); - fl_print_format(" When performing the %[%s%] operation, the", file.stream, context.set.notable, fake_other_operation_build, context.set.notable); - fl_print_format(" %[%s%s%] parameter specifies a name (limited to alpha-numeric, underscore, and dash) to be used in addition to the global.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fake_long_mode, context.set.notable, f_string_eol_s[0]); + fl_print_format(" When performing the %[%s%] operation, the", file.stream, context.set.notable, fake_other_operation_build_s, context.set.notable); + fl_print_format(" %[%s%s%] parameter specifies a name (limited to alpha-numeric, underscore, and dash) to be used in addition to the global.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fake_long_mode_s, context.set.notable, f_string_eol_s[0]); - fl_print_format(" For example, when a %[%s%]", file.stream, context.set.notable, fake_make_parameter_variable_mode, context.set.notable); + fl_print_format(" For example, when a %[%s%]", file.stream, context.set.notable, fake_make_parameter_variable_mode_s, context.set.notable); fl_print_format(" of 'fll_monolithic' is specified, build libraries from both 'build_libraries' and 'build_libraries-fll_monolithic' are used (but not 'build_libraries-fll_level').%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" When specifying the %[%s%] or the %[%s%]", file.stream, context.set.notable, fake_make_parameter_variable_fakefile, context.set.notable, context.set.notable, fake_make_parameter_variable_settings, context.set.notable); + fl_print_format(" When specifying the %[%s%] or the %[%s%]", file.stream, context.set.notable, fake_make_parameter_variable_fakefile_s, context.set.notable, context.set.notable, fake_make_parameter_variable_settings_s, context.set.notable); fl_print_format(" parameters, the filenames are relative to the data build directory, unless a path is used.%c", file.stream, f_string_eol_s[0]); - fl_print_format(" For example, with '%[%s%s my_fakefile%]' the fakefile at", file.stream, context.set.notable, f_console_symbol_long_enable_s, fake_long_fakefile, context.set.notable); - fl_print_format(" '%[./%s%smy_fakefile%]' would be used, however with", file.stream, context.set.notable, fake_default_path_data, fake_default_path_build, context.set.notable); - fl_print_format(" '%[%s%s ./my_fakefile%]' the fakefile at", file.stream, context.set.notable, f_console_symbol_long_enable_s, fake_long_fakefile, context.set.notable); + fl_print_format(" For example, with '%[%s%s my_fakefile%]' the fakefile at", file.stream, context.set.notable, f_console_symbol_long_enable_s, fake_long_fakefile_s, context.set.notable); + fl_print_format(" '%[./%s%smy_fakefile%]' would be used, however with", file.stream, context.set.notable, fake_default_path_data_s, fake_default_path_build_s, context.set.notable); + fl_print_format(" '%[%s%s ./my_fakefile%]' the fakefile at", file.stream, context.set.notable, f_console_symbol_long_enable_s, fake_long_fakefile_s, context.set.notable); fl_print_format(" '%[./my_fakefile%]' would be used.%c%c", file.stream, context.set.notable, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); funlockfile(file.stream); @@ -87,7 +87,7 @@ extern "C" { f_status_t status = F_none; { - const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fake_total_parameters); + const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fake_total_parameters_d); // Load all parameters and identify priority of color parameters. { @@ -248,7 +248,7 @@ extern "C" { } if (main->parameters[fake_parameter_version].result == f_console_result_found) { - fll_program_print_version(main->output.to, fake_version); + fll_program_print_version(main->output.to, fake_program_version_s); fake_main_delete(main); return F_none; @@ -274,16 +274,16 @@ extern "C" { main->operation = operations[i]; if (main->operation == fake_operation_build) { - operations_name = fake_other_operation_build; + operations_name = fake_other_operation_build_s; } else if (main->operation == fake_operation_clean) { - operations_name = fake_other_operation_clean; + operations_name = fake_other_operation_clean_s; } else if (main->operation == fake_operation_make) { - operations_name = fake_other_operation_make; + operations_name = fake_other_operation_make_s; } else if (main->operation == fake_operation_skeleton) { - operations_name = fake_other_operation_skeleton; + operations_name = fake_other_operation_skeleton_s; } if (main->operation == fake_operation_build) { @@ -370,7 +370,7 @@ extern "C" { #ifndef _di_fake_main_delete_ f_status_t fake_main_delete(fake_main_t *main) { - for (f_array_length_t i = 0; i < fake_total_parameters; ++i) { + for (f_array_length_t i = 0; i < fake_total_parameters_d; ++i) { macro_f_array_lengths_t_delete_simple(main->parameters[i].locations); macro_f_array_lengths_t_delete_simple(main->parameters[i].locations_sub); macro_f_array_lengths_t_delete_simple(main->parameters[i].values); diff --git a/level_3/fake/c/fake.h b/level_3/fake/c/fake.h index f0de601..dde7341 100644 --- a/level_3/fake/c/fake.h +++ b/level_3/fake/c/fake.h @@ -92,30 +92,30 @@ extern "C" { #endif -#ifndef _di_fake_version_ - #define fake_major_version f_string_ascii_0 - #define fake_minor_version f_string_ascii_5 - #define fake_micro_version f_string_ascii_6 +#ifndef _di_fake_program_version_ + #define fake_program_version_major_s F_string_ascii_0_s + #define fake_program_version_minor_s F_string_ascii_5_s + #define fake_program_version_micro_s F_string_ascii_6_s - #ifndef fake_nano_version_prefix - #define fake_nano_version_prefix + #ifndef fake_program_version_nano_prefix_s + #define fake_program_version_nano_prefix_s #endif - #ifndef fake_nano_version - #define fake_nano_version + #ifndef fake_program_version_nano_s + #define fake_program_version_nano_s #endif - #define fake_version fake_major_version f_string_ascii_period fake_minor_version f_string_ascii_period fake_micro_version fake_nano_version_prefix fake_nano_version -#endif // _di_fake_version_ + #define fake_program_version_s fake_program_version_major_s F_string_ascii_period_s fake_program_version_minor_s F_string_ascii_period_s fake_program_version_micro_s fake_program_version_nano_prefix_s fake_program_version_nano_s +#endif // _di_fake_program_version_ -#ifndef _di_fake_name_ - #define fake_name "fake" - #define fake_name_long "Featureless Make" -#endif // _di_fake_name_ +#ifndef _di_fake_program_name_ + #define fake_program_name_s "fake" + #define fake_program_name_long_s "Featureless Make" +#endif // _di_fake_program_name_ #ifndef _di_fake_default_allocation_step_ // Set to at least 4 to provide a UTF-8 friendly allocation step. - #define fake_default_allocation_step 4 + #define fake_default_allocation_step_d 4 #endif // _di_fake_default_allocation_step_ /** @@ -123,78 +123,78 @@ extern "C" { * These structures are hard-coded by their individual pieces to be constructed later on. */ #ifndef _di_fake_path_ - #define fake_path_part_bash "bash" f_path_separator - #define fake_path_part_build "build" f_path_separator - #define fake_path_part_c "c" f_path_separator - #define fake_path_part_cpp "c++" f_path_separator - #define fake_path_part_data "data" f_path_separator - #define fake_path_part_documents "documents" f_path_separator - #define fake_path_part_includes "includes" f_path_separator - #define fake_path_part_libraries "libraries" f_path_separator - #define fake_path_part_licenses "licenses" f_path_separator - #define fake_path_part_objects "objects" f_path_separator - #define fake_path_part_process "process" f_path_separator - #define fake_path_part_programs "programs" f_path_separator - #define fake_path_part_script "script" f_path_separator - #define fake_path_part_settings "settings" f_path_separator - #define fake_path_part_shared "shared" f_path_separator - #define fake_path_part_stage "stage" f_path_separator - #define fake_path_part_static "static" f_path_separator - - #define fake_path_part_bash_length 5 - #define fake_path_part_build_length 6 - #define fake_path_part_c_length 2 - #define fake_path_part_cpp_length 4 - #define fake_path_part_data_length 5 - #define fake_path_part_documents_length 10 - #define fake_path_part_includes_length 9 - #define fake_path_part_libraries_length 10 - #define fake_path_part_licenses_length 9 - #define fake_path_part_objects_length 8 - #define fake_path_part_process_length 8 - #define fake_path_part_programs_length 9 - #define fake_path_part_script_length 7 - #define fake_path_part_settings_length 9 - #define fake_path_part_shared_length 7 - #define fake_path_part_stage_length 6 - #define fake_path_part_static_length 7 + #define fake_path_part_bash_s "bash" F_path_separator_s + #define fake_path_part_build_s "build" F_path_separator_s + #define fake_path_part_c_s "c" F_path_separator_s + #define fake_path_part_cpp_s "c++" F_path_separator_s + #define fake_path_part_data_s "data" F_path_separator_s + #define fake_path_part_documents_s "documents" F_path_separator_s + #define fake_path_part_includes_s "includes" F_path_separator_s + #define fake_path_part_libraries_s "libraries" F_path_separator_s + #define fake_path_part_licenses_s "licenses" F_path_separator_s + #define fake_path_part_objects_s "objects" F_path_separator_s + #define fake_path_part_process_s "process" F_path_separator_s + #define fake_path_part_programs_s "programs" F_path_separator_s + #define fake_path_part_script_s "script" F_path_separator_s + #define fake_path_part_settings_s "settings" F_path_separator_s + #define fake_path_part_shared_s "shared" F_path_separator_s + #define fake_path_part_stage_s "stage" F_path_separator_s + #define fake_path_part_static_s "static" F_path_separator_s + + #define fake_path_part_bash_s_length 5 + #define fake_path_part_build_s_length 6 + #define fake_path_part_c_s_length 2 + #define fake_path_part_cpp_s_length 4 + #define fake_path_part_data_s_length 5 + #define fake_path_part_documents_s_length 10 + #define fake_path_part_includes_s_length 9 + #define fake_path_part_libraries_s_length 10 + #define fake_path_part_licenses_s_length 9 + #define fake_path_part_objects_s_length 8 + #define fake_path_part_process_s_length 8 + #define fake_path_part_programs_s_length 9 + #define fake_path_part_script_s_length 7 + #define fake_path_part_settings_s_length 9 + #define fake_path_part_shared_s_length 7 + #define fake_path_part_stage_s_length 6 + #define fake_path_part_static_s_length 7 #endif // _di_fake_path_ #ifndef _di_fake_file_ - #define fake_file_defines "defines" - #define fake_file_dependencies "dependencies" - #define fake_file_readme "readme" + #define fake_file_defines_s "defines" + #define fake_file_dependencies_s "dependencies" + #define fake_file_readme_s "readme" - #define fake_file_defines_length 7 - #define fake_file_dependencies_length 12 - #define fake_file_readme_length 6 + #define fake_file_defines_s_length 7 + #define fake_file_dependencies_s_length 12 + #define fake_file_readme_s_length 6 #endif // _di_fake_file_ /** * Provide default settings. */ #ifndef _di_fake_defaults_ - #define fake_default_path_build "build" f_path_separator - #define fake_default_path_data "data" f_path_separator - #define fake_default_path_sources "sources" f_path_separator - #define fake_default_path_work "" - - #define fake_default_path_build_length 6 - #define fake_default_path_data_length 5 - #define fake_default_path_sources_length 8 - #define fake_default_path_work_length 0 - - #define fake_default_define "" - #define fake_default_fakefile "fakefile" - #define fake_default_mode "" - #define fake_default_process "" - #define fake_default_settings "settings" - - #define fake_default_define_length 0 - #define fake_default_fakefile_length 8 - #define fake_default_mode_length 0 - #define fake_default_process_length 0 - #define fake_default_settings_length 8 + #define fake_default_path_build_s "build" F_path_separator_s + #define fake_default_path_data_s "data" F_path_separator_s + #define fake_default_path_sources_s "sources" F_path_separator_s + #define fake_default_path_work_s "" + + #define fake_default_path_build_s_length 6 + #define fake_default_path_data_s_length 5 + #define fake_default_path_sources_s_length 8 + #define fake_default_path_work_s_length 0 + + #define fake_default_define_s "" + #define fake_default_fakefile_s "fakefile" + #define fake_default_mode_s "" + #define fake_default_process_s "" + #define fake_default_settings_s "settings" + + #define fake_default_define_s_length 0 + #define fake_default_fakefile_s_length 8 + #define fake_default_mode_s_length 0 + #define fake_default_process_s_length 0 + #define fake_default_settings_s_length 8 #endif // _di_fake_defaults_ #ifndef _di_fake_build_language_ @@ -204,13 +204,13 @@ extern "C" { fake_build_language_type_cpp, }; - #define fake_build_language_bash "bash" - #define fake_build_language_c "c" - #define fake_build_language_cpp "c++" + #define fake_build_language_bash_s "bash" + #define fake_build_language_c_s "c" + #define fake_build_language_cpp_s "c++" - #define fake_build_language_bash_length 4 - #define fake_build_language_c_length 1 - #define fake_build_language_cpp_length 3 + #define fake_build_language_bash_s_length 4 + #define fake_build_language_c_s_length 1 + #define fake_build_language_cpp_s_length 3 #endif // _di_fake_build_language_ #ifndef _di_fake_build_version_ @@ -221,15 +221,15 @@ extern "C" { fake_build_version_type_nano, }; - #define fake_build_version_major "major" - #define fake_build_version_minor "minor" - #define fake_build_version_micro "micro" - #define fake_build_version_nano "nano" + #define fake_build_version_major_s "major" + #define fake_build_version_minor_s "minor" + #define fake_build_version_micro_s "micro" + #define fake_build_version_nano_s "nano" - #define fake_build_version_major_length 5 - #define fake_build_version_minor_length 5 - #define fake_build_version_micro_length 5 - #define fake_build_version_nano_length 4 + #define fake_build_version_major_s_length 5 + #define fake_build_version_minor_s_length 5 + #define fake_build_version_micro_s_length 5 + #define fake_build_version_nano_s_length 4 #endif // _di_fake_build_version_ #ifndef _di_fake_defines_ @@ -240,77 +240,77 @@ extern "C" { fake_operation_skeleton, }; - #define fake_operations_total 4 + #define fake_operations_total_d 4 #define fake_operations_initialize { 0, 0, 0, 0 } - #define fake_short_define "d" - #define fake_short_fakefile "f" - #define fake_short_mode "m" - #define fake_short_process "p" - #define fake_short_settings "s" - - #define fake_short_define_length 1 - #define fake_short_fakefile_length 1 - #define fake_short_mode_length 1 - #define fake_short_process_length 1 - #define fake_short_settings_length 1 - - #define fake_short_path_build "b" - #define fake_short_path_data "D" - #define fake_short_path_sources "S" - #define fake_short_path_work "w" - - #define fake_short_path_build_length 1 - #define fake_short_path_data_length 1 - #define fake_short_path_sources_length 1 - #define fake_short_path_work_length 1 - - #define fake_long_define "define" - #define fake_long_fakefile "fakefile" - #define fake_long_mode "mode" - #define fake_long_process "process" - #define fake_long_settings "settings" - - #define fake_long_define_length 6 - #define fake_long_fakefile_length 8 - #define fake_long_mode_length 4 - #define fake_long_process_length 7 - #define fake_long_settings_length 8 - - #define fake_long_path_build "build" - #define fake_long_path_data "data" - #define fake_long_path_sources "sources" - #define fake_long_path_work "work" - - #define fake_long_path_build_length 5 - #define fake_long_path_data_length 4 - #define fake_long_path_sources_length 7 - #define fake_long_path_work_length 4 + #define fake_short_define_s "d" + #define fake_short_fakefile_s "f" + #define fake_short_mode_s "m" + #define fake_short_process_s "p" + #define fake_short_settings_s "s" + + #define fake_short_define_s_length 1 + #define fake_short_fakefile_s_length 1 + #define fake_short_mode_s_length 1 + #define fake_short_process_s_length 1 + #define fake_short_settings_s_length 1 + + #define fake_short_path_build_s "b" + #define fake_short_path_data_s "D" + #define fake_short_path_sources_s "S" + #define fake_short_path_work_s "w" + + #define fake_short_path_build_s_length 1 + #define fake_short_path_data_s_length 1 + #define fake_short_path_sources_s_length 1 + #define fake_short_path_work_s_length 1 + + #define fake_long_define_s "define" + #define fake_long_fakefile_s "fakefile" + #define fake_long_mode_s "mode" + #define fake_long_process_s "process" + #define fake_long_settings_s "settings" + + #define fake_long_define_s_length 6 + #define fake_long_fakefile_s_length 8 + #define fake_long_mode_s_length 4 + #define fake_long_process_s_length 7 + #define fake_long_settings_s_length 8 + + #define fake_long_path_build_s "build" + #define fake_long_path_data_s "data" + #define fake_long_path_sources_s "sources" + #define fake_long_path_work_s "work" + + #define fake_long_path_build_s_length 5 + #define fake_long_path_data_s_length 4 + #define fake_long_path_sources_s_length 7 + #define fake_long_path_work_s_length 4 // these special parameters are provided in such a way that they mimic the traditional ./configure script. - #define fake_long_documents_disabled "disable-doc" - #define fake_long_documents_enabled "enable-doc" - #define fake_long_shared_disabled "disable-shared" - #define fake_long_shared_enabled "enable-shared" - #define fake_long_static_disabled "disable-static" - #define fake_long_static_enabled "enable-static" - - #define fake_long_documents_disabled_length 11 - #define fake_long_documents_enabled_length 10 - #define fake_long_shared_disabled_length 14 - #define fake_long_shared_enabled_length 13 - #define fake_long_static_disabled_length 14 - #define fake_long_static_enabled_length 13 - - #define fake_other_operation_build "build" - #define fake_other_operation_clean "clean" - #define fake_other_operation_make "make" - #define fake_other_operation_skeleton "skeleton" - - #define fake_other_operation_build_length 5 - #define fake_other_operation_clean_length 5 - #define fake_other_operation_make_length 4 - #define fake_other_operation_skeleton_length 8 + #define fake_long_documents_disabled_s "disable-doc" + #define fake_long_documents_enabled_s "enable-doc" + #define fake_long_shared_disabled_s "disable-shared" + #define fake_long_shared_enabled_s "enable-shared" + #define fake_long_static_disabled_s "disable-static" + #define fake_long_static_enabled_s "enable-static" + + #define fake_long_documents_disabled_s_length 11 + #define fake_long_documents_enabled_s_length 10 + #define fake_long_shared_disabled_s_length 14 + #define fake_long_shared_enabled_s_length 13 + #define fake_long_static_disabled_s_length 14 + #define fake_long_static_enabled_s_length 13 + + #define fake_other_operation_build_s "build" + #define fake_other_operation_clean_s "clean" + #define fake_other_operation_make_s "make" + #define fake_other_operation_skeleton_s "skeleton" + + #define fake_other_operation_build_s_length 5 + #define fake_other_operation_clean_s_length 5 + #define fake_other_operation_make_s_length 4 + #define fake_other_operation_skeleton_s_length 8 enum { fake_parameter_help, @@ -358,33 +358,33 @@ extern "C" { f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(fake_short_define, fake_long_define, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fake_short_fakefile, fake_long_fakefile, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fake_short_mode, fake_long_mode, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fake_short_process, fake_long_process, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fake_short_settings, fake_long_settings, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fake_short_path_build, fake_long_path_build, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fake_short_path_data, fake_long_path_data, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fake_short_path_sources, fake_long_path_sources, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fake_short_path_work, fake_long_path_work, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(0, fake_long_documents_disabled, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(0, fake_long_documents_enabled, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(0, fake_long_shared_disabled, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(0, fake_long_shared_enabled, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(0, fake_long_static_disabled, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(0, fake_long_static_enabled, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(0, 0, fake_other_operation_build, 0, f_console_type_other), \ - f_console_parameter_t_initialize(0, 0, fake_other_operation_clean, 0, f_console_type_other), \ - f_console_parameter_t_initialize(0, 0, fake_other_operation_make, 0, f_console_type_other), \ - f_console_parameter_t_initialize(0, 0, fake_other_operation_skeleton, 0, f_console_type_other), \ + f_console_parameter_t_initialize(fake_short_define_s, fake_long_define_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fake_short_fakefile_s, fake_long_fakefile_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fake_short_mode_s, fake_long_mode_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fake_short_process_s, fake_long_process_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fake_short_settings_s, fake_long_settings_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fake_short_path_build_s, fake_long_path_build_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fake_short_path_data_s, fake_long_path_data_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fake_short_path_sources_s, fake_long_path_sources_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fake_short_path_work_s, fake_long_path_work_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(0, fake_long_documents_disabled_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(0, fake_long_documents_enabled_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(0, fake_long_shared_disabled_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(0, fake_long_shared_enabled_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(0, fake_long_static_disabled_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(0, fake_long_static_enabled_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(0, 0, fake_other_operation_build_s, 0, f_console_type_other), \ + f_console_parameter_t_initialize(0, 0, fake_other_operation_clean_s, 0, f_console_type_other), \ + f_console_parameter_t_initialize(0, 0, fake_other_operation_make_s, 0, f_console_type_other), \ + f_console_parameter_t_initialize(0, 0, fake_other_operation_skeleton_s, 0, f_console_type_other), \ } - #define fake_total_parameters 28 + #define fake_total_parameters_d 28 #endif // _di_fake_defines_ #ifndef _di_fake_main_t_ typedef struct { - f_console_parameter_t parameters[fake_total_parameters]; + f_console_parameter_t parameters[fake_total_parameters_d]; f_array_lengths_t remaining; bool process_pipe; diff --git a/level_3/fake/c/main.c b/level_3/fake/c/main.c index 147a85e..cae110f 100644 --- a/level_3/fake/c/main.c +++ b/level_3/fake/c/main.c @@ -48,13 +48,13 @@ int main(const int argc, const f_string_t *argv) { status = fake_main(arguments, &data); // flush output pipes before closing. - fflush(f_type_output); - fflush(f_type_error); + fflush(F_type_output_d); + fflush(F_type_error_d); // close all open file descriptors. - close(f_type_descriptor_output); - close(f_type_descriptor_input); - close(f_type_descriptor_error); + close(F_type_descriptor_output_d); + close(F_type_descriptor_input_d); + close(F_type_descriptor_error_d); f_signal_close(&data.signal); diff --git a/level_3/fake/c/private-build.c b/level_3/fake/c/private-build.c index d11e9ed..22834b8 100644 --- a/level_3/fake/c/private-build.c +++ b/level_3/fake/c/private-build.c @@ -14,27 +14,27 @@ extern "C" { if (F_status_is_error(*status)) return; - f_array_length_t build_libraries_length = fake_build_parameter_library_link_path_length + main.path_build_libraries_shared.used; + f_array_length_t build_libraries_length = fake_build_parameter_library_link_path_s_length + main.path_build_libraries_shared.used; char build_libraries[build_libraries_length + 1]; - memcpy(build_libraries, fake_build_parameter_library_link_path, fake_build_parameter_library_link_path_length); + memcpy(build_libraries, fake_build_parameter_library_link_path_s, fake_build_parameter_library_link_path_s_length); if (is_shared) { - memcpy(build_libraries + fake_build_parameter_library_link_path_length, main.path_build_libraries_shared.string, main.path_build_libraries_shared.used); + memcpy(build_libraries + fake_build_parameter_library_link_path_s_length, main.path_build_libraries_shared.string, main.path_build_libraries_shared.used); } else { - memcpy(build_libraries + fake_build_parameter_library_link_path_length, main.path_build_libraries_static.string, main.path_build_libraries_static.used); + memcpy(build_libraries + fake_build_parameter_library_link_path_s_length, main.path_build_libraries_static.string, main.path_build_libraries_static.used); } build_libraries[build_libraries_length] = 0; - f_array_length_t build_includes_length = fake_build_parameter_library_include_length + main.path_build_includes.used; + f_array_length_t build_includes_length = fake_build_parameter_library_include_s_length + main.path_build_includes.used; char build_includes[build_includes_length + 1]; - memcpy(build_includes, fake_build_parameter_library_include, fake_build_parameter_library_include_length); - memcpy(build_includes + fake_build_parameter_library_include_length, main.path_build_includes.string, main.path_build_includes.used); + memcpy(build_includes, fake_build_parameter_library_include_s, fake_build_parameter_library_include_s_length); + memcpy(build_includes + fake_build_parameter_library_include_s_length, main.path_build_includes.string, main.path_build_includes.used); const f_string_t values[] = { build_libraries, @@ -56,12 +56,12 @@ extern "C" { f_array_length_t length = 0; if (F_status_is_error_not(*status)) { - length = fake_build_parameter_library_include_length + main.path_work_includes.used; + length = fake_build_parameter_library_include_s_length + main.path_work_includes.used; char string[length + 1]; - memcpy(string, fake_build_parameter_library_include, fake_build_parameter_library_include_length); - memcpy(string + fake_build_parameter_library_include_length, main.path_work_includes.string, main.path_work_includes.used); + memcpy(string, fake_build_parameter_library_include_s, fake_build_parameter_library_include_s_length); + memcpy(string + fake_build_parameter_library_include_s_length, main.path_work_includes.string, main.path_work_includes.used); string[length] = 0; @@ -69,12 +69,12 @@ extern "C" { } if (data_build.setting.search_shared && (is_shared || !data_build.setting.search_exclusive) && F_status_is_error_not(*status)) { - length = fake_build_parameter_library_link_path_length + main.path_work_libraries_shared.used; + length = fake_build_parameter_library_link_path_s_length + main.path_work_libraries_shared.used; char string[length + 1]; - memcpy(string, fake_build_parameter_library_link_path, fake_build_parameter_library_link_path_length); - memcpy(string + fake_build_parameter_library_link_path_length, main.path_work_libraries_shared.string, main.path_work_libraries_shared.used); + memcpy(string, fake_build_parameter_library_link_path_s, fake_build_parameter_library_link_path_s_length); + memcpy(string + fake_build_parameter_library_link_path_s_length, main.path_work_libraries_shared.string, main.path_work_libraries_shared.used); string[length] = 0; @@ -82,12 +82,12 @@ extern "C" { } if (data_build.setting.search_static && (!is_shared || !data_build.setting.search_exclusive) && F_status_is_error_not(*status)) { - length = fake_build_parameter_library_link_path_length + main.path_work_libraries_static.used; + length = fake_build_parameter_library_link_path_s_length + main.path_work_libraries_static.used; char string[length + 1]; - memcpy(string, fake_build_parameter_library_link_path, fake_build_parameter_library_link_path_length); - memcpy(string + fake_build_parameter_library_link_path_length, main.path_work_libraries_static.string, main.path_work_libraries_static.used); + memcpy(string, fake_build_parameter_library_link_path_s, fake_build_parameter_library_link_path_s_length); + memcpy(string + fake_build_parameter_library_link_path_s_length, main.path_work_libraries_static.string, main.path_work_libraries_static.used); string[length] = 0; @@ -306,7 +306,7 @@ extern "C" { break; } - *status = fl_directory_create(destination_directory.string, destination_directory.used, f_file_mode_all_rwx); + *status = fl_directory_create(destination_directory.string, destination_directory.used, F_file_mode_all_rwx_d); if (F_status_is_error(*status)) { fll_error_file_print(main.error, F_status_set_fine(*status), "fl_directory_create", F_true, destination_directory.string, "create", fll_error_file_type_directory); @@ -341,7 +341,7 @@ extern "C" { break; } - *status = f_file_copy(path_source.string, destination_file.string, mode, f_file_default_read_size, F_false); + *status = f_file_copy(path_source.string, destination_file.string, mode, F_file_default_read_size_d, F_false); if (F_status_is_error(*status)) { fake_print_error_build_operation_file(main, F_status_set_fine(*status), "f_file_copy", "copy", "to", path_source.string, destination_file.string, F_true); @@ -497,19 +497,19 @@ extern "C" { f_string_dynamics_t arguments = f_string_dynamics_t_initialize; - *status = fll_execute_arguments_add(fake_other_operation_build, fake_other_operation_build_length, &arguments); + *status = fll_execute_arguments_add(fake_other_operation_build_s, fake_other_operation_build_s_length, &arguments); // ensure console color mode is passed to the scripts so that they can also react to color mode. - if (F_status_is_error_not(*status) && main.context.mode != f_color_mode_none) { + if (F_status_is_error_not(*status) && main.context.mode != F_color_mode_none_d) { char argument[3] = { f_console_symbol_short_disable_s[0], 0, 0 }; - if (main.context.mode == f_color_mode_dark) { + if (main.context.mode == F_color_mode_dark_d) { argument[1] = f_console_standard_short_dark_s[0]; } - else if (main.context.mode == f_color_mode_light) { + else if (main.context.mode == F_color_mode_light_d) { argument[1] = f_console_standard_short_light_s[0]; } - else if (main.context.mode == f_color_mode_no_color) { + else if (main.context.mode == F_color_mode_no_color_d) { argument[1] = f_console_standard_short_no_color_s[0]; } @@ -583,33 +583,33 @@ extern "C" { }; const f_array_length_t parameters_prefix_length[] = { - f_console_symbol_short_enable_length, - f_console_symbol_short_enable_length, - f_console_symbol_short_enable_length, - f_console_symbol_short_enable_length, - f_console_symbol_short_enable_length, - f_console_symbol_short_enable_length, - f_console_symbol_short_enable_length, + F_console_symbol_short_enable_s_length, + F_console_symbol_short_enable_s_length, + F_console_symbol_short_enable_s_length, + F_console_symbol_short_enable_s_length, + F_console_symbol_short_enable_s_length, + F_console_symbol_short_enable_s_length, + F_console_symbol_short_enable_s_length, }; const f_string_t parameters_name[] = { - fake_short_define, - fake_short_process, - fake_short_settings, - fake_short_path_build, - fake_short_path_data, - fake_short_path_sources, - fake_short_path_work, + fake_short_define_s, + fake_short_process_s, + fake_short_settings_s, + fake_short_path_build_s, + fake_short_path_data_s, + fake_short_path_sources_s, + fake_short_path_work_s, }; const f_array_length_t parameters_name_length[] = { - fake_short_define_length, - fake_short_process_length, - fake_short_settings_length, - fake_short_path_build_length, - fake_short_path_data_length, - fake_short_path_sources_length, - fake_short_path_work_length, + fake_short_define_s_length, + fake_short_process_s_length, + fake_short_settings_s_length, + fake_short_path_build_s_length, + fake_short_path_data_s_length, + fake_short_path_sources_s_length, + fake_short_path_work_s_length, }; const f_string_t parameters_value[] = { @@ -686,7 +686,7 @@ extern "C" { f_signal_set_empty(&signals.block); f_signal_set_fill(&signals.block_not); - fl_execute_parameter_t parameter = macro_fl_execute_parameter_t_initialize(fl_execute_parameter_option_path, 0, &data_build.environment, &signals, 0); + fl_execute_parameter_t parameter = macro_fl_execute_parameter_t_initialize(FL_execute_parameter_option_path_d, 0, &data_build.environment, &signals, 0); *status = fll_execute_program(path.string, arguments, ¶meter, 0, (void *) &return_code); @@ -743,7 +743,7 @@ extern "C" { for (; i > 0; --i) { - if (name->string[i] == f_path_extension_separator[0]) { + if (name->string[i] == F_path_extension_separator_s[0]) { name->used = i; break; } @@ -823,7 +823,7 @@ extern "C" { } } - const f_array_length_t parameter_file_name_length = fake_build_parameter_library_name_prefix_length + data_build.setting.project_name.used + fake_build_parameter_library_name_suffix_shared_length; + const f_array_length_t parameter_file_name_length = fake_build_parameter_library_name_prefix_s_length + data_build.setting.project_name.used + fake_build_parameter_library_name_suffix_shared_s_length; const f_array_length_t parameter_file_name_major_length = data_build.setting.version_major.used ? parameter_file_name_length + data_build.setting.version_major_prefix.used + data_build.setting.version_major.used : 0; const f_array_length_t parameter_file_name_minor_length = data_build.setting.version_minor.used ? parameter_file_name_major_length + data_build.setting.version_minor_prefix.used + data_build.setting.version_minor.used : 0; const f_array_length_t parameter_file_name_micro_length = data_build.setting.version_micro.used ? parameter_file_name_minor_length + data_build.setting.version_micro_prefix.used + data_build.setting.version_micro.used : 0; @@ -841,25 +841,25 @@ extern "C" { parameter_file_name_micro[parameter_file_name_micro_length] = 0; parameter_file_name_nano[parameter_file_name_nano_length] = 0; - memcpy(parameter_file_name, fake_build_parameter_library_name_prefix, fake_build_parameter_library_name_prefix_length); + memcpy(parameter_file_name, fake_build_parameter_library_name_prefix_s, fake_build_parameter_library_name_prefix_s_length); if (parameter_file_name_major_length) { - memcpy(parameter_file_name_major, fake_build_parameter_library_name_prefix, fake_build_parameter_library_name_prefix_length); + memcpy(parameter_file_name_major, fake_build_parameter_library_name_prefix_s, fake_build_parameter_library_name_prefix_s_length); if (parameter_file_name_minor_length) { - memcpy(parameter_file_name_minor, fake_build_parameter_library_name_prefix, fake_build_parameter_library_name_prefix_length); + memcpy(parameter_file_name_minor, fake_build_parameter_library_name_prefix_s, fake_build_parameter_library_name_prefix_s_length); if (parameter_file_name_micro_length) { - memcpy(parameter_file_name_micro, fake_build_parameter_library_name_prefix, fake_build_parameter_library_name_prefix_length); + memcpy(parameter_file_name_micro, fake_build_parameter_library_name_prefix_s, fake_build_parameter_library_name_prefix_s_length); if (parameter_file_name_nano_length) { - memcpy(parameter_file_name_nano, fake_build_parameter_library_name_prefix, fake_build_parameter_library_name_prefix_length); + memcpy(parameter_file_name_nano, fake_build_parameter_library_name_prefix_s, fake_build_parameter_library_name_prefix_s_length); } } } } - f_array_length_t count = fake_build_parameter_library_name_prefix_length; + f_array_length_t count = fake_build_parameter_library_name_prefix_s_length; memcpy(parameter_file_name + count, data_build.setting.project_name.string, data_build.setting.project_name.used); @@ -881,26 +881,26 @@ extern "C" { count += data_build.setting.project_name.used; - memcpy(parameter_file_name + count, fake_build_parameter_library_name_suffix_shared, fake_build_parameter_library_name_suffix_shared_length); + memcpy(parameter_file_name + count, fake_build_parameter_library_name_suffix_shared_s, fake_build_parameter_library_name_suffix_shared_s_length); if (parameter_file_name_major_length) { - memcpy(parameter_file_name_major + count, fake_build_parameter_library_name_suffix_shared, fake_build_parameter_library_name_suffix_shared_length); + memcpy(parameter_file_name_major + count, fake_build_parameter_library_name_suffix_shared_s, fake_build_parameter_library_name_suffix_shared_s_length); if (parameter_file_name_minor_length) { - memcpy(parameter_file_name_minor + count, fake_build_parameter_library_name_suffix_shared, fake_build_parameter_library_name_suffix_shared_length); + memcpy(parameter_file_name_minor + count, fake_build_parameter_library_name_suffix_shared_s, fake_build_parameter_library_name_suffix_shared_s_length); if (parameter_file_name_micro_length) { - memcpy(parameter_file_name_micro + count, fake_build_parameter_library_name_suffix_shared, fake_build_parameter_library_name_suffix_shared_length); + memcpy(parameter_file_name_micro + count, fake_build_parameter_library_name_suffix_shared_s, fake_build_parameter_library_name_suffix_shared_s_length); if (parameter_file_name_nano_length) { - memcpy(parameter_file_name_nano + count, fake_build_parameter_library_name_suffix_shared, fake_build_parameter_library_name_suffix_shared_length); + memcpy(parameter_file_name_nano + count, fake_build_parameter_library_name_suffix_shared_s, fake_build_parameter_library_name_suffix_shared_s_length); } } } } if (parameter_file_name_major_length) { - count += fake_build_parameter_library_name_suffix_shared_length; + count += fake_build_parameter_library_name_suffix_shared_s_length; if (data_build.setting.version_major_prefix.used) { memcpy(parameter_file_name_major + count, data_build.setting.version_major_prefix.string, data_build.setting.version_major_prefix.used); @@ -993,7 +993,7 @@ extern "C" { } { - f_array_length_t parameter_linker_length = fake_build_parameter_library_shared_prefix_length; + f_array_length_t parameter_linker_length = fake_build_parameter_library_shared_prefix_s_length; f_array_length_t parameter_file_path_length = main.path_build_libraries_shared.used; if (data_build.setting.version_file == fake_build_version_type_major) { @@ -1025,7 +1025,7 @@ extern "C" { char parameter_linker[parameter_linker_length + 1]; char parameter_file_path[parameter_file_path_length + 1]; - memcpy(parameter_linker, fake_build_parameter_library_shared_prefix, fake_build_parameter_library_shared_prefix_length); + memcpy(parameter_linker, fake_build_parameter_library_shared_prefix_s, fake_build_parameter_library_shared_prefix_s_length); memcpy(parameter_file_path, main.path_build_libraries_shared.string, main.path_build_libraries_shared.used); if (data_build.setting.version_file == fake_build_version_type_major) { @@ -1042,32 +1042,32 @@ extern "C" { } if (data_build.setting.version_target == fake_build_version_type_major) { - memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_length, parameter_file_name_major, parameter_file_name_major_length); + memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_s_length, parameter_file_name_major, parameter_file_name_major_length); } else if (data_build.setting.version_target == fake_build_version_type_minor) { - memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_length, parameter_file_name_minor, parameter_file_name_minor_length); + memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_s_length, parameter_file_name_minor, parameter_file_name_minor_length); } else if (data_build.setting.version_target == fake_build_version_type_micro) { - memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_length, parameter_file_name_micro, parameter_file_name_micro_length); + memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_s_length, parameter_file_name_micro, parameter_file_name_micro_length); } else if (data_build.setting.version_target == fake_build_version_type_nano) { - memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_length, parameter_file_name_nano, parameter_file_name_nano_length); + memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_s_length, parameter_file_name_nano, parameter_file_name_nano_length); } parameter_linker[parameter_linker_length] = 0; parameter_file_path[parameter_file_path_length] = 0; const f_string_t values[] = { - fake_build_parameter_library_shared, + fake_build_parameter_library_shared_s, parameter_linker, - fake_build_parameter_library_output, + fake_build_parameter_library_output_s, parameter_file_path, }; const f_array_length_t lengths[] = { - fake_build_parameter_library_shared_length, + fake_build_parameter_library_shared_s_length, parameter_linker_length, - fake_build_parameter_library_output_length, + fake_build_parameter_library_output_s_length, parameter_file_path_length, }; @@ -1262,11 +1262,11 @@ extern "C" { f_string_dynamic_t source_path = f_string_dynamic_t_initialize; f_string_dynamics_t arguments = f_string_dynamics_t_initialize; - *status = fll_execute_arguments_add(fake_build_parameter_object_link_arguments, fake_build_parameter_object_link_arguments_length, &arguments); + *status = fll_execute_arguments_add(fake_build_parameter_object_link_arguments_s, fake_build_parameter_object_link_arguments_s_length, &arguments); if (F_status_is_error_not(*status)) { - f_array_length_t destination_length = main.path_build_libraries_static.used + fake_build_parameter_library_name_prefix_length; - destination_length += data_build.setting.project_name.used + fake_build_parameter_library_name_suffix_static_length; + f_array_length_t destination_length = main.path_build_libraries_static.used + fake_build_parameter_library_name_prefix_s_length; + destination_length += data_build.setting.project_name.used + fake_build_parameter_library_name_suffix_static_s_length; char destination[destination_length + 1]; @@ -1275,14 +1275,14 @@ extern "C" { memcpy(destination, main.path_build_libraries_static.string, main.path_build_libraries_static.used); destination_length += main.path_build_libraries_static.used; - memcpy(destination + destination_length, fake_build_parameter_library_name_prefix, fake_build_parameter_library_name_prefix_length); - destination_length += fake_build_parameter_library_name_prefix_length; + memcpy(destination + destination_length, fake_build_parameter_library_name_prefix_s, fake_build_parameter_library_name_prefix_s_length); + destination_length += fake_build_parameter_library_name_prefix_s_length; memcpy(destination + destination_length, data_build.setting.project_name.string, data_build.setting.project_name.used); destination_length += data_build.setting.project_name.used; - memcpy(destination + destination_length, fake_build_parameter_library_name_suffix_static, fake_build_parameter_library_name_suffix_static_length); - destination_length += fake_build_parameter_library_name_suffix_static_length; + memcpy(destination + destination_length, fake_build_parameter_library_name_suffix_static_s, fake_build_parameter_library_name_suffix_static_s_length); + destination_length += fake_build_parameter_library_name_suffix_static_s_length; destination[destination_length] = 0; @@ -1323,7 +1323,7 @@ extern "C" { break; } - *status = f_string_append_assure(f_path_separator_s, f_path_separator_length, &source_path); + *status = f_string_append_assure(f_path_separator_s, F_path_separator_s_length, &source_path); if (F_status_is_error(*status)) { fll_error_print(main.error, F_status_set_fine(*status), "f_string_append_assure", F_true); @@ -1337,10 +1337,10 @@ extern "C" { break; } - source_length = source_path.used + file_name.used + fake_build_parameter_object_name_suffix_length; + source_length = source_path.used + file_name.used + fake_build_parameter_object_name_suffix_s_length; } else { - source_length = main.path_build_objects.used + file_name.used + fake_build_parameter_object_name_suffix_length; + source_length = main.path_build_objects.used + file_name.used + fake_build_parameter_object_name_suffix_s_length; } char source[source_length + 1]; @@ -1348,12 +1348,12 @@ extern "C" { if (source_path.used) { memcpy(source, source_path.string, source_path.used); memcpy(source + source_path.used, file_name.string, file_name.used); - memcpy(source + source_path.used + file_name.used, fake_build_parameter_object_name_suffix, fake_build_parameter_object_name_suffix_length); + memcpy(source + source_path.used + file_name.used, fake_build_parameter_object_name_suffix_s, fake_build_parameter_object_name_suffix_s_length); } else { memcpy(source, main.path_build_objects.string, main.path_build_objects.used); memcpy(source + main.path_build_objects.used, file_name.string, file_name.used); - memcpy(source + main.path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix, fake_build_parameter_object_name_suffix_length); + memcpy(source + main.path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix_s, fake_build_parameter_object_name_suffix_s_length); } source[source_length] = 0; @@ -1406,8 +1406,8 @@ extern "C" { }; const f_array_length_t variables_length[] = { - f_path_environment_length, - f_path_present_working_length + F_path_environment_s_length, + F_path_present_working_s_length }; for (uint8_t i = 0; i < 2; ++i) { @@ -1431,9 +1431,9 @@ extern "C" { flockfile(main.error.to.stream); fl_print_format("%c%[%SThe values for the setting '%]", main.error.to.stream, f_string_eol_s[0], main.error.context, main.error.prefix, main.error.context); - fl_print_format("%[%s%]", main.error.to.stream, main.error.notable, fake_build_setting_name_environment, main.error.notable); + fl_print_format("%[%s%]", main.error.to.stream, main.error.notable, fake_build_setting_name_environment_s, main.error.notable); fl_print_format("%[' of setting file '%]", main.error.to.stream, main.error.context, main.error.context); - fl_print_format("%[%s%]", main.error.to.stream, main.error.notable, fake_build_setting_name_environment, main.error.notable); + fl_print_format("%[%s%]", main.error.to.stream, main.error.notable, fake_build_setting_name_environment_s, main.error.notable); fl_print_format("%[' is too large.%]%c", main.error.to.stream, main.error.context, main.error.context, f_string_eol_s[0]); flockfile(main.error.to.stream); @@ -1490,7 +1490,7 @@ extern "C" { f_fss_delimits_t delimits = f_fss_delimits_t_initialize; { - f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large, fake_common_allocation_small, 0, &fake_signal_state_interrupt_fss, 0, (void *) &main, 0); + f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, &fake_signal_state_interrupt_fss, 0, (void *) &main, 0); *status = fll_fss_extended_read(buffer, state, &range, &objects, &contents, 0, 0, &delimits, 0); } @@ -1526,7 +1526,7 @@ extern "C" { }; f_string_t names[] = { - fake_build_setting_name_project_name, + fake_build_setting_name_project_name_s, }; for (uint8_t i = 0; i < 1; ++i) { @@ -1605,113 +1605,113 @@ extern "C" { f_string_dynamics_t version_target = f_string_dynamics_t_initialize; const f_string_t settings_name[] = { - fake_build_setting_name_build_compiler, - fake_build_setting_name_build_indexer, - fake_build_setting_name_build_language, - fake_build_setting_name_build_libraries, - fake_build_setting_name_build_script, - fake_build_setting_name_build_shared, - fake_build_setting_name_build_sources_headers, - fake_build_setting_name_build_sources_library, - fake_build_setting_name_build_sources_program, - fake_build_setting_name_build_sources_script, - fake_build_setting_name_build_sources_settings, - fake_build_setting_name_build_static, - fake_build_setting_name_defines_all, - fake_build_setting_name_defines_library, - fake_build_setting_name_defines_program, - fake_build_setting_name_defines_shared, - fake_build_setting_name_defines_static, - fake_build_setting_name_environment, - fake_build_setting_name_flags_all, - fake_build_setting_name_flags_library, - fake_build_setting_name_flags_program, - fake_build_setting_name_flags_shared, - fake_build_setting_name_flags_static, - fake_build_setting_name_modes, - fake_build_setting_name_modes_default, - fake_build_setting_name_path_headers, - fake_build_setting_name_path_headers_preserve, - fake_build_setting_name_path_language, - fake_build_setting_name_path_library_script, - fake_build_setting_name_path_library_shared, - fake_build_setting_name_path_library_static, - fake_build_setting_name_path_program_script, - fake_build_setting_name_path_program_shared, - fake_build_setting_name_path_program_static, - fake_build_setting_name_path_sources, - fake_build_setting_name_path_standard, - fake_build_setting_name_process_post, - fake_build_setting_name_process_pre, - fake_build_setting_name_project_name, - fake_build_setting_name_search_exclusive, - fake_build_setting_name_search_shared, - fake_build_setting_name_search_static, - fake_build_setting_name_version_file, - fake_build_setting_name_version_major, - fake_build_setting_name_version_major_prefix, - fake_build_setting_name_version_micro, - fake_build_setting_name_version_micro_prefix, - fake_build_setting_name_version_minor, - fake_build_setting_name_version_minor_prefix, - fake_build_setting_name_version_nano, - fake_build_setting_name_version_nano_prefix, - fake_build_setting_name_version_target, + fake_build_setting_name_build_compiler_s, + fake_build_setting_name_build_indexer_s, + fake_build_setting_name_build_language_s, + fake_build_setting_name_build_libraries_s, + fake_build_setting_name_build_script_s, + fake_build_setting_name_build_shared_s, + fake_build_setting_name_build_sources_headers_s, + fake_build_setting_name_build_sources_library_s, + fake_build_setting_name_build_sources_program_s, + fake_build_setting_name_build_sources_script_s, + fake_build_setting_name_build_sources_settings_s, + fake_build_setting_name_build_static_s, + fake_build_setting_name_defines_all_s, + fake_build_setting_name_defines_library_s, + fake_build_setting_name_defines_program_s, + fake_build_setting_name_defines_shared_s, + fake_build_setting_name_defines_static_s, + fake_build_setting_name_environment_s, + fake_build_setting_name_flags_all_s, + fake_build_setting_name_flags_library_s, + fake_build_setting_name_flags_program_s, + fake_build_setting_name_flags_shared_s, + fake_build_setting_name_flags_static_s, + fake_build_setting_name_modes_s, + fake_build_setting_name_modes_default_s, + fake_build_setting_name_path_headers_s, + fake_build_setting_name_path_headers_preserve_s, + fake_build_setting_name_path_language_s, + fake_build_setting_name_path_library_script_s, + fake_build_setting_name_path_library_shared_s, + fake_build_setting_name_path_library_static_s, + fake_build_setting_name_path_program_script_s, + fake_build_setting_name_path_program_shared_s, + fake_build_setting_name_path_program_static_s, + fake_build_setting_name_path_sources_s, + fake_build_setting_name_path_standard_s, + fake_build_setting_name_process_post_s, + fake_build_setting_name_process_pre_s, + fake_build_setting_name_project_name_s, + fake_build_setting_name_search_exclusive_s, + fake_build_setting_name_search_shared_s, + fake_build_setting_name_search_static_s, + fake_build_setting_name_version_file_s, + fake_build_setting_name_version_major_s, + fake_build_setting_name_version_major_prefix_s, + fake_build_setting_name_version_micro_s, + fake_build_setting_name_version_micro_prefix_s, + fake_build_setting_name_version_minor_s, + fake_build_setting_name_version_minor_prefix_s, + fake_build_setting_name_version_nano_s, + fake_build_setting_name_version_nano_prefix_s, + fake_build_setting_name_version_target_s, }; const f_array_length_t settings_length[] = { - fake_build_setting_name_build_compiler_length, - fake_build_setting_name_build_indexer_length, - fake_build_setting_name_build_language_length, - fake_build_setting_name_build_libraries_length, - fake_build_setting_name_build_script_length, - fake_build_setting_name_build_shared_length, - fake_build_setting_name_build_sources_headers_length, - fake_build_setting_name_build_sources_library_length, - fake_build_setting_name_build_sources_program_length, - fake_build_setting_name_build_sources_script_length, - fake_build_setting_name_build_sources_settings_length, - fake_build_setting_name_build_static_length, - fake_build_setting_name_defines_all_length, - fake_build_setting_name_defines_library_length, - fake_build_setting_name_defines_program_length, - fake_build_setting_name_defines_shared_length, - fake_build_setting_name_defines_static_length, - fake_build_setting_name_environment_length, - fake_build_setting_name_flags_all_length, - fake_build_setting_name_flags_library_length, - fake_build_setting_name_flags_program_length, - fake_build_setting_name_flags_shared_length, - fake_build_setting_name_flags_static_length, - fake_build_setting_name_modes_length, - fake_build_setting_name_modes_default_length, - fake_build_setting_name_path_headers_length, - fake_build_setting_name_path_headers_preserve_length, - fake_build_setting_name_path_language_length, - fake_build_setting_name_path_library_script_length, - fake_build_setting_name_path_library_shared_length, - fake_build_setting_name_path_library_static_length, - fake_build_setting_name_path_program_script_length, - fake_build_setting_name_path_program_shared_length, - fake_build_setting_name_path_program_static_length, - fake_build_setting_name_path_sources_length, - fake_build_setting_name_path_standard_length, - fake_build_setting_name_process_post_length, - fake_build_setting_name_process_pre_length, - fake_build_setting_name_project_name_length, - fake_build_setting_name_search_exclusive_length, - fake_build_setting_name_search_shared_length, - fake_build_setting_name_search_static_length, - fake_build_setting_name_version_file_length, - fake_build_setting_name_version_major_length, - fake_build_setting_name_version_major_prefix_length, - fake_build_setting_name_version_micro_length, - fake_build_setting_name_version_micro_prefix_length, - fake_build_setting_name_version_minor_length, - fake_build_setting_name_version_minor_prefix_length, - fake_build_setting_name_version_nano_length, - fake_build_setting_name_version_nano_prefix_length, - fake_build_setting_name_version_target_length, + fake_build_setting_name_build_compiler_s_length, + fake_build_setting_name_build_indexer_s_length, + fake_build_setting_name_build_language_s_length, + fake_build_setting_name_build_libraries_s_length, + fake_build_setting_name_build_script_s_length, + fake_build_setting_name_build_shared_s_length, + fake_build_setting_name_build_sources_headers_s_length, + fake_build_setting_name_build_sources_library_s_length, + fake_build_setting_name_build_sources_program_s_length, + fake_build_setting_name_build_sources_script_s_length, + fake_build_setting_name_build_sources_settings_s_length, + fake_build_setting_name_build_static_s_length, + fake_build_setting_name_defines_all_s_length, + fake_build_setting_name_defines_library_s_length, + fake_build_setting_name_defines_program_s_length, + fake_build_setting_name_defines_shared_s_length, + fake_build_setting_name_defines_static_s_length, + fake_build_setting_name_environment_length_s, + fake_build_setting_name_flags_all_s_length, + fake_build_setting_name_flags_library_s_length, + fake_build_setting_name_flags_program_s_length, + fake_build_setting_name_flags_shared_s_length, + fake_build_setting_name_flags_static_s_length, + fake_build_setting_name_modes_s_length, + fake_build_setting_name_modes_default_s_length, + fake_build_setting_name_path_headers_s_length, + fake_build_setting_name_path_headers_preserve_s_length, + fake_build_setting_name_path_language_s_length, + fake_build_setting_name_path_library_script_s_length, + fake_build_setting_name_path_library_shared_s_length, + fake_build_setting_name_path_library_static_s_length, + fake_build_setting_name_path_program_script_s_length, + fake_build_setting_name_path_program_shared_s_length, + fake_build_setting_name_path_program_static_s_length, + fake_build_setting_name_path_sources_s_length, + fake_build_setting_name_path_standard_s_length, + fake_build_setting_name_process_post_s_length, + fake_build_setting_name_process_pre_s_length, + fake_build_setting_name_project_name_s_length, + fake_build_setting_name_search_exclusive_s_length, + fake_build_setting_name_search_shared_s_length, + fake_build_setting_name_search_static_s_length, + fake_build_setting_name_version_file_s_length, + fake_build_setting_name_version_major_s_length, + fake_build_setting_name_version_major_prefix_s_length, + fake_build_setting_name_version_micro_s_length, + fake_build_setting_name_version_micro_prefix_s_length, + fake_build_setting_name_version_minor_s_length, + fake_build_setting_name_version_minor_prefix_s_length, + fake_build_setting_name_version_nano_s_length, + fake_build_setting_name_version_nano_prefix_s_length, + fake_build_setting_name_version_target_s_length, }; f_string_dynamics_t *settings_value[] = { @@ -1826,14 +1826,14 @@ extern "C" { f_string_t function = "fll_fss_snatch_apart"; - *status = fll_fss_snatch_apart(buffer, objects, contents, settings_name, settings_length, fake_build_setting_total, settings_value, settings_matches, 0); + *status = fll_fss_snatch_apart(buffer, objects, contents, settings_name, settings_length, fake_build_setting_total_d, settings_value, settings_matches, 0); if (*status == F_none) { const int total_build_libraries = setting->build_libraries.used; - f_string_dynamic_t settings_mode_name_dynamic[fake_build_setting_total]; - f_string_t settings_mode_names[fake_build_setting_total]; - f_array_length_t setting_mode_lengths[fake_build_setting_total]; + f_string_dynamic_t settings_mode_name_dynamic[fake_build_setting_total_d]; + f_string_t settings_mode_names[fake_build_setting_total_d]; + f_array_length_t setting_mode_lengths[fake_build_setting_total_d]; const f_string_dynamics_t *modes = &setting->modes_default; bool found = F_false; @@ -1876,11 +1876,11 @@ extern "C" { break; } - memset(&settings_mode_name_dynamic, 0, sizeof(f_string_dynamic_t) * fake_build_setting_total); - memset(&settings_mode_names, 0, sizeof(f_string_t) * fake_build_setting_total); - memset(&setting_mode_lengths, 0, sizeof(f_array_length_t) * fake_build_setting_total); + memset(&settings_mode_name_dynamic, 0, sizeof(f_string_dynamic_t) * fake_build_setting_total_d); + memset(&settings_mode_names, 0, sizeof(f_string_t) * fake_build_setting_total_d); + memset(&setting_mode_lengths, 0, sizeof(f_array_length_t) * fake_build_setting_total_d); - for (j = 0; j < fake_build_setting_total; ++j) { + for (j = 0; j < fake_build_setting_total_d; ++j) { setting_mode_lengths[j] = settings_length[j] + 1 + modes->array[i].used; @@ -1899,14 +1899,14 @@ extern "C" { } // for if (*status == F_none) { - *status = fll_fss_snatch_apart(buffer, objects, contents, settings_mode_names, setting_mode_lengths, fake_build_setting_total, settings_value, 0, 0); + *status = fll_fss_snatch_apart(buffer, objects, contents, settings_mode_names, setting_mode_lengths, fake_build_setting_total_d, settings_value, 0, 0); if (F_status_is_error(*status)) { function = "fll_fss_snatch_apart"; } } - for (j = 0; j < fake_build_setting_total; ++j) { + for (j = 0; j < fake_build_setting_total_d; ++j) { macro_f_string_dynamic_t_delete_simple(settings_mode_name_dynamic[j]); } // for @@ -1959,39 +1959,39 @@ extern "C" { } else if (!fake_signal_received(main)) { const f_string_t settings_single_name[] = { - fake_build_setting_name_build_compiler, - fake_build_setting_name_build_indexer, - fake_build_setting_name_build_language, - fake_build_setting_name_build_script, - fake_build_setting_name_build_shared, - fake_build_setting_name_build_static, - fake_build_setting_name_path_headers, - fake_build_setting_name_path_headers_preserve, - fake_build_setting_name_path_language, - fake_build_setting_name_path_library_script, - fake_build_setting_name_path_library_shared, - fake_build_setting_name_path_library_static, - fake_build_setting_name_path_program_script, - fake_build_setting_name_path_program_shared, - fake_build_setting_name_path_program_static, - fake_build_setting_name_path_sources, - fake_build_setting_name_path_standard, - fake_build_setting_name_process_post, - fake_build_setting_name_process_pre, - fake_build_setting_name_project_name, - fake_build_setting_name_search_exclusive, - fake_build_setting_name_search_shared, - fake_build_setting_name_search_static, - fake_build_setting_name_version_file, - fake_build_setting_name_version_major, - fake_build_setting_name_version_major_prefix, - fake_build_setting_name_version_micro, - fake_build_setting_name_version_micro_prefix, - fake_build_setting_name_version_minor, - fake_build_setting_name_version_minor_prefix, - fake_build_setting_name_version_nano, - fake_build_setting_name_version_nano_prefix, - fake_build_setting_name_version_target, + fake_build_setting_name_build_compiler_s, + fake_build_setting_name_build_indexer_s, + fake_build_setting_name_build_language_s, + fake_build_setting_name_build_script_s, + fake_build_setting_name_build_shared_s, + fake_build_setting_name_build_static_s, + fake_build_setting_name_path_headers_s, + fake_build_setting_name_path_headers_preserve_s, + fake_build_setting_name_path_language_s, + fake_build_setting_name_path_library_script_s, + fake_build_setting_name_path_library_shared_s, + fake_build_setting_name_path_library_static_s, + fake_build_setting_name_path_program_script_s, + fake_build_setting_name_path_program_shared_s, + fake_build_setting_name_path_program_static_s, + fake_build_setting_name_path_sources_s, + fake_build_setting_name_path_standard_s, + fake_build_setting_name_process_post_s, + fake_build_setting_name_process_pre_s, + fake_build_setting_name_project_name_s, + fake_build_setting_name_search_exclusive_s, + fake_build_setting_name_search_shared_s, + fake_build_setting_name_search_static_s, + fake_build_setting_name_version_file_s, + fake_build_setting_name_version_major_s, + fake_build_setting_name_version_major_prefix_s, + fake_build_setting_name_version_micro_s, + fake_build_setting_name_version_micro_prefix_s, + fake_build_setting_name_version_minor_s, + fake_build_setting_name_version_minor_prefix_s, + fake_build_setting_name_version_nano_s, + fake_build_setting_name_version_nano_prefix_s, + fake_build_setting_name_version_target_s, }; const f_string_statics_t *settings_single_source[] = { @@ -2193,7 +2193,7 @@ extern "C" { 0, 0, 0, - fake_build_version_micro, + fake_build_version_micro_s, 0, 0, 0, @@ -2202,7 +2202,7 @@ extern "C" { 0, 0, 0, - fake_build_version_major, + fake_build_version_major_s, }; // 1 = "yes" or "no", 2 = path/, 3 = literal, 4 = "bash", "c", or "c++", 5 = "major", "minor", "micro", or "nano". @@ -2263,10 +2263,10 @@ extern "C" { } if (settings_single_type[i] == 1) { - if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_common_setting_bool_yes, settings_single_source[i]->array[0].used, fake_common_setting_bool_yes_length) == F_equal_to) { + if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_common_setting_bool_yes_s, settings_single_source[i]->array[0].used, fake_common_setting_bool_yes_s_length) == F_equal_to) { *settings_single_bool[i] = F_true; } - else if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_common_setting_bool_no, settings_single_source[i]->array[0].used, fake_common_setting_bool_no_length) == F_equal_to) { + else if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_common_setting_bool_no_s, settings_single_source[i]->array[0].used, fake_common_setting_bool_no_s_length) == F_equal_to) { *settings_single_bool[i] = F_false; } else { @@ -2280,11 +2280,11 @@ extern "C" { fl_print_format("%[' in the file '%]", main.warning.to.stream, main.warning.context, main.warning.context); fl_print_format("%[%S%]", main.warning.to.stream, main.warning.notable, path_file, main.warning.notable); fl_print_format("%[' may be either '%]", main.warning.to.stream, main.warning.context, main.warning.context); - fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_common_setting_bool_yes, main.warning.notable); + fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_common_setting_bool_yes_s, main.warning.notable); fl_print_format("%[' or '%]", main.warning.to.stream, main.warning.context, main.warning.context); - fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_common_setting_bool_no, main.warning.notable); + fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_common_setting_bool_no_s, main.warning.notable); fl_print_format("%[', defaulting to '%]", main.warning.to.stream, main.warning.context, main.warning.context); - fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_common_setting_bool_yes, main.warning.notable); + fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_common_setting_bool_yes_s, main.warning.notable); fl_print_format("%['.%]%c", main.warning.to.stream, main.warning.context, main.warning.context, f_string_eol_s[0]); funlockfile(main.warning.to.stream); @@ -2292,13 +2292,13 @@ extern "C" { } } else if (settings_single_type[i] == 4) { - if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_language_bash, settings_single_source[i]->array[0].used, fake_build_language_bash_length) == F_equal_to) { + if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_language_bash_s, settings_single_source[i]->array[0].used, fake_build_language_bash_s_length) == F_equal_to) { *settings_single_language[i] = fake_build_language_type_bash; } - else if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_language_c, settings_single_source[i]->array[0].used, fake_build_language_c_length) == F_equal_to) { + else if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_language_c_s, settings_single_source[i]->array[0].used, fake_build_language_c_s_length) == F_equal_to) { *settings_single_language[i] = fake_build_language_type_c; } - else if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_language_cpp, settings_single_source[i]->array[0].used, fake_build_language_cpp_length) == F_equal_to) { + else if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_language_cpp_s, settings_single_source[i]->array[0].used, fake_build_language_cpp_s_length) == F_equal_to) { *settings_single_language[i] = fake_build_language_type_cpp; } else { @@ -2312,13 +2312,13 @@ extern "C" { fl_print_format("%[' in the file '%]", main.warning.to.stream, main.warning.context, main.warning.context); fl_print_format("%[%S%]", main.warning.to.stream, main.warning.notable, path_file, main.warning.notable); fl_print_format("%[' may only be one of '%]", main.warning.to.stream, main.warning.context, main.warning.context); - fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_build_language_bash, main.warning.notable); + fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_build_language_bash_s, main.warning.notable); fl_print_format("%[', '%]", main.warning.to.stream, main.warning.context, main.warning.context); - fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_build_language_c, main.warning.notable); + fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_build_language_c_s, main.warning.notable); fl_print_format("%[', or '%]", main.warning.to.stream, main.warning.context, main.warning.context); - fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_build_language_cpp, main.warning.notable); + fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_build_language_cpp_s, main.warning.notable); fl_print_format("%[', defaulting to '%]", main.warning.to.stream, main.warning.context, main.warning.context); - fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_build_language_c, main.warning.notable); + fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_build_language_c_s, main.warning.notable); fl_print_format("%['.%]%c", main.warning.to.stream, main.warning.context, main.warning.context, f_string_eol_s[0]); funlockfile(main.warning.to.stream); @@ -2326,16 +2326,16 @@ extern "C" { } } else if (settings_single_type[i] == 5) { - if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_version_major, settings_single_source[i]->array[0].used, fake_build_version_major_length) == F_equal_to) { + if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_version_major_s, settings_single_source[i]->array[0].used, fake_build_version_major_s_length) == F_equal_to) { *settings_single_version[i] = fake_build_version_type_major; } - else if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_version_minor, settings_single_source[i]->array[0].used, fake_build_version_minor_length) == F_equal_to) { + else if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_version_minor_s, settings_single_source[i]->array[0].used, fake_build_version_minor_s_length) == F_equal_to) { *settings_single_version[i] = fake_build_version_type_minor; } - else if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_version_micro, settings_single_source[i]->array[0].used, fake_build_version_micro_length) == F_equal_to) { + else if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_version_micro_s, settings_single_source[i]->array[0].used, fake_build_version_micro_s_length) == F_equal_to) { *settings_single_version[i] = fake_build_version_type_micro; } - else if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_version_nano, settings_single_source[i]->array[0].used, fake_build_version_nano_length) == F_equal_to) { + else if (fl_string_compare_trim(settings_single_source[i]->array[0].string, fake_build_version_nano_s, settings_single_source[i]->array[0].used, fake_build_version_nano_s_length) == F_equal_to) { *settings_single_version[i] = fake_build_version_type_nano; } else { @@ -2349,13 +2349,13 @@ extern "C" { fl_print_format("%[' in the file '%]", main.warning.to.stream, main.warning.context, main.warning.context); fl_print_format("%[%S%]", main.warning.to.stream, main.warning.notable, path_file, main.warning.notable); fl_print_format("%[' may only be one of '%]", main.warning.to.stream, main.warning.context, main.warning.context); - fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_build_version_major, main.warning.notable); + fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_build_version_major_s, main.warning.notable); fl_print_format("%[', '%]", main.warning.to.stream, main.warning.context, main.warning.context); - fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_build_version_minor, main.warning.notable); + fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_build_version_minor_s, main.warning.notable); fl_print_format("%[', '%]", main.warning.to.stream, main.warning.context, main.warning.context); - fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_build_version_micro, main.warning.notable); + fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_build_version_micro_s, main.warning.notable); fl_print_format("%[', or '%]", main.warning.to.stream, main.warning.context, main.warning.context); - fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_build_version_nano, main.warning.notable); + fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_build_version_nano_s, main.warning.notable); fl_print_format("%[', defaulting to '%]", main.warning.to.stream, main.warning.context, main.warning.context); fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, settings_single_version_default_name[i], main.warning.notable); fl_print_format("%['.%]%c", main.warning.to.stream, main.warning.context, main.warning.context, f_string_eol_s[0]); @@ -2377,7 +2377,7 @@ extern "C" { } if (settings_single_type[i] == 2) { - *status = f_string_append_assure(f_path_separator_s, f_path_separator_length, settings_single_destination[i]); + *status = f_string_append_assure(f_path_separator_s, F_path_separator_s_length, settings_single_destination[i]); if (F_status_is_error(*status)) { fll_error_print(main.error, F_status_set_fine(*status), "f_string_append_assure", F_true); @@ -2401,11 +2401,11 @@ extern "C" { flockfile(main.warning.to.stream); fl_print_format("%c%[%SThe setting '%]", main.warning.to.stream, f_string_eol_s[0], main.warning.context, main.warning.prefix, main.warning.context); - fl_print_format("%[%S%]", main.warning.to.stream, main.warning.notable, fake_build_setting_name_version_file, main.warning.notable); + fl_print_format("%[%S%]", main.warning.to.stream, main.warning.notable, fake_build_setting_name_version_file_s, main.warning.notable); fl_print_format("%[' in the file '%]", main.warning.to.stream, main.warning.context, main.warning.context); fl_print_format("%[%S%]", main.warning.to.stream, main.warning.notable, path_file, main.warning.notable); fl_print_format("%[' is required, defaulting to '%]", main.warning.to.stream, main.warning.context, main.warning.context); - fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_build_version_micro, main.warning.notable); + fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_build_version_micro_s, main.warning.notable); fl_print_format("%['.%]%c", main.warning.to.stream, main.warning.context, main.warning.context, f_string_eol_s[0]); funlockfile(main.warning.to.stream); @@ -2419,11 +2419,11 @@ extern "C" { flockfile(main.warning.to.stream); fl_print_format("%c%[%SThe setting '%]", main.warning.to.stream, f_string_eol_s[0], main.warning.context, main.warning.prefix, main.warning.context); - fl_print_format("%[%S%]", main.warning.to.stream, main.warning.notable, fake_build_setting_name_version_target, main.warning.notable); + fl_print_format("%[%S%]", main.warning.to.stream, main.warning.notable, fake_build_setting_name_version_target_s, main.warning.notable); fl_print_format("%[' in the file '%]", main.warning.to.stream, main.warning.context, main.warning.context); fl_print_format("%[%S%]", main.warning.to.stream, main.warning.notable, path_file, main.warning.notable); fl_print_format("%[' is required, defaulting to '%]", main.warning.to.stream, main.warning.context, main.warning.context); - fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_build_version_major, main.warning.notable); + fl_print_format("%[%s%]", main.warning.to.stream, main.warning.notable, fake_build_version_major_s, main.warning.notable); fl_print_format("%['.%]%c", main.warning.to.stream, main.warning.context, main.warning.context, f_string_eol_s[0]); funlockfile(main.warning.to.stream); @@ -2456,22 +2456,22 @@ extern "C" { }; const char *name_target[] = { - fake_build_version_major, - fake_build_version_minor, - fake_build_version_micro, - fake_build_version_nano, + fake_build_version_major_s, + fake_build_version_minor_s, + fake_build_version_micro_s, + fake_build_version_nano_s, }; const char *name_object[] = { - fake_build_setting_name_version_major, - fake_build_setting_name_version_minor, - fake_build_setting_name_version_micro, - fake_build_setting_name_version_nano, + fake_build_setting_name_version_major_s, + fake_build_setting_name_version_minor_s, + fake_build_setting_name_version_micro_s, + fake_build_setting_name_version_nano_s, }; const char *setting_name[] = { - fake_build_setting_name_version_file, - fake_build_setting_name_version_target, + fake_build_setting_name_version_file_s, + fake_build_setting_name_version_target_s, }; const uint8_t setting_target[] = { @@ -2488,7 +2488,7 @@ extern "C" { if (!has_prefix_object[i]) { prefix[i]->used = 0; - *status = f_string_append(fake_build_setting_default_version_prefix, fake_build_setting_default_version_prefix_length, prefix[i]); + *status = f_string_append(fake_build_setting_default_version_prefix_s, fake_build_setting_default_version_prefix_s_length, prefix[i]); if (F_status_is_error(*status)) { fll_error_print(main.error, F_status_set_fine(*status), "f_string_append", F_true); @@ -2576,15 +2576,15 @@ extern "C" { { const f_string_t sources[] = { - fake_build_setting_default_version, - fake_build_setting_default_version, - fake_build_setting_default_version, + fake_build_setting_default_version_s, + fake_build_setting_default_version_s, + fake_build_setting_default_version_s, }; const f_array_length_t lengths[] = { - fake_build_setting_default_version_length, - fake_build_setting_default_version_length, - fake_build_setting_default_version_length, + fake_build_setting_default_version_s_length, + fake_build_setting_default_version_s_length, + fake_build_setting_default_version_s_length, }; f_string_dynamic_t * const destinations[] = { @@ -2631,11 +2631,11 @@ extern "C" { flockfile(main.error.to.stream); fl_print_format("%c%[%SThe parameters '%]", main.error.to.stream, f_string_eol_s[0], main.error.context, main.error.prefix, main.error.context); - fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fake_long_shared_disabled, main.error.notable); + fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fake_long_shared_disabled_s, main.error.notable); fl_print_format("%[' and '%]", main.error.to.stream, main.error.context, main.error.context); - fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fake_long_shared_enabled, main.error.notable); + fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fake_long_shared_enabled_s, main.error.notable); fl_print_format("%[' contradict, defaulting to '%]", main.error.to.stream, main.error.context, main.error.context); - fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, setting->build_shared ? fake_long_shared_enabled : fake_long_shared_disabled, main.error.notable); + fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, setting->build_shared ? fake_long_shared_enabled_s : fake_long_shared_disabled_s, main.error.notable); fl_print_format("%['.%]%c", main.error.to.stream, main.error.context, main.error.context, f_string_eol_s[0]); funlockfile(main.error.to.stream); @@ -2666,11 +2666,11 @@ extern "C" { flockfile(main.error.to.stream); fl_print_format("%c%[%SThe parameters '%]", main.error.to.stream, f_string_eol_s[0], main.error.context, main.error.prefix, main.error.context); - fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fake_long_static_disabled, main.error.notable); + fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fake_long_static_disabled_s, main.error.notable); fl_print_format("%[' and '%]", main.error.to.stream, main.error.context, main.error.context); - fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fake_long_static_enabled, main.error.notable); + fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fake_long_static_enabled_s, main.error.notable); fl_print_format("%[' contradict, defaulting to '%]", main.error.to.stream, main.error.context, main.error.context); - fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, setting->build_static ? fake_long_static_enabled : fake_long_static_disabled, main.error.notable); + fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, setting->build_static ? fake_long_static_enabled_s : fake_long_static_disabled_s, main.error.notable); fl_print_format("%['.%]%c", main.error.to.stream, main.error.context, main.error.context, f_string_eol_s[0]); funlockfile(main.error.to.stream); @@ -2692,11 +2692,11 @@ extern "C" { flockfile(main.error.to.stream); fl_print_format("%c%[%SThe build settings '%]", main.error.to.stream, f_string_eol_s[0], main.error.context, main.error.prefix, main.error.context); - fl_print_format("%[%s%]", main.error.to.stream, main.error.notable, fake_build_setting_name_build_shared, main.error.notable); + fl_print_format("%[%s%]", main.error.to.stream, main.error.notable, fake_build_setting_name_build_shared_s, main.error.notable); fl_print_format("%[' and '%]", main.error.to.stream, main.error.context, main.error.context); - fl_print_format("%[%s%]", main.error.to.stream, main.error.notable, fake_build_setting_name_build_static, main.error.notable); + fl_print_format("%[%s%]", main.error.to.stream, main.error.notable, fake_build_setting_name_build_static_s, main.error.notable); fl_print_format("%[' cannot both be false when using the language '%]", main.error.to.stream, main.error.context, main.error.context); - fl_print_format("%[%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, setting->build_language == fake_build_language_type_c ? fake_build_language_c : fake_build_language_cpp, main.error.notable); + fl_print_format("%[%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, setting->build_language == fake_build_language_type_c ? fake_build_language_c_s : fake_build_language_cpp_s, main.error.notable); fl_print_format("%['.%]%c", main.error.to.stream, main.error.context, main.error.context, f_string_eol_s[0]); funlockfile(main.error.to.stream); @@ -2722,35 +2722,35 @@ extern "C" { } const f_string_t names[] = { - fake_build_stage_libraries_script, - fake_build_stage_libraries_shared, - fake_build_stage_libraries_static, - fake_build_stage_objects_static, - fake_build_stage_process_post, - fake_build_stage_process_pre, - fake_build_stage_programs_script, - fake_build_stage_programs_shared, - fake_build_stage_programs_static, - fake_build_stage_skeleton, - fake_build_stage_sources_headers, - fake_build_stage_sources_script, - fake_build_stage_sources_settings, + fake_build_stage_libraries_script_s, + fake_build_stage_libraries_shared_s, + fake_build_stage_libraries_static_s, + fake_build_stage_objects_static_s, + fake_build_stage_process_post_s, + fake_build_stage_process_pre_s, + fake_build_stage_programs_script_s, + fake_build_stage_programs_shared_s, + fake_build_stage_programs_static_s, + fake_build_stage_skeleton_s, + fake_build_stage_sources_headers_s, + fake_build_stage_sources_script_s, + fake_build_stage_sources_settings_s, }; const f_array_length_t lengths[] = { - fake_build_stage_libraries_script_length, - fake_build_stage_libraries_shared_length, - fake_build_stage_libraries_static_length, - fake_build_stage_objects_static_length, - fake_build_stage_process_post_length, - fake_build_stage_process_pre_length, - fake_build_stage_programs_script_length, - fake_build_stage_programs_shared_length, - fake_build_stage_programs_static_length, - fake_build_stage_skeleton_length, - fake_build_stage_sources_headers_length, - fake_build_stage_sources_script_length, - fake_build_stage_sources_settings_length, + fake_build_stage_libraries_script_s_length, + fake_build_stage_libraries_shared_s_length, + fake_build_stage_libraries_static_s_length, + fake_build_stage_objects_static_s_length, + fake_build_stage_process_post_s_length, + fake_build_stage_process_pre_s_length, + fake_build_stage_programs_script_s_length, + fake_build_stage_programs_shared_s_length, + fake_build_stage_programs_static_s_length, + fake_build_stage_skeleton_s_length, + fake_build_stage_sources_headers_s_length, + fake_build_stage_sources_script_s_length, + fake_build_stage_sources_settings_s_length, }; f_string_dynamic_t * const values[] = { @@ -2786,7 +2786,7 @@ extern "C" { return; } - for (uint8_t i = 0; i < fake_build_stage_total; ++i) { + for (uint8_t i = 0; i < fake_build_stage_total_d; ++i) { *status = f_string_dynamic_append_nulless(main.path_build_stage, values[i]); @@ -2803,7 +2803,7 @@ extern "C" { break; } - *status = f_string_append(fake_build_stage_separate, fake_build_stage_separate_length, values[i]); + *status = f_string_append(fake_build_stage_separate_s, fake_build_stage_separate_s_length, values[i]); if (F_status_is_error(*status)) { fll_error_print(main.error, F_status_set_fine(*status), "f_string_append", F_true); @@ -2818,7 +2818,7 @@ extern "C" { break; } - *status = f_string_append(fake_build_stage_separate, fake_build_stage_separate_length, values[i]); + *status = f_string_append(fake_build_stage_separate_s, fake_build_stage_separate_s_length, values[i]); if (F_status_is_error(*status)) { fll_error_print(main.error, F_status_set_fine(*status), "f_string_append", F_true); @@ -2832,7 +2832,7 @@ extern "C" { break; } - *status = f_string_append(fake_build_stage_built, fake_build_stage_built_length, values[i]); + *status = f_string_append(fake_build_stage_built_s, fake_build_stage_built_s_length, values[i]); if (F_status_is_error(*status)) { fll_error_print(main.error, F_status_set_fine(*status), "f_string_append", F_true); @@ -2922,7 +2922,7 @@ extern "C" { break; } - *status = f_string_append_assure(f_path_separator_s, f_path_separator_length, &destination_path); + *status = f_string_append_assure(f_path_separator_s, F_path_separator_s_length, &destination_path); if (F_status_is_error(*status)) { fll_error_print(main.error, F_status_set_fine(*status), "f_string_append_assure", F_true); @@ -2986,10 +2986,10 @@ extern "C" { break; } - destination_length = destination_path.used + file_name.used + fake_build_parameter_object_name_suffix_length; + destination_length = destination_path.used + file_name.used + fake_build_parameter_object_name_suffix_s_length; } else { - destination_length = main.path_build_objects.used + file_name.used + fake_build_parameter_object_name_suffix_length; + destination_length = main.path_build_objects.used + file_name.used + fake_build_parameter_object_name_suffix_s_length; } char destination[destination_length + 1]; @@ -2997,29 +2997,29 @@ extern "C" { if (destination_path.used) { memcpy(destination, destination_path.string, destination_path.used); memcpy(destination + destination_path.used, file_name.string, file_name.used); - memcpy(destination + destination_path.used + file_name.used, fake_build_parameter_object_name_suffix, fake_build_parameter_object_name_suffix_length); + memcpy(destination + destination_path.used + file_name.used, fake_build_parameter_object_name_suffix_s, fake_build_parameter_object_name_suffix_s_length); } else { memcpy(destination, main.path_build_objects.string, main.path_build_objects.used); memcpy(destination + main.path_build_objects.used, file_name.string, file_name.used); - memcpy(destination + main.path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix, fake_build_parameter_object_name_suffix_length); + memcpy(destination + main.path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix_s, fake_build_parameter_object_name_suffix_s_length); } destination[destination_length] = 0; const f_string_t values[] = { source, - fake_build_parameter_object_compile, - fake_build_parameter_object_static, - fake_build_parameter_object_output, + fake_build_parameter_object_compile_s, + fake_build_parameter_object_static_s, + fake_build_parameter_object_output_s, destination, }; const f_array_length_t lengths[] = { source_length, - fake_build_parameter_object_compile_length, - fake_build_parameter_object_static_length, - fake_build_parameter_object_output_length, + fake_build_parameter_object_compile_s_length, + fake_build_parameter_object_static_s_length, + fake_build_parameter_object_output_s_length, destination_length, }; @@ -3238,12 +3238,12 @@ extern "C" { parameter_file_name_path[parameter_file_name_path_length] = 0; const f_string_t values[] = { - fake_build_parameter_library_output, + fake_build_parameter_library_output_s, parameter_file_name_path, }; const f_array_length_t lengths[] = { - fake_build_parameter_library_output_length, + fake_build_parameter_library_output_s_length, parameter_file_name_path_length, }; @@ -3256,12 +3256,12 @@ extern "C" { // if project-specific library sources exist, then the -lproject_name needs to be added to the arguments. if (F_status_is_error_not(*status) && data_build.setting.build_sources_library.used) { - f_array_length_t link_project_library_length = fake_build_parameter_library_link_file_length + data_build.setting.project_name.used; + f_array_length_t link_project_library_length = fake_build_parameter_library_link_file_s_length + data_build.setting.project_name.used; char link_project_library[link_project_library_length + 1]; - memcpy(link_project_library, fake_build_parameter_library_link_file, fake_build_parameter_library_link_file_length); - memcpy(link_project_library + fake_build_parameter_library_link_file_length, data_build.setting.project_name.string, data_build.setting.project_name.used); + memcpy(link_project_library, fake_build_parameter_library_link_file_s, fake_build_parameter_library_link_file_s_length); + memcpy(link_project_library + fake_build_parameter_library_link_file_s_length, data_build.setting.project_name.string, data_build.setting.project_name.used); link_project_library[link_project_library_length] = 0; *status = fll_execute_arguments_add(link_project_library, link_project_library_length, &arguments); @@ -3334,7 +3334,7 @@ extern "C" { } if (F_status_is_error_not(*status)) { - f_array_length_t source_library_length = main.path_build_libraries_static.used + fake_build_parameter_library_name_prefix_length + data_build.setting.project_name.used + fake_build_parameter_library_name_suffix_static_length; + f_array_length_t source_library_length = main.path_build_libraries_static.used + fake_build_parameter_library_name_prefix_s_length + data_build.setting.project_name.used + fake_build_parameter_library_name_suffix_static_s_length; char source_library[source_library_length + 1]; @@ -3345,14 +3345,14 @@ extern "C" { memcpy(source_library, main.path_build_libraries_static.string, main.path_build_libraries_static.used); source_library_length += main.path_build_libraries_static.used; - memcpy(source_library + source_library_length, fake_build_parameter_library_name_prefix, fake_build_parameter_library_name_prefix_length); - source_library_length += fake_build_parameter_library_name_prefix_length; + memcpy(source_library + source_library_length, fake_build_parameter_library_name_prefix_s, fake_build_parameter_library_name_prefix_s_length); + source_library_length += fake_build_parameter_library_name_prefix_s_length; memcpy(source_library + source_library_length, data_build.setting.project_name.string, data_build.setting.project_name.used); source_library_length += data_build.setting.project_name.used; - memcpy(source_library + source_library_length, fake_build_parameter_library_name_suffix_static, fake_build_parameter_library_name_suffix_static_length); - source_library_length += fake_build_parameter_library_name_suffix_static_length; + memcpy(source_library + source_library_length, fake_build_parameter_library_name_suffix_static_s, fake_build_parameter_library_name_suffix_static_s_length); + source_library_length += fake_build_parameter_library_name_suffix_static_s_length; } source_library[source_library_length] = 0; @@ -3367,15 +3367,15 @@ extern "C" { const f_string_t values[] = { source_library, - fake_build_parameter_library_static, - fake_build_parameter_library_output, + fake_build_parameter_library_static_s, + fake_build_parameter_library_output_s, parameter_file_name_path, }; const f_array_length_t lengths[] = { source_library_length, - fake_build_parameter_library_static_length, - fake_build_parameter_library_output_length, + fake_build_parameter_library_static_s_length, + fake_build_parameter_library_output_s_length, parameter_file_name_path_length, }; diff --git a/level_3/fake/c/private-build.h b/level_3/fake/c/private-build.h index 9745131..2e5df0a 100644 --- a/level_3/fake/c/private-build.h +++ b/level_3/fake/c/private-build.h @@ -33,7 +33,7 @@ extern "C" { * @see fll_execute_arguments_add() */ #ifndef _di_fake_build_arguments_standard_add_ - extern void fake_build_arguments_standard_add(const fake_main_t main, const fake_build_data_t data_build, const bool is_shared, const bool is_library, f_string_dynamics_t *arguments, f_status_t *status) f_attribute_visibility_internal; + extern void fake_build_arguments_standard_add(const fake_main_t main, const fake_build_data_t data_build, const bool is_shared, const bool is_library, f_string_dynamics_t *arguments, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_build_arguments_standard_add_ /** @@ -71,7 +71,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_copy_ - extern void fake_build_copy(const fake_main_t main, const f_mode_t mode, const f_string_t label, const f_string_static_t source, const f_string_static_t destination, const f_string_statics_t files, const f_string_static_t file_stage, const f_array_length_t preserve, f_status_t *status) f_attribute_visibility_internal; + extern void fake_build_copy(const fake_main_t main, const f_mode_t mode, const f_string_t label, const f_string_static_t source, const f_string_static_t destination, const f_string_statics_t files, const f_string_static_t file_stage, const f_array_length_t preserve, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_build_copy_ /** @@ -94,7 +94,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_skeleton_ - extern void fake_build_skeleton(const fake_main_t main, const fake_build_data_t data_build, const mode_t mode, const f_string_static_t file_stage, f_status_t *status) f_attribute_visibility_internal; + extern void fake_build_skeleton(const fake_main_t main, const fake_build_data_t data_build, const mode_t mode, const f_string_static_t file_stage, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_build_skeleton_ /** @@ -119,7 +119,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_execute_process_script_ - extern int fake_build_execute_process_script(const fake_main_t main, const fake_build_data_t data_build, const f_string_static_t process_script, const f_string_static_t file_stage, f_status_t *status) f_attribute_visibility_internal; + extern int fake_build_execute_process_script(const fake_main_t main, const fake_build_data_t data_build, const f_string_static_t process_script, const f_string_static_t file_stage, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_build_execute_process_script_ /** @@ -162,7 +162,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_libraries_script_ - extern int fake_build_libraries_script(const fake_main_t main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) f_attribute_visibility_internal; + extern int fake_build_libraries_script(const fake_main_t main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_build_libraries_script_ /** @@ -186,7 +186,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_library_shared_ - extern int fake_build_library_shared(const fake_main_t main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) f_attribute_visibility_internal; + extern int fake_build_library_shared(const fake_main_t main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_build_library_shared_ /** @@ -210,7 +210,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_library_static_ - extern int fake_build_library_static(const fake_main_t main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) f_attribute_visibility_internal; + extern int fake_build_library_static(const fake_main_t main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_build_library_static_ /** @@ -233,7 +233,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_load_setting_ - extern void fake_build_load_setting(const fake_main_t main, const f_string_static_t setting_file, fake_build_setting_t *setting, f_status_t *status) f_attribute_visibility_internal; + extern void fake_build_load_setting(const fake_main_t main, const f_string_static_t setting_file, fake_build_setting_t *setting, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_build_load_setting_ /** @@ -257,7 +257,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_load_setting_defaults_ - extern void fake_build_load_setting_defaults(const fake_main_t main, fake_build_setting_t *setting, f_status_t *status) f_attribute_visibility_internal; + extern void fake_build_load_setting_defaults(const fake_main_t main, fake_build_setting_t *setting, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_build_load_setting_defaults_ /** @@ -285,7 +285,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_load_setting_process_ - extern void fake_build_load_setting_process(const fake_main_t main, const f_string_t path_file, const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, fake_build_setting_t *setting, f_status_t *status) f_attribute_visibility_internal; + extern void fake_build_load_setting_process(const fake_main_t main, const f_string_t path_file, const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, fake_build_setting_t *setting, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_build_load_setting_process_ /** @@ -306,7 +306,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_load_environment_ - extern void fake_build_load_environment(const fake_main_t main, const fake_build_data_t data_build, f_string_maps_t *environment, f_status_t *status) f_attribute_visibility_internal; + extern void fake_build_load_environment(const fake_main_t main, const fake_build_data_t data_build, f_string_maps_t *environment, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_build_load_environment_ /** @@ -327,7 +327,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_load_stage_ - extern void fake_build_load_stage(const fake_main_t main, const f_string_static_t settings_file, fake_build_stage_t *stage, f_status_t *status) f_attribute_visibility_internal; + extern void fake_build_load_stage(const fake_main_t main, const f_string_static_t settings_file, fake_build_stage_t *stage, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_build_load_stage_ /** @@ -351,7 +351,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_objects_static_ - extern int fake_build_objects_static(const fake_main_t main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) f_attribute_visibility_internal; + extern int fake_build_objects_static(const fake_main_t main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_build_objects_static_ /** @@ -369,7 +369,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_operate_ - extern f_status_t fake_build_operate(const f_string_static_t setting_file, fake_main_t *main) f_attribute_visibility_internal; + extern f_status_t fake_build_operate(const f_string_static_t setting_file, fake_main_t *main) F_attribute_visibility_internal_d; #endif // _di_fake_build_operate_ /** @@ -393,7 +393,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_programs_script_ - extern int fake_build_programs_script(const fake_main_t main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) f_attribute_visibility_internal; + extern int fake_build_programs_script(const fake_main_t main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_build_programs_script_ /** @@ -417,7 +417,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_program_shared_ - extern int fake_build_program_shared(const fake_main_t main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) f_attribute_visibility_internal; + extern int fake_build_program_shared(const fake_main_t main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_build_program_shared_ /** @@ -441,7 +441,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_program_static_ - extern int fake_build_program_static(const fake_main_t main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) f_attribute_visibility_internal; + extern int fake_build_program_static(const fake_main_t main, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_build_program_static_ /** @@ -457,7 +457,7 @@ extern "C" { * @see f_file_touch() */ #ifndef _di_fake_build_touch_ - extern void fake_build_touch(const fake_main_t main, const f_string_dynamic_t file, f_status_t *status) f_attribute_visibility_internal; + extern void fake_build_touch(const fake_main_t main, const f_string_dynamic_t file, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_build_touch_ #ifdef __cplusplus diff --git a/level_3/fake/c/private-clean.c b/level_3/fake/c/private-clean.c index 28abd4c..974ce99 100644 --- a/level_3/fake/c/private-clean.c +++ b/level_3/fake/c/private-clean.c @@ -30,10 +30,10 @@ extern "C" { } if (main.error.verbosity == f_console_verbosity_verbose) { - status = f_directory_remove_custom(main.path_build.string, f_directory_descriptors_max, F_true, fake_clean_remove_recursively_verbosely); + status = f_directory_remove_custom(main.path_build.string, F_directory_descriptors_max_d, F_true, fake_clean_remove_recursively_verbosely); } else { - status = f_directory_remove(main.path_build.string, f_directory_descriptors_max, F_true); + status = f_directory_remove(main.path_build.string, F_directory_descriptors_max_d, F_true); } if (F_status_set_fine(status) == F_file_found_not) { diff --git a/level_3/fake/c/private-clean.h b/level_3/fake/c/private-clean.h index 1c4ed98..df483b3 100644 --- a/level_3/fake/c/private-clean.h +++ b/level_3/fake/c/private-clean.h @@ -24,7 +24,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_clean_operate_ - extern f_status_t fake_clean_operate(const fake_main_t main) f_attribute_visibility_internal; + extern f_status_t fake_clean_operate(const fake_main_t main) F_attribute_visibility_internal_d; #endif // _di_fake_clean_operate_ /** @@ -53,7 +53,7 @@ extern "C" { * @see remove() */ #if !defined(_di_fake_clean_operate_) - extern int fake_clean_remove_recursively_verbosely(const char *path, const struct stat *file_stat, int type, struct FTW *entity) f_attribute_visibility_internal; + extern int fake_clean_remove_recursively_verbosely(const char *path, const struct stat *file_stat, int type, struct FTW *entity) F_attribute_visibility_internal_d; #endif // !defined(_di_fake_clean_operate_) #ifdef __cplusplus diff --git a/level_3/fake/c/private-common.h b/level_3/fake/c/private-common.h index 8abe3f4..eef15d4 100644 --- a/level_3/fake/c/private-common.h +++ b/level_3/fake/c/private-common.h @@ -172,119 +172,119 @@ extern "C" { macro_f_string_dynamics_t_delete_simple(setting.modes); \ macro_f_string_dynamics_t_delete_simple(setting.modes_default); - #define fake_build_setting_name_build_compiler "build_compiler" - #define fake_build_setting_name_build_language "build_language" - #define fake_build_setting_name_build_libraries "build_libraries" - #define fake_build_setting_name_build_indexer "build_indexer" - #define fake_build_setting_name_build_script "build_script" - #define fake_build_setting_name_build_shared "build_shared" - #define fake_build_setting_name_build_sources_headers "build_sources_headers" - #define fake_build_setting_name_build_sources_library "build_sources_library" - #define fake_build_setting_name_build_sources_program "build_sources_program" - #define fake_build_setting_name_build_sources_script "build_sources_script" - #define fake_build_setting_name_build_sources_settings "build_sources_setting" - #define fake_build_setting_name_build_static "build_static" - #define fake_build_setting_name_defines_all "defines_all" - #define fake_build_setting_name_defines_library "defines_library" - #define fake_build_setting_name_defines_program "defines_program" - #define fake_build_setting_name_defines_shared "defines_shared" - #define fake_build_setting_name_defines_static "defines_static" - #define fake_build_setting_name_environment "environment" - #define fake_build_setting_name_flags_all "flags_all" - #define fake_build_setting_name_flags_library "flags_library" - #define fake_build_setting_name_flags_program "flags_program" - #define fake_build_setting_name_flags_shared "flags_shared" - #define fake_build_setting_name_flags_static "flags_static" - #define fake_build_setting_name_modes "modes" - #define fake_build_setting_name_modes_default "modes_default" - #define fake_build_setting_name_path_headers "path_headers" - #define fake_build_setting_name_path_headers_preserve "path_headers_preserve" - #define fake_build_setting_name_path_language "path_language" - #define fake_build_setting_name_path_library_script "path_library_script" - #define fake_build_setting_name_path_library_shared "path_library_shared" - #define fake_build_setting_name_path_library_static "path_library_static" - #define fake_build_setting_name_path_program_script "path_program_script" - #define fake_build_setting_name_path_program_shared "path_program_shared" - #define fake_build_setting_name_path_program_static "path_program_static" - #define fake_build_setting_name_path_sources "path_sources" - #define fake_build_setting_name_path_standard "path_standard" - #define fake_build_setting_name_process_post "process_post" - #define fake_build_setting_name_process_pre "process_pre" - #define fake_build_setting_name_project_name "project_name" - #define fake_build_setting_name_search_exclusive "search_exclusive" - #define fake_build_setting_name_search_shared "search_shared" - #define fake_build_setting_name_search_static "search_static" - #define fake_build_setting_name_version_file "version_file" - #define fake_build_setting_name_version_major "version_major" - #define fake_build_setting_name_version_major_prefix "version_major_prefix" - #define fake_build_setting_name_version_micro "version_micro" - #define fake_build_setting_name_version_micro_prefix "version_micro_prefix" - #define fake_build_setting_name_version_minor "version_minor" - #define fake_build_setting_name_version_minor_prefix "version_minor_prefix" - #define fake_build_setting_name_version_nano "version_nano" - #define fake_build_setting_name_version_nano_prefix "version_nano_prefix" - #define fake_build_setting_name_version_target "version_target" - - #define fake_build_setting_name_build_compiler_length 14 - #define fake_build_setting_name_build_language_length 14 - #define fake_build_setting_name_build_libraries_length 15 - #define fake_build_setting_name_build_indexer_length 13 - #define fake_build_setting_name_build_script_length 12 - #define fake_build_setting_name_build_shared_length 12 - #define fake_build_setting_name_build_sources_headers_length 21 - #define fake_build_setting_name_build_sources_library_length 21 - #define fake_build_setting_name_build_sources_program_length 21 - #define fake_build_setting_name_build_sources_script_length 20 - #define fake_build_setting_name_build_sources_settings_length 22 - #define fake_build_setting_name_build_static_length 12 - #define fake_build_setting_name_environment_length 11 - #define fake_build_setting_name_defines_all_length 11 - #define fake_build_setting_name_defines_library_length 15 - #define fake_build_setting_name_defines_program_length 15 - #define fake_build_setting_name_defines_shared_length 14 - #define fake_build_setting_name_defines_static_length 14 - #define fake_build_setting_name_flags_all_length 9 - #define fake_build_setting_name_flags_library_length 13 - #define fake_build_setting_name_flags_program_length 13 - #define fake_build_setting_name_flags_shared_length 12 - #define fake_build_setting_name_flags_static_length 12 - #define fake_build_setting_name_modes_length 5 - #define fake_build_setting_name_modes_default_length 13 - #define fake_build_setting_name_path_headers_length 12 - #define fake_build_setting_name_path_headers_preserve_length 21 - #define fake_build_setting_name_path_language_length 13 - #define fake_build_setting_name_path_library_script_length 19 - #define fake_build_setting_name_path_library_shared_length 19 - #define fake_build_setting_name_path_library_static_length 19 - #define fake_build_setting_name_path_program_script_length 19 - #define fake_build_setting_name_path_program_shared_length 19 - #define fake_build_setting_name_path_program_static_length 19 - #define fake_build_setting_name_path_sources_length 12 - #define fake_build_setting_name_path_standard_length 13 - #define fake_build_setting_name_process_post_length 12 - #define fake_build_setting_name_process_pre_length 11 - #define fake_build_setting_name_project_name_length 12 - #define fake_build_setting_name_search_exclusive_length 16 - #define fake_build_setting_name_search_shared_length 13 - #define fake_build_setting_name_search_static_length 13 - #define fake_build_setting_name_version_file_length 12 - #define fake_build_setting_name_version_major_length 13 - #define fake_build_setting_name_version_major_prefix_length 20 - #define fake_build_setting_name_version_micro_length 13 - #define fake_build_setting_name_version_micro_prefix_length 20 - #define fake_build_setting_name_version_minor_length 13 - #define fake_build_setting_name_version_minor_prefix_length 20 - #define fake_build_setting_name_version_nano_length 12 - #define fake_build_setting_name_version_nano_prefix_length 19 - #define fake_build_setting_name_version_target_length 14 - - #define fake_build_setting_total 52 - - #define fake_build_setting_default_version "0" - #define fake_build_setting_default_version_prefix "." - - #define fake_build_setting_default_version_length 1 - #define fake_build_setting_default_version_prefix_length 1 + #define fake_build_setting_name_build_compiler_s "build_compiler" + #define fake_build_setting_name_build_language_s "build_language" + #define fake_build_setting_name_build_libraries_s "build_libraries" + #define fake_build_setting_name_build_indexer_s "build_indexer" + #define fake_build_setting_name_build_script_s "build_script" + #define fake_build_setting_name_build_shared_s "build_shared" + #define fake_build_setting_name_build_sources_headers_s "build_sources_headers" + #define fake_build_setting_name_build_sources_library_s "build_sources_library" + #define fake_build_setting_name_build_sources_program_s "build_sources_program" + #define fake_build_setting_name_build_sources_script_s "build_sources_script" + #define fake_build_setting_name_build_sources_settings_s "build_sources_setting" + #define fake_build_setting_name_build_static_s "build_static" + #define fake_build_setting_name_defines_all_s "defines_all" + #define fake_build_setting_name_defines_library_s "defines_library" + #define fake_build_setting_name_defines_program_s "defines_program" + #define fake_build_setting_name_defines_shared_s "defines_shared" + #define fake_build_setting_name_defines_static_s "defines_static" + #define fake_build_setting_name_environment_s "environment" + #define fake_build_setting_name_flags_all_s "flags_all" + #define fake_build_setting_name_flags_library_s "flags_library" + #define fake_build_setting_name_flags_program_s "flags_program" + #define fake_build_setting_name_flags_shared_s "flags_shared" + #define fake_build_setting_name_flags_static_s "flags_static" + #define fake_build_setting_name_modes_s "modes" + #define fake_build_setting_name_modes_default_s "modes_default" + #define fake_build_setting_name_path_headers_s "path_headers" + #define fake_build_setting_name_path_headers_preserve_s "path_headers_preserve" + #define fake_build_setting_name_path_language_s "path_language" + #define fake_build_setting_name_path_library_script_s "path_library_script" + #define fake_build_setting_name_path_library_shared_s "path_library_shared" + #define fake_build_setting_name_path_library_static_s "path_library_static" + #define fake_build_setting_name_path_program_script_s "path_program_script" + #define fake_build_setting_name_path_program_shared_s "path_program_shared" + #define fake_build_setting_name_path_program_static_s "path_program_static" + #define fake_build_setting_name_path_sources_s "path_sources" + #define fake_build_setting_name_path_standard_s "path_standard" + #define fake_build_setting_name_process_post_s "process_post" + #define fake_build_setting_name_process_pre_s "process_pre" + #define fake_build_setting_name_project_name_s "project_name" + #define fake_build_setting_name_search_exclusive_s "search_exclusive" + #define fake_build_setting_name_search_shared_s "search_shared" + #define fake_build_setting_name_search_static_s "search_static" + #define fake_build_setting_name_version_file_s "version_file" + #define fake_build_setting_name_version_major_s "version_major" + #define fake_build_setting_name_version_major_prefix_s "version_major_prefix" + #define fake_build_setting_name_version_micro_s "version_micro" + #define fake_build_setting_name_version_micro_prefix_s "version_micro_prefix" + #define fake_build_setting_name_version_minor_s "version_minor" + #define fake_build_setting_name_version_minor_prefix_s "version_minor_prefix" + #define fake_build_setting_name_version_nano_s "version_nano" + #define fake_build_setting_name_version_nano_prefix_s "version_nano_prefix" + #define fake_build_setting_name_version_target_s "version_target" + + #define fake_build_setting_name_build_compiler_s_length 14 + #define fake_build_setting_name_build_language_s_length 14 + #define fake_build_setting_name_build_libraries_s_length 15 + #define fake_build_setting_name_build_indexer_s_length 13 + #define fake_build_setting_name_build_script_s_length 12 + #define fake_build_setting_name_build_shared_s_length 12 + #define fake_build_setting_name_build_sources_headers_s_length 21 + #define fake_build_setting_name_build_sources_library_s_length 21 + #define fake_build_setting_name_build_sources_program_s_length 21 + #define fake_build_setting_name_build_sources_script_s_length 20 + #define fake_build_setting_name_build_sources_settings_s_length 22 + #define fake_build_setting_name_build_static_s_length 12 + #define fake_build_setting_name_environment_length_s 11 + #define fake_build_setting_name_defines_all_s_length 11 + #define fake_build_setting_name_defines_library_s_length 15 + #define fake_build_setting_name_defines_program_s_length 15 + #define fake_build_setting_name_defines_shared_s_length 14 + #define fake_build_setting_name_defines_static_s_length 14 + #define fake_build_setting_name_flags_all_s_length 9 + #define fake_build_setting_name_flags_library_s_length 13 + #define fake_build_setting_name_flags_program_s_length 13 + #define fake_build_setting_name_flags_shared_s_length 12 + #define fake_build_setting_name_flags_static_s_length 12 + #define fake_build_setting_name_modes_s_length 5 + #define fake_build_setting_name_modes_default_s_length 13 + #define fake_build_setting_name_path_headers_s_length 12 + #define fake_build_setting_name_path_headers_preserve_s_length 21 + #define fake_build_setting_name_path_language_s_length 13 + #define fake_build_setting_name_path_library_script_s_length 19 + #define fake_build_setting_name_path_library_shared_s_length 19 + #define fake_build_setting_name_path_library_static_s_length 19 + #define fake_build_setting_name_path_program_script_s_length 19 + #define fake_build_setting_name_path_program_shared_s_length 19 + #define fake_build_setting_name_path_program_static_s_length 19 + #define fake_build_setting_name_path_sources_s_length 12 + #define fake_build_setting_name_path_standard_s_length 13 + #define fake_build_setting_name_process_post_s_length 12 + #define fake_build_setting_name_process_pre_s_length 11 + #define fake_build_setting_name_project_name_s_length 12 + #define fake_build_setting_name_search_exclusive_s_length 16 + #define fake_build_setting_name_search_shared_s_length 13 + #define fake_build_setting_name_search_static_s_length 13 + #define fake_build_setting_name_version_file_s_length 12 + #define fake_build_setting_name_version_major_s_length 13 + #define fake_build_setting_name_version_major_prefix_s_length 20 + #define fake_build_setting_name_version_micro_s_length 13 + #define fake_build_setting_name_version_micro_prefix_s_length 20 + #define fake_build_setting_name_version_minor_s_length 13 + #define fake_build_setting_name_version_minor_prefix_s_length 20 + #define fake_build_setting_name_version_nano_s_length 12 + #define fake_build_setting_name_version_nano_prefix_s_length 19 + #define fake_build_setting_name_version_target_s_length 14 + + #define fake_build_setting_total_d 52 + + #define fake_build_setting_default_version_s "0" + #define fake_build_setting_default_version_prefix_s "." + + #define fake_build_setting_default_version_s_length 1 + #define fake_build_setting_default_version_prefix_s_length 1 #endif // _di_fake_build_setting_t_ #ifndef _di_fake_build_stage_t_ @@ -320,7 +320,7 @@ extern "C" { f_string_dynamic_t_initialize, \ } - #define fake_build_stage_total 13 + #define fake_build_stage_total_d 13 #define macro_fake_build_stage_t_delete_simple(stage) \ macro_f_string_dynamic_t_delete_simple(stage.file_libraries_script); \ @@ -337,37 +337,37 @@ extern "C" { macro_f_string_dynamic_t_delete_simple(stage.file_sources_script); \ macro_f_string_dynamic_t_delete_simple(stage.file_sources_settings); - #define fake_build_stage_built ".built" - #define fake_build_stage_libraries_script "libraries_script" - #define fake_build_stage_libraries_shared "libraries_shared" - #define fake_build_stage_libraries_static "libraries_static" - #define fake_build_stage_objects_static "objects_static" - #define fake_build_stage_process_post "process_post" - #define fake_build_stage_process_pre "process_pre" - #define fake_build_stage_programs_script "programs_script" - #define fake_build_stage_programs_shared "programs_shared" - #define fake_build_stage_programs_static "programs_static" - #define fake_build_stage_separate "-" - #define fake_build_stage_skeleton "skeleton" - #define fake_build_stage_sources_headers "sources_headers" - #define fake_build_stage_sources_script "sources_script" - #define fake_build_stage_sources_settings "sources_settings" - - #define fake_build_stage_built_length 6 - #define fake_build_stage_libraries_script_length 16 - #define fake_build_stage_libraries_shared_length 16 - #define fake_build_stage_libraries_static_length 16 - #define fake_build_stage_objects_static_length 14 - #define fake_build_stage_process_post_length 12 - #define fake_build_stage_process_pre_length 11 - #define fake_build_stage_programs_script_length 15 - #define fake_build_stage_programs_shared_length 15 - #define fake_build_stage_programs_static_length 15 - #define fake_build_stage_separate_length 1 - #define fake_build_stage_skeleton_length 8 - #define fake_build_stage_sources_headers_length 15 - #define fake_build_stage_sources_script_length 14 - #define fake_build_stage_sources_settings_length 16 + #define fake_build_stage_built_s ".built" + #define fake_build_stage_libraries_script_s "libraries_script" + #define fake_build_stage_libraries_shared_s "libraries_shared" + #define fake_build_stage_libraries_static_s "libraries_static" + #define fake_build_stage_objects_static_s "objects_static" + #define fake_build_stage_process_post_s "process_post" + #define fake_build_stage_process_pre_s "process_pre" + #define fake_build_stage_programs_script_s "programs_script" + #define fake_build_stage_programs_shared_s "programs_shared" + #define fake_build_stage_programs_static_s "programs_static" + #define fake_build_stage_separate_s "-" + #define fake_build_stage_skeleton_s "skeleton" + #define fake_build_stage_sources_headers_s "sources_headers" + #define fake_build_stage_sources_script_s "sources_script" + #define fake_build_stage_sources_settings_s "sources_settings" + + #define fake_build_stage_built_s_length 6 + #define fake_build_stage_libraries_script_s_length 16 + #define fake_build_stage_libraries_shared_s_length 16 + #define fake_build_stage_libraries_static_s_length 16 + #define fake_build_stage_objects_static_s_length 14 + #define fake_build_stage_process_post_s_length 12 + #define fake_build_stage_process_pre_s_length 11 + #define fake_build_stage_programs_script_s_length 15 + #define fake_build_stage_programs_shared_s_length 15 + #define fake_build_stage_programs_static_s_length 15 + #define fake_build_stage_separate_s_length 1 + #define fake_build_stage_skeleton_s_length 8 + #define fake_build_stage_sources_headers_s_length 15 + #define fake_build_stage_sources_script_s_length 14 + #define fake_build_stage_sources_settings_s_length 16 #endif // _di_fake_build_stage_t_ #ifndef _di_fake_build_data_t_ @@ -387,41 +387,41 @@ extern "C" { #endif // _di_fake_build_data_t_ #ifndef _di_fake_build_parameter_ - #define fake_build_parameter_library_include "-I" - #define fake_build_parameter_library_link_file "-l" - #define fake_build_parameter_library_link_path "-L" - #define fake_build_parameter_library_name_prefix "lib" - #define fake_build_parameter_library_name_suffix_shared ".so" - #define fake_build_parameter_library_name_suffix_static ".a" - #define fake_build_parameter_library_output "-o" - #define fake_build_parameter_library_shared "-shared" - #define fake_build_parameter_library_static "-static" - #define fake_build_parameter_library_shared_prefix "-Wl,-soname," - - #define fake_build_parameter_library_include_length 2 - #define fake_build_parameter_library_link_file_length 2 - #define fake_build_parameter_library_link_path_length 2 - #define fake_build_parameter_library_name_prefix_length 3 - #define fake_build_parameter_library_name_suffix_shared_length 3 - #define fake_build_parameter_library_name_suffix_static_length 2 - #define fake_build_parameter_library_output_length 2 - #define fake_build_parameter_library_shared_length 7 - #define fake_build_parameter_library_static_length 7 - #define fake_build_parameter_library_shared_prefix_length 12 - - #define fake_build_parameter_object_compile "-c" - #define fake_build_parameter_object_name_suffix ".o" - #define fake_build_parameter_object_output "-o" - #define fake_build_parameter_object_static "-static" - - #define fake_build_parameter_object_compile_length 2 - #define fake_build_parameter_object_name_suffix_length 2 - #define fake_build_parameter_object_output_length 2 - #define fake_build_parameter_object_static_length 7 - - #define fake_build_parameter_object_link_arguments "rcs" - - #define fake_build_parameter_object_link_arguments_length 3 + #define fake_build_parameter_library_include_s "-I" + #define fake_build_parameter_library_link_file_s "-l" + #define fake_build_parameter_library_link_path_s "-L" + #define fake_build_parameter_library_name_prefix_s "lib" + #define fake_build_parameter_library_name_suffix_shared_s ".so" + #define fake_build_parameter_library_name_suffix_static_s ".a" + #define fake_build_parameter_library_output_s "-o" + #define fake_build_parameter_library_shared_s "-shared" + #define fake_build_parameter_library_static_s "-static" + #define fake_build_parameter_library_shared_prefix_s "-Wl,-soname," + + #define fake_build_parameter_library_include_s_length 2 + #define fake_build_parameter_library_link_file_s_length 2 + #define fake_build_parameter_library_link_path_s_length 2 + #define fake_build_parameter_library_name_prefix_s_length 3 + #define fake_build_parameter_library_name_suffix_shared_s_length 3 + #define fake_build_parameter_library_name_suffix_static_s_length 2 + #define fake_build_parameter_library_output_s_length 2 + #define fake_build_parameter_library_shared_s_length 7 + #define fake_build_parameter_library_static_s_length 7 + #define fake_build_parameter_library_shared_prefix_s_length 12 + + #define fake_build_parameter_object_compile_s "-c" + #define fake_build_parameter_object_name_suffix_s ".o" + #define fake_build_parameter_object_output_s "-o" + #define fake_build_parameter_object_static_s "-static" + + #define fake_build_parameter_object_compile_s_length 2 + #define fake_build_parameter_object_name_suffix_s_length 2 + #define fake_build_parameter_object_output_s_length 2 + #define fake_build_parameter_object_static_s_length 7 + + #define fake_build_parameter_object_link_arguments_s "rcs" + + #define fake_build_parameter_object_link_arguments_s_length 3 #endif // _di_fake_build_parameter_ /** @@ -432,26 +432,26 @@ extern "C" { * - small: An allocation step used for buffers that are anticipated to have small buffers. */ #ifndef _di_fake_common_ - #define fake_common_allocation_large 256 - #define fake_common_allocation_small 16 + #define fake_common_allocation_large_d 256 + #define fake_common_allocation_small_d 16 - #define fake_common_initial_buffer_max 131072 // 128k max default initial buffer size. + #define fake_common_initial_buffer_max_d 131072 // 128k max default initial buffer size. - #define fake_common_setting_bool_yes "yes" - #define fake_common_setting_bool_no "no" + #define fake_common_setting_bool_yes_s "yes" + #define fake_common_setting_bool_no_s "no" - #define fake_common_setting_bool_yes_length 3 - #define fake_common_setting_bool_no_length 2 + #define fake_common_setting_bool_yes_s_length 3 + #define fake_common_setting_bool_no_s_length 2 #endif // _di_fake_common_ #ifndef _di_fake_make_section_ - #define fake_make_section_main "main" - #define fake_make_section_settings "settings" + #define fake_make_section_main_s "main" + #define fake_make_section_settings_s "settings" - #define fake_make_section_main_length 4 - #define fake_make_section_settings_length 8 + #define fake_make_section_main_s_length 4 + #define fake_make_section_settings_s_length 8 - #define fake_make_section_stack_max 8192 // maximum stack call depth. + #define fake_make_section_stack_max_d 8192 // maximum stack call depth. #endif // _di_fake_make_section_ #ifndef _di_fake_make_setting_t_ @@ -472,89 +472,89 @@ extern "C" { #define macro_fake_make_setting_t_delete_simple(setting) \ macro_f_string_map_multis_t_delete_simple(setting.parameter) - #define fake_make_setting_compiler "compiler" - #define fake_make_setting_define "define" - #define fake_make_setting_environment "environment" - #define fake_make_setting_fail "fail" - #define fake_make_setting_linker "linker" - #define fake_make_setting_load_build "load_build" - #define fake_make_setting_parameter "parameter" - #define fake_make_setting_return "return" - - #define fake_make_setting_compiler_length 8 - #define fake_make_setting_define_length 6 - #define fake_make_setting_environment_length 11 - #define fake_make_setting_fail_length 4 - #define fake_make_setting_linker_length 6 - #define fake_make_setting_load_build_length 10 - #define fake_make_setting_parameter_length 9 - #define fake_make_setting_return_length 6 + #define fake_make_setting_compiler_s "compiler" + #define fake_make_setting_define_s "define" + #define fake_make_setting_environment_s "environment" + #define fake_make_setting_fail_s "fail" + #define fake_make_setting_linker_s "linker" + #define fake_make_setting_load_build_s "load_build" + #define fake_make_setting_parameter_s "parameter" + #define fake_make_setting_return_s "return" + + #define fake_make_setting_compiler_s_length 8 + #define fake_make_setting_define_s_length 6 + #define fake_make_setting_environment_s_length 11 + #define fake_make_setting_fail_s_length 4 + #define fake_make_setting_linker_s_length 6 + #define fake_make_setting_load_build_s_length 10 + #define fake_make_setting_parameter_s_length 9 + #define fake_make_setting_return_s_length 6 #endif // _di_fake_make_setting_t_ #ifndef _di_fake_make_operation_ - #define fake_make_operation_break "break" - #define fake_make_operation_build "build" - #define fake_make_operation_clean "clean" - #define fake_make_operation_clone "clone" - #define fake_make_operation_compile "compile" - #define fake_make_operation_copy "copy" - #define fake_make_operation_define "define" - #define fake_make_operation_delete "delete" - #define fake_make_operation_deletes "deletes" - #define fake_make_operation_else "else" - #define fake_make_operation_exit "exit" - #define fake_make_operation_fail "fail" - #define fake_make_operation_group "group" - #define fake_make_operation_groups "groups" - #define fake_make_operation_if "if" - #define fake_make_operation_index "index" - #define fake_make_operation_link "link" - #define fake_make_operation_mode "mode" - #define fake_make_operation_modes "modes" - #define fake_make_operation_move "move" - #define fake_make_operation_operate "operate" - #define fake_make_operation_owner "owner" - #define fake_make_operation_owners "owners" - #define fake_make_operation_pop "pop" - #define fake_make_operation_print "print" - #define fake_make_operation_run "run" - #define fake_make_operation_shell "shell" - #define fake_make_operation_skeleton "skeleton" - #define fake_make_operation_to "to" - #define fake_make_operation_top "top" - #define fake_make_operation_touch "touch" - - #define fake_make_operation_break_length 5 - #define fake_make_operation_build_length 5 - #define fake_make_operation_clean_length 5 - #define fake_make_operation_clone_length 5 - #define fake_make_operation_compile_length 7 - #define fake_make_operation_copy_length 4 - #define fake_make_operation_define_length 6 - #define fake_make_operation_delete_length 6 - #define fake_make_operation_deletes_length 7 - #define fake_make_operation_else_length 4 - #define fake_make_operation_exit_length 4 - #define fake_make_operation_fail_length 4 - #define fake_make_operation_group_length 5 - #define fake_make_operation_groups_length 6 - #define fake_make_operation_if_length 2 - #define fake_make_operation_index_length 5 - #define fake_make_operation_link_length 4 - #define fake_make_operation_mode_length 4 - #define fake_make_operation_modes_length 5 - #define fake_make_operation_move_length 4 - #define fake_make_operation_operate_length 7 - #define fake_make_operation_owner_length 5 - #define fake_make_operation_owners_length 6 - #define fake_make_operation_pop_length 3 - #define fake_make_operation_print_length 5 - #define fake_make_operation_run_length 3 - #define fake_make_operation_shell_length 5 - #define fake_make_operation_skeleton_length 8 - #define fake_make_operation_to_length 2 - #define fake_make_operation_top_length 3 - #define fake_make_operation_touch_length 5 + #define fake_make_operation_break_s "break" + #define fake_make_operation_build_s "build" + #define fake_make_operation_clean_s "clean" + #define fake_make_operation_clone_s "clone" + #define fake_make_operation_compile_s "compile" + #define fake_make_operation_copy_s "copy" + #define fake_make_operation_define_s "define" + #define fake_make_operation_delete_s "delete" + #define fake_make_operation_deletes_s "deletes" + #define fake_make_operation_else_s "else" + #define fake_make_operation_exit_s "exit" + #define fake_make_operation_fail_s "fail" + #define fake_make_operation_group_s "group" + #define fake_make_operation_groups_s "groups" + #define fake_make_operation_if_s "if" + #define fake_make_operation_index_s "index" + #define fake_make_operation_link_s "link" + #define fake_make_operation_mode_s "mode" + #define fake_make_operation_modes_s "modes" + #define fake_make_operation_move_s "move" + #define fake_make_operation_operate_s "operate" + #define fake_make_operation_owner_s "owner" + #define fake_make_operation_owners_s "owners" + #define fake_make_operation_pop_s "pop" + #define fake_make_operation_print_s "print" + #define fake_make_operation_run_s "run" + #define fake_make_operation_shell_s "shell" + #define fake_make_operation_skeleton_s "skeleton" + #define fake_make_operation_to_s "to" + #define fake_make_operation_top_s "top" + #define fake_make_operation_touch_s "touch" + + #define fake_make_operation_break_s_length 5 + #define fake_make_operation_build_s_length 5 + #define fake_make_operation_clean_s_length 5 + #define fake_make_operation_clone_s_length 5 + #define fake_make_operation_compile_s_length 7 + #define fake_make_operation_copy_s_length 4 + #define fake_make_operation_define_s_length 6 + #define fake_make_operation_delete_s_length 6 + #define fake_make_operation_deletes_s_length 7 + #define fake_make_operation_else_s_length 4 + #define fake_make_operation_exit_s_length 4 + #define fake_make_operation_fail_s_length 4 + #define fake_make_operation_group_s_length 5 + #define fake_make_operation_groups_s_length 6 + #define fake_make_operation_if_s_length 2 + #define fake_make_operation_index_s_length 5 + #define fake_make_operation_link_s_length 4 + #define fake_make_operation_mode_s_length 4 + #define fake_make_operation_modes_s_length 5 + #define fake_make_operation_move_s_length 4 + #define fake_make_operation_operate_s_length 7 + #define fake_make_operation_owner_s_length 5 + #define fake_make_operation_owners_s_length 6 + #define fake_make_operation_pop_s_length 3 + #define fake_make_operation_print_s_length 5 + #define fake_make_operation_run_s_length 3 + #define fake_make_operation_shell_s_length 5 + #define fake_make_operation_skeleton_s_length 8 + #define fake_make_operation_to_s_length 2 + #define fake_make_operation_top_s_length 3 + #define fake_make_operation_touch_s_length 5 enum { fake_make_operation_type_break = 1, @@ -590,71 +590,71 @@ extern "C" { fake_make_operation_type_touch, }; - #define fake_make_operation_total 31 - - #define fake_make_operation_argument_environment "environment" - #define fake_make_operation_argument_failure "failure" - #define fake_make_operation_argument_file "file" - #define fake_make_operation_argument_directory "directory" - #define fake_make_operation_argument_error "error" - #define fake_make_operation_argument_exit "exit" - #define fake_make_operation_argument_has "has" - #define fake_make_operation_argument_ignore "ignore" - #define fake_make_operation_argument_is "is" - #define fake_make_operation_argument_parameter "parameter" - #define fake_make_operation_argument_point "point" - #define fake_make_operation_argument_recursive "recursive" - #define fake_make_operation_argument_success "success" - #define fake_make_operation_argument_target "target" - #define fake_make_operation_argument_warn "warn" - - #define fake_make_operation_argument_environment_length 11 - #define fake_make_operation_argument_failure_length 7 - #define fake_make_operation_argument_file_length 4 - #define fake_make_operation_argument_directory_length 9 - #define fake_make_operation_argument_error_length 5 - #define fake_make_operation_argument_exit_length 4 - #define fake_make_operation_argument_has_length 3 - #define fake_make_operation_argument_ignore_length 6 - #define fake_make_operation_argument_is_length 2 - #define fake_make_operation_argument_parameter_length 9 - #define fake_make_operation_argument_point_length 5 - #define fake_make_operation_argument_recursive_length 9 - #define fake_make_operation_argument_success_length 7 - #define fake_make_operation_argument_target_length 6 - #define fake_make_operation_argument_warn_length 4 - - #define fake_make_operation_argument_if_defined "defined" - #define fake_make_operation_argument_if_equal "==" - #define fake_make_operation_argument_if_equal_not "<>" - #define fake_make_operation_argument_if_exists "exists" - #define fake_make_operation_argument_if_failure "failure" - #define fake_make_operation_argument_if_greater ">" - #define fake_make_operation_argument_if_greater_equal ">=" - #define fake_make_operation_argument_if_group "group" - #define fake_make_operation_argument_if_is "is" - #define fake_make_operation_argument_if_is_for "for" - #define fake_make_operation_argument_if_less "<" - #define fake_make_operation_argument_if_less_equal "<=" - #define fake_make_operation_argument_if_mode "mode" - #define fake_make_operation_argument_if_owner "owner" - #define fake_make_operation_argument_if_success "success" - - #define fake_make_operation_argument_if_defined_length 7 - #define fake_make_operation_argument_if_equal_length 2 - #define fake_make_operation_argument_if_equal_not_length 2 - #define fake_make_operation_argument_if_exists_length 6 - #define fake_make_operation_argument_if_failure_length 7 - #define fake_make_operation_argument_if_greater_length 1 - #define fake_make_operation_argument_if_greater_equal_length 2 - #define fake_make_operation_argument_if_group_length 5 - #define fake_make_operation_argument_if_is_length 2 - #define fake_make_operation_argument_if_is_for_length 3 - #define fake_make_operation_argument_if_less_length 1 - #define fake_make_operation_argument_if_less_equal_length 2 - #define fake_make_operation_argument_if_mode_length 4 - #define fake_make_operation_argument_if_owner_length 5 - #define fake_make_operation_argument_if_success_length 7 + #define fake_make_operation_total_d 31 + + #define fake_make_operation_argument_environment_s "environment" + #define fake_make_operation_argument_failure_s "failure" + #define fake_make_operation_argument_file_s "file" + #define fake_make_operation_argument_directory_s "directory" + #define fake_make_operation_argument_error_s "error" + #define fake_make_operation_argument_exit_s "exit" + #define fake_make_operation_argument_has_s "has" + #define fake_make_operation_argument_ignore_s "ignore" + #define fake_make_operation_argument_is_s "is" + #define fake_make_operation_argument_parameter_s "parameter" + #define fake_make_operation_argument_point_s "point" + #define fake_make_operation_argument_recursive_s "recursive" + #define fake_make_operation_argument_success_s "success" + #define fake_make_operation_argument_target_s "target" + #define fake_make_operation_argument_warn_s "warn" + + #define fake_make_operation_argument_environment_s_length 11 + #define fake_make_operation_argument_failure_s_length 7 + #define fake_make_operation_argument_file_s_length 4 + #define fake_make_operation_argument_directory_s_length 9 + #define fake_make_operation_argument_error_s_length 5 + #define fake_make_operation_argument_exit_s_length 4 + #define fake_make_operation_argument_has_s_length 3 + #define fake_make_operation_argument_ignore_s_length 6 + #define fake_make_operation_argument_is_s_length 2 + #define fake_make_operation_argument_parameter_s_length 9 + #define fake_make_operation_argument_point_s_length 5 + #define fake_make_operation_argument_recursive_s_length 9 + #define fake_make_operation_argument_success_s_length 7 + #define fake_make_operation_argument_target_s_length 6 + #define fake_make_operation_argument_warn_s_length 4 + + #define fake_make_operation_argument_if_defined_s "defined" + #define fake_make_operation_argument_if_equal_s "==" + #define fake_make_operation_argument_if_equal_not_s "<>" + #define fake_make_operation_argument_if_exists_s "exists" + #define fake_make_operation_argument_if_failure_s "failure" + #define fake_make_operation_argument_if_greater_s ">" + #define fake_make_operation_argument_if_greater_equal_s ">=" + #define fake_make_operation_argument_if_group_s "group" + #define fake_make_operation_argument_if_is_s "is" + #define fake_make_operation_argument_if_is_for_s "for" + #define fake_make_operation_argument_if_less_s "<" + #define fake_make_operation_argument_if_less_equal_s "<=" + #define fake_make_operation_argument_if_mode_s "mode" + #define fake_make_operation_argument_if_owner_s "owner" + #define fake_make_operation_argument_if_success_s "success" + + #define fake_make_operation_argument_if_defined_s_length 7 + #define fake_make_operation_argument_if_equal_s_length 2 + #define fake_make_operation_argument_if_equal_not_s_length 2 + #define fake_make_operation_argument_if_exists_s_length 6 + #define fake_make_operation_argument_if_failure_s_length 7 + #define fake_make_operation_argument_if_greater_s_length 1 + #define fake_make_operation_argument_if_greater_equal_s_length 2 + #define fake_make_operation_argument_if_group_s_length 5 + #define fake_make_operation_argument_if_is_s_length 2 + #define fake_make_operation_argument_if_is_for_s_length 3 + #define fake_make_operation_argument_if_less_s_length 1 + #define fake_make_operation_argument_if_less_equal_s_length 2 + #define fake_make_operation_argument_if_mode_s_length 4 + #define fake_make_operation_argument_if_owner_s_length 5 + #define fake_make_operation_argument_if_success_s_length 7 enum { fake_make_operation_if_type_else_false = 1, @@ -690,35 +690,35 @@ extern "C" { fake_make_operation_fail_type_ignore, }; - #define fake_make_operation_recursion_depth_max 65535 + #define fake_make_operation_recursion_depth_max_d 65535 #endif // _di_fake_make_operation_ #ifndef _di_fake_make_parameter_t_ - #define fake_make_parameter_variable_build "build" - #define fake_make_parameter_variable_color "color" - #define fake_make_parameter_variable_data "data" - #define fake_make_parameter_variable_define "define" - #define fake_make_parameter_variable_fakefile "fakefile" - #define fake_make_parameter_variable_mode "mode" - #define fake_make_parameter_variable_process "process" - #define fake_make_parameter_variable_return "return" - #define fake_make_parameter_variable_settings "settings" - #define fake_make_parameter_variable_sources "sources" - #define fake_make_parameter_variable_verbosity "verbosity" - #define fake_make_parameter_variable_work "work" - - #define fake_make_parameter_variable_build_length 5 - #define fake_make_parameter_variable_color_length 5 - #define fake_make_parameter_variable_data_length 4 - #define fake_make_parameter_variable_define_length 6 - #define fake_make_parameter_variable_fakefile_length 8 - #define fake_make_parameter_variable_mode_length 4 - #define fake_make_parameter_variable_process_length 7 - #define fake_make_parameter_variable_return_length 6 - #define fake_make_parameter_variable_settings_length 8 - #define fake_make_parameter_variable_sources_length 7 - #define fake_make_parameter_variable_verbosity_length 9 - #define fake_make_parameter_variable_work_length 4 + #define fake_make_parameter_variable_build_s "build" + #define fake_make_parameter_variable_color_s "color" + #define fake_make_parameter_variable_data_s "data" + #define fake_make_parameter_variable_define_s "define" + #define fake_make_parameter_variable_fakefile_s "fakefile" + #define fake_make_parameter_variable_mode_s "mode" + #define fake_make_parameter_variable_process_s "process" + #define fake_make_parameter_variable_return_s "return" + #define fake_make_parameter_variable_settings_s "settings" + #define fake_make_parameter_variable_sources_s "sources" + #define fake_make_parameter_variable_verbosity_s "verbosity" + #define fake_make_parameter_variable_work_s "work" + + #define fake_make_parameter_variable_build_s_length 5 + #define fake_make_parameter_variable_color_s_length 5 + #define fake_make_parameter_variable_data_s_length 4 + #define fake_make_parameter_variable_define_s_length 6 + #define fake_make_parameter_variable_fakefile_s_length 8 + #define fake_make_parameter_variable_mode_s_length 4 + #define fake_make_parameter_variable_process_s_length 7 + #define fake_make_parameter_variable_return_s_length 6 + #define fake_make_parameter_variable_settings_s_length 8 + #define fake_make_parameter_variable_sources_s_length 7 + #define fake_make_parameter_variable_verbosity_s_length 9 + #define fake_make_parameter_variable_work_s_length 4 typedef struct { f_string_dynamics_t build; @@ -825,15 +825,15 @@ extern "C" { #endif // _di_fake_make_data_t_ #ifndef _di_fake_skeleton_content_ - #define fake_make_skeleton_content_defines "# fss-0000\n\n" - #define fake_make_skeleton_content_dependencies "# fss-0000\n\n" - #define fake_make_skeleton_content_fakefile "# fss-0005 iki-0002\n\nsettings:\n fail exit\n\nmain:\n\n" - #define fake_make_skeleton_content_settings "# fss-0001\n\n" - - #define fake_make_skeleton_content_defines_length 12 - #define fake_make_skeleton_content_dependencies_length 12 - #define fake_make_skeleton_content_fakefile_length 51 - #define fake_make_skeleton_content_settings_length 12 + #define fake_make_skeleton_content_defines_s "# fss-0000\n\n" + #define fake_make_skeleton_content_dependencies_s "# fss-0000\n\n" + #define fake_make_skeleton_content_fakefile_s "# fss-0005 iki-0002\n\nsettings:\n fail exit\n\nmain:\n\n" + #define fake_make_skeleton_content_settings_s "# fss-0001\n\n" + + #define fake_make_skeleton_content_defines_s_length 12 + #define fake_make_skeleton_content_dependencies_s_length 12 + #define fake_make_skeleton_content_fakefile_s_length 51 + #define fake_make_skeleton_content_settings_s_length 12 #endif // _di_fake_skeleton_content_ #ifdef __cplusplus diff --git a/level_3/fake/c/private-fake.c b/level_3/fake/c/private-fake.c index eb8c56d..8b2b735 100644 --- a/level_3/fake/c/private-fake.c +++ b/level_3/fake/c/private-fake.c @@ -114,8 +114,8 @@ extern "C" { status = f_file_size(path_file, F_true, &size_file); if (F_status_is_error_not(status)) { - if (size_file > fake_common_initial_buffer_max) { - size_file = fake_common_initial_buffer_max; + if (size_file > fake_common_initial_buffer_max_d) { + size_file = fake_common_initial_buffer_max_d; } macro_f_string_dynamic_t_resize((status), (*buffer), size_file); @@ -224,39 +224,39 @@ extern "C" { { const f_string_t parameters_source[] = { - fake_path_part_documents, - fake_path_part_includes, - fake_path_part_libraries, - fake_path_part_objects, - fake_path_part_programs, - fake_path_part_settings, - fake_path_part_stage, - fake_path_part_build, - fake_path_part_settings, - fake_path_part_documents, - fake_path_part_licenses, - fake_path_part_bash, - fake_path_part_c, - fake_path_part_cpp, - fake_path_part_script, + fake_path_part_documents_s, + fake_path_part_includes_s, + fake_path_part_libraries_s, + fake_path_part_objects_s, + fake_path_part_programs_s, + fake_path_part_settings_s, + fake_path_part_stage_s, + fake_path_part_build_s, + fake_path_part_settings_s, + fake_path_part_documents_s, + fake_path_part_licenses_s, + fake_path_part_bash_s, + fake_path_part_c_s, + fake_path_part_cpp_s, + fake_path_part_script_s, }; const f_array_length_t parameters_length[] = { - fake_path_part_documents_length, - fake_path_part_includes_length, - fake_path_part_libraries_length, - fake_path_part_objects_length, - fake_path_part_programs_length, - fake_path_part_settings_length, - fake_path_part_stage_length, - fake_path_part_build_length, - fake_path_part_settings_length, - fake_path_part_documents_length, - fake_path_part_licenses_length, - fake_path_part_bash_length, - fake_path_part_c_length, - fake_path_part_cpp_length, - fake_path_part_script_length, + fake_path_part_documents_s_length, + fake_path_part_includes_s_length, + fake_path_part_libraries_s_length, + fake_path_part_objects_s_length, + fake_path_part_programs_s_length, + fake_path_part_settings_s_length, + fake_path_part_stage_s_length, + fake_path_part_build_s_length, + fake_path_part_settings_s_length, + fake_path_part_documents_s_length, + fake_path_part_licenses_s_length, + fake_path_part_bash_s_length, + fake_path_part_c_s_length, + fake_path_part_cpp_s_length, + fake_path_part_script_s_length, }; f_string_dynamic_t * const parameters_value[] = { @@ -357,31 +357,31 @@ extern "C" { { const f_string_t parameters_source[] = { - fake_path_part_script, - fake_path_part_shared, - fake_path_part_static, - fake_path_part_script, - fake_path_part_shared, - fake_path_part_static, - fake_file_defines, - fake_file_dependencies, + fake_path_part_script_s, + fake_path_part_shared_s, + fake_path_part_static_s, + fake_path_part_script_s, + fake_path_part_shared_s, + fake_path_part_static_s, + fake_file_defines_s, + fake_file_dependencies_s, main->fakefile.string, main->settings.string, - fake_file_readme, + fake_file_readme_s, }; const f_array_length_t parameters_length[] = { - fake_path_part_script_length, - fake_path_part_shared_length, - fake_path_part_static_length, - fake_path_part_script_length, - fake_path_part_shared_length, - fake_path_part_static_length, - fake_file_defines_length, - fake_file_dependencies_length, + fake_path_part_script_s_length, + fake_path_part_shared_s_length, + fake_path_part_static_s_length, + fake_path_part_script_s_length, + fake_path_part_shared_s_length, + fake_path_part_static_s_length, + fake_file_defines_s_length, + fake_file_dependencies_s_length, main->fakefile.used, main->settings.used, - fake_file_readme_length, + fake_file_readme_s_length, }; f_string_dynamic_t * const parameters_value[] = { @@ -432,15 +432,15 @@ extern "C" { { const f_string_t parameters_source[] = { - fake_path_part_includes, - fake_path_part_libraries, - fake_path_part_programs, + fake_path_part_includes_s, + fake_path_part_libraries_s, + fake_path_part_programs_s, }; const f_array_length_t parameters_length[] = { - fake_path_part_includes_length, - fake_path_part_libraries_length, - fake_path_part_programs_length, + fake_path_part_includes_s_length, + fake_path_part_libraries_s_length, + fake_path_part_programs_s_length, }; f_string_dynamic_t * const parameters_value[] = { @@ -503,21 +503,21 @@ extern "C" { { const f_string_t parameters_source[] = { - fake_path_part_script, - fake_path_part_shared, - fake_path_part_static, - fake_path_part_script, - fake_path_part_shared, - fake_path_part_static, + fake_path_part_script_s, + fake_path_part_shared_s, + fake_path_part_static_s, + fake_path_part_script_s, + fake_path_part_shared_s, + fake_path_part_static_s, }; const f_array_length_t parameters_length[] = { - fake_path_part_script_length, - fake_path_part_shared_length, - fake_path_part_static_length, - fake_path_part_script_length, - fake_path_part_shared_length, - fake_path_part_static_length, + fake_path_part_script_s_length, + fake_path_part_shared_s_length, + fake_path_part_static_s_length, + fake_path_part_script_s_length, + fake_path_part_shared_s_length, + fake_path_part_static_s_length, }; f_string_dynamic_t * const parameters_value[] = { @@ -627,21 +627,21 @@ extern "C" { }; const f_string_t parameters_name[] = { - fake_long_fakefile, - fake_long_process, - fake_long_settings, + fake_long_fakefile_s, + fake_long_process_s, + fake_long_settings_s, }; const f_string_t parameter_defaults[] = { - fake_default_fakefile, - fake_default_process, - fake_default_settings, + fake_default_fakefile_s, + fake_default_process_s, + fake_default_settings_s, }; const f_array_length_t parameter_default_lengths[] = { - fake_default_fakefile_length, - fake_default_process_length, - fake_default_settings_length, + fake_default_fakefile_s_length, + fake_default_process_s_length, + fake_default_settings_s_length, }; f_string_dynamic_t * const parameters_value[] = { @@ -689,7 +689,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%SFailed to process the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fake_long_process, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fake_long_process_s, main->error.notable); fl_print_format("%['.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -703,7 +703,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%SThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fake_long_process, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fake_long_process_s, main->error.notable); fl_print_format("%[' parameters value '%]", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, arguments.argv[location], main->error.notable); fl_print_format("%[' contains non-word, non-dash, and non-plus characters.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); @@ -769,7 +769,7 @@ extern "C" { } if (main->parameters[fake_parameter_define].result == f_console_result_found) { - fake_print_error_parameter_missing_value(*main, fake_long_define); + fake_print_error_parameter_missing_value(*main, fake_long_define_s); return F_status_set_error(F_parameter); } @@ -783,24 +783,24 @@ extern "C" { }; const f_string_t parameters_name[] = { - fake_long_path_build, - fake_long_path_data, - fake_long_path_sources, - fake_long_path_work, + fake_long_path_build_s, + fake_long_path_data_s, + fake_long_path_sources_s, + fake_long_path_work_s, }; const f_string_t parameter_defaults[] = { - fake_default_path_build, - fake_default_path_data, - fake_default_path_sources, - fake_default_path_work, + fake_default_path_build_s, + fake_default_path_data_s, + fake_default_path_sources_s, + fake_default_path_work_s, }; const f_array_length_t parameter_default_lengths[] = { - fake_default_path_build_length, - fake_default_path_data_length, - fake_default_path_sources_length, - fake_default_path_work_length, + fake_default_path_build_s_length, + fake_default_path_data_s_length, + fake_default_path_sources_s_length, + fake_default_path_work_s_length, }; f_string_dynamic_t * const parameters_value[] = { @@ -869,7 +869,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%SFailed to process the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fake_long_define, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fake_long_define_s, main->error.notable); fl_print_format("%['.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -880,7 +880,7 @@ extern "C" { } if (main->parameters[fake_parameter_mode].result == f_console_result_found) { - fake_print_error_parameter_missing_value(*main, fake_long_mode); + fake_print_error_parameter_missing_value(*main, fake_long_mode_s); return F_status_set_error(F_parameter); } else if (main->parameters[fake_parameter_mode].result == f_console_result_additional) { @@ -891,7 +891,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%SFailed to process the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fake_long_mode, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fake_long_mode_s, main->error.notable); fl_print_format("%['.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -917,7 +917,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%SFailed to process the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fake_long_mode, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fake_long_mode_s, main->error.notable); fl_print_format("%['.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -931,8 +931,8 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%SThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fake_long_mode, main->error.notable); - fl_print_format("%[' parameters value '%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fake_long_mode, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fake_long_mode_s, main->error.notable); + fl_print_format("%[' parameters value '%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fake_long_mode_s, main->error.notable); fl_print_format("%[%Q%]", main->error.to.stream, main->error.notable, main->mode.array[i], main->error.notable); fl_print_format("%[' contains non-word, non-dash, and non-plus characters.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); @@ -1038,21 +1038,21 @@ extern "C" { } const f_string_t parameters_name[] = { - fake_long_path_build, - fake_long_path_data, - fake_long_path_work, + fake_long_path_build_s, + fake_long_path_data_s, + fake_long_path_work_s, }; const f_string_t parameter_defaults[] = { - fake_default_path_build, - fake_default_path_data, - fake_default_path_work, + fake_default_path_build_s, + fake_default_path_data_s, + fake_default_path_work_s, }; const f_array_length_t parameter_default_lengths[] = { - fake_default_path_build_length, - fake_default_path_data_length, - fake_default_path_work_length, + fake_default_path_build_s_length, + fake_default_path_data_s_length, + fake_default_path_work_s_length, }; const f_string_dynamic_t *parameters_value[] = { diff --git a/level_3/fake/c/private-fake.h b/level_3/fake/c/private-fake.h index 0d3a3df..47844d9 100644 --- a/level_3/fake/c/private-fake.h +++ b/level_3/fake/c/private-fake.h @@ -33,7 +33,7 @@ extern "C" { * A value of 1 is returned if status has the error bit set. */ #ifndef _di_fake_execute_ - extern int fake_execute(const fake_main_t main, const f_string_maps_t environment, const f_string_static_t program, const f_string_statics_t arguments, f_status_t *status) f_attribute_visibility_internal; + extern int fake_execute(const fake_main_t main, const f_string_maps_t environment, const f_string_static_t program, const f_string_statics_t arguments, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_execute_ /** @@ -52,7 +52,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_file_buffer_ - extern f_status_t fake_file_buffer(const fake_main_t main, const f_string_t path_file, f_string_dynamic_t *buffer) f_attribute_visibility_internal; + extern f_status_t fake_file_buffer(const fake_main_t main, const f_string_t path_file, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d; #endif // _di_fake_file_buffer_ /** @@ -67,7 +67,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_path_generate_ - extern f_status_t fake_path_generate(fake_main_t *main) f_attribute_visibility_internal; + extern f_status_t fake_path_generate(fake_main_t *main) F_attribute_visibility_internal_d; #endif // _di_fake_path_generate_ /** @@ -88,7 +88,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_path_generate_string_dynamic_ - extern f_status_t fake_path_generate_string_dynamic(fake_main_t *main, const f_string_dynamic_t source, f_string_dynamic_t *destination[], const uint8_t size) f_attribute_visibility_internal; + extern f_status_t fake_path_generate_string_dynamic(fake_main_t *main, const f_string_dynamic_t source, f_string_dynamic_t *destination[], const uint8_t size) F_attribute_visibility_internal_d; #endif // _di_fake_path_generate_string_dynamic_ /** @@ -105,7 +105,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_process_console_parameters_ - extern f_status_t fake_process_console_parameters(const f_console_arguments_t arguments, fake_main_t *main) f_attribute_visibility_internal; + extern f_status_t fake_process_console_parameters(const f_console_arguments_t arguments, fake_main_t *main) F_attribute_visibility_internal_d; #endif // _di_validate_console_parameters_ /** @@ -121,7 +121,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_signal_read_ - extern f_status_t fake_signal_received(const fake_main_t main) f_attribute_visibility_internal; + extern f_status_t fake_signal_received(const fake_main_t main) F_attribute_visibility_internal_d; #endif // _di_fake_signal_read_ /** @@ -138,7 +138,7 @@ extern "C" { * F_interrupt (with error bit) if interrupted. */ #ifndef _di_fake_signal_state_interrupt_fss_ - extern f_status_t fake_signal_state_interrupt_fss(void *state, void *internal) f_attribute_visibility_internal; + extern f_status_t fake_signal_state_interrupt_fss(void *state, void *internal) F_attribute_visibility_internal_d; #endif // _di_fake_signal_state_interrupt_fss_ /** @@ -155,7 +155,7 @@ extern "C" { * F_interrupt (with error bit) if interrupted. */ #ifndef _di_fake_signal_state_interrupt_iki_ - extern f_status_t fake_signal_state_interrupt_iki(void *state, void *internal) f_attribute_visibility_internal; + extern f_status_t fake_signal_state_interrupt_iki(void *state, void *internal) F_attribute_visibility_internal_d; #endif // _di_fake_signal_state_interrupt_iki_ /** @@ -174,7 +174,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_validate_parameter_directories_ - extern f_status_t fake_validate_parameter_directories(const f_console_arguments_t arguments, const fake_main_t main) f_attribute_visibility_internal; + extern f_status_t fake_validate_parameter_directories(const f_console_arguments_t arguments, const fake_main_t main) F_attribute_visibility_internal_d; #endif // _di_fake_validate_parameter_directories_ /** @@ -188,7 +188,7 @@ extern "C" { * The destination string. */ #ifndef _di_fake_verbose_print_clone_ - extern void fake_verbose_print_clone(const f_file_t output, const f_string_t source, const f_string_t destination) f_attribute_visibility_internal; + extern void fake_verbose_print_clone(const f_file_t output, const f_string_t source, const f_string_t destination) F_attribute_visibility_internal_d; #endif // _di_fake_verbose_print_clone_ /** @@ -202,7 +202,7 @@ extern "C" { * The destination string. */ #ifndef _di_fake_verbose_print_copy_ - extern void fake_verbose_print_copy(const f_file_t output, const f_string_t source, const f_string_t destination) f_attribute_visibility_internal; + extern void fake_verbose_print_copy(const f_file_t output, const f_string_t source, const f_string_t destination) F_attribute_visibility_internal_d; #endif // _di_fake_verbose_print_copy_ /** @@ -216,7 +216,7 @@ extern "C" { * The destination string. */ #ifndef _di_fake_verbose_print_move_ - extern void fake_verbose_print_move(const f_file_t output, const f_string_t source, const f_string_t destination) f_attribute_visibility_internal; + extern void fake_verbose_print_move(const f_file_t output, const f_string_t source, const f_string_t destination) F_attribute_visibility_internal_d; #endif // _di_fake_verbose_print_move_ #ifdef __cplusplus diff --git a/level_3/fake/c/private-make.c b/level_3/fake/c/private-make.c index 10b8370..2d751c2 100644 --- a/level_3/fake/c/private-make.c +++ b/level_3/fake/c/private-make.c @@ -84,7 +84,7 @@ extern "C" { fll_error_print(print, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true); return F_status_set_error(status); } - else if (number > f_type_size_32_unsigned) { + else if (number > F_type_size_32_unsigned_d) { if (main.error.verbosity != f_console_verbosity_quiet) { flockfile(main.error.to.stream); @@ -175,7 +175,7 @@ extern "C" { fll_error_print(print, status, "fl_conversion_string_to_number_unsigned", F_true); return F_status_set_error(status); } - else if (number > f_type_size_32_unsigned) { + else if (number > F_type_size_32_unsigned_d) { if (main.error.verbosity != f_console_verbosity_quiet) { flockfile(main.error.to.stream); @@ -235,7 +235,7 @@ extern "C" { f_fss_comments_t comments = f_fss_comments_t_initialize; { - f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large, fake_common_allocation_small, 0, &fake_signal_state_interrupt_fss, 0, (void *) &main, 0); + f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, &fake_signal_state_interrupt_fss, 0, (void *) &main, 0); *status = fll_fss_basic_list_read(data_make->buffer, state, &range, &list_objects, &list_contents, &delimits, 0, &comments); } @@ -266,13 +266,13 @@ extern "C" { f_fss_set_t settings = f_fss_set_t_initialize; - f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large, fake_common_allocation_small, 0, &fake_signal_state_interrupt_fss, 0, (void *) &main, 0); + f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, &fake_signal_state_interrupt_fss, 0, (void *) &main, 0); - const f_string_static_t name_settings = macro_f_string_static_t_initialize(fake_make_section_settings, fake_make_section_settings_length); - const f_string_static_t name_main = macro_f_string_static_t_initialize(fake_make_section_main, fake_make_section_main_length); + const f_string_static_t name_settings = macro_f_string_static_t_initialize(fake_make_section_settings_s, fake_make_section_settings_s_length); + const f_string_static_t name_main = macro_f_string_static_t_initialize(fake_make_section_main_s, fake_make_section_main_s_length); - const f_string_range_t name_settings_range = macro_f_string_range_t_initialize(fake_make_section_settings_length); - const f_string_range_t name_main_range = macro_f_string_range_t_initialize(fake_make_section_main_length); + const f_string_range_t name_settings_range = macro_f_string_range_t_initialize(fake_make_section_settings_s_length); + const f_string_range_t name_main_range = macro_f_string_range_t_initialize(fake_make_section_main_s_length); macro_f_fss_nameds_t_resize((*status), data_make->fakefile, list_objects.used); @@ -374,7 +374,7 @@ extern "C" { fl_print_format("%c%[%SThe fakefile '%]", main.error.to.stream, f_string_eol_s[0], main.error.context, main.error.prefix, main.error.context); fl_print_format("%[%Q%]", main.error.to.stream, main.error.notable, main.file_data_build_fakefile, main.error.notable); fl_print_format("%[' is missing the required '%]", main.error.to.stream, main.error.context, main.error.context); - fl_print_format("%[%s%]", main.error.to.stream, main.error.notable, fake_make_section_main, main.error.notable); + fl_print_format("%[%s%]", main.error.to.stream, main.error.notable, fake_make_section_main_s, main.error.notable); fl_print_format("%[' object.%]%c", main.error.to.stream, main.error.context, main.error.context, f_string_eol_s[0]); funlockfile(main.error.to.stream); @@ -390,13 +390,13 @@ extern "C" { { f_string_t function_name = "macro_f_string_map_multis_t_resize"; - macro_f_string_map_multis_t_resize(*status, data_make->setting_make.parameter, f_memory_default_allocation_small); + macro_f_string_map_multis_t_resize(*status, data_make->setting_make.parameter, F_memory_default_allocation_small_d); if (F_status_is_error_not(*status)) { data_make->setting_make.parameter.used = 1; function_name = "f_string_append"; - *status = f_string_append(fake_make_setting_return, fake_make_setting_return_length, &data_make->setting_make.parameter.array[0].name); + *status = f_string_append(fake_make_setting_return_s, fake_make_setting_return_s_length, &data_make->setting_make.parameter.array[0].name); } if (F_status_is_error_not(*status)) { @@ -435,24 +435,24 @@ extern "C" { for (f_array_length_t i = 0; i < settings.objects.used; ++i) { - if (fl_string_dynamic_partial_compare_string(fake_make_setting_compiler, data_make->buffer, fake_make_setting_compiler_length, settings.objects.array[i]) == F_equal_to) { + if (fl_string_dynamic_partial_compare_string(fake_make_setting_compiler_s, data_make->buffer, fake_make_setting_compiler_s_length, settings.objects.array[i]) == F_equal_to) { if (range_compiler) { - fake_print_warning_settings_content_multiple(main, main.file_data_build_fakefile.string, fake_make_setting_compiler); + fake_print_warning_settings_content_multiple(main, main.file_data_build_fakefile.string, fake_make_setting_compiler_s); } else { if (settings.contents.array[i].used) { range_compiler = &settings.contents.array[i].array[0]; if (settings.contents.array[i].used > 1) { - fake_print_warning_settings_content_multiple(main, main.file_data_build_fakefile.string, fake_make_setting_compiler); + fake_print_warning_settings_content_multiple(main, main.file_data_build_fakefile.string, fake_make_setting_compiler_s); } } else { - fake_print_warning_settings_content_empty(main, main.file_data_build_fakefile.string, data_make->buffer, settings.objects.array[i], fake_make_section_settings); + fake_print_warning_settings_content_empty(main, main.file_data_build_fakefile.string, data_make->buffer, settings.objects.array[i], fake_make_section_settings_s); } } } - else if (fl_string_dynamic_partial_compare_string(fake_make_setting_environment, data_make->buffer, fake_make_setting_environment_length, settings.objects.array[i]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(fake_make_setting_environment_s, data_make->buffer, fake_make_setting_environment_s_length, settings.objects.array[i]) == F_equal_to) { f_string_dynamic_t name_define = f_string_dynamic_t_initialize; f_array_length_t j = 0; @@ -483,7 +483,7 @@ extern "C" { if (k == data_make->setting_build.environment.used) { if (data_make->setting_build.environment.used + 1 > data_make->setting_build.environment.size) { - *status = f_string_dynamics_increase_by(f_memory_default_allocation_small, &data_make->setting_build.environment); + *status = f_string_dynamics_increase_by(F_memory_default_allocation_small_d, &data_make->setting_build.environment); if (F_status_is_error(*status)) { fll_error_print(main.error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true); @@ -535,83 +535,83 @@ extern "C" { *status = F_none; macro_f_string_dynamic_t_delete_simple(name_define); } - else if (fl_string_dynamic_partial_compare_string(fake_make_setting_fail, data_make->buffer, fake_make_setting_fail_length, settings.objects.array[i]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(fake_make_setting_fail_s, data_make->buffer, fake_make_setting_fail_s_length, settings.objects.array[i]) == F_equal_to) { if (unmatched_fail) { if (settings.contents.array[i].used) { - if (fl_string_dynamic_partial_compare_string(fake_make_operation_argument_exit, data_make->buffer, fake_make_operation_argument_exit_length, settings.contents.array[i].array[0]) == F_equal_to) { + if (fl_string_dynamic_partial_compare_string(fake_make_operation_argument_exit_s, data_make->buffer, fake_make_operation_argument_exit_s_length, settings.contents.array[i].array[0]) == F_equal_to) { data_make->setting_make.fail = fake_make_operation_fail_type_exit; } - else if (fl_string_dynamic_partial_compare_string(fake_make_operation_argument_warn, data_make->buffer, fake_make_operation_argument_warn_length, settings.contents.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(fake_make_operation_argument_warn_s, data_make->buffer, fake_make_operation_argument_warn_s_length, settings.contents.array[i].array[0]) == F_equal_to) { data_make->setting_make.fail = fake_make_operation_fail_type_warn; } - else if (fl_string_dynamic_partial_compare_string(fake_make_operation_argument_ignore, data_make->buffer, fake_make_operation_argument_ignore_length, settings.contents.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(fake_make_operation_argument_ignore_s, data_make->buffer, fake_make_operation_argument_ignore_s_length, settings.contents.array[i].array[0]) == F_equal_to) { data_make->setting_make.fail = fake_make_operation_fail_type_ignore; } else { - fake_print_warning_settings_content_invalid(main, main.file_data_build_fakefile.string, data_make->buffer, settings.objects.array[i], settings.contents.array[i].array[0], fake_make_section_settings); + fake_print_warning_settings_content_invalid(main, main.file_data_build_fakefile.string, data_make->buffer, settings.objects.array[i], settings.contents.array[i].array[0], fake_make_section_settings_s); } if (settings.contents.array[i].used > 1) { - fake_print_warning_settings_content_multiple(main, main.file_data_build_fakefile.string, fake_make_setting_fail); + fake_print_warning_settings_content_multiple(main, main.file_data_build_fakefile.string, fake_make_setting_fail_s); } unmatched_fail = F_false; } else { - fake_print_warning_settings_content_empty(main, main.file_data_build_fakefile.string, data_make->buffer, settings.objects.array[i], fake_make_section_settings); + fake_print_warning_settings_content_empty(main, main.file_data_build_fakefile.string, data_make->buffer, settings.objects.array[i], fake_make_section_settings_s); } } else { - fake_print_warning_settings_content_multiple(main, main.file_data_build_fakefile.string, fake_make_setting_fail); + fake_print_warning_settings_content_multiple(main, main.file_data_build_fakefile.string, fake_make_setting_fail_s); } } - else if (fl_string_dynamic_partial_compare_string(fake_make_setting_linker, data_make->buffer, fake_make_setting_linker_length, settings.objects.array[i]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(fake_make_setting_linker_s, data_make->buffer, fake_make_setting_linker_s_length, settings.objects.array[i]) == F_equal_to) { if (range_linker) { - fake_print_warning_settings_content_multiple(main, main.file_data_build_fakefile.string, fake_make_setting_linker); + fake_print_warning_settings_content_multiple(main, main.file_data_build_fakefile.string, fake_make_setting_linker_s); } else { if (settings.contents.array[i].used) { range_linker = &settings.contents.array[i].array[0]; if (settings.contents.array[i].used > 1) { - fake_print_warning_settings_content_multiple(main, main.file_data_build_fakefile.string, fake_make_setting_linker); + fake_print_warning_settings_content_multiple(main, main.file_data_build_fakefile.string, fake_make_setting_linker_s); } } else { - fake_print_warning_settings_content_empty(main, main.file_data_build_fakefile.string, data_make->buffer, settings.objects.array[i], fake_make_section_settings); + fake_print_warning_settings_content_empty(main, main.file_data_build_fakefile.string, data_make->buffer, settings.objects.array[i], fake_make_section_settings_s); } } } - else if (fl_string_dynamic_partial_compare_string(fake_make_setting_load_build, data_make->buffer, fake_make_setting_load_build_length, settings.objects.array[i]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(fake_make_setting_load_build_s, data_make->buffer, fake_make_setting_load_build_s_length, settings.objects.array[i]) == F_equal_to) { if (unmatched_load) { if (settings.contents.array[i].used) { - if (fl_string_dynamic_partial_compare_string(fake_common_setting_bool_yes, data_make->buffer, fake_common_setting_bool_yes_length, settings.contents.array[i].array[0]) == F_equal_to) { + if (fl_string_dynamic_partial_compare_string(fake_common_setting_bool_yes_s, data_make->buffer, fake_common_setting_bool_yes_s_length, settings.contents.array[i].array[0]) == F_equal_to) { data_make->setting_make.load_build = F_true; } - else if (fl_string_dynamic_partial_compare_string(fake_common_setting_bool_no, data_make->buffer, fake_common_setting_bool_no_length, settings.contents.array[i].array[0]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(fake_common_setting_bool_no_s, data_make->buffer, fake_common_setting_bool_no_s_length, settings.contents.array[i].array[0]) == F_equal_to) { data_make->setting_make.load_build = F_false; } else { - fake_print_warning_settings_content_invalid(main, main.file_data_build_fakefile.string, data_make->buffer, settings.objects.array[i], settings.contents.array[i].array[0], fake_make_section_settings); + fake_print_warning_settings_content_invalid(main, main.file_data_build_fakefile.string, data_make->buffer, settings.objects.array[i], settings.contents.array[i].array[0], fake_make_section_settings_s); } unmatched_load = F_false; if (settings.contents.array[i].used > 1) { - fake_print_warning_settings_content_multiple(main, main.file_data_build_fakefile.string, fake_make_setting_load_build); + fake_print_warning_settings_content_multiple(main, main.file_data_build_fakefile.string, fake_make_setting_load_build_s); } } else { - fake_print_warning_settings_content_empty(main, main.file_data_build_fakefile.string, data_make->buffer, settings.objects.array[i], fake_make_section_settings); + fake_print_warning_settings_content_empty(main, main.file_data_build_fakefile.string, data_make->buffer, settings.objects.array[i], fake_make_section_settings_s); } } else { - fake_print_warning_settings_content_multiple(main, main.file_data_build_fakefile.string, fake_make_setting_load_build); + fake_print_warning_settings_content_multiple(main, main.file_data_build_fakefile.string, fake_make_setting_load_build_s); } } - else if (fl_string_dynamic_partial_compare_string(fake_make_setting_parameter, data_make->buffer, fake_make_setting_parameter_length, settings.objects.array[i]) == F_equal_to) { + else if (fl_string_dynamic_partial_compare_string(fake_make_setting_parameter_s, data_make->buffer, fake_make_setting_parameter_s_length, settings.objects.array[i]) == F_equal_to) { if (settings.contents.array[i].used) { - if (fl_string_dynamic_partial_compare_string(fake_make_setting_return, data_make->buffer, fake_make_setting_return_length, settings.contents.array[i].array[0]) == F_equal_to) { + if (fl_string_dynamic_partial_compare_string(fake_make_setting_return_s, data_make->buffer, fake_make_setting_return_s_length, settings.contents.array[i].array[0]) == F_equal_to) { if (settings.contents.array[i].used > 1) { f_string_t function_name = 0; @@ -646,7 +646,7 @@ extern "C" { } } else { - fake_print_warning_settings_content_empty(main, main.file_data_build_fakefile.string, data_make->buffer, settings.objects.array[i], fake_make_section_settings); + fake_print_warning_settings_content_empty(main, main.file_data_build_fakefile.string, data_make->buffer, settings.objects.array[i], fake_make_section_settings_s); } } } // for @@ -707,13 +707,13 @@ extern "C" { if (F_status_is_error_not(*status) && settings.objects.used) { const f_string_t settings_name[] = { - fake_make_setting_define, - fake_make_setting_parameter, + fake_make_setting_define_s, + fake_make_setting_parameter_s, }; const f_array_length_t settings_length[] = { - fake_make_setting_define_length, - fake_make_setting_parameter_length, + fake_make_setting_define_s_length, + fake_make_setting_parameter_s_length, }; f_string_map_multis_t *settings_value[] = { @@ -807,9 +807,9 @@ extern "C" { return; } - if (main.context.mode != f_color_mode_none) { + if (main.context.mode != F_color_mode_none_d) { if (data_make->parameter.color.used >= data_make->parameter.color.size) { - *status = f_string_dynamics_increase_by(f_memory_default_allocation_small, &data_make->parameter.color); + *status = f_string_dynamics_increase_by(F_memory_default_allocation_small_d, &data_make->parameter.color); if (F_status_is_error(*status)) { fll_error_print(main.error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true); @@ -818,7 +818,7 @@ extern "C" { } } - if (main.context.mode == f_color_mode_no_color) { + if (main.context.mode == F_color_mode_no_color_d) { if (main.parameters[fake_parameter_no_color].type == f_console_type_normal) { *status = f_string_append(f_console_symbol_short_enable_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); } @@ -830,7 +830,7 @@ extern "C" { *status = f_string_append(f_console_standard_short_no_color_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); } } - else if (main.context.mode == f_color_mode_dark) { + else if (main.context.mode == F_color_mode_dark_d) { if (main.parameters[fake_parameter_dark].type == f_console_type_normal) { *status = f_string_append(f_console_symbol_short_enable_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); } @@ -842,7 +842,7 @@ extern "C" { *status = f_string_append(f_console_standard_short_dark_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); } } - else if (main.context.mode == f_color_mode_light) { + else if (main.context.mode == F_color_mode_light_d) { if (main.parameters[fake_parameter_light].type == f_console_type_normal) { *status = f_string_append(f_console_symbol_short_enable_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]); } @@ -867,7 +867,7 @@ extern "C" { if (main.error.verbosity != f_console_verbosity_normal) { if (data_make->parameter.verbosity.used >= data_make->parameter.verbosity.size) { - *status = f_string_dynamics_increase_by(f_memory_default_allocation_small, &data_make->parameter.verbosity); + *status = f_string_dynamics_increase_by(F_memory_default_allocation_small_d, &data_make->parameter.verbosity); if (F_status_is_error(*status)) { fll_error_print(main.error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true); @@ -925,8 +925,8 @@ extern "C" { { const f_string_t parameter[] = { - fake_short_define, - fake_short_mode, + fake_short_define_s, + fake_short_mode_s, }; const f_console_parameter_t *console[] = { @@ -952,7 +952,7 @@ extern "C" { for (j = 0; j < source[i]->used; ++j) { if (destination[i]->used >= destination[i]->size) { - *status = f_string_dynamics_increase_by(f_memory_default_allocation_small, destination[i]); + *status = f_string_dynamics_increase_by(F_memory_default_allocation_small_d, destination[i]); if (F_status_is_error(*status)) { fll_error_print(main.error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true); @@ -980,7 +980,7 @@ extern "C" { } if (destination[i]->used >= destination[i]->size) { - *status = f_string_dynamics_increase_by(f_memory_default_allocation_small, destination[i]); + *status = f_string_dynamics_increase_by(F_memory_default_allocation_small_d, destination[i]); if (F_status_is_error(*status)) { fll_error_print(main.error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true); @@ -1003,13 +1003,13 @@ extern "C" { { const f_string_t parameter[] = { - fake_short_fakefile, - fake_short_path_build, - fake_short_path_data, - fake_short_path_sources, - fake_short_path_work, - fake_short_process, - fake_short_settings, + fake_short_fakefile_s, + fake_short_path_build_s, + fake_short_path_data_s, + fake_short_path_sources_s, + fake_short_path_work_s, + fake_short_process_s, + fake_short_settings_s, }; const f_console_parameter_t *console[] = { @@ -1045,7 +1045,7 @@ extern "C" { for (uint8_t i = 0; i < 7; ++i) { if (destination[i]->used >= destination[i]->size) { - *status = f_string_dynamics_increase_by(f_memory_default_allocation_small, destination[i]); + *status = f_string_dynamics_increase_by(F_memory_default_allocation_small_d, destination[i]); if (F_status_is_error(*status)) { fll_error_print(main.error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true); @@ -1075,7 +1075,7 @@ extern "C" { } if (destination[i]->used >= destination[i]->size) { - *status = f_string_dynamics_increase_by(f_memory_default_allocation_small, destination[i]); + *status = f_string_dynamics_increase_by(F_memory_default_allocation_small_d, destination[i]); if (F_status_is_error(*status)) { fll_error_print(main.error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true); @@ -1116,7 +1116,7 @@ extern "C" { f_array_lengths_t section_stack = f_array_lengths_t_initialize; fake_make_data_t data_make = fake_make_data_t_initialize; - status = f_string_dynamics_increase(f_memory_default_allocation_small, &data_make.path.stack); + status = f_string_dynamics_increase(F_memory_default_allocation_small_d, &data_make.path.stack); if (F_status_is_error(status)) { fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamics_increase", F_true); @@ -1172,8 +1172,8 @@ extern "C" { data_make.error.suffix = 0; data_make.error.context = main->context.set.error; data_make.error.notable = main->context.set.notable; - data_make.error.to.stream = f_type_error; - data_make.error.to.id = f_type_descriptor_error; + data_make.error.to.stream = F_type_error_d; + data_make.error.to.id = F_type_descriptor_error_d; data_make.error.set = &main->context.set; } else if (data_make.setting_make.fail == fake_make_operation_fail_type_warn) { @@ -1181,8 +1181,8 @@ extern "C" { data_make.error.suffix = 0; data_make.error.context = main->context.set.warning; data_make.error.notable = main->context.set.notable; - data_make.error.to.stream = f_type_warning; - data_make.error.to.id = f_type_descriptor_warning; + data_make.error.to.stream = F_type_warning_d; + data_make.error.to.id = F_type_descriptor_warning_d; data_make.error.set = &main->context.set; } else { @@ -1252,17 +1252,17 @@ extern "C" { } } - const f_string_static_t vocabulary_define = macro_f_string_static_t_initialize(iki_vocabulary_0002_define_s, iki_vocabulary_0002_define_length); - const f_string_static_t vocabulary_parameter = macro_f_string_static_t_initialize(iki_vocabulary_0002_parameter_s, iki_vocabulary_0002_parameter_length); + const f_string_static_t vocabulary_define = macro_f_string_static_t_initialize(iki_vocabulary_0002_define_s, IKI_vocabulary_0002_define_s_length); + const f_string_static_t vocabulary_parameter = macro_f_string_static_t_initialize(iki_vocabulary_0002_parameter_s, IKI_vocabulary_0002_parameter_s_length); - const f_string_range_t range_define = macro_f_string_range_t_initialize(iki_vocabulary_0002_define_length); - const f_string_range_t range_parameter = macro_f_string_range_t_initialize(iki_vocabulary_0002_parameter_length); + const f_string_range_t range_define = macro_f_string_range_t_initialize(IKI_vocabulary_0002_define_s_length); + const f_string_range_t range_parameter = macro_f_string_range_t_initialize(IKI_vocabulary_0002_parameter_s_length); f_iki_variable_t iki_variable = f_iki_variable_t_initialize; f_iki_vocabulary_t iki_vocabulary = f_iki_vocabulary_t_initialize; f_iki_content_t iki_content = f_iki_content_t_initialize; - f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large, fake_common_allocation_small, 0, &fake_signal_state_interrupt_iki, 0, (void *) &main, 0); + f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, &fake_signal_state_interrupt_iki, 0, (void *) &main, 0); f_string_range_t range = f_string_range_t_initialize; f_string_map_multis_t *parameter = &data_make->setting_make.parameter; @@ -1280,31 +1280,31 @@ extern "C" { f_array_length_t previous = 0; const f_string_t reserved_name[] = { - fake_make_parameter_variable_build, - fake_make_parameter_variable_color, - fake_make_parameter_variable_data, - fake_make_parameter_variable_define, - fake_make_parameter_variable_fakefile, - fake_make_parameter_variable_mode, - fake_make_parameter_variable_process, - fake_make_parameter_variable_settings, - fake_make_parameter_variable_sources, - fake_make_parameter_variable_verbosity, - fake_make_parameter_variable_work, + fake_make_parameter_variable_build_s, + fake_make_parameter_variable_color_s, + fake_make_parameter_variable_data_s, + fake_make_parameter_variable_define_s, + fake_make_parameter_variable_fakefile_s, + fake_make_parameter_variable_mode_s, + fake_make_parameter_variable_process_s, + fake_make_parameter_variable_settings_s, + fake_make_parameter_variable_sources_s, + fake_make_parameter_variable_verbosity_s, + fake_make_parameter_variable_work_s, }; const f_array_length_t reserved_length[] = { - fake_make_parameter_variable_build_length, - fake_make_parameter_variable_color_length, - fake_make_parameter_variable_data_length, - fake_make_parameter_variable_define_length, - fake_make_parameter_variable_fakefile_length, - fake_make_parameter_variable_mode_length, - fake_make_parameter_variable_process_length, - fake_make_parameter_variable_settings_length, - fake_make_parameter_variable_sources_length, - fake_make_parameter_variable_verbosity_length, - fake_make_parameter_variable_work_length, + fake_make_parameter_variable_build_s_length, + fake_make_parameter_variable_color_s_length, + fake_make_parameter_variable_data_s_length, + fake_make_parameter_variable_define_s_length, + fake_make_parameter_variable_fakefile_s_length, + fake_make_parameter_variable_mode_s_length, + fake_make_parameter_variable_process_s_length, + fake_make_parameter_variable_settings_s_length, + fake_make_parameter_variable_sources_s_length, + fake_make_parameter_variable_verbosity_s_length, + fake_make_parameter_variable_work_s_length, }; f_string_dynamics_t * const reserved_value[] = { @@ -1339,7 +1339,7 @@ extern "C" { } if (arguments->used >= arguments->size) { - *status = f_string_dynamics_increase_by(f_memory_default_allocation_small, arguments); + *status = f_string_dynamics_increase_by(F_memory_default_allocation_small_d, arguments); if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true); @@ -1399,7 +1399,7 @@ extern "C" { unmatched = F_true; // check against reserved parameter names and if matches use them instead. - if (fl_string_dynamic_partial_compare_string(fake_make_parameter_variable_return, data_make->buffer, fake_make_parameter_variable_return_length, iki_content.array[j]) == F_equal_to) { + if (fl_string_dynamic_partial_compare_string(fake_make_parameter_variable_return_s, data_make->buffer, fake_make_parameter_variable_return_s_length, iki_content.array[j]) == F_equal_to) { if (data_make->setting_make.parameter.array[0].value.array[0].used) { *status = f_string_dynamic_append(data_make->setting_make.parameter.array[0].value.array[0], &arguments->array[arguments->used]); @@ -1426,7 +1426,7 @@ extern "C" { if (fl_string_dynamic_partial_compare_string(reserved_name[k], data_make->buffer, reserved_length[k], iki_content.array[j]) == F_equal_to) { if (arguments->used >= arguments->size) { - *status = f_string_dynamics_increase_by(f_memory_default_allocation_small, arguments); + *status = f_string_dynamics_increase_by(F_memory_default_allocation_small_d, arguments); if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true); @@ -1496,7 +1496,7 @@ extern "C" { } else { if (arguments->used >= arguments->size) { - *status = f_string_dynamics_increase_by(f_memory_default_allocation_small, arguments); + *status = f_string_dynamics_increase_by(F_memory_default_allocation_small_d, arguments); if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true); @@ -1628,15 +1628,15 @@ extern "C" { { const f_string_t uint8_name[] = { - fake_build_setting_name_build_language, - fake_build_setting_name_version_file, - fake_build_setting_name_version_target, + fake_build_setting_name_build_language_s, + fake_build_setting_name_version_file_s, + fake_build_setting_name_version_target_s, }; const f_array_length_t uint8_length[] = { - fake_build_setting_name_build_language_length, - fake_build_setting_name_version_file_length, - fake_build_setting_name_version_target_length, + fake_build_setting_name_build_language_s_length, + fake_build_setting_name_version_file_s_length, + fake_build_setting_name_version_target_s_length, }; const uint8_t uint8_value[] = { @@ -1660,23 +1660,23 @@ extern "C" { if (unmatched) { const f_string_t bool_name[] = { - fake_build_setting_name_build_script, - fake_build_setting_name_build_shared, - fake_build_setting_name_build_static, - fake_build_setting_name_path_standard, - fake_build_setting_name_search_exclusive, - fake_build_setting_name_search_shared, - fake_build_setting_name_search_static, + fake_build_setting_name_build_script_s, + fake_build_setting_name_build_shared_s, + fake_build_setting_name_build_static_s, + fake_build_setting_name_path_standard_s, + fake_build_setting_name_search_exclusive_s, + fake_build_setting_name_search_shared_s, + fake_build_setting_name_search_static_s, }; const f_array_length_t bool_length[] = { - fake_build_setting_name_build_script_length, - fake_build_setting_name_build_shared_length, - fake_build_setting_name_build_static_length, - fake_build_setting_name_path_standard_length, - fake_build_setting_name_search_exclusive_length, - fake_build_setting_name_search_shared_length, - fake_build_setting_name_search_static_length, + fake_build_setting_name_build_script_s_length, + fake_build_setting_name_build_shared_s_length, + fake_build_setting_name_build_static_s_length, + fake_build_setting_name_path_standard_s_length, + fake_build_setting_name_search_exclusive_s_length, + fake_build_setting_name_search_shared_s_length, + fake_build_setting_name_search_static_s_length, }; const bool bool_value[] = { @@ -1697,10 +1697,10 @@ extern "C" { unmatched = F_false; if (bool_value[i]) { - status = f_string_append(fake_common_setting_bool_yes, fake_common_setting_bool_yes_length, &value); + status = f_string_append(fake_common_setting_bool_yes_s, fake_common_setting_bool_yes_s_length, &value); } else { - status = f_string_append(fake_common_setting_bool_no, fake_common_setting_bool_no_length, &value); + status = f_string_append(fake_common_setting_bool_no_s, fake_common_setting_bool_no_s_length, &value); } break; @@ -1710,43 +1710,43 @@ extern "C" { if (unmatched) { const f_string_t dynamic_name[] = { - fake_build_setting_name_build_compiler, - fake_build_setting_name_build_indexer, - fake_build_setting_name_path_headers, - fake_build_setting_name_path_language, - fake_build_setting_name_path_library_script, - fake_build_setting_name_path_library_shared, - fake_build_setting_name_path_library_static, - fake_build_setting_name_path_program_script, - fake_build_setting_name_path_program_shared, - fake_build_setting_name_path_program_static, - fake_build_setting_name_path_sources, - fake_build_setting_name_process_post, - fake_build_setting_name_process_pre, - fake_build_setting_name_project_name, - fake_build_setting_name_version_major, - fake_build_setting_name_version_micro, - fake_build_setting_name_version_minor, + fake_build_setting_name_build_compiler_s, + fake_build_setting_name_build_indexer_s, + fake_build_setting_name_path_headers_s, + fake_build_setting_name_path_language_s, + fake_build_setting_name_path_library_script_s, + fake_build_setting_name_path_library_shared_s, + fake_build_setting_name_path_library_static_s, + fake_build_setting_name_path_program_script_s, + fake_build_setting_name_path_program_shared_s, + fake_build_setting_name_path_program_static_s, + fake_build_setting_name_path_sources_s, + fake_build_setting_name_process_post_s, + fake_build_setting_name_process_pre_s, + fake_build_setting_name_project_name_s, + fake_build_setting_name_version_major_s, + fake_build_setting_name_version_micro_s, + fake_build_setting_name_version_minor_s, }; const f_array_length_t dynamic_length[] = { - fake_build_setting_name_build_compiler_length, - fake_build_setting_name_build_indexer_length, - fake_build_setting_name_path_headers_length, - fake_build_setting_name_path_language_length, - fake_build_setting_name_path_library_script_length, - fake_build_setting_name_path_library_shared_length, - fake_build_setting_name_path_library_static_length, - fake_build_setting_name_path_program_script_length, - fake_build_setting_name_path_program_shared_length, - fake_build_setting_name_path_program_static_length, - fake_build_setting_name_path_sources_length, - fake_build_setting_name_process_post_length, - fake_build_setting_name_process_pre_length, - fake_build_setting_name_project_name_length, - fake_build_setting_name_version_major_length, - fake_build_setting_name_version_micro_length, - fake_build_setting_name_version_minor_length, + fake_build_setting_name_build_compiler_s_length, + fake_build_setting_name_build_indexer_s_length, + fake_build_setting_name_path_headers_s_length, + fake_build_setting_name_path_language_s_length, + fake_build_setting_name_path_library_script_s_length, + fake_build_setting_name_path_library_shared_s_length, + fake_build_setting_name_path_library_static_s_length, + fake_build_setting_name_path_program_script_s_length, + fake_build_setting_name_path_program_shared_s_length, + fake_build_setting_name_path_program_static_s_length, + fake_build_setting_name_path_sources_s_length, + fake_build_setting_name_process_post_s_length, + fake_build_setting_name_process_pre_s_length, + fake_build_setting_name_project_name_s_length, + fake_build_setting_name_version_major_s_length, + fake_build_setting_name_version_micro_s_length, + fake_build_setting_name_version_minor_s_length, }; const f_string_dynamic_t dynamic_value[] = { @@ -1784,43 +1784,43 @@ extern "C" { if (unmatched) { const f_string_t dynamics_name[] = { - fake_build_setting_name_build_libraries, - fake_build_setting_name_build_sources_headers, - fake_build_setting_name_build_sources_library, - fake_build_setting_name_build_sources_program, - fake_build_setting_name_build_sources_settings, - fake_build_setting_name_build_sources_script, - fake_build_setting_name_defines_all, - fake_build_setting_name_defines_shared, - fake_build_setting_name_defines_static, - fake_build_setting_name_environment, - fake_build_setting_name_flags_all, - fake_build_setting_name_flags_library, - fake_build_setting_name_flags_program, - fake_build_setting_name_flags_shared, - fake_build_setting_name_flags_static, - fake_build_setting_name_modes, - fake_build_setting_name_modes_default, + fake_build_setting_name_build_libraries_s, + fake_build_setting_name_build_sources_headers_s, + fake_build_setting_name_build_sources_library_s, + fake_build_setting_name_build_sources_program_s, + fake_build_setting_name_build_sources_settings_s, + fake_build_setting_name_build_sources_script_s, + fake_build_setting_name_defines_all_s, + fake_build_setting_name_defines_shared_s, + fake_build_setting_name_defines_static_s, + fake_build_setting_name_environment_s, + fake_build_setting_name_flags_all_s, + fake_build_setting_name_flags_library_s, + fake_build_setting_name_flags_program_s, + fake_build_setting_name_flags_shared_s, + fake_build_setting_name_flags_static_s, + fake_build_setting_name_modes_s, + fake_build_setting_name_modes_default_s, }; const f_array_length_t dynamics_length[] = { - fake_build_setting_name_build_libraries_length, - fake_build_setting_name_build_sources_headers_length, - fake_build_setting_name_build_sources_library_length, - fake_build_setting_name_build_sources_program_length, - fake_build_setting_name_build_sources_settings_length, - fake_build_setting_name_build_sources_script_length, - fake_build_setting_name_defines_all_length, - fake_build_setting_name_defines_shared_length, - fake_build_setting_name_defines_static_length, - fake_build_setting_name_environment_length, - fake_build_setting_name_flags_all_length, - fake_build_setting_name_flags_library_length, - fake_build_setting_name_flags_program_length, - fake_build_setting_name_flags_shared_length, - fake_build_setting_name_flags_static_length, - fake_build_setting_name_modes_length, - fake_build_setting_name_modes_default_length, + fake_build_setting_name_build_libraries_s_length, + fake_build_setting_name_build_sources_headers_s_length, + fake_build_setting_name_build_sources_library_s_length, + fake_build_setting_name_build_sources_program_s_length, + fake_build_setting_name_build_sources_settings_s_length, + fake_build_setting_name_build_sources_script_s_length, + fake_build_setting_name_defines_all_s_length, + fake_build_setting_name_defines_shared_s_length, + fake_build_setting_name_defines_static_s_length, + fake_build_setting_name_environment_length_s, + fake_build_setting_name_flags_all_s_length, + fake_build_setting_name_flags_library_s_length, + fake_build_setting_name_flags_program_s_length, + fake_build_setting_name_flags_shared_s_length, + fake_build_setting_name_flags_static_s_length, + fake_build_setting_name_modes_s_length, + fake_build_setting_name_modes_default_s_length, }; const f_string_dynamics_t dynamics_value[] = { @@ -1880,7 +1880,7 @@ extern "C" { status = f_string_dynamic_append_nulless(value, &arguments->array[arguments->used]); } else { - status = f_string_dynamics_increase_by(f_memory_default_allocation_small, arguments); + status = f_string_dynamics_increase_by(F_memory_default_allocation_small_d, arguments); if (F_status_is_error_not(status)) { status = f_string_dynamic_append_nulless(value, &arguments->array[arguments->used]); @@ -1939,7 +1939,7 @@ extern "C" { status = f_string_dynamic_append_nulless(value, &arguments->array[arguments->used]); } else { - status = f_string_dynamics_increase_by(f_memory_default_allocation_small, arguments); + status = f_string_dynamics_increase_by(F_memory_default_allocation_small_d, arguments); if (F_status_is_error_not(status)) { status = f_string_dynamic_append_nulless(value, &arguments->array[arguments->used]); @@ -1983,7 +1983,7 @@ extern "C" { // add the operation id to the operation stack. if (section_stack->used + 1 > section_stack->size) { - macro_f_array_lengths_t_increase_by((*status), (*section_stack), f_memory_default_allocation_small); + macro_f_array_lengths_t_increase_by((*status), (*section_stack), F_memory_default_allocation_small_d); if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "macro_f_array_lengths_t_increase_by", F_true); @@ -2012,71 +2012,71 @@ extern "C" { } const f_string_static_t operations_name[] = { - macro_f_string_static_t_initialize(fake_make_operation_break, fake_make_operation_break_length), - macro_f_string_static_t_initialize(fake_make_operation_build, fake_make_operation_build_length), - macro_f_string_static_t_initialize(fake_make_operation_clean, fake_make_operation_clean_length), - macro_f_string_static_t_initialize(fake_make_operation_clone, fake_make_operation_clone_length), - macro_f_string_static_t_initialize(fake_make_operation_compile, fake_make_operation_compile_length), - macro_f_string_static_t_initialize(fake_make_operation_copy, fake_make_operation_copy_length), - macro_f_string_static_t_initialize(fake_make_operation_define, fake_make_operation_define_length), - macro_f_string_static_t_initialize(fake_make_operation_delete, fake_make_operation_delete_length), - macro_f_string_static_t_initialize(fake_make_operation_deletes, fake_make_operation_deletes_length), - macro_f_string_static_t_initialize(fake_make_operation_else, fake_make_operation_else_length), - macro_f_string_static_t_initialize(fake_make_operation_exit, fake_make_operation_exit_length), - macro_f_string_static_t_initialize(fake_make_operation_fail, fake_make_operation_fail_length), - macro_f_string_static_t_initialize(fake_make_operation_group, fake_make_operation_group_length), - macro_f_string_static_t_initialize(fake_make_operation_groups, fake_make_operation_groups_length), - macro_f_string_static_t_initialize(fake_make_operation_if, fake_make_operation_if_length), - macro_f_string_static_t_initialize(fake_make_operation_index, fake_make_operation_index_length), - macro_f_string_static_t_initialize(fake_make_operation_link, fake_make_operation_link_length), - macro_f_string_static_t_initialize(fake_make_operation_mode, fake_make_operation_mode_length), - macro_f_string_static_t_initialize(fake_make_operation_modes, fake_make_operation_modes_length), - macro_f_string_static_t_initialize(fake_make_operation_move, fake_make_operation_move_length), - macro_f_string_static_t_initialize(fake_make_operation_operate, fake_make_operation_operate_length), - macro_f_string_static_t_initialize(fake_make_operation_owner, fake_make_operation_owner_length), - macro_f_string_static_t_initialize(fake_make_operation_owners, fake_make_operation_owners_length), - macro_f_string_static_t_initialize(fake_make_operation_pop, fake_make_operation_pop_length), - macro_f_string_static_t_initialize(fake_make_operation_print, fake_make_operation_print_length), - macro_f_string_static_t_initialize(fake_make_operation_run, fake_make_operation_run_length), - macro_f_string_static_t_initialize(fake_make_operation_shell, fake_make_operation_shell_length), - macro_f_string_static_t_initialize(fake_make_operation_skeleton, fake_make_operation_skeleton_length), - macro_f_string_static_t_initialize(fake_make_operation_to, fake_make_operation_to_length), - macro_f_string_static_t_initialize(fake_make_operation_top, fake_make_operation_top_length), - macro_f_string_static_t_initialize(fake_make_operation_touch, fake_make_operation_touch_length), + macro_f_string_static_t_initialize(fake_make_operation_break_s, fake_make_operation_break_s_length), + macro_f_string_static_t_initialize(fake_make_operation_build_s, fake_make_operation_build_s_length), + macro_f_string_static_t_initialize(fake_make_operation_clean_s, fake_make_operation_clean_s_length), + macro_f_string_static_t_initialize(fake_make_operation_clone_s, fake_make_operation_clone_s_length), + macro_f_string_static_t_initialize(fake_make_operation_compile_s, fake_make_operation_compile_s_length), + macro_f_string_static_t_initialize(fake_make_operation_copy_s, fake_make_operation_copy_s_length), + macro_f_string_static_t_initialize(fake_make_operation_define_s, fake_make_operation_define_s_length), + macro_f_string_static_t_initialize(fake_make_operation_delete_s, fake_make_operation_delete_s_length), + macro_f_string_static_t_initialize(fake_make_operation_deletes_s, fake_make_operation_deletes_s_length), + macro_f_string_static_t_initialize(fake_make_operation_else_s, fake_make_operation_else_s_length), + macro_f_string_static_t_initialize(fake_make_operation_exit_s, fake_make_operation_exit_s_length), + macro_f_string_static_t_initialize(fake_make_operation_fail_s, fake_make_operation_fail_s_length), + macro_f_string_static_t_initialize(fake_make_operation_group_s, fake_make_operation_group_s_length), + macro_f_string_static_t_initialize(fake_make_operation_groups_s, fake_make_operation_groups_s_length), + macro_f_string_static_t_initialize(fake_make_operation_if_s, fake_make_operation_if_s_length), + macro_f_string_static_t_initialize(fake_make_operation_index_s, fake_make_operation_index_s_length), + macro_f_string_static_t_initialize(fake_make_operation_link_s, fake_make_operation_link_s_length), + macro_f_string_static_t_initialize(fake_make_operation_mode_s, fake_make_operation_mode_s_length), + macro_f_string_static_t_initialize(fake_make_operation_modes_s, fake_make_operation_modes_s_length), + macro_f_string_static_t_initialize(fake_make_operation_move_s, fake_make_operation_move_s_length), + macro_f_string_static_t_initialize(fake_make_operation_operate_s, fake_make_operation_operate_s_length), + macro_f_string_static_t_initialize(fake_make_operation_owner_s, fake_make_operation_owner_s_length), + macro_f_string_static_t_initialize(fake_make_operation_owners_s, fake_make_operation_owners_s_length), + macro_f_string_static_t_initialize(fake_make_operation_pop_s, fake_make_operation_pop_s_length), + macro_f_string_static_t_initialize(fake_make_operation_print_s, fake_make_operation_print_s_length), + macro_f_string_static_t_initialize(fake_make_operation_run_s, fake_make_operation_run_s_length), + macro_f_string_static_t_initialize(fake_make_operation_shell_s, fake_make_operation_shell_s_length), + macro_f_string_static_t_initialize(fake_make_operation_skeleton_s, fake_make_operation_skeleton_s_length), + macro_f_string_static_t_initialize(fake_make_operation_to_s, fake_make_operation_to_s_length), + macro_f_string_static_t_initialize(fake_make_operation_top_s, fake_make_operation_top_s_length), + macro_f_string_static_t_initialize(fake_make_operation_touch_s, fake_make_operation_touch_s_length), }; const f_string_range_t operations_range[] = { - macro_f_string_range_t_initialize(fake_make_operation_break_length), - macro_f_string_range_t_initialize(fake_make_operation_build_length), - macro_f_string_range_t_initialize(fake_make_operation_clean_length), - macro_f_string_range_t_initialize(fake_make_operation_clone_length), - macro_f_string_range_t_initialize(fake_make_operation_compile_length), - macro_f_string_range_t_initialize(fake_make_operation_copy_length), - macro_f_string_range_t_initialize(fake_make_operation_define_length), - macro_f_string_range_t_initialize(fake_make_operation_delete_length), - macro_f_string_range_t_initialize(fake_make_operation_deletes_length), - macro_f_string_range_t_initialize(fake_make_operation_else_length), - macro_f_string_range_t_initialize(fake_make_operation_exit_length), - macro_f_string_range_t_initialize(fake_make_operation_fail_length), - macro_f_string_range_t_initialize(fake_make_operation_group_length), - macro_f_string_range_t_initialize(fake_make_operation_groups_length), - macro_f_string_range_t_initialize(fake_make_operation_if_length), - macro_f_string_range_t_initialize(fake_make_operation_index_length), - macro_f_string_range_t_initialize(fake_make_operation_link_length), - macro_f_string_range_t_initialize(fake_make_operation_mode_length), - macro_f_string_range_t_initialize(fake_make_operation_modes_length), - macro_f_string_range_t_initialize(fake_make_operation_move_length), - macro_f_string_range_t_initialize(fake_make_operation_operate_length), - macro_f_string_range_t_initialize(fake_make_operation_owner_length), - macro_f_string_range_t_initialize(fake_make_operation_owners_length), - macro_f_string_range_t_initialize(fake_make_operation_pop_length), - macro_f_string_range_t_initialize(fake_make_operation_print_length), - macro_f_string_range_t_initialize(fake_make_operation_run_length), - macro_f_string_range_t_initialize(fake_make_operation_shell_length), - macro_f_string_range_t_initialize(fake_make_operation_skeleton_length), - macro_f_string_range_t_initialize(fake_make_operation_to_length), - macro_f_string_range_t_initialize(fake_make_operation_top_length), - macro_f_string_range_t_initialize(fake_make_operation_touch_length), + macro_f_string_range_t_initialize(fake_make_operation_break_s_length), + macro_f_string_range_t_initialize(fake_make_operation_build_s_length), + macro_f_string_range_t_initialize(fake_make_operation_clean_s_length), + macro_f_string_range_t_initialize(fake_make_operation_clone_s_length), + macro_f_string_range_t_initialize(fake_make_operation_compile_s_length), + macro_f_string_range_t_initialize(fake_make_operation_copy_s_length), + macro_f_string_range_t_initialize(fake_make_operation_define_s_length), + macro_f_string_range_t_initialize(fake_make_operation_delete_s_length), + macro_f_string_range_t_initialize(fake_make_operation_deletes_s_length), + macro_f_string_range_t_initialize(fake_make_operation_else_s_length), + macro_f_string_range_t_initialize(fake_make_operation_exit_s_length), + macro_f_string_range_t_initialize(fake_make_operation_fail_s_length), + macro_f_string_range_t_initialize(fake_make_operation_group_s_length), + macro_f_string_range_t_initialize(fake_make_operation_groups_s_length), + macro_f_string_range_t_initialize(fake_make_operation_if_s_length), + macro_f_string_range_t_initialize(fake_make_operation_index_s_length), + macro_f_string_range_t_initialize(fake_make_operation_link_s_length), + macro_f_string_range_t_initialize(fake_make_operation_mode_s_length), + macro_f_string_range_t_initialize(fake_make_operation_modes_s_length), + macro_f_string_range_t_initialize(fake_make_operation_move_s_length), + macro_f_string_range_t_initialize(fake_make_operation_operate_s_length), + macro_f_string_range_t_initialize(fake_make_operation_owner_s_length), + macro_f_string_range_t_initialize(fake_make_operation_owners_s_length), + macro_f_string_range_t_initialize(fake_make_operation_pop_s_length), + macro_f_string_range_t_initialize(fake_make_operation_print_s_length), + macro_f_string_range_t_initialize(fake_make_operation_run_s_length), + macro_f_string_range_t_initialize(fake_make_operation_shell_s_length), + macro_f_string_range_t_initialize(fake_make_operation_skeleton_s_length), + macro_f_string_range_t_initialize(fake_make_operation_to_s_length), + macro_f_string_range_t_initialize(fake_make_operation_top_s_length), + macro_f_string_range_t_initialize(fake_make_operation_touch_s_length), }; const uint8_t operations_type[] = { @@ -2139,7 +2139,7 @@ extern "C" { break; } - for (j = 0; j < fake_make_operation_total; ++j) { + for (j = 0; j < fake_make_operation_total_d; ++j) { if (fl_string_dynamic_partial_compare(operations_name[j], data_make->buffer, operations_range[j], section->objects.array[i]) == F_equal_to) { operation = operations_type[j]; @@ -2154,8 +2154,8 @@ extern "C" { *status = F_status_set_error(F_valid_not); } else if (operation == fake_make_operation_type_operate) { - if (section_stack->used == fake_make_section_stack_max) { - fake_print_message_section_operation_stack_max(*main, data_make->error, data_make->buffer, section->name, section->objects.array[i], fake_make_section_stack_max); + if (section_stack->used == fake_make_section_stack_max_d) { + fake_print_message_section_operation_stack_max(*main, data_make->error, data_make->buffer, section->name, section->objects.array[i], fake_make_section_stack_max_d); *status = F_status_set_error(F_recurse); } @@ -2261,8 +2261,8 @@ extern "C" { data_make->error.suffix = 0; data_make->error.context = main->context.set.error; data_make->error.notable = main->context.set.notable; - data_make->error.to.stream = f_type_error; - data_make->error.to.id = f_type_descriptor_error; + data_make->error.to.stream = F_type_error_d; + data_make->error.to.id = F_type_descriptor_error_d; data_make->error.set = &main->context.set; } @@ -2322,7 +2322,7 @@ extern "C" { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SIncomplete '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, operation_if == fake_make_operation_if_type_true_next || operation_if == fake_make_operation_if_type_false_next ? fake_make_operation_if : fake_make_operation_else, data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, operation_if == fake_make_operation_if_type_true_next || operation_if == fake_make_operation_if_type_false_next ? fake_make_operation_if_s : fake_make_operation_else_s, data_make->error.notable); fl_print_format("%[' at end of section.%]%c", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s[0]); funlockfile(data_make->error.to.stream); @@ -2371,10 +2371,10 @@ extern "C" { if (operation == fake_make_operation_type_break) { - if (!arguments.used || fl_string_dynamic_compare_string(fake_make_operation_argument_success, arguments.array[0], fake_make_operation_argument_success_length) == F_equal_to) { + if (!arguments.used || fl_string_dynamic_compare_string(fake_make_operation_argument_success_s, arguments.array[0], fake_make_operation_argument_success_s_length) == F_equal_to) { *status = F_signal_abort; } - else if (fl_string_dynamic_compare_string(fake_make_operation_argument_failure, arguments.array[0], fake_make_operation_argument_failure_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(fake_make_operation_argument_failure_s, arguments.array[0], fake_make_operation_argument_failure_s_length) == F_equal_to) { *status = F_status_set_error(F_signal_abort); } else { @@ -2385,7 +2385,7 @@ extern "C" { flockfile(main->output.to.stream); fl_print_format("%cBreaking as '", main->output.to.stream, f_string_eol_s[0]); - fl_print_format("%[%S%]", main->output.to.stream, main->context.set.notable, arguments.used ? arguments.array[0].string : fake_make_operation_argument_success, main->context.set.notable); + fl_print_format("%[%S%]", main->output.to.stream, main->context.set.notable, arguments.used ? arguments.array[0].string : fake_make_operation_argument_success_s, main->context.set.notable); fl_print_format("'.%c", main->output.to.stream, f_string_eol_s[0]); funlockfile(main->output.to.stream); @@ -2646,7 +2646,7 @@ extern "C" { } if (operation == fake_make_operation_type_delete || operation == fake_make_operation_type_deletes) { - const int recursion_max = operation == fake_make_operation_type_delete ? 0 : f_directory_descriptors_max; + const int recursion_max = operation == fake_make_operation_type_delete ? 0 : F_directory_descriptors_max_d; struct stat file_stat; for (f_array_length_t i = 0; i < arguments.used; ++i) { @@ -2736,10 +2736,10 @@ extern "C" { if (operation == fake_make_operation_type_exit) { - if (!arguments.used || fl_string_dynamic_compare_string(fake_make_operation_argument_success, arguments.array[0], fake_make_operation_argument_success_length) == F_equal_to) { + if (!arguments.used || fl_string_dynamic_compare_string(fake_make_operation_argument_success_s, arguments.array[0], fake_make_operation_argument_success_s_length) == F_equal_to) { *status = F_signal_quit; } - else if (fl_string_dynamic_compare_string(fake_make_operation_argument_failure, arguments.array[0], fake_make_operation_argument_failure_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(fake_make_operation_argument_failure_s, arguments.array[0], fake_make_operation_argument_failure_s_length) == F_equal_to) { *status = F_status_set_error(F_signal_quit); // forcing exit forces fail mode. @@ -2748,8 +2748,8 @@ extern "C" { data_make->error.suffix = 0; data_make->error.context = main->context.set.error; data_make->error.notable = main->context.set.notable; - data_make->error.to.stream = f_type_error; - data_make->error.to.id = f_type_descriptor_error; + data_make->error.to.stream = F_type_error_d; + data_make->error.to.id = F_type_descriptor_error_d; data_make->error.set = &main->context.set; } else { @@ -2757,7 +2757,7 @@ extern "C" { } if (main->error.verbosity == f_console_verbosity_verbose) { - fll_print_format("%cExiting as '%[%S%]'.%c", main->output.to.stream, f_string_eol_s[0], main->context.set.notable, arguments.used ? arguments.array[0].string : fake_make_operation_argument_success, main->context.set.notable, f_string_eol_s[0]); + fll_print_format("%cExiting as '%[%S%]'.%c", main->output.to.stream, f_string_eol_s[0], main->context.set.notable, arguments.used ? arguments.array[0].string : fake_make_operation_argument_success_s, main->context.set.notable, f_string_eol_s[0]); } return 0; @@ -2765,27 +2765,27 @@ extern "C" { if (operation == fake_make_operation_type_fail) { - if (fl_string_dynamic_compare_string(fake_make_operation_argument_exit, arguments.array[0], fake_make_operation_argument_exit_length) == F_equal_to) { + if (fl_string_dynamic_compare_string(fake_make_operation_argument_exit_s, arguments.array[0], fake_make_operation_argument_exit_s_length) == F_equal_to) { data_make->setting_make.fail = fake_make_operation_fail_type_exit; data_make->error.prefix = fl_print_error_s; data_make->error.suffix = 0; data_make->error.context = main->context.set.error; data_make->error.notable = main->context.set.notable; - data_make->error.to.stream = f_type_error; - data_make->error.to.id = f_type_descriptor_error; + data_make->error.to.stream = F_type_error_d; + data_make->error.to.id = F_type_descriptor_error_d; data_make->error.set = &main->context.set; } - else if (fl_string_dynamic_compare_string(fake_make_operation_argument_warn, arguments.array[0], fake_make_operation_argument_warn_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(fake_make_operation_argument_warn_s, arguments.array[0], fake_make_operation_argument_warn_s_length) == F_equal_to) { data_make->setting_make.fail = fake_make_operation_fail_type_warn; data_make->error.prefix = fl_print_warning_s; data_make->error.suffix = 0; data_make->error.context = main->context.set.warning; data_make->error.notable = main->context.set.notable; - data_make->error.to.stream = f_type_warning; - data_make->error.to.id = f_type_descriptor_warning; + data_make->error.to.stream = F_type_warning_d; + data_make->error.to.id = F_type_descriptor_warning_d; data_make->error.set = &main->context.set; } - else if (fl_string_dynamic_compare_string(fake_make_operation_argument_ignore, arguments.array[0], fake_make_operation_argument_ignore_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(fake_make_operation_argument_ignore_s, arguments.array[0], fake_make_operation_argument_ignore_s_length) == F_equal_to) { data_make->setting_make.fail = fake_make_operation_fail_type_ignore; data_make->error.to.stream = 0; data_make->error.to.id = -1; @@ -2797,13 +2797,13 @@ extern "C" { f_print_terminated("Set failure state to '", main->output.to.stream); if (data_make->setting_make.fail == fake_make_operation_fail_type_exit) { - fl_print_format("%[%s%]", main->output.to.stream, main->context.set.notable, fake_make_operation_argument_exit, main->context.set.notable); + fl_print_format("%[%s%]", main->output.to.stream, main->context.set.notable, fake_make_operation_argument_exit_s, main->context.set.notable); } else if (data_make->setting_make.fail == fake_make_operation_fail_type_warn) { - fl_print_format("%[%s%]", main->output.to.stream, main->context.set.notable, fake_make_operation_argument_warn, main->context.set.notable); + fl_print_format("%[%s%]", main->output.to.stream, main->context.set.notable, fake_make_operation_argument_warn_s, main->context.set.notable); } else if (data_make->setting_make.fail == fake_make_operation_fail_type_ignore) { - fl_print_format("%[%s%]", main->output.to.stream, main->context.set.notable, fake_make_operation_argument_ignore, main->context.set.notable); + fl_print_format("%[%s%]", main->output.to.stream, main->context.set.notable, fake_make_operation_argument_ignore_s, main->context.set.notable); } fl_print_format("'.%c", main->output.to.stream, f_string_eol_s[0]); @@ -2874,7 +2874,7 @@ extern "C" { continue; } - status_file = fll_file_role_change_all(arguments.array[i].string, -1, id, F_false, fake_make_operation_recursion_depth_max); + status_file = fll_file_role_change_all(arguments.array[i].string, -1, id, F_false, fake_make_operation_recursion_depth_max_d); if (F_status_is_error(status_file)) { *status = status_file; @@ -2949,7 +2949,7 @@ extern "C" { if (*operation_if == fake_make_operation_if_type_if_mode) { bool is = F_false; - if (fl_string_dynamic_compare_string(fake_make_operation_argument_is, arguments.array[1], fake_make_operation_argument_is_length) == F_equal_to) { + if (fl_string_dynamic_compare_string(fake_make_operation_argument_is_s, arguments.array[1], fake_make_operation_argument_is_s_length) == F_equal_to) { is = F_true; } @@ -2990,7 +2990,7 @@ extern "C" { } if (is) { - if (mode_match != (mode_file & f_file_mode_all)) { + if (mode_match != (mode_file & F_file_mode_all_d)) { *operation_if = fake_make_operation_if_type_false_next; break; } @@ -3049,30 +3049,30 @@ extern "C" { for (; i < arguments.used; ++i) { - if (fl_string_dynamic_compare_string(fake_make_operation_argument_if_is_for, arguments.array[i], fake_make_operation_argument_if_is_for_length) == F_equal_to) { + if (fl_string_dynamic_compare_string(fake_make_operation_argument_if_is_for_s, arguments.array[i], fake_make_operation_argument_if_is_for_s_length) == F_equal_to) { ++i; break; } - if (fl_string_dynamic_compare_string(f_file_type_name_block, arguments.array[i], f_file_type_name_block_length) == F_equal_to) { + if (fl_string_dynamic_compare_string(F_file_type_name_block_s, arguments.array[i], F_file_type_name_block_s_length) == F_equal_to) { type |= 0x1; } - else if (fl_string_dynamic_compare_string(f_file_type_name_character, arguments.array[i], f_file_type_name_character_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(F_file_type_name_character_s, arguments.array[i], F_file_type_name_character_s_length) == F_equal_to) { type |= 0x2; } - else if (fl_string_dynamic_compare_string(f_file_type_name_directory, arguments.array[i], f_file_type_name_directory_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(F_file_type_name_directory_s, arguments.array[i], F_file_type_name_directory_s_length) == F_equal_to) { type |= 0x4; } - else if (fl_string_dynamic_compare_string(f_file_type_name_fifo, arguments.array[i], f_file_type_name_fifo_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(F_file_type_name_fifo_s, arguments.array[i], F_file_type_name_fifo_s_length) == F_equal_to) { type |= 0x8; } - else if (fl_string_dynamic_compare_string(f_file_type_name_link, arguments.array[i], f_file_type_name_link_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(F_file_type_name_link_s, arguments.array[i], F_file_type_name_link_s_length) == F_equal_to) { type |= 0x10; } - else if (fl_string_dynamic_compare_string(f_file_type_name_regular, arguments.array[i], f_file_type_name_regular_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(F_file_type_name_regular_s, arguments.array[i], F_file_type_name_regular_s_length) == F_equal_to) { type |= 0x20; } - else if (fl_string_dynamic_compare_string(f_file_type_name_socket, arguments.array[i], f_file_type_name_socket_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(F_file_type_name_socket_s, arguments.array[i], F_file_type_name_socket_s_length) == F_equal_to) { type |= 0x40; } } // for @@ -3147,7 +3147,7 @@ extern "C" { if (*operation_if == fake_make_operation_if_type_if_defined) { - if (fl_string_dynamic_compare_string(fake_make_operation_argument_environment, arguments.array[1], fake_make_operation_argument_environment_length) == F_equal_to) { + if (fl_string_dynamic_compare_string(fake_make_operation_argument_environment_s, arguments.array[1], fake_make_operation_argument_environment_s_length) == F_equal_to) { *operation_if = fake_make_operation_if_type_true_next; for (f_array_length_t i = 2; i < arguments.used; ++i) { @@ -3158,7 +3158,7 @@ extern "C" { } } // for } - else if (fl_string_dynamic_compare_string(fake_make_operation_argument_parameter, arguments.array[1], fake_make_operation_argument_parameter_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(fake_make_operation_argument_parameter_s, arguments.array[1], fake_make_operation_argument_parameter_s_length) == F_equal_to) { if (!data_make->setting_make.parameter.used) { *operation_if = fake_make_operation_if_type_false_next; @@ -3356,15 +3356,15 @@ extern "C" { if (main->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { flockfile(data_make->error.to.stream); - if ((i == 1 && number_left > f_number_t_size_unsigned) || (i > 1 && number_right > f_number_t_size_unsigned)) { + if ((i == 1 && number_left > F_number_t_size_unsigned_d) || (i > 1 && number_right > F_number_t_size_unsigned_d)) { fl_print_format("%c%[%SThe number '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[i], data_make->error.notable); - fl_print_format("%[' may only be between the ranges -%un to %un.%]%c", data_make->error.to.stream, data_make->error.context, f_number_t_size_unsigned, f_number_t_size_unsigned, data_make->error.context, f_string_eol_s[0]); + fl_print_format("%[' may only be between the ranges -%un to %un.%]%c", data_make->error.to.stream, data_make->error.context, F_number_t_size_unsigned_d, F_number_t_size_unsigned_d, data_make->error.context, f_string_eol_s[0]); } else { fl_print_format("%c%[%SInvalid or unsupported number provided '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[i], data_make->error.notable); - fl_print_format("%['.%]%c", data_make->error.to.stream, data_make->error.context, f_number_t_size_unsigned, f_number_t_size_unsigned, data_make->error.context, f_string_eol_s[0]); + fl_print_format("%['.%]%c", data_make->error.to.stream, data_make->error.context, F_number_t_size_unsigned_d, F_number_t_size_unsigned_d, data_make->error.context, f_string_eol_s[0]); } funlockfile(data_make->error.to.stream); @@ -3465,7 +3465,7 @@ extern "C" { break; } - *status = fll_file_mode_set_all(arguments.array[i].string, mode, fake_make_operation_recursion_depth_max); + *status = fll_file_mode_set_all(arguments.array[i].string, mode, fake_make_operation_recursion_depth_max_d); if (F_status_is_error(*status)) { fll_error_file_print(data_make->error, F_status_set_fine(*status), "fll_file_mode_set_all", F_true, arguments.array[i].string, "change mode of", fll_error_file_type_file); @@ -3624,7 +3624,7 @@ extern "C" { continue; } - status_file = fll_file_role_change_all(arguments.array[i].string, id, -1, F_false, fake_make_operation_recursion_depth_max); + status_file = fll_file_role_change_all(arguments.array[i].string, id, -1, F_false, fake_make_operation_recursion_depth_max_d); if (F_status_is_error(status_file)) { *status = status_file; @@ -3737,7 +3737,7 @@ extern "C" { } else { if (data_make->path.stack.used == data_make->path.stack.size) { - *status = f_string_dynamics_increase_by(f_memory_default_allocation_small, &data_make->path.stack); + *status = f_string_dynamics_increase_by(F_memory_default_allocation_small_d, &data_make->path.stack); if (F_status_set_fine(*status) == F_array_too_large) { fake_print_message_section_operation_path_stack_max(*main, data_make->error, F_array_too_large, "f_string_dynamics_increase_by", "path stack"); @@ -3810,7 +3810,7 @@ extern "C" { for (f_array_length_t i = 1; i < arguments.used; ++i) { - if (fl_string_dynamic_compare_string(fake_make_operation_argument_file, arguments.array[0], fake_make_operation_argument_file_length) == F_equal_to) { + if (fl_string_dynamic_compare_string(fake_make_operation_argument_file_s, arguments.array[0], fake_make_operation_argument_file_s_length) == F_equal_to) { *status = f_file_touch(arguments.array[i].string, mode.regular, F_false); if (F_status_is_error(*status)) { @@ -3824,7 +3824,7 @@ extern "C" { break; } } - else if (fl_string_dynamic_compare_string(fake_make_operation_argument_directory, arguments.array[0], fake_make_operation_argument_directory_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(fake_make_operation_argument_directory_s, arguments.array[0], fake_make_operation_argument_directory_s_length) == F_equal_to) { *status = f_directory_touch(arguments.array[i].string, mode.directory); if (F_status_is_error(*status)) { @@ -3902,7 +3902,7 @@ extern "C" { f_signal_set_empty(&signals.block); f_signal_set_fill(&signals.block_not); - fl_execute_parameter_t parameter = macro_fl_execute_parameter_t_initialize(as_shell ? 0 : fl_execute_parameter_option_path, 0, &data_make->environment, &signals, 0); + fl_execute_parameter_t parameter = macro_fl_execute_parameter_t_initialize(as_shell ? 0 : FL_execute_parameter_option_path_d, 0, &data_make->environment, &signals, 0); status = fll_execute_program(program.string, arguments, ¶meter, 0, (void *) &return_code); @@ -4075,7 +4075,7 @@ extern "C" { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SNo indexer has been specified, cannot perform '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%s%]", data_make->error.to.stream, data_make->error.notable, fake_make_operation_index, data_make->error.notable); + fl_print_format("%[%s%]", data_make->error.to.stream, data_make->error.notable, fake_make_operation_index_s, data_make->error.notable); fl_print_format("%[' section operation.%]%c", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s[0]); funlockfile(data_make->error.to.stream); @@ -4097,8 +4097,8 @@ extern "C" { *status = F_status_set_error(F_failure); } else if (arguments.used) { - if (fl_string_dynamic_compare_string(fake_make_operation_argument_success, arguments.array[0], fake_make_operation_argument_success_length) == F_equal_to_not) { - if (fl_string_dynamic_compare_string(fake_make_operation_argument_failure, arguments.array[0], fake_make_operation_argument_failure_length) == F_equal_to_not) { + if (fl_string_dynamic_compare_string(fake_make_operation_argument_success_s, arguments.array[0], fake_make_operation_argument_success_s_length) == F_equal_to_not) { + if (fl_string_dynamic_compare_string(fake_make_operation_argument_failure_s, arguments.array[0], fake_make_operation_argument_failure_s_length) == F_equal_to_not) { if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { flockfile(data_make->error.to.stream); @@ -4135,7 +4135,7 @@ extern "C" { path_file[main.path_data_build.used + arguments.array[0].used] = 0; - f_status_t status_file = f_file_is(path_file, f_file_type_regular, F_false); + f_status_t status_file = f_file_is(path_file, F_file_type_regular_d, F_false); if (status_file == F_file_found_not) { if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { @@ -4305,7 +4305,7 @@ extern "C" { flockfile(data_make->error.to.stream); fl_print_format("%c%[%SNo compiler has been specified, cannot perform '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%s%]", data_make->error.to.stream, data_make->error.notable, fake_make_operation_compile, data_make->error.notable); + fl_print_format("%[%s%]", data_make->error.to.stream, data_make->error.notable, fake_make_operation_compile_s, data_make->error.notable); fl_print_format("%[' section operation.%]%c", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s[0]); funlockfile(data_make->error.to.stream); @@ -4536,8 +4536,8 @@ extern "C" { *status = F_status_set_error(F_failure); } else if (arguments.used) { - if (fl_string_dynamic_compare_string(fake_make_operation_argument_success, arguments.array[0], fake_make_operation_argument_success_length) == F_equal_to_not) { - if (fl_string_dynamic_compare_string(fake_make_operation_argument_failure, arguments.array[0], fake_make_operation_argument_failure_length) == F_equal_to_not) { + if (fl_string_dynamic_compare_string(fake_make_operation_argument_success_s, arguments.array[0], fake_make_operation_argument_success_s_length) == F_equal_to_not) { + if (fl_string_dynamic_compare_string(fake_make_operation_argument_failure_s, arguments.array[0], fake_make_operation_argument_failure_s_length) == F_equal_to_not) { if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { flockfile(data_make->error.to.stream); @@ -4558,9 +4558,9 @@ extern "C" { if (operation == fake_make_operation_type_fail) { if (arguments.used) { - if (fl_string_dynamic_compare_string(fake_make_operation_argument_exit, arguments.array[0], fake_make_operation_argument_exit_length) == F_equal_to_not) { - if (fl_string_dynamic_compare_string(fake_make_operation_argument_warn, arguments.array[0], fake_make_operation_argument_warn_length) == F_equal_to_not) { - if (fl_string_dynamic_compare_string(fake_make_operation_argument_ignore, arguments.array[0], fake_make_operation_argument_ignore_length) == F_equal_to_not) { + if (fl_string_dynamic_compare_string(fake_make_operation_argument_exit_s, arguments.array[0], fake_make_operation_argument_exit_s_length) == F_equal_to_not) { + if (fl_string_dynamic_compare_string(fake_make_operation_argument_warn_s, arguments.array[0], fake_make_operation_argument_warn_s_length) == F_equal_to_not) { + if (fl_string_dynamic_compare_string(fake_make_operation_argument_ignore_s, arguments.array[0], fake_make_operation_argument_ignore_s_length) == F_equal_to_not) { if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { flockfile(data_make->error.to.stream); @@ -4593,7 +4593,7 @@ extern "C" { for (f_array_length_t i = 1; i < arguments.used; ++i) { - status_file = f_file_is(arguments.array[i].string, f_file_type_regular, F_false); + status_file = f_file_is(arguments.array[i].string, F_file_type_regular_d, F_false); if (status_file == F_file_found_not) { if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { @@ -4649,37 +4649,37 @@ extern "C" { if (arguments.used) { const f_string_t if_type_strings[] = { - fake_make_operation_argument_if_defined, - fake_make_operation_argument_if_equal, - fake_make_operation_argument_if_equal_not, - fake_make_operation_argument_if_exists, - fake_make_operation_argument_if_failure, - fake_make_operation_argument_if_greater, - fake_make_operation_argument_if_greater_equal, - fake_make_operation_argument_if_group, - fake_make_operation_argument_if_is, - fake_make_operation_argument_if_less, - fake_make_operation_argument_if_less_equal, - fake_make_operation_argument_if_mode, - fake_make_operation_argument_if_owner, - fake_make_operation_argument_if_success, + fake_make_operation_argument_if_defined_s, + fake_make_operation_argument_if_equal_s, + fake_make_operation_argument_if_equal_not_s, + fake_make_operation_argument_if_exists_s, + fake_make_operation_argument_if_failure_s, + fake_make_operation_argument_if_greater_s, + fake_make_operation_argument_if_greater_equal_s, + fake_make_operation_argument_if_group_s, + fake_make_operation_argument_if_is_s, + fake_make_operation_argument_if_less_s, + fake_make_operation_argument_if_less_equal_s, + fake_make_operation_argument_if_mode_s, + fake_make_operation_argument_if_owner_s, + fake_make_operation_argument_if_success_s, }; const f_array_length_t if_type_lengths[] = { - fake_make_operation_argument_if_defined_length, - fake_make_operation_argument_if_equal_length, - fake_make_operation_argument_if_equal_not_length, - fake_make_operation_argument_if_exists_length, - fake_make_operation_argument_if_failure_length, - fake_make_operation_argument_if_greater_length, - fake_make_operation_argument_if_greater_equal_length, - fake_make_operation_argument_if_group_length, - fake_make_operation_argument_if_is_length, - fake_make_operation_argument_if_less_length, - fake_make_operation_argument_if_less_equal_length, - fake_make_operation_argument_if_mode_length, - fake_make_operation_argument_if_owner_length, - fake_make_operation_argument_if_success_length, + fake_make_operation_argument_if_defined_s_length, + fake_make_operation_argument_if_equal_s_length, + fake_make_operation_argument_if_equal_not_s_length, + fake_make_operation_argument_if_exists_s_length, + fake_make_operation_argument_if_failure_s_length, + fake_make_operation_argument_if_greater_s_length, + fake_make_operation_argument_if_greater_equal_s_length, + fake_make_operation_argument_if_group_s_length, + fake_make_operation_argument_if_is_s_length, + fake_make_operation_argument_if_less_s_length, + fake_make_operation_argument_if_less_equal_s_length, + fake_make_operation_argument_if_mode_s_length, + fake_make_operation_argument_if_owner_s_length, + fake_make_operation_argument_if_success_s_length, }; const uint8_t if_type_codes[] = { @@ -4760,8 +4760,8 @@ extern "C" { if (*operation_if == fake_make_operation_if_type_if_mode || *operation_if == fake_make_operation_if_type_if_owner || *operation_if == fake_make_operation_if_type_if_group || *operation_if == fake_make_operation_if_type_if_is || *operation_if == fake_make_operation_if_type_if_exists) { if (*operation_if == fake_make_operation_if_type_if_mode) { - if (fl_string_dynamic_compare_string(fake_make_operation_argument_is, arguments.array[1], fake_make_operation_argument_is_length) == F_equal_to_not) { - if (fl_string_dynamic_compare_string(fake_make_operation_argument_has, arguments.array[1], fake_make_operation_argument_has_length) == F_equal_to_not) { + if (fl_string_dynamic_compare_string(fake_make_operation_argument_is_s, arguments.array[1], fake_make_operation_argument_is_s_length) == F_equal_to_not) { + if (fl_string_dynamic_compare_string(fake_make_operation_argument_has_s, arguments.array[1], fake_make_operation_argument_has_s_length) == F_equal_to_not) { if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { flockfile(data_make->error.to.stream); @@ -4813,30 +4813,30 @@ extern "C" { for (i = 1; i < arguments.used; ++i) { - if (fl_string_dynamic_compare_string(fake_make_operation_argument_if_is_for, arguments.array[i], fake_make_operation_argument_if_is_for_length) == F_equal_to) { + if (fl_string_dynamic_compare_string(fake_make_operation_argument_if_is_for_s, arguments.array[i], fake_make_operation_argument_if_is_for_s_length) == F_equal_to) { ++i; break; } - if (fl_string_dynamic_compare_string(f_file_type_name_block, arguments.array[i], f_file_type_name_block_length) == F_equal_to) { + if (fl_string_dynamic_compare_string(F_file_type_name_block_s, arguments.array[i], F_file_type_name_block_s_length) == F_equal_to) { type_file |= 0x1; } - else if (fl_string_dynamic_compare_string(f_file_type_name_character, arguments.array[i], f_file_type_name_character_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(F_file_type_name_character_s, arguments.array[i], F_file_type_name_character_s_length) == F_equal_to) { type_file |= 0x2; } - else if (fl_string_dynamic_compare_string(f_file_type_name_directory, arguments.array[i], f_file_type_name_directory_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(F_file_type_name_directory_s, arguments.array[i], F_file_type_name_directory_s_length) == F_equal_to) { type_file |= 0x4; } - else if (fl_string_dynamic_compare_string(f_file_type_name_fifo, arguments.array[i], f_file_type_name_fifo_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(F_file_type_name_fifo_s, arguments.array[i], F_file_type_name_fifo_s_length) == F_equal_to) { type_file |= 0x8; } - else if (fl_string_dynamic_compare_string(f_file_type_name_link, arguments.array[i], f_file_type_name_link_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(F_file_type_name_link_s, arguments.array[i], F_file_type_name_link_s_length) == F_equal_to) { type_file |= 0x10; } - else if (fl_string_dynamic_compare_string(f_file_type_name_regular, arguments.array[i], f_file_type_name_regular_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(F_file_type_name_regular_s, arguments.array[i], F_file_type_name_regular_s_length) == F_equal_to) { type_file |= 0x20; } - else if (fl_string_dynamic_compare_string(f_file_type_name_socket, arguments.array[i], f_file_type_name_socket_length) == F_equal_to) { + else if (fl_string_dynamic_compare_string(F_file_type_name_socket_s, arguments.array[i], F_file_type_name_socket_s_length) == F_equal_to) { type_file |= 0x40; } else { @@ -4912,8 +4912,8 @@ extern "C" { if (*operation_if == fake_make_operation_if_type_if_defined) { - if (fl_string_dynamic_compare_string(fake_make_operation_argument_environment, arguments.array[1], fake_make_operation_argument_environment_length) == F_equal_to_not) { - if (fl_string_dynamic_compare_string(fake_make_operation_argument_parameter, arguments.array[1], fake_make_operation_argument_parameter_length) == F_equal_to_not) { + if (fl_string_dynamic_compare_string(fake_make_operation_argument_environment_s, arguments.array[1], fake_make_operation_argument_environment_s_length) == F_equal_to_not) { + if (fl_string_dynamic_compare_string(fake_make_operation_argument_parameter_s, arguments.array[1], fake_make_operation_argument_parameter_s_length) == F_equal_to_not) { if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { flockfile(data_make->error.to.stream); @@ -4990,10 +4990,10 @@ extern "C" { if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { flockfile(data_make->error.to.stream); - if (number > f_number_t_size_unsigned) { + if (number > F_number_t_size_unsigned_d) { fl_print_format("%c%[%SThe number '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[i], data_make->error.notable); - fl_print_format("%[' may only be between the ranges -%un to %un.%]%c", data_make->error.to.stream, data_make->error.context, f_number_t_size_unsigned, f_number_t_size_unsigned, data_make->error.context, f_string_eol_s[0]); + fl_print_format("%[' may only be between the ranges -%un to %un.%]%c", data_make->error.to.stream, data_make->error.context, F_number_t_size_unsigned_d, F_number_t_size_unsigned_d, data_make->error.context, f_string_eol_s[0]); } else { fl_print_format("%c%[%SInvalid or unsupported number provided '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context); @@ -5218,7 +5218,7 @@ extern "C" { } else if (arguments.used) { if (arguments.array[0].used) { - f_status_t status_file = f_file_is(arguments.array[0].string, f_file_type_directory, F_false); + f_status_t status_file = f_file_is(arguments.array[0].string, F_file_type_directory_d, F_false); if (status_file == F_file_found_not) { if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { @@ -5273,8 +5273,8 @@ extern "C" { if (operation == fake_make_operation_type_touch) { if (arguments.used > 1) { - if (fl_string_dynamic_compare_string(fake_make_operation_argument_file, arguments.array[0], fake_make_operation_argument_file_length) == F_equal_to_not) { - if (fl_string_dynamic_compare_string(fake_make_operation_argument_directory, arguments.array[0], fake_make_operation_argument_directory_length) == F_equal_to_not) { + if (fl_string_dynamic_compare_string(fake_make_operation_argument_file_s, arguments.array[0], fake_make_operation_argument_file_s_length) == F_equal_to_not) { + if (fl_string_dynamic_compare_string(fake_make_operation_argument_directory_s, arguments.array[0], fake_make_operation_argument_directory_s_length) == F_equal_to_not) { if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) { flockfile(data_make->error.to.stream); diff --git a/level_3/fake/c/private-make.h b/level_3/fake/c/private-make.h index 091cead..34671bc 100644 --- a/level_3/fake/c/private-make.h +++ b/level_3/fake/c/private-make.h @@ -30,7 +30,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_assure_inside_project_ - extern f_status_t fake_make_assure_inside_project(const fake_main_t main, const f_string_static_t path, fake_make_data_t *data_make) f_attribute_visibility_internal; + extern f_status_t fake_make_assure_inside_project(const fake_main_t main, const f_string_static_t path, fake_make_data_t *data_make) F_attribute_visibility_internal_d; #endif // _di_fake_make_assure_inside_project_ /** @@ -52,7 +52,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_get_id_group_ - f_status_t fake_make_get_id_group(const fake_main_t main, const fl_print_t print, const f_string_static_t buffer, gid_t *id) f_attribute_visibility_internal; + f_status_t fake_make_get_id_group(const fake_main_t main, const fl_print_t print, const f_string_static_t buffer, gid_t *id) F_attribute_visibility_internal_d; #endif // _di_fake_make_get_id_group_ /** @@ -68,7 +68,7 @@ extern "C" { * The determined mode. * This uses bitwise data. * @param replace - * The determined modes that are to be replaced, such as: f_file_mode_t_replace_owner. + * The determined modes that are to be replaced, such as: F_file_mode_t_replace_owner_d. * This uses bitwise data. * * @return @@ -78,7 +78,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_get_id_mode_ - f_status_t fake_make_get_id_mode(const fake_main_t main, const fl_print_t print, const f_string_static_t buffer, f_file_mode_t *mode, uint8_t *replace) f_attribute_visibility_internal; + f_status_t fake_make_get_id_mode(const fake_main_t main, const fl_print_t print, const f_string_static_t buffer, f_file_mode_t *mode, uint8_t *replace) F_attribute_visibility_internal_d; #endif // _di_fake_make_get_id_mode_ /** @@ -100,7 +100,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_get_id_owner_ - f_status_t fake_make_get_id_owner(const fake_main_t main, const fl_print_t print, const f_string_static_t buffer, uid_t *id) f_attribute_visibility_internal; + f_status_t fake_make_get_id_owner(const fake_main_t main, const fl_print_t print, const f_string_static_t buffer, uid_t *id) F_attribute_visibility_internal_d; #endif // _di_fake_make_get_id_owner_ /** @@ -122,7 +122,7 @@ extern "C" { * @see fake_build_load_setting() */ #ifndef _di_fake_make_load_fakefile_ - extern void fake_make_load_fakefile(const fake_main_t main, fake_make_data_t *data_make, f_status_t *status) f_attribute_visibility_internal; + extern void fake_make_load_fakefile(const fake_main_t main, fake_make_data_t *data_make, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_make_load_fakefile_ /** @@ -140,7 +140,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_load_parameters_ - extern void fake_make_load_parameters(const fake_main_t main, fake_make_data_t *data_make, f_status_t *status) f_attribute_visibility_internal; + extern void fake_make_load_parameters(const fake_main_t main, fake_make_data_t *data_make, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_make_load_parameters_ /** @@ -158,7 +158,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_operate_ - extern f_status_t fake_make_operate(fake_main_t *main) f_attribute_visibility_internal; + extern f_status_t fake_make_operate(fake_main_t *main) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_ /** @@ -188,7 +188,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_operate_expand_ - extern void fake_make_operate_expand(const fake_main_t main, const f_string_range_t section_name, const f_array_length_t operation, const f_string_static_t operation_name, const f_fss_content_t content, const f_fss_quotes_t quoteds, fake_make_data_t *data_make, f_string_dynamics_t *arguments, f_status_t *status) f_attribute_visibility_internal; + extern void fake_make_operate_expand(const fake_main_t main, const f_string_range_t section_name, const f_array_length_t operation, const f_string_static_t operation_name, const f_fss_content_t content, const f_fss_quotes_t quoteds, fake_make_data_t *data_make, f_string_dynamics_t *arguments, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_expand_ /** @@ -212,7 +212,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_operate_expand_environment_ - extern f_status_t fake_make_operate_expand_environment(const fake_main_t main, const f_fss_quote_t quoted, const f_string_range_t range_name, fake_make_data_t *data_make, f_string_dynamics_t *arguments) f_attribute_visibility_internal; + extern f_status_t fake_make_operate_expand_environment(const fake_main_t main, const f_fss_quote_t quoted, const f_string_range_t range_name, fake_make_data_t *data_make, f_string_dynamics_t *arguments) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_expand_environment_ /** @@ -236,7 +236,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_operate_expand_build_ - extern f_status_t fake_make_operate_expand_build(const fake_main_t main, const f_fss_quote_t quoted, const f_string_range_t range_name, fake_make_data_t *data_make, f_string_dynamics_t *arguments) f_attribute_visibility_internal; + extern f_status_t fake_make_operate_expand_build(const fake_main_t main, const f_fss_quote_t quoted, const f_string_range_t range_name, fake_make_data_t *data_make, f_string_dynamics_t *arguments) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_expand_build_ /** @@ -262,7 +262,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_make_operate_section_ - int fake_make_operate_section(const f_array_length_t id_section, fake_main_t *main, fake_make_data_t *data_make, f_array_lengths_t *section_stack, f_status_t *status) f_attribute_visibility_internal; + int fake_make_operate_section(const f_array_length_t id_section, fake_main_t *main, fake_make_data_t *data_make, f_array_lengths_t *section_stack, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_section_ /** @@ -296,7 +296,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_make_operate_process_ - extern int fake_make_operate_process(const f_string_range_t section_name, const uint8_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, const bool success, uint8_t *operation_if, fake_main_t *main, fake_make_data_t *data_make, f_array_lengths_t *section_stack, f_status_t *status) f_attribute_visibility_internal; + extern int fake_make_operate_process(const f_string_range_t section_name, const uint8_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, const bool success, uint8_t *operation_if, fake_main_t *main, fake_make_data_t *data_make, f_array_lengths_t *section_stack, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_ /** @@ -318,7 +318,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_operate_process_execute_ - extern f_status_t fake_make_operate_process_execute(const fake_main_t main, const f_string_static_t program, const f_string_statics_t arguments, const bool as_shell, fake_make_data_t *data_make) f_attribute_visibility_internal; + extern f_status_t fake_make_operate_process_execute(const fake_main_t main, const f_string_static_t program, const f_string_statics_t arguments, const bool as_shell, fake_make_data_t *data_make) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_execute_ /** @@ -336,7 +336,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_operate_process_return_ - extern void fake_make_operate_process_return(const fake_main_t main, const int return_code, fake_make_data_t *data_make, f_status_t *status) f_attribute_visibility_internal; + extern void fake_make_operate_process_return(const fake_main_t main, const int return_code, fake_make_data_t *data_make, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_return_ /** @@ -356,7 +356,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_operate_process_run_ - extern f_status_t fake_make_operate_process_run(const fake_main_t main, const f_string_statics_t arguments, const bool as_shell, fake_make_data_t *data_make) f_attribute_visibility_internal; + extern f_status_t fake_make_operate_process_run(const fake_main_t main, const f_string_statics_t arguments, const bool as_shell, fake_make_data_t *data_make) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_run_ /** @@ -387,7 +387,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_operate_validate_ - extern void fake_make_operate_validate(const fake_main_t main, const f_string_range_t section_name, const f_array_length_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, uint8_t *operation_if, fake_make_data_t *data_make, f_array_lengths_t *section_stack, f_status_t *status) f_attribute_visibility_internal; + extern void fake_make_operate_validate(const fake_main_t main, const f_string_range_t section_name, const f_array_length_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, uint8_t *operation_if, fake_make_data_t *data_make, f_array_lengths_t *section_stack, f_status_t *status) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_validate_ /** @@ -408,7 +408,7 @@ extern "C" { * F_none if there is no string to validate (used = 0). */ #ifndef _di_fake_make_operate_validate_define_name_ - extern f_status_t fake_make_operate_validate_define_name(const f_string_static_t name) f_attribute_visibility_internal; + extern f_status_t fake_make_operate_validate_define_name(const f_string_static_t name) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_validate_define_name_ /** @@ -426,7 +426,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_path_relative_ - extern f_status_t fake_make_path_relative(const fake_main_t main, const f_string_static_t path, fake_make_data_t *data_make) f_attribute_visibility_internal; + extern f_status_t fake_make_path_relative(const fake_main_t main, const f_string_static_t path, fake_make_data_t *data_make) F_attribute_visibility_internal_d; #endif // _di_fake_make_path_relative_ #ifdef __cplusplus diff --git a/level_3/fake/c/private-print.h b/level_3/fake/c/private-print.h index fe22f2b..77d9204 100644 --- a/level_3/fake/c/private-print.h +++ b/level_3/fake/c/private-print.h @@ -41,7 +41,7 @@ extern "C" { * F_false is returned on successful print of known errors. */ #ifndef _di_fake_print_error_operation_file_ - extern bool fake_print_error_build_operation_file(const fake_main_t main, const f_status_t status, const f_string_t function, const f_string_t operation, const f_string_t source, const f_string_t destination, const f_string_t how, const bool fallback) f_attribute_visibility_internal; + extern bool fake_print_error_build_operation_file(const fake_main_t main, const f_status_t status, const f_string_t function, const f_string_t operation, const f_string_t source, const f_string_t destination, const f_string_t how, const bool fallback) F_attribute_visibility_internal_d; #endif // _di_fake_print_error_operation_file_ /** @@ -65,7 +65,7 @@ extern "C" { * F_false is returned on successful print of known errors. */ #ifndef _di_fake_print_error_fss_ - extern bool fake_print_error_fss(const fake_main_t main, const f_status_t status, const f_string_t function, const f_string_t path_file, const f_string_range_t range, const bool fallback) f_attribute_visibility_internal; + extern bool fake_print_error_fss(const fake_main_t main, const f_status_t status, const f_string_t function, const f_string_t path_file, const f_string_range_t range, const bool fallback) F_attribute_visibility_internal_d; #endif // _di_fake_print_error_fss_ /** @@ -77,7 +77,7 @@ extern "C" { * The parameter name. */ #ifndef _di_fake_print_error_parameter_missing_value_ - extern void fake_print_error_parameter_missing_value(const fake_main_t main, const f_string_t parameter) f_attribute_visibility_internal; + extern void fake_print_error_parameter_missing_value(const fake_main_t main, const f_string_t parameter) F_attribute_visibility_internal_d; #endif // _di_fake_print_error_parameter_missing_value_ /** @@ -89,7 +89,7 @@ extern "C" { * The parameter name. */ #ifndef _di_fake_print_error_parameter_too_many_ - extern void fake_print_error_parameter_too_many(const fake_main_t main, const f_string_t parameter) f_attribute_visibility_internal; + extern void fake_print_error_parameter_too_many(const fake_main_t main, const f_string_t parameter) F_attribute_visibility_internal_d; #endif // _di_fake_print_error_parameter_too_many_ /** @@ -107,7 +107,7 @@ extern "C" { * The range within the buffer representing the operation name within the section. */ #ifndef _di_fake_print_message_section_operation_failed_ - extern void fake_print_message_section_operation_failed(const fake_main_t main, const fl_print_t print, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name) f_attribute_visibility_internal; + extern void fake_print_message_section_operation_failed(const fake_main_t main, const fl_print_t print, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name) F_attribute_visibility_internal_d; #endif // _di_fake_print_message_section_operation_failed_ /** @@ -125,7 +125,7 @@ extern "C" { * The path that is outside of the project path. */ #ifndef _di_fake_print_message_section_operation_path_outside_ - extern void fake_print_message_section_operation_path_outside(const fake_main_t main, const fl_print_t print, const f_status_t status, const f_string_t function, const f_string_t path) f_attribute_visibility_internal; + extern void fake_print_message_section_operation_path_outside(const fake_main_t main, const fl_print_t print, const f_status_t status, const f_string_t function, const f_string_t path) F_attribute_visibility_internal_d; #endif // _fake_print_message_section_operation_path_outside_ /** @@ -144,7 +144,7 @@ extern "C" { * The path to the directory. */ #ifndef _di_fake_print_message_section_operation_path_stack_max_ - extern void fake_print_message_section_operation_path_stack_max(const fake_main_t main, fl_print_t error, const f_status_t status, const f_string_t function, const f_string_t path) f_attribute_visibility_internal; + extern void fake_print_message_section_operation_path_stack_max(const fake_main_t main, fl_print_t error, const f_status_t status, const f_string_t function, const f_string_t path) F_attribute_visibility_internal_d; #endif // _di_fake_print_message_section_operation_path_stack_max_ /** @@ -164,7 +164,7 @@ extern "C" { * The max stack depth. */ #ifndef _di_fake_print_message_section_operation_stack_max_ - extern void fake_print_message_section_operation_stack_max(const fake_main_t main, const fl_print_t print, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name, const f_array_length_t stack_max) f_attribute_visibility_internal; + extern void fake_print_message_section_operation_stack_max(const fake_main_t main, const fl_print_t print, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name, const f_array_length_t stack_max) F_attribute_visibility_internal_d; #endif // _di_fake_print_message_section_operation_stack_max_ /** @@ -182,7 +182,7 @@ extern "C" { * The range within the buffer representing the operation name within the section. */ #ifndef _di_fake_print_message_section_operation_unknown_ - extern void fake_print_message_section_operation_unknown(const fake_main_t main, const fl_print_t print, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name) f_attribute_visibility_internal; + extern void fake_print_message_section_operation_unknown(const fake_main_t main, const fl_print_t print, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name) F_attribute_visibility_internal_d; #endif // _di_fake_print_message_section_operation_unknown_ /** @@ -200,7 +200,7 @@ extern "C" { * The name of the setting that has an invalid value. */ #ifndef _di_fake_print_warning_settings_content_empty_ - extern void fake_print_warning_settings_content_empty(const fake_main_t main, const f_string_t path_file, const f_string_dynamic_t buffer, const f_string_range_t range_object, const f_string_t settings_name) f_attribute_visibility_internal; + extern void fake_print_warning_settings_content_empty(const fake_main_t main, const f_string_t path_file, const f_string_dynamic_t buffer, const f_string_range_t range_object, const f_string_t settings_name) F_attribute_visibility_internal_d; #endif // _di_fake_print_warning_settings_content_empty_ /** @@ -220,7 +220,7 @@ extern "C" { * The name of the setting that has an invalid value. */ #ifndef _di_fake_print_warning_settings_content_invalid_ - extern void fake_print_warning_settings_content_invalid(const fake_main_t main, const f_string_t path_file, const f_string_dynamic_t buffer, const f_string_range_t range_object, const f_string_range_t range_content, const f_string_t settings_name) f_attribute_visibility_internal; + extern void fake_print_warning_settings_content_invalid(const fake_main_t main, const f_string_t path_file, const f_string_dynamic_t buffer, const f_string_range_t range_object, const f_string_range_t range_content, const f_string_t settings_name) F_attribute_visibility_internal_d; #endif // _di_fake_print_warning_settings_content_invalid_ /** @@ -236,7 +236,7 @@ extern "C" { * The name of the object. */ #ifndef _di_fake_print_warning_settings_content_multiple_ - extern void fake_print_warning_settings_content_multiple(const fake_main_t main, const f_string_t path_file, const f_string_t name_object) f_attribute_visibility_internal; + extern void fake_print_warning_settings_content_multiple(const fake_main_t main, const f_string_t path_file, const f_string_t name_object) F_attribute_visibility_internal_d; #endif // _di_fake_print_warning_settings_content_multiple_ /** @@ -254,7 +254,7 @@ extern "C" { * The name of the object. */ #ifndef _di_fake_print_warning_settings_object_multiple_ - extern void fake_print_warning_settings_object_multiple(const fake_main_t main, const f_string_t path_file, const f_string_t label, const f_string_t name_object) f_attribute_visibility_internal; + extern void fake_print_warning_settings_object_multiple(const fake_main_t main, const f_string_t path_file, const f_string_t label, const f_string_t name_object) F_attribute_visibility_internal_d; #endif // _di_fake_print_warning_settings_object_multiple_ #ifdef __cplusplus diff --git a/level_3/fake/c/private-skeleton.c b/level_3/fake/c/private-skeleton.c index ce2b185..4c138fc 100644 --- a/level_3/fake/c/private-skeleton.c +++ b/level_3/fake/c/private-skeleton.c @@ -71,8 +71,8 @@ extern "C" { } if (F_status_is_error_not(status)) { - content.string = fake_make_skeleton_content_defines; - content.used = fake_make_skeleton_content_defines_length; + content.string = fake_make_skeleton_content_defines_s; + content.used = fake_make_skeleton_content_defines_s_length; content.size = content.used; status = fake_skeleton_operate_file_create(main, main.file_data_build_defines, F_false, content); @@ -81,8 +81,8 @@ extern "C" { } if (F_status_is_error_not(status)) { - content.string = fake_make_skeleton_content_dependencies; - content.used = fake_make_skeleton_content_dependencies_length; + content.string = fake_make_skeleton_content_dependencies_s; + content.used = fake_make_skeleton_content_dependencies_s_length; content.size = content.used; status = fake_skeleton_operate_file_create(main, main.file_data_build_dependencies, F_false, content); @@ -111,8 +111,8 @@ extern "C" { } if (F_status_is_error_not(status)) { - content.string = fake_make_skeleton_content_settings; - content.used = fake_make_skeleton_content_settings_length; + content.string = fake_make_skeleton_content_settings_s; + content.used = fake_make_skeleton_content_settings_s_length; content.size = content.used; status = fake_skeleton_operate_file_create(main, main.file_data_build_settings, F_false, content); @@ -133,8 +133,8 @@ extern "C" { } if (F_status_is_error_not(status)) { - content.string = fake_make_skeleton_content_fakefile; - content.used = fake_make_skeleton_content_fakefile_length; + content.string = fake_make_skeleton_content_fakefile_s; + content.used = fake_make_skeleton_content_fakefile_s_length; content.size = content.used; status = fake_skeleton_operate_file_create(main, main.file_data_build_fakefile, F_false, content); @@ -187,7 +187,7 @@ extern "C" { return F_status_set_warning(F_failure); } else if (status == F_file_found_not) { - status = f_directory_create(path.string, f_file_mode_all_rwx); + status = f_directory_create(path.string, F_file_mode_all_rwx_d); if (F_status_is_error(status)) { if (F_status_set_fine(status) == F_file_found_not) { @@ -227,7 +227,7 @@ extern "C" { if (!path.used) return F_none; - status = f_file_is(path.string, f_file_type_regular, F_false); + status = f_file_is(path.string, F_file_type_regular_d, F_false); if (status == F_true) { if (main.error.verbosity == f_console_verbosity_verbose) { @@ -239,7 +239,7 @@ extern "C" { // symbolic links might also be fine. if (status == F_false) { - status = f_file_is(path.string, f_file_type_link, F_false); + status = f_file_is(path.string, F_file_type_link_d, F_false); if (status == F_true) { if (main.error.verbosity == f_console_verbosity_verbose) { @@ -258,10 +258,10 @@ extern "C" { return F_status_set_warning(F_none); } else if (F_status_set_fine(status) == F_file_found_not) { - mode_t mode = f_file_mode_all_rw; + mode_t mode = F_file_mode_all_rw_d; if (executable) { - mode = f_file_mode_all_rwx; + mode = F_file_mode_all_rwx_d; } status = f_file_create(path.string, mode, F_true); @@ -290,7 +290,7 @@ extern "C" { if (content.used) { f_file_t file = f_file_t_initialize; - file.flag = f_file_flag_append_wo; + file.flag = F_file_flag_append_wo_d; file.size_write = content.used; status = f_file_open(path.string, 0, &file); diff --git a/level_3/fake/c/private-skeleton.h b/level_3/fake/c/private-skeleton.h index b3273ad..c56ede7 100644 --- a/level_3/fake/c/private-skeleton.h +++ b/level_3/fake/c/private-skeleton.h @@ -24,7 +24,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_skeleton_operate_ - extern f_status_t fake_skeleton_operate(const fake_main_t main) f_attribute_visibility_internal; + extern f_status_t fake_skeleton_operate(const fake_main_t main) F_attribute_visibility_internal_d; #endif // _di_fake_skeleton_operate_ /** @@ -42,7 +42,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_skeleton_operate_directory_create_ - extern f_status_t fake_skeleton_operate_directory_create(const fake_main_t main, const f_string_dynamic_t path) f_attribute_visibility_internal; + extern f_status_t fake_skeleton_operate_directory_create(const fake_main_t main, const f_string_dynamic_t path) F_attribute_visibility_internal_d; #endif // _di_fake_skeleton_operate_directory_create_ /** @@ -65,7 +65,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_skeleton_operate_file_create_ - extern f_status_t fake_skeleton_operate_file_create(const fake_main_t main, const f_string_dynamic_t path, const bool executable, const f_string_static_t content) f_attribute_visibility_internal; + extern f_status_t fake_skeleton_operate_file_create(const fake_main_t main, const f_string_dynamic_t path, const bool executable, const f_string_static_t content) F_attribute_visibility_internal_d; #endif // _di_fake_skeleton_operate_file_create_ #ifdef __cplusplus diff --git a/level_3/firewall/c/firewall.c b/level_3/firewall/c/firewall.c index dc0e38e..6102237 100644 --- a/level_3/firewall/c/firewall.c +++ b/level_3/firewall/c/firewall.c @@ -17,7 +17,7 @@ extern "C" { flockfile(file.stream); - fll_program_print_help_header(file, context, firewall_name_long, firewall_version); + fll_program_print_help_header(file, context, firewall_program_name_long_s, firewall_version_s); fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); @@ -30,13 +30,13 @@ extern "C" { fll_program_print_help_option(file, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number."); fl_print_format("%c%c %[Available Commands:%] ", file.stream, f_string_eol_s[0], f_string_eol_s[0], context.set.important, context.set.important); - fl_print_format("%c %[%s%] Turn on the firewall.", file.stream, f_string_eol_s[0], context.set.standout, firewall_command_start, context.set.standout); - fl_print_format("%c %[%s%] Turn off the firewall.", file.stream, f_string_eol_s[0], context.set.standout, firewall_command_stop, context.set.standout); - fl_print_format("%c %[%s%] Turn off and then turn on the firewall.", file.stream, f_string_eol_s[0], context.set.standout, firewall_command_restart, context.set.standout); - fl_print_format("%c %[%s%] Prevent all communication.", file.stream, f_string_eol_s[0], context.set.standout, firewall_command_lock, context.set.standout); - fl_print_format("%c %[%s%] Show active firewall settings.", file.stream, f_string_eol_s[0], context.set.standout, firewall_command_show, context.set.standout); + fl_print_format("%c %[%s%] Turn on the firewall.", file.stream, f_string_eol_s[0], context.set.standout, firewall_command_start_s, context.set.standout); + fl_print_format("%c %[%s%] Turn off the firewall.", file.stream, f_string_eol_s[0], context.set.standout, firewall_command_stop_s, context.set.standout); + fl_print_format("%c %[%s%] Turn off and then turn on the firewall.", file.stream, f_string_eol_s[0], context.set.standout, firewall_command_restart_s, context.set.standout); + fl_print_format("%c %[%s%] Prevent all communication.", file.stream, f_string_eol_s[0], context.set.standout, firewall_command_lock_s, context.set.standout); + fl_print_format("%c %[%s%] Show active firewall settings.", file.stream, f_string_eol_s[0], context.set.standout, firewall_command_show_s, context.set.standout); - fll_program_print_help_usage(file, context, firewall_name, "command"); + fll_program_print_help_usage(file, context, firewall_program_name_s, "command"); funlockfile(file.stream); @@ -49,7 +49,7 @@ extern "C" { f_status_t status = F_none; { - const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, firewall_total_parameters); + const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, firewall_total_parameters_d); { f_console_parameter_id_t ids[3] = { firewall_parameter_no_color, firewall_parameter_light, firewall_parameter_dark }; @@ -122,7 +122,7 @@ extern "C" { } if (main->parameters[firewall_parameter_version].result == f_console_result_found) { - fll_program_print_version(main->output.to, firewall_version); + fll_program_print_version(main->output.to, firewall_version_s); firewall_main_delete(main); return F_none; @@ -265,7 +265,7 @@ extern "C" { parameters.array[4].used = 9; parameters.array[5].used = 6; - status = fll_execute_program((f_string_t) firewall_tool_iptables, parameters, 0, 0, (void *) &return_code); + status = fll_execute_program((f_string_t) firewall_tool_iptables_s, parameters, 0, 0, (void *) &return_code); // immediately exit child process, @todo this may require additional memory deallocation and relating changes. if (status == F_child) { @@ -296,7 +296,7 @@ extern "C" { parameters.array[4].used = 9; parameters.array[5].used = 6; - status = fll_execute_program((f_string_t) firewall_tool_iptables, parameters, 0, 0, (void *) &return_code); + status = fll_execute_program((f_string_t) firewall_tool_iptables_s, parameters, 0, 0, (void *) &return_code); // immediately exit child process, @todo this may require additional memory deallocation and relating changes. if (status == F_child) { @@ -323,7 +323,7 @@ extern "C" { parameters.array[2].used = 9; parameters.array[3].used = 6; - status = fll_execute_program((f_string_t) firewall_tool_iptables, parameters, 0, 0, (void *) &return_code); + status = fll_execute_program((f_string_t) firewall_tool_iptables_s, parameters, 0, 0, (void *) &return_code); // immediately exit child process, @todo this may require additional memory deallocation and relating changes. if (status == F_child) { @@ -341,7 +341,7 @@ extern "C" { firewall_print_error_on_allocation_failure(main->error); } else { - firewall_print_error_on_operation(main->error, firewall_tool_iptables, parameters); + firewall_print_error_on_operation(main->error, firewall_tool_iptables_s, parameters); } status = F_status_set_error(status); @@ -369,7 +369,7 @@ extern "C" { } // load all network devices - status = f_directory_list((f_string_t) network_devices, 0, alphasort, &main->devices); + status = f_directory_list((f_string_t) network_devices_s, 0, alphasort, &main->devices); if (F_status_is_error(status)) { status = F_status_set_fine(status); @@ -382,7 +382,7 @@ extern "C" { fll_print_format("%c%[%sCould not find any network devices.%]%c", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context, f_string_eol_s[0]); } else if (status == F_failure) { - fll_print_format("%c%[%sFailed to read the device directory '%s'.%]%c", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, network_devices, main->error.context, f_string_eol_s[0]); + fll_print_format("%c%[%sFailed to read the device directory '%s'.%]%c", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, network_devices_s, main->error.context, f_string_eol_s[0]); } } @@ -397,7 +397,7 @@ extern "C" { for (; i < main->devices.used; ++i) { - if (fl_string_compare((f_string_t) firewall_device_loop, main->devices.array[i].string, firewall_device_loop_length + 1, main->devices.array[i].used) == F_equal_to) { + if (fl_string_compare((f_string_t) firewall_device_loop_s, main->devices.array[i].string, firewall_device_loop_s_length + 1, main->devices.array[i].used) == F_equal_to) { f_string_dynamic_t swap_string = main->devices.array[i]; --main->devices.used; @@ -412,7 +412,7 @@ extern "C" { } if (command == firewall_parameter_command_stop || command == firewall_parameter_command_restart || command == firewall_parameter_command_lock) { - status = firewall_buffer_rules(network_path firewall_file_other, F_false, &local, main); + status = firewall_buffer_rules(network_path_s firewall_file_other_s, F_false, &local, main); if (F_status_is_error(status)) { firewall_delete_local_data(&local); @@ -427,11 +427,11 @@ extern "C" { for (; i < local.chain_objects.used; ++i) { length = local.chain_objects.array[i].stop - local.chain_objects.array[i].start + 1; - if (!reserved.has_stop && fl_string_compare((f_string_t) firewall_group_stop, local.buffer.string + local.chain_objects.array[i].start, firewall_group_stop_length, length) == F_equal_to) { + if (!reserved.has_stop && fl_string_compare((f_string_t) firewall_group_stop_s, local.buffer.string + local.chain_objects.array[i].start, firewall_group_stop_s_length, length) == F_equal_to) { reserved.stop_at = i; reserved.has_stop = F_true; } - else if (!reserved.has_lock && fl_string_compare((f_string_t) firewall_group_lock, local.buffer.string + local.chain_objects.array[i].start, firewall_group_lock_length, length) == F_equal_to) { + else if (!reserved.has_lock && fl_string_compare((f_string_t) firewall_group_lock_s, local.buffer.string + local.chain_objects.array[i].start, firewall_group_lock_s_length, length) == F_equal_to) { reserved.lock_at = i; reserved.has_lock = F_true; } @@ -468,7 +468,7 @@ extern "C" { } else { if (main->error.verbosity != f_console_verbosity_quiet) { - fll_print_format("%c%[%sFailed to perform lock request because the lock instructions are missing from: %s.%]%c", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, network_path firewall_file_other, main->error.context, f_string_eol_s[0]); + fll_print_format("%c%[%sFailed to perform lock request because the lock instructions are missing from: %s.%]%c", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, network_path_s firewall_file_other_s, main->error.context, f_string_eol_s[0]); } firewall_delete_local_data(&local); @@ -510,7 +510,7 @@ extern "C" { } else { if (main->error.verbosity != f_console_verbosity_quiet) { - fll_print_format("%c%[%sFailed to perform stop request because the lock instructions are missing from: %s.%]%c", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, network_path firewall_file_other, main->error.context, f_string_eol_s[0]); + fll_print_format("%c%[%sFailed to perform stop request because the lock instructions are missing from: %s.%]%c", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, network_path_s firewall_file_other_s, main->error.context, f_string_eol_s[0]); } firewall_delete_local_data(&local); @@ -523,7 +523,7 @@ extern "C" { } if (command == firewall_parameter_command_start || command == firewall_parameter_command_restart) { - status = firewall_buffer_rules(network_path firewall_file_first, F_false, &local, main); + status = firewall_buffer_rules(network_path_s firewall_file_first_s, F_false, &local, main); if (F_status_is_error(status)) { firewall_delete_local_data(&local); @@ -586,7 +586,7 @@ extern "C" { { f_string_dynamic_t file_path = f_string_dynamic_t_initialize; - macro_f_string_dynamic_t_resize(status, file_path, network_path_length + main->devices.array[i].used + firewall_file_suffix_length + 1); + macro_f_string_dynamic_t_resize(status, file_path, network_path_s_length + main->devices.array[i].used + firewall_file_suffix_s_length + 1); if (F_status_is_error(status)) { firewall_print_error_on_allocation_failure(main->error); @@ -596,11 +596,11 @@ extern "C" { return status; } - memcpy((void *)file_path.string, network_path, network_path_length); - memcpy((void *)(file_path.string + network_path_length), main->devices.array[i].string, main->devices.array[i].used); - memcpy((void *)(file_path.string + network_path_length + main->devices.array[i].used), firewall_file_suffix, firewall_file_suffix_length); + memcpy((void *)file_path.string, network_path_s, network_path_s_length); + memcpy((void *)(file_path.string + network_path_s_length), main->devices.array[i].string, main->devices.array[i].used); + memcpy((void *)(file_path.string + network_path_s_length + main->devices.array[i].used), firewall_file_suffix_s, firewall_file_suffix_s_length); - file_path.used = network_path_length + main->devices.array[i].used + firewall_file_suffix_length; + file_path.used = network_path_s_length + main->devices.array[i].used + firewall_file_suffix_s_length; file_path.string[file_path.used] = 0; status = firewall_buffer_rules(file_path.string, F_true, &local, main); @@ -656,7 +656,7 @@ extern "C" { firewall_delete_local_data(&local); } // for - status = firewall_buffer_rules(network_path firewall_file_last, F_false, &local, main); + status = firewall_buffer_rules(network_path_s firewall_file_last_s, F_false, &local, main); if (F_status_is_error(status)) { firewall_delete_local_data(&local); @@ -719,7 +719,7 @@ extern "C" { #ifndef _di_firewall_main_delete_ f_status_t firewall_main_delete(firewall_main_t *main) { - for (f_array_length_t i = 0; i < firewall_total_parameters; ++i) { + for (f_array_length_t i = 0; i < firewall_total_parameters_d; ++i) { macro_f_array_lengths_t_delete_simple(main->parameters[i].locations); macro_f_array_lengths_t_delete_simple(main->parameters[i].locations_sub); macro_f_array_lengths_t_delete_simple(main->parameters[i].values); diff --git a/level_3/firewall/c/firewall.h b/level_3/firewall/c/firewall.h index 35169b3..981f774 100644 --- a/level_3/firewall/c/firewall.h +++ b/level_3/firewall/c/firewall.h @@ -50,165 +50,171 @@ extern "C" { #endif -#ifndef _di_firewall_version_ - #define firewall_major_version f_string_ascii_0 - #define firewall_minor_version f_string_ascii_5 - #define firewall_micro_version f_string_ascii_6 +#ifndef _di_firewall_program_version_ + #define firewall_program_version_major_s F_string_ascii_0_s + #define firewall_program_version_minor_s F_string_ascii_5_s + #define firewall_program_version_micro_s F_string_ascii_6_s - #ifndef firewall_nano_version_prefix - #define firewall_nano_version_prefix + #ifndef firewall_program_version_nano_prefix_s + #define firewall_program_version_nano_prefix_s #endif - #ifndef firewall_nano_version - #define firewall_nano_version + #ifndef firewall_program_version_nano_s + #define firewall_program_version_nano_s #endif - #define firewall_version firewall_major_version f_string_ascii_period firewall_minor_version f_string_ascii_period firewall_micro_version firewall_nano_version_prefix firewall_nano_version -#endif // _di_firewall_version_ + #define firewall_version_s firewall_program_version_major_s F_string_ascii_period_s firewall_program_version_minor_s F_string_ascii_period_s firewall_program_version_micro_s firewall_program_version_nano_prefix_s firewall_program_version_nano_s +#endif // _di_firewall_program_version_ -#ifndef _di_firewall_name_ - #define firewall_name "firewall" - #define firewall_name_long "Kevux Firewall Manager" -#endif // _di_firewall_name_ +#ifndef _di_firewall_program_name_ + #define firewall_program_name_s "firewall" + #define firewall_program_name_long_s "Kevux Firewall Manager" +#endif // _di_firewall_program_name_ #ifndef _di_firewall_paths_ - #define network_path "/etc/network/" // TODO: this should be moved to a network project library, possibly the Paths project in fot the network project - #define network_devices "/sys/class/net/" // TODO: this should also be moved to a network project library - #define firewall_file_first "firewall-first" - #define firewall_file_last "firewall-last" - #define firewall_file_other "firewall-other" - #define firewall_file_suffix "-firewall" - - #define network_path_length 13 - #define network_devices_length 15 - #define firewall_file_first_length 14 - #define firewall_file_last_length 13 - #define firewall_file_other_length 14 - #define firewall_file_suffix_length 9 + #define network_path_s "/etc/network/" // TODO: this should be moved to a network project library, possibly the Paths project in fot the network project + #define network_devices_s "/sys/class/net/" // TODO: this should also be moved to a network project library + #define firewall_file_first_s "firewall-first" + #define firewall_file_last_s "firewall-last" + #define firewall_file_other_s "firewall-other" + #define firewall_file_suffix_s "-firewall" + + #define network_path_s_length 13 + #define network_devices_s_length 15 + #define firewall_file_first_s_length 14 + #define firewall_file_last_s_length 13 + #define firewall_file_other_s_length 14 + #define firewall_file_suffix_s_length 9 #endif // _di_firewall_paths_ #ifndef _di_firewall_default_allocation_step_ - #define firewall_default_allocation_step f_memory_default_allocation_small + #define firewall_default_allocation_step_d F_memory_default_allocation_small_d #endif // _di_firewall_default_allocation_step_ #ifndef _di_firewall_defines_ - #define firewall_tool "tool" - #define firewall_tool_iptables "iptables" - #define firewall_tool_ip6tables "ip6tables" - #define firewall_tool_ip46tables "ip46tables" - #define firewall_tool_ipset "ipset" - - #define firewall_tool_length 4 - #define firewall_tool_iptables_length 8 - #define firewall_tool_ip6tables_length 9 - #define firewall_tool_ip46tables_length 10 - #define firewall_tool_ipset_length 5 - - #define firewall_group_stop "stop" - #define firewall_group_lock "lock" - #define firewall_group_main "main" - - #define firewall_group_stop_length 4 - #define firewall_group_lock_length 4 - #define firewall_group_main_length 4 - - #define firewall_command_start "start" - #define firewall_command_stop "stop" - #define firewall_command_restart "restart" - #define firewall_command_lock "lock" - #define firewall_command_show "show" + #define firewall_tool_s "tool" + #define firewall_tool_iptables_s "iptables" + #define firewall_tool_ip6tables_s "ip6tables" + #define firewall_tool_ip46tables_s "ip46tables" + #define firewall_tool_ipset_s "ipset" + + #define firewall_tool_s_length 4 + #define firewall_tool_iptables_s_length 8 + #define firewall_tool_ip6tables_s_length 9 + #define firewall_tool_ip46tables_s_length 10 + #define firewall_tool_ipset_s_length 5 + + #define firewall_group_stop_s "stop" + #define firewall_group_lock_s "lock" + #define firewall_group_main_s "main" + + #define firewall_group_stop_s_length 4 + #define firewall_group_lock_s_length 4 + #define firewall_group_main_s_length 4 + + #define firewall_command_start_s "start" + #define firewall_command_stop_s "stop" + #define firewall_command_restart_s "restart" + #define firewall_command_lock_s "lock" + #define firewall_command_show_s "show" + + #define firewall_command_start_s_length 5 + #define firewall_command_stop_s_length 4 + #define firewall_command_restart_s_length 7 + #define firewall_command_lock_s_length 4 + #define firewall_command_show_s_length 4 #define firewall_ip_list "ip_list" - #define firewall_ip_list_source "source" - #define firewall_ip_list_source_action "-s" - #define firewall_ip_list_destination "destination" - #define firewall_ip_list_destination_action "-d" - - #define firewall_ip_list_length 7 - #define firewall_ip_list_source_length 6 - #define firewall_ip_list_source_action_length 2 - #define firewall_ip_list_destination_length 11 - #define firewall_ip_list_destination_action_length 2 - - #define firewall_rule "rule" - #define firewall_rule_length 4 - - #define firewall_chain "chain" - #define firewall_chain_forward "FORWARD" - #define firewall_chain_input "INPUT" - #define firewall_chain_none "none" - #define firewall_chain_output "OUTPUT" - #define firewall_chain_postrouting "POSTROUTING" - #define firewall_chain_prerouting "PREROUTING" - - #define firewall_chain_length 5 - #define firewall_chain_forward_length 7 - #define firewall_chain_input_length 5 - #define firewall_chain_none_length 4 - #define firewall_chain_output_length 6 - #define firewall_chain_postrouting_length 12 - #define firewall_chain_prerouting_length 11 - - #define firewall_direction "direction" - #define firewall_direction_input "input" - #define firewall_direction_output "output" - #define firewall_direction_none "none" - - #define firewall_direction_length 9 - #define firewall_direction_input_length 5 - #define firewall_direction_output_length 6 - #define firewall_direction_none_length 4 - - #define firewall_action "action" - #define firewall_action_append "append" - #define firewall_action_insert "insert" - #define firewall_action_policy "policy" - #define firewall_action_none "none" - - #define firewall_action_length 6 - #define firewall_action_append_length 6 - #define firewall_action_insert_length 6 - #define firewall_action_policy_length 6 - #define firewall_action_none_length 4 - - #define firewall_action_append_command "-A" - #define firewall_action_insert_command "-I" - #define firewall_action_policy_command "-P" - - #define firewall_action_append_command_length 2 - #define firewall_action_insert_command_length 2 - #define firewall_action_policy_command_length 2 - - #define firewall_device "device" - #define firewall_device_all "all" - #define firewall_device_this "this" - #define firewall_device_loop "lo" - - #define firewall_device_length 6 - #define firewall_device_all_length 3 - #define firewall_device_this_length 4 - #define firewall_device_loop_length 2 - - #define firewall_device_input_command "-i" - #define firewall_device_output_command "-o" - - #define firewall_device_input_command_length 2 - #define firewall_device_output_command_length 2 - - #define firewall_protocol "protocol" - #define firewall_protocol_none "none" - - #define firewall_protocol_length 8 - #define firewall_protocol_none_length 4 - - #define firewall_protocol_command "-p" - #define firewall_protocol_command_length 2 - - #define firewall_chain_create_command "-N" - #define firewall_chain_delete_command "-X" - - #define firewall_chain_create_command_length 2 - #define firewall_chain_delete_command_length 2 + #define firewall_ip_list_source_s "source" + #define firewall_ip_list_source_action_s "-s" + #define firewall_ip_list_destination_s "destination" + #define firewall_ip_list_destination_action_s "-d" + + #define firewall_ip_list_length_s 7 + #define firewall_ip_list_source_s_length 6 + #define firewall_ip_list_source_action_s_length 2 + #define firewall_ip_list_destination_s_length 11 + #define firewall_ip_list_destination_action_s_length 2 + + #define firewall_rule_s "rule" + #define firewall_rule_s_length 4 + + #define firewall_chain_s "chain" + #define firewall_chain_forward_s "FORWARD" + #define firewall_chain_input_s "INPUT" + #define firewall_chain_none_s "none" + #define firewall_chain_output_s "OUTPUT" + #define firewall_chain_postrouting_s "POSTROUTING" + #define firewall_chain_prerouting_s "PREROUTING" + + #define firewall_chain_length_s 5 + #define firewall_chain_forward_s_length 7 + #define firewall_chain_input_s_length 5 + #define firewall_chain_none_s_length 4 + #define firewall_chain_output_s_length 6 + #define firewall_chain_postrouting_s_length 12 + #define firewall_chain_prerouting_s_length 11 + + #define firewall_direction_s "direction" + #define firewall_direction_input_s "input" + #define firewall_direction_output_s "output" + #define firewall_direction_none_s "none" + + #define firewall_direction_s_length 9 + #define firewall_direction_input_s_length 5 + #define firewall_direction_output_s_length 6 + #define firewall_direction_none_s_length 4 + + #define firewall_action_s "action" + #define firewall_action_append_s "append" + #define firewall_action_insert_s "insert" + #define firewall_action_policy_s "policy" + #define firewall_action_none_s "none" + + #define firewall_action_length_s 6 + #define firewall_action_append_s_length 6 + #define firewall_action_insert_s_length 6 + #define firewall_action_policy_s_length 6 + #define firewall_action_none_s_length 4 + + #define firewall_action_append_command_s "-A" + #define firewall_action_insert_command_s "-I" + #define firewall_action_policy_command_s "-P" + + #define firewall_action_append_command_s_length 2 + #define firewall_action_insert_command_s_length 2 + #define firewall_action_policy_command_s_length 2 + + #define firewall_device_s "device" + #define firewall_device_all_s "all" + #define firewall_device_this_s "this" + #define firewall_device_loop_s "lo" + + #define firewall_device_s_length 6 + #define firewall_device_all_s_length 3 + #define firewall_device_this_s_length 4 + #define firewall_device_loop_s_length 2 + + #define firewall_device_input_command_s "-i" + #define firewall_device_output_command_s "-o" + + #define firewall_device_input_command_length_s 2 + #define firewall_device_output_command_length_s 2 + + #define firewall_protocol_s "protocol" + #define firewall_protocol_none_s "none" + + #define firewall_protocol_s_length 8 + #define firewall_protocol_none_s_length 4 + + #define firewall_protocol_command_s "-p" + #define firewall_protocol_command_s_length 2 + + #define firewall_chain_create_command_s "-N" + #define firewall_chain_delete_command_s "-X" + + #define firewall_chain_create_command_s_length 2 + #define firewall_chain_delete_command_s_length 2 enum { firewall_program_none = 1, @@ -264,19 +270,19 @@ extern "C" { f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(0, 0, firewall_command_start, F_false, f_console_type_other), \ - f_console_parameter_t_initialize(0, 0, firewall_command_stop, F_false, f_console_type_other), \ - f_console_parameter_t_initialize(0, 0, firewall_command_restart, F_false, f_console_type_other), \ - f_console_parameter_t_initialize(0, 0, firewall_command_lock, F_false, f_console_type_other), \ - f_console_parameter_t_initialize(0, 0, firewall_command_show, F_false, f_console_type_other), \ + f_console_parameter_t_initialize(0, 0, firewall_command_start_s, F_false, f_console_type_other), \ + f_console_parameter_t_initialize(0, 0, firewall_command_stop_s, F_false, f_console_type_other), \ + f_console_parameter_t_initialize(0, 0, firewall_command_restart_s, F_false, f_console_type_other), \ + f_console_parameter_t_initialize(0, 0, firewall_command_lock_s, F_false, f_console_type_other), \ + f_console_parameter_t_initialize(0, 0, firewall_command_show_s, F_false, f_console_type_other), \ } - #define firewall_total_parameters 14 + #define firewall_total_parameters_d 14 #endif // _di_firewall_defines_ #ifndef _di_firewall_main_t_ typedef struct { - f_console_parameter_t parameters[firewall_total_parameters]; + f_console_parameter_t parameters[firewall_total_parameters_d]; f_array_lengths_t remaining; bool process_pipe; diff --git a/level_3/firewall/c/private-common.h b/level_3/firewall/c/private-common.h index 224b9fd..8b250ed 100644 --- a/level_3/firewall/c/private-common.h +++ b/level_3/firewall/c/private-common.h @@ -87,7 +87,7 @@ typedef struct { // TODO: temporarily added, convert this to a function below. #define macro_firewall_append_argument_to_arguments(status, arguments, argument) \ if (arguments.used == arguments.size) { \ - macro_f_string_dynamics_t_resize(status, arguments, arguments.used + firewall_default_allocation_step); \ + macro_f_string_dynamics_t_resize(status, arguments, arguments.used + firewall_default_allocation_step_d); \ \ if (F_status_is_error(status)) break; \ } \ @@ -108,7 +108,7 @@ typedef struct { * @param arguments * The arguments passed to the tool. */ -extern void firewall_print_debug_tool(const fl_print_t output, const f_string_t tool, const f_string_dynamics_t arguments) f_attribute_visibility_internal; +extern void firewall_print_debug_tool(const fl_print_t output, const f_string_t tool, const f_string_dynamics_t arguments) F_attribute_visibility_internal_d; /** * Print an memory allocation error. @@ -116,7 +116,7 @@ extern void firewall_print_debug_tool(const fl_print_t output, const f_string_t * @param output * The output to print to. */ -extern void firewall_print_error_on_allocation_failure(const fl_print_t output) f_attribute_visibility_internal; +extern void firewall_print_error_on_allocation_failure(const fl_print_t output) F_attribute_visibility_internal_d; /** * Print an invalid parameter error for the given function. @@ -126,7 +126,7 @@ extern void firewall_print_error_on_allocation_failure(const fl_print_t output) * @param function * The function that failed. */ -extern void firewall_print_error_on_invalid_parameter(const fl_print_t output, const f_string_t function) f_attribute_visibility_internal; +extern void firewall_print_error_on_invalid_parameter(const fl_print_t output, const f_string_t function) F_attribute_visibility_internal_d; /** * Print an invalid parameter error for the given function. @@ -138,7 +138,7 @@ extern void firewall_print_error_on_invalid_parameter(const fl_print_t output, c * @param filename * The name of the file. */ -extern void firewall_print_error_on_invalid_parameter_for_file(const fl_print_t output, const f_string_t function, const f_string_t filename) f_attribute_visibility_internal; +extern void firewall_print_error_on_invalid_parameter_for_file(const fl_print_t output, const f_string_t function, const f_string_t filename) F_attribute_visibility_internal_d; /** * Print an error about the given operation failed. @@ -150,7 +150,7 @@ extern void firewall_print_error_on_invalid_parameter_for_file(const fl_print_t * @param arguments * The arguments passed to the tool. */ -extern void firewall_print_error_on_operation(const fl_print_t output, const f_string_t tool, const f_string_dynamics_t arguments) f_attribute_visibility_internal; +extern void firewall_print_error_on_operation(const fl_print_t output, const f_string_t tool, const f_string_dynamics_t arguments) F_attribute_visibility_internal_d; /** * Print an unhandled error for the given function. @@ -162,7 +162,7 @@ extern void firewall_print_error_on_operation(const fl_print_t output, const f_s * @param status * The failure status code. */ -extern void firewall_print_error_on_unhandled(const fl_print_t output, const f_string_t function, const f_status_t status) f_attribute_visibility_internal; +extern void firewall_print_error_on_unhandled(const fl_print_t output, const f_string_t function, const f_status_t status) F_attribute_visibility_internal_d; /** * Print an unhandled error for the given function for some given file. @@ -176,7 +176,7 @@ extern void firewall_print_error_on_unhandled(const fl_print_t output, const f_s * @param filename * The name of the file. */ -extern void firewall_print_error_on_unhandled_for_file(const fl_print_t output, const f_string_t function, const f_status_t status, const f_string_t filename) f_attribute_visibility_internal; +extern void firewall_print_error_on_unhandled_for_file(const fl_print_t output, const f_string_t function, const f_status_t status, const f_string_t filename) F_attribute_visibility_internal_d; #ifdef __cplusplus } // extern "C" diff --git a/level_3/firewall/c/private-firewall.c b/level_3/firewall/c/private-firewall.c index 3a90c84..c67abb3 100644 --- a/level_3/firewall/c/private-firewall.c +++ b/level_3/firewall/c/private-firewall.c @@ -29,8 +29,8 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi f_array_length_t repeat = 2; f_array_length_t r = 0; - f_string_t current_tool = firewall_tool_iptables; - f_array_length_t current_tool_length = firewall_tool_iptables_length; + f_string_t current_tool = firewall_tool_iptables_s; + f_array_length_t current_tool_length = firewall_tool_iptables_s_length; f_array_length_t direction = firewall_direction_none_id; f_string_dynamic_t device = f_string_dynamic_t_initialize; @@ -70,7 +70,7 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi macro_f_string_dynamic_t_delete_simple(ip_list); // process chain rule - if (length >= firewall_chain_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_chain, length, firewall_chain_length) == F_equal_to) { + if (length >= firewall_chain_length_s && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_chain_s, length, firewall_chain_length_s) == F_equal_to) { if (chain == firewall_chain_custom_id) { // custom chains can only apply to themselves, so silently ignore chain commands specified within a custom chain. @@ -83,22 +83,22 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi if (macro_firewall_rule_contents_has_incorrect_items(i, 1)) { invalid = F_true; } - else if (length >= firewall_chain_input_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_input, length, firewall_chain_input_length) == F_equal_to) { + else if (length >= firewall_chain_input_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_input_s, length, firewall_chain_input_s_length) == F_equal_to) { chain = firewall_chain_input_id; } - else if (length >= firewall_chain_output_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_output, length, firewall_chain_output_length) == F_equal_to) { + else if (length >= firewall_chain_output_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_output_s, length, firewall_chain_output_s_length) == F_equal_to) { chain = firewall_chain_output_id; } - else if (length >= firewall_chain_forward_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_forward, length, firewall_chain_forward_length) == F_equal_to) { + else if (length >= firewall_chain_forward_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_forward_s, length, firewall_chain_forward_s_length) == F_equal_to) { chain = firewall_chain_forward_id; } - else if (length >= firewall_chain_postrouting_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_postrouting, length, firewall_chain_postrouting_length) == F_equal_to) { + else if (length >= firewall_chain_postrouting_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_postrouting_s, length, firewall_chain_postrouting_s_length) == F_equal_to) { chain = firewall_chain_postrouting_id; } - else if (length >= firewall_chain_prerouting_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_prerouting, length, firewall_chain_prerouting_length) == F_equal_to) { + else if (length >= firewall_chain_prerouting_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_prerouting_s, length, firewall_chain_prerouting_s_length) == F_equal_to) { chain = firewall_chain_prerouting_id; } - else if (length >= firewall_chain_none_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_none, length, firewall_chain_none_length) == F_equal_to) { + else if (length >= firewall_chain_none_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_none_s, length, firewall_chain_none_s_length) == F_equal_to) { chain = firewall_chain_none_id; } else { @@ -108,19 +108,19 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi if (!invalid) continue; } // process direction rule - else if (length >= firewall_direction_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_direction, length, firewall_direction_length) == F_equal_to) { + else if (length >= firewall_direction_s_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_direction_s, length, firewall_direction_s_length) == F_equal_to) { length = macro_firewall_structure_size(local.rule_contents.array[i], 0); if (macro_firewall_rule_contents_has_incorrect_items(i, 1)) { invalid = F_true; } - else if (length >= firewall_direction_input_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_direction_input, length, firewall_direction_input_length) == F_equal_to) { + else if (length >= firewall_direction_input_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_direction_input_s, length, firewall_direction_input_s_length) == F_equal_to) { direction = firewall_direction_input_id; } - else if (length >= firewall_direction_output_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_direction_output, length, firewall_direction_output_length) == F_equal_to) { + else if (length >= firewall_direction_output_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_direction_output_s, length, firewall_direction_output_s_length) == F_equal_to) { direction = firewall_direction_output_id; } - else if (length >= firewall_direction_none_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_direction_none, length, firewall_direction_none_length) == F_equal_to) { + else if (length >= firewall_direction_none_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_direction_none_s, length, firewall_direction_none_s_length) == F_equal_to) { direction = firewall_direction_none_id; } else { @@ -131,18 +131,18 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi if (!invalid) continue; } // process device rule. - else if (length >= firewall_device_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_device, length, firewall_device_length) == F_equal_to) { + else if (length >= firewall_device_s_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_device_s, length, firewall_device_s_length) == F_equal_to) { length = macro_firewall_structure_size(local.rule_contents.array[i], 0); if (macro_firewall_rule_contents_has_incorrect_items(i, 1)) { invalid = F_true; } - else if (length >= firewall_device_all_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_device_all, length, firewall_device_all_length) == F_equal_to) { + else if (length >= firewall_device_all_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_device_all_s, length, firewall_device_all_s_length) == F_equal_to) { macro_f_string_dynamic_t_delete_simple(device); device_all = F_true; continue; } - else if (length >= firewall_device_this_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_device_this, length, firewall_device_this_length) == F_equal_to) { + else if (length >= firewall_device_this_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_device_this_s, length, firewall_device_this_s_length) == F_equal_to) { if (main.devices.array[local.device].used > 0) { if (main.devices.array[local.device].used > device.size) { macro_f_string_dynamic_t_resize(status, device, main.devices.array[local.device].used); @@ -182,22 +182,22 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi } } // process action rule. - else if (length >= firewall_action_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_action, length, firewall_action_length) == F_equal_to) { + else if (length >= firewall_action_length_s && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_action_s, length, firewall_action_length_s) == F_equal_to) { length = macro_firewall_structure_size(local.rule_contents.array[i], 0); if (macro_firewall_rule_contents_has_incorrect_items(i, 1)) { invalid = F_true; } - else if (length >= firewall_action_append_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_action_append, length, firewall_action_append_length) == F_equal_to) { + else if (length >= firewall_action_append_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_action_append_s, length, firewall_action_append_s_length) == F_equal_to) { action = firewall_action_append_id; } - else if (length >= firewall_action_insert_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_action_insert, length, firewall_action_insert_length) == F_equal_to) { + else if (length >= firewall_action_insert_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_action_insert_s, length, firewall_action_insert_s_length) == F_equal_to) { action = firewall_action_insert_id; } - else if (length >= firewall_action_policy_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_action_policy, length, firewall_action_policy_length) == F_equal_to) { + else if (length >= firewall_action_policy_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_action_policy_s, length, firewall_action_policy_s_length) == F_equal_to) { action = firewall_action_policy_id; } - else if (length >= firewall_action_none_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_action_none, length, firewall_action_none_length) == F_equal_to) { + else if (length >= firewall_action_none_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_action_none_s, length, firewall_action_none_s_length) == F_equal_to) { action = firewall_action_none_id; } else { @@ -207,28 +207,28 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi if (!invalid) continue; } // process ip_list rule. - else if (length >= firewall_ip_list_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_ip_list, length, firewall_ip_list_length) == F_equal_to) { + else if (length >= firewall_ip_list_length_s && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_ip_list, length, firewall_ip_list_length_s) == F_equal_to) { length = macro_firewall_structure_size(local.rule_contents.array[i], 0); is_ip_list = F_true; - if (length >= firewall_ip_list_source_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_ip_list_source, length, firewall_ip_list_source_length) == F_equal_to) { + if (length >= firewall_ip_list_source_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_ip_list_source_s, length, firewall_ip_list_source_s_length) == F_equal_to) { ip_list_direction = F_false; } - else if (length >= firewall_ip_list_destination_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_ip_list_destination, length, firewall_ip_list_destination_length) == F_equal_to) { + else if (length >= firewall_ip_list_destination_s_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_ip_list_destination_s, length, firewall_ip_list_destination_s_length) == F_equal_to) { ip_list_direction = F_true; } else { invalid = F_true; } } - else if (length >= firewall_protocol_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_protocol, length, firewall_protocol_length) == F_equal_to) { + else if (length >= firewall_protocol_s_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_protocol_s, length, firewall_protocol_s_length) == F_equal_to) { length = macro_firewall_structure_size(local.rule_contents.array[i], 0); if (macro_firewall_rule_contents_has_incorrect_items(i, 1)) { invalid = F_true; } else { - if (fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_protocol_none, length, firewall_protocol_none_length) == F_equal_to) { + if (fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_protocol_none_s, length, firewall_protocol_none_s_length) == F_equal_to) { use_protocol = F_false; } else if (length > 0) { @@ -249,29 +249,29 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi } } // process tool rule. - else if (length >= firewall_tool_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_tool, length, firewall_tool_length) == F_equal_to) { + else if (length >= firewall_tool_s_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_tool_s, length, firewall_tool_s_length) == F_equal_to) { length = macro_firewall_structure_size(local.rule_contents.array[i], 0); if (macro_firewall_rule_contents_has_incorrect_items(i, 1)) { invalid = F_true; } else { - if (fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_tool_iptables, length, firewall_tool_iptables_length) == F_equal_to) { + if (fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_tool_iptables_s, length, firewall_tool_iptables_s_length) == F_equal_to) { tool = firewall_program_iptables; - current_tool = firewall_tool_iptables; - current_tool_length = firewall_tool_iptables_length; + current_tool = firewall_tool_iptables_s; + current_tool_length = firewall_tool_iptables_s_length; repeat = 1; } - else if (fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_tool_ip6tables, length, firewall_tool_ip6tables_length) == F_equal_to) { + else if (fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_tool_ip6tables_s, length, firewall_tool_ip6tables_s_length) == F_equal_to) { tool = firewall_program_ip6tables; - current_tool = firewall_tool_ip6tables; - current_tool_length = firewall_tool_ip6tables_length; + current_tool = firewall_tool_ip6tables_s; + current_tool_length = firewall_tool_ip6tables_s_length; repeat = 1; } - else if (fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_tool_ip46tables, length, firewall_tool_ip46tables_length) == F_equal_to) { + else if (fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_tool_ip46tables_s, length, firewall_tool_ip46tables_s_length) == F_equal_to) { tool = firewall_program_ip46tables; - current_tool = firewall_tool_iptables; - current_tool_length = firewall_tool_iptables_length; + current_tool = firewall_tool_iptables_s; + current_tool_length = firewall_tool_iptables_s_length; repeat = 2; } else { @@ -281,8 +281,8 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi if (!invalid) continue; } } - // process rule rule, if the remaining rule does not match as firewall_rule, then it is an invalid rule. - else if (length < firewall_rule_length || fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_rule, length, firewall_rule_length) == F_equal_to_not) { + // process rule rule, if the remaining rule does not match as firewall_rule_s, then it is an invalid rule. + else if (length < firewall_rule_s_length || fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_rule_s, length, firewall_rule_s_length) == F_equal_to_not) { if (length) { flockfile(main.warning.to.stream); @@ -325,17 +325,17 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi // first add the program name f_string_dynamics_resize(0, &arguments); - status = f_string_dynamics_increase(f_memory_default_allocation_small, &arguments); + status = f_string_dynamics_increase(F_memory_default_allocation_small_d, &arguments); if (F_status_is_error(status)) break; if (tool == firewall_program_ip46tables) { if (r == 2) { - current_tool = firewall_tool_iptables; - current_tool_length = firewall_tool_iptables_length; + current_tool = firewall_tool_iptables_s; + current_tool_length = firewall_tool_iptables_s_length; } else { - current_tool = firewall_tool_ip6tables; - current_tool_length = firewall_tool_ip6tables_length; + current_tool = firewall_tool_ip6tables_s; + current_tool_length = firewall_tool_ip6tables_s_length; } } @@ -346,28 +346,28 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi // process the action when a non-none chain is specified. if (chain != firewall_chain_none_id && action != firewall_action_none_id) { if (action == firewall_action_append_id) { - macro_f_string_dynamic_t_resize(status, argument, firewall_action_append_command_length); + macro_f_string_dynamic_t_resize(status, argument, firewall_action_append_command_s_length); if (F_status_is_error(status)) break; - macro_firewall_concat_string(argument.string, firewall_action_append_command, firewall_action_append_command_length); - argument.used = firewall_action_append_command_length; + macro_firewall_concat_string(argument.string, firewall_action_append_command_s, firewall_action_append_command_s_length); + argument.used = firewall_action_append_command_s_length; } else if (action == firewall_action_insert_id) { - macro_f_string_dynamic_t_resize(status, argument, firewall_action_insert_command_length); + macro_f_string_dynamic_t_resize(status, argument, firewall_action_insert_command_s_length); if (F_status_is_error(status)) break; - macro_firewall_concat_string(argument.string, firewall_action_insert_command, firewall_action_insert_command_length); - argument.used = firewall_action_insert_command_length; + macro_firewall_concat_string(argument.string, firewall_action_insert_command_s, firewall_action_insert_command_s_length); + argument.used = firewall_action_insert_command_s_length; } else if (action == firewall_action_policy_id) { - macro_f_string_dynamic_t_resize(status, argument, firewall_action_policy_command_length); + macro_f_string_dynamic_t_resize(status, argument, firewall_action_policy_command_s_length); if (F_status_is_error(status)) break; - macro_firewall_concat_string(argument.string, firewall_action_policy_command, firewall_action_policy_command_length); - argument.used = firewall_action_policy_command_length; + macro_firewall_concat_string(argument.string, firewall_action_policy_command_s, firewall_action_policy_command_s_length); + argument.used = firewall_action_policy_command_s_length; } if (argument.used > 0) { @@ -389,44 +389,44 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi } } else if (chain == firewall_chain_forward_id) { - macro_f_string_dynamic_t_resize(status, argument, firewall_chain_forward_length); + macro_f_string_dynamic_t_resize(status, argument, firewall_chain_forward_s_length); if (F_status_is_error(status)) break; - macro_firewall_concat_string(argument.string, firewall_chain_forward, firewall_chain_forward_length); - argument.used = firewall_chain_forward_length; + macro_firewall_concat_string(argument.string, firewall_chain_forward_s, firewall_chain_forward_s_length); + argument.used = firewall_chain_forward_s_length; } else if (chain == firewall_chain_postrouting_id) { - macro_f_string_dynamic_t_resize(status, argument, firewall_chain_postrouting_length); + macro_f_string_dynamic_t_resize(status, argument, firewall_chain_postrouting_s_length); if (F_status_is_error(status)) break; - macro_firewall_concat_string(argument.string, firewall_chain_postrouting, firewall_chain_postrouting_length); - argument.used += firewall_chain_postrouting_length; + macro_firewall_concat_string(argument.string, firewall_chain_postrouting_s, firewall_chain_postrouting_s_length); + argument.used += firewall_chain_postrouting_s_length; } else if (chain == firewall_chain_prerouting_id) { - macro_f_string_dynamic_t_resize(status, argument, firewall_chain_prerouting_length); + macro_f_string_dynamic_t_resize(status, argument, firewall_chain_prerouting_s_length); if (F_status_is_error(status)) break; - macro_firewall_concat_string(argument.string, firewall_chain_prerouting, firewall_chain_prerouting_length); - argument.used = firewall_chain_prerouting_length; + macro_firewall_concat_string(argument.string, firewall_chain_prerouting_s, firewall_chain_prerouting_s_length); + argument.used = firewall_chain_prerouting_s_length; } else if (chain == firewall_chain_input_id) { - macro_f_string_dynamic_t_resize(status, argument, firewall_chain_input_length); + macro_f_string_dynamic_t_resize(status, argument, firewall_chain_input_s_length); if (F_status_is_error(status)) break; - macro_firewall_concat_string(argument.string, firewall_chain_input, firewall_chain_input_length); - argument.used = firewall_chain_input_length; + macro_firewall_concat_string(argument.string, firewall_chain_input_s, firewall_chain_input_s_length); + argument.used = firewall_chain_input_s_length; } else if (chain == firewall_chain_output_id) { - macro_f_string_dynamic_t_resize(status, argument, firewall_chain_output_length); + macro_f_string_dynamic_t_resize(status, argument, firewall_chain_output_s_length); if (F_status_is_error(status)) break; - macro_firewall_concat_string(argument.string, firewall_chain_output, firewall_chain_output_length); - argument.used = firewall_chain_output_length; + macro_firewall_concat_string(argument.string, firewall_chain_output_s, firewall_chain_output_s_length); + argument.used = firewall_chain_output_s_length; } if (argument.used > 0) { @@ -440,20 +440,20 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi // add the device if and only if a non-none direction is specified. if (device.used > 0 && (direction == firewall_direction_input_id || direction == firewall_direction_output_id)) { - if (length < firewall_device_all_length || fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_device_all, length, firewall_device_all_length) == F_equal_to_not) { + if (length < firewall_device_all_s_length || fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_device_all_s, length, firewall_device_all_s_length) == F_equal_to_not) { if (direction == firewall_direction_input_id) { - macro_f_string_dynamic_t_resize(status, argument, firewall_device_input_command_length); + macro_f_string_dynamic_t_resize(status, argument, firewall_device_input_command_length_s); if (F_status_is_error(status)) break; - macro_firewall_concat_string(argument.string, firewall_device_input_command, firewall_device_input_command_length); - argument.used = firewall_device_input_command_length; + macro_firewall_concat_string(argument.string, firewall_device_input_command_s, firewall_device_input_command_length_s); + argument.used = firewall_device_input_command_length_s; } else if (direction == firewall_direction_output_id) { - macro_f_string_dynamic_t_resize(status, argument, firewall_device_output_command_length); + macro_f_string_dynamic_t_resize(status, argument, firewall_device_output_command_length_s); if (F_status_is_error(status)) break; - macro_firewall_concat_string(argument.string, firewall_device_output_command, firewall_device_output_command_length); - argument.used = firewall_device_output_command_length; + macro_firewall_concat_string(argument.string, firewall_device_output_command_s, firewall_device_output_command_length_s); + argument.used = firewall_device_output_command_length_s; } if (argument.used > 0) { @@ -481,12 +481,12 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi } if (use_protocol) { - macro_f_string_dynamic_t_resize(status, argument, firewall_protocol_command_length); + macro_f_string_dynamic_t_resize(status, argument, firewall_protocol_command_s_length); if (F_status_is_error(status)) break; - macro_firewall_concat_string(argument.string, firewall_protocol_command, firewall_protocol_command_length); - argument.used = firewall_protocol_command_length; + macro_firewall_concat_string(argument.string, firewall_protocol_command_s, firewall_protocol_command_s_length); + argument.used = firewall_protocol_command_s_length; macro_firewall_append_argument_to_arguments(status, arguments, argument) if (F_status_is_error(status)) { @@ -578,11 +578,11 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi f_fss_objects_t basic_objects = f_fss_objects_t_initialize; f_fss_contents_t basic_contents = f_fss_objects_t_initialize; - macro_f_string_dynamic_t_resize(status, file_path, network_path_length + ip_list.used + firewall_default_allocation_step); + macro_f_string_dynamic_t_resize(status, file_path, network_path_s_length + ip_list.used + firewall_default_allocation_step_d); if (status == F_none) { - macro_firewall_concat_string(file_path.string, network_path, network_path_length); - macro_firewall_concat_string(file_path.string + network_path_length, ip_list.string, ip_list.used); + macro_firewall_concat_string(file_path.string, network_path_s, network_path_s_length); + macro_firewall_concat_string(file_path.string + network_path_s_length, ip_list.string, ip_list.used); file_path.used = file_path.size; file_path.string[file_path.used] = 0; @@ -706,20 +706,20 @@ f_status_t firewall_perform_commands(const firewall_local_data_t local, const fi f_string_dynamic_t ip_list_action = f_string_dynamic_t_initialize; if (ip_list_direction) { - macro_f_string_dynamic_t_resize(status, ip_list_action, firewall_ip_list_destination_action_length); + macro_f_string_dynamic_t_resize(status, ip_list_action, firewall_ip_list_destination_action_s_length); if (F_status_is_error(status)) break; - macro_firewall_concat_string(ip_list_action.string, firewall_ip_list_destination_action, firewall_ip_list_destination_action_length); - ip_list_action.used = firewall_ip_list_destination_action_length; + macro_firewall_concat_string(ip_list_action.string, firewall_ip_list_destination_action_s, firewall_ip_list_destination_action_s_length); + ip_list_action.used = firewall_ip_list_destination_action_s_length; } else { - macro_f_string_dynamic_t_resize(status, ip_list_action, firewall_ip_list_source_action_length); + macro_f_string_dynamic_t_resize(status, ip_list_action, firewall_ip_list_source_action_s_length); if (F_status_is_error(status)) break; - macro_firewall_concat_string(ip_list_action.string, firewall_ip_list_source_action, firewall_ip_list_source_action_length); - ip_list_action.used = firewall_ip_list_source_action_length; + macro_firewall_concat_string(ip_list_action.string, firewall_ip_list_source_action_s, firewall_ip_list_source_action_s_length); + ip_list_action.used = firewall_ip_list_source_action_s_length; } status = F_none; @@ -869,7 +869,7 @@ f_status_t firewall_create_custom_chains(firewall_reserved_chains_t *reserved, f status = f_string_dynamics_resize(2, &arguments); if (F_status_is_error(status)) return status; - status = f_string_dynamic_resize(firewall_chain_create_command_length + 1, &arguments.array[0]); + status = f_string_dynamic_resize(firewall_chain_create_command_s_length + 1, &arguments.array[0]); if (F_status_is_error(status)) { macro_f_string_dynamics_t_delete_simple(arguments); @@ -877,12 +877,12 @@ f_status_t firewall_create_custom_chains(firewall_reserved_chains_t *reserved, f return status; } - macro_firewall_concat_string(arguments.array[0].string, firewall_chain_create_command, firewall_chain_create_command_length); + macro_firewall_concat_string(arguments.array[0].string, firewall_chain_create_command_s, firewall_chain_create_command_s_length); - arguments.array[0].used = firewall_chain_create_command_length; - arguments.array[0].string[firewall_chain_create_command_length] = 0; + arguments.array[0].used = firewall_chain_create_command_s_length; + arguments.array[0].string[firewall_chain_create_command_s_length] = 0; - status = f_string_dynamic_increase(f_memory_default_allocation_small, &arguments.array[1]); + status = f_string_dynamic_increase(F_memory_default_allocation_small_d, &arguments.array[1]); if (F_status_is_error(status)) { arguments.used = 1; @@ -903,9 +903,9 @@ f_status_t firewall_create_custom_chains(firewall_reserved_chains_t *reserved, f // skip globally reserved chain name: main range.start = 0; - range.stop = firewall_group_main_length - 1; - fixed_string.string = firewall_group_main; - fixed_string.used = firewall_group_main_length; + range.stop = firewall_group_main_s_length - 1; + fixed_string.string = firewall_group_main_s; + fixed_string.used = firewall_group_main_s_length; if (fl_string_dynamic_partial_compare(local->buffer, fixed_string, local->chain_objects.array[i], range) == F_equal_to) { new_chain = F_false; reserved->has_main = F_true; @@ -914,9 +914,9 @@ f_status_t firewall_create_custom_chains(firewall_reserved_chains_t *reserved, f // skip globally reserved chain name: stop range.start = 0; - range.stop = firewall_group_stop_length - 1; - fixed_string.string = firewall_group_stop; - fixed_string.used = firewall_group_stop_length; + range.stop = firewall_group_stop_s_length - 1; + fixed_string.string = firewall_group_stop_s; + fixed_string.used = firewall_group_stop_s_length; if (fl_string_dynamic_partial_compare(local->buffer, fixed_string, local->chain_objects.array[i], range) == F_equal_to) { new_chain = F_false; reserved->has_stop = F_true; @@ -925,9 +925,9 @@ f_status_t firewall_create_custom_chains(firewall_reserved_chains_t *reserved, f // skip globally reserved chain name: lock range.start = 0; - range.stop = firewall_group_lock_length - 1; - fixed_string.string = firewall_group_lock; - fixed_string.used = firewall_group_lock_length; + range.stop = firewall_group_lock_s_length - 1; + fixed_string.string = firewall_group_lock_s; + fixed_string.used = firewall_group_lock_s_length; if (fl_string_dynamic_partial_compare(local->buffer, fixed_string, local->chain_objects.array[i], range) == F_equal_to) { new_chain = F_false; reserved->has_lock = F_true; @@ -936,9 +936,9 @@ f_status_t firewall_create_custom_chains(firewall_reserved_chains_t *reserved, f // skip globally reserved chain name: none range.start = 0; - range.stop = firewall_group_lock_length - 1; - fixed_string.string = firewall_chain_none; - fixed_string.used = firewall_chain_none_length; + range.stop = firewall_group_lock_s_length - 1; + fixed_string.string = firewall_chain_none_s; + fixed_string.used = firewall_chain_none_s_length; if (fl_string_dynamic_partial_compare(local->buffer, fixed_string, local->chain_objects.array[i], range) == F_equal_to) { new_chain = F_false; } @@ -963,7 +963,7 @@ f_status_t firewall_create_custom_chains(firewall_reserved_chains_t *reserved, f if (new_chain) { if (main->chains.used == main->chains.size) { - macro_f_string_dynamics_t_resize(status, main->chains, main->chains.used + firewall_default_allocation_step); + macro_f_string_dynamics_t_resize(status, main->chains, main->chains.used + firewall_default_allocation_step_d); if (F_status_is_error(status)) { macro_f_string_dynamics_t_delete_simple(arguments); @@ -1001,7 +1001,7 @@ f_status_t firewall_create_custom_chains(firewall_reserved_chains_t *reserved, f // copy the string character by character, ignoring placeholders. while (j <= local->chain_objects.array[i].stop) { - if (local->buffer.string[j] == f_fss_delimit_placeholder) { + if (local->buffer.string[j] == F_fss_delimit_placeholder_s) { ++j; continue; } @@ -1014,27 +1014,27 @@ f_status_t firewall_create_custom_chains(firewall_reserved_chains_t *reserved, f arguments.array[1].string[arguments.array[1].used] = 0; main->chains.array[main->chains.used].string[main->chains.array[main->chains.used].used] = 0; - if (fl_string_compare(arguments.array[1].string, firewall_chain_forward, arguments.array[1].used, firewall_chain_forward_length) == F_equal_to) { + if (fl_string_compare(arguments.array[1].string, firewall_chain_forward_s, arguments.array[1].used, firewall_chain_forward_s_length) == F_equal_to) { create_chain = F_false; } - else if (fl_string_compare(arguments.array[1].string, firewall_chain_input, arguments.array[1].used, firewall_chain_input_length) == F_equal_to) { + else if (fl_string_compare(arguments.array[1].string, firewall_chain_input_s, arguments.array[1].used, firewall_chain_input_s_length) == F_equal_to) { create_chain = F_false; } - else if (fl_string_compare(arguments.array[1].string, firewall_chain_output, arguments.array[1].used, firewall_chain_output_length) == F_equal_to) { + else if (fl_string_compare(arguments.array[1].string, firewall_chain_output_s, arguments.array[1].used, firewall_chain_output_s_length) == F_equal_to) { create_chain = F_false; } - else if (fl_string_compare(arguments.array[1].string, firewall_chain_postrouting, arguments.array[1].used, firewall_chain_postrouting_length) == F_equal_to) { + else if (fl_string_compare(arguments.array[1].string, firewall_chain_postrouting_s, arguments.array[1].used, firewall_chain_postrouting_s_length) == F_equal_to) { create_chain = F_false; } - else if (fl_string_compare(arguments.array[1].string, firewall_chain_prerouting, arguments.array[1].used, firewall_chain_prerouting_length) == F_equal_to) { + else if (fl_string_compare(arguments.array[1].string, firewall_chain_prerouting_s, arguments.array[1].used, firewall_chain_prerouting_s_length) == F_equal_to) { create_chain = F_false; } if (create_chain) { - firewall_print_debug_tool(main->warning, firewall_tool_iptables, arguments); + firewall_print_debug_tool(main->warning, firewall_tool_iptables_s, arguments); tool = firewall_program_iptables; - status = fll_execute_program((f_string_t) firewall_tool_iptables, arguments, 0, 0, (void *) &return_code); + status = fll_execute_program((f_string_t) firewall_tool_iptables_s, arguments, 0, 0, (void *) &return_code); // immediately exit child process, @todo this may require additional memory deallocation and relating changes. if (status == F_child) { @@ -1042,10 +1042,10 @@ f_status_t firewall_create_custom_chains(firewall_reserved_chains_t *reserved, f } if (F_status_is_error_not(status)) { - firewall_print_debug_tool(main->warning, firewall_tool_ip6tables, arguments); + firewall_print_debug_tool(main->warning, firewall_tool_ip6tables_s, arguments); tool = firewall_program_ip6tables; - status = fll_execute_program((f_string_t) firewall_tool_ip6tables, arguments, 0, 0, (void *) &return_code); + status = fll_execute_program((f_string_t) firewall_tool_ip6tables_s, arguments, 0, 0, (void *) &return_code); // immediately exit child process, @todo this may require additional memory deallocation and relating changes. if (status == F_child) { @@ -1057,7 +1057,7 @@ f_status_t firewall_create_custom_chains(firewall_reserved_chains_t *reserved, f status = F_status_set_fine(status); if (status == F_failure) { - firewall_print_error_on_operation(main->error, tool == firewall_program_iptables ? firewall_tool_iptables : firewall_tool_ip6tables, arguments); + firewall_print_error_on_operation(main->error, tool == firewall_program_iptables ? firewall_tool_iptables_s : firewall_tool_ip6tables_s, arguments); } else if (status == F_parameter) { firewall_print_error_on_invalid_parameter(main->error, "fll_execute_program"); @@ -1083,7 +1083,7 @@ f_status_t firewall_create_custom_chains(firewall_reserved_chains_t *reserved, f } f_status_t firewall_delete_chains(const firewall_main_t main) { - const f_string_t tools[2] = { firewall_tool_iptables, firewall_tool_ip6tables }; + const f_string_t tools[2] = { firewall_tool_iptables_s, firewall_tool_ip6tables_s }; f_status_t status = F_none; for (f_array_length_t i = 0; i < 2; ++i) { @@ -1130,9 +1130,9 @@ f_status_t firewall_delete_chains(const firewall_main_t main) { f_string_dynamic_t argument[1] = f_string_dynamic_t_initialize; int return_code = 0; - argument[0].string = (f_string_t) firewall_chain_delete_command; - argument[0].size = firewall_chain_delete_command_length; - argument[0].used = firewall_chain_delete_command_length; + argument[0].string = (f_string_t) firewall_chain_delete_command_s; + argument[0].size = firewall_chain_delete_command_s_length; + argument[0].used = firewall_chain_delete_command_s_length; arguments.array = argument; arguments.size = 1; @@ -1168,10 +1168,10 @@ f_status_t firewall_delete_chains(const firewall_main_t main) { } f_status_t firewall_default_lock(const firewall_main_t main) { - const f_string_t chains[3] = { firewall_chain_input, firewall_chain_output, firewall_chain_forward }; - const f_string_t tools[2] = { firewall_tool_iptables, firewall_tool_ip6tables }; + const f_string_t chains[3] = { firewall_chain_input_s, firewall_chain_output_s, firewall_chain_forward_s }; + const f_string_t tools[2] = { firewall_tool_iptables_s, firewall_tool_ip6tables_s }; - const f_array_length_t lengths[3] = { firewall_chain_input_length, firewall_chain_output_length, firewall_chain_forward_length }; + const f_array_length_t lengths[3] = { firewall_chain_input_s_length, firewall_chain_output_s_length, firewall_chain_forward_s_length }; f_status_t status = F_none; @@ -1183,11 +1183,11 @@ f_status_t firewall_default_lock(const firewall_main_t main) { arguments.used = 3; arguments.size = arguments.used; - arguments.array[0].string = (f_string_t) firewall_action_policy_command; + arguments.array[0].string = (f_string_t) firewall_action_policy_command_s; arguments.array[1].string = (f_string_t) chains[i]; arguments.array[2].string = (f_string_t) "DROP"; - arguments.array[0].used = firewall_action_append_command_length; + arguments.array[0].used = firewall_action_append_command_s_length; arguments.array[1].used = lengths[i]; arguments.array[2].used = 4; diff --git a/level_3/firewall/c/private-firewall.h b/level_3/firewall/c/private-firewall.h index 6347a0a..2fe49f1 100644 --- a/level_3/firewall/c/private-firewall.h +++ b/level_3/firewall/c/private-firewall.h @@ -25,7 +25,7 @@ extern "C" { * * Status codes (with error bit) are returned on any problem. */ -extern f_status_t firewall_perform_commands(const firewall_local_data_t local, const firewall_main_t main) f_attribute_visibility_internal; +extern f_status_t firewall_perform_commands(const firewall_local_data_t local, const firewall_main_t main) F_attribute_visibility_internal_d; /** * Create custom chains. @@ -42,7 +42,7 @@ extern f_status_t firewall_perform_commands(const firewall_local_data_t local, c * * Status codes (with error bit) are returned on any problem. */ -extern f_status_t firewall_create_custom_chains(firewall_reserved_chains_t *reserved, firewall_local_data_t *local, firewall_main_t *main) f_attribute_visibility_internal; +extern f_status_t firewall_create_custom_chains(firewall_reserved_chains_t *reserved, firewall_local_data_t *local, firewall_main_t *main) F_attribute_visibility_internal_d; /** * Deallocate chains. @@ -55,7 +55,7 @@ extern f_status_t firewall_create_custom_chains(firewall_reserved_chains_t *rese * * Status codes (with error bit) are returned on any problem. */ -extern f_status_t firewall_delete_chains(const firewall_main_t main) f_attribute_visibility_internal; +extern f_status_t firewall_delete_chains(const firewall_main_t main) F_attribute_visibility_internal_d; /** * Lock the firewall. @@ -68,7 +68,7 @@ extern f_status_t firewall_delete_chains(const firewall_main_t main) f_attribute * * Status codes (with error bit) are returned on any problem. */ -extern f_status_t firewall_default_lock(const firewall_main_t main) f_attribute_visibility_internal; +extern f_status_t firewall_default_lock(const firewall_main_t main) F_attribute_visibility_internal_d; /** * Buffer firewall rules. @@ -88,7 +88,7 @@ extern f_status_t firewall_default_lock(const firewall_main_t main) f_attribute_ * * Status codes (with error bit) are returned on any problem. */ -extern f_status_t firewall_buffer_rules(const f_string_t filename, const bool optional, firewall_local_data_t *local, firewall_main_t *main) f_attribute_visibility_internal; +extern f_status_t firewall_buffer_rules(const f_string_t filename, const bool optional, firewall_local_data_t *local, firewall_main_t *main) F_attribute_visibility_internal_d; /** * Process buffered rules. @@ -105,7 +105,7 @@ extern f_status_t firewall_buffer_rules(const f_string_t filename, const bool op * * Status codes (with error bit) are returned on any problem. */ -extern f_status_t firewall_process_rules(f_string_range_t *range, firewall_local_data_t *local, firewall_main_t *main) f_attribute_visibility_internal; +extern f_status_t firewall_process_rules(f_string_range_t *range, firewall_local_data_t *local, firewall_main_t *main) F_attribute_visibility_internal_d; /** * Delete allocated local data. @@ -118,7 +118,7 @@ extern f_status_t firewall_process_rules(f_string_range_t *range, firewall_local * * Status codes (with error bit) are returned on any problem. */ -extern f_status_t firewall_delete_local_data(firewall_local_data_t *local) f_attribute_visibility_internal; +extern f_status_t firewall_delete_local_data(firewall_local_data_t *local) F_attribute_visibility_internal_d; #ifdef __cplusplus } // extern "C" diff --git a/level_3/fss_basic_list_read/c/fss_basic_list_read.c b/level_3/fss_basic_list_read/c/fss_basic_list_read.c index 49d7f1a..31cefbb 100644 --- a/level_3/fss_basic_list_read/c/fss_basic_list_read.c +++ b/level_3/fss_basic_list_read/c/fss_basic_list_read.c @@ -11,7 +11,7 @@ extern "C" { flockfile(file.stream); - fll_program_print_help_header(file, context, fss_basic_list_read_name_long, fss_basic_list_read_version); + fll_program_print_help_header(file, context, fss_basic_list_program_name_long_s, fss_basic_list_program_version_s); fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); @@ -25,22 +25,22 @@ extern "C" { f_print_character(f_string_eol_s[0], file.stream); - fll_program_print_help_option(file, context, fss_basic_list_read_short_at, fss_basic_list_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric index."); - fll_program_print_help_option(file, context, fss_basic_list_read_short_content, fss_basic_list_read_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Content (default)."); - fll_program_print_help_option(file, context, fss_basic_list_read_short_columns, fss_basic_list_read_long_columns, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns."); - fll_program_print_help_option(file, context, fss_basic_list_read_short_delimit, fss_basic_list_read_long_delimit, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits."); - fll_program_print_help_option(file, context, fss_basic_list_read_short_depth, fss_basic_list_read_long_depth, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth."); - fll_program_print_help_option(file, context, fss_basic_list_read_short_empty, fss_basic_list_read_long_empty, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing."); - fll_program_print_help_option(file, context, fss_basic_list_read_short_line, fss_basic_list_read_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line."); - fll_program_print_help_option(file, context, fss_basic_list_read_short_name, fss_basic_list_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name."); - fll_program_print_help_option(file, context, fss_basic_list_read_short_object, fss_basic_list_read_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object."); - fll_program_print_help_option(file, context, fss_basic_list_read_short_pipe, fss_basic_list_read_long_pipe, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format."); - fll_program_print_help_option(file, context, fss_basic_list_read_short_raw, fss_basic_list_read_long_raw, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print with the original quotes and escapes."); - fll_program_print_help_option(file, context, fss_basic_list_read_short_select, fss_basic_list_read_long_select, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index."); - fll_program_print_help_option(file, context, fss_basic_list_read_short_total, fss_basic_list_read_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines."); - fll_program_print_help_option(file, context, fss_basic_list_read_short_trim, fss_basic_list_read_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print."); - - fll_program_print_help_usage(file, context, fss_basic_list_read_name, "filename(s)"); + fll_program_print_help_option(file, context, fss_basic_list_short_at_s, fss_basic_list_long_at_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric index."); + fll_program_print_help_option(file, context, fss_basic_list_short_content_s, fss_basic_list_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Content (default)."); + fll_program_print_help_option(file, context, fss_basic_list_short_columns_s, fss_basic_list_long_columns_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns."); + fll_program_print_help_option(file, context, fss_basic_list_short_delimit_s, fss_basic_list_long_delimit_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits."); + fll_program_print_help_option(file, context, fss_basic_list_short_depth_s, fss_basic_list_long_depth_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth."); + fll_program_print_help_option(file, context, fss_basic_list_short_empty_s, fss_basic_list_long_empty_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing."); + fll_program_print_help_option(file, context, fss_basic_list_short_line_s, fss_basic_list_long_line_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line."); + fll_program_print_help_option(file, context, fss_basic_list_short_name_s, fss_basic_list_long_name_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name."); + fll_program_print_help_option(file, context, fss_basic_list_short_object_s, fss_basic_list_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object."); + fll_program_print_help_option(file, context, fss_basic_list_short_pipe_s, fss_basic_list_long_pipe_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format."); + fll_program_print_help_option(file, context, fss_basic_list_short_raw_s, fss_basic_list_long_raw_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print with the original quotes and escapes."); + fll_program_print_help_option(file, context, fss_basic_list_short_select_s, fss_basic_list_long_select_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index."); + fll_program_print_help_option(file, context, fss_basic_list_short_total_s, fss_basic_list_long_total_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines."); + fll_program_print_help_option(file, context, fss_basic_list_short_trim_s, fss_basic_list_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print."); + + fll_program_print_help_usage(file, context, fss_basic_list_program_name_s, "filename(s)"); fl_print_format(" %[Notes:%]%c", file.stream, context.set.important, context.set.important, f_string_eol_s[0]); @@ -49,63 +49,63 @@ extern "C" { fl_print_format(" All numeric positions (indexes) start at 0 instead of 1.%c", file.stream, f_string_eol_s[0]); fl_print_format(" For example, a file of 17 lines would range from 0 to 16.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" When using the %[%s%s%] option, an order of operations is enforced on the parameters.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth, context.set.notable, f_string_eol_s[0]); + fl_print_format(" When using the %[%s%s%] option, an order of operations is enforced on the parameters.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_depth_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", file.stream, f_string_eol_s[0]); - fl_print_format(" %[%s%s%]: An Object index at the specified depth.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_at, context.set.notable, f_string_eol_s[0]); - fl_print_format(" %[%s%s%]: A new depth within the specified depth, indexed from the root.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth, context.set.notable, f_string_eol_s[0]); - fl_print_format(" %[%s%s%]: An Object name at the specified depth.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" %[%s%s%]: An Object index at the specified depth.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_at_s, context.set.notable, f_string_eol_s[0]); + fl_print_format(" %[%s%s%]: A new depth within the specified depth, indexed from the root.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_depth_s, context.set.notable, f_string_eol_s[0]); + fl_print_format(" %[%s%s%]: An Object name at the specified depth.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_name_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameter %[%s%s%] must be in numeric order, but values in between may be skipped.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth, context.set.notable, f_string_eol_s[0]); + fl_print_format(" The parameter %[%s%s%] must be in numeric order, but values in between may be skipped.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_depth_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%c", file.stream, f_string_eol_s[0]); fl_print_format(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameter %[%s%s%] selects a Content column.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_select, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" The parameter %[%s%s%] selects a Content column.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_select_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" Specify both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_object, context.set.notable); - fl_print_format(" and the %[%s%s%] parameters to get the total objects.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_total, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" Specify both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_object_s, context.set.notable); + fl_print_format(" and the %[%s%s%] parameters to get the total objects.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_total_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" When both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_at, context.set.notable); - fl_print_format(" and %[%s%s%] parameters are specified (at the same depth),", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_name, context.set.notable); - fl_print_format(" the %[%s%s%] parameter value will be treated as a position relative to the specified", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_at, context.set.notable); - fl_print_format(" %[%s%s%] parameter value.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" When both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_at_s, context.set.notable); + fl_print_format(" and %[%s%s%] parameters are specified (at the same depth),", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_name_s, context.set.notable); + fl_print_format(" the %[%s%s%] parameter value will be treated as a position relative to the specified", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_at_s, context.set.notable); + fl_print_format(" %[%s%s%] parameter value.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_name_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" This program may support parameters, such as %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth, context.set.notable); - fl_print_format(" or %[%s%s%], even if not supported by the standard.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_select, context.set.notable, f_string_eol_s[0]); + fl_print_format(" This program may support parameters, such as %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_depth_s, context.set.notable); + fl_print_format(" or %[%s%s%], even if not supported by the standard.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_select_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" This is done to help ensure consistency for scripting.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth, context.set.notable); + fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_depth_s, context.set.notable); fl_print_format(" if the standard doesn't support nested Content, then only a depth of 0 would be valid.%c", file.stream, f_string_eol_s[0]); - fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_select, context.set.notable); + fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_select_s, context.set.notable); fl_print_format(" if the standard doesn't support multiple Content groups, then only a select of 0 would be valid.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameter %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_trim, context.set.notable); + fl_print_format(" The parameter %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_trim_s, context.set.notable); fl_print_format(" will remove leading and trailing whitespaces when selecting objects or when printing objects.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" When specifying both the %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_object, context.set.notable); - fl_print_format(" parameter and the %[%s%s%] parameter, the entire Object and Content are printed, including the formatting.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_content, context.set.notable, f_string_eol_s[0]); + fl_print_format(" When specifying both the %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_object_s, context.set.notable); + fl_print_format(" parameter and the %[%s%s%] parameter, the entire Object and Content are printed, including the formatting.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_content_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" Both the Object and Content printed are already escaped.%c", file.stream, f_string_eol_s[0]); fl_print_format(" Both the Object and Content are separated by an EOL.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameter %[%s%s%] accepts the following:%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_delimit, context.set.notable, f_string_eol_s[0]); - fl_print_format(" - %[%s%]: Do not apply delimits.%c", file.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_none, context.set.notable, f_string_eol_s[0]); - fl_print_format(" - %[%s%]: (default) Apply all delimits.%c", file.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_all, context.set.notable, f_string_eol_s[0]); - fl_print_format(" - %[%s%]: Apply delimits for Objects.%c", file.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_object, context.set.notable, f_string_eol_s[0]); + fl_print_format(" The parameter %[%s%s%] accepts the following:%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_delimit_s, context.set.notable, f_string_eol_s[0]); + fl_print_format(" - %[%s%]: Do not apply delimits.%c", file.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_none_s, context.set.notable, f_string_eol_s[0]); + fl_print_format(" - %[%s%]: (default) Apply all delimits.%c", file.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_all_s, context.set.notable, f_string_eol_s[0]); + fl_print_format(" - %[%s%]: Apply delimits for Objects.%c", file.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_object_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" - A number, 0 or greater: apply delimits for Content at the specified depth.%c", file.stream, f_string_eol_s[0]); - fl_print_format(" - A number, 0 or greater, followed by a %[%s%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%c", file.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_greater, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" - A number, 0 or lesser, followed by a %[%s%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%c%c", file.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_lesser, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" - A number, 0 or greater, followed by a %[%s%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%c", file.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_greater_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" - A number, 0 or lesser, followed by a %[%s%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%c%c", file.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_lesser_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The %[%s%s%] parameter may be specified multiple times to customize the delimit behavior.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_delimit, context.set.notable, f_string_eol_s[0]); + fl_print_format(" The %[%s%s%] parameter may be specified multiple times to customize the delimit behavior.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_delimit_s, context.set.notable, f_string_eol_s[0]); - fl_print_format(" The %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_delimit, context.set.notable); - fl_print_format(" values %[%s%]", file.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_none, context.set.notable); - fl_print_format(" and %[%s%],", file.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_all, context.set.notable); + fl_print_format(" The %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_delimit_s, context.set.notable); + fl_print_format(" values %[%s%]", file.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_none_s, context.set.notable); + fl_print_format(" and %[%s%],", file.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_all_s, context.set.notable); fl_print_format(" overrule all other delimit values.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameters %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_columns, context.set.notable); - fl_print_format(" and %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_select, context.set.notable); + fl_print_format(" The parameters %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_columns_s, context.set.notable); + fl_print_format(" and %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_long_select_s, context.set.notable); fl_print_format(" refer to a Content column.%c", file.stream, f_string_eol_s[0]); fl_print_format(" The word \"column\" is being loosely defined to refer to a specific Content.%c", file.stream, f_string_eol_s[0]); fl_print_format(" This is not to be confused with a depth.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); @@ -122,7 +122,7 @@ extern "C" { f_status_t status = F_none; { - const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_basic_list_read_total_parameters); + const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_basic_list_total_parameters_d); { f_console_parameter_id_t ids[3] = { fss_basic_list_read_parameter_no_color, fss_basic_list_read_parameter_light, fss_basic_list_read_parameter_dark }; @@ -197,7 +197,7 @@ extern "C" { } if (main->parameters[fss_basic_list_read_parameter_version].result == f_console_result_found) { - fll_program_print_version(main->output.to, fss_basic_list_read_version); + fll_program_print_version(main->output.to, fss_basic_list_program_version_s); fss_basic_list_read_main_delete(main); return status; @@ -223,12 +223,12 @@ extern "C" { }; const f_string_t parameter_name[] = { - fss_basic_list_read_long_at, - fss_basic_list_read_long_depth, - fss_basic_list_read_long_line, - fss_basic_list_read_long_select, - fss_basic_list_read_long_name, - fss_basic_list_read_long_delimit, + fss_basic_list_long_at_s, + fss_basic_list_long_depth_s, + fss_basic_list_long_line_s, + fss_basic_list_long_select_s, + fss_basic_list_long_name_s, + fss_basic_list_long_delimit_s, }; const f_string_t message_positive_number = "positive number"; @@ -271,11 +271,11 @@ extern "C" { }; const f_string_t parameter_name[] = { - fss_basic_list_read_long_depth, - fss_basic_list_read_long_line, - fss_basic_list_read_long_pipe, - fss_basic_list_read_long_select, - fss_basic_list_read_long_total, + fss_basic_list_long_depth_s, + fss_basic_list_long_line_s, + fss_basic_list_long_pipe_s, + fss_basic_list_long_select_s, + fss_basic_list_long_total_s, }; const uint8_t parameter_match[] = { @@ -292,7 +292,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_columns, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_long_columns_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, parameter_name[i], main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); @@ -310,9 +310,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_pipe, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_long_pipe_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_total, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_long_total_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -323,9 +323,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_pipe, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_long_pipe_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_line, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_long_line_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -350,7 +350,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_delimit, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_long_delimit_s, main->error.notable); fl_print_format("%[' must not be empty.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -358,13 +358,13 @@ extern "C" { status = F_status_set_error(F_parameter); break; } - else if (fl_string_compare(arguments->argv[location], fss_basic_list_read_delimit_mode_name_none, length, fss_basic_list_read_delimit_mode_name_none_length) == F_equal_to) { + else if (fl_string_compare(arguments->argv[location], fss_basic_list_read_delimit_mode_name_none_s, length, fss_basic_list_read_delimit_mode_name_none_s_length) == F_equal_to) { data.delimit_mode = fss_basic_list_read_delimit_mode_none; } - else if (fl_string_compare(arguments->argv[location], fss_basic_list_read_delimit_mode_name_all, length, fss_basic_list_read_delimit_mode_name_all_length) == F_equal_to) { + else if (fl_string_compare(arguments->argv[location], fss_basic_list_read_delimit_mode_name_all_s, length, fss_basic_list_read_delimit_mode_name_all_s_length) == F_equal_to) { data.delimit_mode = fss_basic_list_read_delimit_mode_all; } - else if (fl_string_compare(arguments->argv[location], fss_basic_list_read_delimit_mode_name_object, length, fss_basic_list_read_delimit_mode_name_object_length) == F_equal_to) { + else if (fl_string_compare(arguments->argv[location], fss_basic_list_read_delimit_mode_name_object_s, length, fss_basic_list_read_delimit_mode_name_object_s_length) == F_equal_to) { switch (data.delimit_mode) { case 0: data.delimit_mode = fss_basic_list_read_delimit_mode_object; @@ -401,7 +401,7 @@ extern "C" { data.delimit_mode = fss_basic_list_read_delimit_mode_content_object; } - if (arguments->argv[location][length - 1] == fss_basic_list_read_delimit_mode_name_greater[0]) { + if (arguments->argv[location][length - 1] == fss_basic_list_read_delimit_mode_name_greater_s[0]) { if (!(data.delimit_mode == fss_basic_list_read_delimit_mode_none || data.delimit_mode == fss_basic_list_read_delimit_mode_all)) { if (data.delimit_mode == fss_basic_list_read_delimit_mode_content_object) { data.delimit_mode = fss_basic_list_read_delimit_mode_content_greater_object; @@ -414,7 +414,7 @@ extern "C" { // Shorten the length to better convert the remainder to a number. --length; } - else if (arguments->argv[location][length - 1] == fss_basic_list_read_delimit_mode_name_lesser[0]) { + else if (arguments->argv[location][length - 1] == fss_basic_list_read_delimit_mode_name_lesser_s[0]) { if (!(data.delimit_mode == fss_basic_list_read_delimit_mode_none || data.delimit_mode == fss_basic_list_read_delimit_mode_all)) { if (data.delimit_mode == fss_basic_list_read_delimit_mode_content_object) { data.delimit_mode = fss_basic_list_read_delimit_mode_content_lesser_object; @@ -438,7 +438,7 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments->argv[location], range, &data.delimit_depth); if (F_status_is_error(status)) { - fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_list_read_long_delimit, arguments->argv[location]); + fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_list_long_delimit_s, arguments->argv[location]); break; } @@ -483,7 +483,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_select, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_long_select_s, main->error.notable); fl_print_format("%[' parameter requires a positive number.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -502,8 +502,8 @@ extern "C" { if (F_status_is_error_not(status) && main->process_pipe) { f_file_t file = f_file_t_initialize; - file.id = f_type_descriptor_input; - file.stream = f_type_input; + file.id = F_type_descriptor_input_d; + file.stream = F_type_input_d; data.files.array[0].name = 0; data.files.array[0].range.start = 0; @@ -616,7 +616,7 @@ extern "C" { #ifndef _di_fss_basic_list_read_main_delete_ f_status_t fss_basic_list_read_main_delete(fss_basic_list_read_main_t *main) { - for (f_array_length_t i = 0; i < fss_basic_list_read_total_parameters; ++i) { + for (f_array_length_t i = 0; i < fss_basic_list_total_parameters_d; ++i) { macro_f_array_lengths_t_delete_simple(main->parameters[i].locations); macro_f_array_lengths_t_delete_simple(main->parameters[i].locations_sub); macro_f_array_lengths_t_delete_simple(main->parameters[i].values); diff --git a/level_3/fss_basic_list_read/c/fss_basic_list_read.h b/level_3/fss_basic_list_read/c/fss_basic_list_read.h index 3bdd80f..9b1b7e8 100644 --- a/level_3/fss_basic_list_read/c/fss_basic_list_read.h +++ b/level_3/fss_basic_list_read/c/fss_basic_list_read.h @@ -50,61 +50,61 @@ extern "C" { #endif -#ifndef _di_fss_basic_list_read_version_ - #define fss_basic_list_read_major_version f_string_ascii_0 - #define fss_basic_list_read_minor_version f_string_ascii_5 - #define fss_basic_list_read_micro_version f_string_ascii_6 +#ifndef _di_fss_basic_list_read_program_version_ + #define fss_basic_list_program_version_major F_string_ascii_0_s + #define fss_basic_list_program_version_minor F_string_ascii_5_s + #define fss_basic_list_program_version_micro F_string_ascii_6_s - #ifndef fss_basic_list_read_nano_version_prefix - #define fss_basic_list_read_nano_version_prefix + #ifndef fss_basic_list_program_version_nano_prefix_s + #define fss_basic_list_program_version_nano_prefix_s #endif - #ifndef fss_basic_list_read_nano_version - #define fss_basic_list_read_nano_version + #ifndef fss_basic_list_program_version_nano_s + #define fss_basic_list_program_version_nano_s #endif - #define fss_basic_list_read_version fss_basic_list_read_major_version f_string_ascii_period fss_basic_list_read_minor_version f_string_ascii_period fss_basic_list_read_micro_version fss_basic_list_read_nano_version_prefix fss_basic_list_read_nano_version -#endif // _di_fss_basic_list_read_version_ + #define fss_basic_list_program_version_s fss_basic_list_program_version_major F_string_ascii_period_s fss_basic_list_program_version_minor F_string_ascii_period_s fss_basic_list_program_version_micro fss_basic_list_program_version_nano_prefix_s fss_basic_list_program_version_nano_s +#endif // _di_fss_basic_list_read_program_version_ -#ifndef _di_fss_basic_list_read_name_ - #define fss_basic_list_read_name "fss_basic_list_read" - #define fss_basic_list_read_name_long "FSS Basic List Read" -#endif // _di_fss_basic_list_read_name_ +#ifndef _di_fss_basic_list_read_program_name_ + #define fss_basic_list_program_name_s "fss_basic_list_read" + #define fss_basic_list_program_name_long_s "FSS Basic List Read" +#endif // _di_fss_basic_list_read_program_name_ #ifndef _di_fss_basic_list_read_defines_ - #define fss_basic_list_read_pipe_content_end '\f' - #define fss_basic_list_read_pipe_content_ignore '\v' - #define fss_basic_list_read_pipe_content_start '\b' + #define fss_basic_list_pipe_content_end_s '\f' + #define fss_basic_list_pipe_content_ignore_s '\v' + #define fss_basic_list_pipe_content_start_s '\b' - #define fss_basic_list_read_short_at "a" - #define fss_basic_list_read_short_content "c" - #define fss_basic_list_read_short_columns "C" - #define fss_basic_list_read_short_delimit "D" - #define fss_basic_list_read_short_depth "d" - #define fss_basic_list_read_short_empty "e" - #define fss_basic_list_read_short_line "l" - #define fss_basic_list_read_short_name "n" - #define fss_basic_list_read_short_object "o" - #define fss_basic_list_read_short_pipe "p" - #define fss_basic_list_read_short_raw "R" - #define fss_basic_list_read_short_select "s" - #define fss_basic_list_read_short_total "t" - #define fss_basic_list_read_short_trim "T" + #define fss_basic_list_short_at_s "a" + #define fss_basic_list_short_content_s "c" + #define fss_basic_list_short_columns_s "C" + #define fss_basic_list_short_delimit_s "D" + #define fss_basic_list_short_depth_s "d" + #define fss_basic_list_short_empty_s "e" + #define fss_basic_list_short_line_s "l" + #define fss_basic_list_short_name_s "n" + #define fss_basic_list_short_object_s "o" + #define fss_basic_list_short_pipe_s "p" + #define fss_basic_list_short_raw_s "R" + #define fss_basic_list_short_select_s "s" + #define fss_basic_list_short_total_s "t" + #define fss_basic_list_short_trim_s "T" - #define fss_basic_list_read_long_at "at" - #define fss_basic_list_read_long_content "content" - #define fss_basic_list_read_long_columns "columns" - #define fss_basic_list_read_long_delimit "delimit" - #define fss_basic_list_read_long_depth "depth" - #define fss_basic_list_read_long_empty "empty" - #define fss_basic_list_read_long_line "line" - #define fss_basic_list_read_long_name "name" - #define fss_basic_list_read_long_object "object" - #define fss_basic_list_read_long_pipe "pipe" - #define fss_basic_list_read_long_raw "raw" - #define fss_basic_list_read_long_select "select" - #define fss_basic_list_read_long_total "total" - #define fss_basic_list_read_long_trim "trim" + #define fss_basic_list_long_at_s "at" + #define fss_basic_list_long_content_s "content" + #define fss_basic_list_long_columns_s "columns" + #define fss_basic_list_long_delimit_s "delimit" + #define fss_basic_list_long_depth_s "depth" + #define fss_basic_list_long_empty_s "empty" + #define fss_basic_list_long_line_s "line" + #define fss_basic_list_long_name_s "name" + #define fss_basic_list_long_object_s "object" + #define fss_basic_list_long_pipe_s "pipe" + #define fss_basic_list_long_raw_s "raw" + #define fss_basic_list_long_select_s "select" + #define fss_basic_list_long_total_s "total" + #define fss_basic_list_long_trim_s "trim" enum { fss_basic_list_read_parameter_help, @@ -144,23 +144,23 @@ extern "C" { f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(fss_basic_list_read_short_at, fss_basic_list_read_long_at, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_read_short_content, fss_basic_list_read_long_content, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_read_short_columns, fss_basic_list_read_long_columns, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_read_short_delimit, fss_basic_list_read_long_delimit, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_read_short_depth, fss_basic_list_read_long_depth, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_read_short_empty, fss_basic_list_read_long_empty, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_read_short_line, fss_basic_list_read_long_line, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_read_short_name, fss_basic_list_read_long_name, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_read_short_object, fss_basic_list_read_long_object, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_read_short_pipe, fss_basic_list_read_long_pipe, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_read_short_raw, fss_basic_list_read_long_raw, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_read_short_select, fss_basic_list_read_long_select, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_read_short_total, fss_basic_list_read_long_total, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_read_short_trim, fss_basic_list_read_long_trim, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_short_at_s, fss_basic_list_long_at_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_short_content_s, fss_basic_list_long_content_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_short_columns_s, fss_basic_list_long_columns_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_short_delimit_s, fss_basic_list_long_delimit_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_short_depth_s, fss_basic_list_long_depth_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_short_empty_s, fss_basic_list_long_empty_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_short_line_s, fss_basic_list_long_line_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_short_name_s, fss_basic_list_long_name_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_short_object_s, fss_basic_list_long_object_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_short_pipe_s, fss_basic_list_long_pipe_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_short_raw_s, fss_basic_list_long_raw_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_short_select_s, fss_basic_list_long_select_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_short_total_s, fss_basic_list_long_total_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_short_trim_s, fss_basic_list_long_trim_s, 0, 0, f_console_type_normal), \ } - #define fss_basic_list_read_total_parameters 23 + #define fss_basic_list_total_parameters_d 23 #endif // _di_fss_basic_list_read_defines_ /** @@ -177,17 +177,17 @@ extern "C" { * - object: Objects arre to have delimits applied. */ #ifndef _di_fss_basic_list_read_delimit_mode_ - #define fss_basic_list_read_delimit_mode_name_none "none" - #define fss_basic_list_read_delimit_mode_name_all "all" - #define fss_basic_list_read_delimit_mode_name_object "object" - #define fss_basic_list_read_delimit_mode_name_greater "+" - #define fss_basic_list_read_delimit_mode_name_lesser "-" + #define fss_basic_list_read_delimit_mode_name_none_s "none" + #define fss_basic_list_read_delimit_mode_name_all_s "all" + #define fss_basic_list_read_delimit_mode_name_object_s "object" + #define fss_basic_list_read_delimit_mode_name_greater_s "+" + #define fss_basic_list_read_delimit_mode_name_lesser_s "-" - #define fss_basic_list_read_delimit_mode_name_none_length 4 - #define fss_basic_list_read_delimit_mode_name_all_length 3 - #define fss_basic_list_read_delimit_mode_name_object_length 6 - #define fss_basic_list_read_delimit_mode_name_greater_length 1 - #define fss_basic_list_read_delimit_mode_name_lesser_length 1 + #define fss_basic_list_read_delimit_mode_name_none_s_length 4 + #define fss_basic_list_read_delimit_mode_name_all_s_length 3 + #define fss_basic_list_read_delimit_mode_name_object_s_length 6 + #define fss_basic_list_read_delimit_mode_name_greater_s_length 1 + #define fss_basic_list_read_delimit_mode_name_lesser_s_length 1 enum { fss_basic_list_read_delimit_mode_none = 1, @@ -204,7 +204,7 @@ extern "C" { #ifndef _di_fss_basic_list_read_main_t_ typedef struct { - f_console_parameter_t parameters[fss_basic_list_read_total_parameters]; + f_console_parameter_t parameters[fss_basic_list_total_parameters_d]; f_array_lengths_t remaining; bool process_pipe; diff --git a/level_3/fss_basic_list_read/c/main.c b/level_3/fss_basic_list_read/c/main.c index a018daf..236fc47 100644 --- a/level_3/fss_basic_list_read/c/main.c +++ b/level_3/fss_basic_list_read/c/main.c @@ -12,13 +12,13 @@ int main(const int argc, const f_string_t *argv) { const f_status_t status = fss_basic_list_read_main(&arguments, &data); // flush output pipes before closing. - fflush(f_type_output); - fflush(f_type_error); + fflush(F_type_output_d); + fflush(F_type_error_d); // close all open file descriptors. - close(f_type_descriptor_output); - close(f_type_descriptor_input); - close(f_type_descriptor_error); + close(F_type_descriptor_output_d); + close(F_type_descriptor_input_d); + close(F_type_descriptor_error_d); if (F_status_is_error(status)) { return 1; diff --git a/level_3/fss_basic_list_read/c/private-common.h b/level_3/fss_basic_list_read/c/private-common.h index 6e8fc4b..b17a52b 100644 --- a/level_3/fss_basic_list_read/c/private-common.h +++ b/level_3/fss_basic_list_read/c/private-common.h @@ -20,8 +20,8 @@ extern "C" { * - small: An allocation step used for buffers that are anticipated to have small buffers. */ #ifndef _di_fss_basic_list_read_common_ - #define fss_basic_list_read_common_allocation_large 256 - #define fss_basic_list_read_common_allocation_small 16 + #define fss_basic_list_common_allocation_large_d 256 + #define fss_basic_list_read_common_allocation_small_d 16 #endif // _di_fss_basic_list_read_common_ /** @@ -154,17 +154,17 @@ extern "C" { * delimits_content: The positions within the buffer representing Content character delimits. */ #ifndef _di_fss_basic_list_read_data_t_ - #define fss_basic_list_read_data_option_at 0x1 - #define fss_basic_list_read_data_option_columns 0x2 - #define fss_basic_list_read_data_option_content 0x4 - #define fss_basic_list_read_data_option_empty 0x8 - #define fss_basic_list_read_data_option_line 0x10 - #define fss_basic_list_read_data_option_name 0x20 - #define fss_basic_list_read_data_option_object 0x40 - #define fss_basic_list_read_data_option_raw 0x80 - #define fss_basic_list_read_data_option_select 0x100 - #define fss_basic_list_read_data_option_total 0x200 - #define fss_basic_list_read_data_option_trim 0x400 + #define fss_basic_list_read_data_option_at_d 0x1 + #define fss_basic_list_read_data_option_columns_d 0x2 + #define fss_basic_list_read_data_option_content_d 0x4 + #define fss_basic_list_read_data_option_empty_d 0x8 + #define fss_basic_list_read_data_option_line_d 0x10 + #define fss_basic_list_read_data_option_name_d 0x20 + #define fss_basic_list_read_data_option_object_d 0x40 + #define fss_basic_list_read_data_option_raw_d 0x80 + #define fss_basic_list_read_data_option_select_d 0x100 + #define fss_basic_list_read_data_option_total_d 0x200 + #define fss_basic_list_read_data_option_trim_d 0x400 typedef struct { uint16_t option; @@ -211,7 +211,7 @@ extern "C" { * The data to deallocate. */ #ifndef _di_fss_basic_list_read_data_delete_simple_ - extern void fss_basic_list_read_data_delete_simple(fss_basic_list_read_data_t *data) f_attribute_visibility_internal; + extern void fss_basic_list_read_data_delete_simple(fss_basic_list_read_data_t *data) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_data_delete_simple_ /** @@ -221,7 +221,7 @@ extern "C" { * The depth to deallocate. */ #ifndef _di_fss_basic_list_read_depth_delete_simple_ - extern void fss_basic_list_read_depth_delete_simple(fss_basic_list_read_depth_t *depth) f_attribute_visibility_internal; + extern void fss_basic_list_read_depth_delete_simple(fss_basic_list_read_depth_t *depth) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_depth_delete_simple_ /** @@ -245,7 +245,7 @@ extern "C" { * @see fss_basic_list_read_depths_increase() */ #ifndef _di_fss_basic_list_read_depths_resize_ - extern f_status_t fss_basic_list_read_depths_resize(const f_array_length_t length, fss_basic_list_read_depths_t *depths) f_attribute_visibility_internal; + extern f_status_t fss_basic_list_read_depths_resize(const f_array_length_t length, fss_basic_list_read_depths_t *depths) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_depths_resize_ #ifdef __cplusplus diff --git a/level_3/fss_basic_list_read/c/private-fss_basic_list_read.c b/level_3/fss_basic_list_read/c/private-fss_basic_list_read.c index 2f36ba1..a309dca 100644 --- a/level_3/fss_basic_list_read/c/private-fss_basic_list_read.c +++ b/level_3/fss_basic_list_read/c/private-fss_basic_list_read.c @@ -103,7 +103,7 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments->argv[position_depth], range, &data->depths.array[i].depth); if (F_status_is_error(status)) { - fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_list_read_long_depth, arguments->argv[position_depth]); + fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_list_long_depth_s, arguments->argv[position_depth]); return status; } @@ -127,7 +127,7 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments->argv[data->depths.array[i].index_at], range, &data->depths.array[i].value_at); if (F_status_is_error(status)) { - fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_list_read_long_at, arguments->argv[data->depths.array[i].index_at]); + fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_list_long_at_s, arguments->argv[data->depths.array[i].index_at]); return status; } @@ -174,7 +174,7 @@ extern "C" { fl_print_format("%c%[%sThe value '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); fl_print_format("%[%ul%]", main->error.to.stream, main->error.notable, data->depths.array[i].depth, main->error.notable); fl_print_format("%[' may only be specified once for the parameter '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_long_depth_s, main->error.notable); fl_print_format("%['.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -187,7 +187,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_long_depth_s, main->error.notable); fl_print_format("%[' may not have the value '%]", main->error.to.stream, main->error.context, main->error.context); fl_print_format("%[%ul%]", main->error.to.stream, main->error.notable, data->depths.array[i].depth, main->error.notable); fl_print_format("%[' before the value '%]", main->error.to.stream, main->error.context, main->error.context); @@ -223,7 +223,7 @@ extern "C" { #ifndef _di_fss_basic_list_read_load_ f_status_t fss_basic_list_read_load(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data) { - f_state_t state = macro_f_state_t_initialize(fss_basic_list_read_common_allocation_large, fss_basic_list_read_common_allocation_small, 0, 0, 0, 0, 0); + f_state_t state = macro_f_state_t_initialize(fss_basic_list_common_allocation_large_d, fss_basic_list_read_common_allocation_small_d, 0, 0, 0, 0, 0); f_string_range_t input = macro_f_string_range_t_initialize(data->buffer.used); data->delimits_object.used = 0; @@ -239,7 +239,7 @@ extern "C" { return status; } else if (status == F_data_not_stop || status == F_data_not_eos) { - if (data->option & fss_basic_list_read_data_option_total) { + if (data->option & fss_basic_list_read_data_option_total_d) { flockfile(main->output.to.stream); fss_basic_list_read_print_zero(main); @@ -285,11 +285,11 @@ extern "C" { return; } - if ((data->option & fss_basic_list_read_data_option_object) || (data->option & fss_basic_list_read_data_option_content) && (data->contents.array[at].used || (data->option & fss_basic_list_read_data_option_empty))) { + if ((data->option & fss_basic_list_read_data_option_object_d) || (data->option & fss_basic_list_read_data_option_content_d) && (data->contents.array[at].used || (data->option & fss_basic_list_read_data_option_empty_d))) { flockfile(main->output.to.stream); - if (data->option & fss_basic_list_read_data_option_object) { - if (data->option & fss_basic_list_read_data_option_trim) { + if (data->option & fss_basic_list_read_data_option_object_d) { + if (data->option & fss_basic_list_read_data_option_trim_d) { fl_print_trim_except_in_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, data->comments, main->output.to.stream); } else { @@ -299,7 +299,7 @@ extern "C" { fss_basic_list_read_print_object_end(main); } - if (data->option & fss_basic_list_read_data_option_content) { + if (data->option & fss_basic_list_read_data_option_content_d) { if (data->contents.array[at].used) { fss_basic_list_read_print_content_ignore(main); @@ -323,7 +323,7 @@ extern "C" { return; } - if (data->option & fss_basic_list_read_data_option_trim) { + if (data->option & fss_basic_list_read_data_option_trim_d) { fl_print_trim_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.to.stream); } else { @@ -338,7 +338,7 @@ extern "C" { void fss_basic_list_read_print_content_ignore(fss_basic_list_read_main_t * const main) { if (main->parameters[fss_basic_list_read_parameter_pipe].result == f_console_result_found) { - f_print_character(fss_basic_list_read_pipe_content_ignore, main->output.to.stream); + f_print_character(fss_basic_list_pipe_content_ignore_s, main->output.to.stream); } } #endif // _di_fss_basic_list_read_print_content_ignore_ @@ -347,15 +347,15 @@ extern "C" { void fss_basic_list_read_print_object_end(fss_basic_list_read_main_t * const main) { if (main->parameters[fss_basic_list_read_parameter_pipe].result == f_console_result_found) { - f_print_character(fss_basic_list_read_pipe_content_start, main->output.to.stream); + f_print_character(fss_basic_list_pipe_content_start_s, main->output.to.stream); } else { if (main->parameters[fss_basic_list_read_parameter_content].result == f_console_result_found) { - f_print_character(f_fss_basic_list_open, main->output.to.stream); - f_print_character(f_fss_basic_list_open_end, main->output.to.stream); + f_print_character(f_fss_basic_list_open_s[0], main->output.to.stream); + f_print_character(f_fss_basic_list_open_end_s[0], main->output.to.stream); } else { - f_print_character(f_fss_eol, main->output.to.stream); + f_print_character(f_fss_eol_s[0], main->output.to.stream); } } } @@ -365,7 +365,7 @@ extern "C" { void fss_basic_list_read_print_set_end(fss_basic_list_read_main_t * const main) { if (main->parameters[fss_basic_list_read_parameter_pipe].result == f_console_result_found) { - f_print_character(fss_basic_list_read_pipe_content_end, main->output.to.stream); + f_print_character(fss_basic_list_pipe_content_end_s, main->output.to.stream); } } #endif // _di_fss_basic_list_read_print_set_end_ @@ -391,7 +391,7 @@ extern "C" { if (F_status_is_error(status)) return status; // This standard does not support multiple content groups. - if ((data->option & fss_basic_list_read_data_option_select) && data->select) { + if ((data->option & fss_basic_list_read_data_option_select_d) && data->select) { if (main->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) { flockfile(main->output.to.stream); @@ -415,15 +415,15 @@ extern "C" { return fss_basic_list_read_process_at(main, data, names); } - if (data->option & fss_basic_list_read_data_option_columns) { + if (data->option & fss_basic_list_read_data_option_columns_d) { return fss_basic_list_read_process_columns(main, data, names); } - if (data->option & fss_basic_list_read_data_option_total) { + if (data->option & fss_basic_list_read_data_option_total_d) { return fss_basic_list_read_process_total(main, data, names); } - if (data->option & fss_basic_list_read_data_option_line) { + if (data->option & fss_basic_list_read_data_option_line_d) { return fss_basic_list_read_process_line(main, data, names); } @@ -431,7 +431,7 @@ extern "C" { f_array_lengths_t *delimits_object = fss_basic_list_read_delimit_object_is(0, data) ? &data->delimits_object : &except_none; f_array_lengths_t *delimits_content = fss_basic_list_read_delimit_content_is(0, data) ? &data->delimits_content : &except_none; - if (data->option & fss_basic_list_read_data_option_raw) { + if (data->option & fss_basic_list_read_data_option_raw_d) { delimits_object = &except_none; delimits_content = &except_none; } @@ -451,7 +451,7 @@ extern "C" { f_status_t fss_basic_list_read_process_at(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data, bool names[]) { if (data->depths.array[0].value_at >= data->objects.used) { - if (data->option & (fss_basic_list_read_data_option_columns | fss_basic_list_read_data_option_total)) { + if (data->option & (fss_basic_list_read_data_option_columns_d | fss_basic_list_read_data_option_total_d)) { flockfile(main->output.to.stream); fss_basic_list_read_print_zero(main); @@ -466,7 +466,7 @@ extern "C" { f_array_lengths_t *delimits_object = fss_basic_list_read_delimit_object_is(0, data) ? &data->delimits_object : &except_none; f_array_lengths_t *delimits_content = fss_basic_list_read_delimit_content_is(0, data) ? &data->delimits_content : &except_none; - if (data->option & fss_basic_list_read_data_option_raw) { + if (data->option & fss_basic_list_read_data_option_raw_d) { delimits_object = &except_none; delimits_content = &except_none; } @@ -479,16 +479,16 @@ extern "C" { if (!names[i]) continue; if (at == data->depths.array[0].value_at) { - if (data->option & fss_basic_list_read_data_option_line) { + if (data->option & fss_basic_list_read_data_option_line_d) { f_array_length_t line = 0; status = fss_basic_list_read_process_at_line(i, *delimits_object, *delimits_content, main, data, &line); if (status == F_success) return F_none; } - else if (data->option & fss_basic_list_read_data_option_columns) { + else if (data->option & fss_basic_list_read_data_option_columns_d) { fll_print_format("%ul%c", main->output.to.stream, data->contents.array[i].used, f_string_eol_s[0]); } - else if (data->option & fss_basic_list_read_data_option_total) { + else if (data->option & fss_basic_list_read_data_option_total_d) { flockfile(main->output.to.stream); if (data->contents.array[i].used) { @@ -510,7 +510,7 @@ extern "C" { ++at; } // for - if (data->option & fss_basic_list_read_data_option_total) { + if (data->option & fss_basic_list_read_data_option_total_d) { flockfile(main->output.to.stream); fss_basic_list_read_print_zero(main); @@ -525,7 +525,7 @@ extern "C" { #ifndef _di_fss_basic_list_read_process_columns_ f_status_t fss_basic_list_read_process_columns(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data, bool names[]) { - if (!(data->option & fss_basic_list_read_data_option_content)) { + if (!(data->option & fss_basic_list_read_data_option_content_d)) { flockfile(main->output.to.stream); fss_basic_list_read_print_zero(main); @@ -555,11 +555,11 @@ extern "C" { #ifndef _di_fss_basic_list_read_process_at_line_ f_status_t fss_basic_list_read_process_at_line(const f_array_length_t at, const f_array_lengths_t delimits_object, const f_array_lengths_t delimits_content, fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data, f_array_length_t *line) { - if (data->option & fss_basic_list_read_data_option_object) { + if (data->option & fss_basic_list_read_data_option_object_d) { if (*line == data->line) { flockfile(main->output.to.stream); - if (data->option & fss_basic_list_read_data_option_total) { + if (data->option & fss_basic_list_read_data_option_total_d) { fss_basic_list_read_print_one(main); } else { @@ -575,7 +575,7 @@ extern "C" { } // There is only a single Content column for this standard. - if (data->option & fss_basic_list_read_data_option_content) { + if (data->option & fss_basic_list_read_data_option_content_d) { if (!data->contents.array[at].used) { return F_none; } @@ -599,7 +599,7 @@ extern "C" { flockfile(main->output.to.stream); - if (data->option & fss_basic_list_read_data_option_total) { + if (data->option & fss_basic_list_read_data_option_total_d) { fss_basic_list_read_print_one(main); } else { @@ -626,7 +626,7 @@ extern "C" { if (*line == data->line) { flockfile(main->output.to.stream); - if (data->option & fss_basic_list_read_data_option_total) { + if (data->option & fss_basic_list_read_data_option_total_d) { fss_basic_list_read_print_one(main); } else { @@ -654,7 +654,7 @@ extern "C" { f_array_lengths_t *delimits_object = fss_basic_list_read_delimit_object_is(0, data) ? &data->delimits_object : &except_none; f_array_lengths_t *delimits_content = fss_basic_list_read_delimit_content_is(0, data) ? &data->delimits_content : &except_none; - if (data->option & fss_basic_list_read_data_option_raw) { + if (data->option & fss_basic_list_read_data_option_raw_d) { delimits_object = &except_none; delimits_content = &except_none; } @@ -706,58 +706,58 @@ extern "C" { f_status_t status = F_none; if (main->parameters[fss_basic_list_read_parameter_at].result == f_console_result_additional) { - data->option |= fss_basic_list_read_data_option_at; + data->option |= fss_basic_list_read_data_option_at_d; } if (main->parameters[fss_basic_list_read_parameter_columns].result == f_console_result_found) { - data->option |= fss_basic_list_read_data_option_columns; + data->option |= fss_basic_list_read_data_option_columns_d; } if (main->parameters[fss_basic_list_read_parameter_content].result == f_console_result_found) { - data->option |= fss_basic_list_read_data_option_content; + data->option |= fss_basic_list_read_data_option_content_d; } if (main->parameters[fss_basic_list_read_parameter_empty].result == f_console_result_found) { - data->option |= fss_basic_list_read_data_option_empty; + data->option |= fss_basic_list_read_data_option_empty_d; } if (main->parameters[fss_basic_list_read_parameter_line].result == f_console_result_additional) { - data->option |= fss_basic_list_read_data_option_line; + data->option |= fss_basic_list_read_data_option_line_d; - status = fss_basic_list_read_load_number(fss_basic_list_read_parameter_line, fss_basic_list_read_long_line, arguments, main, &data->line); + status = fss_basic_list_read_load_number(fss_basic_list_read_parameter_line, fss_basic_list_long_line_s, arguments, main, &data->line); if (F_status_is_error(status)) return status; } if (main->parameters[fss_basic_list_read_parameter_name].result == f_console_result_additional) { - data->option |= fss_basic_list_read_data_option_name; + data->option |= fss_basic_list_read_data_option_name_d; } if (main->parameters[fss_basic_list_read_parameter_object].result == f_console_result_found) { - data->option |= fss_basic_list_read_data_option_object; + data->option |= fss_basic_list_read_data_option_object_d; } if (main->parameters[fss_basic_list_read_parameter_raw].result == f_console_result_found) { - data->option |= fss_basic_list_read_data_option_raw; + data->option |= fss_basic_list_read_data_option_raw_d; } if (main->parameters[fss_basic_list_read_parameter_select].result == f_console_result_additional) { - data->option |= fss_basic_list_read_data_option_select; + data->option |= fss_basic_list_read_data_option_select_d; - status = fss_basic_list_read_load_number(fss_basic_list_read_parameter_select, fss_basic_list_read_long_select, arguments, main, &data->select); + status = fss_basic_list_read_load_number(fss_basic_list_read_parameter_select, fss_basic_list_long_select_s, arguments, main, &data->select); if (F_status_is_error(status)) return status; } if (main->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) { - data->option |= fss_basic_list_read_data_option_total; + data->option |= fss_basic_list_read_data_option_total_d; } if (main->parameters[fss_basic_list_read_parameter_trim].result == f_console_result_found) { - data->option |= fss_basic_list_read_data_option_trim; + data->option |= fss_basic_list_read_data_option_trim_d; } // Default to content if neither Object nor Content is explicitly requested. - if (!(data->option & (fss_basic_list_read_data_option_content | fss_basic_list_read_data_option_object))) { - data->option |= fss_basic_list_read_data_option_content; + if (!(data->option & (fss_basic_list_read_data_option_content_d | fss_basic_list_read_data_option_object_d))) { + data->option |= fss_basic_list_read_data_option_content_d; } return F_none; @@ -775,12 +775,12 @@ extern "C" { if (!names[at]) continue; - if (data->option & fss_basic_list_read_data_option_object) { + if (data->option & fss_basic_list_read_data_option_object_d) { ++total; } // There is only a single Content column for this standard. - if (data->option & fss_basic_list_read_data_option_content) { + if (data->option & fss_basic_list_read_data_option_content_d) { if (!data->contents.array[at].used) continue; @@ -812,7 +812,7 @@ extern "C" { flockfile(main->output.to.stream); - if (data->option & fss_basic_list_read_data_option_line) { + if (data->option & fss_basic_list_read_data_option_line_d) { if (data->line < total) { fss_basic_list_read_print_one(main); } diff --git a/level_3/fss_basic_list_read/c/private-fss_basic_list_read.h b/level_3/fss_basic_list_read/c/private-fss_basic_list_read.h index 84b7040..8fdc38b 100644 --- a/level_3/fss_basic_list_read/c/private-fss_basic_list_read.h +++ b/level_3/fss_basic_list_read/c/private-fss_basic_list_read.h @@ -25,7 +25,7 @@ extern "C" { * F_false if to not apply delimits. */ #ifndef _di_fss_basic_list_read_delimit_content_is_ - extern f_status_t fss_basic_list_read_delimit_content_is(const f_array_length_t depth, fss_basic_list_read_data_t * const data) f_attribute_visibility_internal; + extern f_status_t fss_basic_list_read_delimit_content_is(const f_array_length_t depth, fss_basic_list_read_data_t * const data) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_delimit_content_is_ /** @@ -41,7 +41,7 @@ extern "C" { * F_false if to not apply delimits. */ #ifndef _di_fss_basic_list_read_delimit_object_is_ - extern f_status_t fss_basic_list_read_delimit_object_is(const f_array_length_t depth, fss_basic_list_read_data_t * const data) f_attribute_visibility_internal; + extern f_status_t fss_basic_list_read_delimit_object_is(const f_array_length_t depth, fss_basic_list_read_data_t * const data) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_delimit_object_is_ /** @@ -72,7 +72,7 @@ extern "C" { * @see fss_basic_list_read_depths_resize() */ #ifndef _di_fss_basic_list_read_depth_process_ - extern f_status_t fss_basic_list_read_depth_process(f_console_arguments_t * const arguments, fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data) f_attribute_visibility_internal; + extern f_status_t fss_basic_list_read_depth_process(f_console_arguments_t * const arguments, fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_depth_process_ /** @@ -90,7 +90,7 @@ extern "C" { * On failure to identify, an empty string is returned. */ #ifndef _di_fss_basic_list_read_file_identify_ - extern f_string_t fss_basic_list_read_file_identify(const f_array_length_t at, const fss_basic_list_read_files_t files) f_attribute_visibility_internal; + extern f_string_t fss_basic_list_read_file_identify(const f_array_length_t at, const fss_basic_list_read_files_t files) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_file_identify_ /** @@ -116,7 +116,7 @@ extern "C" { * @see fss_basic_list_read_process_option() */ #ifndef _di_fss_basic_list_read_load_ - extern f_status_t fss_basic_list_read_load(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data) f_attribute_visibility_internal; + extern f_status_t fss_basic_list_read_load(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_load_ /** @@ -146,7 +146,7 @@ extern "C" { * @see fss_basic_list_read_depths_resize() */ #ifndef _di_fss_basic_list_read_load_number_ - extern f_status_t fss_basic_list_read_load_number(const f_array_length_t parameter, const f_string_t name, f_console_arguments_t * const arguments, fss_basic_list_read_main_t * const main, f_number_unsigned_t *number) f_attribute_visibility_internal; + extern f_status_t fss_basic_list_read_load_number(const f_array_length_t parameter, const f_string_t name, f_console_arguments_t * const arguments, fss_basic_list_read_main_t * const main, f_number_unsigned_t *number) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_load_number_ /** @@ -166,7 +166,7 @@ extern "C" { * The program data. */ #ifndef _di_fss_basic_list_read_print_at_ - extern void fss_basic_list_read_print_at(const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t * const data) f_attribute_visibility_internal; + extern void fss_basic_list_read_print_at(const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t * const data) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_print_at_ /** @@ -182,7 +182,7 @@ extern "C" { * The delimits to be applied to an Object. */ #ifndef _di_fss_basic_list_read_print_at_object_ - extern void fss_basic_list_read_print_at_object(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t * const data, const f_array_length_t at, const f_fss_delimits_t delimits_object) f_attribute_visibility_internal; + extern void fss_basic_list_read_print_at_object(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t * const data, const f_array_length_t at, const f_fss_delimits_t delimits_object) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_print_at_object_ /** @@ -194,7 +194,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_basic_list_read_print_content_ignore_ - extern void fss_basic_list_read_print_content_ignore(fss_basic_list_read_main_t * const main) f_attribute_visibility_internal; + extern void fss_basic_list_read_print_content_ignore(fss_basic_list_read_main_t * const main) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_print_content_ignore_ /** @@ -204,7 +204,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_basic_list_read_print_object_end_ - extern void fss_basic_list_read_print_object_end(fss_basic_list_read_main_t * const main) f_attribute_visibility_internal; + extern void fss_basic_list_read_print_object_end(fss_basic_list_read_main_t * const main) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_print_object_end_ /** @@ -214,7 +214,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_basic_list_read_print_one_ - extern void fss_basic_list_read_print_one(fss_basic_list_read_main_t * const main) f_attribute_visibility_internal; + extern void fss_basic_list_read_print_one(fss_basic_list_read_main_t * const main) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_print_one_ /** @@ -224,7 +224,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_basic_list_read_print_set_end_ - extern void fss_basic_list_read_print_set_end(fss_basic_list_read_main_t * const main) f_attribute_visibility_internal; + extern void fss_basic_list_read_print_set_end(fss_basic_list_read_main_t * const main) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_print_set_end_ /** @@ -234,7 +234,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_basic_list_read_print_zero_ - extern void fss_basic_list_read_print_zero(fss_basic_list_read_main_t * const main) f_attribute_visibility_internal; + extern void fss_basic_list_read_print_zero(fss_basic_list_read_main_t * const main) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_print_zero_ /** @@ -259,7 +259,7 @@ extern "C" { * @see fss_basic_list_read_process_option() */ #ifndef _di_fss_basic_list_read_process_ - extern f_status_t fss_basic_list_read_process(f_console_arguments_t * const arguments, fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data) f_attribute_visibility_internal; + extern f_status_t fss_basic_list_read_process(f_console_arguments_t * const arguments, fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_process_ /** @@ -279,7 +279,7 @@ extern "C" { * @see fss_basic_list_read_process_at_line() */ #ifndef _di_fss_basic_list_read_process_at_ - extern f_status_t fss_basic_list_read_process_at(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data, bool names[]) f_attribute_visibility_internal; + extern f_status_t fss_basic_list_read_process_at(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_process_at_ /** @@ -297,7 +297,7 @@ extern "C" { * F_none on success. */ #ifndef _di_fss_basic_list_read_process_columns_ - extern f_status_t fss_basic_list_read_process_columns(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data, bool names[]) f_attribute_visibility_internal; + extern f_status_t fss_basic_list_read_process_columns(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_process_columns_ /** @@ -320,7 +320,7 @@ extern "C" { * F_success on success and the line was matched (and possibly printed). */ #ifndef _di_fss_basic_list_read_process_at_line_ - extern f_status_t fss_basic_list_read_process_at_line(const f_array_length_t at, const f_array_lengths_t delimits_object, const f_array_lengths_t delimits_content, fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data, f_array_length_t *line) f_attribute_visibility_internal; + extern f_status_t fss_basic_list_read_process_at_line(const f_array_length_t at, const f_array_lengths_t delimits_object, const f_array_lengths_t delimits_content, fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data, f_array_length_t *line) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_process_at_line_ /** @@ -338,7 +338,7 @@ extern "C" { * F_none on success. */ #ifndef _di_fss_basic_list_read_process_line_ - extern f_status_t fss_basic_list_read_process_line(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data, bool names[]) f_attribute_visibility_internal; + extern f_status_t fss_basic_list_read_process_line(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_process_line_ /** @@ -356,7 +356,7 @@ extern "C" { * F_none on success. */ #ifndef _di_fss_basic_list_read_process_name_ - extern f_status_t fss_basic_list_read_process_name(fss_basic_list_read_data_t *data, bool names[]) f_attribute_visibility_internal; + extern f_status_t fss_basic_list_read_process_name(fss_basic_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_process_name_ /** @@ -379,7 +379,7 @@ extern "C" { * @see fss_basic_list_read_load_setting() */ #ifndef _di_fss_basic_list_read_process_option_ - extern f_status_t fss_basic_list_read_process_option(f_console_arguments_t * const arguments, fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data) f_attribute_visibility_internal; + extern f_status_t fss_basic_list_read_process_option(f_console_arguments_t * const arguments, fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_process_option_ /** @@ -397,7 +397,7 @@ extern "C" { * F_none on success. */ #ifndef _di_fss_basic_list_read_process_total_ - extern f_status_t fss_basic_list_read_process_total(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data, bool names[]) f_attribute_visibility_internal; + extern f_status_t fss_basic_list_read_process_total(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_read_process_total_ #ifdef __cplusplus diff --git a/level_3/fss_basic_list_write/c/fss_basic_list_write.c b/level_3/fss_basic_list_write/c/fss_basic_list_write.c index 78719b0..3bf697e 100644 --- a/level_3/fss_basic_list_write/c/fss_basic_list_write.c +++ b/level_3/fss_basic_list_write/c/fss_basic_list_write.c @@ -11,7 +11,7 @@ extern "C" { flockfile(file.stream); - fll_program_print_help_header(file, context, fss_basic_list_write_name_long, fss_basic_list_write_version); + fll_program_print_help_header(file, context, fss_basic_list_write_program_name_long_s, fss_basic_list_write_program_version_s); fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); @@ -25,17 +25,17 @@ extern "C" { f_print_character(f_string_eol_s[0], file.stream); - fll_program_print_help_option(file, context, fss_basic_list_write_short_file, fss_basic_list_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send file to."); - fll_program_print_help_option(file, context, fss_basic_list_write_short_content, fss_basic_list_write_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to file."); - fll_program_print_help_option(file, context, fss_basic_list_write_short_double, fss_basic_list_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); - fll_program_print_help_option(file, context, fss_basic_list_write_short_ignore, fss_basic_list_write_long_ignore, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content."); - fll_program_print_help_option(file, context, fss_basic_list_write_short_object, fss_basic_list_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to file."); - fll_program_print_help_option(file, context, fss_basic_list_write_short_partial, fss_basic_list_write_long_partial, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not file end of Object/Content character."); - fll_program_print_help_option(file, context, fss_basic_list_write_short_prepend, fss_basic_list_write_long_prepend, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content."); - fll_program_print_help_option(file, context, fss_basic_list_write_short_single, fss_basic_list_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); - fll_program_print_help_option(file, context, fss_basic_list_write_short_trim, fss_basic_list_write_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names."); + fll_program_print_help_option(file, context, fss_basic_list_write_short_file_s, fss_basic_list_write_long_file_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send file to."); + fll_program_print_help_option(file, context, fss_basic_list_write_short_content_s, fss_basic_list_write_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to file."); + fll_program_print_help_option(file, context, fss_basic_list_write_short_double_s, fss_basic_list_write_long_double_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); + fll_program_print_help_option(file, context, fss_basic_list_write_short_ignore_s, fss_basic_list_write_long_ignore_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content."); + fll_program_print_help_option(file, context, fss_basic_list_write_short_object_s, fss_basic_list_write_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to file."); + fll_program_print_help_option(file, context, fss_basic_list_write_short_partial_s, fss_basic_list_write_long_partial_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not file end of Object/Content character."); + fll_program_print_help_option(file, context, fss_basic_list_write_short_prepend_s, fss_basic_list_write_long_prepend_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content."); + fll_program_print_help_option(file, context, fss_basic_list_write_short_single_s, fss_basic_list_write_long_single_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); + fll_program_print_help_option(file, context, fss_basic_list_write_short_trim_s, fss_basic_list_write_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names."); - fll_program_print_help_usage(file, context, fss_basic_list_write_name, f_string_empty_s); + fll_program_print_help_usage(file, context, fss_basic_list_write_program_name_s, f_string_empty_s); fl_print_format(" The pipe uses the Backspace character '%[\\b%]' (%[U+0008%]) to designate the start of a Content.%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]); fl_print_format(" The pipe uses the Form Feed character '%[\\f%]' (%[U+000C%]) to designate the end of the last Content.%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]); @@ -44,10 +44,10 @@ extern "C" { fl_print_format(" or a Form Feed character '%[\\f%]' (%[U+000C%]).%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]); fl_print_format(" The end of the pipe represents the end of any Object or Content.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The FSS-0002 (Basic List) specification does not support quoted names, therefore the parameters '%[%s%s%]'", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_single, context.set.notable); - fl_print_format(" and '%[%s%s%]' do nothing.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_double, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" The FSS-0002 (Basic List) specification does not support quoted names, therefore the parameters '%[%s%s%]'", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_single_s, context.set.notable); + fl_print_format(" and '%[%s%s%]' do nothing.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_double_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" This program does not use the parameter '%[%s%s%]', which therefore does nothing.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_ignore, context.set.notable, f_string_eol_s[0]); + fl_print_format(" This program does not use the parameter '%[%s%s%]', which therefore does nothing.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_ignore_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" This parameter requires two values.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); funlockfile(file.stream); @@ -61,7 +61,7 @@ extern "C" { f_status_t status = F_none; { - const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_basic_list_write_total_parameters); + const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_basic_list_write_total_parameters_d); { f_console_parameter_id_t ids[3] = { fss_basic_list_write_parameter_no_color, fss_basic_list_write_parameter_light, fss_basic_list_write_parameter_dark }; @@ -134,7 +134,7 @@ extern "C" { } if (main->parameters[fss_basic_list_write_parameter_version].result == f_console_result_found) { - fll_program_print_version(main->output.to, fss_basic_list_write_version); + fll_program_print_version(main->output.to, fss_basic_list_write_program_version_s); fss_basic_list_write_main_delete(main); return status; @@ -142,9 +142,9 @@ extern "C" { f_file_t output = f_file_t_initialize; - output.id = f_type_descriptor_output; + output.id = F_type_descriptor_output_d; output.stream = main->output.to.stream; - output.flag = f_file_flag_create | f_file_flag_write_only | f_file_flag_append; + output.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d; output.size_read = main->output.to.size_read; output.size_write = main->output.to.size_write; @@ -155,7 +155,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_file, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_file_s, main->error.notable); fl_print_format("%[' may only be specified once.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -176,7 +176,7 @@ extern "C" { } } else if (main->parameters[fss_basic_list_write_parameter_file].result == f_console_result_found) { - fss_basic_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_basic_list_write_long_file); + fss_basic_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_basic_list_write_long_file_s); status = F_status_set_error(F_parameter); } } @@ -185,11 +185,11 @@ extern "C" { if (main->parameters[fss_basic_list_write_parameter_object].locations.used || main->parameters[fss_basic_list_write_parameter_content].locations.used) { if (main->parameters[fss_basic_list_write_parameter_object].locations.used) { if (main->parameters[fss_basic_list_write_parameter_object].locations.used != main->parameters[fss_basic_list_write_parameter_object].values.used) { - fss_basic_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_basic_list_write_long_object); + fss_basic_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_basic_list_write_long_object_s); status = F_status_set_error(F_parameter); } else if (main->parameters[fss_basic_list_write_parameter_content].locations.used != main->parameters[fss_basic_list_write_parameter_content].values.used) { - fss_basic_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_basic_list_write_long_content); + fss_basic_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_basic_list_write_long_content_s); status = F_status_set_error(F_parameter); } else if (main->parameters[fss_basic_list_write_parameter_object].locations.used != main->parameters[fss_basic_list_write_parameter_content].locations.used && main->parameters[fss_basic_list_write_parameter_partial].result == f_console_result_none) { @@ -202,11 +202,11 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_partial, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter only allows either the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_object, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_object_s, main->error.notable); fl_print_format("%[' parameter or the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_content, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_content_s, main->error.notable); fl_print_format("%[' parameter, but not both.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -234,9 +234,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sEach '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_object, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_object_s, main->error.notable); fl_print_format("%[' parameter must be specified before a '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_content, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -251,7 +251,7 @@ extern "C" { } else if (main->parameters[fss_basic_list_write_parameter_content].locations.used) { if (main->parameters[fss_basic_list_write_parameter_content].locations.used != main->parameters[fss_basic_list_write_parameter_content].values.used) { - fss_basic_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_basic_list_write_long_content); + fss_basic_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_basic_list_write_long_content_s); status = F_status_set_error(F_parameter); } else if (!main->parameters[fss_basic_list_write_parameter_partial].locations.used) { @@ -265,9 +265,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThis requires either piped data or the use of the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_object, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_object_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_content, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -282,7 +282,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThis '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_partial, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter cannot be used when processing a pipe.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -299,7 +299,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_prepend, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_prepend_s, main->error.notable); fl_print_format("%[' was specified, but no value was given.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -328,7 +328,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_prepend, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_prepend_s, main->error.notable); fl_print_format("%[' must only contain whitespace.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -344,7 +344,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_prepend, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_prepend_s, main->error.notable); fl_print_format("%[' must not be an empty string.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -361,7 +361,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_ignore, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_ignore_s, main->error.notable); fl_print_format("%[' was specified, but no values were given.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -377,7 +377,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_ignore, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_ignore_s, main->error.notable); fl_print_format("%[' requires two values.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -387,18 +387,18 @@ extern "C" { } } - f_fss_quote_t quote = f_fss_delimit_quote_double; + f_fss_quote_t quote = F_fss_delimit_quote_double_s; if (F_status_is_error_not(status)) { if (main->parameters[fss_basic_list_write_parameter_double].result == f_console_result_found) { if (main->parameters[fss_basic_list_write_parameter_single].result == f_console_result_found) { if (main->parameters[fss_basic_list_write_parameter_double].location < main->parameters[fss_basic_list_write_parameter_single].location) { - quote = f_fss_delimit_quote_single; + quote = F_fss_delimit_quote_single_s; } } } else if (main->parameters[fss_basic_list_write_parameter_single].result == f_console_result_found) { - quote = f_fss_delimit_quote_single; + quote = F_fss_delimit_quote_single_s; } } @@ -519,7 +519,7 @@ extern "C" { #ifndef _di_fss_basic_list_write_main_delete_ f_status_t fss_basic_list_write_main_delete(fss_basic_list_write_main_t *main) { - for (f_array_length_t i = 0; i < fss_basic_list_write_total_parameters; ++i) { + for (f_array_length_t i = 0; i < fss_basic_list_write_total_parameters_d; ++i) { macro_f_array_lengths_t_delete_simple(main->parameters[i].locations); macro_f_array_lengths_t_delete_simple(main->parameters[i].locations_sub); macro_f_array_lengths_t_delete_simple(main->parameters[i].values); diff --git a/level_3/fss_basic_list_write/c/fss_basic_list_write.h b/level_3/fss_basic_list_write/c/fss_basic_list_write.h index 97b1d08..4fff9b3 100644 --- a/level_3/fss_basic_list_write/c/fss_basic_list_write.h +++ b/level_3/fss_basic_list_write/c/fss_basic_list_write.h @@ -44,51 +44,51 @@ extern "C" { #endif -#ifndef _di_fss_basic_list_write_version_ - #define fss_basic_list_write_major_version f_string_ascii_0 - #define fss_basic_list_write_minor_version f_string_ascii_5 - #define fss_basic_list_write_micro_version f_string_ascii_6 +#ifndef _di_fss_basic_list_write_program_version_ + #define fss_basic_list_write_program_version_major F_string_ascii_0_s + #define fss_basic_list_write_program_version_minor F_string_ascii_5_s + #define fss_basic_list_write_program_version_micro F_string_ascii_6_s - #ifndef fss_basic_list_write_nano_version_prefix - #define fss_basic_list_write_nano_version_prefix + #ifndef fss_basic_list_write_program_version_nano_prefix + #define fss_basic_list_write_program_version_nano_prefix #endif - #ifndef fss_basic_list_write_nano_version - #define fss_basic_list_write_nano_version + #ifndef fss_basic_list_write_program_version_nano + #define fss_basic_list_write_program_version_nano #endif - #define fss_basic_list_write_version fss_basic_list_write_major_version f_string_ascii_period fss_basic_list_write_minor_version f_string_ascii_period fss_basic_list_write_micro_version fss_basic_list_write_nano_version_prefix fss_basic_list_write_nano_version -#endif // _di_fss_basic_list_write_version_ + #define fss_basic_list_write_program_version_s fss_basic_list_write_program_version_major F_string_ascii_period_s fss_basic_list_write_program_version_minor F_string_ascii_period_s fss_basic_list_write_program_version_micro fss_basic_list_write_program_version_nano_prefix fss_basic_list_write_program_version_nano +#endif // _di_fss_basic_list_write_program_version_ -#ifndef _di_fss_basic_list_write_name_ - #define fss_basic_list_write_name "fss_basic_list_write" - #define fss_basic_list_write_name_long "FSS Basic List Write" -#endif // _di_fss_basic_list_write_name_ +#ifndef _di_fss_basic_list_write_program_name_ + #define fss_basic_list_write_program_name_s "fss_basic_list_write" + #define fss_basic_list_write_program_name_long_s "FSS Basic List Write" +#endif // _di_fss_basic_list_write_program_name_ #ifndef _di_fss_basic_list_write_defines_ - #define fss_basic_list_write_pipe_content_end '\f' - #define fss_basic_list_write_pipe_content_ignore '\v' - #define fss_basic_list_write_pipe_content_start '\b' - - #define fss_basic_list_write_short_file "f" - #define fss_basic_list_write_short_content "c" - #define fss_basic_list_write_short_double "d" - #define fss_basic_list_write_short_ignore "I" - #define fss_basic_list_write_short_object "o" - #define fss_basic_list_write_short_partial "p" - #define fss_basic_list_write_short_prepend "P" - #define fss_basic_list_write_short_single "s" - #define fss_basic_list_write_short_trim "T" - - #define fss_basic_list_write_long_file "file" - #define fss_basic_list_write_long_content "content" - #define fss_basic_list_write_long_double "double" - #define fss_basic_list_write_long_ignore "ignore" - #define fss_basic_list_write_long_object "object" - #define fss_basic_list_write_long_partial "partial" - #define fss_basic_list_write_long_prepend "prepend" - #define fss_basic_list_write_long_single "single" - #define fss_basic_list_write_long_trim "trim" + #define fss_basic_list_write_pipe_content_end_s '\f' + #define fss_basic_list_write_pipe_content_ignore_s '\v' + #define fss_basic_list_write_pipe_content_start_s '\b' + + #define fss_basic_list_write_short_file_s "f" + #define fss_basic_list_write_short_content_s "c" + #define fss_basic_list_write_short_double_s "d" + #define fss_basic_list_write_short_ignore_s "I" + #define fss_basic_list_write_short_object_s "o" + #define fss_basic_list_write_short_partial_s "p" + #define fss_basic_list_write_short_prepend_s "P" + #define fss_basic_list_write_short_single_s "s" + #define fss_basic_list_write_short_trim_s "T" + + #define fss_basic_list_write_long_file_s "file" + #define fss_basic_list_write_long_content_s "content" + #define fss_basic_list_write_long_double_s "double" + #define fss_basic_list_write_long_ignore_s "ignore" + #define fss_basic_list_write_long_object_s "object" + #define fss_basic_list_write_long_partial_s "partial" + #define fss_basic_list_write_long_prepend_s "prepend" + #define fss_basic_list_write_long_single_s "single" + #define fss_basic_list_write_long_trim_s "trim" enum { fss_basic_list_write_parameter_help, @@ -123,23 +123,23 @@ extern "C" { f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(fss_basic_list_write_short_file, fss_basic_list_write_long_file, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_write_short_content, fss_basic_list_write_long_content, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_write_short_double, fss_basic_list_write_long_double, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_write_short_ignore, fss_basic_list_write_long_ignore, 0, 2, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_write_short_object, fss_basic_list_write_long_object, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_write_short_partial, fss_basic_list_write_long_partial, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_write_short_prepend, fss_basic_list_write_long_prepend, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_write_short_single, fss_basic_list_write_long_single, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_list_write_short_trim, fss_basic_list_write_long_trim, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_write_short_file_s, fss_basic_list_write_long_file_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_write_short_content_s, fss_basic_list_write_long_content_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_write_short_double_s, fss_basic_list_write_long_double_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_write_short_ignore_s, fss_basic_list_write_long_ignore_s, 0, 2, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_write_short_object_s, fss_basic_list_write_long_object_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_write_short_partial_s, fss_basic_list_write_long_partial_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_write_short_prepend_s, fss_basic_list_write_long_prepend_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_write_short_single_s, fss_basic_list_write_long_single_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_list_write_short_trim_s, fss_basic_list_write_long_trim_s, 0, 0, f_console_type_normal), \ } - #define fss_basic_list_write_total_parameters 18 + #define fss_basic_list_write_total_parameters_d 18 #endif // _di_fss_basic_list_write_defines_ #ifndef _di_fss_basic_list_write_main_t_ typedef struct { - f_console_parameter_t parameters[fss_basic_list_write_total_parameters]; + f_console_parameter_t parameters[fss_basic_list_write_total_parameters_d]; f_array_lengths_t remaining; bool process_pipe; diff --git a/level_3/fss_basic_list_write/c/main.c b/level_3/fss_basic_list_write/c/main.c index 48f6234..9c53f81 100644 --- a/level_3/fss_basic_list_write/c/main.c +++ b/level_3/fss_basic_list_write/c/main.c @@ -12,13 +12,13 @@ int main(const int argc, const f_string_t *argv) { const f_status_t status = fss_basic_list_write_main(arguments, &data); // flush output pipes before closing. - fflush(f_type_output); - fflush(f_type_error); + fflush(F_type_output_d); + fflush(F_type_error_d); // close all open file descriptors. - close(f_type_descriptor_output); - close(f_type_descriptor_input); - close(f_type_descriptor_error); + close(F_type_descriptor_output_d); + close(F_type_descriptor_input_d); + close(F_type_descriptor_error_d); if (F_status_is_error(status)) { return 1; diff --git a/level_3/fss_basic_list_write/c/private-common.h b/level_3/fss_basic_list_write/c/private-common.h index e568c72..2f8c598 100644 --- a/level_3/fss_basic_list_write/c/private-common.h +++ b/level_3/fss_basic_list_write/c/private-common.h @@ -20,8 +20,8 @@ extern "C" { * - small: An allocation step used for buffers that are anticipated to have small buffers. */ #ifndef _di_fss_basic_list_write_common_ - #define fss_basic_list_write_common_allocation_large 256 - #define fss_basic_list_write_common_allocation_small 16 + #define fss_basic_list_write_common_allocation_large_d 256 + #define fss_basic_list_write_common_allocation_small_d 16 #endif // _di_fss_basic_list_write_common_ #ifdef __cplusplus diff --git a/level_3/fss_basic_list_write/c/private-fss_basic_list_write.c b/level_3/fss_basic_list_write/c/private-fss_basic_list_write.c index 81c8477..90f1d76 100644 --- a/level_3/fss_basic_list_write/c/private-fss_basic_list_write.c +++ b/level_3/fss_basic_list_write/c/private-fss_basic_list_write.c @@ -16,11 +16,11 @@ extern "C" { flockfile(main.error.to.stream); fl_print_format("%c%[%sMust specify the '%]", main.error.to.stream, f_string_eol_s[0], main.error.context, main.error.prefix, main.error.context); - fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_object, main.error.notable); + fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_object_s, main.error.notable); fl_print_format("%[' parameter and the '%]", main.error.to.stream, main.error.context, main.error.prefix, main.error.context); - fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_content, main.error.notable); + fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_content_s, main.error.notable); fl_print_format("%[' parameter the same number of times when not specifying the '%]", main.error.to.stream, main.error.context, main.error.prefix, main.error.context); - fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_partial, main.error.notable); + fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_partial_s, main.error.notable); fl_print_format("%[' parameter.%]%c", main.error.to.stream, main.error.context, main.error.context, f_string_eol_s[0]); funlockfile(main.error.to.stream); @@ -65,7 +65,7 @@ extern "C" { f_status_t fss_basic_list_write_process(const fss_basic_list_write_main_t main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t *buffer) { f_status_t status = F_none; - f_state_t state = macro_f_state_t_initialize(fss_basic_list_write_common_allocation_large, fss_basic_list_write_common_allocation_small, 0, 0, 0, 0, 0); + f_state_t state = macro_f_state_t_initialize(fss_basic_list_write_common_allocation_large_d, fss_basic_list_write_common_allocation_small_d, 0, 0, 0, 0, 0); f_string_range_t range = f_string_range_t_initialize; if (object) { @@ -142,7 +142,7 @@ extern "C" { f_file_t input = f_file_t_initialize; - input.id = f_type_descriptor_input; + input.id = F_type_descriptor_input_d; input.size_read = 2048; f_array_length_t total = 0; @@ -197,19 +197,19 @@ extern "C" { for (; range.start <= range.stop; ++range.start) { - if (block.string[range.start] == fss_basic_list_write_pipe_content_start) { + if (block.string[range.start] == fss_basic_list_write_pipe_content_start_s) { state = 0x2; ++range.start; break; } - if (block.string[range.start] == fss_basic_list_write_pipe_content_end) { + if (block.string[range.start] == fss_basic_list_write_pipe_content_end_s) { state = 0x3; ++range.start; break; } - if (block.string[range.start] == fss_basic_list_write_pipe_content_ignore) { + if (block.string[range.start] == fss_basic_list_write_pipe_content_ignore_s) { // this is not used by objects. continue; } @@ -246,7 +246,7 @@ extern "C" { for (; range.start <= range.stop; ++range.start) { - if (block.string[range.start] == fss_basic_list_write_pipe_content_start) { + if (block.string[range.start] == fss_basic_list_write_pipe_content_start_s) { if (main.error.verbosity != f_console_verbosity_quiet) { fll_print_format("%c%[%sThis standard only supports one content per object.%]%c", main.error.to.stream, f_string_eol_s[0], main.error.context, main.error.prefix, main.error.context, f_string_eol_s[0]); } @@ -255,13 +255,13 @@ extern "C" { break; } - if (block.string[range.start] == fss_basic_list_write_pipe_content_end) { + if (block.string[range.start] == fss_basic_list_write_pipe_content_end_s) { state = 0x3; ++range.start; break; } - if (block.string[range.start] == fss_basic_list_write_pipe_content_ignore) { + if (block.string[range.start] == fss_basic_list_write_pipe_content_ignore_s) { // this is not used by this program. continue; } diff --git a/level_3/fss_basic_list_write/c/private-fss_basic_list_write.h b/level_3/fss_basic_list_write/c/private-fss_basic_list_write.h index f81a888..de4156c 100644 --- a/level_3/fss_basic_list_write/c/private-fss_basic_list_write.h +++ b/level_3/fss_basic_list_write/c/private-fss_basic_list_write.h @@ -19,7 +19,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_basic_list_write_error_parameter_same_times_print_ - void fss_basic_list_write_error_parameter_same_times_print(const fss_basic_list_write_main_t main) f_attribute_visibility_internal; + void fss_basic_list_write_error_parameter_same_times_print(const fss_basic_list_write_main_t main) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_write_error_parameter_same_times_print_ /** @@ -29,7 +29,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_basic_list_write_error_parameter_unsupported_eol_print_ - void fss_basic_list_write_error_parameter_unsupported_eol_print(const fss_basic_list_write_main_t main) f_attribute_visibility_internal; + void fss_basic_list_write_error_parameter_unsupported_eol_print(const fss_basic_list_write_main_t main) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_write_error_parameter_unsupported_eol_print_ /** @@ -43,7 +43,7 @@ extern "C" { * The parameter name, such as "help" in "--help". */ #ifndef _di_fss_basic_list_write_error_parameter_value_missing_print_ - void fss_basic_list_write_error_parameter_value_missing_print(const fss_basic_list_write_main_t main, const f_string_t symbol, const f_string_t parameter) f_attribute_visibility_internal; + void fss_basic_list_write_error_parameter_value_missing_print(const fss_basic_list_write_main_t main, const f_string_t symbol, const f_string_t parameter) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_write_error_parameter_value_missing_print_ /** @@ -70,7 +70,7 @@ extern "C" { * F_failure (with error bit) for any othe failure. */ #ifndef _di_fss_basic_list_write_process_ - extern f_status_t fss_basic_list_write_process(const fss_basic_list_write_main_t main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t *buffer) f_attribute_visibility_internal; + extern f_status_t fss_basic_list_write_process(const fss_basic_list_write_main_t main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_write_process_ /** @@ -91,7 +91,7 @@ extern "C" { * F_failure (with error bit) for any othe failure. */ #ifndef _di_fss_basic_list_write_process_pipe_ - extern f_status_t fss_basic_list_write_process_pipe(const fss_basic_list_write_main_t main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) f_attribute_visibility_internal; + extern f_status_t fss_basic_list_write_process_pipe(const fss_basic_list_write_main_t main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d; #endif // _di_fss_basic_list_write_process_pipe_ #ifdef __cplusplus diff --git a/level_3/fss_basic_read/c/fss_basic_read.c b/level_3/fss_basic_read/c/fss_basic_read.c index 92f40cb..1c5d3fa 100644 --- a/level_3/fss_basic_read/c/fss_basic_read.c +++ b/level_3/fss_basic_read/c/fss_basic_read.c @@ -11,7 +11,7 @@ extern "C" { flockfile(file.stream); - fll_program_print_help_header(file, context, fss_basic_read_name_long, fss_basic_read_version); + fll_program_print_help_header(file, context, fss_basic_read_program_name_long_s, fss_basic_read_program_version_s); fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); @@ -25,22 +25,22 @@ extern "C" { f_print_character(f_string_eol_s[0], file.stream); - fll_program_print_help_option(file, context, fss_basic_read_short_at, fss_basic_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric index."); - fll_program_print_help_option(file, context, fss_basic_read_short_content, fss_basic_read_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Content (default)."); - fll_program_print_help_option(file, context, fss_basic_read_short_columns, fss_basic_read_long_columns, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns."); - fll_program_print_help_option(file, context, fss_basic_read_short_delimit, fss_basic_read_long_delimit, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits."); - fll_program_print_help_option(file, context, fss_basic_read_short_depth, fss_basic_read_long_depth, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth."); - fll_program_print_help_option(file, context, fss_basic_read_short_empty, fss_basic_read_long_empty, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing."); - fll_program_print_help_option(file, context, fss_basic_read_short_line, fss_basic_read_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line."); - fll_program_print_help_option(file, context, fss_basic_read_short_name, fss_basic_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name."); - fll_program_print_help_option(file, context, fss_basic_read_short_object, fss_basic_read_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object."); - fll_program_print_help_option(file, context, fss_basic_read_short_pipe, fss_basic_read_long_pipe, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format."); - fll_program_print_help_option(file, context, fss_basic_read_short_raw, fss_basic_read_long_raw, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print with the original quotes and escapes."); - fll_program_print_help_option(file, context, fss_basic_read_short_select, fss_basic_read_long_select, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index."); - fll_program_print_help_option(file, context, fss_basic_read_short_total, fss_basic_read_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines."); - fll_program_print_help_option(file, context, fss_basic_read_short_trim, fss_basic_read_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print."); - - fll_program_print_help_usage(file, context, fss_basic_read_name, "filename(s)"); + fll_program_print_help_option(file, context, fss_basic_read_short_at_s, fss_basic_read_long_at_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric index."); + fll_program_print_help_option(file, context, fss_basic_read_short_content_s, fss_basic_read_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Content (default)."); + fll_program_print_help_option(file, context, fss_basic_read_short_columns_s, fss_basic_read_long_columns_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns."); + fll_program_print_help_option(file, context, fss_basic_read_short_delimit_s, fss_basic_read_long_delimit_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits."); + fll_program_print_help_option(file, context, fss_basic_read_short_depth_s, fss_basic_read_long_depth_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth."); + fll_program_print_help_option(file, context, fss_basic_read_short_empty_s, fss_basic_read_long_empty_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing."); + fll_program_print_help_option(file, context, fss_basic_read_short_line_s, fss_basic_read_long_line_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line."); + fll_program_print_help_option(file, context, fss_basic_read_short_name_s, fss_basic_read_long_name_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name."); + fll_program_print_help_option(file, context, fss_basic_read_short_object_s, fss_basic_read_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object."); + fll_program_print_help_option(file, context, fss_basic_read_short_pipe_s, fss_basic_read_long_pipe_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format."); + fll_program_print_help_option(file, context, fss_basic_read_short_raw_s, fss_basic_read_long_raw_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print with the original quotes and escapes."); + fll_program_print_help_option(file, context, fss_basic_read_short_select_s, fss_basic_read_long_select_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index."); + fll_program_print_help_option(file, context, fss_basic_read_short_total_s, fss_basic_read_long_total_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines."); + fll_program_print_help_option(file, context, fss_basic_read_short_trim_s, fss_basic_read_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print."); + + fll_program_print_help_usage(file, context, fss_basic_read_program_name_s, "filename(s)"); fl_print_format(" %[Notes:%]%c", file.stream, context.set.important, context.set.important, f_string_eol_s[0]); @@ -49,63 +49,63 @@ extern "C" { fl_print_format(" All numeric positions (indexes) start at 0 instead of 1.%c", file.stream, f_string_eol_s[0]); fl_print_format(" For example, a file of 17 lines would range from 0 to 16.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" When using the %[%s%s%] option, an order of operations is enforced on the parameters.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth, context.set.notable, f_string_eol_s[0]); + fl_print_format(" When using the %[%s%s%] option, an order of operations is enforced on the parameters.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", file.stream, f_string_eol_s[0]); - fl_print_format(" %[%s%s%]: An Object index at the specified depth.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_at, context.set.notable, f_string_eol_s[0]); - fl_print_format(" %[%s%s%]: A new depth within the specified depth, indexed from the root.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth, context.set.notable, f_string_eol_s[0]); - fl_print_format(" %[%s%s%]: An Object name at the specified depth.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" %[%s%s%]: An Object index at the specified depth.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_at_s, context.set.notable, f_string_eol_s[0]); + fl_print_format(" %[%s%s%]: A new depth within the specified depth, indexed from the root.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth_s, context.set.notable, f_string_eol_s[0]); + fl_print_format(" %[%s%s%]: An Object name at the specified depth.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_name_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameter %[%s%s%] must be in numeric order, but values in between may be skipped.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth, context.set.notable, f_string_eol_s[0]); + fl_print_format(" The parameter %[%s%s%] must be in numeric order, but values in between may be skipped.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%c", file.stream, f_string_eol_s[0]); fl_print_format(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameter %[%s%s%] selects a Content column.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_select, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" The parameter %[%s%s%] selects a Content column.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_select_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" Specify both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_object, context.set.notable); - fl_print_format(" and the %[%s%s%] parameters to get the total objects.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_total, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" Specify both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_object_s, context.set.notable); + fl_print_format(" and the %[%s%s%] parameters to get the total objects.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_total_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" When both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_at, context.set.notable); - fl_print_format(" and %[%s%s%] parameters are specified (at the same depth),", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_name, context.set.notable); - fl_print_format(" the %[%s%s%] parameter value will be treated as a position relative to the specified", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_at, context.set.notable); - fl_print_format(" %[%s%s%] parameter value.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" When both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_at_s, context.set.notable); + fl_print_format(" and %[%s%s%] parameters are specified (at the same depth),", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_name_s, context.set.notable); + fl_print_format(" the %[%s%s%] parameter value will be treated as a position relative to the specified", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_at_s, context.set.notable); + fl_print_format(" %[%s%s%] parameter value.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_name_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" This program may support parameters, such as %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth, context.set.notable); - fl_print_format(" or %[%s%s%], even if not supported by the standard.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_select, context.set.notable, f_string_eol_s[0]); + fl_print_format(" This program may support parameters, such as %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth_s, context.set.notable); + fl_print_format(" or %[%s%s%], even if not supported by the standard.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_select_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" This is done to help ensure consistency for scripting.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth, context.set.notable); + fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth_s, context.set.notable); fl_print_format(" if the standard doesn't support nested Content, then only a depth of 0 would be valid.%c", file.stream, f_string_eol_s[0]); - fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_select, context.set.notable); + fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_select_s, context.set.notable); fl_print_format(" if the standard doesn't support multiple Content groups, then only a select of 0 would be valid.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameter %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_trim, context.set.notable); + fl_print_format(" The parameter %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_trim_s, context.set.notable); fl_print_format(" will remove leading and trailing whitespaces when selecting objects or when printing objects.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" When specifying both the %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_object, context.set.notable); - fl_print_format(" parameter and the %[%s%s%] parameter, the entire Object and Content are printed, including the formatting.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_content, context.set.notable, f_string_eol_s[0]); + fl_print_format(" When specifying both the %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_object_s, context.set.notable); + fl_print_format(" parameter and the %[%s%s%] parameter, the entire Object and Content are printed, including the formatting.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_content_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" Both the Object and Content printed are already escaped.%c", file.stream, f_string_eol_s[0]); fl_print_format(" Both the Object and Content are separated by a space.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameter %[%s%s%] accepts the following:%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_delimit, context.set.notable, f_string_eol_s[0]); - fl_print_format(" - %[%s%]: Do not apply delimits.%c", file.stream, context.set.notable, fss_basic_read_delimit_mode_name_none, context.set.notable, f_string_eol_s[0]); - fl_print_format(" - %[%s%]: (default) Apply all delimits.%c", file.stream, context.set.notable, fss_basic_read_delimit_mode_name_all, context.set.notable, f_string_eol_s[0]); - fl_print_format(" - %[%s%]: Apply delimits for Objects.%c", file.stream, context.set.notable, fss_basic_read_delimit_mode_name_object, context.set.notable, f_string_eol_s[0]); + fl_print_format(" The parameter %[%s%s%] accepts the following:%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_delimit_s, context.set.notable, f_string_eol_s[0]); + fl_print_format(" - %[%s%]: Do not apply delimits.%c", file.stream, context.set.notable, fss_basic_read_delimit_mode_name_none_s, context.set.notable, f_string_eol_s[0]); + fl_print_format(" - %[%s%]: (default) Apply all delimits.%c", file.stream, context.set.notable, fss_basic_read_delimit_mode_name_all_s, context.set.notable, f_string_eol_s[0]); + fl_print_format(" - %[%s%]: Apply delimits for Objects.%c", file.stream, context.set.notable, fss_basic_read_delimit_mode_name_object_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" - A number, 0 or greater: apply delimits for Content at the specified depth.%c", file.stream, f_string_eol_s[0]); - fl_print_format(" - A number, 0 or greater, followed by a %[%s%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%c", file.stream, context.set.notable, fss_basic_read_delimit_mode_name_greater, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" - A number, 0 or lesser, followed by a %[%s%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%c%c", file.stream, context.set.notable, fss_basic_read_delimit_mode_name_lesser, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" - A number, 0 or greater, followed by a %[%s%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%c", file.stream, context.set.notable, fss_basic_read_delimit_mode_name_greater_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" - A number, 0 or lesser, followed by a %[%s%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%c%c", file.stream, context.set.notable, fss_basic_read_delimit_mode_name_lesser_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The %[%s%s%] parameter may be specified multiple times to customize the delimit behavior.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_delimit, context.set.notable, f_string_eol_s[0]); + fl_print_format(" The %[%s%s%] parameter may be specified multiple times to customize the delimit behavior.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_delimit_s, context.set.notable, f_string_eol_s[0]); - fl_print_format(" The %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_delimit, context.set.notable); - fl_print_format(" values %[%s%]", file.stream, context.set.notable, fss_basic_read_delimit_mode_name_none, context.set.notable); - fl_print_format(" and %[%s%],", file.stream, context.set.notable, fss_basic_read_delimit_mode_name_all, context.set.notable); + fl_print_format(" The %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_delimit_s, context.set.notable); + fl_print_format(" values %[%s%]", file.stream, context.set.notable, fss_basic_read_delimit_mode_name_none_s, context.set.notable); + fl_print_format(" and %[%s%],", file.stream, context.set.notable, fss_basic_read_delimit_mode_name_all_s, context.set.notable); fl_print_format(" overrule all other delimit values.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameters %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_columns, context.set.notable); - fl_print_format(" and %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_select, context.set.notable); + fl_print_format(" The parameters %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_columns_s, context.set.notable); + fl_print_format(" and %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_select_s, context.set.notable); fl_print_format(" refer to a Content column.%c", file.stream, f_string_eol_s[0]); fl_print_format(" The word \"column\" is being loosely defined to refer to a specific Content.%c", file.stream, f_string_eol_s[0]); fl_print_format(" This is not to be confused with a depth.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); @@ -122,7 +122,7 @@ extern "C" { f_status_t status = F_none; { - const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_basic_read_total_parameters); + const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_basic_read_total_parameters_d); { f_console_parameter_id_t ids[3] = { fss_basic_read_parameter_no_color, fss_basic_read_parameter_light, fss_basic_read_parameter_dark }; @@ -197,7 +197,7 @@ extern "C" { } if (main->parameters[fss_basic_read_parameter_version].result == f_console_result_found) { - fll_program_print_version(main->output.to, fss_basic_read_version); + fll_program_print_version(main->output.to, fss_basic_read_program_version_s); fss_basic_read_main_delete(main); return status; @@ -223,12 +223,12 @@ extern "C" { }; const f_string_t parameter_name[] = { - fss_basic_read_long_at, - fss_basic_read_long_depth, - fss_basic_read_long_line, - fss_basic_read_long_select, - fss_basic_read_long_name, - fss_basic_read_long_delimit, + fss_basic_read_long_at_s, + fss_basic_read_long_depth_s, + fss_basic_read_long_line_s, + fss_basic_read_long_select_s, + fss_basic_read_long_name_s, + fss_basic_read_long_delimit_s, }; const f_string_t message_positive_number = "positive number"; @@ -271,11 +271,11 @@ extern "C" { }; const f_string_t parameter_name[] = { - fss_basic_read_long_depth, - fss_basic_read_long_line, - fss_basic_read_long_pipe, - fss_basic_read_long_select, - fss_basic_read_long_total, + fss_basic_read_long_depth_s, + fss_basic_read_long_line_s, + fss_basic_read_long_pipe_s, + fss_basic_read_long_select_s, + fss_basic_read_long_total_s, }; const uint8_t parameter_match[] = { @@ -292,7 +292,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_columns, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_columns_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, parameter_name[i], main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); @@ -310,9 +310,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_pipe, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_pipe_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_total, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_total_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -323,9 +323,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_pipe, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_pipe_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_line, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_line_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -350,7 +350,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_delimit, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_delimit_s, main->error.notable); fl_print_format("%[' must not be empty.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -358,13 +358,13 @@ extern "C" { status = F_status_set_error(F_parameter); break; } - else if (fl_string_compare(arguments->argv[location], fss_basic_read_delimit_mode_name_none, length, fss_basic_read_delimit_mode_name_none_length) == F_equal_to) { + else if (fl_string_compare(arguments->argv[location], fss_basic_read_delimit_mode_name_none_s, length, fss_basic_read_delimit_mode_name_none_s_length) == F_equal_to) { data.delimit_mode = fss_basic_read_delimit_mode_none; } - else if (fl_string_compare(arguments->argv[location], fss_basic_read_delimit_mode_name_all, length, fss_basic_read_delimit_mode_name_all_length) == F_equal_to) { + else if (fl_string_compare(arguments->argv[location], fss_basic_read_delimit_mode_name_all_s, length, fss_basic_read_delimit_mode_name_all_s_length) == F_equal_to) { data.delimit_mode = fss_basic_read_delimit_mode_all; } - else if (fl_string_compare(arguments->argv[location], fss_basic_read_delimit_mode_name_object, length, fss_basic_read_delimit_mode_name_object_length) == F_equal_to) { + else if (fl_string_compare(arguments->argv[location], fss_basic_read_delimit_mode_name_object_s, length, fss_basic_read_delimit_mode_name_object_s_length) == F_equal_to) { switch (data.delimit_mode) { case 0: data.delimit_mode = fss_basic_read_delimit_mode_object; @@ -401,7 +401,7 @@ extern "C" { data.delimit_mode = fss_basic_read_delimit_mode_content_object; } - if (arguments->argv[location][length - 1] == fss_basic_read_delimit_mode_name_greater[0]) { + if (arguments->argv[location][length - 1] == fss_basic_read_delimit_mode_name_greater_s[0]) { if (!(data.delimit_mode == fss_basic_read_delimit_mode_none || data.delimit_mode == fss_basic_read_delimit_mode_all)) { if (data.delimit_mode == fss_basic_read_delimit_mode_content_object) { data.delimit_mode = fss_basic_read_delimit_mode_content_greater_object; @@ -414,7 +414,7 @@ extern "C" { // Shorten the length to better convert the remainder to a number. --length; } - else if (arguments->argv[location][length - 1] == fss_basic_read_delimit_mode_name_lesser[0]) { + else if (arguments->argv[location][length - 1] == fss_basic_read_delimit_mode_name_lesser_s[0]) { if (!(data.delimit_mode == fss_basic_read_delimit_mode_none || data.delimit_mode == fss_basic_read_delimit_mode_all)) { if (data.delimit_mode == fss_basic_read_delimit_mode_content_object) { data.delimit_mode = fss_basic_read_delimit_mode_content_lesser_object; @@ -438,7 +438,7 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments->argv[location], range, &data.delimit_depth); if (F_status_is_error(status)) { - fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_read_long_delimit, arguments->argv[location]); + fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_read_long_delimit_s, arguments->argv[location]); break; } @@ -483,7 +483,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_select, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_select_s, main->error.notable); fl_print_format("%[' parameter requires a positive number.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -502,8 +502,8 @@ extern "C" { if (F_status_is_error_not(status) && main->process_pipe) { f_file_t file = f_file_t_initialize; - file.id = f_type_descriptor_input; - file.stream = f_type_input; + file.id = F_type_descriptor_input_d; + file.stream = F_type_input_d; data.files.array[0].name = 0; data.files.array[0].range.start = 0; @@ -616,7 +616,7 @@ extern "C" { #ifndef _di_fss_basic_read_main_delete_ f_status_t fss_basic_read_main_delete(fss_basic_read_main_t *main) { - for (f_array_length_t i = 0; i < fss_basic_read_total_parameters; ++i) { + for (f_array_length_t i = 0; i < fss_basic_read_total_parameters_d; ++i) { macro_f_array_lengths_t_delete_simple(main->parameters[i].locations); macro_f_array_lengths_t_delete_simple(main->parameters[i].locations_sub); macro_f_array_lengths_t_delete_simple(main->parameters[i].values); diff --git a/level_3/fss_basic_read/c/fss_basic_read.h b/level_3/fss_basic_read/c/fss_basic_read.h index 4d1a614..9573bde 100644 --- a/level_3/fss_basic_read/c/fss_basic_read.h +++ b/level_3/fss_basic_read/c/fss_basic_read.h @@ -50,61 +50,61 @@ extern "C" { #endif -#ifndef _di_fss_basic_read_version_ - #define fss_basic_read_major_version f_string_ascii_0 - #define fss_basic_read_minor_version f_string_ascii_5 - #define fss_basic_read_micro_version f_string_ascii_6 +#ifndef _di_fss_basic_read_program_version_ + #define fss_basic_read_program_version_major_s F_string_ascii_0_s + #define fss_basic_read_program_version_minor_s F_string_ascii_5_s + #define fss_basic_read_program_version_micro_s F_string_ascii_6_s - #ifndef fss_basic_read_nano_version_prefix - #define fss_basic_read_nano_version_prefix + #ifndef fss_basic_read_program_version_nano_prefix_s + #define fss_basic_read_program_version_nano_prefix_s #endif - #ifndef fss_basic_read_nano_version - #define fss_basic_read_nano_version + #ifndef fss_basic_read_program_version_nano_s + #define fss_basic_read_program_version_nano_s #endif - #define fss_basic_read_version fss_basic_read_major_version f_string_ascii_period fss_basic_read_minor_version f_string_ascii_period fss_basic_read_micro_version fss_basic_read_nano_version_prefix fss_basic_read_nano_version -#endif // _di_fss_basic_read_version_ + #define fss_basic_read_program_version_s fss_basic_read_program_version_major_s F_string_ascii_period_s fss_basic_read_program_version_minor_s F_string_ascii_period_s fss_basic_read_program_version_micro_s fss_basic_read_program_version_nano_prefix_s fss_basic_read_program_version_nano_s +#endif // _di_fss_basic_read_program_version_ -#ifndef _di_fss_basic_read_name_ - #define fss_basic_read_name "fss_basic_read" - #define fss_basic_read_name_long "FSS Basic Read" -#endif // _di_fss_basic_read_name_ +#ifndef _di_fss_basic_read_program_name_ + #define fss_basic_read_program_name_s "fss_basic_read" + #define fss_basic_read_program_name_long_s "FSS Basic Read" +#endif // _di_fss_basic_read_program_name_ #ifndef _di_fss_basic_read_defines_ - #define fss_basic_read_pipe_content_end '\f' - #define fss_basic_read_pipe_content_ignore '\v' - #define fss_basic_read_pipe_content_start '\b' + #define fss_basic_read_pipe_content_end_s '\f' + #define fss_basic_read_pipe_content_ignore_s '\v' + #define fss_basic_read_pipe_content_start_s '\b' - #define fss_basic_read_short_at "a" - #define fss_basic_read_short_content "c" - #define fss_basic_read_short_columns "C" - #define fss_basic_read_short_delimit "D" - #define fss_basic_read_short_depth "d" - #define fss_basic_read_short_empty "e" - #define fss_basic_read_short_line "l" - #define fss_basic_read_short_name "n" - #define fss_basic_read_short_object "o" - #define fss_basic_read_short_pipe "p" - #define fss_basic_read_short_raw "R" - #define fss_basic_read_short_select "s" - #define fss_basic_read_short_total "t" - #define fss_basic_read_short_trim "T" + #define fss_basic_read_short_at_s "a" + #define fss_basic_read_short_content_s "c" + #define fss_basic_read_short_columns_s "C" + #define fss_basic_read_short_delimit_s "D" + #define fss_basic_read_short_depth_s "d" + #define fss_basic_read_short_empty_s "e" + #define fss_basic_read_short_line_s "l" + #define fss_basic_read_short_name_s "n" + #define fss_basic_read_short_object_s "o" + #define fss_basic_read_short_pipe_s "p" + #define fss_basic_read_short_raw_s "R" + #define fss_basic_read_short_select_s "s" + #define fss_basic_read_short_total_s "t" + #define fss_basic_read_short_trim_s "T" - #define fss_basic_read_long_at "at" - #define fss_basic_read_long_content "content" - #define fss_basic_read_long_columns "columns" - #define fss_basic_read_long_delimit "delimit" - #define fss_basic_read_long_depth "depth" - #define fss_basic_read_long_empty "empty" - #define fss_basic_read_long_line "line" - #define fss_basic_read_long_name "name" - #define fss_basic_read_long_object "object" - #define fss_basic_read_long_pipe "pipe" - #define fss_basic_read_long_raw "raw" - #define fss_basic_read_long_select "select" - #define fss_basic_read_long_total "total" - #define fss_basic_read_long_trim "trim" + #define fss_basic_read_long_at_s "at" + #define fss_basic_read_long_content_s "content" + #define fss_basic_read_long_columns_s "columns" + #define fss_basic_read_long_delimit_s "delimit" + #define fss_basic_read_long_depth_s "depth" + #define fss_basic_read_long_empty_s "empty" + #define fss_basic_read_long_line_s "line" + #define fss_basic_read_long_name_s "name" + #define fss_basic_read_long_object_s "object" + #define fss_basic_read_long_pipe_s "pipe" + #define fss_basic_read_long_raw_s "raw" + #define fss_basic_read_long_select_s "select" + #define fss_basic_read_long_total_s "total" + #define fss_basic_read_long_trim_s "trim" enum { fss_basic_read_parameter_help, @@ -144,23 +144,23 @@ extern "C" { f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(fss_basic_read_short_at, fss_basic_read_long_at, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_content, fss_basic_read_long_content, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_columns, fss_basic_read_long_columns, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_delimit, fss_basic_read_long_delimit, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_depth, fss_basic_read_long_depth, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_empty, fss_basic_read_long_empty, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_line, fss_basic_read_long_line, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_name, fss_basic_read_long_name, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_object, fss_basic_read_long_object, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_pipe, fss_basic_read_long_pipe, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_raw, fss_basic_read_long_raw, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_select, fss_basic_read_long_select, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_total, fss_basic_read_long_total, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_read_short_trim, fss_basic_read_long_trim, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_read_short_at_s, fss_basic_read_long_at_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_read_short_content_s, fss_basic_read_long_content_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_read_short_columns_s, fss_basic_read_long_columns_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_read_short_delimit_s, fss_basic_read_long_delimit_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_read_short_depth_s, fss_basic_read_long_depth_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_read_short_empty_s, fss_basic_read_long_empty_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_read_short_line_s, fss_basic_read_long_line_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_read_short_name_s, fss_basic_read_long_name_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_read_short_object_s, fss_basic_read_long_object_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_read_short_pipe_s, fss_basic_read_long_pipe_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_read_short_raw_s, fss_basic_read_long_raw_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_read_short_select_s, fss_basic_read_long_select_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_read_short_total_s, fss_basic_read_long_total_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_read_short_trim_s, fss_basic_read_long_trim_s, 0, 0, f_console_type_normal), \ } - #define fss_basic_read_total_parameters 23 + #define fss_basic_read_total_parameters_d 23 #endif // _di_fss_basic_read_defines_ /** @@ -177,17 +177,17 @@ extern "C" { * - object: Objects arre to have delimits applied. */ #ifndef _di_fss_basic_read_delimit_mode_ - #define fss_basic_read_delimit_mode_name_none "none" - #define fss_basic_read_delimit_mode_name_all "all" - #define fss_basic_read_delimit_mode_name_object "object" - #define fss_basic_read_delimit_mode_name_greater "+" - #define fss_basic_read_delimit_mode_name_lesser "-" + #define fss_basic_read_delimit_mode_name_none_s "none" + #define fss_basic_read_delimit_mode_name_all_s "all" + #define fss_basic_read_delimit_mode_name_object_s "object" + #define fss_basic_read_delimit_mode_name_greater_s "+" + #define fss_basic_read_delimit_mode_name_lesser_s "-" - #define fss_basic_read_delimit_mode_name_none_length 4 - #define fss_basic_read_delimit_mode_name_all_length 3 - #define fss_basic_read_delimit_mode_name_object_length 6 - #define fss_basic_read_delimit_mode_name_greater_length 1 - #define fss_basic_read_delimit_mode_name_lesser_length 1 + #define fss_basic_read_delimit_mode_name_none_s_length 4 + #define fss_basic_read_delimit_mode_name_all_s_length 3 + #define fss_basic_read_delimit_mode_name_object_s_length 6 + #define fss_basic_read_delimit_mode_name_greater_s_length 1 + #define fss_basic_read_delimit_mode_name_lesser_s_length 1 enum { fss_basic_read_delimit_mode_none = 1, @@ -204,7 +204,7 @@ extern "C" { #ifndef _di_fss_basic_read_main_t_ typedef struct { - f_console_parameter_t parameters[fss_basic_read_total_parameters]; + f_console_parameter_t parameters[fss_basic_read_total_parameters_d]; f_array_lengths_t remaining; bool process_pipe; diff --git a/level_3/fss_basic_read/c/main.c b/level_3/fss_basic_read/c/main.c index 844654a..eac565f 100644 --- a/level_3/fss_basic_read/c/main.c +++ b/level_3/fss_basic_read/c/main.c @@ -12,13 +12,13 @@ int main(const int argc, const f_string_t *argv) { const f_status_t status = fss_basic_read_main(&arguments, &data); // flush output pipes before closing. - fflush(f_type_output); - fflush(f_type_error); + fflush(F_type_output_d); + fflush(F_type_error_d); // close all open file descriptors. - close(f_type_descriptor_output); - close(f_type_descriptor_input); - close(f_type_descriptor_error); + close(F_type_descriptor_output_d); + close(F_type_descriptor_input_d); + close(F_type_descriptor_error_d); if (F_status_is_error(status)) { return 1; diff --git a/level_3/fss_basic_read/c/private-common.h b/level_3/fss_basic_read/c/private-common.h index b43aa57..b769cdc 100644 --- a/level_3/fss_basic_read/c/private-common.h +++ b/level_3/fss_basic_read/c/private-common.h @@ -20,8 +20,8 @@ extern "C" { * - small: An allocation step used for buffers that are anticipated to have small buffers. */ #ifndef _di_fss_basic_read_common_ - #define fss_basic_read_common_allocation_large 256 - #define fss_basic_read_common_allocation_small 16 + #define fss_basic_read_common_allocation_large_d 256 + #define fss_basic_read_delimit_common_allocation_small_d 16 #endif // _di_fss_basic_read_common_ /** @@ -206,7 +206,7 @@ extern "C" { * The data to deallocate. */ #ifndef _di_fss_basic_read_data_delete_simple_ - extern void fss_basic_read_data_delete_simple(fss_basic_read_data_t *data) f_attribute_visibility_internal; + extern void fss_basic_read_data_delete_simple(fss_basic_read_data_t *data) F_attribute_visibility_internal_d; #endif // _di_fss_basic_read_data_delete_simple_ /** @@ -216,7 +216,7 @@ extern "C" { * The depth to deallocate. */ #ifndef _di_fss_basic_read_depth_delete_simple_ - extern void fss_basic_read_depth_delete_simple(fss_basic_read_depth_t *depth) f_attribute_visibility_internal; + extern void fss_basic_read_depth_delete_simple(fss_basic_read_depth_t *depth) F_attribute_visibility_internal_d; #endif // _di_fss_basic_read_depth_delete_simple_ /** @@ -240,7 +240,7 @@ extern "C" { * @see fss_basic_read_depths_increase() */ #ifndef _di_fss_basic_read_depths_resize_ - extern f_status_t fss_basic_read_depths_resize(const f_array_length_t length, fss_basic_read_depths_t *depths) f_attribute_visibility_internal; + extern f_status_t fss_basic_read_depths_resize(const f_array_length_t length, fss_basic_read_depths_t *depths) F_attribute_visibility_internal_d; #endif // _di_fss_basic_read_depths_resize_ #ifdef __cplusplus diff --git a/level_3/fss_basic_read/c/private-fss_basic_read.c b/level_3/fss_basic_read/c/private-fss_basic_read.c index 9abe7cd..9584e55 100644 --- a/level_3/fss_basic_read/c/private-fss_basic_read.c +++ b/level_3/fss_basic_read/c/private-fss_basic_read.c @@ -80,7 +80,7 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments->argv[position_depth], range, &data->depths.array[i].depth); if (F_status_is_error(status)) { - fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_read_long_depth, arguments->argv[position_depth]); + fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_read_long_depth_s, arguments->argv[position_depth]); return status; } @@ -104,7 +104,7 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments->argv[data->depths.array[i].index_at], range, &data->depths.array[i].value_at); if (F_status_is_error(status)) { - fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_read_long_at, arguments->argv[data->depths.array[i].index_at]); + fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_read_long_at_s, arguments->argv[data->depths.array[i].index_at]); return status; } @@ -151,7 +151,7 @@ extern "C" { fl_print_format("%c%[%sThe value '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); fl_print_format("%[%ul%]", main->error.to.stream, main->error.notable, data->depths.array[i].depth, main->error.notable); fl_print_format("%[' may only be specified once for the parameter '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth_s, main->error.notable); fl_print_format("%['.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -164,7 +164,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth_s, main->error.notable); fl_print_format("%[' may not have the value '%]", main->error.to.stream, main->error.context, main->error.context); fl_print_format("%[%ul%]", main->error.to.stream, main->error.notable, data->depths.array[i].depth, main->error.notable); fl_print_format("%[' before the value '%]", main->error.to.stream, main->error.context, main->error.context); @@ -200,7 +200,7 @@ extern "C" { #ifndef _di_fss_basic_read_load_ f_status_t fss_basic_read_load(fss_basic_read_main_t * const main, fss_basic_read_data_t *data) { - f_state_t state = macro_f_state_t_initialize(fss_basic_read_common_allocation_large, fss_basic_read_common_allocation_small, 0, 0, 0, 0, 0); + f_state_t state = macro_f_state_t_initialize(fss_basic_read_common_allocation_large_d, fss_basic_read_delimit_common_allocation_small_d, 0, 0, 0, 0, 0); f_string_range_t input = macro_f_string_range_t_initialize(data->buffer.used); data->delimits.used = 0; @@ -320,10 +320,10 @@ extern "C" { void fss_basic_read_print_object_end(fss_basic_read_main_t * const main) { if (main->parameters[fss_basic_read_parameter_pipe].result == f_console_result_found) { - f_print_character(fss_basic_read_pipe_content_start, main->output.to.stream); + f_print_character(fss_basic_read_pipe_content_start_s, main->output.to.stream); } else { - f_print_character(f_fss_space, main->output.to.stream); + f_print_character(F_fss_space_s[0], main->output.to.stream); } } #endif // _di_fss_basic_read_print_object_end_ @@ -339,7 +339,7 @@ extern "C" { void fss_basic_read_print_set_end(fss_basic_read_main_t * const main) { if (main->parameters[fss_basic_read_parameter_pipe].result == f_console_result_found) { - f_print_character(fss_basic_read_pipe_content_end, main->output.to.stream); + f_print_character(fss_basic_read_pipe_content_end_s, main->output.to.stream); } else { f_print_character(f_string_eol_s[0], main->output.to.stream); @@ -638,7 +638,7 @@ extern "C" { if (main->parameters[fss_basic_read_parameter_line].result == f_console_result_additional) { data->option |= fss_basic_read_data_option_line; - status = fss_basic_read_load_number(fss_basic_read_parameter_line, fss_basic_read_long_line, arguments, main, &data->line); + status = fss_basic_read_load_number(fss_basic_read_parameter_line, fss_basic_read_long_line_s, arguments, main, &data->line); if (F_status_is_error(status)) return status; } @@ -657,7 +657,7 @@ extern "C" { if (main->parameters[fss_basic_read_parameter_select].result == f_console_result_additional) { data->option |= fss_basic_read_data_option_select; - status = fss_basic_read_load_number(fss_basic_read_parameter_select, fss_basic_read_long_select, arguments, main, &data->select); + status = fss_basic_read_load_number(fss_basic_read_parameter_select, fss_basic_read_long_select_s, arguments, main, &data->select); if (F_status_is_error(status)) return status; } diff --git a/level_3/fss_basic_read/c/private-fss_basic_read.h b/level_3/fss_basic_read/c/private-fss_basic_read.h index b2d3b88..5c1f896 100644 --- a/level_3/fss_basic_read/c/private-fss_basic_read.h +++ b/level_3/fss_basic_read/c/private-fss_basic_read.h @@ -25,7 +25,7 @@ extern "C" { * F_false if to not apply delimits. */ #ifndef _di_fss_basic_read_delimit_object_is_ - extern f_status_t fss_basic_read_delimit_object_is(const f_array_length_t depth, fss_basic_read_data_t * const data) f_attribute_visibility_internal; + extern f_status_t fss_basic_read_delimit_object_is(const f_array_length_t depth, fss_basic_read_data_t * const data) F_attribute_visibility_internal_d; #endif // _di_fss_basic_read_delimit_object_is_ /** @@ -56,7 +56,7 @@ extern "C" { * @see fss_basic_read_depths_resize() */ #ifndef _di_fss_basic_read_depth_process_ - extern f_status_t fss_basic_read_depth_process(f_console_arguments_t * const arguments, fss_basic_read_main_t * const main, fss_basic_read_data_t *data) f_attribute_visibility_internal; + extern f_status_t fss_basic_read_depth_process(f_console_arguments_t * const arguments, fss_basic_read_main_t * const main, fss_basic_read_data_t *data) F_attribute_visibility_internal_d; #endif // _di_fss_basic_read_depth_process_ /** @@ -74,7 +74,7 @@ extern "C" { * On failure to identify, an empty string is returned. */ #ifndef _di_fss_basic_read_file_identify_ - extern f_string_t fss_basic_read_file_identify(const f_array_length_t at, const fss_basic_read_files_t files) f_attribute_visibility_internal; + extern f_string_t fss_basic_read_file_identify(const f_array_length_t at, const fss_basic_read_files_t files) F_attribute_visibility_internal_d; #endif // _di_fss_basic_read_file_identify_ /** @@ -100,7 +100,7 @@ extern "C" { * @see fss_basic_read_process_option() */ #ifndef _di_fss_basic_read_load_ - extern f_status_t fss_basic_read_load(fss_basic_read_main_t * const main, fss_basic_read_data_t *data) f_attribute_visibility_internal; + extern f_status_t fss_basic_read_load(fss_basic_read_main_t * const main, fss_basic_read_data_t *data) F_attribute_visibility_internal_d; #endif // _di_fss_basic_read_load_ /** @@ -130,7 +130,7 @@ extern "C" { * @see fss_basic_read_depths_resize() */ #ifndef _di_fss_basic_read_load_number_ - extern f_status_t fss_basic_read_load_number(const f_array_length_t parameter, const f_string_t name, f_console_arguments_t * const arguments, fss_basic_read_main_t * const main, f_number_unsigned_t *number) f_attribute_visibility_internal; + extern f_status_t fss_basic_read_load_number(const f_array_length_t parameter, const f_string_t name, f_console_arguments_t * const arguments, fss_basic_read_main_t * const main, f_number_unsigned_t *number) F_attribute_visibility_internal_d; #endif // _di_fss_basic_read_load_number_ /** @@ -150,7 +150,7 @@ extern "C" { * The program data. */ #ifndef _di_fss_basic_read_print_at_ - extern void fss_basic_read_print_at(const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_basic_read_main_t * const main, fss_basic_read_data_t * const data) f_attribute_visibility_internal; + extern void fss_basic_read_print_at(const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_basic_read_main_t * const main, fss_basic_read_data_t * const data) F_attribute_visibility_internal_d; #endif // _di_fss_basic_read_print_at_ /** @@ -160,7 +160,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_basic_read_print_object_end_ - extern void fss_basic_read_print_object_end(fss_basic_read_main_t * const main) f_attribute_visibility_internal; + extern void fss_basic_read_print_object_end(fss_basic_read_main_t * const main) F_attribute_visibility_internal_d; #endif // _di_fss_basic_read_print_object_end_ /** @@ -170,7 +170,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_basic_read_print_one_ - extern void fss_basic_read_print_one(fss_basic_read_main_t * const main) f_attribute_visibility_internal; + extern void fss_basic_read_print_one(fss_basic_read_main_t * const main) F_attribute_visibility_internal_d; #endif // _di_fss_basic_read_print_one_ /** @@ -180,7 +180,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_basic_read_print_set_end_ - extern void fss_basic_read_print_set_end(fss_basic_read_main_t * const main) f_attribute_visibility_internal; + extern void fss_basic_read_print_set_end(fss_basic_read_main_t * const main) F_attribute_visibility_internal_d; #endif // _di_fss_basic_read_print_set_end_ /** @@ -190,7 +190,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_basic_read_print_zero_ - extern void fss_basic_read_print_zero(fss_basic_read_main_t * const main) f_attribute_visibility_internal; + extern void fss_basic_read_print_zero(fss_basic_read_main_t * const main) F_attribute_visibility_internal_d; #endif // _di_fss_basic_read_print_zero_ /** @@ -215,7 +215,7 @@ extern "C" { * @see fss_basic_read_process_option() */ #ifndef _di_fss_basic_read_process_ - extern f_status_t fss_basic_read_process(f_console_arguments_t * const arguments, fss_basic_read_main_t * const main, fss_basic_read_data_t *data) f_attribute_visibility_internal; + extern f_status_t fss_basic_read_process(f_console_arguments_t * const arguments, fss_basic_read_main_t * const main, fss_basic_read_data_t *data) F_attribute_visibility_internal_d; #endif // _di_fss_basic_read_process_ /** @@ -233,7 +233,7 @@ extern "C" { * F_none on success. */ #ifndef _di_fss_basic_read_process_at_ - extern f_status_t fss_basic_read_process_at(fss_basic_read_main_t * const main, fss_basic_read_data_t *data, bool names[]) f_attribute_visibility_internal; + extern f_status_t fss_basic_read_process_at(fss_basic_read_main_t * const main, fss_basic_read_data_t *data, bool names[]) F_attribute_visibility_internal_d; #endif // _di_fss_basic_read_process_at_ /** @@ -251,7 +251,7 @@ extern "C" { * F_none on success. */ #ifndef _di_fss_basic_read_process_columns_ - extern f_status_t fss_basic_read_process_columns(fss_basic_read_main_t * const main, fss_basic_read_data_t *data, bool names[]) f_attribute_visibility_internal; + extern f_status_t fss_basic_read_process_columns(fss_basic_read_main_t * const main, fss_basic_read_data_t *data, bool names[]) F_attribute_visibility_internal_d; #endif // _di_fss_basic_read_process_columns_ /** @@ -269,7 +269,7 @@ extern "C" { * F_none on success. */ #ifndef _di_fss_basic_read_process_line_ - extern f_status_t fss_basic_read_process_line(fss_basic_read_main_t * const main, fss_basic_read_data_t *data, bool names[]) f_attribute_visibility_internal; + extern f_status_t fss_basic_read_process_line(fss_basic_read_main_t * const main, fss_basic_read_data_t *data, bool names[]) F_attribute_visibility_internal_d; #endif // _di_fss_basic_read_process_line_ /** @@ -287,7 +287,7 @@ extern "C" { * F_none on success. */ #ifndef _di_fss_basic_read_process_name_ - extern f_status_t fss_basic_read_process_name(fss_basic_read_data_t *data, bool names[]) f_attribute_visibility_internal; + extern f_status_t fss_basic_read_process_name(fss_basic_read_data_t *data, bool names[]) F_attribute_visibility_internal_d; #endif // _di_fss_basic_read_process_name_ /** @@ -310,7 +310,7 @@ extern "C" { * @see fss_basic_read_load_setting() */ #ifndef _di_fss_basic_read_process_option_ - extern f_status_t fss_basic_read_process_option(f_console_arguments_t * const arguments, fss_basic_read_main_t * const main, fss_basic_read_data_t *data) f_attribute_visibility_internal; + extern f_status_t fss_basic_read_process_option(f_console_arguments_t * const arguments, fss_basic_read_main_t * const main, fss_basic_read_data_t *data) F_attribute_visibility_internal_d; #endif // _di_fss_basic_read_process_option_ /** @@ -328,7 +328,7 @@ extern "C" { * F_none on success. */ #ifndef _di_fss_basic_read_process_total_ - extern f_status_t fss_basic_read_process_total(fss_basic_read_main_t * const main, fss_basic_read_data_t *data, bool names[]) f_attribute_visibility_internal; + extern f_status_t fss_basic_read_process_total(fss_basic_read_main_t * const main, fss_basic_read_data_t *data, bool names[]) F_attribute_visibility_internal_d; #endif // _di_fss_basic_read_process_total_ #ifdef __cplusplus diff --git a/level_3/fss_basic_write/c/fss_basic_write.c b/level_3/fss_basic_write/c/fss_basic_write.c index 668545d..45e226c 100644 --- a/level_3/fss_basic_write/c/fss_basic_write.c +++ b/level_3/fss_basic_write/c/fss_basic_write.c @@ -11,7 +11,7 @@ extern "C" { flockfile(file.stream); - fll_program_print_help_header(file, context, fss_basic_write_name_long, fss_basic_write_version); + fll_program_print_help_header(file, context, fss_basic_write_program_name_long_s, fss_basic_write_program_version_s); fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); @@ -25,17 +25,17 @@ extern "C" { f_print_character(f_string_eol_s[0], file.stream); - fll_program_print_help_option(file, context, fss_basic_write_short_file, fss_basic_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send file to."); - fll_program_print_help_option(file, context, fss_basic_write_short_content, fss_basic_write_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to file."); - fll_program_print_help_option(file, context, fss_basic_write_short_double, fss_basic_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); - fll_program_print_help_option(file, context, fss_basic_write_short_ignore, fss_basic_write_long_ignore, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content."); - fll_program_print_help_option(file, context, fss_basic_write_short_object, fss_basic_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to file."); - fll_program_print_help_option(file, context, fss_basic_write_short_partial, fss_basic_write_long_partial, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not file end of Object/Content character."); - fll_program_print_help_option(file, context, fss_basic_write_short_prepend, fss_basic_write_long_prepend, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content."); - fll_program_print_help_option(file, context, fss_basic_write_short_single, fss_basic_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); - fll_program_print_help_option(file, context, fss_basic_write_short_trim, fss_basic_write_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names."); + fll_program_print_help_option(file, context, fss_basic_write_short_file_s, fss_basic_write_long_file_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send file to."); + fll_program_print_help_option(file, context, fss_basic_write_short_content_s, fss_basic_write_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to file."); + fll_program_print_help_option(file, context, fss_basic_write_short_double_s, fss_basic_write_long_double_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); + fll_program_print_help_option(file, context, fss_basic_write_short_ignore_s, fss_basic_write_long_ignore_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content."); + fll_program_print_help_option(file, context, fss_basic_write_short_object_s, fss_basic_write_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to file."); + fll_program_print_help_option(file, context, fss_basic_write_short_partial_s, fss_basic_write_long_partial_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not file end of Object/Content character."); + fll_program_print_help_option(file, context, fss_basic_write_short_prepend_s, fss_basic_write_long_prepend_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content."); + fll_program_print_help_option(file, context, fss_basic_write_short_single_s, fss_basic_write_long_single_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); + fll_program_print_help_option(file, context, fss_basic_write_short_trim_s, fss_basic_write_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names."); - fll_program_print_help_usage(file, context, fss_basic_write_name, f_string_empty_s); + fll_program_print_help_usage(file, context, fss_basic_write_program_name_s, f_string_empty_s); fl_print_format(" The pipe uses the Backspace character '%[\\b%]' (%[U+0008%]) to designate the start of a Content.%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]); fl_print_format(" The pipe uses the Form Feed character '%[\\f%]' (%[U+000C%]) to designate the end of the last Content.%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]); @@ -44,10 +44,10 @@ extern "C" { fl_print_format(" or a Form Feed character '%[\\f%]' (%[U+000C%]).%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]); fl_print_format(" The end of the pipe represents the end of any Object or Content.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The FSS-0000 (Basic) specification does not support multi-line Content, therefore the parameter '%[%s%s%]'", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_write_long_prepend, context.set.notable); + fl_print_format(" The FSS-0000 (Basic) specification does not support multi-line Content, therefore the parameter '%[%s%s%]'", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_write_long_prepend_s, context.set.notable); fl_print_format(" does nothing.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" This program does not use the parameter '%[%s%s%]', which therefore does nothing.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_write_long_ignore, context.set.notable, f_string_eol_s[0]); + fl_print_format(" This program does not use the parameter '%[%s%s%]', which therefore does nothing.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_write_long_ignore_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" This parameter requires two values.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); funlockfile(file.stream); @@ -61,7 +61,7 @@ extern "C" { f_status_t status = F_none; { - const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_basic_write_total_parameters); + const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_basic_write_total_parameters_d); { f_console_parameter_id_t ids[3] = { fss_basic_write_parameter_no_color, fss_basic_write_parameter_light, fss_basic_write_parameter_dark }; @@ -134,7 +134,7 @@ extern "C" { } if (main->parameters[fss_basic_write_parameter_version].result == f_console_result_found) { - fll_program_print_version(main->output.to, fss_basic_write_version); + fll_program_print_version(main->output.to, fss_basic_write_program_version_s); fss_basic_write_main_delete(main); return status; @@ -142,9 +142,9 @@ extern "C" { f_file_t output = f_file_t_initialize; - output.id = f_type_descriptor_output; - output.stream = f_type_output; - output.flag = f_file_flag_create | f_file_flag_write_only | f_file_flag_append; + output.id = F_type_descriptor_output_d; + output.stream = F_type_output_d; + output.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d; if (F_status_is_error_not(status)) { if (main->parameters[fss_basic_write_parameter_file].result == f_console_result_additional) { @@ -153,7 +153,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_file, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_file_s, main->error.notable); fl_print_format("%[' may only be specified once.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -174,7 +174,7 @@ extern "C" { } } else if (main->parameters[fss_basic_write_parameter_file].result == f_console_result_found) { - fss_basic_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_basic_write_long_file); + fss_basic_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_basic_write_long_file_s); status = F_status_set_error(F_parameter); } } @@ -183,11 +183,11 @@ extern "C" { if (main->parameters[fss_basic_write_parameter_object].locations.used || main->parameters[fss_basic_write_parameter_content].locations.used) { if (main->parameters[fss_basic_write_parameter_object].locations.used) { if (main->parameters[fss_basic_write_parameter_object].locations.used != main->parameters[fss_basic_write_parameter_object].values.used) { - fss_basic_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_basic_write_long_object); + fss_basic_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_basic_write_long_object_s); status = F_status_set_error(F_parameter); } else if (main->parameters[fss_basic_write_parameter_content].locations.used != main->parameters[fss_basic_write_parameter_content].values.used) { - fss_basic_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_basic_write_long_content); + fss_basic_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_basic_write_long_content_s); status = F_status_set_error(F_parameter); } else if (main->parameters[fss_basic_write_parameter_object].locations.used != main->parameters[fss_basic_write_parameter_content].locations.used && main->parameters[fss_basic_write_parameter_partial].result == f_console_result_none) { @@ -200,11 +200,11 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_partial, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter only allows either the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_object, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_object_s, main->error.notable); fl_print_format("%[' parameter or the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_content, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_content_s, main->error.notable); fl_print_format("%[' parameter, but not both.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -232,9 +232,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sEach '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_object, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_object_s, main->error.notable); fl_print_format("%[' parameter must be specified before a '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_content, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -249,7 +249,7 @@ extern "C" { } else if (main->parameters[fss_basic_write_parameter_content].locations.used) { if (main->parameters[fss_basic_write_parameter_content].locations.used != main->parameters[fss_basic_write_parameter_content].values.used) { - fss_basic_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_basic_write_long_content); + fss_basic_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_basic_write_long_content_s); status = F_status_set_error(F_parameter); } else if (!main->parameters[fss_basic_write_parameter_partial].locations.used) { @@ -263,9 +263,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThis requires either piped data or the use of the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_object, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_object_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_content, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -280,7 +280,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThis '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_partial, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter cannot be used when processing a pipe.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -297,7 +297,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_prepend, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_prepend_s, main->error.notable); fl_print_format("%[' was specified, but no value was given.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -324,7 +324,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_prepend, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_prepend_s, main->error.notable); fl_print_format("%[' must only contain whitespace.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -340,7 +340,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_prepend, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_prepend_s, main->error.notable); fl_print_format("%[' must not be an empty string.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -357,7 +357,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_ignore, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_ignore_s, main->error.notable); fl_print_format("%[' was specified, but no values were given.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -373,7 +373,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_ignore, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_ignore_s, main->error.notable); fl_print_format("%[' requires two values.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -383,18 +383,18 @@ extern "C" { } } - f_fss_quote_t quote = f_fss_delimit_quote_double; + f_fss_quote_t quote = F_fss_delimit_quote_double_s; if (F_status_is_error_not(status)) { if (main->parameters[fss_basic_write_parameter_double].result == f_console_result_found) { if (main->parameters[fss_basic_write_parameter_single].result == f_console_result_found) { if (main->parameters[fss_basic_write_parameter_double].location < main->parameters[fss_basic_write_parameter_single].location) { - quote = f_fss_delimit_quote_single; + quote = F_fss_delimit_quote_single_s; } } } else if (main->parameters[fss_basic_write_parameter_single].result == f_console_result_found) { - quote = f_fss_delimit_quote_single; + quote = F_fss_delimit_quote_single_s; } } @@ -518,7 +518,7 @@ extern "C" { #ifndef _di_fss_basic_write_main_delete_ f_status_t fss_basic_write_main_delete(fss_basic_write_main_t *main) { - for (f_array_length_t i = 0; i < fss_basic_write_total_parameters; ++i) { + for (f_array_length_t i = 0; i < fss_basic_write_total_parameters_d; ++i) { macro_f_array_lengths_t_delete_simple(main->parameters[i].locations); macro_f_array_lengths_t_delete_simple(main->parameters[i].locations_sub); macro_f_array_lengths_t_delete_simple(main->parameters[i].values); diff --git a/level_3/fss_basic_write/c/fss_basic_write.h b/level_3/fss_basic_write/c/fss_basic_write.h index 95e1c72..a1ba877 100644 --- a/level_3/fss_basic_write/c/fss_basic_write.h +++ b/level_3/fss_basic_write/c/fss_basic_write.h @@ -45,51 +45,51 @@ extern "C" { #endif -#ifndef _di_fss_basic_write_version_ - #define fss_basic_write_major_version f_string_ascii_0 - #define fss_basic_write_minor_version f_string_ascii_5 - #define fss_basic_write_micro_version f_string_ascii_6 +#ifndef _di_fss_basic_write_program_version_ + #define fss_basic_write_program_version_major_s F_string_ascii_0_s + #define fss_basic_write_program_version_minor_s F_string_ascii_5_s + #define fss_basic_write_program_version_micro_s F_string_ascii_6_s - #ifndef fss_basic_write_nano_version_prefix - #define fss_basic_write_nano_version_prefix + #ifndef fss_basic_write_program_version_nano_prefix_s + #define fss_basic_write_program_version_nano_prefix_s #endif - #ifndef fss_basic_write_nano_version - #define fss_basic_write_nano_version + #ifndef fss_basic_write_program_version_nano_s + #define fss_basic_write_program_version_nano_s #endif - #define fss_basic_write_version fss_basic_write_major_version f_string_ascii_period fss_basic_write_minor_version f_string_ascii_period fss_basic_write_micro_version fss_basic_write_nano_version_prefix fss_basic_write_nano_version -#endif // _di_fss_basic_write_version_ + #define fss_basic_write_program_version_s fss_basic_write_program_version_major_s F_string_ascii_period_s fss_basic_write_program_version_minor_s F_string_ascii_period_s fss_basic_write_program_version_micro_s fss_basic_write_program_version_nano_prefix_s fss_basic_write_program_version_nano_s +#endif // _di_fss_basic_write_program_version_ -#ifndef _di_fss_basic_write_name_ - #define fss_basic_write_name "fss_basic_write" - #define fss_basic_write_name_long "FSS Basic Write" -#endif // _di_fss_basic_write_name_ +#ifndef _di_fss_basic_write_program_name_ + #define fss_basic_write_program_name_s "fss_basic_write" + #define fss_basic_write_program_name_long_s "FSS Basic Write" +#endif // _di_fss_basic_write_program_name_ #ifndef _di_fss_basic_write_defines_ - #define fss_basic_write_pipe_content_end '\f' - #define fss_basic_write_pipe_content_ignore '\v' - #define fss_basic_write_pipe_content_start '\b' - - #define fss_basic_write_short_file "f" - #define fss_basic_write_short_content "c" - #define fss_basic_write_short_double "d" - #define fss_basic_write_short_ignore "I" - #define fss_basic_write_short_object "o" - #define fss_basic_write_short_partial "p" - #define fss_basic_write_short_prepend "P" - #define fss_basic_write_short_single "s" - #define fss_basic_write_short_trim "T" - - #define fss_basic_write_long_file "file" - #define fss_basic_write_long_content "content" - #define fss_basic_write_long_double "double" - #define fss_basic_write_long_ignore "ignore" - #define fss_basic_write_long_object "object" - #define fss_basic_write_long_partial "partial" - #define fss_basic_write_long_prepend "prepend" - #define fss_basic_write_long_single "single" - #define fss_basic_write_long_trim "trim" + #define fss_basic_write_pipe_content_end_s '\f' + #define fss_basic_write_pipe_content_ignore_s '\v' + #define fss_basic_write_pipe_content_start_s '\b' + + #define fss_basic_write_short_file_s "f" + #define fss_basic_write_short_content_s "c" + #define fss_basic_write_short_double_s "d" + #define fss_basic_write_short_ignore_s "I" + #define fss_basic_write_short_object_s "o" + #define fss_basic_write_short_partial_s "p" + #define fss_basic_write_short_prepend_s "P" + #define fss_basic_write_short_single_s "s" + #define fss_basic_write_short_trim_s "T" + + #define fss_basic_write_long_file_s "file" + #define fss_basic_write_long_content_s "content" + #define fss_basic_write_long_double_s "double" + #define fss_basic_write_long_ignore_s "ignore" + #define fss_basic_write_long_object_s "object" + #define fss_basic_write_long_partial_s "partial" + #define fss_basic_write_long_prepend_s "prepend" + #define fss_basic_write_long_single_s "single" + #define fss_basic_write_long_trim_s "trim" enum { fss_basic_write_parameter_help, @@ -124,23 +124,23 @@ extern "C" { f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(fss_basic_write_short_file, fss_basic_write_long_file, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_write_short_content, fss_basic_write_long_content, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_write_short_double, fss_basic_write_long_double, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_write_short_ignore, fss_basic_write_long_ignore, 0, 2, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_write_short_object, fss_basic_write_long_object, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_write_short_partial, fss_basic_write_long_partial, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_write_short_prepend, fss_basic_write_long_prepend, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_write_short_single, fss_basic_write_long_single, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_basic_write_short_trim, fss_basic_write_long_trim, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_write_short_file_s, fss_basic_write_long_file_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_write_short_content_s, fss_basic_write_long_content_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_write_short_double_s, fss_basic_write_long_double_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_write_short_ignore_s, fss_basic_write_long_ignore_s, 0, 2, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_write_short_object_s, fss_basic_write_long_object_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_write_short_partial_s, fss_basic_write_long_partial_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_write_short_prepend_s, fss_basic_write_long_prepend_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_write_short_single_s, fss_basic_write_long_single_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_basic_write_short_trim_s, fss_basic_write_long_trim_s, 0, 0, f_console_type_normal), \ } - #define fss_basic_write_total_parameters 18 + #define fss_basic_write_total_parameters_d 18 #endif // _di_fss_basic_write_defines_ #ifndef _di_fss_basic_write_data_ typedef struct { - f_console_parameter_t parameters[fss_basic_write_total_parameters]; + f_console_parameter_t parameters[fss_basic_write_total_parameters_d]; f_array_lengths_t remaining; bool process_pipe; diff --git a/level_3/fss_basic_write/c/main.c b/level_3/fss_basic_write/c/main.c index 32526c1..97f1f00 100644 --- a/level_3/fss_basic_write/c/main.c +++ b/level_3/fss_basic_write/c/main.c @@ -12,13 +12,13 @@ int main(const int argc, const f_string_t *argv) { const f_status_t status = fss_basic_write_main(arguments, &data); // flush output pipes before closing. - fflush(f_type_output); - fflush(f_type_error); + fflush(F_type_output_d); + fflush(F_type_error_d); // close all open file descriptors. - close(f_type_descriptor_output); - close(f_type_descriptor_input); - close(f_type_descriptor_error); + close(F_type_descriptor_output_d); + close(F_type_descriptor_input_d); + close(F_type_descriptor_error_d); if (F_status_is_error(status)) { return 1; diff --git a/level_3/fss_basic_write/c/private-common.h b/level_3/fss_basic_write/c/private-common.h index 559cacf..e583676 100644 --- a/level_3/fss_basic_write/c/private-common.h +++ b/level_3/fss_basic_write/c/private-common.h @@ -20,8 +20,8 @@ extern "C" { * - small: An allocation step used for buffers that are anticipated to have small buffers. */ #ifndef _di_fss_basic_write_common_ - #define fss_basic_write_common_allocation_large 256 - #define fss_basic_write_common_allocation_small 16 + #define fss_basic_write_common_allocation_large_d 256 + #define fss_basic_write_common_allocation_small_d 16 #endif // _di_fss_basic_write_common_ #ifdef __cplusplus diff --git a/level_3/fss_basic_write/c/private-fss_basic_write.c b/level_3/fss_basic_write/c/private-fss_basic_write.c index 64636af..f9abab2 100644 --- a/level_3/fss_basic_write/c/private-fss_basic_write.c +++ b/level_3/fss_basic_write/c/private-fss_basic_write.c @@ -16,11 +16,11 @@ extern "C" { flockfile(main.error.to.stream); fl_print_format("%c%[%sMust specify the '%]", main.error.to.stream, f_string_eol_s[0], main.error.context, main.error.prefix, main.error.context); - fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_object, main.error.notable); + fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_object_s, main.error.notable); fl_print_format("%[' parameter and the '%]", main.error.to.stream, main.error.context, main.error.prefix, main.error.context); - fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_content, main.error.notable); + fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_content_s, main.error.notable); fl_print_format("%[' parameter the same number of times when not specifying the '%]", main.error.to.stream, main.error.context, main.error.prefix, main.error.context); - fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_partial, main.error.notable); + fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_basic_write_long_partial_s, main.error.notable); fl_print_format("%[' parameter.%]%c", main.error.to.stream, main.error.context, main.error.context, f_string_eol_s[0]); funlockfile(main.error.to.stream); @@ -65,7 +65,7 @@ extern "C" { f_status_t fss_basic_write_process(const fss_basic_write_main_t main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t *buffer) { f_status_t status = F_none; - f_state_t state = macro_f_state_t_initialize(fss_basic_write_common_allocation_large, fss_basic_write_common_allocation_small, 0, 0, 0, 0, 0); + f_state_t state = macro_f_state_t_initialize(fss_basic_write_common_allocation_large_d, fss_basic_write_common_allocation_small_d, 0, 0, 0, 0, 0); f_string_range_t range = f_string_range_t_initialize; if (object) { @@ -154,7 +154,7 @@ extern "C" { f_file_t input = f_file_t_initialize; - input.id = f_type_descriptor_input; + input.id = F_type_descriptor_input_d; input.size_read = 2048; f_array_length_t total = 0; @@ -209,19 +209,19 @@ extern "C" { for (; range.start <= range.stop; range.start++) { - if (block.string[range.start] == fss_basic_write_pipe_content_start) { + if (block.string[range.start] == fss_basic_write_pipe_content_start_s) { state = 0x2; ++range.start; break; } - if (block.string[range.start] == fss_basic_write_pipe_content_end) { + if (block.string[range.start] == fss_basic_write_pipe_content_end_s) { state = 0x3; ++range.start; break; } - if (block.string[range.start] == fss_basic_write_pipe_content_ignore) { + if (block.string[range.start] == fss_basic_write_pipe_content_ignore_s) { // this is not used by objects. continue; } @@ -258,7 +258,7 @@ extern "C" { for (; range.start <= range.stop; ++range.start) { - if (block.string[range.start] == fss_basic_write_pipe_content_start) { + if (block.string[range.start] == fss_basic_write_pipe_content_start_s) { if (main.error.verbosity != f_console_verbosity_quiet) { fll_print_format("%c%[%sThis standard only supports one content per object.%]%c", main.error.to.stream, f_string_eol_s[0], main.error.context, main.error.prefix, main.error.context, f_string_eol_s[0]); } @@ -267,13 +267,13 @@ extern "C" { break; } - if (block.string[range.start] == fss_basic_write_pipe_content_end) { + if (block.string[range.start] == fss_basic_write_pipe_content_end_s) { state = 0x3; ++range.start; break; } - if (block.string[range.start] == fss_basic_write_pipe_content_ignore) { + if (block.string[range.start] == fss_basic_write_pipe_content_ignore_s) { // this is not used by this program. continue; } diff --git a/level_3/fss_basic_write/c/private-fss_basic_write.h b/level_3/fss_basic_write/c/private-fss_basic_write.h index 3b3d775..72bd3ef 100644 --- a/level_3/fss_basic_write/c/private-fss_basic_write.h +++ b/level_3/fss_basic_write/c/private-fss_basic_write.h @@ -19,7 +19,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_basic_write_error_parameter_same_times_print_ - void fss_basic_write_error_parameter_same_times_print(const fss_basic_write_main_t main) f_attribute_visibility_internal; + void fss_basic_write_error_parameter_same_times_print(const fss_basic_write_main_t main) F_attribute_visibility_internal_d; #endif // _di_fss_basic_write_error_parameter_same_times_print_ /** @@ -33,7 +33,7 @@ extern "C" { * The parameter name, such as "help" in "--help". */ #ifndef _di_fss_basic_write_error_parameter_value_missing_print_ - void fss_basic_write_error_parameter_value_missing_print(const fss_basic_write_main_t main, const f_string_t symbol, const f_string_t parameter) f_attribute_visibility_internal; + void fss_basic_write_error_parameter_value_missing_print(const fss_basic_write_main_t main, const f_string_t symbol, const f_string_t parameter) F_attribute_visibility_internal_d; #endif // _di_fss_basic_write_error_parameter_value_missing_print_ /** @@ -43,7 +43,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_basic_write_error_parameter_unsupported_eol_print_ - void fss_basic_write_error_parameter_unsupported_eol_print(const fss_basic_write_main_t main) f_attribute_visibility_internal; + void fss_basic_write_error_parameter_unsupported_eol_print(const fss_basic_write_main_t main) F_attribute_visibility_internal_d; #endif // _di_fss_basic_write_error_parameter_unsupported_eol_print_ /** @@ -70,7 +70,7 @@ extern "C" { * F_failure (with error bit) for any othe failure. */ #ifndef _di_fss_basic_write_process_ - extern f_status_t fss_basic_write_process(const fss_basic_write_main_t main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t *buffer) f_attribute_visibility_internal; + extern f_status_t fss_basic_write_process(const fss_basic_write_main_t main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d; #endif // _di_fss_basic_write_process_ /** @@ -91,7 +91,7 @@ extern "C" { * F_failure (with error bit) for any othe failure. */ #ifndef _di_fss_basic_write_process_pipe_ - extern f_status_t fss_basic_write_process_pipe(const fss_basic_write_main_t main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) f_attribute_visibility_internal; + extern f_status_t fss_basic_write_process_pipe(const fss_basic_write_main_t main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d; #endif // _di_fss_basic_write_process_pipe_ #ifdef __cplusplus diff --git a/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c b/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c index 42744a8..357d7d4 100644 --- a/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c +++ b/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c @@ -11,7 +11,7 @@ extern "C" { flockfile(file.stream); - fll_program_print_help_header(file, context, fss_embedded_list_read_name_long, fss_embedded_list_read_version); + fll_program_print_help_header(file, context, fss_embedded_list_read_program_name_long_s, fss_embedded_list_read_program_version_s); fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); @@ -25,22 +25,22 @@ extern "C" { f_print_character(f_string_eol_s[0], file.stream); - fll_program_print_help_option(file, context, fss_embedded_list_read_short_at, fss_embedded_list_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric index."); - fll_program_print_help_option(file, context, fss_embedded_list_read_short_content, fss_embedded_list_read_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Content (default)."); - fll_program_print_help_option(file, context, fss_embedded_list_read_short_columns, fss_embedded_list_read_long_columns, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns."); - fll_program_print_help_option(file, context, fss_embedded_list_read_short_delimit, fss_embedded_list_read_long_delimit, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits."); - fll_program_print_help_option(file, context, fss_embedded_list_read_short_depth, fss_embedded_list_read_long_depth, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth."); - fll_program_print_help_option(file, context, fss_embedded_list_read_short_empty, fss_embedded_list_read_long_empty, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing."); - fll_program_print_help_option(file, context, fss_embedded_list_read_short_line, fss_embedded_list_read_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line."); - fll_program_print_help_option(file, context, fss_embedded_list_read_short_name, fss_embedded_list_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name."); - fll_program_print_help_option(file, context, fss_embedded_list_read_short_object, fss_embedded_list_read_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object."); - fll_program_print_help_option(file, context, fss_embedded_list_read_short_pipe, fss_embedded_list_read_long_pipe, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format."); - fll_program_print_help_option(file, context, fss_embedded_list_read_short_raw, fss_embedded_list_read_long_raw, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print with the original quotes and escapes."); - fll_program_print_help_option(file, context, fss_embedded_list_read_short_select, fss_embedded_list_read_long_select, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index."); - fll_program_print_help_option(file, context, fss_embedded_list_read_short_total, fss_embedded_list_read_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines."); - fll_program_print_help_option(file, context, fss_embedded_list_read_short_trim, fss_embedded_list_read_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print."); - - fll_program_print_help_usage(file, context, fss_embedded_list_read_name, "filename(s)"); + fll_program_print_help_option(file, context, fss_embedded_list_read_short_at_s, fss_embedded_list_read_long_at_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric index."); + fll_program_print_help_option(file, context, fss_embedded_list_read_short_content_s, fss_embedded_list_read_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Content (default)."); + fll_program_print_help_option(file, context, fss_embedded_list_read_short_columns_s, fss_embedded_list_read_long_columns_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns."); + fll_program_print_help_option(file, context, fss_embedded_list_read_short_delimit_s, fss_embedded_list_read_long_delimit_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits."); + fll_program_print_help_option(file, context, fss_embedded_list_read_short_depth_s, fss_embedded_list_read_long_depth_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth."); + fll_program_print_help_option(file, context, fss_embedded_list_read_short_empty_s, fss_embedded_list_read_long_empty_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing."); + fll_program_print_help_option(file, context, fss_embedded_list_read_short_line_s, fss_embedded_list_read_long_line_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line."); + fll_program_print_help_option(file, context, fss_embedded_list_read_short_name_s, fss_embedded_list_read_long_name_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name."); + fll_program_print_help_option(file, context, fss_embedded_list_read_short_object_s, fss_embedded_list_read_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object."); + fll_program_print_help_option(file, context, fss_embedded_list_read_short_pipe_s, fss_embedded_list_read_long_pipe_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format."); + fll_program_print_help_option(file, context, fss_embedded_list_read_short_raw_s, fss_embedded_list_read_long_raw_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print with the original quotes and escapes."); + fll_program_print_help_option(file, context, fss_embedded_list_read_short_select_s, fss_embedded_list_read_long_select_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index."); + fll_program_print_help_option(file, context, fss_embedded_list_read_short_total_s, fss_embedded_list_read_long_total_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines."); + fll_program_print_help_option(file, context, fss_embedded_list_read_short_trim_s, fss_embedded_list_read_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print."); + + fll_program_print_help_usage(file, context, fss_embedded_list_read_program_name_s, "filename(s)"); fl_print_format(" %[Notes:%]%c", file.stream, context.set.important, context.set.important, f_string_eol_s[0]); @@ -49,64 +49,64 @@ extern "C" { fl_print_format(" All numeric positions (indexes) start at 0 instead of 1.%c", file.stream, f_string_eol_s[0]); fl_print_format(" For example, a file of 17 lines would range from 0 to 16.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" When using the %[%s%s%] option, an order of operations is enforced on the parameters.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth, context.set.notable, f_string_eol_s[0]); + fl_print_format(" When using the %[%s%s%] option, an order of operations is enforced on the parameters.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", file.stream, f_string_eol_s[0]); - fl_print_format(" %[%s%s%]: An Object index at the specified depth.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_at, context.set.notable, f_string_eol_s[0]); - fl_print_format(" %[%s%s%]: A new depth within the specified depth, indexed from the root.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth, context.set.notable, f_string_eol_s[0]); - fl_print_format(" %[%s%s%]: An Object name at the specified depth.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" %[%s%s%]: An Object index at the specified depth.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_at_s, context.set.notable, f_string_eol_s[0]); + fl_print_format(" %[%s%s%]: A new depth within the specified depth, indexed from the root.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth_s, context.set.notable, f_string_eol_s[0]); + fl_print_format(" %[%s%s%]: An Object name at the specified depth.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_name_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameter %[%s%s%] must be in numeric order, but values in between may be skipped.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth, context.set.notable, f_string_eol_s[0]); + fl_print_format(" The parameter %[%s%s%] must be in numeric order, but values in between may be skipped.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%c", file.stream, f_string_eol_s[0]); fl_print_format(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameter %[%s%s%] selects a Content column.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" The parameter %[%s%s%] selects a Content column.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" Specify both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_object, context.set.notable); - fl_print_format(" and the %[%s%s%] parameters to get the total objects.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_total, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" Specify both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_object_s, context.set.notable); + fl_print_format(" and the %[%s%s%] parameters to get the total objects.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_total_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" When both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_at, context.set.notable); - fl_print_format(" and %[%s%s%] parameters are specified (at the same depth),", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_name, context.set.notable); - fl_print_format(" the %[%s%s%] parameter value will be treated as a position relative to the specified", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_at, context.set.notable); - fl_print_format(" %[%s%s%] parameter value.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" When both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_at_s, context.set.notable); + fl_print_format(" and %[%s%s%] parameters are specified (at the same depth),", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_name_s, context.set.notable); + fl_print_format(" the %[%s%s%] parameter value will be treated as a position relative to the specified", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_at_s, context.set.notable); + fl_print_format(" %[%s%s%] parameter value.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_name_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" This program may support parameters, such as %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth, context.set.notable); - fl_print_format(" or %[%s%s%], even if not supported by the standard.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select, context.set.notable, f_string_eol_s[0]); + fl_print_format(" This program may support parameters, such as %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth_s, context.set.notable); + fl_print_format(" or %[%s%s%], even if not supported by the standard.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" This is done to help ensure consistency for scripting.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth, context.set.notable); + fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth_s, context.set.notable); fl_print_format(" if the standard doesn't support nested Content, then only a depth of 0 would be valid.%c", file.stream, f_string_eol_s[0]); - fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select, context.set.notable); + fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select_s, context.set.notable); fl_print_format(" if the standard doesn't support multiple Content groups, then only a select of 0 would be valid.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameter %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_trim, context.set.notable); + fl_print_format(" The parameter %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_trim_s, context.set.notable); fl_print_format(" will remove leading and trailing whitespaces when selecting objects or when printing objects.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" When specifying both the %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_object, context.set.notable); - fl_print_format(" parameter and the %[%s%s%] parameter, the entire Object and Content are printed, including the formatting.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_content, context.set.notable, f_string_eol_s[0]); + fl_print_format(" When specifying both the %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_object_s, context.set.notable); + fl_print_format(" parameter and the %[%s%s%] parameter, the entire Object and Content are printed, including the formatting.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_content_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" Both the Object and Content printed are already escaped.%c", file.stream, f_string_eol_s[0]); fl_print_format(" Both the Object and Content are separated by an EOL.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameter %[%s%s%] accepts the following:%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit, context.set.notable, f_string_eol_s[0]); - fl_print_format(" - %[%s%]: Do not apply delimits.%c", file.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_none, context.set.notable, f_string_eol_s[0]); - fl_print_format(" - %[%s%]: (default) Apply all delimits.%c", file.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_all, context.set.notable, f_string_eol_s[0]); + fl_print_format(" The parameter %[%s%s%] accepts the following:%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit_s, context.set.notable, f_string_eol_s[0]); + fl_print_format(" - %[%s%]: Do not apply delimits.%c", file.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_none_s, context.set.notable, f_string_eol_s[0]); + fl_print_format(" - %[%s%]: (default) Apply all delimits.%c", file.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_all_s, context.set.notable, f_string_eol_s[0]); // @todo //fl_print_format(" - %[%s%]: Apply delimits for Objects.%c", file.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_object, context.set.notable, f_string_eol_s[0]); fl_print_format(" - A number, 0 or greater: apply delimits for Content at the specified depth.%c", file.stream, f_string_eol_s[0]); - fl_print_format(" - A number, 0 or greater, followed by a %[%s%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%c", file.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_greater, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" - A number, 0 or lesser, followed by a %[%s%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%c%c", file.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_lesser, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" - A number, 0 or greater, followed by a %[%s%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%c", file.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_greater_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" - A number, 0 or lesser, followed by a %[%s%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%c%c", file.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_lesser_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The %[%s%s%] parameter may be specified multiple times to customize the delimit behavior.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit, context.set.notable, f_string_eol_s[0]); + fl_print_format(" The %[%s%s%] parameter may be specified multiple times to customize the delimit behavior.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit_s, context.set.notable, f_string_eol_s[0]); - fl_print_format(" The %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit, context.set.notable); - fl_print_format(" values %[%s%]", file.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_none, context.set.notable); - fl_print_format(" and %[%s%],", file.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_all, context.set.notable); + fl_print_format(" The %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit_s, context.set.notable); + fl_print_format(" values %[%s%]", file.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_none_s, context.set.notable); + fl_print_format(" and %[%s%],", file.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_all_s, context.set.notable); fl_print_format(" overrule all other delimit values.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameters %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_columns, context.set.notable); - fl_print_format(" and %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select, context.set.notable); + fl_print_format(" The parameters %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_columns_s, context.set.notable); + fl_print_format(" and %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select_s, context.set.notable); fl_print_format(" refer to a Content column.%c", file.stream, f_string_eol_s[0]); fl_print_format(" The word \"column\" is being loosely defined to refer to a specific Content.%c", file.stream, f_string_eol_s[0]); fl_print_format(" This is not to be confused with a depth.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); @@ -122,7 +122,7 @@ extern "C" { f_status_t status = F_none; { - const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_embedded_list_read_total_parameters); + const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_embedded_list_read_total_parameters_d); { f_console_parameter_id_t ids[3] = { fss_embedded_list_read_parameter_no_color, fss_embedded_list_read_parameter_light, fss_embedded_list_read_parameter_dark }; @@ -195,7 +195,7 @@ extern "C" { } if (main->parameters[fss_embedded_list_read_parameter_version].result == f_console_result_found) { - fll_program_print_version(main->output.to, fss_embedded_list_read_version); + fll_program_print_version(main->output.to, fss_embedded_list_read_program_version_s); fss_embedded_list_read_main_delete(main); return F_none; @@ -206,9 +206,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_total, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_total_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_columns, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_columns_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -222,7 +222,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_at, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_at_s, main->error.notable); fl_print_format("%[' requires a positive number.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -234,7 +234,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth_s, main->error.notable); fl_print_format("%[' requires a positive number.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -246,7 +246,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_line, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_line_s, main->error.notable); fl_print_format("%[' requires a positive number.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -258,7 +258,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_name, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_name_s, main->error.notable); fl_print_format("%[' requires a string.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -270,7 +270,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select_s, main->error.notable); fl_print_format("%[' requires a positive number.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -283,9 +283,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_line, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_line_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_total, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_total_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -299,9 +299,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_pipe, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_pipe_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_total, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_total_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -315,7 +315,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit_s, main->error.notable); fl_print_format("%[' requires a value.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -330,29 +330,29 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit_s, main->error.notable); fl_print_format("%[' must not be empty.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); status = F_status_set_error(F_parameter); } - else if (fl_string_compare(arguments.argv[location], fss_embedded_list_read_delimit_mode_name_none, length, fss_embedded_list_read_delimit_mode_name_none_length) == F_equal_to) { + else if (fl_string_compare(arguments.argv[location], fss_embedded_list_read_delimit_mode_name_none_s, length, fss_embedded_list_read_delimit_mode_name_none_s_length) == F_equal_to) { main->delimit_mode = fss_embedded_list_read_delimit_mode_none; } - else if (fl_string_compare(arguments.argv[location], fss_embedded_list_read_delimit_mode_name_all, length, fss_embedded_list_read_delimit_mode_name_all_length) == F_equal_to) { + else if (fl_string_compare(arguments.argv[location], fss_embedded_list_read_delimit_mode_name_all_s, length, fss_embedded_list_read_delimit_mode_name_all_s_length) == F_equal_to) { main->delimit_mode = fss_embedded_list_read_delimit_mode_all; } else { main->delimit_mode = fss_embedded_list_read_delimit_mode_depth; - if (arguments.argv[location][length - 1] == fss_embedded_list_read_delimit_mode_name_greater[0]) { + if (arguments.argv[location][length - 1] == fss_embedded_list_read_delimit_mode_name_greater_s[0]) { main->delimit_mode = fss_embedded_list_read_delimit_mode_depth_greater; // shorten the length to better convert the remainder to a number. --length; } - else if (arguments.argv[location][length - 1] == fss_embedded_list_read_delimit_mode_name_lesser[0]) { + else if (arguments.argv[location][length - 1] == fss_embedded_list_read_delimit_mode_name_lesser_s[0]) { main->delimit_mode = fss_embedded_list_read_delimit_mode_depth_lesser; // shorten the length to better convert the remainder to a number. @@ -369,7 +369,7 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments.argv[location], range, &main->delimit_depth); if (F_status_is_error(status)) { - fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_delimit, arguments.argv[location]); + fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_delimit_s, arguments.argv[location]); } } } @@ -395,7 +395,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select_s, main->error.notable); fl_print_format("%[' parameter requires a positive number.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -406,7 +406,7 @@ extern "C" { if (F_status_is_error_not(status) && main->process_pipe) { f_file_t file = f_file_t_initialize; - file.id = f_type_descriptor_input; + file.id = F_type_descriptor_input_d; status = f_file_read(file, &main->buffer); @@ -504,7 +504,7 @@ extern "C" { #ifndef _di_fss_embedded_list_read_main_delete_ f_status_t fss_embedded_list_read_main_delete(fss_embedded_list_read_main_t *main) { - for (f_array_length_t i = 0; i < fss_embedded_list_read_total_parameters; ++i) { + for (f_array_length_t i = 0; i < fss_embedded_list_read_total_parameters_d; ++i) { macro_f_array_lengths_t_delete_simple(main->parameters[i].locations); macro_f_array_lengths_t_delete_simple(main->parameters[i].locations_sub); macro_f_array_lengths_t_delete_simple(main->parameters[i].values); diff --git a/level_3/fss_embedded_list_read/c/fss_embedded_list_read.h b/level_3/fss_embedded_list_read/c/fss_embedded_list_read.h index fb6b979..ed74cd1 100644 --- a/level_3/fss_embedded_list_read/c/fss_embedded_list_read.h +++ b/level_3/fss_embedded_list_read/c/fss_embedded_list_read.h @@ -50,61 +50,61 @@ extern "C" { #endif -#ifndef _di_fss_embedded_list_read_version_ - #define fss_embedded_list_read_major_version f_string_ascii_0 - #define fss_embedded_list_read_minor_version f_string_ascii_5 - #define fss_embedded_list_read_micro_version f_string_ascii_6 +#ifndef _di_fss_embedded_list_read_program_version_ + #define fss_embedded_list_read_program_version_major_s F_string_ascii_0_s + #define fss_embedded_list_read_program_version_minor_s F_string_ascii_5_s + #define fss_embedded_list_read_program_version_micro_s F_string_ascii_6_s - #ifndef fss_embedded_list_read_nano_version_prefix - #define fss_embedded_list_read_nano_version_prefix + #ifndef fss_embedded_list_read_program_version_nano_prefix_s + #define fss_embedded_list_read_program_version_nano_prefix_s #endif - #ifndef fss_embedded_list_read_nano_version - #define fss_embedded_list_read_nano_version + #ifndef fss_embedded_list_read_program_version_nano_s + #define fss_embedded_list_read_program_version_nano_s #endif - #define fss_embedded_list_read_version fss_embedded_list_read_major_version f_string_ascii_period fss_embedded_list_read_minor_version f_string_ascii_period fss_embedded_list_read_micro_version fss_embedded_list_read_nano_version_prefix fss_embedded_list_read_nano_version -#endif // _di_fss_embedded_list_read_version_ + #define fss_embedded_list_read_program_version_s fss_embedded_list_read_program_version_major_s F_string_ascii_period_s fss_embedded_list_read_program_version_minor_s F_string_ascii_period_s fss_embedded_list_read_program_version_micro_s fss_embedded_list_read_program_version_nano_prefix_s fss_embedded_list_read_program_version_nano_s +#endif // _di_fss_embedded_list_read_program_version_ -#ifndef _di_fss_embedded_list_read_name_ - #define fss_embedded_list_read_name "fss_embedded_list_read" - #define fss_embedded_list_read_name_long "FSS Embedded List Read" -#endif // _di_fss_embedded_list_read_name_ +#ifndef _di_fss_embedded_list_read_program_name_ + #define fss_embedded_list_read_program_name_s "fss_embedded_list_read" + #define fss_embedded_list_read_program_name_long_s "FSS Embedded List Read" +#endif // _di_fss_embedded_list_read_program_name_ #ifndef _di_fss_embedded_list_read_defines_ - #define fss_embedded_list_read_pipe_content_end '\f' - #define fss_embedded_list_read_pipe_content_ignore '\v' - #define fss_embedded_list_read_pipe_content_start '\b' - - #define fss_embedded_list_read_short_at "a" - #define fss_embedded_list_read_short_content "c" - #define fss_embedded_list_read_short_columns "C" - #define fss_embedded_list_read_short_delimit "D" - #define fss_embedded_list_read_short_depth "d" - #define fss_embedded_list_read_short_empty "e" - #define fss_embedded_list_read_short_line "l" - #define fss_embedded_list_read_short_name "n" - #define fss_embedded_list_read_short_object "o" - #define fss_embedded_list_read_short_pipe "p" - #define fss_embedded_list_read_short_raw "R" - #define fss_embedded_list_read_short_select "s" - #define fss_embedded_list_read_short_total "t" - #define fss_embedded_list_read_short_trim "T" - - #define fss_embedded_list_read_long_at "at" - #define fss_embedded_list_read_long_content "content" - #define fss_embedded_list_read_long_columns "columns" - #define fss_embedded_list_read_long_delimit "delimit" - #define fss_embedded_list_read_long_depth "depth" - #define fss_embedded_list_read_long_empty "empty" - #define fss_embedded_list_read_long_line "line" - #define fss_embedded_list_read_long_name "name" - #define fss_embedded_list_read_long_object "object" - #define fss_embedded_list_read_long_pipe "pipe" - #define fss_embedded_list_read_long_raw "raw" - #define fss_embedded_list_read_long_select "select" - #define fss_embedded_list_read_long_total "total" - #define fss_embedded_list_read_long_trim "trim" + #define fss_embedded_list_read_pipe_content_end_s '\f' + #define fss_embedded_list_read_pipe_content_ignore_s '\v' + #define fss_embedded_list_read_pipe_content_start_s '\b' + + #define fss_embedded_list_read_short_at_s "a" + #define fss_embedded_list_read_short_content_s "c" + #define fss_embedded_list_read_short_columns_s "C" + #define fss_embedded_list_read_short_delimit_s "D" + #define fss_embedded_list_read_short_depth_s "d" + #define fss_embedded_list_read_short_empty_s "e" + #define fss_embedded_list_read_short_line_s "l" + #define fss_embedded_list_read_short_name_s "n" + #define fss_embedded_list_read_short_object_s "o" + #define fss_embedded_list_read_short_pipe_s "p" + #define fss_embedded_list_read_short_raw_s "R" + #define fss_embedded_list_read_short_select_s "s" + #define fss_embedded_list_read_short_total_s "t" + #define fss_embedded_list_read_short_trim_s "T" + + #define fss_embedded_list_read_long_at_s "at" + #define fss_embedded_list_read_long_content_s "content" + #define fss_embedded_list_read_long_columns_s "columns" + #define fss_embedded_list_read_long_delimit_s "delimit" + #define fss_embedded_list_read_long_depth_s "depth" + #define fss_embedded_list_read_long_empty_s "empty" + #define fss_embedded_list_read_long_line_s "line" + #define fss_embedded_list_read_long_name_s "name" + #define fss_embedded_list_read_long_object_s "object" + #define fss_embedded_list_read_long_pipe_s "pipe" + #define fss_embedded_list_read_long_raw_s "raw" + #define fss_embedded_list_read_long_select_s "select" + #define fss_embedded_list_read_long_total_s "total" + #define fss_embedded_list_read_long_trim_s "trim" enum { fss_embedded_list_read_parameter_help, @@ -144,35 +144,35 @@ extern "C" { f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_at, fss_embedded_list_read_long_at, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_content, fss_embedded_list_read_long_content, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_columns, fss_embedded_list_read_long_columns, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_delimit, fss_embedded_list_read_long_delimit, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_depth, fss_embedded_list_read_long_depth, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_empty, fss_embedded_list_read_long_empty, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_line, fss_embedded_list_read_long_line, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_name, fss_embedded_list_read_long_name, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_object, fss_embedded_list_read_long_object, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_pipe, fss_embedded_list_read_long_pipe, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_raw, fss_embedded_list_read_long_raw, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_select, fss_embedded_list_read_long_select, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_total, fss_embedded_list_read_long_total, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_read_short_trim, fss_embedded_list_read_long_trim, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_at_s, fss_embedded_list_read_long_at_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_content_s, fss_embedded_list_read_long_content_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_columns_s, fss_embedded_list_read_long_columns_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_delimit_s, fss_embedded_list_read_long_delimit_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_depth_s, fss_embedded_list_read_long_depth_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_empty_s, fss_embedded_list_read_long_empty_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_line_s, fss_embedded_list_read_long_line_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_name_s, fss_embedded_list_read_long_name_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_object_s, fss_embedded_list_read_long_object_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_pipe_s, fss_embedded_list_read_long_pipe_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_raw_s, fss_embedded_list_read_long_raw_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_select_s, fss_embedded_list_read_long_select_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_total_s, fss_embedded_list_read_long_total_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_embedded_list_read_short_trim_s, fss_embedded_list_read_long_trim_s, 0, 0, f_console_type_normal), \ } - #define fss_embedded_list_read_total_parameters 23 + #define fss_embedded_list_read_total_parameters_d 23 #endif // _di_fss_embedded_list_read_defines_ #ifndef _di_fss_embedded_list_read_delimit_mode_ - #define fss_embedded_list_read_delimit_mode_name_none "none" - #define fss_embedded_list_read_delimit_mode_name_all "all" - #define fss_embedded_list_read_delimit_mode_name_greater "+" - #define fss_embedded_list_read_delimit_mode_name_lesser "-" + #define fss_embedded_list_read_delimit_mode_name_none_s "none" + #define fss_embedded_list_read_delimit_mode_name_all_s "all" + #define fss_embedded_list_read_delimit_mode_name_greater_s "+" + #define fss_embedded_list_read_delimit_mode_name_lesser_s "-" - #define fss_embedded_list_read_delimit_mode_name_none_length 4 - #define fss_embedded_list_read_delimit_mode_name_all_length 3 - #define fss_embedded_list_read_delimit_mode_name_greater_length 1 - #define fss_embedded_list_read_delimit_mode_name_lesser_length 1 + #define fss_embedded_list_read_delimit_mode_name_none_s_length 4 + #define fss_embedded_list_read_delimit_mode_name_all_s_length 3 + #define fss_embedded_list_read_delimit_mode_name_greater_s_length 1 + #define fss_embedded_list_read_delimit_mode_name_lesser_s_length 1 enum { fss_embedded_list_read_delimit_mode_none = 1, @@ -185,7 +185,7 @@ extern "C" { #ifndef _di_fss_embedded_list_read_main_t_ typedef struct { - f_console_parameter_t parameters[fss_embedded_list_read_total_parameters]; + f_console_parameter_t parameters[fss_embedded_list_read_total_parameters_d]; f_array_lengths_t remaining; bool process_pipe; diff --git a/level_3/fss_embedded_list_read/c/main.c b/level_3/fss_embedded_list_read/c/main.c index 0497df5..a874c21 100644 --- a/level_3/fss_embedded_list_read/c/main.c +++ b/level_3/fss_embedded_list_read/c/main.c @@ -12,13 +12,13 @@ int main(const int argc, const f_string_t *argv) { const f_status_t status = fss_embedded_list_read_main(arguments, &data); // flush output pipes before closing. - fflush(f_type_output); - fflush(f_type_error); + fflush(F_type_output_d); + fflush(F_type_error_d); // close all open file descriptors. - close(f_type_descriptor_output); - close(f_type_descriptor_input); - close(f_type_descriptor_error); + close(F_type_descriptor_output_d); + close(F_type_descriptor_input_d); + close(F_type_descriptor_error_d); if (F_status_is_error(status)) { return 1; diff --git a/level_3/fss_embedded_list_read/c/private-common.h b/level_3/fss_embedded_list_read/c/private-common.h index 40f6988..4ce89d9 100644 --- a/level_3/fss_embedded_list_read/c/private-common.h +++ b/level_3/fss_embedded_list_read/c/private-common.h @@ -20,8 +20,8 @@ extern "C" { * - small: An allocation step used for buffers that are anticipated to have small buffers. */ #ifndef _di_fss_embedded_list_read_common_ - #define fss_embedded_list_read_common_allocation_large 256 - #define fss_embedded_list_read_common_allocation_small 16 + #define fss_embedded_list_read_common_allocation_large_d 256 + #define fss_embedded_list_read_common_allocation_small_d 16 #endif // _di_fss_embedded_list_read_common_ /** diff --git a/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.c b/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.c index a6d010a..d41b0b5 100644 --- a/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.c +++ b/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.c @@ -130,7 +130,7 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments.argv[values_order[i]], range, &number); if (F_status_is_error(status)) { - fll_error_parameter_integer_print(main.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_depth, arguments.argv[values_order[i]]); + fll_error_parameter_integer_print(main.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_depth_s, arguments.argv[values_order[i]]); return status; } @@ -197,7 +197,7 @@ extern "C" { fl_print_format("%c%[%sThe value '%]", main.error.to.stream, f_string_eol_s[0], main.error.context, main.error.prefix, main.error.context); fl_print_format("%[%ul%]", main.error.to.stream, main.error.notable, depths->array[i].depth, main.error.notable); fl_print_format("%[' may only be specified once for the parameter '%]", main.error.to.stream, main.error.notable, main.error.notable); - fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth, main.error.notable); + fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth_s, main.error.notable); fl_print_format("%['.%]%c", main.error.to.stream, main.error.context, main.error.context, f_string_eol_s[0]); funlockfile(main.error.to.stream); @@ -208,7 +208,7 @@ extern "C" { flockfile(main.error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main.error.to.stream, f_string_eol_s[0], main.error.context, main.error.prefix, main.error.context); - fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth, main.error.notable); + fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth_s, main.error.notable); fl_print_format("%[' may not have the value '%]", main.error.to.stream, main.error.notable, main.error.notable); fl_print_format("%[%ul%]", main.error.to.stream, main.error.notable, depths->array[i].depth, main.error.notable); fl_print_format("%[' before the value '%]", main.error.to.stream, main.error.notable, main.error.notable); @@ -232,7 +232,7 @@ extern "C" { f_status_t status = F_none; { - f_state_t state = macro_f_state_t_initialize(fss_embedded_list_read_common_allocation_large, fss_embedded_list_read_common_allocation_small, 0, 0, 0, 0, 0); + f_state_t state = macro_f_state_t_initialize(fss_embedded_list_read_common_allocation_large_d, fss_embedded_list_read_common_allocation_small_d, 0, 0, 0, 0, 0); f_string_range_t input = macro_f_string_range_t_initialize(main->buffer.used); objects_delimits->used = 0; @@ -271,7 +271,7 @@ extern "C" { // comments are not to be part of the file, so remove them. for (; i < comments->used; ++i) { for (j = comments->array[i].start; j <= comments->array[i].stop; ++j) { - main->buffer.string[j] = f_fss_delimit_placeholder; + main->buffer.string[j] = F_fss_delimit_placeholder_s; } // for } // for } @@ -297,7 +297,7 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &select); if (F_status_is_error(status)) { - fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_select, arguments.argv[index]); + fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_select_s, arguments.argv[index]); return status; } @@ -318,7 +318,7 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &line); if (F_status_is_error(status)) { - fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_line, arguments.argv[index]); + fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_line_s, arguments.argv[index]); return status; } @@ -650,7 +650,7 @@ extern "C" { f_print_except_dynamic_partial(main->buffer, items->array[i].content.array[0], *contents_delimits, main->output.to.stream); if (main->parameters[fss_embedded_list_read_parameter_pipe].result == f_console_result_found) { - f_print_character(fss_embedded_list_read_pipe_content_end, main->output.to.stream); + f_print_character(fss_embedded_list_read_pipe_content_end_s, main->output.to.stream); } } // for @@ -664,15 +664,15 @@ extern "C" { void fss_embedded_list_read_print_object_end(const fss_embedded_list_read_main_t main) { if (main.parameters[fss_embedded_list_read_parameter_pipe].result == f_console_result_found) { - f_print_character(fss_embedded_list_read_pipe_content_start, main.output.to.stream); + f_print_character(fss_embedded_list_read_pipe_content_start_s, main.output.to.stream); } else { if (main.parameters[fss_embedded_list_read_parameter_object].result == f_console_result_found && main.parameters[fss_embedded_list_read_parameter_content].result == f_console_result_found) { - f_print_character(f_fss_embedded_list_open, main.output.to.stream); - f_print_character(f_fss_embedded_list_open_end, main.output.to.stream); + f_print_character(f_fss_embedded_list_open_s[0], main.output.to.stream); + f_print_character(f_fss_embedded_list_open_end_s[0], main.output.to.stream); } else { - f_print_character(f_fss_eol, main.output.to.stream); + f_print_character(f_fss_eol_s[0], main.output.to.stream); } } } @@ -682,7 +682,7 @@ extern "C" { void fss_embedded_list_read_print_content_ignore(const fss_embedded_list_read_main_t main) { if (main.parameters[fss_embedded_list_read_parameter_pipe].result == f_console_result_found) { - f_print_character(fss_embedded_list_read_pipe_content_ignore, main.output.to.stream); + f_print_character(fss_embedded_list_read_pipe_content_ignore_s, main.output.to.stream); } } #endif // _di_fss_embedded_list_read_print_content_ignore_ @@ -691,15 +691,15 @@ extern "C" { void fss_embedded_list_read_print_set_end(const fss_embedded_list_read_main_t main) { if (main.parameters[fss_embedded_list_read_parameter_pipe].result == f_console_result_found) { - f_print_character(fss_embedded_list_read_pipe_content_end, main.output.to.stream); + f_print_character(fss_embedded_list_read_pipe_content_end_s, main.output.to.stream); } else { if (main.parameters[fss_embedded_list_read_parameter_object].result == f_console_result_found && main.parameters[fss_embedded_list_read_parameter_content].result == f_console_result_found) { - f_print_character(f_fss_embedded_list_close, main.output.to.stream); - f_print_character(f_fss_embedded_list_close_end, main.output.to.stream); + f_print_character(f_fss_embedded_list_close_s[0], main.output.to.stream); + f_print_character(f_fss_embedded_list_close_end_s[0], main.output.to.stream); } else { - f_print_character(f_fss_eol, main.output.to.stream); + f_print_character(f_fss_eol_s[0], main.output.to.stream); } } } diff --git a/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.h b/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.h index e06b920..a16a732 100644 --- a/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.h +++ b/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.h @@ -30,7 +30,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fss_embedded_list_read_main_preprocess_depth_ - extern f_status_t fss_embedded_list_read_main_preprocess_depth(const f_console_arguments_t arguments, const fss_embedded_list_read_main_t main, fss_embedded_list_read_depths_t *depths) f_attribute_visibility_internal; + extern f_status_t fss_embedded_list_read_main_preprocess_depth(const f_console_arguments_t arguments, const fss_embedded_list_read_main_t main, fss_embedded_list_read_depths_t *depths) F_attribute_visibility_internal_d; #endif // _di_fss_embedded_list_read_main_preprocess_depth_ /** @@ -61,7 +61,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fss_embedded_list_read_main_process_file_ - extern f_status_t fss_embedded_list_read_main_process_file(const f_console_arguments_t arguments, fss_embedded_list_read_main_t *main, const f_string_t file_name, const fss_embedded_list_read_depths_t depths, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits, f_fss_comments_t *comments) f_attribute_visibility_internal; + extern f_status_t fss_embedded_list_read_main_process_file(const f_console_arguments_t arguments, fss_embedded_list_read_main_t *main, const f_string_t file_name, const fss_embedded_list_read_depths_t depths, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits, f_fss_comments_t *comments) F_attribute_visibility_internal_d; #endif // _di_fss_embedded_list_read_main_process_file_ /** @@ -97,7 +97,7 @@ extern "C" { * @see fss_embedded_list_read_main_process_file() */ #ifndef _di_fss_embedded_list_read_main_process_for_depth_ - extern f_status_t fss_embedded_list_read_main_process_for_depth(const f_console_arguments_t arguments, const f_string_t filename, const fss_embedded_list_read_depths_t depths, const f_array_length_t depths_index, const f_array_length_t line, const fss_embedded_list_read_skip_t parents, fss_embedded_list_read_main_t *main, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits) f_attribute_visibility_internal; + extern f_status_t fss_embedded_list_read_main_process_for_depth(const f_console_arguments_t arguments, const f_string_t filename, const fss_embedded_list_read_depths_t depths, const f_array_length_t depths_index, const f_array_length_t line, const fss_embedded_list_read_skip_t parents, fss_embedded_list_read_main_t *main, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits) F_attribute_visibility_internal_d; #endif // _di_fss_embedded_list_read_main_process_for_depth_ /** @@ -109,7 +109,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_embedded_list_read_print_content_ignore_ - extern void fss_embedded_list_read_print_content_ignore(const fss_embedded_list_read_main_t main) f_attribute_visibility_internal; + extern void fss_embedded_list_read_print_content_ignore(const fss_embedded_list_read_main_t main) F_attribute_visibility_internal_d; #endif // _di_fss_embedded_list_read_print_content_ignore_ /** @@ -119,7 +119,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_embedded_list_read_print_object_end_ - extern void fss_embedded_list_read_print_object_end(const fss_embedded_list_read_main_t main) f_attribute_visibility_internal; + extern void fss_embedded_list_read_print_object_end(const fss_embedded_list_read_main_t main) F_attribute_visibility_internal_d; #endif // _di_fss_embedded_list_read_print_object_end_ /** @@ -129,7 +129,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_embedded_list_read_print_set_end_ - extern void fss_embedded_list_read_print_set_end(const fss_embedded_list_read_main_t main) f_attribute_visibility_internal; + extern void fss_embedded_list_read_print_set_end(const fss_embedded_list_read_main_t main) F_attribute_visibility_internal_d; #endif // _di_fss_embedded_list_read_print_set_end_ /** @@ -145,7 +145,7 @@ extern "C" { * @see fss_embedded_list_read_main_process_file() */ #ifndef _di_fss_embedded_list_read_process_delimits_ - extern void fss_embedded_list_read_process_delimits(const fss_embedded_list_read_main_t main, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits) f_attribute_visibility_internal; + extern void fss_embedded_list_read_process_delimits(const fss_embedded_list_read_main_t main, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits) F_attribute_visibility_internal_d; #endif // _di_fss_embedded_list_read_process_delimits_ /** @@ -165,7 +165,7 @@ extern "C" { * @see fss_embedded_list_read_process_delimits() */ #ifndef _di_fss_embedded_list_read_process_delimits_contents_ - extern void fss_embedded_list_read_process_delimits_contents(const fss_embedded_list_read_main_t main, const f_array_length_t depth, const f_array_length_t original_delimits[], const f_array_length_t original_used, f_fss_delimits_t *delimits) f_attribute_visibility_internal; + extern void fss_embedded_list_read_process_delimits_contents(const fss_embedded_list_read_main_t main, const f_array_length_t depth, const f_array_length_t original_delimits[], const f_array_length_t original_used, f_fss_delimits_t *delimits) F_attribute_visibility_internal_d; #endif // _di_fss_embedded_list_read_process_delimits_contents_ /** @@ -185,7 +185,7 @@ extern "C" { * @see fss_embedded_list_read_process_delimits() */ #ifndef _di_fss_embedded_list_read_process_delimits_objects_ - extern void fss_embedded_list_read_process_delimits_objects(const fss_embedded_list_read_main_t main, const f_array_length_t depth, const f_array_length_t original_delimits[], const f_array_length_t original_used, f_fss_delimits_t *delimits) f_attribute_visibility_internal; + extern void fss_embedded_list_read_process_delimits_objects(const fss_embedded_list_read_main_t main, const f_array_length_t depth, const f_array_length_t original_delimits[], const f_array_length_t original_used, f_fss_delimits_t *delimits) F_attribute_visibility_internal_d; #endif // _di_fss_embedded_list_read_process_delimits_objects_ /** @@ -206,7 +206,7 @@ extern "C" { * @see fss_embedded_list_read_process_delimits_contents() */ #ifndef _di_fss_embedded_list_read_process_delimits_within_greater_ - extern f_status_t fss_embedded_list_read_process_delimits_within_greater(const fss_embedded_list_read_main_t main, const f_array_length_t depth, const f_array_length_t location) f_attribute_visibility_internal; + extern f_status_t fss_embedded_list_read_process_delimits_within_greater(const fss_embedded_list_read_main_t main, const f_array_length_t depth, const f_array_length_t location) F_attribute_visibility_internal_d; #endif // _di_fss_embedded_list_read_process_delimits_within_greater_ #ifdef __cplusplus diff --git a/level_3/fss_embedded_list_write/c/fss_embedded_list_write.c b/level_3/fss_embedded_list_write/c/fss_embedded_list_write.c index 009abc2..fcd97e6 100644 --- a/level_3/fss_embedded_list_write/c/fss_embedded_list_write.c +++ b/level_3/fss_embedded_list_write/c/fss_embedded_list_write.c @@ -11,7 +11,7 @@ extern "C" { flockfile(file.stream); - fll_program_print_help_header(file, context, fss_embedded_list_write_name_long, fss_embedded_list_write_version); + fll_program_print_help_header(file, context, fss_embedded_list_write_program_name_long_s, fss_embedded_list_write_program_version_s); fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); @@ -25,17 +25,17 @@ extern "C" { f_print_character(f_string_eol_s[0], file.stream); - fll_program_print_help_option(file, context, fss_embedded_list_write_short_file, fss_embedded_list_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send file to."); - fll_program_print_help_option(file, context, fss_embedded_list_write_short_content, fss_embedded_list_write_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to file."); - fll_program_print_help_option(file, context, fss_embedded_list_write_short_double, fss_embedded_list_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); - fll_program_print_help_option(file, context, fss_embedded_list_write_short_ignore, fss_embedded_list_write_long_ignore, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content."); - fll_program_print_help_option(file, context, fss_embedded_list_write_short_object, fss_embedded_list_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to file."); - fll_program_print_help_option(file, context, fss_embedded_list_write_short_partial, fss_embedded_list_write_long_partial, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not file end of Object/Content character."); - fll_program_print_help_option(file, context, fss_embedded_list_write_short_prepend, fss_embedded_list_write_long_prepend, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content."); - fll_program_print_help_option(file, context, fss_embedded_list_write_short_single, fss_embedded_list_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); - fll_program_print_help_option(file, context, fss_embedded_list_write_short_trim, fss_embedded_list_write_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names."); + fll_program_print_help_option(file, context, fss_embedded_list_write_short_file_s, fss_embedded_list_write_long_file_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send file to."); + fll_program_print_help_option(file, context, fss_embedded_list_write_short_content_s, fss_embedded_list_write_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to file."); + fll_program_print_help_option(file, context, fss_embedded_list_write_short_double_s, fss_embedded_list_write_long_double_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); + fll_program_print_help_option(file, context, fss_embedded_list_write_short_ignore_s, fss_embedded_list_write_long_ignore_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content."); + fll_program_print_help_option(file, context, fss_embedded_list_write_short_object_s, fss_embedded_list_write_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to file."); + fll_program_print_help_option(file, context, fss_embedded_list_write_short_partial_s, fss_embedded_list_write_long_partial_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not file end of Object/Content character."); + fll_program_print_help_option(file, context, fss_embedded_list_write_short_prepend_s, fss_embedded_list_write_long_prepend_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content."); + fll_program_print_help_option(file, context, fss_embedded_list_write_short_single_s, fss_embedded_list_write_long_single_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); + fll_program_print_help_option(file, context, fss_embedded_list_write_short_trim_s, fss_embedded_list_write_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names."); - fll_program_print_help_usage(file, context, fss_embedded_list_write_name, f_string_empty_s); + fll_program_print_help_usage(file, context, fss_embedded_list_write_program_name_s, f_string_empty_s); fl_print_format(" The pipe uses the Backspace character '%[\\b%]' (%[U+0008%]) to designate the start of a Content.%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]); fl_print_format(" The pipe uses the Form Feed character '%[\\f%]' (%[U+000C%]) to designate the end of the last Content.%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]); @@ -44,14 +44,14 @@ extern "C" { fl_print_format(" or a Form Feed character '%[\\f%]' (%[U+000C%]).%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]); fl_print_format(" The end of the pipe represents the end of any Object or Content.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The FSS-0008 (Embedded List) specification does not support quoted names, therefore the parameters '%[%s%s%]'", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_single, context.set.notable); - fl_print_format(" and '%[%s%s%]' do nothing.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_double, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" The FSS-0008 (Embedded List) specification does not support quoted names, therefore the parameters '%[%s%s%]'", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_single_s, context.set.notable); + fl_print_format(" and '%[%s%s%]' do nothing.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_double_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameter '%[%s%s%]' designates to not escape any valid nested Object or Content within some Content.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_ignore, context.set.notable, f_string_eol_s[0]); + fl_print_format(" The parameter '%[%s%s%]' designates to not escape any valid nested Object or Content within some Content.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_ignore_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" This parameter requires two values.%c", file.stream, f_string_eol_s[0]); fl_print_format(" This parameter is not used for ignoring anything from the input pipe.%c", file.stream, f_string_eol_s[0]); - fl_print_format(" This parameter must be specified after a '%[%s%s%]'", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content, context.set.notable); - fl_print_format(" parameter and this applies only to the Content represented by that specific '%[%s%s%]' parameter.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" This parameter must be specified after a '%[%s%s%]'", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content_s, context.set.notable); + fl_print_format(" parameter and this applies only to the Content represented by that specific '%[%s%s%]' parameter.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); funlockfile(file.stream); @@ -64,7 +64,7 @@ extern "C" { f_status_t status = F_none; { - const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_embedded_list_write_total_parameters); + const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_embedded_list_write_total_parameters_d); { f_console_parameter_id_t ids[3] = { fss_embedded_list_write_parameter_no_color, fss_embedded_list_write_parameter_light, fss_embedded_list_write_parameter_dark }; @@ -137,7 +137,7 @@ extern "C" { } if (main->parameters[fss_embedded_list_write_parameter_version].result == f_console_result_found) { - fll_program_print_version(main->output.to, fss_embedded_list_write_version); + fll_program_print_version(main->output.to, fss_embedded_list_write_program_version_s); fss_embedded_list_write_main_delete(main); return status; @@ -145,9 +145,9 @@ extern "C" { f_file_t output = f_file_t_initialize; - output.id = f_type_descriptor_output; - output.stream = f_type_output; - output.flag = f_file_flag_create | f_file_flag_write_only | f_file_flag_append; + output.id = F_type_descriptor_output_d; + output.stream = F_type_output_d; + output.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d; if (F_status_is_error_not(status)) { if (main->parameters[fss_embedded_list_write_parameter_file].result == f_console_result_additional) { @@ -156,7 +156,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_file, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_file_s, main->error.notable); fl_print_format("%[' may only be specified once.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -177,7 +177,7 @@ extern "C" { } } else if (main->parameters[fss_embedded_list_write_parameter_file].result == f_console_result_found) { - fss_embedded_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_embedded_list_write_long_file); + fss_embedded_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_embedded_list_write_long_file_s); status = F_status_set_error(F_parameter); } } @@ -186,11 +186,11 @@ extern "C" { if (main->parameters[fss_embedded_list_write_parameter_object].locations.used || main->parameters[fss_embedded_list_write_parameter_content].locations.used) { if (main->parameters[fss_embedded_list_write_parameter_object].locations.used) { if (main->parameters[fss_embedded_list_write_parameter_object].locations.used != main->parameters[fss_embedded_list_write_parameter_object].values.used) { - fss_embedded_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_embedded_list_write_long_object); + fss_embedded_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_embedded_list_write_long_object_s); status = F_status_set_error(F_parameter); } else if (main->parameters[fss_embedded_list_write_parameter_content].locations.used != main->parameters[fss_embedded_list_write_parameter_content].values.used) { - fss_embedded_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content); + fss_embedded_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content_s); status = F_status_set_error(F_parameter); } else if (main->parameters[fss_embedded_list_write_parameter_object].locations.used != main->parameters[fss_embedded_list_write_parameter_content].locations.used && main->parameters[fss_embedded_list_write_parameter_partial].result == f_console_result_none) { @@ -203,11 +203,11 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_partial, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter only allows either the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_object, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_object_s, main->error.notable); fl_print_format("%[' parameter or the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content_s, main->error.notable); fl_print_format("%[' parameter, but not both.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -235,9 +235,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sEach '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_object, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_object_s, main->error.notable); fl_print_format("%[' parameter must be specified before a '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -252,7 +252,7 @@ extern "C" { } else if (main->parameters[fss_embedded_list_write_parameter_content].locations.used) { if (main->parameters[fss_embedded_list_write_parameter_content].locations.used != main->parameters[fss_embedded_list_write_parameter_content].values.used) { - fss_embedded_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content); + fss_embedded_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content_s); status = F_status_set_error(F_parameter); } else if (!main->parameters[fss_embedded_list_write_parameter_partial].locations.used) { @@ -266,9 +266,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThis requires either piped data or the use of the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_object, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_object_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -283,7 +283,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThis '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_partial, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter cannot be used when processing a pipe.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -300,7 +300,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_prepend, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_prepend_s, main->error.notable); fl_print_format("%[' was specified, but no value was given.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -329,7 +329,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_prepend, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_prepend_s, main->error.notable); fl_print_format("%[' must only contain whitespace.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -345,7 +345,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_prepend, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_prepend_s, main->error.notable); fl_print_format("%[' must not be an empty string.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -362,7 +362,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_ignore, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_ignore_s, main->error.notable); fl_print_format("%[' was specified, but no values were given.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -378,7 +378,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_ignore, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_ignore_s, main->error.notable); fl_print_format("%[' requires two values.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -388,18 +388,18 @@ extern "C" { } } - f_fss_quote_t quote = f_fss_delimit_quote_double; + f_fss_quote_t quote = F_fss_delimit_quote_double_s; if (F_status_is_error_not(status)) { if (main->parameters[fss_embedded_list_write_parameter_double].result == f_console_result_found) { if (main->parameters[fss_embedded_list_write_parameter_single].result == f_console_result_found) { if (main->parameters[fss_embedded_list_write_parameter_double].location < main->parameters[fss_embedded_list_write_parameter_single].location) { - quote = f_fss_delimit_quote_single; + quote = F_fss_delimit_quote_single_s; } } } else if (main->parameters[fss_embedded_list_write_parameter_single].result == f_console_result_found) { - quote = f_fss_delimit_quote_single; + quote = F_fss_delimit_quote_single_s; } } @@ -530,7 +530,7 @@ extern "C" { #ifndef _di_fss_embedded_list_write_main_delete_ f_status_t fss_embedded_list_write_main_delete(fss_embedded_list_write_main_t *main) { - for (f_array_length_t i = 0; i < fss_embedded_list_write_total_parameters; ++i) { + for (f_array_length_t i = 0; i < fss_embedded_list_write_total_parameters_d; ++i) { macro_f_array_lengths_t_delete_simple(main->parameters[i].locations); macro_f_array_lengths_t_delete_simple(main->parameters[i].locations_sub); macro_f_array_lengths_t_delete_simple(main->parameters[i].values); diff --git a/level_3/fss_embedded_list_write/c/fss_embedded_list_write.h b/level_3/fss_embedded_list_write/c/fss_embedded_list_write.h index 37e013d..276a843 100644 --- a/level_3/fss_embedded_list_write/c/fss_embedded_list_write.h +++ b/level_3/fss_embedded_list_write/c/fss_embedded_list_write.h @@ -45,51 +45,51 @@ extern "C" { #endif -#ifndef _di_fss_embedded_list_write_version_ - #define fss_embedded_list_write_major_version f_string_ascii_0 - #define fss_embedded_list_write_minor_version f_string_ascii_5 - #define fss_embedded_list_write_micro_version f_string_ascii_6 +#ifndef _di_fss_embedded_list_write_program_version_ + #define fss_embedded_list_write_program_version_major_s F_string_ascii_0_s + #define fss_embedded_list_write_program_version_minor_s F_string_ascii_5_s + #define fss_embedded_list_write_program_version_micro_s F_string_ascii_6_s - #ifndef fss_embedded_list_write_nano_version_prefix - #define fss_embedded_list_write_nano_version_prefix + #ifndef fss_embedded_list_write_program_version_nano_prefix_s + #define fss_embedded_list_write_program_version_nano_prefix_s #endif - #ifndef fss_embedded_list_write_nano_version - #define fss_embedded_list_write_nano_version + #ifndef fss_embedded_list_write_program_version_nano_s + #define fss_embedded_list_write_program_version_nano_s #endif - #define fss_embedded_list_write_version fss_embedded_list_write_major_version f_string_ascii_period fss_embedded_list_write_minor_version f_string_ascii_period fss_embedded_list_write_micro_version fss_embedded_list_write_nano_version_prefix fss_embedded_list_write_nano_version -#endif // _di_fss_embedded_list_write_version_ + #define fss_embedded_list_write_program_version_s fss_embedded_list_write_program_version_major_s F_string_ascii_period_s fss_embedded_list_write_program_version_minor_s F_string_ascii_period_s fss_embedded_list_write_program_version_micro_s fss_embedded_list_write_program_version_nano_prefix_s fss_embedded_list_write_program_version_nano_s +#endif // _di_fss_embedded_list_write_program_version_ -#ifndef _di_fss_embedded_list_write_name_ - #define fss_embedded_list_write_name "fss_embedded_list_write" - #define fss_embedded_list_write_name_long "FSS Embedded List Write" -#endif // _di_fss_embedded_list_write_name_ +#ifndef _di_fss_embedded_list_write_program_name_ + #define fss_embedded_list_write_program_name_s "fss_embedded_list_write" + #define fss_embedded_list_write_program_name_long_s "FSS Embedded List Write" +#endif // _di_fss_embedded_list_write_program_name_ #ifndef _di_fss_embedded_list_write_defines_ - #define fss_embedded_list_write_pipe_content_end '\f' - #define fss_embedded_list_write_pipe_content_ignore '\v' - #define fss_embedded_list_write_pipe_content_start '\b' - - #define fss_embedded_list_write_short_file "f" - #define fss_embedded_list_write_short_content "c" - #define fss_embedded_list_write_short_double "d" - #define fss_embedded_list_write_short_ignore "I" - #define fss_embedded_list_write_short_object "o" - #define fss_embedded_list_write_short_partial "p" - #define fss_embedded_list_write_short_prepend "P" - #define fss_embedded_list_write_short_single "s" - #define fss_embedded_list_write_short_trim "T" - - #define fss_embedded_list_write_long_file "file" - #define fss_embedded_list_write_long_content "content" - #define fss_embedded_list_write_long_double "double" - #define fss_embedded_list_write_long_ignore "ignore" - #define fss_embedded_list_write_long_object "object" - #define fss_embedded_list_write_long_partial "partial" - #define fss_embedded_list_write_long_prepend "prepend" - #define fss_embedded_list_write_long_single "single" - #define fss_embedded_list_write_long_trim "trim" + #define fss_embedded_list_write_pipe_content_end_s '\f' + #define fss_embedded_list_write_pipe_content_ignore_s '\v' + #define fss_embedded_list_write_pipe_content_start_s '\b' + + #define fss_embedded_list_write_short_file_s "f" + #define fss_embedded_list_write_short_content_s "c" + #define fss_embedded_list_write_short_double_s "d" + #define fss_embedded_list_write_short_ignore_s "I" + #define fss_embedded_list_write_short_object_s "o" + #define fss_embedded_list_write_short_partial_s "p" + #define fss_embedded_list_write_short_prepend_s "P" + #define fss_embedded_list_write_short_single_s "s" + #define fss_embedded_list_write_short_trim_s "T" + + #define fss_embedded_list_write_long_file_s "file" + #define fss_embedded_list_write_long_content_s "content" + #define fss_embedded_list_write_long_double_s "double" + #define fss_embedded_list_write_long_ignore_s "ignore" + #define fss_embedded_list_write_long_object_s "object" + #define fss_embedded_list_write_long_partial_s "partial" + #define fss_embedded_list_write_long_prepend_s "prepend" + #define fss_embedded_list_write_long_single_s "single" + #define fss_embedded_list_write_long_trim_s "trim" enum { fss_embedded_list_write_parameter_help, @@ -124,23 +124,23 @@ extern "C" { f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(fss_embedded_list_write_short_file, fss_embedded_list_write_long_file, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_write_short_content, fss_embedded_list_write_long_content, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_write_short_double, fss_embedded_list_write_long_double, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_write_short_ignore, fss_embedded_list_write_long_ignore, 0, 2, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_write_short_object, fss_embedded_list_write_long_object, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_write_short_partial, fss_embedded_list_write_long_partial, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_write_short_prepend, fss_embedded_list_write_long_prepend, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_write_short_single, fss_embedded_list_write_long_single, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_embedded_list_write_short_trim, fss_embedded_list_write_long_trim, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_embedded_list_write_short_file_s, fss_embedded_list_write_long_file_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_embedded_list_write_short_content_s, fss_embedded_list_write_long_content_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_embedded_list_write_short_double_s, fss_embedded_list_write_long_double_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_embedded_list_write_short_ignore_s, fss_embedded_list_write_long_ignore_s, 0, 2, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_embedded_list_write_short_object_s, fss_embedded_list_write_long_object_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_embedded_list_write_short_partial_s, fss_embedded_list_write_long_partial_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_embedded_list_write_short_prepend_s, fss_embedded_list_write_long_prepend_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_embedded_list_write_short_single_s, fss_embedded_list_write_long_single_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_embedded_list_write_short_trim_s, fss_embedded_list_write_long_trim_s, 0, 0, f_console_type_normal), \ } - #define fss_embedded_list_write_total_parameters 18 + #define fss_embedded_list_write_total_parameters_d 18 #endif // _di_fss_embedded_list_write_defines_ #ifndef _di_fss_embedded_list_write_main_t_ typedef struct { - f_console_parameter_t parameters[fss_embedded_list_write_total_parameters]; + f_console_parameter_t parameters[fss_embedded_list_write_total_parameters_d]; f_array_lengths_t remaining; bool process_pipe; diff --git a/level_3/fss_embedded_list_write/c/main.c b/level_3/fss_embedded_list_write/c/main.c index d7f0a30..6f25d28 100644 --- a/level_3/fss_embedded_list_write/c/main.c +++ b/level_3/fss_embedded_list_write/c/main.c @@ -12,13 +12,13 @@ int main(const int argc, const f_string_t *argv) { const f_status_t status = fss_embedded_list_write_main(arguments, &data); // flush output pipes before closing. - fflush(f_type_output); - fflush(f_type_error); + fflush(F_type_output_d); + fflush(F_type_error_d); // close all open file descriptors. - close(f_type_descriptor_output); - close(f_type_descriptor_input); - close(f_type_descriptor_error); + close(F_type_descriptor_output_d); + close(F_type_descriptor_input_d); + close(F_type_descriptor_error_d); if (F_status_is_error(status)) { return 1; diff --git a/level_3/fss_embedded_list_write/c/private-common.h b/level_3/fss_embedded_list_write/c/private-common.h index 278dca7..8029fb0 100644 --- a/level_3/fss_embedded_list_write/c/private-common.h +++ b/level_3/fss_embedded_list_write/c/private-common.h @@ -21,8 +21,8 @@ extern "C" { * - small: An allocation step used for buffers that are anticipated to have small buffers. */ #ifndef _di_fss_embedded_list_write_common_ - #define fss_embedded_list_write_common_allocation_large 256 - #define fss_embedded_list_write_common_allocation_small 16 + #define fss_embedded_list_write_common_allocation_large_d 256 + #define fss_embedded_list_write_common_allocation_small_d 16 #endif // _di_fss_embedded_list_write_common_ #ifdef __cplusplus diff --git a/level_3/fss_embedded_list_write/c/private-fss_embedded_list_write.c b/level_3/fss_embedded_list_write/c/private-fss_embedded_list_write.c index bf0975e..66ee733 100644 --- a/level_3/fss_embedded_list_write/c/private-fss_embedded_list_write.c +++ b/level_3/fss_embedded_list_write/c/private-fss_embedded_list_write.c @@ -16,11 +16,11 @@ extern "C" { flockfile(main.error.to.stream); fl_print_format("%c%[%sMust specify the '%]", main.error.to.stream, f_string_eol_s[0], main.error.context, main.error.prefix, main.error.context); - fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_object, main.error.notable); + fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_object_s, main.error.notable); fl_print_format("%[' parameter and the '%]", main.error.to.stream, main.error.context, main.error.prefix, main.error.context); - fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content, main.error.notable); + fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content_s, main.error.notable); fl_print_format("%[' parameter the same number of times when not specifying the '%]", main.error.to.stream, main.error.context, main.error.prefix, main.error.context); - fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_partial, main.error.notable); + fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_partial_s, main.error.notable); fl_print_format("%[' parameter.%]%c", main.error.to.stream, main.error.context, main.error.context, f_string_eol_s[0]); funlockfile(main.error.to.stream); @@ -65,7 +65,7 @@ extern "C" { f_status_t fss_embedded_list_write_process(const fss_embedded_list_write_main_t main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, const f_string_ranges_t *ignore, f_string_dynamic_t *buffer) { f_status_t status = F_none; - f_state_t state = macro_f_state_t_initialize(fss_embedded_list_write_common_allocation_large, fss_embedded_list_write_common_allocation_small, 0, 0, 0, 0, 0); + f_state_t state = macro_f_state_t_initialize(fss_embedded_list_write_common_allocation_large_d, fss_embedded_list_write_common_allocation_small_d, 0, 0, 0, 0, 0); f_string_range_t range = f_string_range_t_initialize; if (object) { @@ -142,7 +142,7 @@ extern "C" { f_file_t input = f_file_t_initialize; - input.id = f_type_descriptor_input; + input.id = F_type_descriptor_input_d; input.size_read = 2048; f_array_length_t total = 0; @@ -202,19 +202,19 @@ extern "C" { for (; range.start <= range.stop; ++range.start) { - if (block.string[range.start] == fss_embedded_list_write_pipe_content_start) { + if (block.string[range.start] == fss_embedded_list_write_pipe_content_start_s) { state = 0x2; ++range.start; break; } - if (block.string[range.start] == fss_embedded_list_write_pipe_content_end) { + if (block.string[range.start] == fss_embedded_list_write_pipe_content_end_s) { state = 0x3; ++range.start; break; } - if (block.string[range.start] == fss_embedded_list_write_pipe_content_ignore) { + if (block.string[range.start] == fss_embedded_list_write_pipe_content_ignore_s) { // this is not used by objects. continue; } @@ -251,7 +251,7 @@ extern "C" { for (; range.start <= range.stop; ++range.start) { - if (block.string[range.start] == fss_embedded_list_write_pipe_content_start) { + if (block.string[range.start] == fss_embedded_list_write_pipe_content_start_s) { if (main.error.verbosity != f_console_verbosity_quiet) { fll_print_format("%c%[%sThis standard only supports one content per object.%]%c", main.error.to.stream, f_string_eol_s[0], main.error.context, main.error.prefix, main.error.context, f_string_eol_s[0]); } @@ -260,13 +260,13 @@ extern "C" { break; } - if (block.string[range.start] == fss_embedded_list_write_pipe_content_end) { + if (block.string[range.start] == fss_embedded_list_write_pipe_content_end_s) { state = 0x3; ++range.start; break; } - if (block.string[range.start] == fss_embedded_list_write_pipe_content_ignore) { + if (block.string[range.start] == fss_embedded_list_write_pipe_content_ignore_s) { if (ignore) { if (range_ignore.start > range_ignore.stop) { range_ignore.start = content.used; @@ -274,8 +274,8 @@ extern "C" { } else { if (ignore->used + 1 > ignore->size) { - if (ignore->size + f_fss_default_allocation_step > f_array_length_t_size) { - if (ignore->size + 1 > f_array_length_t_size) { + if (ignore->size + F_fss_default_allocation_step_d > F_array_length_t_size_d) { + if (ignore->size + 1 > F_array_length_t_size_d) { fll_error_print(main.error, F_string_too_large, "fss_embedded_list_write_process_pipe", F_true); status = F_status_set_error(F_string_too_large); @@ -285,7 +285,7 @@ extern "C" { macro_f_string_ranges_t_resize(status, (*ignore), ignore->size + 1); } else { - macro_f_string_ranges_t_resize(status, (*ignore), ignore->size + f_fss_default_allocation_step); + macro_f_string_ranges_t_resize(status, (*ignore), ignore->size + F_fss_default_allocation_step_d); } if (F_status_is_error(status)) { @@ -358,8 +358,8 @@ extern "C" { if (location + 1 < contents.used && l > contents.array[location + 1]) continue; if (ignore->used + 1 > ignore->size) { - if (ignore->size + f_fss_default_allocation_step > f_array_length_t_size) { - if (ignore->size + 1 > f_array_length_t_size) { + if (ignore->size + F_fss_default_allocation_step_d > F_array_length_t_size_d) { + if (ignore->size + 1 > F_array_length_t_size_d) { fll_error_print(main.error, F_string_too_large, "fss_embedded_list_write_process_parameter_ignore", F_true); return F_status_set_error(F_string_too_large); } @@ -367,7 +367,7 @@ extern "C" { macro_f_string_ranges_t_resize(status, (*ignore), ignore->size + 1); } else { - macro_f_string_ranges_t_resize(status, (*ignore), ignore->size + f_fss_default_allocation_step); + macro_f_string_ranges_t_resize(status, (*ignore), ignore->size + F_fss_default_allocation_step_d); } if (F_status_is_error(status)) { @@ -390,7 +390,7 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number); if (F_status_is_error(status)) { - fll_error_parameter_integer_print(main.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_write_long_ignore, arguments.argv[index]); + fll_error_parameter_integer_print(main.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_write_long_ignore_s, arguments.argv[index]); return status; } @@ -410,7 +410,7 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number); if (F_status_is_error(status)) { - fll_error_parameter_integer_print(main.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_write_long_ignore, arguments.argv[index]); + fll_error_parameter_integer_print(main.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_write_long_ignore_s, arguments.argv[index]); return status; } diff --git a/level_3/fss_embedded_list_write/c/private-fss_embedded_list_write.h b/level_3/fss_embedded_list_write/c/private-fss_embedded_list_write.h index 46e2eb8..f6ce36a 100644 --- a/level_3/fss_embedded_list_write/c/private-fss_embedded_list_write.h +++ b/level_3/fss_embedded_list_write/c/private-fss_embedded_list_write.h @@ -19,7 +19,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_embedded_list_write_error_parameter_same_times_print_ - void fss_embedded_list_write_error_parameter_same_times_print(const fss_embedded_list_write_main_t main) f_attribute_visibility_internal; + void fss_embedded_list_write_error_parameter_same_times_print(const fss_embedded_list_write_main_t main) F_attribute_visibility_internal_d; #endif // _di_fss_embedded_list_write_error_parameter_same_times_print_ /** @@ -29,7 +29,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_embedded_list_write_error_parameter_unsupported_eol_print_ - void fss_embedded_list_write_error_parameter_unsupported_eol_print(const fss_embedded_list_write_main_t main) f_attribute_visibility_internal; + void fss_embedded_list_write_error_parameter_unsupported_eol_print(const fss_embedded_list_write_main_t main) F_attribute_visibility_internal_d; #endif // _di_fss_embedded_list_write_error_parameter_unsupported_eol_print_ /** @@ -43,7 +43,7 @@ extern "C" { * The parameter name, such as "help" in "--help". */ #ifndef _di_fss_embedded_list_write_error_parameter_value_missing_print_ - void fss_embedded_list_write_error_parameter_value_missing_print(const fss_embedded_list_write_main_t main, const f_string_t symbol, const f_string_t parameter) f_attribute_visibility_internal; + void fss_embedded_list_write_error_parameter_value_missing_print(const fss_embedded_list_write_main_t main, const f_string_t symbol, const f_string_t parameter) F_attribute_visibility_internal_d; #endif // _di_fss_embedded_list_write_error_parameter_value_missing_print_ /** @@ -73,7 +73,7 @@ extern "C" { * F_failure (with error bit) for any othe failure. */ #ifndef _di_fss_embedded_list_write_process_ - extern f_status_t fss_embedded_list_write_process(const fss_embedded_list_write_main_t main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, const f_string_ranges_t *ignore, f_string_dynamic_t *buffer) f_attribute_visibility_internal; + extern f_status_t fss_embedded_list_write_process(const fss_embedded_list_write_main_t main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, const f_string_ranges_t *ignore, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d; #endif // _di_fss_embedded_list_write_process_ /** @@ -97,7 +97,7 @@ extern "C" { * F_failure (with error bit) for any othe failure. */ #ifndef _di_fss_embedded_list_write_process_pipe_ - extern f_status_t fss_embedded_list_write_process_pipe(const fss_embedded_list_write_main_t main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer, f_string_ranges_t *ignore) f_attribute_visibility_internal; + extern f_status_t fss_embedded_list_write_process_pipe(const fss_embedded_list_write_main_t main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer, f_string_ranges_t *ignore) F_attribute_visibility_internal_d; #endif // _di_fss_embedded_list_write_process_pipe_ /** @@ -119,7 +119,7 @@ extern "C" { * F_failure (with error bit) for any othe failure. */ #ifndef _di_fss_embedded_list_write_process_parameter_ignore_ - extern f_status_t fss_embedded_list_write_process_parameter_ignore(const f_console_arguments_t arguments, const fss_embedded_list_write_main_t main, const f_array_lengths_t contents, const f_array_length_t location, f_string_ranges_t *ignore) f_attribute_visibility_internal; + extern f_status_t fss_embedded_list_write_process_parameter_ignore(const f_console_arguments_t arguments, const fss_embedded_list_write_main_t main, const f_array_lengths_t contents, const f_array_length_t location, f_string_ranges_t *ignore) F_attribute_visibility_internal_d; #endif // _di_fss_embedded_list_write_process_parameter_ignore_ #ifdef __cplusplus diff --git a/level_3/fss_extended_list_read/c/fss_extended_list_read.c b/level_3/fss_extended_list_read/c/fss_extended_list_read.c index e9aba52..c1fd33b 100644 --- a/level_3/fss_extended_list_read/c/fss_extended_list_read.c +++ b/level_3/fss_extended_list_read/c/fss_extended_list_read.c @@ -11,7 +11,7 @@ extern "C" { flockfile(file.stream); - fll_program_print_help_header(file, context, fss_extended_list_read_name_long, fss_extended_list_read_version); + fll_program_print_help_header(file, context, fss_extended_list_read_program_name_long_s, fss_extended_list_read_program_version_s); fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); @@ -25,22 +25,22 @@ extern "C" { f_print_character(f_string_eol_s[0], file.stream); - fll_program_print_help_option(file, context, fss_extended_list_read_short_at, fss_extended_list_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric index."); - fll_program_print_help_option(file, context, fss_extended_list_read_short_content, fss_extended_list_read_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Content (default)."); - fll_program_print_help_option(file, context, fss_extended_list_read_short_columns, fss_extended_list_read_long_columns, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns."); - fll_program_print_help_option(file, context, fss_extended_list_read_short_delimit, fss_extended_list_read_long_delimit, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits."); - fll_program_print_help_option(file, context, fss_extended_list_read_short_depth, fss_extended_list_read_long_depth, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth."); - fll_program_print_help_option(file, context, fss_extended_list_read_short_empty, fss_extended_list_read_long_empty, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing."); - fll_program_print_help_option(file, context, fss_extended_list_read_short_line, fss_extended_list_read_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line."); - fll_program_print_help_option(file, context, fss_extended_list_read_short_name, fss_extended_list_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name."); - fll_program_print_help_option(file, context, fss_extended_list_read_short_object, fss_extended_list_read_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object."); - fll_program_print_help_option(file, context, fss_extended_list_read_short_pipe, fss_extended_list_read_long_pipe, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format."); - fll_program_print_help_option(file, context, fss_extended_list_read_short_raw, fss_extended_list_read_long_raw, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print with the original quotes and escapes."); - fll_program_print_help_option(file, context, fss_extended_list_read_short_select, fss_extended_list_read_long_select, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index."); - fll_program_print_help_option(file, context, fss_extended_list_read_short_total, fss_extended_list_read_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines."); - fll_program_print_help_option(file, context, fss_extended_list_read_short_trim, fss_extended_list_read_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print."); - - fll_program_print_help_usage(file, context, fss_extended_list_read_name, "filename(s)"); + fll_program_print_help_option(file, context, fss_extended_list_read_short_at_s, fss_extended_list_read_long_at_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric index."); + fll_program_print_help_option(file, context, fss_extended_list_read_short_content_s, fss_extended_list_read_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Content (default)."); + fll_program_print_help_option(file, context, fss_extended_list_read_short_columns_s, fss_extended_list_read_long_columns_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns."); + fll_program_print_help_option(file, context, fss_extended_list_read_short_delimit_s, fss_extended_list_read_long_delimit_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits."); + fll_program_print_help_option(file, context, fss_extended_list_read_short_depth_s, fss_extended_list_read_long_depth_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth."); + fll_program_print_help_option(file, context, fss_extended_list_read_short_empty_s, fss_extended_list_read_long_empty_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing."); + fll_program_print_help_option(file, context, fss_extended_list_read_short_line_s, fss_extended_list_read_long_line_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line."); + fll_program_print_help_option(file, context, fss_extended_list_read_short_name_s, fss_extended_list_read_long_name_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name."); + fll_program_print_help_option(file, context, fss_extended_list_read_short_object_s, fss_extended_list_read_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object."); + fll_program_print_help_option(file, context, fss_extended_list_read_short_pipe_s, fss_extended_list_read_long_pipe_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format."); + fll_program_print_help_option(file, context, fss_extended_list_read_short_raw_s, fss_extended_list_read_long_raw_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print with the original quotes and escapes."); + fll_program_print_help_option(file, context, fss_extended_list_read_short_select_s, fss_extended_list_read_long_select_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index."); + fll_program_print_help_option(file, context, fss_extended_list_read_short_total_s, fss_extended_list_read_long_total_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines."); + fll_program_print_help_option(file, context, fss_extended_list_read_short_trim_s, fss_extended_list_read_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print."); + + fll_program_print_help_usage(file, context, fss_extended_list_read_program_name_s, "filename(s)"); fl_print_format(" %[Notes:%]%c", file.stream, context.set.important, context.set.important, f_string_eol_s[0]); @@ -49,63 +49,63 @@ extern "C" { fl_print_format(" All numeric positions (indexes) start at 0 instead of 1.%c", file.stream, f_string_eol_s[0]); fl_print_format(" For example, a file of 17 lines would range from 0 to 16.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" When using the %[%s%s%] option, an order of operations is enforced on the parameters.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth, context.set.notable, f_string_eol_s[0]); + fl_print_format(" When using the %[%s%s%] option, an order of operations is enforced on the parameters.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", file.stream, f_string_eol_s[0]); - fl_print_format(" %[%s%s%]: An Object index at the specified depth.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_at, context.set.notable, f_string_eol_s[0]); - fl_print_format(" %[%s%s%]: A new depth within the specified depth, indexed from the root.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth, context.set.notable, f_string_eol_s[0]); - fl_print_format(" %[%s%s%]: An Object name at the specified depth.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" %[%s%s%]: An Object index at the specified depth.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_at_s, context.set.notable, f_string_eol_s[0]); + fl_print_format(" %[%s%s%]: A new depth within the specified depth, indexed from the root.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth_s, context.set.notable, f_string_eol_s[0]); + fl_print_format(" %[%s%s%]: An Object name at the specified depth.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_name_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameter %[%s%s%] must be in numeric order, but values in between may be skipped.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth, context.set.notable, f_string_eol_s[0]); + fl_print_format(" The parameter %[%s%s%] must be in numeric order, but values in between may be skipped.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%c", file.stream, f_string_eol_s[0]); fl_print_format(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameter %[%s%s%] selects a Content column.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_select, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" The parameter %[%s%s%] selects a Content column.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_select_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" Specify both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_object, context.set.notable); - fl_print_format(" and the %[%s%s%] parameters to get the total objects.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_total, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" Specify both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_object_s, context.set.notable); + fl_print_format(" and the %[%s%s%] parameters to get the total objects.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_total_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" When both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_at, context.set.notable); - fl_print_format(" and %[%s%s%] parameters are specified (at the same depth),", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_name, context.set.notable); - fl_print_format(" the %[%s%s%] parameter value will be treated as a position relative to the specified", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_at, context.set.notable); - fl_print_format(" %[%s%s%] parameter value.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" When both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_at_s, context.set.notable); + fl_print_format(" and %[%s%s%] parameters are specified (at the same depth),", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_name_s, context.set.notable); + fl_print_format(" the %[%s%s%] parameter value will be treated as a position relative to the specified", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_at_s, context.set.notable); + fl_print_format(" %[%s%s%] parameter value.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_name_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" This program may support parameters, such as %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth, context.set.notable); - fl_print_format(" or %[%s%s%], even if not supported by the standard.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_select, context.set.notable, f_string_eol_s[0]); + fl_print_format(" This program may support parameters, such as %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth_s, context.set.notable); + fl_print_format(" or %[%s%s%], even if not supported by the standard.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_select_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" This is done to help ensure consistency for scripting.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth, context.set.notable); + fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth_s, context.set.notable); fl_print_format(" if the standard doesn't support nested Content, then only a depth of 0 would be valid.%c", file.stream, f_string_eol_s[0]); - fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_select, context.set.notable); + fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_select_s, context.set.notable); fl_print_format(" if the standard doesn't support multiple Content groups, then only a select of 0 would be valid.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameter %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_trim, context.set.notable); + fl_print_format(" The parameter %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_trim_s, context.set.notable); fl_print_format(" will remove leading and trailing whitespaces when selecting objects or when printing objects.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" When specifying both the %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_object, context.set.notable); - fl_print_format(" parameter and the %[%s%s%] parameter, the entire Object and Content are printed, including the formatting.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_content, context.set.notable, f_string_eol_s[0]); + fl_print_format(" When specifying both the %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_object_s, context.set.notable); + fl_print_format(" parameter and the %[%s%s%] parameter, the entire Object and Content are printed, including the formatting.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_content_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" Both the Object and Content printed are already escaped.%c", file.stream, f_string_eol_s[0]); fl_print_format(" Both the Object and Content are separated by an EOL.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameter %[%s%s%] accepts the following:%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_delimit, context.set.notable, f_string_eol_s[0]); - fl_print_format(" - %[%s%]: Do not apply delimits.%c", file.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_none, context.set.notable, f_string_eol_s[0]); - fl_print_format(" - %[%s%]: (default) Apply all delimits.%c", file.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_all, context.set.notable, f_string_eol_s[0]); - fl_print_format(" - %[%s%]: Apply delimits for Objects.%c", file.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_object, context.set.notable, f_string_eol_s[0]); + fl_print_format(" The parameter %[%s%s%] accepts the following:%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_delimit_s, context.set.notable, f_string_eol_s[0]); + fl_print_format(" - %[%s%]: Do not apply delimits.%c", file.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_none_s, context.set.notable, f_string_eol_s[0]); + fl_print_format(" - %[%s%]: (default) Apply all delimits.%c", file.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_all_s, context.set.notable, f_string_eol_s[0]); + fl_print_format(" - %[%s%]: Apply delimits for Objects.%c", file.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_object_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" - A number, 0 or greater: apply delimits for Content at the specified depth.%c", file.stream, f_string_eol_s[0]); - fl_print_format(" - A number, 0 or greater, followed by a %[%s%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%c", file.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_greater, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" - A number, 0 or lesser, followed by a %[%s%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%c%c", file.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_lesser, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" - A number, 0 or greater, followed by a %[%s%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%c", file.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_greater_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" - A number, 0 or lesser, followed by a %[%s%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%c%c", file.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_lesser_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The %[%s%s%] parameter may be specified multiple times to customize the delimit behavior.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_delimit, context.set.notable, f_string_eol_s[0]); + fl_print_format(" The %[%s%s%] parameter may be specified multiple times to customize the delimit behavior.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_delimit_s, context.set.notable, f_string_eol_s[0]); - fl_print_format(" The %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_delimit, context.set.notable); - fl_print_format(" values %[%s%]", file.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_none, context.set.notable); - fl_print_format(" and %[%s%],", file.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_all, context.set.notable); + fl_print_format(" The %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_delimit_s, context.set.notable); + fl_print_format(" values %[%s%]", file.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_none_s, context.set.notable); + fl_print_format(" and %[%s%],", file.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_all_s, context.set.notable); fl_print_format(" overrule all other delimit values.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameters %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_columns, context.set.notable); - fl_print_format(" and %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_select, context.set.notable); + fl_print_format(" The parameters %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_columns_s, context.set.notable); + fl_print_format(" and %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_select_s, context.set.notable); fl_print_format(" refer to a Content column.%c", file.stream, f_string_eol_s[0]); fl_print_format(" The word \"column\" is being loosely defined to refer to a specific Content.%c", file.stream, f_string_eol_s[0]); fl_print_format(" This is not to be confused with a depth.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); @@ -122,7 +122,7 @@ extern "C" { f_status_t status = F_none; { - const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_extended_list_read_total_parameters); + const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_extended_list_read_total_parameters_d); { f_console_parameter_id_t ids[3] = { fss_extended_list_read_parameter_no_color, fss_extended_list_read_parameter_light, fss_extended_list_read_parameter_dark }; @@ -195,7 +195,7 @@ extern "C" { } if (main->parameters[fss_extended_list_read_parameter_version].result == f_console_result_found) { - fll_program_print_version(main->output.to, fss_extended_list_read_version); + fll_program_print_version(main->output.to, fss_extended_list_read_program_version_s); fss_extended_list_read_main_delete(main); return status; @@ -221,12 +221,12 @@ extern "C" { }; const f_string_t parameter_name[] = { - fss_extended_list_read_long_at, - fss_extended_list_read_long_depth, - fss_extended_list_read_long_line, - fss_extended_list_read_long_select, - fss_extended_list_read_long_name, - fss_extended_list_read_long_delimit, + fss_extended_list_read_long_at_s, + fss_extended_list_read_long_depth_s, + fss_extended_list_read_long_line_s, + fss_extended_list_read_long_select_s, + fss_extended_list_read_long_name_s, + fss_extended_list_read_long_delimit_s, }; const f_string_t message_positive_number = "positive number"; @@ -269,11 +269,11 @@ extern "C" { }; const f_string_t parameter_name[] = { - fss_extended_list_read_long_depth, - fss_extended_list_read_long_line, - fss_extended_list_read_long_pipe, - fss_extended_list_read_long_select, - fss_extended_list_read_long_total, + fss_extended_list_read_long_depth_s, + fss_extended_list_read_long_line_s, + fss_extended_list_read_long_pipe_s, + fss_extended_list_read_long_select_s, + fss_extended_list_read_long_total_s, }; const uint8_t parameter_match[] = { @@ -290,7 +290,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_columns, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_columns_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, parameter_name[i], main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); @@ -308,9 +308,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_pipe, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_pipe_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_total, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_total_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -321,9 +321,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_pipe, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_pipe_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_line, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_line_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -348,7 +348,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_delimit, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_delimit_s, main->error.notable); fl_print_format("%[' must not be empty.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -356,13 +356,13 @@ extern "C" { status = F_status_set_error(F_parameter); break; } - else if (fl_string_compare(arguments->argv[location], fss_extended_list_read_delimit_mode_name_none, length, fss_extended_list_read_delimit_mode_name_none_length) == F_equal_to) { + else if (fl_string_compare(arguments->argv[location], fss_extended_list_read_delimit_mode_name_none_s, length, fss_extended_list_read_delimit_mode_name_none_s_length) == F_equal_to) { data.delimit_mode = fss_extended_list_read_delimit_mode_none; } - else if (fl_string_compare(arguments->argv[location], fss_extended_list_read_delimit_mode_name_all, length, fss_extended_list_read_delimit_mode_name_all_length) == F_equal_to) { + else if (fl_string_compare(arguments->argv[location], fss_extended_list_read_delimit_mode_name_all_s, length, fss_extended_list_read_delimit_mode_name_all_s_length) == F_equal_to) { data.delimit_mode = fss_extended_list_read_delimit_mode_all; } - else if (fl_string_compare(arguments->argv[location], fss_extended_list_read_delimit_mode_name_object, length, fss_extended_list_read_delimit_mode_name_object_length) == F_equal_to) { + else if (fl_string_compare(arguments->argv[location], fss_extended_list_read_delimit_mode_name_object_s, length, fss_extended_list_read_delimit_mode_name_object_s_length) == F_equal_to) { switch (data.delimit_mode) { case 0: data.delimit_mode = fss_extended_list_read_delimit_mode_object; @@ -399,7 +399,7 @@ extern "C" { data.delimit_mode = fss_extended_list_read_delimit_mode_content_object; } - if (arguments->argv[location][length - 1] == fss_extended_list_read_delimit_mode_name_greater[0]) { + if (arguments->argv[location][length - 1] == fss_extended_list_read_delimit_mode_name_greater_s[0]) { if (!(data.delimit_mode == fss_extended_list_read_delimit_mode_none || data.delimit_mode == fss_extended_list_read_delimit_mode_all)) { if (data.delimit_mode == fss_extended_list_read_delimit_mode_content_object) { data.delimit_mode = fss_extended_list_read_delimit_mode_content_greater_object; @@ -412,7 +412,7 @@ extern "C" { // Shorten the length to better convert the remainder to a number. --length; } - else if (arguments->argv[location][length - 1] == fss_extended_list_read_delimit_mode_name_lesser[0]) { + else if (arguments->argv[location][length - 1] == fss_extended_list_read_delimit_mode_name_lesser_s[0]) { if (!(data.delimit_mode == fss_extended_list_read_delimit_mode_none || data.delimit_mode == fss_extended_list_read_delimit_mode_all)) { if (data.delimit_mode == fss_extended_list_read_delimit_mode_content_object) { data.delimit_mode = fss_extended_list_read_delimit_mode_content_lesser_object; @@ -436,7 +436,7 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments->argv[location], range, &data.delimit_depth); if (F_status_is_error(status)) { - fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_read_long_delimit, arguments->argv[location]); + fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_read_long_delimit_s, arguments->argv[location]); break; } @@ -481,7 +481,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_select, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_select_s, main->error.notable); fl_print_format("%[' parameter requires a positive number.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -500,8 +500,8 @@ extern "C" { if (F_status_is_error_not(status) && main->process_pipe) { f_file_t file = f_file_t_initialize; - file.id = f_type_descriptor_input; - file.stream = f_type_input; + file.id = F_type_descriptor_input_d; + file.stream = F_type_input_d; data.files.array[0].name = 0; data.files.array[0].range.start = 0; @@ -614,7 +614,7 @@ extern "C" { #ifndef _di_fss_extended_list_read_main_delete_ f_status_t fss_extended_list_read_main_delete(fss_extended_list_read_main_t *main) { - for (f_array_length_t i = 0; i < fss_extended_list_read_total_parameters; ++i) { + for (f_array_length_t i = 0; i < fss_extended_list_read_total_parameters_d; ++i) { macro_f_array_lengths_t_delete_simple(main->parameters[i].locations); macro_f_array_lengths_t_delete_simple(main->parameters[i].locations_sub); macro_f_array_lengths_t_delete_simple(main->parameters[i].values); diff --git a/level_3/fss_extended_list_read/c/fss_extended_list_read.h b/level_3/fss_extended_list_read/c/fss_extended_list_read.h index 8b0a90c..be24673 100644 --- a/level_3/fss_extended_list_read/c/fss_extended_list_read.h +++ b/level_3/fss_extended_list_read/c/fss_extended_list_read.h @@ -50,61 +50,61 @@ extern "C" { #endif -#ifndef _di_fss_extended_list_read_version_ - #define fss_extended_list_read_major_version f_string_ascii_0 - #define fss_extended_list_read_minor_version f_string_ascii_5 - #define fss_extended_list_read_micro_version f_string_ascii_6 +#ifndef _di_fss_extended_list_read_program_version_ + #define fss_extended_list_read_program_version_major_s F_string_ascii_0_s + #define fss_extended_list_read_program_version_minor_s F_string_ascii_5_s + #define fss_extended_list_read_program_version_micro_s F_string_ascii_6_s - #ifndef fss_extended_list_read_nano_version_prefix - #define fss_extended_list_read_nano_version_prefix + #ifndef fss_extended_list_read_version_nano_prefix_s + #define fss_extended_list_read_version_nano_prefix_s #endif - #ifndef fss_extended_list_read_nano_version - #define fss_extended_list_read_nano_version + #ifndef fss_extended_list_read_version_nano_s + #define fss_extended_list_read_version_nano_s #endif - #define fss_extended_list_read_version fss_extended_list_read_major_version f_string_ascii_period fss_extended_list_read_minor_version f_string_ascii_period fss_extended_list_read_micro_version fss_extended_list_read_nano_version_prefix fss_extended_list_read_nano_version -#endif // _di_fss_extended_list_read_version_ + #define fss_extended_list_read_program_version_s fss_extended_list_read_program_version_major_s F_string_ascii_period_s fss_extended_list_read_program_version_minor_s F_string_ascii_period_s fss_extended_list_read_program_version_micro_s fss_extended_list_read_version_nano_prefix_s fss_extended_list_read_version_nano_s +#endif // _di_fss_extended_list_read_program_version_ -#ifndef _di_fss_extended_list_read_name_ - #define fss_extended_list_read_name "fss_extended_list_read" - #define fss_extended_list_read_name_long "FSS Extended List Read" -#endif // _di_fss_extended_list_read_name_ +#ifndef _di_fss_extended_list_read_program_name_ + #define fss_extended_list_read_program_name_s "fss_extended_list_read" + #define fss_extended_list_read_program_name_long_s "FSS Extended List Read" +#endif // _di_fss_extended_list_read_program_name_ #ifndef _di_fss_extended_list_read_defines_ #define fss_extended_list_read_pipe_content_end '\f' #define fss_extended_list_read_pipe_content_ignore '\v' #define fss_extended_list_read_pipe_content_start '\b' - #define fss_extended_list_read_short_at "a" - #define fss_extended_list_read_short_content "c" - #define fss_extended_list_read_short_columns "C" - #define fss_extended_list_read_short_delimit "D" - #define fss_extended_list_read_short_depth "d" - #define fss_extended_list_read_short_empty "e" - #define fss_extended_list_read_short_line "l" - #define fss_extended_list_read_short_name "n" - #define fss_extended_list_read_short_object "o" - #define fss_extended_list_read_short_pipe "p" - #define fss_extended_list_read_short_raw "R" - #define fss_extended_list_read_short_select "s" - #define fss_extended_list_read_short_total "t" - #define fss_extended_list_read_short_trim "T" + #define fss_extended_list_read_short_at_s "a" + #define fss_extended_list_read_short_content_s "c" + #define fss_extended_list_read_short_columns_s "C" + #define fss_extended_list_read_short_delimit_s "D" + #define fss_extended_list_read_short_depth_s "d" + #define fss_extended_list_read_short_empty_s "e" + #define fss_extended_list_read_short_line_s "l" + #define fss_extended_list_read_short_name_s "n" + #define fss_extended_list_read_short_object_s "o" + #define fss_extended_list_read_short_pipe_s "p" + #define fss_extended_list_read_short_raw_s "R" + #define fss_extended_list_read_short_select_s "s" + #define fss_extended_list_read_short_total_s "t" + #define fss_extended_list_read_short_trim_s "T" - #define fss_extended_list_read_long_at "at" - #define fss_extended_list_read_long_content "content" - #define fss_extended_list_read_long_columns "columns" - #define fss_extended_list_read_long_delimit "delimit" - #define fss_extended_list_read_long_depth "depth" - #define fss_extended_list_read_long_empty "empty" - #define fss_extended_list_read_long_line "line" - #define fss_extended_list_read_long_name "name" - #define fss_extended_list_read_long_object "object" - #define fss_extended_list_read_long_pipe "pipe" - #define fss_extended_list_read_long_raw "raw" - #define fss_extended_list_read_long_select "select" - #define fss_extended_list_read_long_total "total" - #define fss_extended_list_read_long_trim "trim" + #define fss_extended_list_read_long_at_s "at" + #define fss_extended_list_read_long_content_s "content" + #define fss_extended_list_read_long_columns_s "columns" + #define fss_extended_list_read_long_delimit_s "delimit" + #define fss_extended_list_read_long_depth_s "depth" + #define fss_extended_list_read_long_empty_s "empty" + #define fss_extended_list_read_long_line_s "line" + #define fss_extended_list_read_long_name_s "name" + #define fss_extended_list_read_long_object_s "object" + #define fss_extended_list_read_long_pipe_s "pipe" + #define fss_extended_list_read_long_raw_s "raw" + #define fss_extended_list_read_long_select_s "select" + #define fss_extended_list_read_long_total_s "total" + #define fss_extended_list_read_long_trim_s "trim" enum { fss_extended_list_read_parameter_help, @@ -144,23 +144,23 @@ extern "C" { f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_at, fss_extended_list_read_long_at, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_content, fss_extended_list_read_long_content, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_columns, fss_extended_list_read_long_columns, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_delimit, fss_extended_list_read_long_delimit, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_depth, fss_extended_list_read_long_depth, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_empty, fss_extended_list_read_long_empty, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_line, fss_extended_list_read_long_line, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_name, fss_extended_list_read_long_name, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_object, fss_extended_list_read_long_object, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_pipe, fss_extended_list_read_long_pipe, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_raw, fss_extended_list_read_long_raw, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_select, fss_extended_list_read_long_select, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_total, fss_extended_list_read_long_total, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_read_short_trim, fss_extended_list_read_long_trim, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_at_s, fss_extended_list_read_long_at_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_content_s, fss_extended_list_read_long_content_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_columns_s, fss_extended_list_read_long_columns_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_delimit_s, fss_extended_list_read_long_delimit_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_depth_s, fss_extended_list_read_long_depth_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_empty_s, fss_extended_list_read_long_empty_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_line_s, fss_extended_list_read_long_line_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_name_s, fss_extended_list_read_long_name_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_object_s, fss_extended_list_read_long_object_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_pipe_s, fss_extended_list_read_long_pipe_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_raw_s, fss_extended_list_read_long_raw_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_select_s, fss_extended_list_read_long_select_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_total_s, fss_extended_list_read_long_total_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_read_short_trim_s, fss_extended_list_read_long_trim_s, 0, 0, f_console_type_normal), \ } - #define fss_extended_list_read_total_parameters 23 + #define fss_extended_list_read_total_parameters_d 23 #endif // _di_fss_extended_list_read_defines_ /** @@ -177,17 +177,17 @@ extern "C" { * - object: Objects arre to have delimits applied. */ #ifndef _di_fss_extended_list_read_delimit_mode_ - #define fss_extended_list_read_delimit_mode_name_none "none" - #define fss_extended_list_read_delimit_mode_name_all "all" - #define fss_extended_list_read_delimit_mode_name_object "object" - #define fss_extended_list_read_delimit_mode_name_greater "+" - #define fss_extended_list_read_delimit_mode_name_lesser "-" + #define fss_extended_list_read_delimit_mode_name_none_s "none" + #define fss_extended_list_read_delimit_mode_name_all_s "all" + #define fss_extended_list_read_delimit_mode_name_object_s "object" + #define fss_extended_list_read_delimit_mode_name_greater_s "+" + #define fss_extended_list_read_delimit_mode_name_lesser_s "-" - #define fss_extended_list_read_delimit_mode_name_none_length 4 - #define fss_extended_list_read_delimit_mode_name_all_length 3 - #define fss_extended_list_read_delimit_mode_name_object_length 6 - #define fss_extended_list_read_delimit_mode_name_greater_length 1 - #define fss_extended_list_read_delimit_mode_name_lesser_length 1 + #define fss_extended_list_read_delimit_mode_name_none_s_length 4 + #define fss_extended_list_read_delimit_mode_name_all_s_length 3 + #define fss_extended_list_read_delimit_mode_name_object_s_length 6 + #define fss_extended_list_read_delimit_mode_name_greater_s_length 1 + #define fss_extended_list_read_delimit_mode_name_lesser_s_length 1 enum { fss_extended_list_read_delimit_mode_none = 1, @@ -204,7 +204,7 @@ extern "C" { #ifndef _di_fss_extended_list_read_main_t_ typedef struct { - f_console_parameter_t parameters[fss_extended_list_read_total_parameters]; + f_console_parameter_t parameters[fss_extended_list_read_total_parameters_d]; f_array_lengths_t remaining; bool process_pipe; diff --git a/level_3/fss_extended_list_read/c/main.c b/level_3/fss_extended_list_read/c/main.c index 908da05..77ef160 100644 --- a/level_3/fss_extended_list_read/c/main.c +++ b/level_3/fss_extended_list_read/c/main.c @@ -12,13 +12,13 @@ int main(const int argc, const f_string_t *argv) { const f_status_t status = fss_extended_list_read_main(&arguments, &data); // flush output pipes before closing. - fflush(f_type_output); - fflush(f_type_error); + fflush(F_type_output_d); + fflush(F_type_error_d); // close all open file descriptors. - close(f_type_descriptor_output); - close(f_type_descriptor_input); - close(f_type_descriptor_error); + close(F_type_descriptor_output_d); + close(F_type_descriptor_input_d); + close(F_type_descriptor_error_d); if (F_status_is_error(status)) { return 1; diff --git a/level_3/fss_extended_list_read/c/private-common.h b/level_3/fss_extended_list_read/c/private-common.h index 5691f99..96a81ce 100644 --- a/level_3/fss_extended_list_read/c/private-common.h +++ b/level_3/fss_extended_list_read/c/private-common.h @@ -21,8 +21,8 @@ extern "C" { * - small: An allocation step used for buffers that are anticipated to have small buffers. */ #ifndef _di_fss_extended_list_read_common_ - #define fss_extended_list_read_common_allocation_large 256 - #define fss_extended_list_read_common_allocation_small 16 + #define fss_extended_list_read_common_allocation_large_d 256 + #define fss_extended_list_read_common_allocation_small_d 16 #endif // _di_fss_extended_list_read_common_ /** @@ -212,7 +212,7 @@ extern "C" { * The data to deallocate. */ #ifndef _di_fss_extended_list_read_data_delete_simple_ - extern void fss_extended_list_read_data_delete_simple(fss_extended_list_read_data_t *data) f_attribute_visibility_internal; + extern void fss_extended_list_read_data_delete_simple(fss_extended_list_read_data_t *data) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_data_delete_simple_ /** @@ -222,7 +222,7 @@ extern "C" { * The depth to deallocate. */ #ifndef _di_fss_extended_list_read_depth_delete_simple_ - extern void fss_extended_list_read_depth_delete_simple(fss_extended_list_read_depth_t *depth) f_attribute_visibility_internal; + extern void fss_extended_list_read_depth_delete_simple(fss_extended_list_read_depth_t *depth) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_depth_delete_simple_ /** @@ -246,7 +246,7 @@ extern "C" { * @see fss_extended_list_read_depths_increase() */ #ifndef _di_fss_extended_list_read_depths_resize_ - extern f_status_t fss_extended_list_read_depths_resize(const f_array_length_t length, fss_extended_list_read_depths_t *depths) f_attribute_visibility_internal; + extern f_status_t fss_extended_list_read_depths_resize(const f_array_length_t length, fss_extended_list_read_depths_t *depths) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_depths_resize_ #ifdef __cplusplus diff --git a/level_3/fss_extended_list_read/c/private-fss_extended_list_read.c b/level_3/fss_extended_list_read/c/private-fss_extended_list_read.c index 71e4114..74702fe 100644 --- a/level_3/fss_extended_list_read/c/private-fss_extended_list_read.c +++ b/level_3/fss_extended_list_read/c/private-fss_extended_list_read.c @@ -103,7 +103,7 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments->argv[position_depth], range, &data->depths.array[i].depth); if (F_status_is_error(status)) { - fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_read_long_depth, arguments->argv[position_depth]); + fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_read_long_depth_s, arguments->argv[position_depth]); return status; } @@ -127,7 +127,7 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments->argv[data->depths.array[i].index_at], range, &data->depths.array[i].value_at); if (F_status_is_error(status)) { - fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_read_long_at, arguments->argv[data->depths.array[i].index_at]); + fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_read_long_at_s, arguments->argv[data->depths.array[i].index_at]); return status; } @@ -174,7 +174,7 @@ extern "C" { fl_print_format("%c%[%sThe value '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); fl_print_format("%[%ul%]", main->error.to.stream, main->error.notable, data->depths.array[i].depth, main->error.notable); fl_print_format("%[' may only be specified once for the parameter '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth_s, main->error.notable); fl_print_format("%['.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -187,7 +187,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth_s, main->error.notable); fl_print_format("%[' may not have the value '%]", main->error.to.stream, main->error.context, main->error.context); fl_print_format("%[%ul%]", main->error.to.stream, main->error.notable, data->depths.array[i].depth, main->error.notable); fl_print_format("%[' before the value '%]", main->error.to.stream, main->error.context, main->error.context); @@ -223,7 +223,7 @@ extern "C" { #ifndef _di_fss_extended_list_read_load_ f_status_t fss_extended_list_read_load(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data) { - f_state_t state = macro_f_state_t_initialize(fss_extended_list_read_common_allocation_large, fss_extended_list_read_common_allocation_small, 0, 0, 0, 0, 0); + f_state_t state = macro_f_state_t_initialize(fss_extended_list_read_common_allocation_large_d, fss_extended_list_read_common_allocation_small_d, 0, 0, 0, 0, 0); f_string_range_t input = macro_f_string_range_t_initialize(data->buffer.used); data->delimits_object.used = 0; @@ -349,8 +349,8 @@ extern "C" { } else { if ((data->option & fss_extended_list_read_data_option_object) && (data->option & fss_extended_list_read_data_option_content)) { - f_print_character(f_fss_extended_list_open, main->output.to.stream); - f_print_character(f_fss_extended_list_open_end, main->output.to.stream); + f_print_character(f_fss_extended_list_open_s[0], main->output.to.stream); + f_print_character(f_fss_extended_list_open_end_s[0], main->output.to.stream); } } } @@ -365,11 +365,11 @@ extern "C" { else { if (data->option & fss_extended_list_read_data_option_object) { if (data->option & fss_extended_list_read_data_option_content) { - f_print_character(f_fss_extended_list_close, main->output.to.stream); - f_print_character(f_fss_extended_list_close_end, main->output.to.stream); + f_print_character(f_fss_extended_list_close_s[0], main->output.to.stream); + f_print_character(f_fss_extended_list_close_end_s[0], main->output.to.stream); } else if (!(data->option & fss_extended_list_read_data_option_content)) { - f_print_character(f_fss_eol, main->output.to.stream); + f_print_character(f_fss_eol_s[0], main->output.to.stream); } } } @@ -528,7 +528,7 @@ extern "C" { while (k >= data->contents.array[i].array[0].start) { - if (data->buffer.string[k] == f_fss_delimit_placeholder) { + if (data->buffer.string[k] == F_fss_delimit_placeholder_s) { --k; continue; @@ -771,7 +771,7 @@ extern "C" { if (main->parameters[fss_extended_list_read_parameter_line].result == f_console_result_additional) { data->option |= fss_extended_list_read_data_option_line; - status = fss_extended_list_read_load_number(fss_extended_list_read_parameter_line, fss_extended_list_read_long_line, arguments, main, &data->line); + status = fss_extended_list_read_load_number(fss_extended_list_read_parameter_line, fss_extended_list_read_long_line_s, arguments, main, &data->line); if (F_status_is_error(status)) return status; } @@ -790,7 +790,7 @@ extern "C" { if (main->parameters[fss_extended_list_read_parameter_select].result == f_console_result_additional) { data->option |= fss_extended_list_read_data_option_select; - status = fss_extended_list_read_load_number(fss_extended_list_read_parameter_select, fss_extended_list_read_long_select, arguments, main, &data->select); + status = fss_extended_list_read_load_number(fss_extended_list_read_parameter_select, fss_extended_list_read_long_select_s, arguments, main, &data->select); if (F_status_is_error(status)) return status; } diff --git a/level_3/fss_extended_list_read/c/private-fss_extended_list_read.h b/level_3/fss_extended_list_read/c/private-fss_extended_list_read.h index a531331..b08ed21 100644 --- a/level_3/fss_extended_list_read/c/private-fss_extended_list_read.h +++ b/level_3/fss_extended_list_read/c/private-fss_extended_list_read.h @@ -25,7 +25,7 @@ extern "C" { * F_false if to not apply delimits. */ #ifndef _di_fss_extended_list_read_delimit_content_is_ - extern f_status_t fss_extended_list_read_delimit_content_is(const f_array_length_t depth, fss_extended_list_read_data_t * const data) f_attribute_visibility_internal; + extern f_status_t fss_extended_list_read_delimit_content_is(const f_array_length_t depth, fss_extended_list_read_data_t * const data) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_delimit_content_is_ /** @@ -41,7 +41,7 @@ extern "C" { * F_false if to not apply delimits. */ #ifndef _di_fss_extended_list_read_delimit_object_is_ - extern f_status_t fss_extended_list_read_delimit_object_is(const f_array_length_t depth, fss_extended_list_read_data_t * const data) f_attribute_visibility_internal; + extern f_status_t fss_extended_list_read_delimit_object_is(const f_array_length_t depth, fss_extended_list_read_data_t * const data) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_delimit_object_is_ /** @@ -72,7 +72,7 @@ extern "C" { * @see fss_extended_list_read_depths_resize() */ #ifndef _di_fss_extended_list_read_depth_process_ - extern f_status_t fss_extended_list_read_depth_process(f_console_arguments_t * const arguments, fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data) f_attribute_visibility_internal; + extern f_status_t fss_extended_list_read_depth_process(f_console_arguments_t * const arguments, fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_depth_process_ /** @@ -90,7 +90,7 @@ extern "C" { * On failure to identify, an empty string is returned. */ #ifndef _di_fss_extended_list_read_file_identify_ - extern f_string_t fss_extended_list_read_file_identify(const f_array_length_t at, const fss_extended_list_read_files_t files) f_attribute_visibility_internal; + extern f_string_t fss_extended_list_read_file_identify(const f_array_length_t at, const fss_extended_list_read_files_t files) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_file_identify_ /** @@ -116,7 +116,7 @@ extern "C" { * @see fss_extended_list_read_process_option() */ #ifndef _di_fss_extended_list_read_load_ - extern f_status_t fss_extended_list_read_load(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data) f_attribute_visibility_internal; + extern f_status_t fss_extended_list_read_load(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_load_ /** @@ -146,7 +146,7 @@ extern "C" { * @see fss_extended_list_read_depths_resize() */ #ifndef _di_fss_extended_list_read_load_number_ - extern f_status_t fss_extended_list_read_load_number(const f_array_length_t parameter, const f_string_t name, f_console_arguments_t * const arguments, fss_extended_list_read_main_t * const main, f_number_unsigned_t *number) f_attribute_visibility_internal; + extern f_status_t fss_extended_list_read_load_number(const f_array_length_t parameter, const f_string_t name, f_console_arguments_t * const arguments, fss_extended_list_read_main_t * const main, f_number_unsigned_t *number) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_load_number_ /** @@ -166,7 +166,7 @@ extern "C" { * The program data. */ #ifndef _di_fss_extended_list_read_print_at_ - extern void fss_extended_list_read_print_at(const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t * const data) f_attribute_visibility_internal; + extern void fss_extended_list_read_print_at(const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t * const data) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_print_at_ /** @@ -182,7 +182,7 @@ extern "C" { * The delimits to be applied to an Object. */ #ifndef _di_fss_extended_list_read_print_at_object_ - extern void fss_extended_list_read_print_at_object(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t * const data, const f_array_length_t at, const f_fss_delimits_t delimits_object) f_attribute_visibility_internal; + extern void fss_extended_list_read_print_at_object(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t * const data, const f_array_length_t at, const f_fss_delimits_t delimits_object) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_print_at_object_ /** @@ -194,7 +194,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_extended_list_read_print_content_ignore_ - extern void fss_extended_list_read_print_content_ignore(fss_extended_list_read_main_t * const main) f_attribute_visibility_internal; + extern void fss_extended_list_read_print_content_ignore(fss_extended_list_read_main_t * const main) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_print_content_ignore_ /** @@ -206,7 +206,7 @@ extern "C" { * The program data. */ #ifndef _di_fss_extended_list_read_print_object_end_ - extern void fss_extended_list_read_print_object_end(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t * const data) f_attribute_visibility_internal; + extern void fss_extended_list_read_print_object_end(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t * const data) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_print_object_end_ /** @@ -216,7 +216,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_extended_list_read_print_one_ - extern void fss_extended_list_read_print_one(fss_extended_list_read_main_t * const main) f_attribute_visibility_internal; + extern void fss_extended_list_read_print_one(fss_extended_list_read_main_t * const main) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_print_one_ /** @@ -228,7 +228,7 @@ extern "C" { * The program data. */ #ifndef _di_fss_extended_list_read_print_set_end_ - extern void fss_extended_list_read_print_set_end(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t * const data) f_attribute_visibility_internal; + extern void fss_extended_list_read_print_set_end(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t * const data) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_print_set_end_ /** @@ -238,7 +238,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_extended_list_read_print_zero_ - extern void fss_extended_list_read_print_zero(fss_extended_list_read_main_t * const main) f_attribute_visibility_internal; + extern void fss_extended_list_read_print_zero(fss_extended_list_read_main_t * const main) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_print_zero_ /** @@ -263,7 +263,7 @@ extern "C" { * @see fss_extended_list_read_process_option() */ #ifndef _di_fss_extended_list_read_process_ - extern f_status_t fss_extended_list_read_process(f_console_arguments_t * const arguments, fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data) f_attribute_visibility_internal; + extern f_status_t fss_extended_list_read_process(f_console_arguments_t * const arguments, fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_process_ /** @@ -283,7 +283,7 @@ extern "C" { * @see fss_extended_list_read_process_at_line() */ #ifndef _di_fss_extended_list_read_process_at_ - extern f_status_t fss_extended_list_read_process_at(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data, bool names[]) f_attribute_visibility_internal; + extern f_status_t fss_extended_list_read_process_at(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_process_at_ /** @@ -301,7 +301,7 @@ extern "C" { * F_none on success. */ #ifndef _di_fss_extended_list_read_process_columns_ - extern f_status_t fss_extended_list_read_process_columns(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data, bool names[]) f_attribute_visibility_internal; + extern f_status_t fss_extended_list_read_process_columns(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_process_columns_ /** @@ -324,7 +324,7 @@ extern "C" { * F_success on success and the line was matched (and possibly printed). */ #ifndef _di_fss_extended_list_read_process_at_line_ - extern f_status_t fss_extended_list_read_process_at_line(const f_array_length_t at, const f_array_lengths_t delimits_object, const f_array_lengths_t delimits_content, fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data, f_array_length_t *line) f_attribute_visibility_internal; + extern f_status_t fss_extended_list_read_process_at_line(const f_array_length_t at, const f_array_lengths_t delimits_object, const f_array_lengths_t delimits_content, fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data, f_array_length_t *line) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_process_at_line_ /** @@ -342,7 +342,7 @@ extern "C" { * F_none on success. */ #ifndef _di_fss_extended_list_read_process_line_ - extern f_status_t fss_extended_list_read_process_line(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data, bool names[]) f_attribute_visibility_internal; + extern f_status_t fss_extended_list_read_process_line(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_process_line_ /** @@ -360,7 +360,7 @@ extern "C" { * F_none on success. */ #ifndef _di_fss_extended_list_read_process_name_ - extern f_status_t fss_extended_list_read_process_name(fss_extended_list_read_data_t *data, bool names[]) f_attribute_visibility_internal; + extern f_status_t fss_extended_list_read_process_name(fss_extended_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_process_name_ /** @@ -383,7 +383,7 @@ extern "C" { * @see fss_extended_list_read_load_setting() */ #ifndef _di_fss_extended_list_read_process_option_ - extern f_status_t fss_extended_list_read_process_option(f_console_arguments_t * const arguments, fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data) f_attribute_visibility_internal; + extern f_status_t fss_extended_list_read_process_option(f_console_arguments_t * const arguments, fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_process_option_ /** @@ -401,7 +401,7 @@ extern "C" { * F_none on success. */ #ifndef _di_fss_extended_list_read_process_total_ - extern f_status_t fss_extended_list_read_process_total(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data, bool names[]) f_attribute_visibility_internal; + extern f_status_t fss_extended_list_read_process_total(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data, bool names[]) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_read_process_total_ #ifdef __cplusplus diff --git a/level_3/fss_extended_list_write/c/fss_extended_list_write.c b/level_3/fss_extended_list_write/c/fss_extended_list_write.c index 2cf465e..c8e0c34 100644 --- a/level_3/fss_extended_list_write/c/fss_extended_list_write.c +++ b/level_3/fss_extended_list_write/c/fss_extended_list_write.c @@ -11,7 +11,7 @@ extern "C" { flockfile(file.stream); - fll_program_print_help_header(file, context, fss_extended_list_write_name_long, fss_extended_list_write_version); + fll_program_print_help_header(file, context, fss_extended_list_write_program_name_long_s, fss_extended_list_write_program_version_s); fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); @@ -25,17 +25,17 @@ extern "C" { f_print_character(f_string_eol_s[0], file.stream); - fll_program_print_help_option(file, context, fss_extended_list_write_short_file, fss_extended_list_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send file to."); - fll_program_print_help_option(file, context, fss_extended_list_write_short_content, fss_extended_list_write_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to file."); - fll_program_print_help_option(file, context, fss_extended_list_write_short_double, fss_extended_list_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); - fll_program_print_help_option(file, context, fss_extended_list_write_short_ignore, fss_extended_list_write_long_ignore, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content."); - fll_program_print_help_option(file, context, fss_extended_list_write_short_object, fss_extended_list_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to file."); - fll_program_print_help_option(file, context, fss_extended_list_write_short_partial, fss_extended_list_write_long_partial, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not file end of Object/Content character."); - fll_program_print_help_option(file, context, fss_extended_list_write_short_prepend, fss_extended_list_write_long_prepend, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content."); - fll_program_print_help_option(file, context, fss_extended_list_write_short_single, fss_extended_list_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); - fll_program_print_help_option(file, context, fss_extended_list_write_short_trim, fss_extended_list_write_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names."); + fll_program_print_help_option(file, context, fss_extended_list_write_short_file_s, fss_extended_list_write_long_file_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send file to."); + fll_program_print_help_option(file, context, fss_extended_list_write_short_content_s, fss_extended_list_write_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to file."); + fll_program_print_help_option(file, context, fss_extended_list_write_short_double_s, fss_extended_list_write_long_double_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); + fll_program_print_help_option(file, context, fss_extended_list_write_short_ignore_s, fss_extended_list_write_long_ignore_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content."); + fll_program_print_help_option(file, context, fss_extended_list_write_short_object_s, fss_extended_list_write_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to file."); + fll_program_print_help_option(file, context, fss_extended_list_write_short_partial_s, fss_extended_list_write_long_partial_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not file end of Object/Content character."); + fll_program_print_help_option(file, context, fss_extended_list_write_short_prepend_s, fss_extended_list_write_long_prepend_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content."); + fll_program_print_help_option(file, context, fss_extended_list_write_short_single_s, fss_extended_list_write_long_single_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); + fll_program_print_help_option(file, context, fss_extended_list_write_short_trim_s, fss_extended_list_write_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names."); - fll_program_print_help_usage(file, context, fss_extended_list_write_name, f_string_empty_s); + fll_program_print_help_usage(file, context, fss_extended_list_write_program_name_s, f_string_empty_s); fl_print_format(" The pipe uses the Backspace character '%[\\b%]' (%[U+0008%]) to designate the start of a Content.%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]); fl_print_format(" The pipe uses the Form Feed character '%[\\f%]' (%[U+000C%]) to designate the end of the last Content.%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]); @@ -44,14 +44,14 @@ extern "C" { fl_print_format(" or a Form Feed character '%[\\f%]' (%[U+000C%]).%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]); fl_print_format(" The end of the pipe represents the end of any Object or Content.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The FSS-0003 (Extended List) specification does not support quoted names, therefore the parameters '%[%s%s%]'", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_single, context.set.notable); - fl_print_format(" and '%[%s%s%]' do nothing.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_double, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" The FSS-0003 (Extended List) specification does not support quoted names, therefore the parameters '%[%s%s%]'", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_single_s, context.set.notable); + fl_print_format(" and '%[%s%s%]' do nothing.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_double_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameter '%[%s%s%]' designates to not escape any valid nested Object or Content within some Content.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_ignore, context.set.notable, f_string_eol_s[0]); + fl_print_format(" The parameter '%[%s%s%]' designates to not escape any valid nested Object or Content within some Content.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_ignore_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" This parameter requires two values.%c", file.stream, f_string_eol_s[0]); fl_print_format(" This parameter is not used for ignoring anything from the input pipe.%c", file.stream, f_string_eol_s[0]); - fl_print_format(" This parameter must be specified after a '%[%s%s%]'", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_content, context.set.notable); - fl_print_format(" parameter and this applies only to the Content represented by that specific '%[%s%s%]' parameter.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_content, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" This parameter must be specified after a '%[%s%s%]'", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_content_s, context.set.notable); + fl_print_format(" parameter and this applies only to the Content represented by that specific '%[%s%s%]' parameter.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_content_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); funlockfile(file.stream); @@ -64,7 +64,7 @@ extern "C" { f_status_t status = F_none; { - const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_extended_list_write_total_parameters); + const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_extended_list_write_total_parameters_d); { f_console_parameter_id_t ids[3] = { fss_extended_list_write_parameter_no_color, fss_extended_list_write_parameter_light, fss_extended_list_write_parameter_dark }; @@ -137,7 +137,7 @@ extern "C" { } if (main->parameters[fss_extended_list_write_parameter_version].result == f_console_result_found) { - fll_program_print_version(main->output.to, fss_extended_list_write_version); + fll_program_print_version(main->output.to, fss_extended_list_write_program_version_s); fss_extended_list_write_main_delete(main); return status; @@ -145,9 +145,9 @@ extern "C" { f_file_t output = f_file_t_initialize; - output.id = f_type_descriptor_output; - output.stream = f_type_output; - output.flag = f_file_flag_create | f_file_flag_write_only | f_file_flag_append; + output.id = F_type_descriptor_output_d; + output.stream = F_type_output_d; + output.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d; if (F_status_is_error_not(status)) { if (main->parameters[fss_extended_list_write_parameter_file].result == f_console_result_additional) { @@ -156,7 +156,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_file, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_file_s, main->error.notable); fl_print_format("%[' may only be specified once.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -177,7 +177,7 @@ extern "C" { } } else if (main->parameters[fss_extended_list_write_parameter_file].result == f_console_result_found) { - fss_extended_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_extended_list_write_long_file); + fss_extended_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_extended_list_write_long_file_s); status = F_status_set_error(F_parameter); } } @@ -186,11 +186,11 @@ extern "C" { if (main->parameters[fss_extended_list_write_parameter_object].locations.used || main->parameters[fss_extended_list_write_parameter_content].locations.used) { if (main->parameters[fss_extended_list_write_parameter_object].locations.used) { if (main->parameters[fss_extended_list_write_parameter_object].locations.used != main->parameters[fss_extended_list_write_parameter_object].values.used) { - fss_extended_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_extended_list_write_long_object); + fss_extended_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_extended_list_write_long_object_s); status = F_status_set_error(F_parameter); } else if (main->parameters[fss_extended_list_write_parameter_content].locations.used != main->parameters[fss_extended_list_write_parameter_content].values.used) { - fss_extended_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_extended_list_write_long_content); + fss_extended_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_extended_list_write_long_content_s); status = F_status_set_error(F_parameter); } else if (main->parameters[fss_extended_list_write_parameter_object].locations.used != main->parameters[fss_extended_list_write_parameter_content].locations.used && main->parameters[fss_extended_list_write_parameter_partial].result == f_console_result_none) { @@ -203,11 +203,11 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_partial, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter only allows either the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_object, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_object_s, main->error.notable); fl_print_format("%[' parameter or the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_content, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_content_s, main->error.notable); fl_print_format("%[' parameter, but not both.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -235,9 +235,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sEach '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_object, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_object_s, main->error.notable); fl_print_format("%[' parameter must be specified before a '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_content, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -252,7 +252,7 @@ extern "C" { } else if (main->parameters[fss_extended_list_write_parameter_content].locations.used) { if (main->parameters[fss_extended_list_write_parameter_content].locations.used != main->parameters[fss_extended_list_write_parameter_content].values.used) { - fss_extended_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_extended_list_write_long_content); + fss_extended_list_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_extended_list_write_long_content_s); status = F_status_set_error(F_parameter); } else if (!main->parameters[fss_extended_list_write_parameter_partial].locations.used) { @@ -266,9 +266,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThis requires either piped data or the use of the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_object, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_object_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_content, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -283,7 +283,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThis '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_partial, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter cannot be used when processing a pipe.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -300,7 +300,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_prepend, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_prepend_s, main->error.notable); fl_print_format("%[' was specified, but no value was given.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -329,7 +329,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_prepend, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_prepend_s, main->error.notable); fl_print_format("%[' must only contain whitespace.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -345,7 +345,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_prepend, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_prepend_s, main->error.notable); fl_print_format("%[' must not be an empty string.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -362,7 +362,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_ignore, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_ignore_s, main->error.notable); fl_print_format("%[' was specified, but no values were given.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -378,7 +378,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_ignore, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_ignore_s, main->error.notable); fl_print_format("%[' requires two values.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -388,18 +388,18 @@ extern "C" { } } - f_fss_quote_t quote = f_fss_delimit_quote_double; + f_fss_quote_t quote = F_fss_delimit_quote_double_s; if (F_status_is_error_not(status)) { if (main->parameters[fss_extended_list_write_parameter_double].result == f_console_result_found) { if (main->parameters[fss_extended_list_write_parameter_single].result == f_console_result_found) { if (main->parameters[fss_extended_list_write_parameter_double].location < main->parameters[fss_extended_list_write_parameter_single].location) { - quote = f_fss_delimit_quote_single; + quote = F_fss_delimit_quote_single_s; } } } else if (main->parameters[fss_extended_list_write_parameter_single].result == f_console_result_found) { - quote = f_fss_delimit_quote_single; + quote = F_fss_delimit_quote_single_s; } } @@ -530,7 +530,7 @@ extern "C" { #ifndef _di_fss_extended_list_write_main_delete_ f_status_t fss_extended_list_write_main_delete(fss_extended_list_write_main_t *main) { - for (f_array_length_t i = 0; i < fss_extended_list_write_total_parameters; ++i) { + for (f_array_length_t i = 0; i < fss_extended_list_write_total_parameters_d; ++i) { macro_f_array_lengths_t_delete_simple(main->parameters[i].locations); macro_f_array_lengths_t_delete_simple(main->parameters[i].locations_sub); macro_f_array_lengths_t_delete_simple(main->parameters[i].values); diff --git a/level_3/fss_extended_list_write/c/fss_extended_list_write.h b/level_3/fss_extended_list_write/c/fss_extended_list_write.h index 12ca2ee..20e227a 100644 --- a/level_3/fss_extended_list_write/c/fss_extended_list_write.h +++ b/level_3/fss_extended_list_write/c/fss_extended_list_write.h @@ -45,51 +45,51 @@ extern "C" { #endif -#ifndef _di_fss_extended_list_write_version_ - #define fss_extended_list_write_major_version f_string_ascii_0 - #define fss_extended_list_write_minor_version f_string_ascii_5 - #define fss_extended_list_write_micro_version f_string_ascii_6 +#ifndef _di_fss_extended_list_write_program_version_ + #define fss_extended_list_write_program_version_major_s F_string_ascii_0_s + #define fss_extended_list_write_program_version_minor_s F_string_ascii_5_s + #define fss_extended_list_write_program_version_micro_s F_string_ascii_6_s - #ifndef fss_extended_list_write_nano_version_prefix - #define fss_extended_list_write_nano_version_prefix + #ifndef fss_extended_list_write_program_version_nano_prefix_s + #define fss_extended_list_write_program_version_nano_prefix_s #endif - #ifndef fss_extended_list_write_nano_version - #define fss_extended_list_write_nano_version + #ifndef fss_extended_list_write_program_version_nano_s + #define fss_extended_list_write_program_version_nano_s #endif - #define fss_extended_list_write_version fss_extended_list_write_major_version f_string_ascii_period fss_extended_list_write_minor_version f_string_ascii_period fss_extended_list_write_micro_version fss_extended_list_write_nano_version_prefix fss_extended_list_write_nano_version -#endif // _di_fss_extended_list_write_version_ + #define fss_extended_list_write_program_version_s fss_extended_list_write_program_version_major_s F_string_ascii_period_s fss_extended_list_write_program_version_minor_s F_string_ascii_period_s fss_extended_list_write_program_version_micro_s fss_extended_list_write_program_version_nano_prefix_s fss_extended_list_write_program_version_nano_s +#endif // _di_fss_extended_list_write_program_version_ -#ifndef _di_fss_extended_list_write_name_ - #define fss_extended_list_write_name "fss_extended_list_write" - #define fss_extended_list_write_name_long "FSS Extended List Write" -#endif // _di_fss_extended_list_write_name_ +#ifndef _di_fss_extended_list_write_program_name_ + #define fss_extended_list_write_program_name_s "fss_extended_list_write" + #define fss_extended_list_write_program_name_long_s "FSS Extended List Write" +#endif // _di_fss_extended_list_write_program_name_ #ifndef _di_fss_extended_list_write_defines_ - #define fss_extended_list_write_pipe_content_end '\f' - #define fss_extended_list_write_pipe_content_ignore '\v' - #define fss_extended_list_write_pipe_content_start '\b' - - #define fss_extended_list_write_short_file "f" - #define fss_extended_list_write_short_content "c" - #define fss_extended_list_write_short_double "d" - #define fss_extended_list_write_short_ignore "I" - #define fss_extended_list_write_short_object "o" - #define fss_extended_list_write_short_partial "p" - #define fss_extended_list_write_short_prepend "P" - #define fss_extended_list_write_short_single "s" - #define fss_extended_list_write_short_trim "T" - - #define fss_extended_list_write_long_file "file" - #define fss_extended_list_write_long_content "content" - #define fss_extended_list_write_long_double "double" - #define fss_extended_list_write_long_ignore "ignore" - #define fss_extended_list_write_long_object "object" - #define fss_extended_list_write_long_partial "partial" - #define fss_extended_list_write_long_prepend "prepend" - #define fss_extended_list_write_long_single "single" - #define fss_extended_list_write_long_trim "trim" + #define fss_extended_list_write_pipe_content_end_s '\f' + #define fss_extended_list_write_pipe_content_ignore_s '\v' + #define fss_extended_list_write_pipe_content_start_s '\b' + + #define fss_extended_list_write_short_file_s "f" + #define fss_extended_list_write_short_content_s "c" + #define fss_extended_list_write_short_double_s "d" + #define fss_extended_list_write_short_ignore_s "I" + #define fss_extended_list_write_short_object_s "o" + #define fss_extended_list_write_short_partial_s "p" + #define fss_extended_list_write_short_prepend_s "P" + #define fss_extended_list_write_short_single_s "s" + #define fss_extended_list_write_short_trim_s "T" + + #define fss_extended_list_write_long_file_s "file" + #define fss_extended_list_write_long_content_s "content" + #define fss_extended_list_write_long_double_s "double" + #define fss_extended_list_write_long_ignore_s "ignore" + #define fss_extended_list_write_long_object_s "object" + #define fss_extended_list_write_long_partial_s "partial" + #define fss_extended_list_write_long_prepend_s "prepend" + #define fss_extended_list_write_long_single_s "single" + #define fss_extended_list_write_long_trim_s "trim" enum { fss_extended_list_write_parameter_help, @@ -124,23 +124,23 @@ extern "C" { f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(fss_extended_list_write_short_file, fss_extended_list_write_long_file, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_write_short_content, fss_extended_list_write_long_content, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_write_short_double, fss_extended_list_write_long_double, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_write_short_ignore, fss_extended_list_write_long_ignore, 0, 2, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_write_short_object, fss_extended_list_write_long_object, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_write_short_partial, fss_extended_list_write_long_partial, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_write_short_prepend, fss_extended_list_write_long_prepend, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_write_short_single, fss_extended_list_write_long_single, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_list_write_short_trim, fss_extended_list_write_long_trim, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_write_short_file_s, fss_extended_list_write_long_file_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_write_short_content_s, fss_extended_list_write_long_content_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_write_short_double_s, fss_extended_list_write_long_double_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_write_short_ignore_s, fss_extended_list_write_long_ignore_s, 0, 2, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_write_short_object_s, fss_extended_list_write_long_object_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_write_short_partial_s, fss_extended_list_write_long_partial_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_write_short_prepend_s, fss_extended_list_write_long_prepend_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_write_short_single_s, fss_extended_list_write_long_single_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_list_write_short_trim_s, fss_extended_list_write_long_trim_s, 0, 0, f_console_type_normal), \ } - #define fss_extended_list_write_total_parameters 18 + #define fss_extended_list_write_total_parameters_d 18 #endif // _di_fss_extended_list_write_defines_ #ifndef _di_fss_extended_list_write_main_t_ typedef struct { - f_console_parameter_t parameters[fss_extended_list_write_total_parameters]; + f_console_parameter_t parameters[fss_extended_list_write_total_parameters_d]; f_array_lengths_t remaining; bool process_pipe; diff --git a/level_3/fss_extended_list_write/c/main.c b/level_3/fss_extended_list_write/c/main.c index de2a36e..8390830 100644 --- a/level_3/fss_extended_list_write/c/main.c +++ b/level_3/fss_extended_list_write/c/main.c @@ -12,13 +12,13 @@ int main(const int argc, const f_string_t *argv) { const f_status_t status = fss_extended_list_write_main(arguments, &data); // flush output pipes before closing. - fflush(f_type_output); - fflush(f_type_error); + fflush(F_type_output_d); + fflush(F_type_error_d); // close all open file descriptors. - close(f_type_descriptor_output); - close(f_type_descriptor_input); - close(f_type_descriptor_error); + close(F_type_descriptor_output_d); + close(F_type_descriptor_input_d); + close(F_type_descriptor_error_d); if (F_status_is_error(status)) { return 1; diff --git a/level_3/fss_extended_list_write/c/private-common.h b/level_3/fss_extended_list_write/c/private-common.h index ea7a11e..106e55b 100644 --- a/level_3/fss_extended_list_write/c/private-common.h +++ b/level_3/fss_extended_list_write/c/private-common.h @@ -20,8 +20,8 @@ extern "C" { * - small: An allocation step used for buffers that are anticipated to have small buffers. */ #ifndef _di_fss_extended_list_write_common_ - #define fss_extended_list_write_common_allocation_large 256 - #define fss_extended_list_write_common_allocation_small 16 + #define fss_extended_list_write_common_allocation_large_d 256 + #define fss_extended_list_write_common_allocation_small_d 16 #endif // _di_fss_extended_list_write_common_ #ifdef __cplusplus diff --git a/level_3/fss_extended_list_write/c/private-fss_extended_list_write.c b/level_3/fss_extended_list_write/c/private-fss_extended_list_write.c index 462e12d..6abcf6c 100644 --- a/level_3/fss_extended_list_write/c/private-fss_extended_list_write.c +++ b/level_3/fss_extended_list_write/c/private-fss_extended_list_write.c @@ -16,11 +16,11 @@ extern "C" { flockfile(main.error.to.stream); fl_print_format("%c%[%sMust specify the '%]", main.error.to.stream, f_string_eol_s[0], main.error.context, main.error.prefix, main.error.context); - fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_object, main.error.notable); + fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_object_s, main.error.notable); fl_print_format("%[' parameter and the '%]", main.error.to.stream, main.error.context, main.error.prefix, main.error.context); - fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_content, main.error.notable); + fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_content_s, main.error.notable); fl_print_format("%[' parameter the same number of times when not specifying the '%]", main.error.to.stream, main.error.context, main.error.prefix, main.error.context); - fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_partial, main.error.notable); + fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_partial_s, main.error.notable); fl_print_format("%[' parameter.%]%c", main.error.to.stream, main.error.context, main.error.context, f_string_eol_s[0]); funlockfile(main.error.to.stream); @@ -65,7 +65,7 @@ extern "C" { f_status_t fss_extended_list_write_process(const fss_extended_list_write_main_t main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, const f_string_ranges_t *ignore, f_string_dynamic_t *buffer) { f_status_t status = F_none; - f_state_t state = macro_f_state_t_initialize(fss_extended_list_write_common_allocation_large, fss_extended_list_write_common_allocation_small, 0, 0, 0, 0, 0); + f_state_t state = macro_f_state_t_initialize(fss_extended_list_write_common_allocation_large_d, fss_extended_list_write_common_allocation_small_d, 0, 0, 0, 0, 0); f_string_range_t range = f_string_range_t_initialize; if (object) { @@ -142,7 +142,7 @@ extern "C" { f_file_t input = f_file_t_initialize; - input.id = f_type_descriptor_input; + input.id = F_type_descriptor_input_d; input.size_read = 2048; f_array_length_t total = 0; @@ -202,19 +202,19 @@ extern "C" { for (; range.start <= range.stop; ++range.start) { - if (block.string[range.start] == fss_extended_list_write_pipe_content_start) { + if (block.string[range.start] == fss_extended_list_write_pipe_content_start_s) { state = 0x2; ++range.start; break; } - if (block.string[range.start] == fss_extended_list_write_pipe_content_end) { + if (block.string[range.start] == fss_extended_list_write_pipe_content_end_s) { state = 0x3; ++range.start; break; } - if (block.string[range.start] == fss_extended_list_write_pipe_content_ignore) { + if (block.string[range.start] == fss_extended_list_write_pipe_content_ignore_s) { // this is not used by objects. continue; } @@ -251,7 +251,7 @@ extern "C" { for (; range.start <= range.stop; ++range.start) { - if (block.string[range.start] == fss_extended_list_write_pipe_content_start) { + if (block.string[range.start] == fss_extended_list_write_pipe_content_start_s) { if (main.error.verbosity != f_console_verbosity_quiet) { fll_print_format("%c%[%sThis standard only supports one content per object.%]%c", main.error.to.stream, f_string_eol_s[0], main.error.context, main.error.prefix, main.error.context, f_string_eol_s[0]); } @@ -260,13 +260,13 @@ extern "C" { break; } - if (block.string[range.start] == fss_extended_list_write_pipe_content_end) { + if (block.string[range.start] == fss_extended_list_write_pipe_content_end_s) { state = 0x3; range.start++; break; } - if (block.string[range.start] == fss_extended_list_write_pipe_content_ignore) { + if (block.string[range.start] == fss_extended_list_write_pipe_content_ignore_s) { if (ignore) { if (range_ignore.start > range_ignore.stop) { range_ignore.start = content.used; @@ -274,8 +274,8 @@ extern "C" { } else { if (ignore->used + 1 > ignore->size) { - if (ignore->size + f_fss_default_allocation_step > f_array_length_t_size) { - if (ignore->size + 1 > f_array_length_t_size) { + if (ignore->size + F_fss_default_allocation_step_d > F_array_length_t_size_d) { + if (ignore->size + 1 > F_array_length_t_size_d) { fll_error_print(main.error, F_string_too_large, "fss_extended_list_write_process_pipe", F_true); status = F_status_set_error(F_string_too_large); @@ -285,7 +285,7 @@ extern "C" { macro_f_string_ranges_t_resize(status, (*ignore), ignore->size + 1); } else { - macro_f_string_ranges_t_resize(status, (*ignore), ignore->size + f_fss_default_allocation_step); + macro_f_string_ranges_t_resize(status, (*ignore), ignore->size + F_fss_default_allocation_step_d); } if (F_status_is_error(status)) { @@ -358,8 +358,8 @@ extern "C" { if (location + 1 < contents.used && l > contents.array[location + 1]) continue; if (ignore->used + 1 > ignore->size) { - if (ignore->size + f_fss_default_allocation_step > f_array_length_t_size) { - if (ignore->size + 1 > f_array_length_t_size) { + if (ignore->size + F_fss_default_allocation_step_d > F_array_length_t_size_d) { + if (ignore->size + 1 > F_array_length_t_size_d) { fll_error_print(main.error, F_string_too_large, "fss_extended_list_write_process_parameter_ignore", F_true); return F_status_set_error(F_string_too_large); @@ -368,7 +368,7 @@ extern "C" { macro_f_string_ranges_t_resize(status, (*ignore), ignore->size + 1); } else { - macro_f_string_ranges_t_resize(status, (*ignore), ignore->size + f_fss_default_allocation_step); + macro_f_string_ranges_t_resize(status, (*ignore), ignore->size + F_fss_default_allocation_step_d); } if (F_status_is_error(status)) { @@ -391,7 +391,7 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number); if (F_status_is_error(status)) { - fll_error_parameter_integer_print(main.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_write_long_ignore, arguments.argv[index]); + fll_error_parameter_integer_print(main.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_write_long_ignore_s, arguments.argv[index]); return status; } @@ -410,7 +410,7 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number); if (F_status_is_error(status)) { - fll_error_parameter_integer_print(main.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_write_long_ignore, arguments.argv[index]); + fll_error_parameter_integer_print(main.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_write_long_ignore_s, arguments.argv[index]); return status; } diff --git a/level_3/fss_extended_list_write/c/private-fss_extended_list_write.h b/level_3/fss_extended_list_write/c/private-fss_extended_list_write.h index 372fdbb..9016cea 100644 --- a/level_3/fss_extended_list_write/c/private-fss_extended_list_write.h +++ b/level_3/fss_extended_list_write/c/private-fss_extended_list_write.h @@ -19,7 +19,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_extended_list_write_error_parameter_same_times_print_ - void fss_extended_list_write_error_parameter_same_times_print(const fss_extended_list_write_main_t main) f_attribute_visibility_internal; + void fss_extended_list_write_error_parameter_same_times_print(const fss_extended_list_write_main_t main) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_write_error_parameter_same_times_print_ /** @@ -29,7 +29,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_extended_list_write_error_parameter_unsupported_eol_print_ - void fss_extended_list_write_error_parameter_unsupported_eol_print(const fss_extended_list_write_main_t main) f_attribute_visibility_internal; + void fss_extended_list_write_error_parameter_unsupported_eol_print(const fss_extended_list_write_main_t main) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_write_error_parameter_unsupported_eol_print_ /** @@ -43,7 +43,7 @@ extern "C" { * The parameter name, such as "help" in "--help". */ #ifndef _di_fss_extended_list_write_error_parameter_value_missing_print_ - void fss_extended_list_write_error_parameter_value_missing_print(const fss_extended_list_write_main_t main, const f_string_t symbol, const f_string_t parameter) f_attribute_visibility_internal; + void fss_extended_list_write_error_parameter_value_missing_print(const fss_extended_list_write_main_t main, const f_string_t symbol, const f_string_t parameter) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_write_error_parameter_value_missing_print_ /** @@ -73,7 +73,7 @@ extern "C" { * F_failure (with error bit) for any othe failure. */ #ifndef _di_fss_extended_list_write_process_ - extern f_status_t fss_extended_list_write_process(const fss_extended_list_write_main_t main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, const f_string_ranges_t *ignore, f_string_dynamic_t *buffer) f_attribute_visibility_internal; + extern f_status_t fss_extended_list_write_process(const fss_extended_list_write_main_t main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, const f_string_ranges_t *ignore, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_write_process_ /** @@ -97,7 +97,7 @@ extern "C" { * F_failure (with error bit) for any othe failure. */ #ifndef _di_fss_extended_list_write_process_pipe_ - extern f_status_t fss_extended_list_write_process_pipe(const fss_extended_list_write_main_t main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer, f_string_ranges_t *ignore) f_attribute_visibility_internal; + extern f_status_t fss_extended_list_write_process_pipe(const fss_extended_list_write_main_t main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer, f_string_ranges_t *ignore) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_write_process_pipe_ /** @@ -119,7 +119,7 @@ extern "C" { * F_failure (with error bit) for any othe failure. */ #ifndef _di_fss_extended_list_write_process_parameter_ignore_ - extern f_status_t fss_extended_list_write_process_parameter_ignore(const f_console_arguments_t arguments, const fss_extended_list_write_main_t main, const f_array_lengths_t contents, const f_array_length_t location, f_string_ranges_t *ignore) f_attribute_visibility_internal; + extern f_status_t fss_extended_list_write_process_parameter_ignore(const f_console_arguments_t arguments, const fss_extended_list_write_main_t main, const f_array_lengths_t contents, const f_array_length_t location, f_string_ranges_t *ignore) F_attribute_visibility_internal_d; #endif // _di_fss_extended_list_write_process_parameter_ignore_ #ifdef __cplusplus diff --git a/level_3/fss_extended_read/c/fss_extended_read.c b/level_3/fss_extended_read/c/fss_extended_read.c index 5f33fbb..dbff56a 100644 --- a/level_3/fss_extended_read/c/fss_extended_read.c +++ b/level_3/fss_extended_read/c/fss_extended_read.c @@ -11,7 +11,7 @@ extern "C" { flockfile(file.stream); - fll_program_print_help_header(file, context, fss_extended_read_name_long, fss_extended_read_version); + fll_program_print_help_header(file, context, fss_extended_read_program_name_long_s, fss_extended_read_program_version_s); fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); @@ -25,22 +25,22 @@ extern "C" { f_print_character(f_string_eol_s[0], file.stream); - fll_program_print_help_option(file, context, fss_extended_read_short_at, fss_extended_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric index."); - fll_program_print_help_option(file, context, fss_extended_read_short_content, fss_extended_read_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Content (default)."); - fll_program_print_help_option(file, context, fss_extended_read_short_columns, fss_extended_read_long_columns, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns."); - fll_program_print_help_option(file, context, fss_extended_read_short_delimit, fss_extended_read_long_delimit, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits."); - fll_program_print_help_option(file, context, fss_extended_read_short_depth, fss_extended_read_long_depth, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth."); - fll_program_print_help_option(file, context, fss_extended_read_short_empty, fss_extended_read_long_empty, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing."); - fll_program_print_help_option(file, context, fss_extended_read_short_line, fss_extended_read_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line."); - fll_program_print_help_option(file, context, fss_extended_read_short_name, fss_extended_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name."); - fll_program_print_help_option(file, context, fss_extended_read_short_object, fss_extended_read_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object."); - fll_program_print_help_option(file, context, fss_extended_read_short_pipe, fss_extended_read_long_pipe, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format."); - fll_program_print_help_option(file, context, fss_extended_read_short_raw, fss_extended_read_long_raw, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print with the original quotes and escapes."); - fll_program_print_help_option(file, context, fss_extended_read_short_select, fss_extended_read_long_select, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index."); - fll_program_print_help_option(file, context, fss_extended_read_short_total, fss_extended_read_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines."); - fll_program_print_help_option(file, context, fss_extended_read_short_trim, fss_extended_read_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print."); - - fll_program_print_help_usage(file, context, fss_extended_read_name, "filename(s)"); + fll_program_print_help_option(file, context, fss_extended_read_short_at_s, fss_extended_read_long_at_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric index."); + fll_program_print_help_option(file, context, fss_extended_read_short_content_s, fss_extended_read_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Content (default)."); + fll_program_print_help_option(file, context, fss_extended_read_short_columns_s, fss_extended_read_long_columns_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns."); + fll_program_print_help_option(file, context, fss_extended_read_short_delimit_s, fss_extended_read_long_delimit_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits."); + fll_program_print_help_option(file, context, fss_extended_read_short_depth_s, fss_extended_read_long_depth_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth."); + fll_program_print_help_option(file, context, fss_extended_read_short_empty_s, fss_extended_read_long_empty_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing."); + fll_program_print_help_option(file, context, fss_extended_read_short_line_s, fss_extended_read_long_line_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line."); + fll_program_print_help_option(file, context, fss_extended_read_short_name_s, fss_extended_read_long_name_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name."); + fll_program_print_help_option(file, context, fss_extended_read_short_object_s, fss_extended_read_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object."); + fll_program_print_help_option(file, context, fss_extended_read_short_pipe_s, fss_extended_read_long_pipe_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format."); + fll_program_print_help_option(file, context, fss_extended_read_short_raw_s, fss_extended_read_long_raw_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print with the original quotes and escapes."); + fll_program_print_help_option(file, context, fss_extended_read_short_select_s, fss_extended_read_long_select_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index."); + fll_program_print_help_option(file, context, fss_extended_read_short_total_s, fss_extended_read_long_total_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines."); + fll_program_print_help_option(file, context, fss_extended_read_short_trim_s, fss_extended_read_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print."); + + fll_program_print_help_usage(file, context, fss_extended_read_program_name_s, "filename(s)"); fl_print_format(" %[Notes:%]%c", file.stream, context.set.important, context.set.important, f_string_eol_s[0]); @@ -49,47 +49,47 @@ extern "C" { fl_print_format(" All numeric positions (indexes) start at 0 instead of 1.%c", file.stream, f_string_eol_s[0]); fl_print_format(" For example, a file of 17 lines would range from 0 to 16.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" When using the %[%s%s%] option, an order of operations is enforced on the parameters.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth, context.set.notable, f_string_eol_s[0]); + fl_print_format(" When using the %[%s%s%] option, an order of operations is enforced on the parameters.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", file.stream, f_string_eol_s[0]); - fl_print_format(" %[%s%s%]: An Object index at the specified depth.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_at, context.set.notable, f_string_eol_s[0]); - fl_print_format(" %[%s%s%]: A new depth within the specified depth, indexed from the root.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth, context.set.notable, f_string_eol_s[0]); - fl_print_format(" %[%s%s%]: An Object name at the specified depth.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" %[%s%s%]: An Object index at the specified depth.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_at_s, context.set.notable, f_string_eol_s[0]); + fl_print_format(" %[%s%s%]: A new depth within the specified depth, indexed from the root.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth_s, context.set.notable, f_string_eol_s[0]); + fl_print_format(" %[%s%s%]: An Object name at the specified depth.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_name_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameter %[%s%s%] must be in numeric order, but values in between may be skipped.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth, context.set.notable, f_string_eol_s[0]); + fl_print_format(" The parameter %[%s%s%] must be in numeric order, but values in between may be skipped.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%c", file.stream, f_string_eol_s[0]); fl_print_format(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameter %[%s%s%] selects a Content column.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_select, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" The parameter %[%s%s%] selects a Content column.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_select_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" Specify both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_object, context.set.notable); - fl_print_format(" and the %[%s%s%] parameters to get the total objects.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_total, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" Specify both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_object_s, context.set.notable); + fl_print_format(" and the %[%s%s%] parameters to get the total objects.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_total_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" When both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_at, context.set.notable); - fl_print_format(" and %[%s%s%] parameters are specified (at the same depth),", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_name, context.set.notable); - fl_print_format(" the %[%s%s%] parameter value will be treated as a position relative to the specified", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_at, context.set.notable); - fl_print_format(" %[%s%s%] parameter value.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" When both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_at_s, context.set.notable); + fl_print_format(" and %[%s%s%] parameters are specified (at the same depth),", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_name_s, context.set.notable); + fl_print_format(" the %[%s%s%] parameter value will be treated as a position relative to the specified", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_at_s, context.set.notable); + fl_print_format(" %[%s%s%] parameter value.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_name_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" This program may support parameters, such as %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth, context.set.notable); - fl_print_format(" or %[%s%s%], even if not supported by the standard.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_select, context.set.notable, f_string_eol_s[0]); + fl_print_format(" This program may support parameters, such as %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth_s, context.set.notable); + fl_print_format(" or %[%s%s%], even if not supported by the standard.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_select_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" This is done to help ensure consistency for scripting.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth, context.set.notable); + fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth_s, context.set.notable); fl_print_format(" if the standard doesn't support nested Content, then only a depth of 0 would be valid.%c", file.stream, f_string_eol_s[0]); - fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_select, context.set.notable); + fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_select_s, context.set.notable); fl_print_format(" if the standard doesn't support multiple Content groups, then only a select of 0 would be valid.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameter %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_trim, context.set.notable); + fl_print_format(" The parameter %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_trim_s, context.set.notable); fl_print_format(" will remove leading and trailing whitespaces when selecting objects or when printing objects.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" When specifying both the %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_object, context.set.notable); - fl_print_format(" parameter and the %[%s%s%] parameter, the entire Object and Content are printed, including the formatting.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_content, context.set.notable, f_string_eol_s[0]); + fl_print_format(" When specifying both the %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_object_s, context.set.notable); + fl_print_format(" parameter and the %[%s%s%] parameter, the entire Object and Content are printed, including the formatting.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_content_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" Both the Object and Content printed are already escaped.%c", file.stream, f_string_eol_s[0]); fl_print_format(" Both the Object and Content are separated by a space.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameter %[%s%s%] accepts the following:%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_delimit, context.set.notable, f_string_eol_s[0]); + fl_print_format(" The parameter %[%s%s%] accepts the following:%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_delimit_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" - %[%s%]: Do not apply delimits.%c", file.stream, context.set.notable, fss_extended_read_delimit_mode_name_none, context.set.notable, f_string_eol_s[0]); fl_print_format(" - %[%s%]: (default) Apply all delimits.%c", file.stream, context.set.notable, fss_extended_read_delimit_mode_name_all, context.set.notable, f_string_eol_s[0]); fl_print_format(" - %[%s%]: Apply delimits for Objects.%c", file.stream, context.set.notable, fss_extended_read_delimit_mode_name_object, context.set.notable, f_string_eol_s[0]); @@ -97,15 +97,15 @@ extern "C" { fl_print_format(" - A number, 0 or greater, followed by a %[%s%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%c", file.stream, context.set.notable, fss_extended_read_delimit_mode_name_greater, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); fl_print_format(" - A number, 0 or lesser, followed by a %[%s%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%c%c", file.stream, context.set.notable, fss_extended_read_delimit_mode_name_lesser, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The %[%s%s%] parameter may be specified multiple times to customize the delimit behavior.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_delimit, context.set.notable, f_string_eol_s[0]); + fl_print_format(" The %[%s%s%] parameter may be specified multiple times to customize the delimit behavior.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_delimit_s, context.set.notable, f_string_eol_s[0]); - fl_print_format(" The %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_delimit, context.set.notable); + fl_print_format(" The %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_delimit_s, context.set.notable); fl_print_format(" values %[%s%]", file.stream, context.set.notable, fss_extended_read_delimit_mode_name_none, context.set.notable); fl_print_format(" and %[%s%],", file.stream, context.set.notable, fss_extended_read_delimit_mode_name_all, context.set.notable); fl_print_format(" overrule all other delimit values.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The parameters %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_columns, context.set.notable); - fl_print_format(" and %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_select, context.set.notable); + fl_print_format(" The parameters %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_columns_s, context.set.notable); + fl_print_format(" and %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_select_s, context.set.notable); fl_print_format(" refer to a Content column.%c", file.stream, f_string_eol_s[0]); fl_print_format(" The word \"column\" is being loosely defined to refer to a specific Content.%c", file.stream, f_string_eol_s[0]); fl_print_format(" This is not to be confused with a depth.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); @@ -121,7 +121,7 @@ extern "C" { f_status_t status = F_none; { - const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_extended_read_total_parameters); + const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_extended_read_total_parameters_d); { f_console_parameter_id_t ids[3] = { fss_extended_read_parameter_no_color, fss_extended_read_parameter_light, fss_extended_read_parameter_dark }; @@ -196,7 +196,7 @@ extern "C" { } if (main->parameters[fss_extended_read_parameter_version].result == f_console_result_found) { - fll_program_print_version(main->output.to, fss_extended_read_version); + fll_program_print_version(main->output.to, fss_extended_read_program_version_s); fss_extended_read_main_delete(main); return status; @@ -222,12 +222,12 @@ extern "C" { }; const f_string_t parameter_name[] = { - fss_extended_read_long_at, - fss_extended_read_long_depth, - fss_extended_read_long_line, - fss_extended_read_long_select, - fss_extended_read_long_name, - fss_extended_read_long_delimit, + fss_extended_read_long_at_s, + fss_extended_read_long_depth_s, + fss_extended_read_long_line_s, + fss_extended_read_long_select_s, + fss_extended_read_long_name_s, + fss_extended_read_long_delimit_s, }; const f_string_t message_positive_number = "positive number"; @@ -270,11 +270,11 @@ extern "C" { }; const f_string_t parameter_name[] = { - fss_extended_read_long_depth, - fss_extended_read_long_line, - fss_extended_read_long_pipe, - fss_extended_read_long_select, - fss_extended_read_long_total, + fss_extended_read_long_depth_s, + fss_extended_read_long_line_s, + fss_extended_read_long_pipe_s, + fss_extended_read_long_select_s, + fss_extended_read_long_total_s, }; const uint8_t parameter_match[] = { @@ -291,7 +291,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_columns, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_columns_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, parameter_name[i], main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); @@ -309,9 +309,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_pipe, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_pipe_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_total, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_total_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -322,9 +322,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_pipe, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_pipe_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_line, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_line_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -349,7 +349,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_delimit, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_delimit_s, main->error.notable); fl_print_format("%[' must not be empty.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -437,7 +437,7 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments->argv[location], range, &data.delimit_depth); if (F_status_is_error(status)) { - fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_read_long_delimit, arguments->argv[location]); + fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_read_long_delimit_s, arguments->argv[location]); break; } @@ -481,7 +481,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_select, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_select_s, main->error.notable); fl_print_format("%[' parameter requires a positive number.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -500,8 +500,8 @@ extern "C" { if (F_status_is_error_not(status) && main->process_pipe) { f_file_t file = f_file_t_initialize; - file.id = f_type_descriptor_input; - file.stream = f_type_input; + file.id = F_type_descriptor_input_d; + file.stream = F_type_input_d; data.files.array[0].name = 0; data.files.array[0].range.start = 0; @@ -614,7 +614,7 @@ extern "C" { #ifndef _di_fss_extended_read_main_delete_ f_status_t fss_extended_read_main_delete(fss_extended_read_main_t *main) { - for (f_array_length_t i = 0; i < fss_extended_read_total_parameters; ++i) { + for (f_array_length_t i = 0; i < fss_extended_read_total_parameters_d; ++i) { macro_f_array_lengths_t_delete_simple(main->parameters[i].locations); macro_f_array_lengths_t_delete_simple(main->parameters[i].locations_sub); macro_f_array_lengths_t_delete_simple(main->parameters[i].values); diff --git a/level_3/fss_extended_read/c/fss_extended_read.h b/level_3/fss_extended_read/c/fss_extended_read.h index cceca82..8670e49 100644 --- a/level_3/fss_extended_read/c/fss_extended_read.h +++ b/level_3/fss_extended_read/c/fss_extended_read.h @@ -50,61 +50,61 @@ extern "C" { #endif -#ifndef _di_fss_extended_read_version_ - #define fss_extended_read_major_version f_string_ascii_0 - #define fss_extended_read_minor_version f_string_ascii_5 - #define fss_extended_read_micro_version f_string_ascii_6 +#ifndef _di_fss_extended_read_program_version_ + #define fss_extended_read_program_version_major_s F_string_ascii_0_s + #define fss_extended_read_program_version_minor_s F_string_ascii_5_s + #define fss_extended_read_program_version_micro_s F_string_ascii_6_s - #ifndef fss_extended_read_nano_version_prefix - #define fss_extended_read_nano_version_prefix + #ifndef fss_extended_read_program_version_nano_prefix_s + #define fss_extended_read_program_version_nano_prefix_s #endif - #ifndef fss_extended_read_nano_version - #define fss_extended_read_nano_version + #ifndef fss_extended_read_program_version_nano_s + #define fss_extended_read_program_version_nano_s #endif - #define fss_extended_read_version fss_extended_read_major_version f_string_ascii_period fss_extended_read_minor_version f_string_ascii_period fss_extended_read_micro_version fss_extended_read_nano_version_prefix fss_extended_read_nano_version -#endif // _di_fss_extended_read_version_ + #define fss_extended_read_program_version_s fss_extended_read_program_version_major_s F_string_ascii_period_s fss_extended_read_program_version_minor_s F_string_ascii_period_s fss_extended_read_program_version_micro_s fss_extended_read_program_version_nano_prefix_s fss_extended_read_program_version_nano_s +#endif // _di_fss_extended_read_program_version_ -#ifndef _di_fss_extended_read_name_ - #define fss_extended_read_name "fss_extended_read" - #define fss_extended_read_name_long "FSS Extended Read" -#endif // _di_fss_extended_read_name_ +#ifndef _di_fss_extended_read_program_name_ + #define fss_extended_read_program_name_s "fss_extended_read" + #define fss_extended_read_program_name_long_s "FSS Extended Read" +#endif // _di_fss_extended_read_program_name_ #ifndef _di_fss_extended_read_defines_ - #define fss_extended_read_pipe_content_end '\f' - #define fss_extended_read_pipe_content_ignore '\v' - #define fss_extended_read_pipe_content_start '\b' + #define fss_extended_read_pipe_content_end_s '\f' + #define fss_extended_read_pipe_content_ignore_s '\v' + #define fss_extended_read_pipe_content_start_s '\b' - #define fss_extended_read_short_at "a" - #define fss_extended_read_short_content "c" - #define fss_extended_read_short_columns "C" - #define fss_extended_read_short_delimit "D" - #define fss_extended_read_short_depth "d" - #define fss_extended_read_short_empty "e" - #define fss_extended_read_short_line "l" - #define fss_extended_read_short_name "n" - #define fss_extended_read_short_object "o" - #define fss_extended_read_short_pipe "p" - #define fss_extended_read_short_raw "R" - #define fss_extended_read_short_select "s" - #define fss_extended_read_short_total "t" - #define fss_extended_read_short_trim "T" + #define fss_extended_read_short_at_s "a" + #define fss_extended_read_short_content_s "c" + #define fss_extended_read_short_columns_s "C" + #define fss_extended_read_short_delimit_s "D" + #define fss_extended_read_short_depth_s "d" + #define fss_extended_read_short_empty_s "e" + #define fss_extended_read_short_line_s "l" + #define fss_extended_read_short_name_s "n" + #define fss_extended_read_short_object_s "o" + #define fss_extended_read_short_pipe_s "p" + #define fss_extended_read_short_raw_s "R" + #define fss_extended_read_short_select_s "s" + #define fss_extended_read_short_total_s "t" + #define fss_extended_read_short_trim_s "T" - #define fss_extended_read_long_at "at" - #define fss_extended_read_long_content "content" - #define fss_extended_read_long_columns "columns" - #define fss_extended_read_long_delimit "delimit" - #define fss_extended_read_long_depth "depth" - #define fss_extended_read_long_empty "empty" - #define fss_extended_read_long_line "line" - #define fss_extended_read_long_name "name" - #define fss_extended_read_long_object "object" - #define fss_extended_read_long_pipe "pipe" - #define fss_extended_read_long_raw "raw" - #define fss_extended_read_long_select "select" - #define fss_extended_read_long_total "total" - #define fss_extended_read_long_trim "trim" + #define fss_extended_read_long_at_s "at" + #define fss_extended_read_long_content_s "content" + #define fss_extended_read_long_columns_s "columns" + #define fss_extended_read_long_delimit_s "delimit" + #define fss_extended_read_long_depth_s "depth" + #define fss_extended_read_long_empty_s "empty" + #define fss_extended_read_long_line_s "line" + #define fss_extended_read_long_name_s "name" + #define fss_extended_read_long_object_s "object" + #define fss_extended_read_long_pipe_s "pipe" + #define fss_extended_read_long_raw_s "raw" + #define fss_extended_read_long_select_s "select" + #define fss_extended_read_long_total_s "total" + #define fss_extended_read_long_trim_s "trim" enum { fss_extended_read_parameter_help, @@ -144,23 +144,23 @@ extern "C" { f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(fss_extended_read_short_at, fss_extended_read_long_at, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_content, fss_extended_read_long_content, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_columns, fss_extended_read_long_columns, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_delimit, fss_extended_read_long_delimit, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_depth, fss_extended_read_long_depth, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_empty, fss_extended_read_long_empty, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_line, fss_extended_read_long_line, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_name, fss_extended_read_long_name, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_object, fss_extended_read_long_object, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_pipe, fss_extended_read_long_pipe, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_raw, fss_extended_read_long_raw, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_select, fss_extended_read_long_select, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_total, fss_extended_read_long_total, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_read_short_trim, fss_extended_read_long_trim, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_read_short_at_s, fss_extended_read_long_at_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_read_short_content_s, fss_extended_read_long_content_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_read_short_columns_s, fss_extended_read_long_columns_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_read_short_delimit_s, fss_extended_read_long_delimit_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_read_short_depth_s, fss_extended_read_long_depth_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_read_short_empty_s, fss_extended_read_long_empty_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_read_short_line_s, fss_extended_read_long_line_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_read_short_name_s, fss_extended_read_long_name_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_read_short_object_s, fss_extended_read_long_object_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_read_short_pipe_s, fss_extended_read_long_pipe_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_read_short_raw_s, fss_extended_read_long_raw_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_read_short_select_s, fss_extended_read_long_select_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_read_short_total_s, fss_extended_read_long_total_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_read_short_trim_s, fss_extended_read_long_trim_s, 0, 0, f_console_type_normal), \ } - #define fss_extended_read_total_parameters 23 + #define fss_extended_read_total_parameters_d 23 #endif // _di_fss_extended_read_defines_ /** @@ -205,7 +205,7 @@ extern "C" { #ifndef _di_fss_extended_read_main_t_ typedef struct { - f_console_parameter_t parameters[fss_extended_read_total_parameters]; + f_console_parameter_t parameters[fss_extended_read_total_parameters_d]; f_array_lengths_t remaining; bool process_pipe; diff --git a/level_3/fss_extended_read/c/main.c b/level_3/fss_extended_read/c/main.c index bd23c9d..bc4ccec 100644 --- a/level_3/fss_extended_read/c/main.c +++ b/level_3/fss_extended_read/c/main.c @@ -12,13 +12,13 @@ int main(const int argc, const f_string_t *argv) { const f_status_t status = fss_extended_read_main(&arguments, &data); // flush output pipes before closing. - fflush(f_type_output); - fflush(f_type_error); + fflush(F_type_output_d); + fflush(F_type_error_d); // close all open file descriptors. - close(f_type_descriptor_output); - close(f_type_descriptor_input); - close(f_type_descriptor_error); + close(F_type_descriptor_output_d); + close(F_type_descriptor_input_d); + close(F_type_descriptor_error_d); if (F_status_is_error(status)) { return 1; diff --git a/level_3/fss_extended_read/c/private-common.h b/level_3/fss_extended_read/c/private-common.h index 526f63f..2986b36 100644 --- a/level_3/fss_extended_read/c/private-common.h +++ b/level_3/fss_extended_read/c/private-common.h @@ -20,8 +20,8 @@ extern "C" { * - small: An allocation step used for buffers that are anticipated to have small buffers. */ #ifndef _di_fss_extended_read_common_ - #define fss_extended_read_common_allocation_large 256 - #define fss_extended_read_common_allocation_small 16 + #define fss_extended_read_common_allocation_large_d 256 + #define fss_extended_read_common_allocation_small_d 16 #endif // _di_fss_extended_read_common_ /** @@ -211,7 +211,7 @@ extern "C" { * The data to deallocate. */ #ifndef _di_fss_extended_read_data_delete_simple_ - extern void fss_extended_read_data_delete_simple(fss_extended_read_data_t *data) f_attribute_visibility_internal; + extern void fss_extended_read_data_delete_simple(fss_extended_read_data_t *data) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_data_delete_simple_ /** @@ -221,7 +221,7 @@ extern "C" { * The depth to deallocate. */ #ifndef _di_fss_extended_read_depth_delete_simple_ - extern void fss_extended_read_depth_delete_simple(fss_extended_read_depth_t *depth) f_attribute_visibility_internal; + extern void fss_extended_read_depth_delete_simple(fss_extended_read_depth_t *depth) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_depth_delete_simple_ /** @@ -245,7 +245,7 @@ extern "C" { * @see fss_extended_read_depths_increase() */ #ifndef _di_fss_extended_read_depths_resize_ - extern f_status_t fss_extended_read_depths_resize(const f_array_length_t length, fss_extended_read_depths_t *depths) f_attribute_visibility_internal; + extern f_status_t fss_extended_read_depths_resize(const f_array_length_t length, fss_extended_read_depths_t *depths) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_depths_resize_ #ifdef __cplusplus diff --git a/level_3/fss_extended_read/c/private-fss_extended_read.c b/level_3/fss_extended_read/c/private-fss_extended_read.c index 312f0d6..b6ae1b5 100644 --- a/level_3/fss_extended_read/c/private-fss_extended_read.c +++ b/level_3/fss_extended_read/c/private-fss_extended_read.c @@ -107,7 +107,7 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments->argv[position_depth], range, &data->depths.array[i].depth); if (F_status_is_error(status)) { - fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_read_long_depth, arguments->argv[position_depth]); + fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_read_long_depth_s, arguments->argv[position_depth]); return status; } @@ -131,7 +131,7 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments->argv[data->depths.array[i].index_at], range, &data->depths.array[i].value_at); if (F_status_is_error(status)) { - fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_read_long_at, arguments->argv[data->depths.array[i].index_at]); + fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_read_long_at_s, arguments->argv[data->depths.array[i].index_at]); return status; } @@ -178,7 +178,7 @@ extern "C" { fl_print_format("%c%[%sThe value '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); fl_print_format("%[%ul%]", main->error.to.stream, main->error.notable, data->depths.array[i].depth, main->error.notable); fl_print_format("%[' may only be specified once for the parameter '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth_s, main->error.notable); fl_print_format("%['.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -191,7 +191,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth_s, main->error.notable); fl_print_format("%[' may not have the value '%]", main->error.to.stream, main->error.context, main->error.context); fl_print_format("%[%ul%]", main->error.to.stream, main->error.notable, data->depths.array[i].depth, main->error.notable); fl_print_format("%[' before the value '%]", main->error.to.stream, main->error.context, main->error.context); @@ -227,7 +227,7 @@ extern "C" { #ifndef _di_fss_extended_read_load_ f_status_t fss_extended_read_load(fss_extended_read_main_t * const main, fss_extended_read_data_t *data) { - f_state_t state = macro_f_state_t_initialize(fss_extended_read_common_allocation_large, fss_extended_read_common_allocation_small, 0, 0, 0, 0, 0); + f_state_t state = macro_f_state_t_initialize(fss_extended_read_common_allocation_large_d, fss_extended_read_common_allocation_small_d, 0, 0, 0, 0, 0); f_string_range_t input = macro_f_string_range_t_initialize(data->buffer.used); data->delimits_object.used = 0; @@ -430,10 +430,10 @@ extern "C" { void fss_extended_read_print_content_end(fss_extended_read_main_t * const main) { if (main->parameters[fss_extended_read_parameter_pipe].result == f_console_result_found) { - f_print_character(fss_extended_read_pipe_content_start, main->output.to.stream); + f_print_character(fss_extended_read_pipe_content_start_s, main->output.to.stream); } else { - f_print_character(f_fss_space, main->output.to.stream); + f_print_character(F_fss_space_s[0], main->output.to.stream); } } #endif // _di_fss_extended_read_print_content_end_ @@ -442,10 +442,10 @@ extern "C" { void fss_extended_read_print_object_end(fss_extended_read_main_t * const main) { if (main->parameters[fss_extended_read_parameter_pipe].result == f_console_result_found) { - f_print_character(fss_extended_read_pipe_content_end, main->output.to.stream); + f_print_character(fss_extended_read_pipe_content_end_s, main->output.to.stream); } else { - f_print_character(f_fss_space, main->output.to.stream); + f_print_character(F_fss_space_s[0], main->output.to.stream); } } #endif // _di_fss_extended_read_print_object_end_ @@ -461,10 +461,10 @@ extern "C" { void fss_extended_read_print_set_end(fss_extended_read_main_t * const main) { if (main->parameters[fss_extended_read_parameter_pipe].result == f_console_result_found) { - f_print_character(fss_extended_read_pipe_content_end, main->output.to.stream); + f_print_character(fss_extended_read_pipe_content_end_s, main->output.to.stream); } else { - f_print_character(f_fss_eol, main->output.to.stream); + f_print_character(f_fss_eol_s[0], main->output.to.stream); } } #endif // _di_fss_extended_read_print_set_end_ @@ -772,7 +772,7 @@ extern "C" { if (main->parameters[fss_extended_read_parameter_line].result == f_console_result_additional) { data->option |= fss_extended_read_data_option_line; - status = fss_extended_read_load_number(fss_extended_read_parameter_line, fss_extended_read_long_line, arguments, main, &data->line); + status = fss_extended_read_load_number(fss_extended_read_parameter_line, fss_extended_read_long_line_s, arguments, main, &data->line); if (F_status_is_error(status)) return status; } @@ -791,7 +791,7 @@ extern "C" { if (main->parameters[fss_extended_read_parameter_select].result == f_console_result_additional) { data->option |= fss_extended_read_data_option_select; - status = fss_extended_read_load_number(fss_extended_read_parameter_select, fss_extended_read_long_select, arguments, main, &data->select); + status = fss_extended_read_load_number(fss_extended_read_parameter_select, fss_extended_read_long_select_s, arguments, main, &data->select); if (F_status_is_error(status)) return status; } diff --git a/level_3/fss_extended_read/c/private-fss_extended_read.h b/level_3/fss_extended_read/c/private-fss_extended_read.h index 057a698..54449b9 100644 --- a/level_3/fss_extended_read/c/private-fss_extended_read.h +++ b/level_3/fss_extended_read/c/private-fss_extended_read.h @@ -25,7 +25,7 @@ extern "C" { * F_false if to not apply delimits. */ #ifndef _di_fss_extended_read_delimit_content_is_ - extern f_status_t fss_extended_read_delimit_content_is(const f_array_length_t depth, fss_extended_read_data_t * const data) f_attribute_visibility_internal; + extern f_status_t fss_extended_read_delimit_content_is(const f_array_length_t depth, fss_extended_read_data_t * const data) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_delimit_content_is_ /** @@ -41,7 +41,7 @@ extern "C" { * F_false if to not apply delimits. */ #ifndef _di_fss_extended_read_delimit_object_is_ - extern f_status_t fss_extended_read_delimit_object_is(const f_array_length_t depth, fss_extended_read_data_t * const data) f_attribute_visibility_internal; + extern f_status_t fss_extended_read_delimit_object_is(const f_array_length_t depth, fss_extended_read_data_t * const data) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_delimit_object_is_ /** @@ -72,7 +72,7 @@ extern "C" { * @see fss_extended_read_depths_resize() */ #ifndef _di_fss_extended_read_depth_process_ - extern f_status_t fss_extended_read_depth_process(f_console_arguments_t * const arguments, fss_extended_read_main_t * const main, fss_extended_read_data_t *data) f_attribute_visibility_internal; + extern f_status_t fss_extended_read_depth_process(f_console_arguments_t * const arguments, fss_extended_read_main_t * const main, fss_extended_read_data_t *data) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_depth_process_ /** @@ -90,7 +90,7 @@ extern "C" { * On failure to identify, an empty string is returned. */ #ifndef _di_fss_extended_read_file_identify_ - extern f_string_t fss_extended_read_file_identify(const f_array_length_t at, const fss_extended_read_files_t files) f_attribute_visibility_internal; + extern f_string_t fss_extended_read_file_identify(const f_array_length_t at, const fss_extended_read_files_t files) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_file_identify_ /** @@ -116,7 +116,7 @@ extern "C" { * @see fss_extended_read_process_option() */ #ifndef _di_fss_extended_read_load_ - extern f_status_t fss_extended_read_load(fss_extended_read_main_t * const main, fss_extended_read_data_t *data) f_attribute_visibility_internal; + extern f_status_t fss_extended_read_load(fss_extended_read_main_t * const main, fss_extended_read_data_t *data) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_load_ /** @@ -146,7 +146,7 @@ extern "C" { * @see fss_extended_read_depths_resize() */ #ifndef _di_fss_extended_read_load_number_ - extern f_status_t fss_extended_read_load_number(const f_array_length_t parameter, const f_string_t name, f_console_arguments_t * const arguments, fss_extended_read_main_t * const main, f_number_unsigned_t *number) f_attribute_visibility_internal; + extern f_status_t fss_extended_read_load_number(const f_array_length_t parameter, const f_string_t name, f_console_arguments_t * const arguments, fss_extended_read_main_t * const main, f_number_unsigned_t *number) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_load_number_ /** @@ -166,7 +166,7 @@ extern "C" { * The program data. */ #ifndef _di_fss_extended_read_print_at_ - extern void fss_extended_read_print_at(const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_extended_read_main_t * const main, fss_extended_read_data_t * const data) f_attribute_visibility_internal; + extern void fss_extended_read_print_at(const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_extended_read_main_t * const main, fss_extended_read_data_t * const data) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_print_at_ /** @@ -184,7 +184,7 @@ extern "C" { * F_success on success and something was matched (and total was printed). */ #ifndef _di_fss_extended_read_print_at_total_ - extern f_status_t fss_extended_read_print_at_total(const f_array_length_t at, fss_extended_read_main_t * const main, fss_extended_read_data_t *data) f_attribute_visibility_internal; + extern f_status_t fss_extended_read_print_at_total(const f_array_length_t at, fss_extended_read_main_t * const main, fss_extended_read_data_t *data) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_print_at_total_ /** @@ -194,7 +194,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_extended_read_print_content_end_ - extern void fss_extended_read_print_content_end(fss_extended_read_main_t * const main) f_attribute_visibility_internal; + extern void fss_extended_read_print_content_end(fss_extended_read_main_t * const main) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_print_content_end_ /** @@ -204,7 +204,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_extended_read_print_object_end_ - extern void fss_extended_read_print_object_end(fss_extended_read_main_t * const main) f_attribute_visibility_internal; + extern void fss_extended_read_print_object_end(fss_extended_read_main_t * const main) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_print_object_end_ /** @@ -214,7 +214,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_extended_read_print_one_ - extern void fss_extended_read_print_one(fss_extended_read_main_t * const main) f_attribute_visibility_internal; + extern void fss_extended_read_print_one(fss_extended_read_main_t * const main) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_print_one_ /** @@ -224,7 +224,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_extended_read_print_set_end_ - extern void fss_extended_read_print_set_end(fss_extended_read_main_t * const main) f_attribute_visibility_internal; + extern void fss_extended_read_print_set_end(fss_extended_read_main_t * const main) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_print_set_end_ /** @@ -234,7 +234,7 @@ extern "C" { * The main data. */ #ifndef _di_fss_extended_read_print_zero_ - extern void fss_extended_read_print_zero(fss_extended_read_main_t * const main) f_attribute_visibility_internal; + extern void fss_extended_read_print_zero(fss_extended_read_main_t * const main) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_print_zero_ /** @@ -259,7 +259,7 @@ extern "C" { * @see fss_extended_read_process_option() */ #ifndef _di_fss_extended_read_process_ - extern f_status_t fss_extended_read_process(f_console_arguments_t * const arguments, fss_extended_read_main_t * const main, fss_extended_read_data_t *data) f_attribute_visibility_internal; + extern f_status_t fss_extended_read_process(f_console_arguments_t * const arguments, fss_extended_read_main_t * const main, fss_extended_read_data_t *data) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_process_ /** @@ -277,7 +277,7 @@ extern "C" { * F_none on success. */ #ifndef _di_fss_extended_read_process_at_ - extern f_status_t fss_extended_read_process_at(fss_extended_read_main_t * const main, fss_extended_read_data_t *data, bool names[]) f_attribute_visibility_internal; + extern f_status_t fss_extended_read_process_at(fss_extended_read_main_t * const main, fss_extended_read_data_t *data, bool names[]) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_process_at_ /** @@ -295,7 +295,7 @@ extern "C" { * F_none on success. */ #ifndef _di_fss_extended_read_process_columns_ - extern f_status_t fss_extended_read_process_columns(fss_extended_read_main_t * const main, fss_extended_read_data_t *data, bool names[]) f_attribute_visibility_internal; + extern f_status_t fss_extended_read_process_columns(fss_extended_read_main_t * const main, fss_extended_read_data_t *data, bool names[]) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_process_columns_ /** @@ -313,7 +313,7 @@ extern "C" { * F_none on success. */ #ifndef _di_fss_extended_read_process_line_ - extern f_status_t fss_extended_read_process_line(fss_extended_read_main_t * const main, fss_extended_read_data_t *data, bool names[]) f_attribute_visibility_internal; + extern f_status_t fss_extended_read_process_line(fss_extended_read_main_t * const main, fss_extended_read_data_t *data, bool names[]) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_process_line_ /** @@ -331,7 +331,7 @@ extern "C" { * F_none on success. */ #ifndef _di_fss_extended_read_process_name_ - extern f_status_t fss_extended_read_process_name(fss_extended_read_data_t *data, bool names[]) f_attribute_visibility_internal; + extern f_status_t fss_extended_read_process_name(fss_extended_read_data_t *data, bool names[]) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_process_name_ /** @@ -354,7 +354,7 @@ extern "C" { * @see fss_extended_read_load_setting() */ #ifndef _di_fss_extended_read_process_option_ - extern f_status_t fss_extended_read_process_option(f_console_arguments_t * const arguments, fss_extended_read_main_t * const main, fss_extended_read_data_t *data) f_attribute_visibility_internal; + extern f_status_t fss_extended_read_process_option(f_console_arguments_t * const arguments, fss_extended_read_main_t * const main, fss_extended_read_data_t *data) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_process_option_ /** @@ -372,7 +372,7 @@ extern "C" { * F_none on success. */ #ifndef _di_fss_extended_read_process_total_ - extern f_status_t fss_extended_read_process_total(fss_extended_read_main_t * const main, fss_extended_read_data_t *data, bool names[]) f_attribute_visibility_internal; + extern f_status_t fss_extended_read_process_total(fss_extended_read_main_t * const main, fss_extended_read_data_t *data, bool names[]) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_process_total_ @@ -394,7 +394,7 @@ extern "C" { * F_false if not delimited. */ #ifndef _di_fss_extended_read_is_delimited_at_depth_ - extern f_status_t fss_extended_read_is_delimited_at_depth(const fss_extended_read_main_t main, const f_array_length_t depth) f_attribute_visibility_internal; + extern f_status_t fss_extended_read_is_delimited_at_depth(const fss_extended_read_main_t main, const f_array_length_t depth) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_is_delimited_at_depth_ /** @@ -421,7 +421,7 @@ extern "C" { * @see fss_extended_read_main_preprocess_depth() */ #ifndef _di_fss_extended_read_main_process_file_ - extern f_status_t fss_extended_read_main_process_file(const f_console_arguments_t arguments, fss_extended_read_main_t *main, const f_string_t file_name, const fss_extended_read_depths_t depths, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits) f_attribute_visibility_internal; + extern f_status_t fss_extended_read_main_process_file(const f_console_arguments_t arguments, fss_extended_read_main_t *main, const f_string_t file_name, const fss_extended_read_depths_t depths, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits) F_attribute_visibility_internal_d; #endif // _di_fss_extended_read_main_process_file_ #ifdef __cplusplus diff --git a/level_3/fss_extended_write/c/fss_extended_write.c b/level_3/fss_extended_write/c/fss_extended_write.c index ec97268..c3abe92 100644 --- a/level_3/fss_extended_write/c/fss_extended_write.c +++ b/level_3/fss_extended_write/c/fss_extended_write.c @@ -11,7 +11,7 @@ extern "C" { flockfile(file.stream); - fll_program_print_help_header(file, context, fss_extended_write_name_long, fss_extended_write_version); + fll_program_print_help_header(file, context, fss_extended_write_program_name_long_s, fss_extended_write_program_version_s); fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); @@ -25,17 +25,17 @@ extern "C" { f_print_character(f_string_eol_s[0], file.stream); - fll_program_print_help_option(file, context, fss_extended_write_short_file, fss_extended_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send file to."); - fll_program_print_help_option(file, context, fss_extended_write_short_content, fss_extended_write_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to file."); - fll_program_print_help_option(file, context, fss_extended_write_short_double, fss_extended_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); - fll_program_print_help_option(file, context, fss_extended_write_short_ignore, fss_extended_write_long_ignore, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content."); - fll_program_print_help_option(file, context, fss_extended_write_short_object, fss_extended_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to file."); - fll_program_print_help_option(file, context, fss_extended_write_short_partial, fss_extended_write_long_partial, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not file end of Object/Content character."); - fll_program_print_help_option(file, context, fss_extended_write_short_prepend, fss_extended_write_long_prepend, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content."); - fll_program_print_help_option(file, context, fss_extended_write_short_single, fss_extended_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); - fll_program_print_help_option(file, context, fss_extended_write_short_trim, fss_extended_write_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names."); + fll_program_print_help_option(file, context, fss_extended_write_short_file_s, fss_extended_write_long_file_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send file to."); + fll_program_print_help_option(file, context, fss_extended_write_short_content_s, fss_extended_write_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to file."); + fll_program_print_help_option(file, context, fss_extended_write_short_double_s, fss_extended_write_long_double_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); + fll_program_print_help_option(file, context, fss_extended_write_short_ignore_s, fss_extended_write_long_ignore_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content."); + fll_program_print_help_option(file, context, fss_extended_write_short_object_s, fss_extended_write_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to file."); + fll_program_print_help_option(file, context, fss_extended_write_short_partial_s, fss_extended_write_long_partial_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not file end of Object/Content character."); + fll_program_print_help_option(file, context, fss_extended_write_short_prepend_s, fss_extended_write_long_prepend_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content."); + fll_program_print_help_option(file, context, fss_extended_write_short_single_s, fss_extended_write_long_single_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); + fll_program_print_help_option(file, context, fss_extended_write_short_trim_s, fss_extended_write_long_trim_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names."); - fll_program_print_help_usage(file, context, fss_extended_write_name, f_string_empty_s); + fll_program_print_help_usage(file, context, fss_extended_write_program_name_s, f_string_empty_s); fl_print_format(" The pipe uses the Backspace character '%[\\b%]' (%[U+0008%]) to designate the start of a Content.%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]); fl_print_format(" The pipe uses the Form Feed character '%[\\f%]' (%[U+000C%]) to designate the end of the last Content.%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]); @@ -44,10 +44,10 @@ extern "C" { fl_print_format(" or a Form Feed character '%[\\f%]' (%[U+000C%]).%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]); fl_print_format(" The end of the pipe represents the end of any Object or Content.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" The FSS-0001 (Extended) specification does not support multi-line Content, therefore the parameter '%[%s%s%]'", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_write_long_prepend, context.set.notable); + fl_print_format(" The FSS-0001 (Extended) specification does not support multi-line Content, therefore the parameter '%[%s%s%]'", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_write_long_prepend_s, context.set.notable); fl_print_format(" does nothing.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" This program does not use the parameter '%[%s%s%]', which therefore does nothing.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_write_long_ignore, context.set.notable, f_string_eol_s[0]); + fl_print_format(" This program does not use the parameter '%[%s%s%]', which therefore does nothing.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_write_long_ignore_s, context.set.notable, f_string_eol_s[0]); fl_print_format(" This parameter requires two values.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); funlockfile(file.stream); @@ -61,7 +61,7 @@ extern "C" { f_status_t status = F_none; { - const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_extended_write_total_parameters); + const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_extended_write_total_parameters_d); { f_console_parameter_id_t ids[3] = { fss_extended_write_parameter_no_color, fss_extended_write_parameter_light, fss_extended_write_parameter_dark }; @@ -134,7 +134,7 @@ extern "C" { } if (main->parameters[fss_extended_write_parameter_version].result == f_console_result_found) { - fll_program_print_version(main->output.to, fss_extended_write_version); + fll_program_print_version(main->output.to, fss_extended_write_program_version_s); fss_extended_write_main_delete(main); return status; @@ -142,9 +142,9 @@ extern "C" { f_file_t output = f_file_t_initialize; - output.id = f_type_descriptor_output; - output.stream = f_type_output; - output.flag = f_file_flag_create | f_file_flag_write_only | f_file_flag_append; + output.id = F_type_descriptor_output_d; + output.stream = F_type_output_d; + output.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d; if (F_status_is_error_not(status)) { if (main->parameters[fss_extended_write_parameter_file].result == f_console_result_additional) { @@ -153,7 +153,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_file, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_file_s, main->error.notable); fl_print_format("%[' may only be specified once.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -174,7 +174,7 @@ extern "C" { } } else if (main->parameters[fss_extended_write_parameter_file].result == f_console_result_found) { - fss_extended_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_extended_write_long_file); + fss_extended_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_extended_write_long_file_s); status = F_status_set_error(F_parameter); } } @@ -183,11 +183,11 @@ extern "C" { if (main->parameters[fss_extended_write_parameter_object].locations.used || main->parameters[fss_extended_write_parameter_content].locations.used) { if (main->parameters[fss_extended_write_parameter_object].locations.used) { if (main->parameters[fss_extended_write_parameter_object].locations.used != main->parameters[fss_extended_write_parameter_object].values.used) { - fss_extended_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_extended_write_long_object); + fss_extended_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_extended_write_long_object_s); status = F_status_set_error(F_parameter); } else if (main->parameters[fss_extended_write_parameter_content].locations.used != main->parameters[fss_extended_write_parameter_content].values.used) { - fss_extended_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_extended_write_long_content); + fss_extended_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_extended_write_long_content_s); status = F_status_set_error(F_parameter); } else if (!main->parameters[fss_extended_write_parameter_content].locations.used && main->parameters[fss_extended_write_parameter_partial].result == f_console_result_none) { @@ -200,11 +200,11 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_partial, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter only allows either the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_object, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_object_s, main->error.notable); fl_print_format("%[' parameter or the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_content, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_content_s, main->error.notable); fl_print_format("%[' parameter, but not both.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -226,9 +226,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sEach '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_object, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_object_s, main->error.notable); fl_print_format("%[' parameter must be specified before a '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_content, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -247,9 +247,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sEach '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_object, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_object_s, main->error.notable); fl_print_format("%[' parameter must have at least one '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_content, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -263,7 +263,7 @@ extern "C" { } else if (main->parameters[fss_extended_write_parameter_content].locations.used) { if (main->parameters[fss_extended_write_parameter_content].locations.used != main->parameters[fss_extended_write_parameter_content].values.used) { - fss_extended_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_extended_write_long_content); + fss_extended_write_error_parameter_value_missing_print(*main, f_console_symbol_long_enable_s, fss_extended_write_long_content_s); status = F_status_set_error(F_parameter); } else if (!main->parameters[fss_extended_write_parameter_partial].locations.used) { @@ -277,9 +277,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThis requires either piped data or the use of the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_object, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_object_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_content, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -294,7 +294,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThis '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_partial, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_partial_s, main->error.notable); fl_print_format("%[' parameter cannot be used when processing a pipe.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -311,7 +311,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_prepend, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_prepend_s, main->error.notable); fl_print_format("%[' was specified, but no value was given.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -338,7 +338,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_prepend, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_prepend_s, main->error.notable); fl_print_format("%[' must only contain whitespace.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -354,7 +354,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe value for the parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_prepend, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_prepend_s, main->error.notable); fl_print_format("%[' must not be an empty string.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -371,7 +371,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_ignore, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_ignore_s, main->error.notable); fl_print_format("%[' was specified, but no values were given.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -387,7 +387,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_ignore, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_ignore_s, main->error.notable); fl_print_format("%[' requires two values.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -397,18 +397,18 @@ extern "C" { } } - f_fss_quote_t quote = f_fss_delimit_quote_double; + f_fss_quote_t quote = F_fss_delimit_quote_double_s; if (F_status_is_error_not(status)) { if (main->parameters[fss_extended_write_parameter_double].result == f_console_result_found) { if (main->parameters[fss_extended_write_parameter_single].result == f_console_result_found) { if (main->parameters[fss_extended_write_parameter_double].location < main->parameters[fss_extended_write_parameter_single].location) { - quote = f_fss_delimit_quote_single; + quote = F_fss_delimit_quote_single_s; } } } else if (main->parameters[fss_extended_write_parameter_single].result == f_console_result_found) { - quote = f_fss_delimit_quote_single; + quote = F_fss_delimit_quote_single_s; } } @@ -515,7 +515,7 @@ extern "C" { if (content_current < object_current || content_current > object_next) break; } - status = f_string_dynamics_increase_by(f_fss_default_allocation_step, &contents); + status = f_string_dynamics_increase_by(F_fss_default_allocation_step_d, &contents); if (F_status_is_error(status)) { fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamics_increase_by", F_true); @@ -595,7 +595,7 @@ extern "C" { #ifndef _di_fss_extended_write_main_delete_ f_status_t fss_extended_write_main_delete(fss_extended_write_main_t *main) { - for (f_array_length_t i = 0; i < fss_extended_write_total_parameters; ++i) { + for (f_array_length_t i = 0; i < fss_extended_write_total_parameters_d; ++i) { macro_f_array_lengths_t_delete_simple(main->parameters[i].locations); macro_f_array_lengths_t_delete_simple(main->parameters[i].locations_sub); macro_f_array_lengths_t_delete_simple(main->parameters[i].values); diff --git a/level_3/fss_extended_write/c/fss_extended_write.h b/level_3/fss_extended_write/c/fss_extended_write.h index b7b05e1..834a5cf 100644 --- a/level_3/fss_extended_write/c/fss_extended_write.h +++ b/level_3/fss_extended_write/c/fss_extended_write.h @@ -44,51 +44,51 @@ extern "C" { #endif -#ifndef _di_fss_extended_write_version_ - #define fss_extended_write_major_version f_string_ascii_0 - #define fss_extended_write_minor_version f_string_ascii_5 - #define fss_extended_write_micro_version f_string_ascii_6 +#ifndef _di_fss_extended_write_program_version_ + #define fss_extended_write_program_version_major_s F_string_ascii_0_s + #define fss_extended_write_program_version_minor_s F_string_ascii_5_s + #define fss_extended_write_program_version_micro_s F_string_ascii_6_s - #ifndef fss_extended_write_nano_version_prefix - #define fss_extended_write_nano_version_prefix + #ifndef fss_extended_write_program_version_nano_prefix_s + #define fss_extended_write_program_version_nano_prefix_s #endif - #ifndef fss_extended_write_nano_version - #define fss_extended_write_nano_version + #ifndef fss_extended_write_program_version_nano_s + #define fss_extended_write_program_version_nano_s #endif - #define fss_extended_write_version fss_extended_write_major_version f_string_ascii_period fss_extended_write_minor_version f_string_ascii_period fss_extended_write_micro_version fss_extended_write_nano_version_prefix fss_extended_write_nano_version -#endif // _di_fss_extended_write_version_ + #define fss_extended_write_program_version_s fss_extended_write_program_version_major_s F_string_ascii_period_s fss_extended_write_program_version_minor_s F_string_ascii_period_s fss_extended_write_program_version_micro_s fss_extended_write_program_version_nano_prefix_s fss_extended_write_program_version_nano_s +#endif // _di_fss_extended_write_program_version_ -#ifndef _di_fss_extended_write_name_ - #define fss_extended_write_name "fss_extended_write" - #define fss_extended_write_name_long "FSS Extended Write" -#endif // _di_fss_extended_write_name_ +#ifndef _di_fss_extended_write_program_name_ + #define fss_extended_write_program_name_s "fss_extended_write" + #define fss_extended_write_program_name_long_s "FSS Extended Write" +#endif // _di_fss_extended_write_program_name_ #ifndef _di_fss_extended_write_defines_ - #define fss_extended_write_pipe_content_end '\f' - #define fss_extended_write_pipe_content_ignore '\v' - #define fss_extended_write_pipe_content_start '\b' - - #define fss_extended_write_short_file "f" - #define fss_extended_write_short_content "c" - #define fss_extended_write_short_double "d" - #define fss_extended_write_short_ignore "I" - #define fss_extended_write_short_object "o" - #define fss_extended_write_short_partial "p" - #define fss_extended_write_short_prepend "P" - #define fss_extended_write_short_single "s" - #define fss_extended_write_short_trim "T" - - #define fss_extended_write_long_file "file" - #define fss_extended_write_long_content "content" - #define fss_extended_write_long_double "double" - #define fss_extended_write_long_ignore "ignore" - #define fss_extended_write_long_object "object" - #define fss_extended_write_long_partial "partial" - #define fss_extended_write_long_prepend "prepend" - #define fss_extended_write_long_single "single" - #define fss_extended_write_long_trim "trim" + #define fss_extended_write_pipe_content_end_s '\f' + #define fss_extended_write_pipe_content_ignore_s '\v' + #define fss_extended_write_pipe_content_start_s '\b' + + #define fss_extended_write_short_file_s "f" + #define fss_extended_write_short_content_s "c" + #define fss_extended_write_short_double_s "d" + #define fss_extended_write_short_ignore_s "I" + #define fss_extended_write_short_object_s "o" + #define fss_extended_write_short_partial_s "p" + #define fss_extended_write_short_prepend_s "P" + #define fss_extended_write_short_single_s "s" + #define fss_extended_write_short_trim_s "T" + + #define fss_extended_write_long_file_s "file" + #define fss_extended_write_long_content_s "content" + #define fss_extended_write_long_double_s "double" + #define fss_extended_write_long_ignore_s "ignore" + #define fss_extended_write_long_object_s "object" + #define fss_extended_write_long_partial_s "partial" + #define fss_extended_write_long_prepend_s "prepend" + #define fss_extended_write_long_single_s "single" + #define fss_extended_write_long_trim_s "trim" enum { fss_extended_write_parameter_help, @@ -123,23 +123,23 @@ extern "C" { f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, F_false, f_console_type_inverse), \ - f_console_parameter_t_initialize(fss_extended_write_short_file, fss_extended_write_long_file, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_write_short_content, fss_extended_write_long_content, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_write_short_double, fss_extended_write_long_double, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_write_short_ignore, fss_extended_write_long_ignore, 0, 2, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_write_short_object, fss_extended_write_long_object, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_write_short_partial, fss_extended_write_long_partial, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_write_short_prepend, fss_extended_write_long_prepend, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_write_short_single, fss_extended_write_long_single, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_extended_write_short_trim, fss_extended_write_long_trim, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_write_short_file_s, fss_extended_write_long_file_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_write_short_content_s, fss_extended_write_long_content_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_write_short_double_s, fss_extended_write_long_double_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_write_short_ignore_s, fss_extended_write_long_ignore_s, 0, 2, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_write_short_object_s, fss_extended_write_long_object_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_write_short_partial_s, fss_extended_write_long_partial_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_write_short_prepend_s, fss_extended_write_long_prepend_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_write_short_single_s, fss_extended_write_long_single_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_extended_write_short_trim_s, fss_extended_write_long_trim_s, 0, 0, f_console_type_normal), \ } - #define fss_extended_write_total_parameters 18 + #define fss_extended_write_total_parameters_d 18 #endif // _di_fss_extended_write_defines_ #ifndef _di_fss_extended_write_main_t_ typedef struct { - f_console_parameter_t parameters[fss_extended_write_total_parameters]; + f_console_parameter_t parameters[fss_extended_write_total_parameters_d]; f_array_lengths_t remaining; bool process_pipe; diff --git a/level_3/fss_extended_write/c/main.c b/level_3/fss_extended_write/c/main.c index 1756734..2ed3a78 100644 --- a/level_3/fss_extended_write/c/main.c +++ b/level_3/fss_extended_write/c/main.c @@ -12,13 +12,13 @@ int main(const int argc, const f_string_t *argv) { const f_status_t status = fss_extended_write_main(arguments, &data); // flush output pipes before closing. - fflush(f_type_output); - fflush(f_type_error); + fflush(F_type_output_d); + fflush(F_type_error_d); // close all open file descriptors. - close(f_type_descriptor_output); - close(f_type_descriptor_input); - close(f_type_descriptor_error); + close(F_type_descriptor_output_d); + close(F_type_descriptor_input_d); + close(F_type_descriptor_error_d); if (F_status_is_error(status)) { return 1; diff --git a/level_3/fss_extended_write/c/private-common.h b/level_3/fss_extended_write/c/private-common.h index a6d1889..9ee310b 100644 --- a/level_3/fss_extended_write/c/private-common.h +++ b/level_3/fss_extended_write/c/private-common.h @@ -20,8 +20,8 @@ extern "C" { * - small: An allocation step used for buffers that are anticipated to have small buffers. */ #ifndef _di_fss_extended_write_common_ - #define fss_extended_write_common_allocation_large 256 - #define fss_extended_write_common_allocation_small 16 + #define fss_extended_write_common_allocation_large_d 256 + #define fss_extended_write_common_allocation_small_d 16 #endif // _di_fss_extended_write_common_ #ifdef __cplusplus diff --git a/level_3/fss_extended_write/c/private-fss_extended_write.c b/level_3/fss_extended_write/c/private-fss_extended_write.c index 4b0227e..14319dc 100644 --- a/level_3/fss_extended_write/c/private-fss_extended_write.c +++ b/level_3/fss_extended_write/c/private-fss_extended_write.c @@ -16,11 +16,11 @@ extern "C" { flockfile(main.error.to.stream); fl_print_format("%c%[%sMust specify the '%]", main.error.to.stream, f_string_eol_s[0], main.error.context, main.error.prefix, main.error.context); - fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_object, main.error.notable); + fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_object_s, main.error.notable); fl_print_format("%[' parameter and the '%]", main.error.to.stream, main.error.context, main.error.prefix, main.error.context); - fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_content, main.error.notable); + fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_content_s, main.error.notable); fl_print_format("%[' parameter the same number of times when not specifying the '%]", main.error.to.stream, main.error.context, main.error.prefix, main.error.context); - fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_partial, main.error.notable); + fl_print_format("%[%s%s%]", main.error.to.stream, main.error.notable, f_console_symbol_long_enable_s, fss_extended_write_long_partial_s, main.error.notable); fl_print_format("%[' parameter.%]%c", main.error.to.stream, main.error.context, main.error.context, f_string_eol_s[0]); funlockfile(main.error.to.stream); @@ -65,7 +65,7 @@ extern "C" { f_status_t fss_extended_write_process(const fss_extended_write_main_t main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_statics_t *contents, f_string_dynamic_t *buffer) { f_status_t status = F_none; - f_state_t state = macro_f_state_t_initialize(fss_extended_write_common_allocation_large, fss_extended_write_common_allocation_small, 0, 0, 0, 0, 0); + f_state_t state = macro_f_state_t_initialize(fss_extended_write_common_allocation_large_d, fss_extended_write_common_allocation_small_d, 0, 0, 0, 0, 0); f_string_range_t range = f_string_range_t_initialize; if (object) { @@ -158,7 +158,7 @@ extern "C" { f_file_t input = f_file_t_initialize; - input.id = f_type_descriptor_input; + input.id = F_type_descriptor_input_d; input.size_read = 2048; f_array_length_t i = 0; @@ -221,19 +221,19 @@ extern "C" { for (; range.start <= range.stop; ++range.start) { - if (block.string[range.start] == fss_extended_write_pipe_content_start) { + if (block.string[range.start] == fss_extended_write_pipe_content_start_s) { state = 0x2; ++range.start; break; } - if (block.string[range.start] == fss_extended_write_pipe_content_end) { + if (block.string[range.start] == fss_extended_write_pipe_content_end_s) { state = 0x4; ++range.start; break; } - if (block.string[range.start] == fss_extended_write_pipe_content_ignore) { + if (block.string[range.start] == fss_extended_write_pipe_content_ignore_s) { // this is not used by objects. continue; } @@ -252,7 +252,7 @@ extern "C" { if (state == 0x2) { if (contents.used + 1 > contents.size) { - status = f_string_dynamics_increase_by(f_fss_default_allocation_step, &contents); + status = f_string_dynamics_increase_by(F_fss_default_allocation_step_d, &contents); if (F_status_is_error(status)) { fll_error_print(main.error, F_status_set_fine(status), "f_string_dynamics_increase_by", F_true); @@ -275,9 +275,9 @@ extern "C" { if (total) { for (; range.start <= range.stop; ++range.start) { - if (block.string[range.start] == fss_extended_write_pipe_content_start) { + if (block.string[range.start] == fss_extended_write_pipe_content_start_s) { if (contents.used + 1 > contents.size) { - status = f_string_dynamics_increase_by(f_fss_default_allocation_step, &contents); + status = f_string_dynamics_increase_by(F_fss_default_allocation_step_d, &contents); if (F_status_is_error(status)) { fll_error_print(main.error, F_status_set_fine(status), "f_string_dynamics_increase_by", F_true); @@ -289,13 +289,13 @@ extern "C" { continue; } - if (block.string[range.start] == fss_extended_write_pipe_content_end) { + if (block.string[range.start] == fss_extended_write_pipe_content_end_s) { state = 0x4; ++range.start; break; } - if (block.string[range.start] == fss_extended_write_pipe_content_ignore) { + if (block.string[range.start] == fss_extended_write_pipe_content_ignore_s) { // this is not used by this program. continue; @@ -309,7 +309,7 @@ extern "C" { } if (contents.array[contents.used - 1].used + 1 > contents.array[contents.used - 1].size) { - status = f_string_dynamic_increase_by(f_fss_default_allocation_step, &contents.array[contents.used - 1]); + status = f_string_dynamic_increase_by(F_fss_default_allocation_step_d, &contents.array[contents.used - 1]); if (F_status_is_error(status)) { fll_error_print(main.error, F_status_set_fine(status), "f_string_dynamic_increase_by", F_true); diff --git a/level_3/fss_extended_write/c/private-fss_extended_write.h b/level_3/fss_extended_write/c/private-fss_extended_write.h index 585f7d4..32a9477 100644 --- a/level_3/fss_extended_write/c/private-fss_extended_write.h +++ b/level_3/fss_extended_write/c/private-fss_extended_write.h @@ -23,7 +23,7 @@ extern "C" { * F_failure (with error bit) for any othe failure. */ #ifndef _di_fss_extended_write_error_parameter_at_least_once_print_ - void fss_extended_write_error_parameter_at_least_once(const fss_extended_write_main_t data) f_attribute_visibility_internal; + void fss_extended_write_error_parameter_at_least_once(const fss_extended_write_main_t data) F_attribute_visibility_internal_d; #endif // _di_fss_extended_write_error_parameter_at_least_once_print_ /** @@ -41,7 +41,7 @@ extern "C" { * F_failure (with error bit) for any othe failure. */ #ifndef _di_fss_extended_write_error_parameter_value_missing_print_ - void fss_extended_write_error_parameter_value_missing_print(const fss_extended_write_main_t data, const f_string_t symbol, const f_string_t parameter) f_attribute_visibility_internal; + void fss_extended_write_error_parameter_value_missing_print(const fss_extended_write_main_t data, const f_string_t symbol, const f_string_t parameter) F_attribute_visibility_internal_d; #endif // _di_fss_extended_write_error_parameter_value_missing_print_ /** @@ -55,7 +55,7 @@ extern "C" { * F_failure (with error bit) for any othe failure. */ #ifndef _di_fss_extended_write_error_parameter_unsupported_eol_print_ - void fss_extended_write_error_parameter_unsupported_eol_print(const fss_extended_write_main_t data) f_attribute_visibility_internal; + void fss_extended_write_error_parameter_unsupported_eol_print(const fss_extended_write_main_t data) F_attribute_visibility_internal_d; #endif // _di_fss_extended_write_error_parameter_unsupported_eol_print_ /** @@ -82,7 +82,7 @@ extern "C" { * F_failure (with error bit) for any othe failure. */ #ifndef _di_fss_extended_write_process_ - extern f_status_t fss_extended_write_process(const fss_extended_write_main_t data, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_statics_t *contents, f_string_dynamic_t *buffer) f_attribute_visibility_internal; + extern f_status_t fss_extended_write_process(const fss_extended_write_main_t data, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_statics_t *contents, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d; #endif // _di_fss_extended_write_process_ /** @@ -103,7 +103,7 @@ extern "C" { * F_failure (with error bit) for any othe failure. */ #ifndef _di_fss_extended_write_process_pipe_ - extern f_status_t fss_extended_write_process_pipe(const fss_extended_write_main_t data, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) f_attribute_visibility_internal; + extern f_status_t fss_extended_write_process_pipe(const fss_extended_write_main_t data, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d; #endif // _di_fss_extended_write_process_pipe_ #ifdef __cplusplus diff --git a/level_3/fss_identify/c/fss_identify.c b/level_3/fss_identify/c/fss_identify.c index dd4602b..b096fe8 100644 --- a/level_3/fss_identify/c/fss_identify.c +++ b/level_3/fss_identify/c/fss_identify.c @@ -11,7 +11,7 @@ extern "C" { flockfile(file.stream); - fll_program_print_help_header(file, context, fss_identify_name_long, fss_identify_version); + fll_program_print_help_header(file, context, fss_identify_program_name_long_s, fss_identify_program_version); fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); @@ -25,25 +25,25 @@ extern "C" { f_print_character(f_string_eol_s[0], file.stream); - fll_program_print_help_option(file, context, fss_identify_short_content, fss_identify_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print the Identifier content (the 4-digit hexidecimal type code)."); - fll_program_print_help_option(file, context, fss_identify_short_object, fss_identify_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Identifier object (the name)."); + fll_program_print_help_option(file, context, fss_identify_short_content_s, fss_identify_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print the Identifier content (the 4-digit hexidecimal type code)."); + fll_program_print_help_option(file, context, fss_identify_short_object_s, fss_identify_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Identifier object (the name)."); f_print_character(f_string_eol_s[0], file.stream); - fll_program_print_help_option(file, context, fss_identify_short_line, fss_identify_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Identifier at the given line."); - fll_program_print_help_option(file, context, fss_identify_short_name, fss_identify_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name."); - fll_program_print_help_option(file, context, fss_identify_short_total, fss_identify_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print the total Identifiers found."); + fll_program_print_help_option(file, context, fss_identify_short_line_s, fss_identify_long_line_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Identifier at the given line."); + fll_program_print_help_option(file, context, fss_identify_short_name_s, fss_identify_long_name_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name."); + fll_program_print_help_option(file, context, fss_identify_short_total_s, fss_identify_long_total_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print the total Identifiers found."); - fll_program_print_help_usage(file, context, fss_identify_name, "filename(s)"); + fll_program_print_help_usage(file, context, fss_identify_program_name_s, "filename(s)"); - fl_print_format(" The %[%s%s%] parameter refers to the file lines and not the lines in a given file.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_line, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" The %[%s%s%] parameter refers to the file lines and not the lines in a given file.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_line_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" If neither the %[%s%s%] nor", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_object, context.set.notable); - fl_print_format(" %[%s%s%] are specified, then the default behavior is to print both.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_content, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" If neither the %[%s%s%] nor", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_object_s, context.set.notable); + fl_print_format(" %[%s%s%] are specified, then the default behavior is to print both.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_content_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" When specifying the %[%s%s%] parameter, neither the", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_total, context.set.notable); - fl_print_format(" %[%s%s%] nor the", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_object, context.set.notable); - fl_print_format(" %[%s%s%] parameter may be specified.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_content, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" When specifying the %[%s%s%] parameter, neither the", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_total_s, context.set.notable); + fl_print_format(" %[%s%s%] nor the", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_object_s, context.set.notable); + fl_print_format(" %[%s%s%] parameter may be specified.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_content_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); fl_print_format(" An FSS file is identified by the following format: '%[# Object-Content%]'", file.stream, context.set.notable, context.set.notable); fl_print_format(" where the Object, is a machine-name representing the name and may only consist of \"word\" characters and the Content is a 4-digit hexidecimal number representing a particular variant of the Object.%c", file.stream, f_string_eol_s[0]); @@ -62,7 +62,7 @@ extern "C" { f_status_t status = F_none; { - const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_identify_total_parameters); + const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_identify_total_parameters_d); { f_console_parameter_id_t ids[3] = { fss_identify_parameter_no_color, fss_identify_parameter_light, fss_identify_parameter_dark }; @@ -143,7 +143,7 @@ extern "C" { } if (main->parameters[fss_identify_parameter_version].result == f_console_result_found) { - fll_program_print_version(main->output.to, fss_identify_version); + fll_program_print_version(main->output.to, fss_identify_program_version); fss_identify_main_delete(main); @@ -157,7 +157,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_line, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_line_s, main->error.notable); fl_print_format("%[' requires a positive number.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -171,7 +171,7 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &data.line); if (F_status_is_error(status)) { - fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_identify_long_line, arguments.argv[index]); + fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_identify_long_line_s, arguments.argv[index]); } } } @@ -181,9 +181,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_object, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_object_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_total, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_total_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -194,9 +194,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_content, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_content_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_total, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_total_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -210,7 +210,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_name, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_name_s, main->error.notable); fl_print_format("%[' requires a string.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -226,7 +226,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_name, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_name_s, main->error.notable); fl_print_format("%[' does not allow zero length strings.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -258,7 +258,7 @@ extern "C" { fl_print_format("%c%[%sThe value '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, arguments.argv[index], main->error.notable); fl_print_format("%[' for the parameter '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_name, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_name_s, main->error.notable); fl_print_format("%[' may only contain word characters.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -279,8 +279,8 @@ extern "C" { f_file_t file = f_file_t_initialize; if (F_status_is_error_not(status) && main->process_pipe) { - file.id = f_type_descriptor_input; - file.stream = f_type_input; + file.id = F_type_descriptor_input_d; + file.stream = F_type_input_d; file.size_read = 512; status = fss_identify_load_line(*main, file, "-", &buffer, &range); @@ -346,7 +346,7 @@ extern "C" { #ifndef _di_fss_identify_main_delete_ f_status_t fss_identify_main_delete(fss_identify_main_t *main) { - for (f_array_length_t i = 0; i < fss_identify_total_parameters; ++i) { + for (f_array_length_t i = 0; i < fss_identify_total_parameters_d; ++i) { macro_f_array_lengths_t_delete_simple(main->parameters[i].locations); macro_f_array_lengths_t_delete_simple(main->parameters[i].locations_sub); diff --git a/level_3/fss_identify/c/fss_identify.h b/level_3/fss_identify/c/fss_identify.h index a2ebd67..511cec2 100644 --- a/level_3/fss_identify/c/fss_identify.h +++ b/level_3/fss_identify/c/fss_identify.h @@ -48,39 +48,39 @@ extern "C" { #endif -#ifndef _di_fss_identify_version_ - #define fss_identify_major_version f_string_ascii_0 - #define fss_identify_minor_version f_string_ascii_5 - #define fss_identify_micro_version f_string_ascii_6 +#ifndef _di_fss_identify_program_version_ + #define fss_identify_program_version_major_s F_string_ascii_0_s + #define fss_identify_program_version_minor_s F_string_ascii_5_s + #define fss_identify_program_version_micro_s F_string_ascii_6_s - #ifndef fss_identify_nano_version_prefix - #define fss_identify_nano_version_prefix + #ifndef fss_identify_program_version_nano_prefix_s + #define fss_identify_program_version_nano_prefix_s #endif - #ifndef fss_identify_nano_version - #define fss_identify_nano_version + #ifndef fss_identify_program_version_nano_s + #define fss_identify_program_version_nano_s #endif - #define fss_identify_version fss_identify_major_version f_string_ascii_period fss_identify_minor_version f_string_ascii_period fss_identify_micro_version fss_identify_nano_version_prefix fss_identify_nano_version -#endif // _di_fss_identify_version_ + #define fss_identify_program_version fss_identify_program_version_major_s F_string_ascii_period_s fss_identify_program_version_minor_s F_string_ascii_period_s fss_identify_program_version_micro_s fss_identify_program_version_nano_prefix_s fss_identify_program_version_nano_s +#endif // _di_fss_identify_program_version_ -#ifndef _di_fss_identify_name_ - #define fss_identify_name "fss_identify" - #define fss_identify_name_long "FSS Identify" -#endif // _di_fss_identify_name_ +#ifndef _di_fss_identify_program_name_ + #define fss_identify_program_name_s "fss_identify" + #define fss_identify_program_name_long_s "FSS Identify" +#endif // _di_fss_identify_program_name_ #ifndef _di_fss_identify_defines_ - #define fss_identify_short_content "c" - #define fss_identify_short_line "l" - #define fss_identify_short_name "n" - #define fss_identify_short_object "o" - #define fss_identify_short_total "t" - - #define fss_identify_long_content "content" - #define fss_identify_long_line "line" - #define fss_identify_long_name "name" - #define fss_identify_long_object "object" - #define fss_identify_long_total "total" + #define fss_identify_short_content_s "c" + #define fss_identify_short_line_s "l" + #define fss_identify_short_name_s "n" + #define fss_identify_short_object_s "o" + #define fss_identify_short_total_s "t" + + #define fss_identify_long_content_s "content" + #define fss_identify_long_line_s "line" + #define fss_identify_long_name_s "name" + #define fss_identify_long_object_s "object" + #define fss_identify_long_total_s "total" enum { fss_identify_parameter_help, @@ -111,19 +111,19 @@ extern "C" { f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(fss_identify_short_content, fss_identify_long_content, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_identify_short_line, fss_identify_long_line, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_identify_short_name, fss_identify_long_name, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_identify_short_object, fss_identify_long_object, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_identify_short_total, fss_identify_long_total, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_identify_short_content_s, fss_identify_long_content_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_identify_short_line_s, fss_identify_long_line_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_identify_short_name_s, fss_identify_long_name_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_identify_short_object_s, fss_identify_long_object_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_identify_short_total_s, fss_identify_long_total_s, 0, 0, f_console_type_normal), \ } - #define fss_identify_total_parameters 14 + #define fss_identify_total_parameters_d 14 #endif // _di_fss_identify_defines_ #ifndef _di_fss_identify_data_t_ typedef struct { - f_console_parameter_t parameters[fss_identify_total_parameters]; + f_console_parameter_t parameters[fss_identify_total_parameters_d]; f_array_lengths_t remaining; bool process_pipe; diff --git a/level_3/fss_identify/c/main.c b/level_3/fss_identify/c/main.c index 066a04e..b7a473b 100644 --- a/level_3/fss_identify/c/main.c +++ b/level_3/fss_identify/c/main.c @@ -12,13 +12,13 @@ int main(const int argc, const f_string_t *argv) { const f_status_t status = fss_identify_main(arguments, &data); // flush output pipes before closing. - fflush(f_type_output); - fflush(f_type_error); + fflush(F_type_output_d); + fflush(F_type_error_d); // close all open file descriptors. - close(f_type_descriptor_output); - close(f_type_descriptor_input); - close(f_type_descriptor_error); + close(F_type_descriptor_output_d); + close(F_type_descriptor_input_d); + close(F_type_descriptor_error_d); if (F_status_is_error(status)) { return 1; diff --git a/level_3/fss_identify/c/private-common.h b/level_3/fss_identify/c/private-common.h index 97f07ac..66ee609 100644 --- a/level_3/fss_identify/c/private-common.h +++ b/level_3/fss_identify/c/private-common.h @@ -45,7 +45,7 @@ extern "C" { * The data to deallocate. */ #ifndef _di_fss_identify_data_delete_ - extern void fss_identify_data_delete(fss_identify_data_t *data) f_attribute_visibility_internal; + extern void fss_identify_data_delete(fss_identify_data_t *data) F_attribute_visibility_internal_d; #endif // _di_fss_identify_data_delete_ #ifdef __cplusplus diff --git a/level_3/fss_identify/c/private-fss_identify.c b/level_3/fss_identify/c/private-fss_identify.c index 8214dd0..6510389 100644 --- a/level_3/fss_identify/c/private-fss_identify.c +++ b/level_3/fss_identify/c/private-fss_identify.c @@ -61,7 +61,7 @@ extern "C" { f_print(id.name, id.used, main.output.to.stream); if (main.parameters[fss_identify_parameter_object].result != f_console_result_found || main.parameters[fss_identify_parameter_content].result == f_console_result_found) { - f_print_character(f_fss_type_header_part5, main.output.to.stream); + f_print_terminated(f_fss_type_header_part5_s, main.output.to.stream); } } diff --git a/level_3/fss_identify/c/private-fss_identify.h b/level_3/fss_identify/c/private-fss_identify.h index 0f1c54e..ba58149 100644 --- a/level_3/fss_identify/c/private-fss_identify.h +++ b/level_3/fss_identify/c/private-fss_identify.h @@ -37,7 +37,7 @@ extern "C" { * @see f_string_dynamic_resize() */ #ifndef _di_fss_identify_load_line_ - extern f_status_t fss_identify_load_line(const fss_identify_main_t main, const f_file_t file, const f_string_t name, f_string_static_t *buffer, f_string_range_t *range) f_attribute_visibility_internal; + extern f_status_t fss_identify_load_line(const fss_identify_main_t main, const f_file_t file, const f_string_t name, f_string_static_t *buffer, f_string_range_t *range) F_attribute_visibility_internal_d; #endif // _di_fss_identify_load_line_ /** @@ -49,7 +49,7 @@ extern "C" { * The Identifier to print. */ #ifndef _di_fss_identify_print_ - extern void fss_identify_print(const fss_identify_main_t main, f_fll_id_t id) f_attribute_visibility_internal; + extern void fss_identify_print(const fss_identify_main_t main, f_fll_id_t id) F_attribute_visibility_internal_d; #endif // _di_fss_identify_print_ /** @@ -75,7 +75,7 @@ extern "C" { * @see fll_fss_identify() */ #ifndef _di_fss_identify_process_ - extern f_status_t fss_identify_process(const fss_identify_main_t main, const f_string_t name, const f_string_static_t buffer, f_string_range_t *range, fss_identify_data_t *data) f_attribute_visibility_internal; + extern f_status_t fss_identify_process(const fss_identify_main_t main, const f_string_t name, const f_string_static_t buffer, f_string_range_t *range, fss_identify_data_t *data) F_attribute_visibility_internal_d; #endif // _di_fss_identify_process_ #ifdef __cplusplus diff --git a/level_3/fss_status_code/c/fss_status_code.c b/level_3/fss_status_code/c/fss_status_code.c index c6df46a..b7704e9 100644 --- a/level_3/fss_status_code/c/fss_status_code.c +++ b/level_3/fss_status_code/c/fss_status_code.c @@ -11,7 +11,7 @@ extern "C" { flockfile(file.stream); - fll_program_print_help_header(file, context, fss_status_code_name_long, fss_status_code_version); + fll_program_print_help_header(file, context, fss_status_code_program_name_long_s, fss_status_code_program_version_s); fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); @@ -25,12 +25,12 @@ extern "C" { f_print_character(f_string_eol_s[0], file.stream); - fll_program_print_help_option(file, context, fss_status_code_short_is_fine, fss_status_code_long_is_fine, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true if the error code is not an error, F_false otherwise."); - fll_program_print_help_option(file, context, fss_status_code_short_is_warning, fss_status_code_long_is_warning, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print F_true if the error code is a warning, F_false otherwise."); - fll_program_print_help_option(file, context, fss_status_code_short_is_error, fss_status_code_long_is_error, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true if the error code is an error, F_false otherwise."); - fll_program_print_help_option(file, context, fss_status_code_short_number, fss_status_code_long_number, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Convert status code name to number."); + fll_program_print_help_option(file, context, fss_status_code_short_is_fine_s, fss_status_code_long_is_fine_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true if the error code is not an error, F_false otherwise."); + fll_program_print_help_option(file, context, fss_status_code_short_is_warning_s, fss_status_code_long_is_warning_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print F_true if the error code is a warning, F_false otherwise."); + fll_program_print_help_option(file, context, fss_status_code_short_is_error_s, fss_status_code_long_is_error_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true if the error code is an error, F_false otherwise."); + fll_program_print_help_option(file, context, fss_status_code_short_number_s, fss_status_code_long_number_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Convert status code name to number."); - fll_program_print_help_usage(file, context, fss_status_code_name, "status code(s)"); + fll_program_print_help_usage(file, context, fss_status_code_program_name_s, "status code(s)"); funlockfile(file.stream); @@ -43,7 +43,7 @@ extern "C" { f_status_t status = F_none; { - const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_status_code_total_parameters); + const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_status_code_total_parameters_d); { f_console_parameter_id_t ids[3] = { fss_status_code_parameter_no_color, fss_status_code_parameter_light, fss_status_code_parameter_dark }; @@ -116,7 +116,7 @@ extern "C" { } if (main->parameters[fss_status_code_parameter_version].result == f_console_result_found) { - fll_program_print_version(main->output.to, fss_status_code_version); + fll_program_print_version(main->output.to, fss_status_code_program_version_s); fss_status_code_main_delete(main); return F_none; @@ -127,9 +127,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_status_code_long_is_error, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_status_code_long_is_error_s, main->error.notable); fl_print_format("%[' cannot be used with the parameter '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_status_code_long_is_warning, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_status_code_long_is_warning_s, main->error.notable); fl_print_format("%['.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -141,9 +141,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_status_code_long_is_error, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_status_code_long_is_error_s, main->error.notable); fl_print_format("%[' cannot be used with the parameter '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_status_code_long_is_fine, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_status_code_long_is_fine_s, main->error.notable); fl_print_format("%['.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -156,9 +156,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_status_code_long_is_warning, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_status_code_long_is_warning_s, main->error.notable); fl_print_format("%[' cannot be used with the parameter '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_status_code_long_is_fine, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_status_code_long_is_fine_s, main->error.notable); fl_print_format("%['.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -244,7 +244,7 @@ extern "C" { #ifndef _di_fss_status_code_main_delete_ f_status_t fss_status_code_main_delete(fss_status_code_main_t *main) { - for (f_array_length_t i = 0; i < fss_status_code_total_parameters; ++i) { + for (f_array_length_t i = 0; i < fss_status_code_total_parameters_d; ++i) { macro_f_array_lengths_t_delete_simple(main->parameters[i].locations); macro_f_array_lengths_t_delete_simple(main->parameters[i].locations_sub); macro_f_array_lengths_t_delete_simple(main->parameters[i].values); diff --git a/level_3/fss_status_code/c/fss_status_code.h b/level_3/fss_status_code/c/fss_status_code.h index fba93ca..39ec253 100644 --- a/level_3/fss_status_code/c/fss_status_code.h +++ b/level_3/fss_status_code/c/fss_status_code.h @@ -45,37 +45,37 @@ extern "C" { #endif -#ifndef _di_fss_status_code_version_ - #define fss_status_code_major_version f_string_ascii_0 - #define fss_status_code_minor_version f_string_ascii_5 - #define fss_status_code_micro_version f_string_ascii_6 +#ifndef _di_fss_status_code_program_version_ + #define fss_status_code_program_version_major_s F_string_ascii_0_s + #define fss_status_code_program_version_minor_s F_string_ascii_5_s + #define fss_status_code_program_version_micro_s F_string_ascii_6_s - #ifndef fss_status_code_nano_version_prefix - #define fss_status_code_nano_version_prefix + #ifndef fss_status_code_program_version_nano_prefix_s + #define fss_status_code_program_version_nano_prefix_s #endif - #ifndef fss_status_code_nano_version - #define fss_status_code_nano_version + #ifndef fss_status_code_program_version_nano_s + #define fss_status_code_program_version_nano_s #endif - #define fss_status_code_version fss_status_code_major_version f_string_ascii_period fss_status_code_minor_version f_string_ascii_period fss_status_code_micro_version fss_status_code_nano_version_prefix fss_status_code_nano_version -#endif // _di_fss_status_code_version_ + #define fss_status_code_program_version_s fss_status_code_program_version_major_s F_string_ascii_period_s fss_status_code_program_version_minor_s F_string_ascii_period_s fss_status_code_program_version_micro_s fss_status_code_program_version_nano_prefix_s fss_status_code_program_version_nano_s +#endif // _di_fss_status_code_program_version_ -#ifndef _di_fss_status_code_name_ - #define fss_status_code_name "fss_status_code" - #define fss_status_code_name_long "FSS Status Code" -#endif // _di_fss_status_code_name_ +#ifndef _di_fss_status_code_program_name_ + #define fss_status_code_program_name_s "fss_status_code" + #define fss_status_code_program_name_long_s "FSS Status Code" +#endif // _di_fss_status_code_program_name_ #ifndef _di_fss_status_code_defines_ - #define fss_status_code_short_is_fine "f" - #define fss_status_code_short_is_warning "w" - #define fss_status_code_short_is_error "e" - #define fss_status_code_short_number "n" + #define fss_status_code_short_is_fine_s "f" + #define fss_status_code_short_is_warning_s "w" + #define fss_status_code_short_is_error_s "e" + #define fss_status_code_short_number_s "n" - #define fss_status_code_long_is_fine "is_fine" - #define fss_status_code_long_is_warning "is_warning" - #define fss_status_code_long_is_error "is_error" - #define fss_status_code_long_number "number" + #define fss_status_code_long_is_fine_s "is_fine" + #define fss_status_code_long_is_warning_s "is_warning" + #define fss_status_code_long_is_error_s "is_error" + #define fss_status_code_long_number_s "number" enum { fss_status_code_parameter_help, @@ -105,18 +105,18 @@ extern "C" { f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(fss_status_code_short_is_fine, fss_status_code_long_is_fine, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_status_code_short_is_warning, fss_status_code_long_is_warning, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_status_code_short_is_error, fss_status_code_long_is_error, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(fss_status_code_short_number, fss_status_code_long_number, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_status_code_short_is_fine_s, fss_status_code_long_is_fine_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_status_code_short_is_warning_s, fss_status_code_long_is_warning_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_status_code_short_is_error_s, fss_status_code_long_is_error_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(fss_status_code_short_number_s, fss_status_code_long_number_s, 0, 0, f_console_type_normal), \ } - #define fss_status_code_total_parameters 13 + #define fss_status_code_total_parameters_d 13 #endif // _di_fss_status_code_defines_ #ifndef _di_fss_status_code_main_t_ typedef struct { - f_console_parameter_t parameters[fss_status_code_total_parameters]; + f_console_parameter_t parameters[fss_status_code_total_parameters_d]; f_array_lengths_t remaining; bool process_pipe; diff --git a/level_3/fss_status_code/c/main.c b/level_3/fss_status_code/c/main.c index 5dfa153..71652b8 100644 --- a/level_3/fss_status_code/c/main.c +++ b/level_3/fss_status_code/c/main.c @@ -12,13 +12,13 @@ int main(const int argc, const f_string_t *argv) { const f_status_t status = fss_status_code_main(arguments, &data); // flush output pipes before closing. - fflush(f_type_output); - fflush(f_type_error); + fflush(F_type_output_d); + fflush(F_type_error_d); // close all open file descriptors. - close(f_type_descriptor_output); - close(f_type_descriptor_input); - close(f_type_descriptor_error); + close(F_type_descriptor_output_d); + close(F_type_descriptor_input_d); + close(F_type_descriptor_error_d); if (F_status_is_error(status) || status == F_false) { return 1; diff --git a/level_3/fss_status_code/c/private-fss_status_code.h b/level_3/fss_status_code/c/private-fss_status_code.h index 59f550d..015cbe2 100644 --- a/level_3/fss_status_code/c/private-fss_status_code.h +++ b/level_3/fss_status_code/c/private-fss_status_code.h @@ -34,7 +34,7 @@ extern "C" { * @see fss_status_code_convert_number() */ #ifndef _di_fss_status_code_process_check_ - extern f_status_t fss_status_code_process_check(const fss_status_code_main_t main, const f_string_t value) f_attribute_visibility_internal; + extern f_status_t fss_status_code_process_check(const fss_status_code_main_t main, const f_string_t value) F_attribute_visibility_internal_d; #endif // _di_fss_status_code_process_check_ /** @@ -56,7 +56,7 @@ extern "C" { * @see fll_fss_status_from_string() */ #ifndef _di_fss_status_code_process_number_ - extern f_status_t fss_status_code_process_number(const fss_status_code_main_t main, const f_string_t value) f_attribute_visibility_internal; + extern f_status_t fss_status_code_process_number(const fss_status_code_main_t main, const f_string_t value) F_attribute_visibility_internal_d; #endif // _di_fss_status_code_process_number_ /** @@ -83,7 +83,7 @@ extern "C" { * @see fss_status_code_convert_number() */ #ifndef _di_fss_status_code_process_normal_ - extern f_status_t fss_status_code_process_normal(const fss_status_code_main_t main, const f_string_t value) f_attribute_visibility_internal; + extern f_status_t fss_status_code_process_normal(const fss_status_code_main_t main, const f_string_t value) F_attribute_visibility_internal_d; #endif // _di_fss_status_code_process_normal_ /** @@ -111,7 +111,7 @@ extern "C" { * @see fl_console_parameter_to_number_unsigned() */ #ifndef _di_fss_status_code_convert_number_ - extern f_status_t fss_status_code_convert_number(const fss_status_code_main_t main, const f_string_t value, f_number_unsigned_t *number) f_attribute_visibility_internal; + extern f_status_t fss_status_code_convert_number(const fss_status_code_main_t main, const f_string_t value, f_number_unsigned_t *number) F_attribute_visibility_internal_d; #endif // _di_fss_status_code_convert_number_ #ifdef __cplusplus diff --git a/level_3/iki_read/c/iki_read.c b/level_3/iki_read/c/iki_read.c index 92ac33a..1027962 100644 --- a/level_3/iki_read/c/iki_read.c +++ b/level_3/iki_read/c/iki_read.c @@ -11,7 +11,7 @@ extern "C" { flockfile(file.stream); - fll_program_print_help_header(file, context, iki_read_name_long, iki_read_version); + fll_program_print_help_header(file, context, iki_read_program_name_long_s, iki_read_program_version_s); fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); @@ -25,35 +25,35 @@ extern "C" { f_print_character(f_string_eol_s[0], file.stream); - fll_program_print_help_option(file, context, iki_read_short_at, iki_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select variable at this numeric index."); - fll_program_print_help_option(file, context, iki_read_short_line, iki_read_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the variables at the given line within the file."); - fll_program_print_help_option(file, context, iki_read_short_name, iki_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select variables with this name."); - fll_program_print_help_option(file, context, iki_read_short_whole, iki_read_long_whole, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print all of the data instead of just the IKI variable data."); + fll_program_print_help_option(file, context, iki_read_short_at_s, iki_read_long_at_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select variable at this numeric index."); + fll_program_print_help_option(file, context, iki_read_short_line_s, iki_read_long_line_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the variables at the given line within the file."); + fll_program_print_help_option(file, context, iki_read_short_name_s, iki_read_long_name_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select variables with this name."); + fll_program_print_help_option(file, context, iki_read_short_whole_s, iki_read_long_whole_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print all of the data instead of just the IKI variable data."); f_print_character(f_string_eol_s[0], file.stream); - fll_program_print_help_option(file, context, iki_read_short_content, iki_read_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print the variable content (default)."); - fll_program_print_help_option(file, context, iki_read_short_literal, iki_read_long_literal, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print the entire variable (aka: object, content, and syntax)."); - fll_program_print_help_option(file, context, iki_read_short_object, iki_read_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the variable name (aka: object)."); - fll_program_print_help_option(file, context, iki_read_short_total, iki_read_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of variables."); + fll_program_print_help_option(file, context, iki_read_short_content_s, iki_read_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print the variable content (default)."); + fll_program_print_help_option(file, context, iki_read_short_literal_s, iki_read_long_literal_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print the entire variable (aka: object, content, and syntax)."); + fll_program_print_help_option(file, context, iki_read_short_object_s, iki_read_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the variable name (aka: object)."); + fll_program_print_help_option(file, context, iki_read_short_total_s, iki_read_long_total_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of variables."); f_print_character(f_string_eol_s[0], file.stream); - fll_program_print_help_option(file, context, iki_read_short_substitute, iki_read_long_substitute, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Substitute the entire variable for the given name and content value with the given string."); + fll_program_print_help_option(file, context, iki_read_short_substitute_s, iki_read_long_substitute_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Substitute the entire variable for the given name and content value with the given string."); - fll_program_print_help_usage(file, context, iki_read_name, "filename(s)"); + fll_program_print_help_usage(file, context, iki_read_program_name_s, "filename(s)"); fl_print_format(" %[Notes:%]%c", file.stream, context.set.important, context.set.important, f_string_eol_s[0]); fl_print_format(" This program will find and print variables, vocabularies, or content following the IKI standard, without focusing on any particular vocabulary specification.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); - fl_print_format(" This %[%s%s%] option, requires 3 additional parameters:", file.stream, context.set.notable, f_console_symbol_long_enable_s, iki_read_long_substitute, context.set.notable); - fl_print_format(" %[<%]%s%[>%]", file.stream, context.set.notable, context.set.notable, iki_read_substitution_vocabulary, context.set.notable, context.set.notable); - fl_print_format(" %[<%]%s%[>%]", file.stream, context.set.notable, context.set.notable, iki_read_substitution_replace, context.set.notable, context.set.notable); - fl_print_format(" %[<%]%s%[>%].%c", file.stream, context.set.notable, context.set.notable, iki_read_substitution_with, context.set.notable, context.set.notable, f_string_eol_s[0]); + fl_print_format(" This %[%s%s%] option, requires 3 additional parameters:", file.stream, context.set.notable, f_console_symbol_long_enable_s, iki_read_long_substitute_s, context.set.notable); + fl_print_format(" %[<%]%s%[>%]", file.stream, context.set.notable, context.set.notable, iki_read_substitution_vocabulary_s, context.set.notable, context.set.notable); + fl_print_format(" %[<%]%s%[>%]", file.stream, context.set.notable, context.set.notable, iki_read_substitution_replace_s, context.set.notable, context.set.notable); + fl_print_format(" %[<%]%s%[>%].%c", file.stream, context.set.notable, context.set.notable, iki_read_substitution_with_s, context.set.notable, context.set.notable, f_string_eol_s[0]); - fl_print_format(" %[%s%]: The name of the vocabulary whose content is to be substituted.%c", file.stream, context.set.notable, iki_read_substitution_vocabulary, context.set.notable, f_string_eol_s[0]); - fl_print_format(" %[%s%]: The content matching this exact string will be substituted.%c", file.stream, context.set.notable, iki_read_substitution_replace, context.set.notable, f_string_eol_s[0]); - fl_print_format(" %[%s%]: The new string to use as the substitute.%c%c", file.stream, context.set.notable, iki_read_substitution_with, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); + fl_print_format(" %[%s%]: The name of the vocabulary whose content is to be substituted.%c", file.stream, context.set.notable, iki_read_substitution_vocabulary_s, context.set.notable, f_string_eol_s[0]); + fl_print_format(" %[%s%]: The content matching this exact string will be substituted.%c", file.stream, context.set.notable, iki_read_substitution_replace_s, context.set.notable, f_string_eol_s[0]); + fl_print_format(" %[%s%]: The new string to use as the substitute.%c%c", file.stream, context.set.notable, iki_read_substitution_with_s, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]); fl_print_format(" The vocabulary and replacement are case-sensitive and must exactly match.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]); @@ -70,7 +70,7 @@ extern "C" { f_status_t status = F_none; { - const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, iki_read_total_parameters); + const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, iki_read_total_parameters_d); { f_console_parameter_id_t ids[3] = { iki_read_parameter_no_color, iki_read_parameter_light, iki_read_parameter_dark }; @@ -151,7 +151,7 @@ extern "C" { } if (main->parameters[iki_read_parameter_version].result == f_console_result_found) { - fll_program_print_version(main->output.to, iki_read_version); + fll_program_print_version(main->output.to, iki_read_program_version_s); iki_read_main_delete(main); return F_none; @@ -163,7 +163,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_at, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_at_s, main->error.notable); fl_print_format("%[' requires a positive number.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -180,7 +180,7 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number); if (F_status_is_error(status)) { - fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, f_console_symbol_long_enable iki_read_long_at, arguments.argv[index]); + fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, F_console_symbol_long_s_enable iki_read_long_at_s, arguments.argv[index]); status = F_status_set_error(F_parameter); } @@ -192,9 +192,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_at, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_at_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_whole, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_whole_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -209,7 +209,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_line, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_line_s, main->error.notable); fl_print_format("%[' requires a positive number.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -226,7 +226,7 @@ extern "C" { status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number); if (F_status_is_error(status)) { - fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, f_console_symbol_long_enable iki_read_long_line, arguments.argv[index]); + fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, F_console_symbol_long_s_enable iki_read_long_line_s, arguments.argv[index]); status = F_status_set_error(F_parameter); } @@ -239,7 +239,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_name, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_name_s, main->error.notable); fl_print_format("%[' requires a string.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -254,7 +254,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_substitute, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_substitute_s, main->error.notable); fl_print_format("%[' requires 3 strings.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -268,9 +268,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_substitute, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_substitute_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_total, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_total_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -286,9 +286,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_literal, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_literal_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_object, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_object_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -302,9 +302,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_literal, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_literal_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_content, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -318,9 +318,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_literal, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_literal_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_total, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_total_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -337,9 +337,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_object, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_object_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_content, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_content_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -353,9 +353,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_object, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_object_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_total, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_total_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -380,9 +380,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sCannot specify the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_whole, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_whole_s, main->error.notable); fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_total, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_total_s, main->error.notable); fl_print_format("%[' parameter.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -404,7 +404,7 @@ extern "C" { if (main->process_pipe) { f_file_t file = f_file_t_initialize; - file.id = f_type_descriptor_input; + file.id = F_type_descriptor_input_d; status = f_file_read(file, &main->buffer); @@ -490,7 +490,7 @@ extern "C" { #ifndef _di_iki_read_main_delete_ f_status_t iki_read_main_delete(iki_read_main_t *main) { - for (f_array_length_t i = 0; i < iki_read_total_parameters; ++i) { + for (f_array_length_t i = 0; i < iki_read_total_parameters_d; ++i) { macro_f_array_lengths_t_delete_simple(main->parameters[i].locations); macro_f_array_lengths_t_delete_simple(main->parameters[i].locations_sub); macro_f_array_lengths_t_delete_simple(main->parameters[i].values); diff --git a/level_3/iki_read/c/iki_read.h b/level_3/iki_read/c/iki_read.h index 073bc8c..7f64fa4 100644 --- a/level_3/iki_read/c/iki_read.h +++ b/level_3/iki_read/c/iki_read.h @@ -53,26 +53,26 @@ extern "C" { #endif -#ifndef _di_iki_read_version_ - #define iki_read_major_version f_string_ascii_0 - #define iki_read_minor_version f_string_ascii_5 - #define iki_read_micro_version f_string_ascii_6 +#ifndef _di_iki_read_program_version_ + #define iki_read_program_version_major_s F_string_ascii_0_s + #define iki_read_program_version_minor_s F_string_ascii_5_s + #define iki_read_program_version_micro_s F_string_ascii_6_s - #ifndef iki_read_nano_version_prefix - #define iki_read_nano_version_prefix + #ifndef iki_read_program_version_nano_prefix_s + #define iki_read_program_version_nano_prefix_s #endif - #ifndef iki_read_nano_version - #define iki_read_nano_version + #ifndef iki_read_program_version_nano_s + #define iki_read_program_version_nano_s #endif - #define iki_read_version iki_read_major_version f_string_ascii_period iki_read_minor_version f_string_ascii_period iki_read_micro_version iki_read_nano_version_prefix iki_read_nano_version -#endif // _di_iki_read_version_ + #define iki_read_program_version_s iki_read_program_version_major_s F_string_ascii_period_s iki_read_program_version_minor_s F_string_ascii_period_s iki_read_program_version_micro_s iki_read_program_version_nano_prefix_s iki_read_program_version_nano_s +#endif // _di_iki_read_program_version_ -#ifndef _di_iki_read_name_ - #define iki_read_name "iki_read" - #define iki_read_name_long "IKI Read" -#endif // _di_iki_read_name_ +#ifndef _di_iki_read_program_name_ + #define iki_read_program_name_s "iki_read" + #define iki_read_program_name_long_s "IKI Read" +#endif // _di_iki_read_program_name_ #ifndef _di_iki_read_defines_ enum { @@ -82,25 +82,25 @@ extern "C" { iki_read_mode_total, }; - #define iki_read_short_at "a" - #define iki_read_short_content "c" - #define iki_read_short_line "l" - #define iki_read_short_literal "L" - #define iki_read_short_name "n" - #define iki_read_short_object "o" - #define iki_read_short_substitute "s" - #define iki_read_short_total "t" - #define iki_read_short_whole "w" - - #define iki_read_long_at "at" - #define iki_read_long_content "content" - #define iki_read_long_line "line" - #define iki_read_long_literal "literal" - #define iki_read_long_name "name" - #define iki_read_long_object "object" - #define iki_read_long_substitute "substitute" - #define iki_read_long_total "total" - #define iki_read_long_whole "whole" + #define iki_read_short_at_s "a" + #define iki_read_short_content_s "c" + #define iki_read_short_line_s "l" + #define iki_read_short_literal_s "L" + #define iki_read_short_name_s "n" + #define iki_read_short_object_s "o" + #define iki_read_short_substitute_s "s" + #define iki_read_short_total_s "t" + #define iki_read_short_whole_s "w" + + #define iki_read_long_at_s "at" + #define iki_read_long_content_s "content" + #define iki_read_long_line_s "line" + #define iki_read_long_literal_s "literal" + #define iki_read_long_name_s "name" + #define iki_read_long_object_s "object" + #define iki_read_long_substitute_s "substitute" + #define iki_read_long_total_s "total" + #define iki_read_long_whole_s "whole" enum { iki_read_parameter_help, @@ -135,24 +135,24 @@ extern "C" { f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(iki_read_short_at, iki_read_long_at, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_read_short_content, iki_read_long_content, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_read_short_line, iki_read_long_line, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_read_short_literal, iki_read_long_literal, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_read_short_name, iki_read_long_name, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_read_short_object, iki_read_long_object, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_read_short_whole, iki_read_long_whole, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_read_short_substitute, iki_read_long_substitute, 0, 3, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_read_short_total, iki_read_long_total, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(iki_read_short_at_s, iki_read_long_at_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(iki_read_short_content_s, iki_read_long_content_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(iki_read_short_line_s, iki_read_long_line_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(iki_read_short_literal_s, iki_read_long_literal_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(iki_read_short_name_s, iki_read_long_name_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(iki_read_short_object_s, iki_read_long_object_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(iki_read_short_whole_s, iki_read_long_whole_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(iki_read_short_substitute_s, iki_read_long_substitute_s, 0, 3, f_console_type_normal), \ + f_console_parameter_t_initialize(iki_read_short_total_s, iki_read_long_total_s, 0, 0, f_console_type_normal), \ } - #define iki_read_total_parameters 18 + #define iki_read_total_parameters_d 18 #endif // _di_iki_read_defines_ #ifndef _di_iki_read_substitution_t_ - #define iki_read_substitution_vocabulary "vocabulary" - #define iki_read_substitution_replace "replace" - #define iki_read_substitution_with "with" + #define iki_read_substitution_vocabulary_s "vocabulary" + #define iki_read_substitution_replace_s "replace" + #define iki_read_substitution_with_s "with" typedef struct { f_string_static_t replace; @@ -193,7 +193,7 @@ extern "C" { #ifndef _di_iki_read_main_t_ typedef struct { - f_console_parameter_t parameters[iki_read_total_parameters]; + f_console_parameter_t parameters[iki_read_total_parameters_d]; f_array_lengths_t remaining; bool process_pipe; diff --git a/level_3/iki_read/c/main.c b/level_3/iki_read/c/main.c index 72105f4..d2fb983 100644 --- a/level_3/iki_read/c/main.c +++ b/level_3/iki_read/c/main.c @@ -12,13 +12,13 @@ int main(const int argc, const f_string_t *argv) { const f_status_t status = iki_read_main(arguments, &data); // flush output pipes before closing. - fflush(f_type_output); - fflush(f_type_error); + fflush(F_type_output_d); + fflush(F_type_error_d); // close all open file descriptors. - close(f_type_descriptor_output); - close(f_type_descriptor_input); - close(f_type_descriptor_error); + close(F_type_descriptor_output_d); + close(F_type_descriptor_input_d); + close(F_type_descriptor_error_d); if (F_status_is_error(status)) { return 1; diff --git a/level_3/iki_read/c/private-common.h b/level_3/iki_read/c/private-common.h index 59dd19c..0d8304e 100644 --- a/level_3/iki_read/c/private-common.h +++ b/level_3/iki_read/c/private-common.h @@ -20,8 +20,8 @@ extern "C" { * - small: An allocation step used for buffers that are anticipated to have small buffers. */ #ifndef _di_iki_read_common_ - #define iki_read_common_allocation_large 256 - #define iki_read_common_allocation_small 16 + #define iki_read_common_allocation_large_d 256 + #define iki_read_common_allocation_small_d 16 #endif // _di_iki_read_common_ #ifdef __cplusplus diff --git a/level_3/iki_read/c/private-iki_read.c b/level_3/iki_read/c/private-iki_read.c index a717c91..3bd6b45 100644 --- a/level_3/iki_read/c/private-iki_read.c +++ b/level_3/iki_read/c/private-iki_read.c @@ -111,7 +111,7 @@ extern "C" { bool unmatched = F_true; { - f_state_t state = macro_f_state_t_initialize(iki_read_common_allocation_large, iki_read_common_allocation_small, 0, 0, 0, 0, 0); + f_state_t state = macro_f_state_t_initialize(iki_read_common_allocation_large_d, iki_read_common_allocation_small_d, 0, 0, 0, 0, 0); status = fl_iki_read(state, &main->buffer, buffer_range, variable, vocabulary, content); } @@ -264,7 +264,7 @@ extern "C" { f_string_range_t range = buffer_range; { - f_state_t state = macro_f_state_t_initialize(iki_read_common_allocation_large, iki_read_common_allocation_small, 0, 0, 0, 0, 0); + f_state_t state = macro_f_state_t_initialize(iki_read_common_allocation_large_d, iki_read_common_allocation_small_d, 0, 0, 0, 0, 0); status = fl_iki_read(state, &main->buffer, &range, variable, vocabulary, content); } @@ -330,7 +330,7 @@ extern "C" { } // for if (name_missed) { - macro_f_memory_structure_increment(status, names, 1, f_iki_default_allocation_step, macro_f_string_dynamics_t_resize, F_array_too_large); + macro_f_memory_structure_increment(status, names, 1, F_iki_default_allocation_step_d, macro_f_string_dynamics_t_resize, F_array_too_large); if (F_status_is_error(status)) { fll_error_print(main->error, F_status_set_fine(status), "iki_read_process_buffer_ranges_whole", F_true); @@ -466,7 +466,7 @@ extern "C" { } { - f_state_t state = macro_f_state_t_initialize(iki_read_common_allocation_large, iki_read_common_allocation_small, 0, 0, 0, 0, 0); + f_state_t state = macro_f_state_t_initialize(iki_read_common_allocation_large_d, iki_read_common_allocation_small_d, 0, 0, 0, 0, 0); status = fl_iki_read(state, &main->buffer, &range, variable, vocabulary, content); } @@ -563,7 +563,7 @@ extern "C" { status = fl_string_compare(arguments.argv[index], main->buffer.string + vocabulary->array[j].start, length, (vocabulary->array[j].stop - vocabulary->array[j].start) + 1); if (status == F_equal_to) { - macro_f_memory_structure_increment(status, substitutionss[j], 1, f_iki_default_allocation_step, macro_iki_read_substitutions_t_resize, F_array_too_large); + macro_f_memory_structure_increment(status, substitutionss[j], 1, F_iki_default_allocation_step_d, macro_iki_read_substitutions_t_resize, F_array_too_large); if (F_status_is_error(status)) return status; index = parameter->values.array[i + 1]; diff --git a/level_3/iki_read/c/private-iki_read.h b/level_3/iki_read/c/private-iki_read.h index 35f8748..da7b29f 100644 --- a/level_3/iki_read/c/private-iki_read.h +++ b/level_3/iki_read/c/private-iki_read.h @@ -35,7 +35,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_iki_read_process_at_ - extern f_status_t iki_read_process_at(const f_console_arguments_t arguments, const f_string_t file_name, iki_read_main_t *main, f_string_range_t *range) f_attribute_visibility_internal; + extern f_status_t iki_read_process_at(const f_console_arguments_t arguments, const f_string_t file_name, iki_read_main_t *main, f_string_range_t *range) F_attribute_visibility_internal_d; #endif // _di_iki_read_process_at_ /** @@ -55,7 +55,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_iki_read_process_buffer_ - extern f_status_t iki_read_process_buffer(const f_console_arguments_t arguments, const f_string_t file_name, iki_read_main_t *main) f_attribute_visibility_internal; + extern f_status_t iki_read_process_buffer(const f_console_arguments_t arguments, const f_string_t file_name, iki_read_main_t *main) F_attribute_visibility_internal_d; #endif // _di_iki_read_process_buffer_ /** @@ -86,7 +86,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_iki_read_process_buffer_ranges_ - extern f_status_t iki_read_process_buffer_ranges(const f_console_arguments_t arguments, const f_string_t file_name, iki_read_main_t *main, f_string_range_t *buffer_range, f_iki_variable_t *variable, f_iki_vocabulary_t *vocabulary, f_iki_content_t *content, f_string_ranges_t *ranges) f_attribute_visibility_internal; + extern f_status_t iki_read_process_buffer_ranges(const f_console_arguments_t arguments, const f_string_t file_name, iki_read_main_t *main, f_string_range_t *buffer_range, f_iki_variable_t *variable, f_iki_vocabulary_t *vocabulary, f_iki_content_t *content, f_string_ranges_t *ranges) F_attribute_visibility_internal_d; #endif // _di_iki_read_process_buffer_ranges_ /** @@ -119,7 +119,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_iki_read_process_buffer_ranges_whole_ - extern f_status_t iki_read_process_buffer_ranges_whole(const f_console_arguments_t arguments, const f_string_t file_name, const f_string_range_t buffer_range, iki_read_main_t *main, f_iki_variable_t *variable, f_iki_vocabulary_t *vocabulary, f_iki_content_t *content, f_string_ranges_t *ranges) f_attribute_visibility_internal; + extern f_status_t iki_read_process_buffer_ranges_whole(const f_console_arguments_t arguments, const f_string_t file_name, const f_string_range_t buffer_range, iki_read_main_t *main, f_iki_variable_t *variable, f_iki_vocabulary_t *vocabulary, f_iki_content_t *content, f_string_ranges_t *ranges) F_attribute_visibility_internal_d; #endif // _di_iki_read_process_buffer_ranges_whole_ /** @@ -144,7 +144,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_iki_read_process_buffer_total_ - extern f_status_t iki_read_process_buffer_total(const f_console_arguments_t arguments, const f_string_t file_name, iki_read_main_t *main, f_iki_variable_t *variable, f_iki_vocabulary_t *vocabulary, f_iki_content_t *content) f_attribute_visibility_internal; + extern f_status_t iki_read_process_buffer_total(const f_console_arguments_t arguments, const f_string_t file_name, iki_read_main_t *main, f_iki_variable_t *variable, f_iki_vocabulary_t *vocabulary, f_iki_content_t *content) F_attribute_visibility_internal_d; #endif // _di_iki_read_process_buffer_total_ /** @@ -167,7 +167,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_iki_read_substitutions_identify_ - extern f_status_t iki_read_substitutions_identify(const f_console_arguments_t arguments, const f_string_t file_name, iki_read_main_t *main, f_iki_vocabulary_t *vocabulary, iki_read_substitutions_t *substitutionss) f_attribute_visibility_internal; + extern f_status_t iki_read_substitutions_identify(const f_console_arguments_t arguments, const f_string_t file_name, iki_read_main_t *main, f_iki_vocabulary_t *vocabulary, iki_read_substitutions_t *substitutionss) F_attribute_visibility_internal_d; #endif // _di_iki_read_substitutions_identify_ /** @@ -190,7 +190,7 @@ extern "C" { * Set to FALSE to print the entire variable when printing substituted text. */ #ifndef _di_iki_read_substitutions_print_ - extern void iki_read_substitutions_print(const iki_read_main_t main, const f_iki_variable_t variable, const f_iki_content_t content, const f_string_ranges_t ranges, const iki_read_substitutions_t substitutions, const f_array_length_t index, const bool content_only) f_attribute_visibility_internal; + extern void iki_read_substitutions_print(const iki_read_main_t main, const f_iki_variable_t variable, const f_iki_content_t content, const f_string_ranges_t ranges, const iki_read_substitutions_t substitutions, const f_array_length_t index, const bool content_only) F_attribute_visibility_internal_d; #endif // _di_iki_read_substitutions_print_ #ifdef __cplusplus diff --git a/level_3/iki_write/c/iki_write.c b/level_3/iki_write/c/iki_write.c index 207f87d..e6fc94e 100644 --- a/level_3/iki_write/c/iki_write.c +++ b/level_3/iki_write/c/iki_write.c @@ -11,7 +11,7 @@ extern "C" { flockfile(file.stream); - fll_program_print_help_header(file, context, iki_write_name_long, iki_write_version); + fll_program_print_help_header(file, context, iki_write_program_name_long_s, iki_write_program_version_s); fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); @@ -25,13 +25,13 @@ extern "C" { f_print_character(f_string_eol_s[0], file.stream); - fll_program_print_help_option(file, context, iki_write_short_file, iki_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send file to."); - fll_program_print_help_option(file, context, iki_write_short_content, iki_write_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The content to file."); - fll_program_print_help_option(file, context, iki_write_short_double, iki_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); - fll_program_print_help_option(file, context, iki_write_short_object, iki_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The object to file."); - fll_program_print_help_option(file, context, iki_write_short_single, iki_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); + fll_program_print_help_option(file, context, iki_write_short_file_s, iki_write_long_file_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send file to."); + fll_program_print_help_option(file, context, iki_write_short_content_s, iki_write_long_content_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The content to file."); + fll_program_print_help_option(file, context, iki_write_short_double_s, iki_write_long_double_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default)."); + fll_program_print_help_option(file, context, iki_write_short_object_s, iki_write_long_object_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The object to file."); + fll_program_print_help_option(file, context, iki_write_short_single_s, iki_write_long_single_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes."); - fll_program_print_help_usage(file, context, iki_write_name, f_string_empty_s); + fll_program_print_help_usage(file, context, iki_write_program_name_s, f_string_empty_s); fl_print_format(" %[Notes:%]%c", file.stream, context.set.important, context.set.important, f_string_eol_s[0]); fl_print_format(" This program will accept object and content strings to generate an IKI string, such as %[object:\"content\"%].%c", file.stream, context.set.notable, context.set.notable, f_string_eol_s[0]); @@ -53,7 +53,7 @@ extern "C" { f_status_t status = F_none; { - const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, iki_write_total_parameters); + const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, iki_write_total_parameters_d); { f_console_parameter_id_t ids[3] = { iki_write_parameter_no_color, iki_write_parameter_light, iki_write_parameter_dark }; @@ -132,7 +132,7 @@ extern "C" { } if (main->parameters[iki_write_parameter_version].result == f_console_result_found) { - fll_program_print_version(main->output.to, iki_write_version); + fll_program_print_version(main->output.to, iki_write_program_version_s); iki_write_main_delete(main); return F_none; @@ -140,9 +140,9 @@ extern "C" { f_file_t file = f_file_t_initialize; - file.id = f_type_descriptor_output; - file.stream = f_type_output; - file.flag = f_file_flag_create | f_file_flag_write_only | f_file_flag_append; + file.id = F_type_descriptor_output_d; + file.stream = F_type_output_d; + file.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d; if (F_status_is_error_not(status)) { if (main->parameters[iki_write_parameter_file].result == f_console_result_additional) { @@ -151,7 +151,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_write_long_file, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_write_long_file_s, main->error.notable); fl_print_format("%[' may only be specified once.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -177,7 +177,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_write_long_file, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_write_long_file_s, main->error.notable); fl_print_format("%[' was specified, but no value was given.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -192,7 +192,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_write_long_object, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_write_long_object_s, main->error.notable); fl_print_format("%[' was specified, but no value was given.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -206,7 +206,7 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_write_long_content, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_write_long_content_s, main->error.notable); fl_print_format("%[' was specified, but no value was given.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -221,9 +221,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sNo main provided, either pipe the main or use the '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_write_long_object, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_write_long_object_s, main->error.notable); fl_print_format("%[' and the '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_write_long_content, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_write_long_content_s, main->error.notable); fl_print_format("%[' parameters.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -239,9 +239,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameters '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_write_long_content, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_write_long_content_s, main->error.notable); fl_print_format("%[' and '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_write_long_object, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_write_long_object_s, main->error.notable); fl_print_format("%[' must be specified the same number of times.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -251,18 +251,18 @@ extern "C" { } } - uint8_t quote = f_iki_syntax_quote_double; + uint8_t quote = F_iki_syntax_quote_double_s; if (F_status_is_error_not(status)) { if (main->parameters[iki_write_parameter_double].result == f_console_result_found) { if (main->parameters[iki_write_parameter_single].result == f_console_result_found) { if (main->parameters[iki_write_parameter_double].location < main->parameters[iki_write_parameter_single].location) { - quote = f_iki_syntax_quote_single; + quote = F_iki_syntax_quote_single_s; } } } else if (main->parameters[iki_write_parameter_single].result == f_console_result_found) { - quote = f_iki_syntax_quote_single; + quote = F_iki_syntax_quote_single_s; } } @@ -272,7 +272,7 @@ extern "C" { if (main->process_pipe) { f_file_t pipe = f_file_t_initialize; - pipe.id = f_type_descriptor_input; + pipe.id = F_type_descriptor_input_d; pipe.size_read = 1; f_string_dynamic_t buffer = f_string_dynamic_t_initialize; @@ -445,7 +445,7 @@ extern "C" { #ifndef _di_iki_write_main_delete_ f_status_t iki_write_main_delete(iki_write_main_t *main) { - for (f_array_length_t i = 0; i < iki_write_total_parameters; ++i) { + for (f_array_length_t i = 0; i < iki_write_total_parameters_d; ++i) { macro_f_array_lengths_t_delete_simple(main->parameters[i].locations); macro_f_array_lengths_t_delete_simple(main->parameters[i].locations_sub); macro_f_array_lengths_t_delete_simple(main->parameters[i].values); diff --git a/level_3/iki_write/c/iki_write.h b/level_3/iki_write/c/iki_write.h index e85ba22..e6c1d2e 100644 --- a/level_3/iki_write/c/iki_write.h +++ b/level_3/iki_write/c/iki_write.h @@ -53,39 +53,39 @@ extern "C" { #endif -#ifndef _di_iki_write_version_ - #define iki_write_major_version f_string_ascii_0 - #define iki_write_minor_version f_string_ascii_5 - #define iki_write_micro_version f_string_ascii_6 +#ifndef _di_iki_write_program_version_ + #define iki_write_program_version_major_s F_string_ascii_0_s + #define iki_write_program_version_minor_s F_string_ascii_5_s + #define iki_write_program_version_micro_s F_string_ascii_6_s - #ifndef iki_write_nano_version_prefix - #define iki_write_nano_version_prefix + #ifndef iki_write_program_version_nano_prefix_s + #define iki_write_program_version_nano_prefix_s #endif - #ifndef iki_write_nano_version - #define iki_write_nano_version + #ifndef iki_write_program_version_nano_s + #define iki_write_program_version_nano_s #endif - #define iki_write_version iki_write_major_version f_string_ascii_period iki_write_minor_version f_string_ascii_period iki_write_micro_version iki_write_nano_version_prefix iki_write_nano_version -#endif // _di_iki_write_version_ + #define iki_write_program_version_s iki_write_program_version_major_s F_string_ascii_period_s iki_write_program_version_minor_s F_string_ascii_period_s iki_write_program_version_micro_s iki_write_program_version_nano_prefix_s iki_write_program_version_nano_s +#endif // _di_iki_write_program_version_ -#ifndef _di_iki_write_name_ - #define iki_write_name "iki_write" - #define iki_write_name_long "IKI Write" -#endif // _di_iki_write_name_ +#ifndef _di_iki_write_program_name_ + #define iki_write_program_name_s "iki_write" + #define iki_write_program_name_long_s "IKI Write" +#endif // _di_iki_write_program_name_ #ifndef _di_iki_write_defines_ - #define iki_write_short_file "f" - #define iki_write_short_content "c" - #define iki_write_short_double "d" - #define iki_write_short_object "o" - #define iki_write_short_single "s" - - #define iki_write_long_file "file" - #define iki_write_long_content "content" - #define iki_write_long_double "double" - #define iki_write_long_object "object" - #define iki_write_long_single "single" + #define iki_write_short_file_s "f" + #define iki_write_short_content_s "c" + #define iki_write_short_double_s "d" + #define iki_write_short_object_s "o" + #define iki_write_short_single_s "s" + + #define iki_write_long_file_s "file" + #define iki_write_long_content_s "content" + #define iki_write_long_double_s "double" + #define iki_write_long_object_s "object" + #define iki_write_long_single_s "single" enum { iki_write_parameter_help, @@ -116,19 +116,19 @@ extern "C" { f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(iki_write_short_file, iki_write_long_file, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_write_short_content, iki_write_long_content, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_write_short_double, iki_write_long_double, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_write_short_object, iki_write_long_object, 0, 1, f_console_type_normal), \ - f_console_parameter_t_initialize(iki_write_short_single, iki_write_long_single, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(iki_write_short_file_s, iki_write_long_file_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(iki_write_short_content_s, iki_write_long_content_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(iki_write_short_double_s, iki_write_long_double_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(iki_write_short_object_s, iki_write_long_object_s, 0, 1, f_console_type_normal), \ + f_console_parameter_t_initialize(iki_write_short_single_s, iki_write_long_single_s, 0, 0, f_console_type_normal), \ } - #define iki_write_total_parameters 14 + #define iki_write_total_parameters_d 14 #endif // _di_iki_write_defines_ #ifndef _di_iki_write_main_t_ typedef struct { - f_console_parameter_t parameters[iki_write_total_parameters]; + f_console_parameter_t parameters[iki_write_total_parameters_d]; f_array_lengths_t remaining; bool process_pipe; diff --git a/level_3/iki_write/c/main.c b/level_3/iki_write/c/main.c index f2de7d4..13590f6 100644 --- a/level_3/iki_write/c/main.c +++ b/level_3/iki_write/c/main.c @@ -12,13 +12,13 @@ int main(const int argc, const f_string_t *argv) { const f_status_t status = iki_write_main(arguments, &data); // flush output pipes before closing. - fflush(f_type_output); - fflush(f_type_error); + fflush(F_type_output_d); + fflush(F_type_error_d); // close all open file descriptors. - close(f_type_descriptor_output); - close(f_type_descriptor_input); - close(f_type_descriptor_error); + close(F_type_descriptor_output_d); + close(F_type_descriptor_input_d); + close(F_type_descriptor_error_d); if (F_status_is_error(status)) { return 1; diff --git a/level_3/iki_write/c/private-common.h b/level_3/iki_write/c/private-common.h index cc31211..da263ec 100644 --- a/level_3/iki_write/c/private-common.h +++ b/level_3/iki_write/c/private-common.h @@ -20,8 +20,8 @@ extern "C" { * - small: An allocation step used for buffers that are anticipated to have small buffers. */ #ifndef _di_iki_write_common_ - #define iki_write_common_allocation_large 256 - #define iki_write_common_allocation_small 16 + #define iki_write_common_allocation_large_d 256 + #define iki_write_common_allocation_small_d 16 #endif // _di_iki_write_common_ #ifdef __cplusplus diff --git a/level_3/iki_write/c/private-iki_write.c b/level_3/iki_write/c/private-iki_write.c index 65f6137..cc4eb1a 100644 --- a/level_3/iki_write/c/private-iki_write.c +++ b/level_3/iki_write/c/private-iki_write.c @@ -54,7 +54,7 @@ extern "C" { return F_status_set_error(F_failure); } - fl_print_format("%Q%c%c%Q%c", output.stream, object, f_iki_syntax_separator, quote, *escaped, quote); + fl_print_format("%Q%c%c%Q%c", output.stream, object, F_iki_syntax_separator_s, quote, *escaped, quote); return F_none; } diff --git a/level_3/iki_write/c/private-iki_write.h b/level_3/iki_write/c/private-iki_write.h index 1ad5c19..576e14a 100644 --- a/level_3/iki_write/c/private-iki_write.h +++ b/level_3/iki_write/c/private-iki_write.h @@ -25,7 +25,7 @@ extern "C" { * The content to escape and print. * @param quote * The quote character to use. - * This is either f_iki_syntax_quote_single or f_iki_syntax_quote_double. + * This is either F_iki_syntax_quote_single_s or F_iki_syntax_quote_double_s. * @param escaped * A string buffer used as a string cache to save the string into while escaping. * @@ -34,7 +34,7 @@ extern "C" { * F_failure (with error bit) for any othe failure. */ #ifndef _di_iki_write_process_ - extern f_status_t iki_write_process(const iki_write_main_t main, const f_file_t output, const f_string_static_t object, const f_string_static_t content, const uint8_t quote, f_string_dynamic_t *escaped) f_attribute_visibility_internal; + extern f_status_t iki_write_process(const iki_write_main_t main, const f_file_t output, const f_string_static_t object, const f_string_static_t content, const uint8_t quote, f_string_dynamic_t *escaped) F_attribute_visibility_internal_d; #endif // _di_iki_write_process_ #ifdef __cplusplus diff --git a/level_3/status_code/c/main.c b/level_3/status_code/c/main.c index 7727663..e757f5a 100644 --- a/level_3/status_code/c/main.c +++ b/level_3/status_code/c/main.c @@ -12,13 +12,13 @@ int main(const int argc, const f_string_t *argv) { const f_status_t status = status_code_main(arguments, &data); // flush output pipes before closing. - fflush(f_type_output); - fflush(f_type_error); + fflush(F_type_output_d); + fflush(F_type_error_d); // close all open file descriptors. - close(f_type_descriptor_output); - close(f_type_descriptor_input); - close(f_type_descriptor_error); + close(F_type_descriptor_output_d); + close(F_type_descriptor_input_d); + close(F_type_descriptor_error_d); if (F_status_is_error(status) || status == F_false) { return 1; diff --git a/level_3/status_code/c/private-status_code.h b/level_3/status_code/c/private-status_code.h index 2a90c04..55c2f64 100644 --- a/level_3/status_code/c/private-status_code.h +++ b/level_3/status_code/c/private-status_code.h @@ -34,7 +34,7 @@ extern "C" { * @see fss_status_code_convert_number() */ #ifndef _di_status_code_process_check_ - extern f_status_t status_code_process_check(const status_code_main_t main, const f_string_t value) f_attribute_visibility_internal; + extern f_status_t status_code_process_check(const status_code_main_t main, const f_string_t value) F_attribute_visibility_internal_d; #endif // _di_status_code_process_check_ /** @@ -56,7 +56,7 @@ extern "C" { * @see fll_fss_status_from_string() */ #ifndef _di_status_code_process_number_ - extern f_status_t status_code_process_number(const status_code_main_t main, const f_string_t value) f_attribute_visibility_internal; + extern f_status_t status_code_process_number(const status_code_main_t main, const f_string_t value) F_attribute_visibility_internal_d; #endif // _di_status_code_process_number_ /** @@ -83,7 +83,7 @@ extern "C" { * @see fss_status_code_convert_number() */ #ifndef _di_status_code_process_normal_ - extern f_status_t status_code_process_normal(const status_code_main_t main, const f_string_t value) f_attribute_visibility_internal; + extern f_status_t status_code_process_normal(const status_code_main_t main, const f_string_t value) F_attribute_visibility_internal_d; #endif // _di_status_code_process_normal_ /** @@ -111,7 +111,7 @@ extern "C" { * @see fl_console_parameter_to_number_unsigned() */ #ifndef _di_status_code_convert_number_ - extern f_status_t status_code_convert_number(const status_code_main_t main, const f_string_t value, f_number_unsigned_t *number) f_attribute_visibility_internal; + extern f_status_t status_code_convert_number(const status_code_main_t main, const f_string_t value, f_number_unsigned_t *number) F_attribute_visibility_internal_d; #endif // _di_status_code_convert_number_ #ifdef __cplusplus diff --git a/level_3/status_code/c/status_code.c b/level_3/status_code/c/status_code.c index 3f5a1d2..f463f7d 100644 --- a/level_3/status_code/c/status_code.c +++ b/level_3/status_code/c/status_code.c @@ -11,7 +11,7 @@ extern "C" { flockfile(file.stream); - fll_program_print_help_header(file, context, status_code_name_long, status_code_version); + fll_program_print_help_header(file, context, status_code_progam_name_long_s, status_code_progam_version_s); fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message."); fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds."); @@ -25,12 +25,12 @@ extern "C" { f_print_character(f_string_eol_s[0], file.stream); - fll_program_print_help_option(file, context, status_code_short_is_fine, status_code_long_is_fine, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true if the error code is not an error, F_false otherwise."); - fll_program_print_help_option(file, context, status_code_short_is_warning, status_code_long_is_warning, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print F_true if the error code is a warning, F_false otherwise."); - fll_program_print_help_option(file, context, status_code_short_is_error, status_code_long_is_error, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true if the error code is an error, F_false otherwise."); - fll_program_print_help_option(file, context, status_code_short_number, status_code_long_number, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Convert status code name to number."); + fll_program_print_help_option(file, context, status_code_short_is_fine_s, status_code_long_is_fine_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true if the error code is not an error, F_false otherwise."); + fll_program_print_help_option(file, context, status_code_short_is_warning_s, status_code_long_is_warning_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print F_true if the error code is a warning, F_false otherwise."); + fll_program_print_help_option(file, context, status_code_short_is_error_s, status_code_long_is_error_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true if the error code is an error, F_false otherwise."); + fll_program_print_help_option(file, context, status_code_short_number_s, status_code_long_number_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Convert status code name to number."); - fll_program_print_help_usage(file, context, status_code_name, "status code(s)"); + fll_program_print_help_usage(file, context, status_code_progam_name_s, "status code(s)"); funlockfile(file.stream); @@ -43,7 +43,7 @@ extern "C" { f_status_t status = F_none; { - const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, status_code_total_parameters); + const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, status_code_total_parameters_d); { f_console_parameter_id_t ids[3] = { status_code_parameter_no_color, status_code_parameter_light, status_code_parameter_dark }; @@ -116,7 +116,7 @@ extern "C" { } if (main->parameters[status_code_parameter_version].result == f_console_result_found) { - fll_program_print_version(main->output.to, status_code_version); + fll_program_print_version(main->output.to, status_code_progam_version_s); status_code_main_delete(main); return F_none; @@ -127,9 +127,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, status_code_long_is_error, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, status_code_long_is_error_s, main->error.notable); fl_print_format("%[' cannot be used with the parameter '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, status_code_long_is_warning, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, status_code_long_is_warning_s, main->error.notable); fl_print_format("%['.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -141,9 +141,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, status_code_long_is_error, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, status_code_long_is_error_s, main->error.notable); fl_print_format("%[' cannot be used with the parameter '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, status_code_long_is_fine, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, status_code_long_is_fine_s, main->error.notable); fl_print_format("%['.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -156,9 +156,9 @@ extern "C" { flockfile(main->error.to.stream); fl_print_format("%c%[%sThe parameter '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, status_code_long_is_warning, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, status_code_long_is_warning_s, main->error.notable); fl_print_format("%[' cannot be used with the parameter '%]", main->error.to.stream, main->error.context, main->error.context); - fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, status_code_long_is_fine, main->error.notable); + fl_print_format("%[%s%s%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, status_code_long_is_fine_s, main->error.notable); fl_print_format("%['.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]); funlockfile(main->error.to.stream); @@ -245,7 +245,7 @@ extern "C" { #ifndef _di_status_code_main_delete_ f_status_t status_code_main_delete(status_code_main_t *main) { - for (f_array_length_t i = 0; i < status_code_total_parameters; ++i) { + for (f_array_length_t i = 0; i < status_code_total_parameters_d; ++i) { macro_f_array_lengths_t_delete_simple(main->parameters[i].locations); macro_f_array_lengths_t_delete_simple(main->parameters[i].locations_sub); macro_f_array_lengths_t_delete_simple(main->parameters[i].values); diff --git a/level_3/status_code/c/status_code.h b/level_3/status_code/c/status_code.h index 27224be..5f90062 100644 --- a/level_3/status_code/c/status_code.h +++ b/level_3/status_code/c/status_code.h @@ -44,37 +44,37 @@ extern "C" { #endif -#ifndef _di_status_code_version_ - #define status_code_major_version f_string_ascii_0 - #define status_code_minor_version f_string_ascii_5 - #define status_code_micro_version f_string_ascii_6 +#ifndef _di_status_code_program_version_ + #define status_code_progam_version_major_s F_string_ascii_0_s + #define status_code_progam_version_minor_s F_string_ascii_5_s + #define status_code_progam_version_micro_s F_string_ascii_6_s - #ifndef status_code_nano_version_prefix - #define status_code_nano_version_prefix + #ifndef status_code_progam_version_nano_prefix_s + #define status_code_progam_version_nano_prefix_s #endif - #ifndef status_code_nano_version - #define status_code_nano_version + #ifndef status_code_progam_version_nano_s + #define status_code_progam_version_nano_s #endif - #define status_code_version status_code_major_version f_string_ascii_period status_code_minor_version f_string_ascii_period status_code_micro_version status_code_nano_version_prefix status_code_nano_version -#endif // _di_status_code_version_ + #define status_code_progam_version_s status_code_progam_version_major_s F_string_ascii_period_s status_code_progam_version_minor_s F_string_ascii_period_s status_code_progam_version_micro_s status_code_progam_version_nano_prefix_s status_code_progam_version_nano_s +#endif // _di_status_code_program_version_ -#ifndef _di_status_code_name_ - #define status_code_name "status_code" - #define status_code_name_long "FSS Status Code" -#endif // _di_status_code_name_ +#ifndef _di_status_code_program_name_ + #define status_code_progam_name_s "status_code" + #define status_code_progam_name_long_s "FSS Status Code" +#endif // _di_status_code_program_name_ #ifndef _di_status_code_defines_ - #define status_code_short_is_fine "f" - #define status_code_short_is_warning "w" - #define status_code_short_is_error "e" - #define status_code_short_number "n" + #define status_code_short_is_fine_s "f" + #define status_code_short_is_warning_s "w" + #define status_code_short_is_error_s "e" + #define status_code_short_number_s "n" - #define status_code_long_is_fine "is_fine" - #define status_code_long_is_warning "is_warning" - #define status_code_long_is_error "is_error" - #define status_code_long_number "number" + #define status_code_long_is_fine_s "is_fine" + #define status_code_long_is_warning_s "is_warning" + #define status_code_long_is_error_s "is_error" + #define status_code_long_number_s "number" enum { status_code_parameter_help, @@ -104,18 +104,18 @@ extern "C" { f_console_parameter_t_initialize(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, 0, f_console_type_inverse), \ f_console_parameter_t_initialize(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, 0, f_console_type_inverse), \ - f_console_parameter_t_initialize(status_code_short_is_fine, status_code_long_is_fine, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(status_code_short_is_warning, status_code_long_is_warning, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(status_code_short_is_error, status_code_long_is_error, 0, 0, f_console_type_normal), \ - f_console_parameter_t_initialize(status_code_short_number, status_code_long_number, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(status_code_short_is_fine_s, status_code_long_is_fine_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(status_code_short_is_warning_s, status_code_long_is_warning_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(status_code_short_is_error_s, status_code_long_is_error_s, 0, 0, f_console_type_normal), \ + f_console_parameter_t_initialize(status_code_short_number_s, status_code_long_number_s, 0, 0, f_console_type_normal), \ } - #define status_code_total_parameters 13 + #define status_code_total_parameters_d 13 #endif // _di_status_code_defines_ #ifndef _di_status_code_main_t_ typedef struct { - f_console_parameter_t parameters[status_code_total_parameters]; + f_console_parameter_t parameters[status_code_total_parameters_d]; f_array_lengths_t remaining; bool process_pipe;