diff options
author | Franklin Wei <git@fwei.tk> | 2017-12-24 19:22:17 -0500 |
---|---|---|
committer | Franklin Wei <git@fwei.tk> | 2017-12-24 19:22:17 -0500 |
commit | 6a843ca2b2008310f4b27070a2ea8fd7d0490fe5 (patch) | |
tree | 51791daff23161d6d2f3e93c4e5144f4e8716a28 /firmware/common | |
parent | 8a705f696e766606f21a6f3609b43d9a7c8f290b (diff) |
Revert "Support floating-point formatting"
This reverts commit 01c6dcf6c7b9bb1ad2fa0450f99bacc5f3d3e04b.
The hack isn't used in duke, so having it is redundant.
Change-Id: Ieb36d75718e0c2d1305440d08021744625117886
Diffstat (limited to 'firmware/common')
-rw-r--r-- | firmware/common/vuprintf.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/firmware/common/vuprintf.c b/firmware/common/vuprintf.c index a4b3c72680..e233022bc3 100644 --- a/firmware/common/vuprintf.c +++ b/firmware/common/vuprintf.c @@ -23,7 +23,6 @@ #include <limits.h> #include <string.h> #include <stddef.h> -#include <stdio.h> /* for snprintf */ #include "system.h" #include "vuprintf.h" @@ -526,20 +525,6 @@ static inline const char * format_p(const void *p, } #endif /* FMT_RADIX_p */ -#undef ABS -#define ABS(x) ((x)<0?-(x):(x)) - -static const char * format_f(double f, - struct fmt_buf *fmt_buf, - int radixchar, - bool *numericp) -{ - (void) radixchar; - (void) numericp; - fmt_buf->length = snprintf(fmt_buf->buf, 24, "%d.%06d", (int)f, ABS((int)((f - (int)f)*1e6))); - return fmt_buf->buf; -} - /* parse fixed width or precision field */ static const char * parse_number_spec(const char *fmt, int ch, @@ -757,12 +742,6 @@ int vuprintf(vuprintf_push_cb push, /* call 'push()' for each output letter */ break; #endif - case 'f': - case 'g': - buf = format_f(va_arg(ap, double), &fmt_buf, ch, - &numeric); - break; - /** signed integer **/ case 'd': case 'i': |