From: Kevin Day Date: Thu, 17 Feb 2022 08:02:02 +0000 (-0600) Subject: Cleanup: Relocate static strings out of the string/dynamic.h into string/static.h. X-Git-Tag: 0.5.8~35 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=0a23d284c2ef27a9ab0910c75ce88d7794428aee;p=fll Cleanup: Relocate static strings out of the string/dynamic.h into string/static.h. --- diff --git a/build/level_0/settings b/build/level_0/settings index b1d519f..c34c6d1 100644 --- a/build/level_0/settings +++ b/build/level_0/settings @@ -52,7 +52,7 @@ build_sources_library serialize.c private-serialize.c serialize/common.c build_sources_library signal.c build_sources_library socket.c build_sources_library status_string.c -build_sources_library string.c private-string.c string/common.c string/dynamic.c string/map.c string/quantity.c string/range.c string/triple.c +build_sources_library string.c private-string.c string/common.c string/dynamic.c string/map.c string/quantity.c string/range.c string/static.c string/triple.c build_sources_library type_array/array_length.c type_array/cell.c type_array/fll_id.c type_array/int8.c type_array/int16.c type_array/int32.c type_array/int64.c type_array/int128.c type_array/state.c type_array/status.c build_sources_library type_array/private-array_length.c type_array/private-cell.c type_array/private-fll_id.c type_array/private-int8.c type_array/private-int16.c type_array/private-int32.c type_array/private-int64.c type_array/private-int128.c type_array/private-state.c type_array/private-status.c build_sources_library utf.c private-utf.c utf/common.c utf/dynamic.c utf/map.c utf/private-is_unassigned.c utf/private-string.c utf/string.c utf/triple.c @@ -87,7 +87,7 @@ build_sources_headers signal.h signal/common.h build_sources_headers socket.h socket/common.h build_sources_headers status.h build_sources_headers status_string.h -build_sources_headers string.h string/common.h string/dynamic.h string/map.h string/quantity.h string/range.h string/triple.h +build_sources_headers string.h string/common.h string/dynamic.h string/map.h string/quantity.h string/range.h string/static.h string/triple.h build_sources_headers type.h build_sources_headers type_array.h type_array/common.h build_sources_headers type_array/array_length.h type_array/cell.h type_array/fll_id.h type_array/int8.h type_array/int16.h type_array/int32.h type_array/int64.h type_array/int128.h type_array/state.h type_array/status.h diff --git a/build/monolithic/settings b/build/monolithic/settings index 02e65af..35ad5fd 100644 --- a/build/monolithic/settings +++ b/build/monolithic/settings @@ -52,7 +52,7 @@ build_sources_library level_0/serialize.c level_0/private-serialize.c level_0/se build_sources_library level_0/signal.c build_sources_library level_0/socket.c build_sources_library level_0/status_string.c -build_sources_library level_0/string.c level_0/private-string.c level_0/string/common.c level_0/string/dynamic.c level_0/string/map.c level_0/string/quantity.c level_0/string/range.c level_0/string/triple.c +build_sources_library level_0/string.c level_0/private-string.c level_0/string/common.c level_0/string/dynamic.c level_0/string/map.c level_0/string/quantity.c level_0/string/range.c level_0/string/static.c level_0/string/triple.c build_sources_library level_0/type_array/array_length.c level_0/type_array/cell.c level_0/type_array/fll_id.c level_0/type_array/int8.c level_0/type_array/int16.c level_0/type_array/int32.c level_0/type_array/int64.c level_0/type_array/int128.c level_0/type_array/state.c level_0/type_array/status.c build_sources_library level_0/type_array/private-array_length.c level_0/type_array/private-cell.c level_0/type_array/private-fll_id.c level_0/type_array/private-int8.c level_0/type_array/private-int16.c level_0/type_array/private-int32.c level_0/type_array/private-int64.c level_0/type_array/private-int128.c level_0/type_array/private-state.c level_0/type_array/private-status.c build_sources_library level_0/utf.c level_0/private-utf.c level_0/utf/common.c level_0/utf/dynamic.c level_0/utf/map.c level_0/utf/string.c level_0/utf/triple.c level_0/utf/private-is_unassigned.c level_0/utf/private-string.c @@ -109,7 +109,7 @@ build_sources_headers level_0/signal.h level_0/signal/common.h build_sources_headers level_0/socket.h level_0/socket/common.h build_sources_headers level_0/status.h build_sources_headers level_0/status_string.h -build_sources_headers level_0/string.h level_0/string/common.h level_0/string/dynamic.h level_0/string/map.h level_0/string/quantity.h level_0/string/range.h level_0/string/triple.h +build_sources_headers level_0/string.h level_0/string/common.h level_0/string/dynamic.h level_0/string/map.h level_0/string/quantity.h level_0/string/range.h level_0/string/static.h level_0/string/triple.h build_sources_headers level_0/type.h build_sources_headers level_0/type_array.h level_0/type_array/common.h build_sources_headers level_0/type_array/array_length.h level_0/type_array/cell.h level_0/type_array/fll_id.h level_0/type_array/int8.h level_0/type_array/int16.h level_0/type_array/int32.h level_0/type_array/int64.h level_0/type_array/int128.h level_0/type_array/state.h level_0/type_array/status.h diff --git a/level_0/f_string/c/string.h b/level_0/f_string/c/string.h index c72e44d..d6433b5 100644 --- a/level_0/f_string/c/string.h +++ b/level_0/f_string/c/string.h @@ -24,6 +24,7 @@ // FLL-0 string includes. #include #include +#include #include #include #include diff --git a/level_0/f_string/c/string/dynamic.c b/level_0/f_string/c/string/dynamic.c index b6aeb66..f94568d 100644 --- a/level_0/f_string/c/string/dynamic.c +++ b/level_0/f_string/c/string/dynamic.c @@ -5,148 +5,6 @@ extern "C" { #endif -#ifndef _di_f_string_empty_s_ - const f_string_static_t f_string_empty_s = macro_f_string_static_t_initialize(F_string_empty_s, 0, F_string_empty_s_length); -#endif // _di_f_string_empty_s_ - -#ifndef _di_f_string_null_s_ - const f_string_static_t f_string_null_s = macro_f_string_static_t_initialize(F_string_null_s, 0, F_string_null_s_length); -#endif // _di_f_string_null_s_ - -#ifndef _di_string_ascii_s_ - const f_string_static_t f_string_ascii_0_s = macro_f_string_static_t_initialize(F_string_ascii_0_s, 0, F_string_ascii_0_s_length); - const f_string_static_t f_string_ascii_1_s = macro_f_string_static_t_initialize(F_string_ascii_1_s, 0, F_string_ascii_1_s_length); - const f_string_static_t f_string_ascii_2_s = macro_f_string_static_t_initialize(F_string_ascii_2_s, 0, F_string_ascii_2_s_length); - const f_string_static_t f_string_ascii_3_s = macro_f_string_static_t_initialize(F_string_ascii_3_s, 0, F_string_ascii_3_s_length); - const f_string_static_t f_string_ascii_4_s = macro_f_string_static_t_initialize(F_string_ascii_4_s, 0, F_string_ascii_4_s_length); - const f_string_static_t f_string_ascii_5_s = macro_f_string_static_t_initialize(F_string_ascii_5_s, 0, F_string_ascii_5_s_length); - const f_string_static_t f_string_ascii_6_s = macro_f_string_static_t_initialize(F_string_ascii_6_s, 0, F_string_ascii_6_s_length); - const f_string_static_t f_string_ascii_7_s = macro_f_string_static_t_initialize(F_string_ascii_7_s, 0, F_string_ascii_7_s_length); - const f_string_static_t f_string_ascii_8_s = macro_f_string_static_t_initialize(F_string_ascii_8_s, 0, F_string_ascii_8_s_length); - const f_string_static_t f_string_ascii_9_s = macro_f_string_static_t_initialize(F_string_ascii_9_s, 0, F_string_ascii_9_s_length); - - const f_string_static_t f_string_ascii_a_s = macro_f_string_static_t_initialize(F_string_ascii_a_s, 0, F_string_ascii_a_s_length); - const f_string_static_t f_string_ascii_b_s = macro_f_string_static_t_initialize(F_string_ascii_b_s, 0, F_string_ascii_b_s_length); - const f_string_static_t f_string_ascii_c_s = macro_f_string_static_t_initialize(F_string_ascii_c_s, 0, F_string_ascii_c_s_length); - const f_string_static_t f_string_ascii_d_s = macro_f_string_static_t_initialize(F_string_ascii_d_s, 0, F_string_ascii_d_s_length); - const f_string_static_t f_string_ascii_e_s = macro_f_string_static_t_initialize(F_string_ascii_e_s, 0, F_string_ascii_e_s_length); - const f_string_static_t f_string_ascii_f_s = macro_f_string_static_t_initialize(F_string_ascii_f_s, 0, F_string_ascii_f_s_length); - const f_string_static_t f_string_ascii_g_s = macro_f_string_static_t_initialize(F_string_ascii_g_s, 0, F_string_ascii_g_s_length); - const f_string_static_t f_string_ascii_h_s = macro_f_string_static_t_initialize(F_string_ascii_h_s, 0, F_string_ascii_h_s_length); - const f_string_static_t f_string_ascii_i_s = macro_f_string_static_t_initialize(F_string_ascii_i_s, 0, F_string_ascii_i_s_length); - const f_string_static_t f_string_ascii_j_s = macro_f_string_static_t_initialize(F_string_ascii_j_s, 0, F_string_ascii_j_s_length); - const f_string_static_t f_string_ascii_k_s = macro_f_string_static_t_initialize(F_string_ascii_k_s, 0, F_string_ascii_k_s_length); - const f_string_static_t f_string_ascii_l_s = macro_f_string_static_t_initialize(F_string_ascii_l_s, 0, F_string_ascii_l_s_length); - const f_string_static_t f_string_ascii_m_s = macro_f_string_static_t_initialize(F_string_ascii_m_s, 0, F_string_ascii_m_s_length); - const f_string_static_t f_string_ascii_n_s = macro_f_string_static_t_initialize(F_string_ascii_n_s, 0, F_string_ascii_n_s_length); - const f_string_static_t f_string_ascii_o_s = macro_f_string_static_t_initialize(F_string_ascii_o_s, 0, F_string_ascii_o_s_length); - const f_string_static_t f_string_ascii_p_s = macro_f_string_static_t_initialize(F_string_ascii_p_s, 0, F_string_ascii_p_s_length); - const f_string_static_t f_string_ascii_q_s = macro_f_string_static_t_initialize(F_string_ascii_q_s, 0, F_string_ascii_q_s_length); - const f_string_static_t f_string_ascii_r_s = macro_f_string_static_t_initialize(F_string_ascii_r_s, 0, F_string_ascii_r_s_length); - const f_string_static_t f_string_ascii_s_s = macro_f_string_static_t_initialize(F_string_ascii_s_s, 0, F_string_ascii_s_s_length); - const f_string_static_t f_string_ascii_t_s = macro_f_string_static_t_initialize(F_string_ascii_t_s, 0, F_string_ascii_t_s_length); - const f_string_static_t f_string_ascii_u_s = macro_f_string_static_t_initialize(F_string_ascii_u_s, 0, F_string_ascii_u_s_length); - const f_string_static_t f_string_ascii_v_s = macro_f_string_static_t_initialize(F_string_ascii_v_s, 0, F_string_ascii_v_s_length); - const f_string_static_t f_string_ascii_w_s = macro_f_string_static_t_initialize(F_string_ascii_w_s, 0, F_string_ascii_w_s_length); - const f_string_static_t f_string_ascii_x_s = macro_f_string_static_t_initialize(F_string_ascii_x_s, 0, F_string_ascii_x_s_length); - const f_string_static_t f_string_ascii_y_s = macro_f_string_static_t_initialize(F_string_ascii_y_s, 0, F_string_ascii_y_s_length); - const f_string_static_t f_string_ascii_z_s = macro_f_string_static_t_initialize(F_string_ascii_z_s, 0, F_string_ascii_z_s_length); - - const f_string_static_t f_string_ascii_A_s = macro_f_string_static_t_initialize(F_string_ascii_A_s, 0, F_string_ascii_A_s_length); - const f_string_static_t f_string_ascii_B_s = macro_f_string_static_t_initialize(F_string_ascii_B_s, 0, F_string_ascii_B_s_length); - const f_string_static_t f_string_ascii_C_s = macro_f_string_static_t_initialize(F_string_ascii_C_s, 0, F_string_ascii_C_s_length); - const f_string_static_t f_string_ascii_D_s = macro_f_string_static_t_initialize(F_string_ascii_D_s, 0, F_string_ascii_D_s_length); - const f_string_static_t f_string_ascii_E_s = macro_f_string_static_t_initialize(F_string_ascii_E_s, 0, F_string_ascii_E_s_length); - const f_string_static_t f_string_ascii_F_s = macro_f_string_static_t_initialize(F_string_ascii_F_s, 0, F_string_ascii_F_s_length); - const f_string_static_t f_string_ascii_G_s = macro_f_string_static_t_initialize(F_string_ascii_G_s, 0, F_string_ascii_G_s_length); - const f_string_static_t f_string_ascii_H_s = macro_f_string_static_t_initialize(F_string_ascii_H_s, 0, F_string_ascii_H_s_length); - const f_string_static_t f_string_ascii_I_s = macro_f_string_static_t_initialize(F_string_ascii_I_s, 0, F_string_ascii_I_s_length); - const f_string_static_t f_string_ascii_J_s = macro_f_string_static_t_initialize(F_string_ascii_J_s, 0, F_string_ascii_J_s_length); - const f_string_static_t f_string_ascii_K_s = macro_f_string_static_t_initialize(F_string_ascii_K_s, 0, F_string_ascii_K_s_length); - const f_string_static_t f_string_ascii_L_s = macro_f_string_static_t_initialize(F_string_ascii_L_s, 0, F_string_ascii_L_s_length); - const f_string_static_t f_string_ascii_M_s = macro_f_string_static_t_initialize(F_string_ascii_M_s, 0, F_string_ascii_M_s_length); - const f_string_static_t f_string_ascii_N_s = macro_f_string_static_t_initialize(F_string_ascii_N_s, 0, F_string_ascii_N_s_length); - const f_string_static_t f_string_ascii_O_s = macro_f_string_static_t_initialize(F_string_ascii_O_s, 0, F_string_ascii_O_s_length); - const f_string_static_t f_string_ascii_P_s = macro_f_string_static_t_initialize(F_string_ascii_P_s, 0, F_string_ascii_P_s_length); - const f_string_static_t f_string_ascii_Q_s = macro_f_string_static_t_initialize(F_string_ascii_Q_s, 0, F_string_ascii_Q_s_length); - const f_string_static_t f_string_ascii_R_s = macro_f_string_static_t_initialize(F_string_ascii_R_s, 0, F_string_ascii_R_s_length); - const f_string_static_t f_string_ascii_S_s = macro_f_string_static_t_initialize(F_string_ascii_S_s, 0, F_string_ascii_S_s_length); - const f_string_static_t f_string_ascii_T_s = macro_f_string_static_t_initialize(F_string_ascii_T_s, 0, F_string_ascii_T_s_length); - const f_string_static_t f_string_ascii_U_s = macro_f_string_static_t_initialize(F_string_ascii_U_s, 0, F_string_ascii_U_s_length); - const f_string_static_t f_string_ascii_V_s = macro_f_string_static_t_initialize(F_string_ascii_V_s, 0, F_string_ascii_V_s_length); - const f_string_static_t f_string_ascii_W_s = macro_f_string_static_t_initialize(F_string_ascii_W_s, 0, F_string_ascii_W_s_length); - const f_string_static_t f_string_ascii_X_s = macro_f_string_static_t_initialize(F_string_ascii_X_s, 0, F_string_ascii_X_s_length); - const f_string_static_t f_string_ascii_Y_s = macro_f_string_static_t_initialize(F_string_ascii_Y_s, 0, F_string_ascii_Y_s_length); - const f_string_static_t f_string_ascii_Z_s = macro_f_string_static_t_initialize(F_string_ascii_Z_s, 0, F_string_ascii_Z_s_length); - - const f_string_static_t f_string_ascii_ampersand_s = macro_f_string_static_t_initialize(F_string_ascii_ampersand_s, 0, F_string_ascii_ampersand_s_length); - const f_string_static_t f_string_ascii_asterisk_s = macro_f_string_static_t_initialize(F_string_ascii_asterisk_s, 0, F_string_ascii_asterisk_s_length); - const f_string_static_t f_string_ascii_brace_close_s = macro_f_string_static_t_initialize(F_string_ascii_brace_close_s, 0, F_string_ascii_brace_close_s_length); - const f_string_static_t f_string_ascii_brace_open_s = macro_f_string_static_t_initialize(F_string_ascii_brace_open_s, 0, F_string_ascii_brace_open_s_length); - const f_string_static_t f_string_ascii_bracket_close_s = macro_f_string_static_t_initialize(F_string_ascii_bracket_close_s, 0, F_string_ascii_bracket_close_s_length); - const f_string_static_t f_string_ascii_bracket_open_s = macro_f_string_static_t_initialize(F_string_ascii_bracket_open_s, 0, F_string_ascii_bracket_open_s_length); - const f_string_static_t f_string_ascii_caret_s = macro_f_string_static_t_initialize(F_string_ascii_caret_s, 0, F_string_ascii_caret_s_length); - const f_string_static_t f_string_ascii_comma_s = macro_f_string_static_t_initialize(F_string_ascii_comma_s, 0, F_string_ascii_comma_s_length); - const f_string_static_t f_string_ascii_colon_s = macro_f_string_static_t_initialize(F_string_ascii_colon_s, 0, F_string_ascii_colon_s_length); - const f_string_static_t f_string_ascii_colon_semi_s = macro_f_string_static_t_initialize(F_string_ascii_colon_semi_s, 0, F_string_ascii_colon_semi_s_length); - const f_string_static_t f_string_ascii_dollar_s = macro_f_string_static_t_initialize(F_string_ascii_dollar_s, 0, F_string_ascii_dollar_s_length); - const f_string_static_t f_string_ascii_equal_s = macro_f_string_static_t_initialize(F_string_ascii_equal_s, 0, F_string_ascii_equal_s_length); - const f_string_static_t f_string_ascii_exclamation_s = macro_f_string_static_t_initialize(F_string_ascii_exclamation_s, 0, F_string_ascii_exclamation_s_length); - const f_string_static_t f_string_ascii_grave_s = macro_f_string_static_t_initialize(F_string_ascii_grave_s, 0, F_string_ascii_grave_s_length); - const f_string_static_t f_string_ascii_mark_question_s = macro_f_string_static_t_initialize(F_string_ascii_mark_question_s, 0, F_string_ascii_mark_question_s_length); - const f_string_static_t f_string_ascii_minus_s = macro_f_string_static_t_initialize(F_string_ascii_minus_s, 0, F_string_ascii_minus_s_length); - const f_string_static_t f_string_ascii_parenthesis_open_s = macro_f_string_static_t_initialize(F_string_ascii_parenthesis_open_s, 0, F_string_ascii_parenthesis_open_s_length); - const f_string_static_t f_string_ascii_parenthesis_close_s = macro_f_string_static_t_initialize(F_string_ascii_parenthesis_close_s, 0, F_string_ascii_parenthesis_close_s_length); - const f_string_static_t f_string_ascii_percent_s = macro_f_string_static_t_initialize(F_string_ascii_percent_s, 0, F_string_ascii_percent_s_length); - const f_string_static_t f_string_ascii_period_s = macro_f_string_static_t_initialize(F_string_ascii_period_s, 0, F_string_ascii_period_s_length); - const f_string_static_t f_string_ascii_pipe_s = macro_f_string_static_t_initialize(F_string_ascii_pipe_s, 0, F_string_ascii_pipe_s_length); - const f_string_static_t f_string_ascii_plus_s = macro_f_string_static_t_initialize(F_string_ascii_plus_s, 0, F_string_ascii_plus_s_length); - const f_string_static_t f_string_ascii_pound_s = macro_f_string_static_t_initialize(F_string_ascii_pound_s, 0, F_string_ascii_pound_s_length); - const f_string_static_t f_string_ascii_quote_double_s = macro_f_string_static_t_initialize(F_string_ascii_quote_double_s, 0, F_string_ascii_quote_double_s_length); - const f_string_static_t f_string_ascii_quote_single_s = macro_f_string_static_t_initialize(F_string_ascii_quote_single_s, 0, F_string_ascii_quote_single_s_length); - const f_string_static_t f_string_ascii_sign_at_s = macro_f_string_static_t_initialize(F_string_ascii_sign_at_s, 0, F_string_ascii_sign_at_s_length); - const f_string_static_t f_string_ascii_sign_greater_than_s = macro_f_string_static_t_initialize(F_string_ascii_sign_greater_than_s, 0, F_string_ascii_sign_greater_than_s_length); - const f_string_static_t f_string_ascii_sign_less_than_s = macro_f_string_static_t_initialize(F_string_ascii_sign_less_than_s, 0, F_string_ascii_sign_less_than_s_length); - const f_string_static_t f_string_ascii_slash_forward_s = macro_f_string_static_t_initialize(F_string_ascii_slash_forward_s, 0, F_string_ascii_slash_forward_s_length); - const f_string_static_t f_string_ascii_slash_backward_s = macro_f_string_static_t_initialize(F_string_ascii_slash_backward_s, 0, F_string_ascii_slash_backward_s_length); - const f_string_static_t f_string_ascii_tilde_s = macro_f_string_static_t_initialize(F_string_ascii_tilde_s, 0, F_string_ascii_tilde_s_length); - const f_string_static_t f_string_ascii_underscore_s = macro_f_string_static_t_initialize(F_string_ascii_underscore_s, 0, F_string_ascii_underscore_s_length); - - const f_string_static_t f_string_ascii_acknowledge_s = macro_f_string_static_t_initialize(F_string_ascii_acknowledge_s, 0, F_string_ascii_acknowledge_s_length); - const f_string_static_t f_string_ascii_acknowledge_negative_s = macro_f_string_static_t_initialize(F_string_ascii_acknowledge_negative_s, 0, F_string_ascii_acknowledge_negative_s_length); - const f_string_static_t f_string_ascii_bell_s = macro_f_string_static_t_initialize(F_string_ascii_bell_s, 0, F_string_ascii_bell_s_length); - const f_string_static_t f_string_ascii_cancel_s = macro_f_string_static_t_initialize(F_string_ascii_cancel_s, 0, F_string_ascii_cancel_s_length); - const f_string_static_t f_string_ascii_data_link_escape_s = macro_f_string_static_t_initialize(F_string_ascii_data_link_escape_s, 0, F_string_ascii_data_link_escape_s_length); - const f_string_static_t f_string_ascii_device_control_one_s = macro_f_string_static_t_initialize(F_string_ascii_device_control_one_s, 0, F_string_ascii_device_control_one_s_length); - const f_string_static_t f_string_ascii_device_control_two_s = macro_f_string_static_t_initialize(F_string_ascii_device_control_two_s, 0, F_string_ascii_device_control_two_s_length); - const f_string_static_t f_string_ascii_device_control_three_s = macro_f_string_static_t_initialize(F_string_ascii_device_control_three_s, 0, F_string_ascii_device_control_three_s_length); - const f_string_static_t f_string_ascii_device_control_four_s = macro_f_string_static_t_initialize(F_string_ascii_device_control_four_s, 0, F_string_ascii_device_control_four_s_length); - const f_string_static_t f_string_ascii_enquiry_s = macro_f_string_static_t_initialize(F_string_ascii_enquiry_s, 0, F_string_ascii_enquiry_s_length); - const f_string_static_t f_string_ascii_escape_s = macro_f_string_static_t_initialize(F_string_ascii_escape_s, 0, F_string_ascii_escape_s_length); - const f_string_static_t f_string_ascii_feed_form_s = macro_f_string_static_t_initialize(F_string_ascii_feed_form_s, 0, F_string_ascii_feed_form_s_length); - const f_string_static_t f_string_ascii_feed_line_s = macro_f_string_static_t_initialize(F_string_ascii_feed_line_s, 0, F_string_ascii_feed_line_s_length); - const f_string_static_t f_string_ascii_header_start_s = macro_f_string_static_t_initialize(F_string_ascii_header_start_s, 0, F_string_ascii_header_start_s_length); - const f_string_static_t f_string_ascii_medium_stop_s = macro_f_string_static_t_initialize(F_string_ascii_medium_stop_s, 0, F_string_ascii_medium_stop_s_length); - const f_string_static_t f_string_ascii_null_s = macro_f_string_static_t_initialize(F_string_ascii_null_s, 0, F_string_ascii_null_s_length); - const f_string_static_t f_string_ascii_return_carriage_s = macro_f_string_static_t_initialize(F_string_ascii_return_carriage_s, 0, F_string_ascii_return_carriage_s_length); - const f_string_static_t f_string_ascii_separator_file_s = macro_f_string_static_t_initialize(F_string_ascii_separator_file_s, 0, F_string_ascii_separator_file_s_length); - const f_string_static_t f_string_ascii_separator_group_s = macro_f_string_static_t_initialize(F_string_ascii_separator_group_s, 0, F_string_ascii_separator_group_s_length); - const f_string_static_t f_string_ascii_separator_record_s = macro_f_string_static_t_initialize(F_string_ascii_separator_record_s, 0, F_string_ascii_separator_record_s_length); - const f_string_static_t f_string_ascii_separator_unit_s = macro_f_string_static_t_initialize(F_string_ascii_separator_unit_s, 0, F_string_ascii_separator_unit_s_length); - const f_string_static_t f_string_ascii_shift_in_s = macro_f_string_static_t_initialize(F_string_ascii_shift_in_s, 0, F_string_ascii_shift_in_s_length); - const f_string_static_t f_string_ascii_shift_out_s = macro_f_string_static_t_initialize(F_string_ascii_shift_out_s, 0, F_string_ascii_shift_out_s_length); - const f_string_static_t f_string_ascii_space_s = macro_f_string_static_t_initialize(F_string_ascii_space_s, 0, F_string_ascii_space_s_length); - const f_string_static_t f_string_ascii_space_back_s = macro_f_string_static_t_initialize(F_string_ascii_space_back_s, 0, F_string_ascii_space_back_s_length); - const f_string_static_t f_string_ascii_substitute_s = macro_f_string_static_t_initialize(F_string_ascii_substitute_s, 0, F_string_ascii_substitute_s_length); - const f_string_static_t f_string_ascii_synchronous_idle_s = macro_f_string_static_t_initialize(F_string_ascii_synchronous_idle_s, 0, F_string_ascii_synchronous_idle_s_length); - const f_string_static_t f_string_ascii_tab_horizontal_s = macro_f_string_static_t_initialize(F_string_ascii_tab_horizontal_s, 0, F_string_ascii_tab_horizontal_s_length); - const f_string_static_t f_string_ascii_tab_vertical_s = macro_f_string_static_t_initialize(F_string_ascii_tab_vertical_s, 0, F_string_ascii_tab_vertical_s_length); - const f_string_static_t f_string_ascii_text_start_s = macro_f_string_static_t_initialize(F_string_ascii_text_start_s, 0, F_string_ascii_text_start_s_length); - const f_string_static_t f_string_ascii_text_stop_s = macro_f_string_static_t_initialize(F_string_ascii_text_stop_s, 0, F_string_ascii_text_stop_s_length); - const f_string_static_t f_string_ascii_transmission_stop_s = macro_f_string_static_t_initialize(F_string_ascii_transmission_stop_s, 0, F_string_ascii_transmission_stop_s_length); - const f_string_static_t f_string_ascii_transmission_block_end_s = macro_f_string_static_t_initialize(F_string_ascii_transmission_block_end_s, 0, F_string_ascii_transmission_block_end_s_length); -#endif // _di_string_ascii_s_ - #ifndef _di_f_string_dynamic_adjust_ f_status_t f_string_dynamic_adjust(const f_array_length_t length, f_string_dynamic_t *dynamic) { #ifndef _di_level_0_parameter_checking_ diff --git a/level_0/f_string/c/string/dynamic.h b/level_0/f_string/c/string/dynamic.h index 6137103..84817fa 100644 --- a/level_0/f_string/c/string/dynamic.h +++ b/level_0/f_string/c/string/dynamic.h @@ -5,7 +5,7 @@ * API Version: 0.5 * Licenses: lgpl-2.1-or-later * - * Defines dynamic (and static) string data. + * Defines dynamic string data. * * This is auto-included by string.h and should not need to be explicitly included. */ @@ -17,37 +17,6 @@ extern "C" { #endif /** - * A string that is analogous to f_string_dynamic_t but intended for static-only uses. - * - * The f_string_static_t type should never be directly allocated or deallocated. - * - * A special macro_f_string_static_t_initialize2() is provided for the special purpose of easily initialize a static string with an identical used and size. - * A special macro_f_string_static_t_initialize() is provided for the special purpose of easily initialize a static string. - * - * string: The string. - * size: Total amount of space available. - * used: Total number of space used. - */ -#ifndef _di_f_string_static_t_ - typedef struct { - f_string_t string; - - f_array_length_t size; - f_array_length_t used; - } f_string_static_t; - - #define f_string_static_t_initialize { 0, 0, 0 } - - #define macro_f_string_static_t_clear(string_static) \ - string_static.string = 0; \ - string_static.size = 0; \ - string_static.used = 0; - - #define macro_f_string_static_t_initialize(string, size, used) { string, size, used } - #define macro_f_string_static_t_initialize2(string, length) { string, length, length } -#endif // _di_f_string_static_t_ - -/** * A string that supports contains a size attribute to handle dynamic allocations and deallocations. * * Save the string size along with the string, so that strlen(..) commands can be avoided as much as possible. @@ -79,29 +48,6 @@ extern "C" { #endif // _di_f_string_dynamic_t_ /** - * An array of static strings. - * - * array: The array of static strings. - * size: Total amount of space available. - * used: Total number of space used. - */ -#ifndef _di_f_string_statics_t_ - typedef struct { - f_string_static_t *array; - - f_array_length_t size; - f_array_length_t used; - } f_string_statics_t; - - #define f_string_statics_t_initialize { 0, 0, 0 } - - #define macro_f_string_statics_t_clear(statics) \ - statics.array = 0; \ - statics.size = 0; \ - statics.used = 0; -#endif // _di_f_string_statics_t_ - -/** * An array of dynamic dynamics. * * array: The array of dynamic dynamics. @@ -128,29 +74,6 @@ extern "C" { #endif // _di_f_string_dynamics_t_ /** - * An array of static strings. - * - * array: The array of static strings. - * size: Total amount of space available. - * used: Total number of space used. - */ -#ifndef _di_f_string_staticss_t_ - typedef struct { - f_string_statics_t *array; - - f_array_length_t size; - f_array_length_t used; - } f_string_staticss_t; - - #define f_string_staticss_t_initialize { 0, 0, 0 } - - #define macro_f_string_staticss_t_clear(staticss) \ - staticss.array = 0; \ - staticss.size = 0; \ - staticss.used = 0; -#endif // _di_f_string_staticss_t_ - -/** * An array of dynamic dynamicss. * * array: The array of dynamic dynamicss. @@ -177,475 +100,6 @@ extern "C" { #endif // _di_f_string_dynamicss_t_ /** - * Provide a static empty string. - * - * This is intended to represent an empty string. - */ -#ifndef _di_f_string_empty_s_ - #define F_string_empty_s "" - #define F_string_empty_s_length 0 - - extern const f_string_static_t f_string_empty_s; -#endif // _di_f_string_empty_s_ - -/** - * Provide a static string focusing on the NULL character. - * - * This is different from f_string_empty_s in that it's used is set to 1 to represent the NULL character. - */ -#ifndef _di_f_string_null_s_ - #define F_string_null_s "" - #define F_string_null_s_length 1 - - extern const f_string_static_t f_string_null_s; -#endif // _di_f_string_null_s_ - -/** - * Provide a character to use as a placeholder within some string. - * - * This is generally the NULL character and should be effectively the same as f_string_null_s. - */ -#ifndef _di_f_string_placeholder_s_ - #define F_string_placeholder_s F_string_null_s - #define F_string_placeholder_s_length F_string_null_s_length - - #define f_string_placeholder_s f_string_null_s -#endif // _di_f_string_placeholder_s_ - -/** - * Provide a set of ASCII strings. - * - * This is not intended to be exhaustive or language-specific. - * Instead, this is for very common uses such as converting a hex-digit string into a number. - * These are standardized not be the language, per-say, but instead by the specific standard (such as hexidecimal). - * - * The NULL ASCII string can be represented by the integer 0; however, given that these are all NULL-terminated strings the NULL character is represented with a NULL termination as well. - * The NULL ASCII string therefore has two NULLs, first the NULL represents the NULL and the second represents the NULL termination. - * - * @todo provide extended ASCII-characters. - */ -#ifndef _di_string_ascii_s_ - #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_static_t f_string_ascii_0_s; - extern const f_string_static_t f_string_ascii_1_s; - extern const f_string_static_t f_string_ascii_2_s; - extern const f_string_static_t f_string_ascii_3_s; - extern const f_string_static_t f_string_ascii_4_s; - extern const f_string_static_t f_string_ascii_5_s; - extern const f_string_static_t f_string_ascii_6_s; - extern const f_string_static_t f_string_ascii_7_s; - extern const f_string_static_t f_string_ascii_8_s; - extern const f_string_static_t f_string_ascii_9_s; - - extern const f_string_static_t f_string_ascii_a_s; - extern const f_string_static_t f_string_ascii_b_s; - extern const f_string_static_t f_string_ascii_c_s; - extern const f_string_static_t f_string_ascii_d_s; - extern const f_string_static_t f_string_ascii_e_s; - extern const f_string_static_t f_string_ascii_f_s; - extern const f_string_static_t f_string_ascii_g_s; - extern const f_string_static_t f_string_ascii_h_s; - extern const f_string_static_t f_string_ascii_i_s; - extern const f_string_static_t f_string_ascii_j_s; - extern const f_string_static_t f_string_ascii_k_s; - extern const f_string_static_t f_string_ascii_l_s; - extern const f_string_static_t f_string_ascii_m_s; - extern const f_string_static_t f_string_ascii_n_s; - extern const f_string_static_t f_string_ascii_o_s; - extern const f_string_static_t f_string_ascii_p_s; - extern const f_string_static_t f_string_ascii_q_s; - extern const f_string_static_t f_string_ascii_r_s; - extern const f_string_static_t f_string_ascii_s_s; - extern const f_string_static_t f_string_ascii_t_s; - extern const f_string_static_t f_string_ascii_u_s; - extern const f_string_static_t f_string_ascii_v_s; - extern const f_string_static_t f_string_ascii_w_s; - extern const f_string_static_t f_string_ascii_x_s; - extern const f_string_static_t f_string_ascii_y_s; - extern const f_string_static_t f_string_ascii_z_s; - - extern const f_string_static_t f_string_ascii_A_s; - extern const f_string_static_t f_string_ascii_B_s; - extern const f_string_static_t f_string_ascii_C_s; - extern const f_string_static_t f_string_ascii_D_s; - extern const f_string_static_t f_string_ascii_E_s; - extern const f_string_static_t f_string_ascii_F_s; - extern const f_string_static_t f_string_ascii_G_s; - extern const f_string_static_t f_string_ascii_H_s; - extern const f_string_static_t f_string_ascii_I_s; - extern const f_string_static_t f_string_ascii_J_s; - extern const f_string_static_t f_string_ascii_K_s; - extern const f_string_static_t f_string_ascii_L_s; - extern const f_string_static_t f_string_ascii_M_s; - extern const f_string_static_t f_string_ascii_N_s; - extern const f_string_static_t f_string_ascii_O_s; - extern const f_string_static_t f_string_ascii_P_s; - extern const f_string_static_t f_string_ascii_Q_s; - extern const f_string_static_t f_string_ascii_R_s; - extern const f_string_static_t f_string_ascii_S_s; - extern const f_string_static_t f_string_ascii_T_s; - extern const f_string_static_t f_string_ascii_U_s; - extern const f_string_static_t f_string_ascii_V_s; - extern const f_string_static_t f_string_ascii_W_s; - extern const f_string_static_t f_string_ascii_X_s; - extern const f_string_static_t f_string_ascii_Y_s; - extern const f_string_static_t f_string_ascii_Z_s; - - extern const f_string_static_t f_string_ascii_ampersand_s; - extern const f_string_static_t f_string_ascii_asterisk_s; - extern const f_string_static_t f_string_ascii_brace_close_s; - extern const f_string_static_t f_string_ascii_brace_open_s; - extern const f_string_static_t f_string_ascii_bracket_close_s; - extern const f_string_static_t f_string_ascii_bracket_open_s; - extern const f_string_static_t f_string_ascii_caret_s; - extern const f_string_static_t f_string_ascii_comma_s; - extern const f_string_static_t f_string_ascii_colon_s; - extern const f_string_static_t f_string_ascii_colon_semi_s; - extern const f_string_static_t f_string_ascii_dollar_s; - extern const f_string_static_t f_string_ascii_equal_s; - extern const f_string_static_t f_string_ascii_exclamation_s; - extern const f_string_static_t f_string_ascii_grave_s; - extern const f_string_static_t f_string_ascii_mark_question_s; - extern const f_string_static_t f_string_ascii_minus_s; - extern const f_string_static_t f_string_ascii_parenthesis_open_s; - extern const f_string_static_t f_string_ascii_parenthesis_close_s; - extern const f_string_static_t f_string_ascii_percent_s; - extern const f_string_static_t f_string_ascii_period_s; - extern const f_string_static_t f_string_ascii_pipe_s; - extern const f_string_static_t f_string_ascii_plus_s; - extern const f_string_static_t f_string_ascii_pound_s; - extern const f_string_static_t f_string_ascii_quote_double_s; - extern const f_string_static_t f_string_ascii_quote_single_s; - extern const f_string_static_t f_string_ascii_sign_at_s; - extern const f_string_static_t f_string_ascii_sign_greater_than_s; - extern const f_string_static_t f_string_ascii_sign_less_than_s; - extern const f_string_static_t f_string_ascii_slash_forward_s; - extern const f_string_static_t f_string_ascii_slash_backward_s; - extern const f_string_static_t f_string_ascii_tilde_s; - extern const f_string_static_t f_string_ascii_underscore_s; - - extern const f_string_static_t f_string_ascii_acknowledge_s; - extern const f_string_static_t f_string_ascii_acknowledge_negative_s; - extern const f_string_static_t f_string_ascii_bell_s; - extern const f_string_static_t f_string_ascii_cancel_s; - extern const f_string_static_t f_string_ascii_data_link_escape_s; - extern const f_string_static_t f_string_ascii_device_control_one_s; - extern const f_string_static_t f_string_ascii_device_control_two_s; - extern const f_string_static_t f_string_ascii_device_control_three_s; - extern const f_string_static_t f_string_ascii_device_control_four_s; - extern const f_string_static_t f_string_ascii_enquiry_s; - extern const f_string_static_t f_string_ascii_escape_s; - extern const f_string_static_t f_string_ascii_feed_form_s; - extern const f_string_static_t f_string_ascii_feed_line_s; - extern const f_string_static_t f_string_ascii_header_start_s; - extern const f_string_static_t f_string_ascii_medium_stop_s; - extern const f_string_static_t f_string_ascii_null_s; - extern const f_string_static_t f_string_ascii_return_carriage_s; - extern const f_string_static_t f_string_ascii_separator_file_s; - extern const f_string_static_t f_string_ascii_separator_group_s; - extern const f_string_static_t f_string_ascii_separator_record_s; - extern const f_string_static_t f_string_ascii_separator_unit_s; - extern const f_string_static_t f_string_ascii_shift_in_s; - extern const f_string_static_t f_string_ascii_shift_out_s; - extern const f_string_static_t f_string_ascii_space_s; - extern const f_string_static_t f_string_ascii_space_back_s; - extern const f_string_static_t f_string_ascii_substitute_s; - extern const f_string_static_t f_string_ascii_synchronous_idle_s; - extern const f_string_static_t f_string_ascii_tab_horizontal_s; - extern const f_string_static_t f_string_ascii_tab_vertical_s; - extern const f_string_static_t f_string_ascii_text_start_s; - extern const f_string_static_t f_string_ascii_text_stop_s; - extern const f_string_static_t f_string_ascii_transmission_stop_s; - extern const f_string_static_t f_string_ascii_transmission_block_end_s; -#endif // _di_string_ascii_s_ - -/** - * Define the end of line character. - * FLL forbids '\r' and '\r\n' as end of line characters, \r will be silently ignored. - */ -#ifndef _di_f_string_eol_s_ - #define f_string_eol_s f_string_ascii_feed_line_s - #define F_string_eol_s F_string_ascii_feed_line_s - - #define F_string_eol_s_length 1 -#endif // _di_f_string_eol_s_ - -/** - * Provide a character to represent a single basic space. - * - * This is generally intended to be an ASCII space character and should be effectively the same as F_string_ascii_space_s. - */ -#ifndef _di_f_string_space_s_ - #define F_string_space_s F_string_ascii_space_s - #define F_string_space_s_length F_string_ascii_space_s_length - - #define f_string_space_s f_string_ascii_space_s -#endif // _di_f_string_space_s_ - -/** * Resize the dynamic string. * * @param length diff --git a/level_0/f_string/c/string/static.c b/level_0/f_string/c/string/static.c index e69de29..b2ebfee 100644 --- a/level_0/f_string/c/string/static.c +++ b/level_0/f_string/c/string/static.c @@ -0,0 +1,151 @@ +#include "../string.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_f_string_empty_s_ + const f_string_static_t f_string_empty_s = macro_f_string_static_t_initialize(F_string_empty_s, 0, F_string_empty_s_length); +#endif // _di_f_string_empty_s_ + +#ifndef _di_f_string_null_s_ + const f_string_static_t f_string_null_s = macro_f_string_static_t_initialize(F_string_null_s, 0, F_string_null_s_length); +#endif // _di_f_string_null_s_ + +#ifndef _di_string_ascii_s_ + const f_string_static_t f_string_ascii_0_s = macro_f_string_static_t_initialize(F_string_ascii_0_s, 0, F_string_ascii_0_s_length); + const f_string_static_t f_string_ascii_1_s = macro_f_string_static_t_initialize(F_string_ascii_1_s, 0, F_string_ascii_1_s_length); + const f_string_static_t f_string_ascii_2_s = macro_f_string_static_t_initialize(F_string_ascii_2_s, 0, F_string_ascii_2_s_length); + const f_string_static_t f_string_ascii_3_s = macro_f_string_static_t_initialize(F_string_ascii_3_s, 0, F_string_ascii_3_s_length); + const f_string_static_t f_string_ascii_4_s = macro_f_string_static_t_initialize(F_string_ascii_4_s, 0, F_string_ascii_4_s_length); + const f_string_static_t f_string_ascii_5_s = macro_f_string_static_t_initialize(F_string_ascii_5_s, 0, F_string_ascii_5_s_length); + const f_string_static_t f_string_ascii_6_s = macro_f_string_static_t_initialize(F_string_ascii_6_s, 0, F_string_ascii_6_s_length); + const f_string_static_t f_string_ascii_7_s = macro_f_string_static_t_initialize(F_string_ascii_7_s, 0, F_string_ascii_7_s_length); + const f_string_static_t f_string_ascii_8_s = macro_f_string_static_t_initialize(F_string_ascii_8_s, 0, F_string_ascii_8_s_length); + const f_string_static_t f_string_ascii_9_s = macro_f_string_static_t_initialize(F_string_ascii_9_s, 0, F_string_ascii_9_s_length); + + const f_string_static_t f_string_ascii_a_s = macro_f_string_static_t_initialize(F_string_ascii_a_s, 0, F_string_ascii_a_s_length); + const f_string_static_t f_string_ascii_b_s = macro_f_string_static_t_initialize(F_string_ascii_b_s, 0, F_string_ascii_b_s_length); + const f_string_static_t f_string_ascii_c_s = macro_f_string_static_t_initialize(F_string_ascii_c_s, 0, F_string_ascii_c_s_length); + const f_string_static_t f_string_ascii_d_s = macro_f_string_static_t_initialize(F_string_ascii_d_s, 0, F_string_ascii_d_s_length); + const f_string_static_t f_string_ascii_e_s = macro_f_string_static_t_initialize(F_string_ascii_e_s, 0, F_string_ascii_e_s_length); + const f_string_static_t f_string_ascii_f_s = macro_f_string_static_t_initialize(F_string_ascii_f_s, 0, F_string_ascii_f_s_length); + const f_string_static_t f_string_ascii_g_s = macro_f_string_static_t_initialize(F_string_ascii_g_s, 0, F_string_ascii_g_s_length); + const f_string_static_t f_string_ascii_h_s = macro_f_string_static_t_initialize(F_string_ascii_h_s, 0, F_string_ascii_h_s_length); + const f_string_static_t f_string_ascii_i_s = macro_f_string_static_t_initialize(F_string_ascii_i_s, 0, F_string_ascii_i_s_length); + const f_string_static_t f_string_ascii_j_s = macro_f_string_static_t_initialize(F_string_ascii_j_s, 0, F_string_ascii_j_s_length); + const f_string_static_t f_string_ascii_k_s = macro_f_string_static_t_initialize(F_string_ascii_k_s, 0, F_string_ascii_k_s_length); + const f_string_static_t f_string_ascii_l_s = macro_f_string_static_t_initialize(F_string_ascii_l_s, 0, F_string_ascii_l_s_length); + const f_string_static_t f_string_ascii_m_s = macro_f_string_static_t_initialize(F_string_ascii_m_s, 0, F_string_ascii_m_s_length); + const f_string_static_t f_string_ascii_n_s = macro_f_string_static_t_initialize(F_string_ascii_n_s, 0, F_string_ascii_n_s_length); + const f_string_static_t f_string_ascii_o_s = macro_f_string_static_t_initialize(F_string_ascii_o_s, 0, F_string_ascii_o_s_length); + const f_string_static_t f_string_ascii_p_s = macro_f_string_static_t_initialize(F_string_ascii_p_s, 0, F_string_ascii_p_s_length); + const f_string_static_t f_string_ascii_q_s = macro_f_string_static_t_initialize(F_string_ascii_q_s, 0, F_string_ascii_q_s_length); + const f_string_static_t f_string_ascii_r_s = macro_f_string_static_t_initialize(F_string_ascii_r_s, 0, F_string_ascii_r_s_length); + const f_string_static_t f_string_ascii_s_s = macro_f_string_static_t_initialize(F_string_ascii_s_s, 0, F_string_ascii_s_s_length); + const f_string_static_t f_string_ascii_t_s = macro_f_string_static_t_initialize(F_string_ascii_t_s, 0, F_string_ascii_t_s_length); + const f_string_static_t f_string_ascii_u_s = macro_f_string_static_t_initialize(F_string_ascii_u_s, 0, F_string_ascii_u_s_length); + const f_string_static_t f_string_ascii_v_s = macro_f_string_static_t_initialize(F_string_ascii_v_s, 0, F_string_ascii_v_s_length); + const f_string_static_t f_string_ascii_w_s = macro_f_string_static_t_initialize(F_string_ascii_w_s, 0, F_string_ascii_w_s_length); + const f_string_static_t f_string_ascii_x_s = macro_f_string_static_t_initialize(F_string_ascii_x_s, 0, F_string_ascii_x_s_length); + const f_string_static_t f_string_ascii_y_s = macro_f_string_static_t_initialize(F_string_ascii_y_s, 0, F_string_ascii_y_s_length); + const f_string_static_t f_string_ascii_z_s = macro_f_string_static_t_initialize(F_string_ascii_z_s, 0, F_string_ascii_z_s_length); + + const f_string_static_t f_string_ascii_A_s = macro_f_string_static_t_initialize(F_string_ascii_A_s, 0, F_string_ascii_A_s_length); + const f_string_static_t f_string_ascii_B_s = macro_f_string_static_t_initialize(F_string_ascii_B_s, 0, F_string_ascii_B_s_length); + const f_string_static_t f_string_ascii_C_s = macro_f_string_static_t_initialize(F_string_ascii_C_s, 0, F_string_ascii_C_s_length); + const f_string_static_t f_string_ascii_D_s = macro_f_string_static_t_initialize(F_string_ascii_D_s, 0, F_string_ascii_D_s_length); + const f_string_static_t f_string_ascii_E_s = macro_f_string_static_t_initialize(F_string_ascii_E_s, 0, F_string_ascii_E_s_length); + const f_string_static_t f_string_ascii_F_s = macro_f_string_static_t_initialize(F_string_ascii_F_s, 0, F_string_ascii_F_s_length); + const f_string_static_t f_string_ascii_G_s = macro_f_string_static_t_initialize(F_string_ascii_G_s, 0, F_string_ascii_G_s_length); + const f_string_static_t f_string_ascii_H_s = macro_f_string_static_t_initialize(F_string_ascii_H_s, 0, F_string_ascii_H_s_length); + const f_string_static_t f_string_ascii_I_s = macro_f_string_static_t_initialize(F_string_ascii_I_s, 0, F_string_ascii_I_s_length); + const f_string_static_t f_string_ascii_J_s = macro_f_string_static_t_initialize(F_string_ascii_J_s, 0, F_string_ascii_J_s_length); + const f_string_static_t f_string_ascii_K_s = macro_f_string_static_t_initialize(F_string_ascii_K_s, 0, F_string_ascii_K_s_length); + const f_string_static_t f_string_ascii_L_s = macro_f_string_static_t_initialize(F_string_ascii_L_s, 0, F_string_ascii_L_s_length); + const f_string_static_t f_string_ascii_M_s = macro_f_string_static_t_initialize(F_string_ascii_M_s, 0, F_string_ascii_M_s_length); + const f_string_static_t f_string_ascii_N_s = macro_f_string_static_t_initialize(F_string_ascii_N_s, 0, F_string_ascii_N_s_length); + const f_string_static_t f_string_ascii_O_s = macro_f_string_static_t_initialize(F_string_ascii_O_s, 0, F_string_ascii_O_s_length); + const f_string_static_t f_string_ascii_P_s = macro_f_string_static_t_initialize(F_string_ascii_P_s, 0, F_string_ascii_P_s_length); + const f_string_static_t f_string_ascii_Q_s = macro_f_string_static_t_initialize(F_string_ascii_Q_s, 0, F_string_ascii_Q_s_length); + const f_string_static_t f_string_ascii_R_s = macro_f_string_static_t_initialize(F_string_ascii_R_s, 0, F_string_ascii_R_s_length); + const f_string_static_t f_string_ascii_S_s = macro_f_string_static_t_initialize(F_string_ascii_S_s, 0, F_string_ascii_S_s_length); + const f_string_static_t f_string_ascii_T_s = macro_f_string_static_t_initialize(F_string_ascii_T_s, 0, F_string_ascii_T_s_length); + const f_string_static_t f_string_ascii_U_s = macro_f_string_static_t_initialize(F_string_ascii_U_s, 0, F_string_ascii_U_s_length); + const f_string_static_t f_string_ascii_V_s = macro_f_string_static_t_initialize(F_string_ascii_V_s, 0, F_string_ascii_V_s_length); + const f_string_static_t f_string_ascii_W_s = macro_f_string_static_t_initialize(F_string_ascii_W_s, 0, F_string_ascii_W_s_length); + const f_string_static_t f_string_ascii_X_s = macro_f_string_static_t_initialize(F_string_ascii_X_s, 0, F_string_ascii_X_s_length); + const f_string_static_t f_string_ascii_Y_s = macro_f_string_static_t_initialize(F_string_ascii_Y_s, 0, F_string_ascii_Y_s_length); + const f_string_static_t f_string_ascii_Z_s = macro_f_string_static_t_initialize(F_string_ascii_Z_s, 0, F_string_ascii_Z_s_length); + + const f_string_static_t f_string_ascii_ampersand_s = macro_f_string_static_t_initialize(F_string_ascii_ampersand_s, 0, F_string_ascii_ampersand_s_length); + const f_string_static_t f_string_ascii_asterisk_s = macro_f_string_static_t_initialize(F_string_ascii_asterisk_s, 0, F_string_ascii_asterisk_s_length); + const f_string_static_t f_string_ascii_brace_close_s = macro_f_string_static_t_initialize(F_string_ascii_brace_close_s, 0, F_string_ascii_brace_close_s_length); + const f_string_static_t f_string_ascii_brace_open_s = macro_f_string_static_t_initialize(F_string_ascii_brace_open_s, 0, F_string_ascii_brace_open_s_length); + const f_string_static_t f_string_ascii_bracket_close_s = macro_f_string_static_t_initialize(F_string_ascii_bracket_close_s, 0, F_string_ascii_bracket_close_s_length); + const f_string_static_t f_string_ascii_bracket_open_s = macro_f_string_static_t_initialize(F_string_ascii_bracket_open_s, 0, F_string_ascii_bracket_open_s_length); + const f_string_static_t f_string_ascii_caret_s = macro_f_string_static_t_initialize(F_string_ascii_caret_s, 0, F_string_ascii_caret_s_length); + const f_string_static_t f_string_ascii_comma_s = macro_f_string_static_t_initialize(F_string_ascii_comma_s, 0, F_string_ascii_comma_s_length); + const f_string_static_t f_string_ascii_colon_s = macro_f_string_static_t_initialize(F_string_ascii_colon_s, 0, F_string_ascii_colon_s_length); + const f_string_static_t f_string_ascii_colon_semi_s = macro_f_string_static_t_initialize(F_string_ascii_colon_semi_s, 0, F_string_ascii_colon_semi_s_length); + const f_string_static_t f_string_ascii_dollar_s = macro_f_string_static_t_initialize(F_string_ascii_dollar_s, 0, F_string_ascii_dollar_s_length); + const f_string_static_t f_string_ascii_equal_s = macro_f_string_static_t_initialize(F_string_ascii_equal_s, 0, F_string_ascii_equal_s_length); + const f_string_static_t f_string_ascii_exclamation_s = macro_f_string_static_t_initialize(F_string_ascii_exclamation_s, 0, F_string_ascii_exclamation_s_length); + const f_string_static_t f_string_ascii_grave_s = macro_f_string_static_t_initialize(F_string_ascii_grave_s, 0, F_string_ascii_grave_s_length); + const f_string_static_t f_string_ascii_mark_question_s = macro_f_string_static_t_initialize(F_string_ascii_mark_question_s, 0, F_string_ascii_mark_question_s_length); + const f_string_static_t f_string_ascii_minus_s = macro_f_string_static_t_initialize(F_string_ascii_minus_s, 0, F_string_ascii_minus_s_length); + const f_string_static_t f_string_ascii_parenthesis_open_s = macro_f_string_static_t_initialize(F_string_ascii_parenthesis_open_s, 0, F_string_ascii_parenthesis_open_s_length); + const f_string_static_t f_string_ascii_parenthesis_close_s = macro_f_string_static_t_initialize(F_string_ascii_parenthesis_close_s, 0, F_string_ascii_parenthesis_close_s_length); + const f_string_static_t f_string_ascii_percent_s = macro_f_string_static_t_initialize(F_string_ascii_percent_s, 0, F_string_ascii_percent_s_length); + const f_string_static_t f_string_ascii_period_s = macro_f_string_static_t_initialize(F_string_ascii_period_s, 0, F_string_ascii_period_s_length); + const f_string_static_t f_string_ascii_pipe_s = macro_f_string_static_t_initialize(F_string_ascii_pipe_s, 0, F_string_ascii_pipe_s_length); + const f_string_static_t f_string_ascii_plus_s = macro_f_string_static_t_initialize(F_string_ascii_plus_s, 0, F_string_ascii_plus_s_length); + const f_string_static_t f_string_ascii_pound_s = macro_f_string_static_t_initialize(F_string_ascii_pound_s, 0, F_string_ascii_pound_s_length); + const f_string_static_t f_string_ascii_quote_double_s = macro_f_string_static_t_initialize(F_string_ascii_quote_double_s, 0, F_string_ascii_quote_double_s_length); + const f_string_static_t f_string_ascii_quote_single_s = macro_f_string_static_t_initialize(F_string_ascii_quote_single_s, 0, F_string_ascii_quote_single_s_length); + const f_string_static_t f_string_ascii_sign_at_s = macro_f_string_static_t_initialize(F_string_ascii_sign_at_s, 0, F_string_ascii_sign_at_s_length); + const f_string_static_t f_string_ascii_sign_greater_than_s = macro_f_string_static_t_initialize(F_string_ascii_sign_greater_than_s, 0, F_string_ascii_sign_greater_than_s_length); + const f_string_static_t f_string_ascii_sign_less_than_s = macro_f_string_static_t_initialize(F_string_ascii_sign_less_than_s, 0, F_string_ascii_sign_less_than_s_length); + const f_string_static_t f_string_ascii_slash_forward_s = macro_f_string_static_t_initialize(F_string_ascii_slash_forward_s, 0, F_string_ascii_slash_forward_s_length); + const f_string_static_t f_string_ascii_slash_backward_s = macro_f_string_static_t_initialize(F_string_ascii_slash_backward_s, 0, F_string_ascii_slash_backward_s_length); + const f_string_static_t f_string_ascii_tilde_s = macro_f_string_static_t_initialize(F_string_ascii_tilde_s, 0, F_string_ascii_tilde_s_length); + const f_string_static_t f_string_ascii_underscore_s = macro_f_string_static_t_initialize(F_string_ascii_underscore_s, 0, F_string_ascii_underscore_s_length); + + const f_string_static_t f_string_ascii_acknowledge_s = macro_f_string_static_t_initialize(F_string_ascii_acknowledge_s, 0, F_string_ascii_acknowledge_s_length); + const f_string_static_t f_string_ascii_acknowledge_negative_s = macro_f_string_static_t_initialize(F_string_ascii_acknowledge_negative_s, 0, F_string_ascii_acknowledge_negative_s_length); + const f_string_static_t f_string_ascii_bell_s = macro_f_string_static_t_initialize(F_string_ascii_bell_s, 0, F_string_ascii_bell_s_length); + const f_string_static_t f_string_ascii_cancel_s = macro_f_string_static_t_initialize(F_string_ascii_cancel_s, 0, F_string_ascii_cancel_s_length); + const f_string_static_t f_string_ascii_data_link_escape_s = macro_f_string_static_t_initialize(F_string_ascii_data_link_escape_s, 0, F_string_ascii_data_link_escape_s_length); + const f_string_static_t f_string_ascii_device_control_one_s = macro_f_string_static_t_initialize(F_string_ascii_device_control_one_s, 0, F_string_ascii_device_control_one_s_length); + const f_string_static_t f_string_ascii_device_control_two_s = macro_f_string_static_t_initialize(F_string_ascii_device_control_two_s, 0, F_string_ascii_device_control_two_s_length); + const f_string_static_t f_string_ascii_device_control_three_s = macro_f_string_static_t_initialize(F_string_ascii_device_control_three_s, 0, F_string_ascii_device_control_three_s_length); + const f_string_static_t f_string_ascii_device_control_four_s = macro_f_string_static_t_initialize(F_string_ascii_device_control_four_s, 0, F_string_ascii_device_control_four_s_length); + const f_string_static_t f_string_ascii_enquiry_s = macro_f_string_static_t_initialize(F_string_ascii_enquiry_s, 0, F_string_ascii_enquiry_s_length); + const f_string_static_t f_string_ascii_escape_s = macro_f_string_static_t_initialize(F_string_ascii_escape_s, 0, F_string_ascii_escape_s_length); + const f_string_static_t f_string_ascii_feed_form_s = macro_f_string_static_t_initialize(F_string_ascii_feed_form_s, 0, F_string_ascii_feed_form_s_length); + const f_string_static_t f_string_ascii_feed_line_s = macro_f_string_static_t_initialize(F_string_ascii_feed_line_s, 0, F_string_ascii_feed_line_s_length); + const f_string_static_t f_string_ascii_header_start_s = macro_f_string_static_t_initialize(F_string_ascii_header_start_s, 0, F_string_ascii_header_start_s_length); + const f_string_static_t f_string_ascii_medium_stop_s = macro_f_string_static_t_initialize(F_string_ascii_medium_stop_s, 0, F_string_ascii_medium_stop_s_length); + const f_string_static_t f_string_ascii_null_s = macro_f_string_static_t_initialize(F_string_ascii_null_s, 0, F_string_ascii_null_s_length); + const f_string_static_t f_string_ascii_return_carriage_s = macro_f_string_static_t_initialize(F_string_ascii_return_carriage_s, 0, F_string_ascii_return_carriage_s_length); + const f_string_static_t f_string_ascii_separator_file_s = macro_f_string_static_t_initialize(F_string_ascii_separator_file_s, 0, F_string_ascii_separator_file_s_length); + const f_string_static_t f_string_ascii_separator_group_s = macro_f_string_static_t_initialize(F_string_ascii_separator_group_s, 0, F_string_ascii_separator_group_s_length); + const f_string_static_t f_string_ascii_separator_record_s = macro_f_string_static_t_initialize(F_string_ascii_separator_record_s, 0, F_string_ascii_separator_record_s_length); + const f_string_static_t f_string_ascii_separator_unit_s = macro_f_string_static_t_initialize(F_string_ascii_separator_unit_s, 0, F_string_ascii_separator_unit_s_length); + const f_string_static_t f_string_ascii_shift_in_s = macro_f_string_static_t_initialize(F_string_ascii_shift_in_s, 0, F_string_ascii_shift_in_s_length); + const f_string_static_t f_string_ascii_shift_out_s = macro_f_string_static_t_initialize(F_string_ascii_shift_out_s, 0, F_string_ascii_shift_out_s_length); + const f_string_static_t f_string_ascii_space_s = macro_f_string_static_t_initialize(F_string_ascii_space_s, 0, F_string_ascii_space_s_length); + const f_string_static_t f_string_ascii_space_back_s = macro_f_string_static_t_initialize(F_string_ascii_space_back_s, 0, F_string_ascii_space_back_s_length); + const f_string_static_t f_string_ascii_substitute_s = macro_f_string_static_t_initialize(F_string_ascii_substitute_s, 0, F_string_ascii_substitute_s_length); + const f_string_static_t f_string_ascii_synchronous_idle_s = macro_f_string_static_t_initialize(F_string_ascii_synchronous_idle_s, 0, F_string_ascii_synchronous_idle_s_length); + const f_string_static_t f_string_ascii_tab_horizontal_s = macro_f_string_static_t_initialize(F_string_ascii_tab_horizontal_s, 0, F_string_ascii_tab_horizontal_s_length); + const f_string_static_t f_string_ascii_tab_vertical_s = macro_f_string_static_t_initialize(F_string_ascii_tab_vertical_s, 0, F_string_ascii_tab_vertical_s_length); + const f_string_static_t f_string_ascii_text_start_s = macro_f_string_static_t_initialize(F_string_ascii_text_start_s, 0, F_string_ascii_text_start_s_length); + const f_string_static_t f_string_ascii_text_stop_s = macro_f_string_static_t_initialize(F_string_ascii_text_stop_s, 0, F_string_ascii_text_stop_s_length); + const f_string_static_t f_string_ascii_transmission_stop_s = macro_f_string_static_t_initialize(F_string_ascii_transmission_stop_s, 0, F_string_ascii_transmission_stop_s_length); + const f_string_static_t f_string_ascii_transmission_block_end_s = macro_f_string_static_t_initialize(F_string_ascii_transmission_block_end_s, 0, F_string_ascii_transmission_block_end_s_length); +#endif // _di_string_ascii_s_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_string/c/string/static.h b/level_0/f_string/c/string/static.h index e69de29..ea1657c 100644 --- a/level_0/f_string/c/string/static.h +++ b/level_0/f_string/c/string/static.h @@ -0,0 +1,569 @@ +/** + * FLL - Level 0 + * + * Project: String + * API Version: 0.5 + * Licenses: lgpl-2.1-or-later + * + * Defines static string data. + * + * This is auto-included by string.h and should not need to be explicitly included. + */ +#ifndef _F_string_static_h +#define _F_string_static_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * A string that is analogous to f_string_dynamic_t but intended for static-only uses. + * + * The f_string_static_t type should never be directly allocated or deallocated. + * + * A special macro_f_string_static_t_initialize2() is provided for the special purpose of easily initialize a static string with an identical used and size. + * A special macro_f_string_static_t_initialize() is provided for the special purpose of easily initialize a static string. + * + * string: The string. + * size: Total amount of space available. + * used: Total number of space used. + */ +#ifndef _di_f_string_static_t_ + typedef struct { + f_string_t string; + + f_array_length_t size; + f_array_length_t used; + } f_string_static_t; + + #define f_string_static_t_initialize { 0, 0, 0 } + + #define macro_f_string_static_t_clear(string_static) \ + string_static.string = 0; \ + string_static.size = 0; \ + string_static.used = 0; + + #define macro_f_string_static_t_initialize(string, size, used) { string, size, used } + #define macro_f_string_static_t_initialize2(string, length) { string, length, length } +#endif // _di_f_string_static_t_ + +/** + * An array of static strings. + * + * array: The array of static strings. + * size: Total amount of space available. + * used: Total number of space used. + */ +#ifndef _di_f_string_statics_t_ + typedef struct { + f_string_static_t *array; + + f_array_length_t size; + f_array_length_t used; + } f_string_statics_t; + + #define f_string_statics_t_initialize { 0, 0, 0 } + + #define macro_f_string_statics_t_clear(statics) \ + statics.array = 0; \ + statics.size = 0; \ + statics.used = 0; +#endif // _di_f_string_statics_t_ + +/** + * An array of static strings. + * + * array: The array of static strings. + * size: Total amount of space available. + * used: Total number of space used. + */ +#ifndef _di_f_string_staticss_t_ + typedef struct { + f_string_statics_t *array; + + f_array_length_t size; + f_array_length_t used; + } f_string_staticss_t; + + #define f_string_staticss_t_initialize { 0, 0, 0 } + + #define macro_f_string_staticss_t_clear(staticss) \ + staticss.array = 0; \ + staticss.size = 0; \ + staticss.used = 0; +#endif // _di_f_string_staticss_t_ + +/** + * Provide a static empty string. + * + * This is intended to represent an empty string. + */ +#ifndef _di_f_string_empty_s_ + #define F_string_empty_s "" + #define F_string_empty_s_length 0 + + extern const f_string_static_t f_string_empty_s; +#endif // _di_f_string_empty_s_ + +/** + * Provide a static string focusing on the NULL character. + * + * This is different from f_string_empty_s in that it's used is set to 1 to represent the NULL character. + */ +#ifndef _di_f_string_null_s_ + #define F_string_null_s "" + #define F_string_null_s_length 1 + + extern const f_string_static_t f_string_null_s; +#endif // _di_f_string_null_s_ + +/** + * Provide a character to use as a placeholder within some string. + * + * This is generally the NULL character and should be effectively the same as f_string_null_s. + */ +#ifndef _di_f_string_placeholder_s_ + #define F_string_placeholder_s F_string_null_s + #define F_string_placeholder_s_length F_string_null_s_length + + #define f_string_placeholder_s f_string_null_s +#endif // _di_f_string_placeholder_s_ + +/** + * Provide a set of ASCII strings. + * + * This is not intended to be exhaustive or language-specific. + * Instead, this is for very common uses such as converting a hex-digit string into a number. + * These are standardized not be the language, per-say, but instead by the specific standard (such as hexidecimal). + * + * The NULL ASCII string can be represented by the integer 0; however, given that these are all NULL-terminated strings the NULL character is represented with a NULL termination as well. + * The NULL ASCII string therefore has two NULLs, first the NULL represents the NULL and the second represents the NULL termination. + * + * @todo provide extended ASCII-characters. + */ +#ifndef _di_string_ascii_s_ + #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_static_t f_string_ascii_0_s; + extern const f_string_static_t f_string_ascii_1_s; + extern const f_string_static_t f_string_ascii_2_s; + extern const f_string_static_t f_string_ascii_3_s; + extern const f_string_static_t f_string_ascii_4_s; + extern const f_string_static_t f_string_ascii_5_s; + extern const f_string_static_t f_string_ascii_6_s; + extern const f_string_static_t f_string_ascii_7_s; + extern const f_string_static_t f_string_ascii_8_s; + extern const f_string_static_t f_string_ascii_9_s; + + extern const f_string_static_t f_string_ascii_a_s; + extern const f_string_static_t f_string_ascii_b_s; + extern const f_string_static_t f_string_ascii_c_s; + extern const f_string_static_t f_string_ascii_d_s; + extern const f_string_static_t f_string_ascii_e_s; + extern const f_string_static_t f_string_ascii_f_s; + extern const f_string_static_t f_string_ascii_g_s; + extern const f_string_static_t f_string_ascii_h_s; + extern const f_string_static_t f_string_ascii_i_s; + extern const f_string_static_t f_string_ascii_j_s; + extern const f_string_static_t f_string_ascii_k_s; + extern const f_string_static_t f_string_ascii_l_s; + extern const f_string_static_t f_string_ascii_m_s; + extern const f_string_static_t f_string_ascii_n_s; + extern const f_string_static_t f_string_ascii_o_s; + extern const f_string_static_t f_string_ascii_p_s; + extern const f_string_static_t f_string_ascii_q_s; + extern const f_string_static_t f_string_ascii_r_s; + extern const f_string_static_t f_string_ascii_s_s; + extern const f_string_static_t f_string_ascii_t_s; + extern const f_string_static_t f_string_ascii_u_s; + extern const f_string_static_t f_string_ascii_v_s; + extern const f_string_static_t f_string_ascii_w_s; + extern const f_string_static_t f_string_ascii_x_s; + extern const f_string_static_t f_string_ascii_y_s; + extern const f_string_static_t f_string_ascii_z_s; + + extern const f_string_static_t f_string_ascii_A_s; + extern const f_string_static_t f_string_ascii_B_s; + extern const f_string_static_t f_string_ascii_C_s; + extern const f_string_static_t f_string_ascii_D_s; + extern const f_string_static_t f_string_ascii_E_s; + extern const f_string_static_t f_string_ascii_F_s; + extern const f_string_static_t f_string_ascii_G_s; + extern const f_string_static_t f_string_ascii_H_s; + extern const f_string_static_t f_string_ascii_I_s; + extern const f_string_static_t f_string_ascii_J_s; + extern const f_string_static_t f_string_ascii_K_s; + extern const f_string_static_t f_string_ascii_L_s; + extern const f_string_static_t f_string_ascii_M_s; + extern const f_string_static_t f_string_ascii_N_s; + extern const f_string_static_t f_string_ascii_O_s; + extern const f_string_static_t f_string_ascii_P_s; + extern const f_string_static_t f_string_ascii_Q_s; + extern const f_string_static_t f_string_ascii_R_s; + extern const f_string_static_t f_string_ascii_S_s; + extern const f_string_static_t f_string_ascii_T_s; + extern const f_string_static_t f_string_ascii_U_s; + extern const f_string_static_t f_string_ascii_V_s; + extern const f_string_static_t f_string_ascii_W_s; + extern const f_string_static_t f_string_ascii_X_s; + extern const f_string_static_t f_string_ascii_Y_s; + extern const f_string_static_t f_string_ascii_Z_s; + + extern const f_string_static_t f_string_ascii_ampersand_s; + extern const f_string_static_t f_string_ascii_asterisk_s; + extern const f_string_static_t f_string_ascii_brace_close_s; + extern const f_string_static_t f_string_ascii_brace_open_s; + extern const f_string_static_t f_string_ascii_bracket_close_s; + extern const f_string_static_t f_string_ascii_bracket_open_s; + extern const f_string_static_t f_string_ascii_caret_s; + extern const f_string_static_t f_string_ascii_comma_s; + extern const f_string_static_t f_string_ascii_colon_s; + extern const f_string_static_t f_string_ascii_colon_semi_s; + extern const f_string_static_t f_string_ascii_dollar_s; + extern const f_string_static_t f_string_ascii_equal_s; + extern const f_string_static_t f_string_ascii_exclamation_s; + extern const f_string_static_t f_string_ascii_grave_s; + extern const f_string_static_t f_string_ascii_mark_question_s; + extern const f_string_static_t f_string_ascii_minus_s; + extern const f_string_static_t f_string_ascii_parenthesis_open_s; + extern const f_string_static_t f_string_ascii_parenthesis_close_s; + extern const f_string_static_t f_string_ascii_percent_s; + extern const f_string_static_t f_string_ascii_period_s; + extern const f_string_static_t f_string_ascii_pipe_s; + extern const f_string_static_t f_string_ascii_plus_s; + extern const f_string_static_t f_string_ascii_pound_s; + extern const f_string_static_t f_string_ascii_quote_double_s; + extern const f_string_static_t f_string_ascii_quote_single_s; + extern const f_string_static_t f_string_ascii_sign_at_s; + extern const f_string_static_t f_string_ascii_sign_greater_than_s; + extern const f_string_static_t f_string_ascii_sign_less_than_s; + extern const f_string_static_t f_string_ascii_slash_forward_s; + extern const f_string_static_t f_string_ascii_slash_backward_s; + extern const f_string_static_t f_string_ascii_tilde_s; + extern const f_string_static_t f_string_ascii_underscore_s; + + extern const f_string_static_t f_string_ascii_acknowledge_s; + extern const f_string_static_t f_string_ascii_acknowledge_negative_s; + extern const f_string_static_t f_string_ascii_bell_s; + extern const f_string_static_t f_string_ascii_cancel_s; + extern const f_string_static_t f_string_ascii_data_link_escape_s; + extern const f_string_static_t f_string_ascii_device_control_one_s; + extern const f_string_static_t f_string_ascii_device_control_two_s; + extern const f_string_static_t f_string_ascii_device_control_three_s; + extern const f_string_static_t f_string_ascii_device_control_four_s; + extern const f_string_static_t f_string_ascii_enquiry_s; + extern const f_string_static_t f_string_ascii_escape_s; + extern const f_string_static_t f_string_ascii_feed_form_s; + extern const f_string_static_t f_string_ascii_feed_line_s; + extern const f_string_static_t f_string_ascii_header_start_s; + extern const f_string_static_t f_string_ascii_medium_stop_s; + extern const f_string_static_t f_string_ascii_null_s; + extern const f_string_static_t f_string_ascii_return_carriage_s; + extern const f_string_static_t f_string_ascii_separator_file_s; + extern const f_string_static_t f_string_ascii_separator_group_s; + extern const f_string_static_t f_string_ascii_separator_record_s; + extern const f_string_static_t f_string_ascii_separator_unit_s; + extern const f_string_static_t f_string_ascii_shift_in_s; + extern const f_string_static_t f_string_ascii_shift_out_s; + extern const f_string_static_t f_string_ascii_space_s; + extern const f_string_static_t f_string_ascii_space_back_s; + extern const f_string_static_t f_string_ascii_substitute_s; + extern const f_string_static_t f_string_ascii_synchronous_idle_s; + extern const f_string_static_t f_string_ascii_tab_horizontal_s; + extern const f_string_static_t f_string_ascii_tab_vertical_s; + extern const f_string_static_t f_string_ascii_text_start_s; + extern const f_string_static_t f_string_ascii_text_stop_s; + extern const f_string_static_t f_string_ascii_transmission_stop_s; + extern const f_string_static_t f_string_ascii_transmission_block_end_s; +#endif // _di_string_ascii_s_ + +/** + * Define the end of line character. + * FLL forbids '\r' and '\r\n' as end of line characters, \r will be silently ignored. + */ +#ifndef _di_f_string_eol_s_ + #define f_string_eol_s f_string_ascii_feed_line_s + #define F_string_eol_s F_string_ascii_feed_line_s + + #define F_string_eol_s_length 1 +#endif // _di_f_string_eol_s_ + +/** + * Provide a character to represent a single basic space. + * + * This is generally intended to be an ASCII space character and should be effectively the same as F_string_ascii_space_s. + */ +#ifndef _di_f_string_space_s_ + #define F_string_space_s F_string_ascii_space_s + #define F_string_space_s_length F_string_ascii_space_s_length + + #define f_string_space_s f_string_ascii_space_s +#endif // _di_f_string_space_s_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _F_string_static_h diff --git a/level_0/f_string/data/build/settings b/level_0/f_string/data/build/settings index 53bbd2a..15e32af 100644 --- a/level_0/f_string/data/build/settings +++ b/level_0/f_string/data/build/settings @@ -30,7 +30,7 @@ build_objects_library_static build_objects_program build_objects_program_shared build_objects_program_static -build_sources_library string.c private-string.c string/common.c string/dynamic.c string/map.c string/quantity.c string/range.c string/triple.c +build_sources_library string.c private-string.c string/common.c string/dynamic.c string/map.c string/quantity.c string/range.c string/static.c string/triple.c build_sources_library_shared build_sources_library_static build_sources_object @@ -39,7 +39,7 @@ build_sources_object_static build_sources_program build_sources_program_shared build_sources_program_static -build_sources_headers string.h string/common.h string/dynamic.h string/map.h string/quantity.h string/range.h string/triple.h +build_sources_headers string.h string/common.h string/dynamic.h string/map.h string/quantity.h string/range.h string/static.h string/triple.h build_sources_headers_shared build_sources_headers_static build_sources_script