scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit fbacf733497678230358cc825ec86c3dd00f5f6c
parent ecb146910da88141390ca2cc58d79a0ed9ab14ff
Author: Quentin Rameau <quinq@fifth.space>
Date:   Tue, 21 Feb 2017 18:33:13 +0100

[libc] Add localeconv

Diffstat:
libc/src/Makefile | 3++-
libc/src/localeconv.c | 13+++++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/libc/src/Makefile b/libc/src/Makefile @@ -7,7 +7,8 @@ LIBCOBJ = assert.o strcpy.o strcmp.o strlen.o strchr.o \ memset.o memcpy.o memmove.o memcmp.o memchr.o \ isalnum.o isalpha.o isascii.o isblank.o iscntrl.o isdigit.o \ isgraph.o islower.o isprint.o ispunct.o isspace.o isupper.o \ - isxdigit.o toupper.o tolower.o setlocale.o + isxdigit.o toupper.o tolower.o setlocale.o \ + localeconv.o all: libc.a diff --git a/libc/src/localeconv.c b/libc/src/localeconv.c @@ -0,0 +1,13 @@ +#include <locale.h> +#include <limits.h> + +struct lconv * +localeconv(void) +{ + static struct lconv lc = { ".", "", "", "", "", "", "", "", "", "", + CHAR_MAX, CHAR_MAX, CHAR_MAX, CHAR_MAX, + CHAR_MAX, CHAR_MAX, CHAR_MAX, CHAR_MAX, + CHAR_MAX, CHAR_MAX, CHAR_MAX, CHAR_MAX, + CHAR_MAX, CHAR_MAX }; + return &lc; +}