summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/common/vuprintf.c21
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 @@
23#include <limits.h> 23#include <limits.h>
24#include <string.h> 24#include <string.h>
25#include <stddef.h> 25#include <stddef.h>
26#include <stdio.h> /* for snprintf */
27#include "system.h" 26#include "system.h"
28#include "vuprintf.h" 27#include "vuprintf.h"
29 28
@@ -526,20 +525,6 @@ static inline const char * format_p(const void *p,
526} 525}
527#endif /* FMT_RADIX_p */ 526#endif /* FMT_RADIX_p */
528 527
529#undef ABS
530#define ABS(x) ((x)<0?-(x):(x))
531
532static const char * format_f(double f,
533 struct fmt_buf *fmt_buf,
534 int radixchar,
535 bool *numericp)
536{
537 (void) radixchar;
538 (void) numericp;
539 fmt_buf->length = snprintf(fmt_buf->buf, 24, "%d.%06d", (int)f, ABS((int)((f - (int)f)*1e6)));
540 return fmt_buf->buf;
541}
542
543/* parse fixed width or precision field */ 528/* parse fixed width or precision field */
544static const char * parse_number_spec(const char *fmt, 529static const char * parse_number_spec(const char *fmt,
545 int ch, 530 int ch,
@@ -757,12 +742,6 @@ int vuprintf(vuprintf_push_cb push, /* call 'push()' for each output letter */
757 break; 742 break;
758 #endif 743 #endif
759 744
760 case 'f':
761 case 'g':
762 buf = format_f(va_arg(ap, double), &fmt_buf, ch,
763 &numeric);
764 break;
765
766 /** signed integer **/ 745 /** signed integer **/
767 case 'd': 746 case 'd':
768 case 'i': 747 case 'i':