fix windows printf output to match standard unix line buffering

pull/2056/head
Nicolas Sauzede 2019-09-21 00:29:11 +02:00 committed by Alexander Medvednikov
parent 90e26a34c5
commit 56e880117e
1 changed files with 1 additions and 0 deletions

View File

@ -372,6 +372,7 @@ _setmode(_fileno(stdin), mode);
_setmode(_fileno(stdout), _O_U8TEXT); _setmode(_fileno(stdout), _O_U8TEXT);
SetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), ENABLE_PROCESSED_OUTPUT | 0x0004); SetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), ENABLE_PROCESSED_OUTPUT | 0x0004);
// ENABLE_VIRTUAL_TERMINAL_PROCESSING // ENABLE_VIRTUAL_TERMINAL_PROCESSING
setbuf(stdout,0);
#endif #endif
g_str_buf=malloc(1000); g_str_buf=malloc(1000);
$consts_init_body $consts_init_body