diff options
author | Jakob Kaivo <jkk@ung.org> | 2020-08-12 14:49:46 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2020-08-12 14:49:46 -0400 |
commit | 9046b2494ce369d64e389d540446a8415c165ee2 (patch) | |
tree | 4af0ba09ecc083888b4c3e1e7cd81f6a69507b06 /src/__main.c | |
parent | d63be54dd4142d420bce9a40e2d4634d5d1356cc (diff) |
reenable freopen() of stdio now that freopen() is implemented
Diffstat (limited to 'src/__main.c')
-rw-r--r-- | src/__main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/__main.c b/src/__main.c index a61cef86..358c1756 100644 --- a/src/__main.c +++ b/src/__main.c @@ -32,17 +32,17 @@ void __main(int argc, char **argv) stdin = __stdio.FILES + 0; stdin->fd = 0; - /* freopen(", "r", stdin); */ + freopen(NULL, "r", stdin); setvbuf(stdin, NULL, isatty(0) ? _IOLBF : _IOFBF, BUFSIZ); stdout = __stdio.FILES + 1; stdout->fd = 1; - /* freopen(NULL, "w", stdout); */ + freopen(NULL, "w", stdout); setvbuf(stdin, NULL, isatty(1) ? _IOLBF : _IOFBF, BUFSIZ); stderr = __stdio.FILES + 2; stderr->fd = 2; - /* freopen(NULL, "w", stderr); */ + freopen(NULL, "w", stderr); setvbuf(stderr, NULL, _IONBF, 0); stdin->next = stdout; |