From 580f9e4e610e900829d4181aeee1d5696d8fe160 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 17 Jan 2024 20:55:09 -0600 Subject: [PATCH] Feature: Add double, single, and grave quotes for NULL cases as a common string. Adding an open and close quotes to represent empty, aka NULL, strings in the FSS files is going to be common. Define these as a single string rather than always having two function calls or having each project define these quotes each time. --- level_0/f_fss/c/fss/common.c | 14 +++++++++ level_0/f_fss/c/fss/common.h | 70 ++++++++++++++++++++++++++++---------------- 2 files changed, 58 insertions(+), 26 deletions(-) diff --git a/level_0/f_fss/c/fss/common.c b/level_0/f_fss/c/fss/common.c index eb061c5..648110a 100644 --- a/level_0/f_fss/c/fss/common.c +++ b/level_0/f_fss/c/fss/common.c @@ -4,6 +4,20 @@ extern "C" { #endif +#ifndef _di_f_fss_type_s_ + #ifndef _di_f_fss_quote_double_null_s_ + const f_string_static_t f_fss_quote_double_null_s = macro_f_string_static_t_initialize_1(F_fss_quote_double_null_s, 0, F_fss_string_header_s_length); + #endif // _di_f_fss_quote_double_null_s_s_ + + #ifndef _di_f_fss_quote_grave_null_s_ + const f_string_static_t f_fss_quote_grave_null_s = macro_f_string_static_t_initialize_1(F_fss_quote_grave_null_s, 0, F_fss_string_header_s_length); + #endif // _di_f_fss_quote_grave_null_s_ + + #ifndef _di_f_fss_quote_single_null_s_ + const f_string_static_t f_fss_quote_single_null_s = macro_f_string_static_t_initialize_1(F_fss_quote_single_null_s, 0, F_fss_string_header_s_length); + #endif // _di_f_fss_quote_single_null_s_ +#endif // _di_f_fss_type_s_ + #ifndef _di_f_fss_s_ #ifndef _di_f_fss_header_s_ const f_string_static_t f_fss_header_s = macro_f_string_static_t_initialize_1(F_fss_header_s, 0, F_fss_string_header_s_length); diff --git a/level_0/f_fss/c/fss/common.h b/level_0/f_fss/c/fss/common.h index 21514e4..36f5196 100644 --- a/level_0/f_fss/c/fss/common.h +++ b/level_0/f_fss/c/fss/common.h @@ -20,33 +20,39 @@ extern "C" { * FSS-specific types. */ #ifndef _di_f_fss_type_s_ - #define F_fss_brace_close_s F_string_ascii_brace_close_s - #define F_fss_brace_open_s F_string_ascii_brace_open_s - #define F_fss_colon_s F_string_ascii_colon_s - #define F_fss_minus_s F_string_ascii_minus_s - #define F_fss_f_s F_string_ascii_f_s - #define F_fss_pound_s F_string_ascii_pound_s - #define F_fss_quote_double_s F_string_ascii_quote_double_s - #define F_fss_quote_grave_s F_string_ascii_grave_s - #define F_fss_quote_single_s F_string_ascii_quote_single_s - #define F_fss_s_s F_string_ascii_s_s - #define F_fss_slash_s F_string_ascii_slash_backward_s - #define F_fss_space_s F_string_ascii_space_s - #define F_fss_underscore_s F_string_ascii_underscore_s + #define F_fss_brace_close_s F_string_ascii_brace_close_s + #define F_fss_brace_open_s F_string_ascii_brace_open_s + #define F_fss_colon_s F_string_ascii_colon_s + #define F_fss_minus_s F_string_ascii_minus_s + #define F_fss_f_s F_string_ascii_f_s + #define F_fss_pound_s F_string_ascii_pound_s + #define F_fss_quote_double_s F_string_ascii_quote_double_s + #define F_fss_quote_double_null_s (F_string_ascii_quote_double_s F_string_ascii_quote_double_s) + #define F_fss_quote_grave_s F_string_ascii_grave_s + #define F_fss_quote_grave_null_s (F_string_ascii_grave_s F_string_ascii_grave_s) + #define F_fss_quote_single_s F_string_ascii_quote_single_s + #define F_fss_quote_single_null_s (F_string_ascii_quote_single_s F_string_ascii_quote_single_s) + #define F_fss_s_s F_string_ascii_s_s + #define F_fss_slash_s F_string_ascii_slash_backward_s + #define F_fss_space_s F_string_ascii_space_s + #define F_fss_underscore_s F_string_ascii_underscore_s - #define F_fss_brace_close_s_length F_string_ascii_brace_close_s_length - #define F_fss_brace_open_s_length F_string_ascii_brace_open_s_length - #define F_fss_colon_s_length F_string_ascii_colon_s_length - #define F_fss_minus_s_length F_string_ascii_minus_s_length - #define F_fss_f_s_length F_string_ascii_f_s_length - #define F_fss_pound_s_length F_string_ascii_pound_s_length - #define F_fss_quote_double_s_length F_string_ascii_quote_double_s_length - #define F_fss_quote_grave_s_length F_string_ascii_grave_s_length - #define F_fss_quote_single_s_length F_string_ascii_quote_single_s_length - #define F_fss_s_s_length F_string_ascii_s_s_length - #define F_fss_slash_s_length F_string_ascii_slash_backward_s_length - #define F_fss_space_s_length F_string_ascii_space_s_length - #define F_fss_underscore_s_length F_string_ascii_underscore_s_length + #define F_fss_brace_close_s_length F_string_ascii_brace_close_s_length + #define F_fss_brace_open_s_length F_string_ascii_brace_open_s_length + #define F_fss_colon_s_length F_string_ascii_colon_s_length + #define F_fss_minus_s_length F_string_ascii_minus_s_length + #define F_fss_f_s_length F_string_ascii_f_s_length + #define F_fss_pound_s_length F_string_ascii_pound_s_length + #define F_fss_quote_double_s_length F_string_ascii_quote_double_s_length + #define F_fss_quote_double_null_s_length (F_string_ascii_quote_double_s_length * 2) + #define F_fss_quote_grave_s_length F_string_ascii_grave_s_length + #define F_fss_quote_grave_null_s_length (F_string_ascii_grave_s_length * 2) + #define F_fss_quote_single_s_length F_string_ascii_quote_single_s_length + #define F_fss_quote_single_null_s_length (F_string_ascii_quote_single_s_length * 2) + #define F_fss_s_s_length F_string_ascii_s_s_length + #define F_fss_slash_s_length F_string_ascii_slash_backward_s_length + #define F_fss_space_s_length F_string_ascii_space_s_length + #define F_fss_underscore_s_length F_string_ascii_underscore_s_length #define f_fss_brace_close_s f_string_ascii_brace_close_s #define f_fss_brace_open_s f_string_ascii_brace_open_s @@ -94,6 +100,18 @@ extern "C" { #define f_fss_type_header_part4_s f_fss_s_s #define f_fss_type_header_part5_s f_fss_minus_s #define f_fss_type_header_close_s f_string_eol_s + + #ifndef _di_f_fss_quote_double_null_s_ + extern const f_string_static_t f_fss_quote_double_null_s; + #endif // _di_f_fss_quote_double_null_s_ + + #ifndef _di_f_fss_quote_grave_null_s_s_ + extern const f_string_static_t f_fss_quote_grave_null_s; + #endif // _di_f_fss_quote_grave_null_s_ + + #ifndef _di_f_fss_quote_single_null_s_ + extern const f_string_static_t f_fss_quote_single_null_s; + #endif // _di_f_fss_quote_single_null_s_ #endif // _di_f_fss_type_s_ /** -- 1.8.3.1