Logo
Explore Help
Register Sign In
fengqi/lv_micropython
1
0
Fork 0
You've already forked lv_micropython
Code Issues Pull Requests 1 Actions Packages Projects Releases Wiki Activity
lv_micropython/windows/init.c

6 lines
77 B
C
Raw Normal View History

mingw: Fix number of exponent digits in floating point formatting By default mingw outputs 3 digits instead of the standard 2 so all float tests using printf fail. Using setenv at the start of the program fixes this. To accomodate calling platform specific initialization a MICROPY_MAIN_INIT_FUNC macro is used which is called in mp_init()
2014-05-03 11:28:29 +02:00
#include <stdlib.h>
void init() {
putenv("PRINTF_EXPONENT_DIGITS=2");
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 19ms Template: 0ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API