From 0d63d8174645d021f64caa73fe03469850b80c7e Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 16 Jan 2022 20:54:59 -0600 Subject: [PATCH] Update: Use F_number_t_size_positive_d for F_string_t_size_d and update #ifdef structural logic. --- level_0/f_string/c/string-common.h | 3 +-- level_0/f_type/c/type.h | 10 +++------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/level_0/f_string/c/string-common.h b/level_0/f_string/c/string-common.h index 479bc0a..5fef2fe 100644 --- a/level_0/f_string/c/string-common.h +++ b/level_0/f_string/c/string-common.h @@ -48,8 +48,7 @@ extern "C" { #define macro_f_string_t_delete_simple(string, length) f_memory_resize(length, 0, sizeof(f_string_t), (void **) & string); #define macro_f_string_t_destroy_simple(string, length) f_memory_adjust(length, 0, sizeof(f_string_t), (void **) & string); - // @fixme update all code utilizing f_array_length_t on a string, such as strnlen(). - #define F_string_t_size_d F_type_size_64_positive_d + #define F_string_t_size_d F_number_t_size_positive_d #endif // _di_f_string_t_ /** diff --git a/level_0/f_type/c/type.h b/level_0/f_type/c/type.h index c3fa197..d466556 100644 --- a/level_0/f_type/c/type.h +++ b/level_0/f_type/c/type.h @@ -223,7 +223,7 @@ extern "C" { * This is intended to be used in buffers, such as strings, and in argument parameters. * * Provides additional custom types so that it can be more easily be overwritten. - * Specifically, there is support for using 32-bit, 64-bit or 128-bit lengths. + * Specifically, there is support for using 32-bit, 64-bit, or 128-bit lengths. * * 64-bit is the designed default. */ @@ -238,9 +238,7 @@ extern "C" { #define F_number_t_size_max_unsigned_d F_type_size_max_64_unsigned_d #define F_number_t_size_max_positive_d F_type_size_max_64_positive_d #define F_number_t_size_max_negative_d F_type_size_max_64_negative_d -#endif // _di_f_type_number_64_t_ - -#ifdef _en_f_type_number_32_t_ +#elif defined(_en_f_type_number_32_t_) typedef int32_t f_number_signed_t; typedef uint32_t f_number_unsigned_t; @@ -251,9 +249,7 @@ extern "C" { #define F_number_t_size_max_unsigned_d F_type_size_max_32_unsigned_d #define F_number_t_size_max_positive_d F_type_size_max_32_positive_d #define F_number_t_size_max_negative_d F_type_size_max_32_negative_d -#endif // _en_f_type_number_32_t_ - -#ifdef _en_f_type_number_128_t_ +#elif defined(_en_f_type_number_128_t_) typedef f_int_128_t f_number_signed_t; typedef f_uint_128_t f_number_unsigned_t; -- 1.8.3.1