You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Phobos I'd like a (portable across different operating systems) way to set the mode of stdout/stdin (to binary or text mode).
A not portable way to do in C on Windows is:
setmode(fileno(stdout), O_BINARY);
In Python a not portable way to do it is (works on Windows):
import os, msvcrt
msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
I think an almost portable way to do it is (this is a C99 version of freopen):
freopen(null, "wb", stdout);
The text was updated successfully, but these errors were encountered:
bearophile_hugs reported this on 2013-07-04T17:25:52Z
Transfered from https://issues.dlang.org/show_bug.cgi?id=10545
Description
The text was updated successfully, but these errors were encountered: