From 668c8803705c119997968b00d4c53778df4a0908 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Thu, 28 Feb 2019 14:51:54 -0500 Subject: add FILE_STREAM and LOAD_LOCALE --- src/nonstd/__libc.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/nonstd/__libc.c') diff --git a/src/nonstd/__libc.c b/src/nonstd/__libc.c index d48d6714..168ad32c 100644 --- a/src/nonstd/__libc.c +++ b/src/nonstd/__libc.c @@ -4,16 +4,18 @@ #include "nonstd/locale.h" #include "_printf.h" +#include "_scanf.h" +#include "_locale.h" #include "_syscall.h" void *__libc(LIBC_INTERNAL variable) { extern void *__libc_per_thread(LIBC_INTERNAL __variable); + static struct __locale_t locale; + static struct __FILE file_streams[FOPEN_MAX]; void *r = (void*)0; - static struct __locale_t locale; - switch (variable) { case ERRNO: return __libc_per_thread(ERRNO); @@ -45,6 +47,14 @@ void *__libc(LIBC_INTERNAL variable) r = (void*)(__printf); break; + case FILE_STREAMS: + r = file_streams; + break; + + case LOAD_LOCALE: + r = (void*)(__load_locale); + break; + default: break; } -- cgit v1.2.1