From c63f340d90800895f007de64b7d2d14624263331 Mon Sep 17 00:00:00 2001 From: nthnluu Date: Sun, 28 Jan 2024 21:20:27 -0500 Subject: Created student weenix repository --- user/lib/libc/stream.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 user/lib/libc/stream.c (limited to 'user/lib/libc/stream.c') diff --git a/user/lib/libc/stream.c b/user/lib/libc/stream.c new file mode 100644 index 0000000..049ee4e --- /dev/null +++ b/user/lib/libc/stream.c @@ -0,0 +1,11 @@ +#include "stdio.h" + +static FILE stdstreams[3] = { + {.fd = 0, .offset = 0}, + {.fd = 1, .offset = 0}, + {.fd = 2, .offset = 0}, +}; + +FILE *stdin = &stdstreams[0]; +FILE *stdout = &stdstreams[1]; +FILE *stderr = &stdstreams[2]; -- cgit v1.2.3-70-g09d2