summaryrefslogtreecommitdiff
path: root/src/__main.c
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-08-12 14:49:46 -0400
committerJakob Kaivo <jkk@ung.org>2020-08-12 14:49:46 -0400
commit9046b2494ce369d64e389d540446a8415c165ee2 (patch)
tree4af0ba09ecc083888b4c3e1e7cd81f6a69507b06 /src/__main.c
parentd63be54dd4142d420bce9a40e2d4634d5d1356cc (diff)
reenable freopen() of stdio now that freopen() is implemented
Diffstat (limited to 'src/__main.c')
-rw-r--r--src/__main.c6
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;