diff options
| author | Jakob Kaivo <jkk@ung.org> | 2020-08-12 20:12:41 -0400 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2020-08-12 20:12:41 -0400 |
| commit | 0b5079b8723804889f06c6ddbeef8a45c00d7b49 (patch) | |
| tree | d76b603c190b7e04529bff99e8085718b4c0a9a8 /src/nonstd | |
| parent | 0f2704eb90ef2590c75633dc7eb695a63cf2ddf8 (diff) | |
finish purging nonstd/
Diffstat (limited to 'src/nonstd')
| -rw-r--r-- | src/nonstd/__libc.c | 60 | ||||
| -rw-r--r-- | src/nonstd/__libc_per_thread.c | 14 |
2 files changed, 0 insertions, 74 deletions
diff --git a/src/nonstd/__libc.c b/src/nonstd/__libc.c deleted file mode 100644 index 0d8351ab..00000000 --- a/src/nonstd/__libc.c +++ /dev/null @@ -1,60 +0,0 @@ -#include "../_nonstd.h" -#include "../locale/_locale.h" - -void *__libc(LIBC_INTERNAL variable) -{ - extern void *__libc_per_thread(LIBC_INTERNAL __variable); - static struct __locale_t locale; - - void *r = (void*)0; - - switch (variable) { - case THREAD_LOCALE: - r = __libc_per_thread(THREAD_LOCALE); - if (r) { - break; - } - /* fallthru */ - - case GLOBAL_LOCALE: - r = &locale; - break; - - case CTYPE: - r = __libc(THREAD_LOCALE); - if (((struct __locale_t*)r)->ctype[0] == '\0') { - r = &locale; - } - r = ((struct __locale_t*)r)->lc_ctype.ctattr; - break; - - case TOLOWER: - r = __libc(THREAD_LOCALE); - if (((struct __locale_t*)r)->ctype[0] == '\0') { - r = &locale; - } - r = ((struct __locale_t*)r)->lc_ctype.ctolower; - break; - - case TOUPPER: - r = __libc(THREAD_LOCALE); - if (((struct __locale_t*)r)->ctype[0] == '\0') { - r = &locale; - } - r = ((struct __locale_t*)r)->lc_ctype.ctoupper; - break; - - case LCONV: - r = __libc(THREAD_LOCALE); - if (((struct __locale_t*)r)->numeric[0] == '\0') { - r = &locale; - } - r = &(((struct __locale_t*)r)->mn); - break; - - default: - break; - } - - return r; -} diff --git a/src/nonstd/__libc_per_thread.c b/src/nonstd/__libc_per_thread.c deleted file mode 100644 index d487dcad..00000000 --- a/src/nonstd/__libc_per_thread.c +++ /dev/null @@ -1,14 +0,0 @@ -#include "../_nonstd.h" -#include "../locale/_locale.h" -#include "../_perthread.h" - -void *__libc_per_thread(LIBC_INTERNAL variable) -{ - THREAD_LOCAL struct __locale_t locale; - - if (variable == THREAD_LOCALE) { - return &locale; - } - - return (void*)0; -} |
