From 8c5b000c87186a3ba87629c6c8f53bbe4278fc4b Mon Sep 17 00:00:00 2001 From: Eyal Rozenberg Date: Wed, 24 Jul 2024 13:17:34 +0300 Subject: [PATCH] More explanatory comments at ends of `#if` ... `#endif` blocks --- src/printf/printf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/printf/printf.c b/src/printf/printf.c index a636f64..0e9f09e 100644 --- a/src/printf/printf.c +++ b/src/printf/printf.c @@ -61,14 +61,14 @@ # define snprintf_ snprintf # define vsnprintf_ vsnprintf # define vprintf_ vprintf -#endif +#endif // PRINTF_ALIAS_STANDARD_FUNCTION_NAMES_HARD // 'ntoa' conversion buffer size, this must be big enough to hold one converted // numeric number including padded zeros (dynamically created on stack) #ifndef PRINTF_INTEGER_BUFFER_SIZE #define PRINTF_INTEGER_BUFFER_SIZE 32 -#endif +#endif // PRINTF_INTEGER_BUFFER_SIZE // size of the fixed (on-stack) buffer for printing individual decimal numbers. // this must be big enough to hold one converted floating-point value including @@ -223,7 +223,7 @@ typedef long long printf_signed_value_t; #else typedef unsigned long printf_unsigned_value_t; typedef long printf_signed_value_t; -#endif +#endif // PRINTF_SUPPORT_LONG_LONG // The printf()-family functions return an `int`; it is therefore // unnecessary/inappropriate to use size_t - often larger than int @@ -240,7 +240,7 @@ typedef unsigned int printf_size_t; #include #if FLT_RADIX != 2 #error "Non-binary-radix floating-point types are unsupported." -#endif +#endif // PRINTF_SUPPORT_DECIMAL_SPECIFIERS || PRINTF_SUPPORT_EXPONENTIAL_SPECIFIERS /** * This library supports taking float-point arguments up to and including @@ -284,9 +284,9 @@ typedef uint64_t printf_fp_uint_t; #define PRINTF_MAX_PRECOMPUTED_POWER_OF_10 NUM_DECIMAL_DIGITS_IN_INT64_T - 1 -#else +#else // FP_TYPE_MANT_DIG is neither 24 nor 53 #error "Unsupported floating point type configuration" -#endif +#endif // FP_TYPE_MANT_DIG #define FP_TYPE_STORED_MANTISSA_BITS (FP_TYPE_MANT_DIG - 1) typedef union {