(main) [_WIN32]: Windows putchar() screws up when printing multibyte

strings bytewise unless the stream is buffered.  Switch stdout to
line-buffered mode.
(login): Explicitly flush stdout, because Windows doesn't implement
line-buffering faithfully.
This commit is contained in:
Ron Koenderink 2005-06-30 16:10:42 +00:00
parent b239d6e3b1
commit dfe767e7e0
2 changed files with 4 additions and 0 deletions

View file

@ -109,6 +109,7 @@ main(int ac, char **av)
int utf8 = 0;
#ifdef _WIN32
setvbuf(stdout, NULL, _IOLBF, 4096);
err = WSAStartup(0x0101, &WsaData);
if (err == SOCKET_ERROR) {
printf("WSAStartup Failed\n");