From 12ef29fbd7b4a7cf38925be529b66c087ce4d7d3 Mon Sep 17 00:00:00 2001 From: Eyal Rozenberg Date: Wed, 5 Jan 2022 20:34:23 +0200 Subject: [PATCH] =?UTF-8?q?Expanded=20`#ifdef`=20to=20remove=20some=20more?= =?UTF-8?q?=20code=20when=20we=20don't=20support=20exponential=20format=20?= =?UTF-8?q?specifiers.=20Credit=20goes=20to=20Ola=20S=C3=B6der=20=20for=20the=20suggestion.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/printf/printf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/printf/printf.c b/src/printf/printf.c index 88414873..0884f514 100644 --- a/src/printf/printf.c +++ b/src/printf/printf.c @@ -475,6 +475,7 @@ static struct double_components get_components(double number, unsigned int preci return number_; } +#if PRINTF_SUPPORT_EXPONENTIAL_SPECIFIERS struct scaling_factor { double raw_factor; bool multiply; // if true, need to multiply by raw_factor; otherwise need to divide by it @@ -514,7 +515,6 @@ static struct scaling_factor update_normalization(struct scaling_factor sf, doub return result; } -#if PRINTF_SUPPORT_EXPONENTIAL_SPECIFIERS static struct double_components get_normalized_components(bool negative, unsigned int precision, double non_normalized, struct scaling_factor normalization) { struct double_components components;