Commit b100339e authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

Flush file in fputc when character is '\n'.

parent 36aee719
...@@ -2222,6 +2222,12 @@ int MSVCRT_fputc(int c, MSVCRT_FILE* file) ...@@ -2222,6 +2222,12 @@ int MSVCRT_fputc(int c, MSVCRT_FILE* file)
if(file->_cnt>0) { if(file->_cnt>0) {
*file->_ptr++=c; *file->_ptr++=c;
file->_cnt--; file->_cnt--;
if (c == '\n')
{
int res = msvcrt_flush_buffer(file);
return res ? res : c;
}
else
return c; return c;
} else { } else {
return MSVCRT__flsbuf(c, file); return MSVCRT__flsbuf(c, file);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment