]> Kevux Git Server - fll/commitdiff
Feature: Add double, single, and grave quotes for NULL cases as a common string.
authorKevin Day <thekevinday@gmail.com>
Thu, 18 Jan 2024 02:55:09 +0000 (20:55 -0600)
committerKevin Day <thekevinday@gmail.com>
Thu, 18 Jan 2024 02:55:09 +0000 (20:55 -0600)
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
level_0/f_fss/c/fss/common.h

index eb061c542b28f5b26835b7b30dc7b808ec5ebcaf..648110a61553c7a18b9e12d9a89dc7091399dfb1 100644 (file)
@@ -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);
index 21514e4593bb9be60f7e382798c58e6c30caa3f9..36f51969ffe74d936e38f7386faf9be8a267b751 100644 (file)
@@ -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_
 
 /**