Fold LIBC_UNICODE into LIBC_STR

This commit is contained in:
Justine Tunney 2022-08-13 08:42:32 -07:00
parent 17aea99bb3
commit 367d06d9e4
173 changed files with 170 additions and 355 deletions

View file

@ -119,7 +119,6 @@ include libc/fmt/fmt.mk #─┘
include libc/calls/calls.mk #─┐ include libc/calls/calls.mk #─┐
include libc/runtime/runtime.mk # ├──SYSTEMS RUNTIME include libc/runtime/runtime.mk # ├──SYSTEMS RUNTIME
include libc/crt/crt.mk # │ You can issue system calls include libc/crt/crt.mk # │ You can issue system calls
include libc/unicode/unicode.mk # │
include third_party/dlmalloc/dlmalloc.mk #─┘ include third_party/dlmalloc/dlmalloc.mk #─┘
include libc/mem/mem.mk #─┐ include libc/mem/mem.mk #─┐
include libc/zipos/zipos.mk # ├──DYNAMIC RUNTIME include libc/zipos/zipos.mk # ├──DYNAMIC RUNTIME
@ -199,7 +198,7 @@ include test/libc/thread/test.mk
include test/libc/sock/test.mk include test/libc/sock/test.mk
include test/libc/str/test.mk include test/libc/str/test.mk
include test/libc/log/test.mk include test/libc/log/test.mk
include test/libc/unicode/test.mk include test/libc/str/test.mk
include test/libc/calls/test.mk include test/libc/calls/test.mk
include test/libc/x/test.mk include test/libc/x/test.mk
include test/libc/xed/test.mk include test/libc/xed/test.mk
@ -284,7 +283,6 @@ COSMOPOLITAN_OBJECTS = \
LIBC_X \ LIBC_X \
THIRD_PARTY_GETOPT \ THIRD_PARTY_GETOPT \
LIBC_LOG \ LIBC_LOG \
LIBC_UNICODE \
LIBC_TIME \ LIBC_TIME \
LIBC_ZIPOS \ LIBC_ZIPOS \
THIRD_PARTY_ZLIB \ THIRD_PARTY_ZLIB \
@ -339,7 +337,6 @@ COSMOPOLITAN_HEADERS = \
LIBC_THREAD \ LIBC_THREAD \
LIBC_TIME \ LIBC_TIME \
LIBC_TINYMATH \ LIBC_TINYMATH \
LIBC_UNICODE \
LIBC_X \ LIBC_X \
LIBC_ZIPOS \ LIBC_ZIPOS \
NET_HTTP \ NET_HTTP \

View file

@ -37,8 +37,7 @@ DSP_MPEG_A_DIRECTDEPS = \
LIBC_STUBS \ LIBC_STUBS \
LIBC_SYSV \ LIBC_SYSV \
LIBC_TIME \ LIBC_TIME \
LIBC_TINYMATH \ LIBC_TINYMATH
LIBC_UNICODE
DSP_MPEG_A_DEPS := \ DSP_MPEG_A_DEPS := \
$(call uniq,$(foreach x,$(DSP_MPEG_A_DIRECTDEPS),$($(x)))) $(call uniq,$(foreach x,$(DSP_MPEG_A_DIRECTDEPS),$($(x))))

View file

@ -40,8 +40,7 @@ DSP_TTY_A_DIRECTDEPS = \
LIBC_SYSV \ LIBC_SYSV \
LIBC_TINYMATH \ LIBC_TINYMATH \
LIBC_TIME \ LIBC_TIME \
LIBC_X \ LIBC_X
LIBC_UNICODE
DSP_TTY_A_DEPS := \ DSP_TTY_A_DEPS := \
$(call uniq,$(foreach x,$(DSP_TTY_A_DIRECTDEPS),$($(x)))) $(call uniq,$(foreach x,$(DSP_TTY_A_DIRECTDEPS),$($(x))))

View file

@ -66,7 +66,6 @@ EXAMPLES_DIRECTDEPS = \
LIBC_THREAD \ LIBC_THREAD \
LIBC_TIME \ LIBC_TIME \
LIBC_TINYMATH \ LIBC_TINYMATH \
LIBC_UNICODE \
LIBC_X \ LIBC_X \
LIBC_ZIPOS \ LIBC_ZIPOS \
NET_HTTP \ NET_HTTP \

View file

@ -27,7 +27,7 @@
#include "libc/str/thompike.h" #include "libc/str/thompike.h"
#include "libc/str/tpenc.h" #include "libc/str/tpenc.h"
#include "libc/str/utf16.h" #include "libc/str/utf16.h"
#include "libc/unicode/unicode.h" #include "libc/str/unicode.h"
typedef int (*out_f)(const char *, void *, size_t); typedef int (*out_f)(const char *, void *, size_t);
typedef int (*emit_f)(out_f, void *, uint64_t); typedef int (*emit_f)(out_f, void *, uint64_t);

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
long long strtoll_l(const char *nptr, char **endptr, int base, locale_t l) { long long strtoll_l(const char *nptr, char **endptr, int base, locale_t l) {
return strtoll(nptr, endptr, base); return strtoll(nptr, endptr, base);

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
unsigned long long strtoull_l(const char *nptr, char **endptr, int base, unsigned long long strtoull_l(const char *nptr, char **endptr, int base,
locale_t l) { locale_t l) {

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
long long wcstoll_l(const wchar_t *nptr, wchar_t **endptr, int base, long long wcstoll_l(const wchar_t *nptr, wchar_t **endptr, int base,
locale_t l) { locale_t l) {

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
unsigned long long wcstoull_l(const wchar_t *nptr, wchar_t **endptr, int base, unsigned long long wcstoull_l(const wchar_t *nptr, wchar_t **endptr, int base,
locale_t l) { locale_t l) {

View file

@ -1,5 +1,5 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_LANGINFO_H_ #ifndef COSMOPOLITAN_LIBC_ISYSTEM_LANGINFO_H_
#define COSMOPOLITAN_LIBC_ISYSTEM_LANGINFO_H_ #define COSMOPOLITAN_LIBC_ISYSTEM_LANGINFO_H_
#include "libc/unicode/langinfo.h" #include "libc/str/langinfo.h"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_LANGINFO_H_ */ #endif /* COSMOPOLITAN_LIBC_ISYSTEM_LANGINFO_H_ */

View file

@ -1,4 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_LOCALE_H_ #ifndef COSMOPOLITAN_LIBC_ISYSTEM_LOCALE_H_
#define COSMOPOLITAN_LIBC_ISYSTEM_LOCALE_H_ #define COSMOPOLITAN_LIBC_ISYSTEM_LOCALE_H_
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_LOCALE_H_ */ #endif /* COSMOPOLITAN_LIBC_ISYSTEM_LOCALE_H_ */

View file

@ -1,4 +1,4 @@
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_NL_TYPES_H_ #ifndef COSMOPOLITAN_LIBC_ISYSTEM_NL_TYPES_H_
#define COSMOPOLITAN_LIBC_ISYSTEM_NL_TYPES_H_ #define COSMOPOLITAN_LIBC_ISYSTEM_NL_TYPES_H_
#include "libc/unicode/nltypes.h" #include "libc/str/nltypes.h"
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_NL_TYPES_H_ */ #endif /* COSMOPOLITAN_LIBC_ISYSTEM_NL_TYPES_H_ */

View file

@ -30,7 +30,6 @@ o/$(MODE)/libc: o/$(MODE)/libc/calls \
o/$(MODE)/libc/thread \ o/$(MODE)/libc/thread \
o/$(MODE)/libc/time \ o/$(MODE)/libc/time \
o/$(MODE)/libc/tinymath \ o/$(MODE)/libc/tinymath \
o/$(MODE)/libc/unicode \
o/$(MODE)/libc/x \ o/$(MODE)/libc/x \
o/$(MODE)/libc/zipos \ o/$(MODE)/libc/zipos \
$(LIBC_CHECKS) $(LIBC_CHECKS)

View file

@ -42,7 +42,6 @@ LIBC_LOG_A_DIRECTDEPS = \
LIBC_SYSV_CALLS \ LIBC_SYSV_CALLS \
LIBC_TIME \ LIBC_TIME \
LIBC_TINYMATH \ LIBC_TINYMATH \
LIBC_UNICODE \
THIRD_PARTY_DLMALLOC \ THIRD_PARTY_DLMALLOC \
THIRD_PARTY_GDTOA THIRD_PARTY_GDTOA

View file

@ -44,7 +44,6 @@ LIBC_SOCK_A_DIRECTDEPS = \
LIBC_STUBS \ LIBC_STUBS \
LIBC_SYSV_CALLS \ LIBC_SYSV_CALLS \
LIBC_TIME \ LIBC_TIME \
LIBC_UNICODE \
LIBC_SYSV LIBC_SYSV
LIBC_SOCK_A_DEPS := \ LIBC_SOCK_A_DEPS := \

View file

@ -31,7 +31,7 @@
#include "libc/stdio/iconv.h" #include "libc/stdio/iconv.h"
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/thread/thread.h" #include "libc/thread/thread.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
// clang-format off // clang-format off
asm(".ident\t\"\\n\\n\ asm(".ident\t\"\\n\\n\

View file

@ -16,7 +16,7 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
void freelocale(locale_t l) { void freelocale(locale_t l) {
// TODO: implement me // TODO: implement me

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
int isdigit_l(int c, locale_t l) { int isdigit_l(int c, locale_t l) {
return iswdigit(c); return iswdigit(c);

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
int islower_l(int c, locale_t l) { int islower_l(int c, locale_t l) {
return islower(c); return islower(c);

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
int isupper_l(int c, locale_t l) { int isupper_l(int c, locale_t l) {
return isupper(c); return isupper(c);

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
int iswalpha_l(wint_t c, locale_t l) { int iswalpha_l(wint_t c, locale_t l) {
return iswalpha(c); return iswalpha(c);

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
int iswblank_l(wint_t c, locale_t l) { int iswblank_l(wint_t c, locale_t l) {
return iswblank(c); return iswblank(c);

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
int iswcntrl_l(wint_t c, locale_t l) { int iswcntrl_l(wint_t c, locale_t l) {
return iswcntrl(c); return iswcntrl(c);

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
int iswdigit_l(wint_t c, locale_t l) { int iswdigit_l(wint_t c, locale_t l) {
return iswdigit(c); return iswdigit(c);

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
int iswlower_l(wint_t c, locale_t l) { int iswlower_l(wint_t c, locale_t l) {
return iswlower(c); return iswlower(c);

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
int iswprint_l(wint_t c, locale_t l) { int iswprint_l(wint_t c, locale_t l) {
return iswprint(c); return iswprint(c);

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
int iswpunct_l(wint_t c, locale_t l) { int iswpunct_l(wint_t c, locale_t l) {
return iswpunct(c); return iswpunct(c);

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
int iswspace_l(wint_t c, locale_t l) { int iswspace_l(wint_t c, locale_t l) {
return iswspace(c); return iswspace(c);

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
int iswupper_l(wint_t c, locale_t l) { int iswupper_l(wint_t c, locale_t l) {
return iswupper(c); return iswupper(c);

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
int iswxdigit_l(wint_t c, locale_t l) { int iswxdigit_l(wint_t c, locale_t l) {
return iswxdigit(c); return iswxdigit(c);

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
int isxdigit_l(int c, locale_t l) { int isxdigit_l(int c, locale_t l) {
return iswxdigit(c); return iswxdigit(c);

View file

@ -27,9 +27,9 @@
*/ */
#include "libc/nexgen32e/gettls.h" #include "libc/nexgen32e/gettls.h"
#include "libc/thread/thread.h" #include "libc/thread/thread.h"
#include "libc/unicode/langinfo.h" #include "libc/str/langinfo.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
#include "libc/unicode/nltypes.h" #include "libc/str/nltypes.h"
asm(".ident\t\"\\n\\n\ asm(".ident\t\"\\n\\n\
Musl libc (MIT License)\\n\ Musl libc (MIT License)\\n\

View file

@ -1,5 +1,5 @@
#ifndef COSMOPOLITAN_LIBC_UNICODE_LANGINFO_H_ #ifndef COSMOPOLITAN_LIBC_STR_LANGINFO_H_
#define COSMOPOLITAN_LIBC_UNICODE_LANGINFO_H_ #define COSMOPOLITAN_LIBC_STR_LANGINFO_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0) #if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_ COSMOPOLITAN_C_START_
@ -83,4 +83,4 @@ char *nl_langinfo(int);
COSMOPOLITAN_C_END_ COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ #endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_LIBC_UNICODE_LANGINFO_H_ */ #endif /* COSMOPOLITAN_LIBC_STR_LANGINFO_H_ */

View file

@ -1,5 +1,5 @@
#ifndef COSMOPOLITAN_LIBC_UNICODE_LOCALE_H_ #ifndef COSMOPOLITAN_LIBC_STR_LOCALE_H_
#define COSMOPOLITAN_LIBC_UNICODE_LOCALE_H_ #define COSMOPOLITAN_LIBC_STR_LOCALE_H_
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/time/struct/tm.h" #include "libc/time/struct/tm.h"
@ -79,4 +79,4 @@ wint_t towupper_l(wint_t, locale_t);
COSMOPOLITAN_C_END_ COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ #endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_LIBC_UNICODE_LOCALE_H_ */ #endif /* COSMOPOLITAN_LIBC_STR_LOCALE_H_ */

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/limits.h" #include "libc/limits.h"
#include "libc/unicode/unicode.h" #include "libc/str/unicode.h"
static const struct lconv kLocaleConv = { static const struct lconv kLocaleConv = {
.decimal_point = ".", .decimal_point = ".",

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/sysv/errfuns.h" #include "libc/sysv/errfuns.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
locale_t newlocale(int catmask, const char *locale, locale_t base) { locale_t newlocale(int catmask, const char *locale, locale_t base) {
// TODO: implement me // TODO: implement me

View file

@ -1,5 +1,5 @@
#ifndef COSMOPOLITAN_LIBC_UNICODE_NLTYPES_H_ #ifndef COSMOPOLITAN_LIBC_STR_NLTYPES_H_
#define COSMOPOLITAN_LIBC_UNICODE_NLTYPES_H_ #define COSMOPOLITAN_LIBC_STR_NLTYPES_H_
#define NL_SETD 1 #define NL_SETD 1
#define NL_CAT_LOCALE 1 #define NL_CAT_LOCALE 1
@ -16,4 +16,4 @@ int catclose(nl_catd);
COSMOPOLITAN_C_END_ COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ #endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_LIBC_UNICODE_NLTYPES_H_ */ #endif /* COSMOPOLITAN_LIBC_STR_NLTYPES_H_ */

View file

@ -18,7 +18,7 @@
*/ */
#include "libc/intrin/safemacros.internal.h" #include "libc/intrin/safemacros.internal.h"
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
/** /**
* Sets program locale. * Sets program locale.

View file

@ -94,6 +94,32 @@ o/$(MODE)/libc/fmt/strsignal.greg.o: private \
-ffreestanding \ -ffreestanding \
$(NO_MAGIC) $(NO_MAGIC)
o/$(MODE)/libc/str/eastasianwidth.bin: \
libc/str/eastasianwidth.txt \
o/$(MODE)/tool/decode/mkwides.com
@$(COMPILE) -AMKWIDES -T$@ o/$(MODE)/tool/decode/mkwides.com -o $@ $<
o/$(MODE)/libc/str/eastasianwidth.bin.lz4: \
o/$(MODE)/libc/str/eastasianwidth.bin \
o/$(MODE)/third_party/lz4cli/lz4cli.com
@$(COMPILE) -ALZ4 -T$@ o/$(MODE)/third_party/lz4cli/lz4cli.com -q -f -9 --content-size $< $@
o/$(MODE)/libc/str/eastasianwidth.s: \
o/$(MODE)/libc/str/eastasianwidth.bin.lz4 \
o/$(MODE)/tool/build/lz4toasm.com
@$(COMPILE) -ABIN2ASM -T$@ o/$(MODE)/tool/build/lz4toasm.com -s kEastAsianWidth -o $@ $<
o/$(MODE)/libc/str/combiningchars.bin: \
libc/str/strdata.txt \
o/$(MODE)/tool/decode/mkcombos.com
@$(COMPILE) -AMKCOMBOS -T$@ o/$(MODE)/tool/decode/mkcombos.com -o $@ $<
o/$(MODE)/libc/str/combiningchars.bin.lz4: \
o/$(MODE)/libc/str/combiningchars.bin \
o/$(MODE)/third_party/lz4cli/lz4cli.com
@$(COMPILE) -ALZ4 -T$@ o/$(MODE)/third_party/lz4cli/lz4cli.com -q -f -9 --content-size $< $@
o/$(MODE)/libc/str/combiningchars.s: \
o/$(MODE)/libc/str/combiningchars.bin.lz4 \
o/$(MODE)/tool/build/lz4toasm.com
@$(COMPILE) -ABIN2ASM -T$@ o/$(MODE)/tool/build/lz4toasm.com -s kCombiningChars -o $@ $<
LIBC_STR_LIBS = $(foreach x,$(LIBC_STR_ARTIFACTS),$($(x))) LIBC_STR_LIBS = $(foreach x,$(LIBC_STR_ARTIFACTS),$($(x)))
LIBC_STR_SRCS = $(foreach x,$(LIBC_STR_ARTIFACTS),$($(x)_SRCS)) LIBC_STR_SRCS = $(foreach x,$(LIBC_STR_ARTIFACTS),$($(x)_SRCS))
LIBC_STR_HDRS = $(foreach x,$(LIBC_STR_ARTIFACTS),$($(x)_HDRS)) LIBC_STR_HDRS = $(foreach x,$(LIBC_STR_ARTIFACTS),$($(x)_HDRS))

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
int strcoll_l(const char *p, const char *q, locale_t l) { int strcoll_l(const char *p, const char *q, locale_t l) {
return strcmp(p, q); return strcmp(p, q);

View file

@ -23,7 +23,7 @@
#include "libc/nexgen32e/bsf.h" #include "libc/nexgen32e/bsf.h"
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/str/thompike.h" #include "libc/str/thompike.h"
#include "libc/unicode/unicode.h" #include "libc/str/unicode.h"
/** /**
* Returns monospace display width of UTF-8 string. * Returns monospace display width of UTF-8 string.

View file

@ -19,7 +19,7 @@
#include "libc/intrin/safemacros.internal.h" #include "libc/intrin/safemacros.internal.h"
#include "libc/str/oldutf16.internal.h" #include "libc/str/oldutf16.internal.h"
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/unicode.h" #include "libc/str/unicode.h"
/** /**
* Returns monospace display width of UTF-16 or UCS-2 string. * Returns monospace display width of UTF-16 or UCS-2 string.

View file

@ -16,7 +16,7 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/unicode/unicode.h" #include "libc/str/unicode.h"
/** /**
* Returns monospace display width of UTF-8 string. * Returns monospace display width of UTF-8 string.

View file

@ -18,7 +18,7 @@
*/ */
#include "libc/intrin/safemacros.internal.h" #include "libc/intrin/safemacros.internal.h"
#include "libc/limits.h" #include "libc/limits.h"
#include "libc/unicode/unicode.h" #include "libc/str/unicode.h"
/** /**
* Returns monospace display width of UTF-16 or UCS-2 string. * Returns monospace display width of UTF-16 or UCS-2 string.

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
size_t strxfrm_l(char *dest, const char *src, size_t count, locale_t l) { size_t strxfrm_l(char *dest, const char *src, size_t count, locale_t l) {
return strxfrm(dest, src, count); return strxfrm(dest, src, count);

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
int tolower_l(int c, locale_t l) { int tolower_l(int c, locale_t l) {
return tolower(c); return tolower(c);

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
int toupper_l(int c, locale_t l) { int toupper_l(int c, locale_t l) {
return toupper(c); return toupper(c);

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
wint_t towlower_l(wint_t c, locale_t l) { wint_t towlower_l(wint_t c, locale_t l) {
return towlower(c); return towlower(c);

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
wint_t towupper_l(wint_t c, locale_t l) { wint_t towupper_l(wint_t c, locale_t l) {
return towupper(c); return towupper(c);

View file

@ -1,5 +1,5 @@
#ifndef COSMOPOLITAN_LIBC_UNICODE_UNICODE_H_ #ifndef COSMOPOLITAN_LIBC_STR_UNICODE_H_
#define COSMOPOLITAN_LIBC_UNICODE_UNICODE_H_ #define COSMOPOLITAN_LIBC_STR_UNICODE_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0) #if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_ COSMOPOLITAN_C_START_
@ -41,4 +41,4 @@ struct lconv *localeconv(void);
COSMOPOLITAN_C_END_ COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ #endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_LIBC_UNICODE_UNICODE_H_ */ #endif /* COSMOPOLITAN_LIBC_STR_UNICODE_H_ */

15
libc/str/update.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/sh
[ -d libc/unicode ] || exit
[ -x o//examples/curl.com ] || make -j8 o//examples/curl.com || exit
mkdir -p o/tmp/ || exit
shineget() {
echo $2
o//examples/curl.com $2 >o/tmp/$$ || exit
mv o/tmp/$$ $1 || exit
}
shineget libc/str/blocks.txt https://www.unicode.org/Public/UCD/latest/ucd/Blocks.txt
shineget libc/str/unicodedata.txt https://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt
shineget libc/str/eastasianwidth.txt https://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt
shineget libc/str/SpecialCasing.txt https://www.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/sysv/errfuns.h" #include "libc/sysv/errfuns.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
locale_t uselocale(locale_t l) { locale_t uselocale(locale_t l) {
// TODO: implement me! // TODO: implement me!

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
int wcscoll_l(const wchar_t *p, const wchar_t *q, locale_t l) { int wcscoll_l(const wchar_t *p, const wchar_t *q, locale_t l) {
return wcscmp(p, q); return wcscmp(p, q);

View file

@ -16,7 +16,7 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/unicode/unicode.h" #include "libc/str/unicode.h"
/** /**
* Returns monospace display width of wide character string. * Returns monospace display width of wide character string.

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/limits.h" #include "libc/limits.h"
#include "libc/unicode/unicode.h" #include "libc/str/unicode.h"
/** /**
* Returns monospace display width of wide character string. * Returns monospace display width of wide character string.

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
size_t wcsxfrm_l(wchar_t *dest, const wchar_t *src, size_t count, locale_t l) { size_t wcsxfrm_l(wchar_t *dest, const wchar_t *src, size_t count, locale_t l) {
return wcsxfrm(dest, src, count); return wcsxfrm(dest, src, count);

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/intrin/likely.h" #include "libc/intrin/likely.h"
#include "libc/unicode/unicode.h" #include "libc/str/unicode.h"
extern const uint8_t kEastAsianWidth[]; extern const uint8_t kEastAsianWidth[];
extern const uint32_t kEastAsianWidthBits; extern const uint32_t kEastAsianWidthBits;

View file

@ -108,7 +108,6 @@ LIBC_TESTLIB_A_DIRECTDEPS = \
LIBC_SYSV_CALLS \ LIBC_SYSV_CALLS \
LIBC_TIME \ LIBC_TIME \
LIBC_TINYMATH \ LIBC_TINYMATH \
LIBC_UNICODE \
LIBC_X \ LIBC_X \
LIBC_ZIPOS \ LIBC_ZIPOS \
THIRD_PARTY_DLMALLOC \ THIRD_PARTY_DLMALLOC \

View file

@ -3,7 +3,7 @@
#include "libc/calls/struct/timespec.h" #include "libc/calls/struct/timespec.h"
#include "libc/intrin/pthread.h" #include "libc/intrin/pthread.h"
#include "libc/runtime/runtime.h" #include "libc/runtime/runtime.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
#define CTHREAD_CREATE_DETACHED 1 #define CTHREAD_CREATE_DETACHED 1
#define CTHREAD_CREATE_JOINABLE 0 #define CTHREAD_CREATE_JOINABLE 0

View file

@ -21,7 +21,7 @@
#include "libc/stdio/stdio.h" #include "libc/stdio/stdio.h"
#include "libc/time/time.h" #include "libc/time/time.h"
#include "libc/time/tz.internal.h" #include "libc/time/tz.internal.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
// clang-format off // clang-format off
// converts broken-down timestamp to string // converts broken-down timestamp to string

View file

@ -1,82 +0,0 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#───vi: set et ft=make ts=8 tw=8 fenc=utf-8 :vi───────────────────────┘
PKGS += LIBC_UNICODE
LIBC_UNICODE_ARTIFACTS += LIBC_UNICODE_A
LIBC_UNICODE = $(LIBC_UNICODE_A_DEPS) $(LIBC_UNICODE_A)
LIBC_UNICODE_A = o/$(MODE)/libc/unicode/unicode.a
LIBC_UNICODE_A_FILES := $(wildcard libc/unicode/*)
LIBC_UNICODE_A_HDRS = $(filter %.h,$(LIBC_UNICODE_A_FILES))
LIBC_UNICODE_A_SRCS_A = $(filter %.s,$(LIBC_UNICODE_A_FILES))
LIBC_UNICODE_A_SRCS_S = $(filter %.S,$(LIBC_UNICODE_A_FILES))
LIBC_UNICODE_A_SRCS_C = $(filter %.c,$(LIBC_UNICODE_A_FILES))
LIBC_UNICODE_A_SRCS = \
$(LIBC_UNICODE_A_SRCS_A) \
$(LIBC_UNICODE_A_SRCS_S) \
$(LIBC_UNICODE_A_SRCS_C)
LIBC_UNICODE_A_OBJS = \
$(LIBC_UNICODE_A_SRCS_A:%.s=o/$(MODE)/%.o) \
$(LIBC_UNICODE_A_SRCS_S:%.S=o/$(MODE)/%.o) \
$(LIBC_UNICODE_A_SRCS_C:%.c=o/$(MODE)/%.o)
LIBC_UNICODE_A_CHECKS = \
$(LIBC_UNICODE_A).pkg \
$(LIBC_UNICODE_A_HDRS:%=o/$(MODE)/%.ok)
LIBC_UNICODE_A_DIRECTDEPS = \
LIBC_INTRIN \
LIBC_NEXGEN32E \
LIBC_STR \
LIBC_STUBS
LIBC_UNICODE_A_DEPS := \
$(call uniq,$(foreach x,$(LIBC_UNICODE_A_DIRECTDEPS),$($(x))))
$(LIBC_UNICODE_A): \
libc/unicode/ \
$(LIBC_UNICODE_A).pkg \
$(LIBC_UNICODE_A_OBJS)
$(LIBC_UNICODE_A).pkg: \
$(LIBC_UNICODE_A_OBJS) \
$(foreach x,$(LIBC_UNICODE_A_DIRECTDEPS),$($(x)_A).pkg)
LIBC_UNICODE_LIBS = $(foreach x,$(LIBC_UNICODE_ARTIFACTS),$($(x)))
LIBC_UNICODE_SRCS = $(foreach x,$(LIBC_UNICODE_ARTIFACTS),$($(x)_SRCS))
LIBC_UNICODE_HDRS = $(foreach x,$(LIBC_UNICODE_ARTIFACTS),$($(x)_HDRS))
LIBC_UNICODE_BINS = $(foreach x,$(LIBC_UNICODE_ARTIFACTS),$($(x)_BINS))
LIBC_UNICODE_CHECKS = $(foreach x,$(LIBC_UNICODE_ARTIFACTS),$($(x)_CHECKS))
LIBC_UNICODE_OBJS = $(foreach x,$(LIBC_UNICODE_ARTIFACTS),$($(x)_OBJS))
LIBC_UNICODE_TESTS = $(foreach x,$(LIBC_UNICODE_ARTIFACTS),$($(x)_TESTS))
.PHONY: o/$(MODE)/libc/unicode
o/$(MODE)/libc/unicode: $(LIBC_UNICODE) $(LIBC_UNICODE_CHECKS)
o/$(MODE)/libc/unicode/eastasianwidth.bin: \
libc/unicode/eastasianwidth.txt \
o/$(MODE)/tool/decode/mkwides.com
@$(COMPILE) -AMKWIDES -T$@ o/$(MODE)/tool/decode/mkwides.com -o $@ $<
o/$(MODE)/libc/unicode/eastasianwidth.bin.lz4: \
o/$(MODE)/libc/unicode/eastasianwidth.bin \
o/$(MODE)/third_party/lz4cli/lz4cli.com
@$(COMPILE) -ALZ4 -T$@ o/$(MODE)/third_party/lz4cli/lz4cli.com -q -f -9 --content-size $< $@
o/$(MODE)/libc/unicode/eastasianwidth.s: \
o/$(MODE)/libc/unicode/eastasianwidth.bin.lz4 \
o/$(MODE)/tool/build/lz4toasm.com
@$(COMPILE) -ABIN2ASM -T$@ o/$(MODE)/tool/build/lz4toasm.com -s kEastAsianWidth -o $@ $<
o/$(MODE)/libc/unicode/combiningchars.bin: \
libc/unicode/unicodedata.txt \
o/$(MODE)/tool/decode/mkcombos.com
@$(COMPILE) -AMKCOMBOS -T$@ o/$(MODE)/tool/decode/mkcombos.com -o $@ $<
o/$(MODE)/libc/unicode/combiningchars.bin.lz4: \
o/$(MODE)/libc/unicode/combiningchars.bin \
o/$(MODE)/third_party/lz4cli/lz4cli.com
@$(COMPILE) -ALZ4 -T$@ o/$(MODE)/third_party/lz4cli/lz4cli.com -q -f -9 --content-size $< $@
o/$(MODE)/libc/unicode/combiningchars.s: \
o/$(MODE)/libc/unicode/combiningchars.bin.lz4 \
o/$(MODE)/tool/build/lz4toasm.com
@$(COMPILE) -ABIN2ASM -T$@ o/$(MODE)/tool/build/lz4toasm.com -s kCombiningChars -o $@ $<

View file

@ -1,15 +0,0 @@
#!/bin/sh
[ -d libc/unicode ] || exit
[ -x o//examples/curl.com ] || make -j8 o//examples/curl.com || exit
mkdir -p o/tmp/ || exit
shineget() {
echo $2
o//examples/curl.com $2 >o/tmp/$$ || exit
mv o/tmp/$$ $1 || exit
}
shineget libc/unicode/blocks.txt https://www.unicode.org/Public/UCD/latest/ucd/Blocks.txt
shineget libc/unicode/unicodedata.txt https://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt
shineget libc/unicode/eastasianwidth.txt https://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt
shineget libc/unicode/SpecialCasing.txt https://www.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt

View file

@ -46,7 +46,6 @@ TEST_LIBC_CALLS_DIRECTDEPS = \
LIBC_THREAD \ LIBC_THREAD \
LIBC_TIME \ LIBC_TIME \
LIBC_TESTLIB \ LIBC_TESTLIB \
LIBC_UNICODE \
LIBC_X \ LIBC_X \
LIBC_ZIPOS \ LIBC_ZIPOS \
THIRD_PARTY_XED THIRD_PARTY_XED

View file

@ -30,7 +30,6 @@ TEST_LIBC_FMT_DIRECTDEPS = \
LIBC_SYSV \ LIBC_SYSV \
LIBC_TESTLIB \ LIBC_TESTLIB \
LIBC_TINYMATH \ LIBC_TINYMATH \
LIBC_UNICODE \
LIBC_X \ LIBC_X \
THIRD_PARTY_GDTOA THIRD_PARTY_GDTOA

View file

@ -37,7 +37,6 @@ TEST_LIBC_INTRIN_DIRECTDEPS = \
LIBC_THREAD \ LIBC_THREAD \
LIBC_TESTLIB \ LIBC_TESTLIB \
LIBC_TINYMATH \ LIBC_TINYMATH \
LIBC_UNICODE \
LIBC_X \ LIBC_X \
TOOL_VIZ_LIB \ TOOL_VIZ_LIB \
THIRD_PARTY_COMPILER_RT THIRD_PARTY_COMPILER_RT

View file

@ -19,7 +19,7 @@
#include "libc/nexgen32e/nexgen32e.h" #include "libc/nexgen32e/nexgen32e.h"
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/testlib/testlib.h" #include "libc/testlib/testlib.h"
#include "libc/unicode/unicode.h" #include "libc/str/unicode.h"
TEST(kcp437, test) { TEST(kcp437, test) {
long i; long i;

View file

@ -37,7 +37,6 @@ TEST_LIBC_NEXGEN32E_DIRECTDEPS = \
LIBC_STUBS \ LIBC_STUBS \
LIBC_SYSV \ LIBC_SYSV \
LIBC_TESTLIB \ LIBC_TESTLIB \
LIBC_UNICODE \
LIBC_X \ LIBC_X \
TOOL_VIZ_LIB \ TOOL_VIZ_LIB \
THIRD_PARTY_XED THIRD_PARTY_XED

View file

@ -37,7 +37,6 @@ TEST_LIBC_RUNTIME_DIRECTDEPS = \
LIBC_THREAD \ LIBC_THREAD \
LIBC_TESTLIB \ LIBC_TESTLIB \
LIBC_TINYMATH \ LIBC_TINYMATH \
LIBC_UNICODE \
LIBC_X \ LIBC_X \
LIBC_ZIPOS \ LIBC_ZIPOS \
TOOL_BUILD_LIB \ TOOL_BUILD_LIB \

View file

@ -38,7 +38,6 @@ TEST_LIBC_STDIO_DIRECTDEPS = \
LIBC_THREAD \ LIBC_THREAD \
LIBC_TIME \ LIBC_TIME \
LIBC_LOG \ LIBC_LOG \
LIBC_UNICODE \
LIBC_X \ LIBC_X \
LIBC_ZIPOS \ LIBC_ZIPOS \
THIRD_PARTY_GDTOA \ THIRD_PARTY_GDTOA \

View file

@ -22,7 +22,7 @@
#include "libc/str/oldutf16.internal.h" #include "libc/str/oldutf16.internal.h"
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/testlib/testlib.h" #include "libc/testlib/testlib.h"
#include "libc/unicode/unicode.h" #include "libc/str/unicode.h"
unsigned n; unsigned n;
size_t size; size_t size;

View file

@ -20,7 +20,7 @@
#include "libc/testlib/ezbench.h" #include "libc/testlib/ezbench.h"
#include "libc/testlib/hyperion.h" #include "libc/testlib/hyperion.h"
#include "libc/testlib/testlib.h" #include "libc/testlib/testlib.h"
#include "libc/unicode/unicode.h" #include "libc/str/unicode.h"
TEST(strwidth, test) { TEST(strwidth, test) {
EXPECT_EQ(5, strwidth("hello", 0)); EXPECT_EQ(5, strwidth("hello", 0));

View file

@ -45,7 +45,6 @@ TEST_LIBC_STR_DIRECTDEPS = \
LIBC_SYSV \ LIBC_SYSV \
LIBC_SYSV_CALLS \ LIBC_SYSV_CALLS \
LIBC_TESTLIB \ LIBC_TESTLIB \
LIBC_UNICODE \
LIBC_X \ LIBC_X \
LIBC_ZIPOS \ LIBC_ZIPOS \
THIRD_PARTY_MBEDTLS \ THIRD_PARTY_MBEDTLS \
@ -74,19 +73,9 @@ o/$(MODE)/test/libc/str/%.com.dbg: \
$(APE_NO_MODIFY_SELF) $(APE_NO_MODIFY_SELF)
@$(APELINK) @$(APELINK)
o/$(MODE)/test/libc/str/blake2.com.dbg: \
$(TEST_LIBC_STR_DEPS) \
o/$(MODE)/test/libc/str/blake2.o \
o/$(MODE)/test/libc/str/blake2b256_tests.txt.zip.o \
o/$(MODE)/test/libc/str/str.pkg \
$(LIBC_TESTMAIN) \
$(CRT) \
$(APE_NO_MODIFY_SELF)
@$(APELINK)
$(TEST_LIBC_STR_OBJS): private \ $(TEST_LIBC_STR_OBJS): private \
DEFAULT_CCFLAGS += \ DEFAULT_CCFLAGS += \
-fno-builtin -fno-builtin
o/$(MODE)/test/libc/str/memmove_test.o: private \ o/$(MODE)/test/libc/str/memmove_test.o: private \
OVERRIDE_CFLAGS += \ OVERRIDE_CFLAGS += \

View file

@ -20,7 +20,7 @@
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/testlib/ezbench.h" #include "libc/testlib/ezbench.h"
#include "libc/testlib/testlib.h" #include "libc/testlib/testlib.h"
#include "libc/unicode/unicode.h" #include "libc/str/unicode.h"
TEST(wcwidth, test) { TEST(wcwidth, test) {
ASSERT_EQ(0, wcwidth(0)); ASSERT_EQ(0, wcwidth(0));

View file

@ -18,6 +18,5 @@ o/$(MODE)/test/libc: \
o/$(MODE)/test/libc/thread \ o/$(MODE)/test/libc/thread \
o/$(MODE)/test/libc/time \ o/$(MODE)/test/libc/time \
o/$(MODE)/test/libc/tinymath \ o/$(MODE)/test/libc/tinymath \
o/$(MODE)/test/libc/unicode \
o/$(MODE)/test/libc/x \ o/$(MODE)/test/libc/x \
o/$(MODE)/test/libc/xed o/$(MODE)/test/libc/xed

View file

@ -35,7 +35,6 @@ TEST_LIBC_TINYMATH_DIRECTDEPS = \
LIBC_SYSV \ LIBC_SYSV \
LIBC_TESTLIB \ LIBC_TESTLIB \
LIBC_TINYMATH \ LIBC_TINYMATH \
LIBC_UNICODE \
LIBC_X \ LIBC_X \
THIRD_PARTY_GDTOA \ THIRD_PARTY_GDTOA \
THIRD_PARTY_DOUBLECONVERSION THIRD_PARTY_DOUBLECONVERSION

View file

@ -1,56 +0,0 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#───vi: set et ft=make ts=8 tw=8 fenc=utf-8 :vi───────────────────────┘
PKGS += TEST_LIBC_UNICODE
TEST_LIBC_UNICODE_SRCS := $(wildcard test/libc/unicode/*.c)
TEST_LIBC_UNICODE_SRCS_TEST = $(filter %_test.c,$(TEST_LIBC_UNICODE_SRCS))
TEST_LIBC_UNICODE_OBJS = \
$(TEST_LIBC_UNICODE_SRCS:%.c=o/$(MODE)/%.o)
TEST_LIBC_UNICODE_COMS = \
$(TEST_LIBC_UNICODE_SRCS:%.c=o/$(MODE)/%.com)
TEST_LIBC_UNICODE_BINS = \
$(TEST_LIBC_UNICODE_COMS) \
$(TEST_LIBC_UNICODE_COMS:%=%.dbg)
TEST_LIBC_UNICODE_TESTS = \
$(TEST_LIBC_UNICODE_SRCS_TEST:%.c=o/$(MODE)/%.com.ok)
TEST_LIBC_UNICODE_CHECKS = \
$(TEST_LIBC_UNICODE_SRCS_TEST:%.c=o/$(MODE)/%.com.runs)
TEST_LIBC_UNICODE_DIRECTDEPS = \
LIBC_CALLS \
LIBC_INTRIN \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_LOG \
LIBC_STR \
LIBC_STUBS \
LIBC_TESTLIB \
LIBC_SYSV \
LIBC_UNICODE
TEST_LIBC_UNICODE_DEPS := \
$(call uniq,$(foreach x,$(TEST_LIBC_UNICODE_DIRECTDEPS),$($(x))))
o/$(MODE)/test/libc/unicode/unicode.pkg: \
$(TEST_LIBC_UNICODE_OBJS) \
$(foreach x,$(TEST_LIBC_UNICODE_DIRECTDEPS),$($(x)_A).pkg)
o/$(MODE)/test/libc/unicode/%.com.dbg: \
$(TEST_LIBC_UNICODE_DEPS) \
o/$(MODE)/test/libc/unicode/%.o \
o/$(MODE)/test/libc/unicode/unicode.pkg \
$(LIBC_TESTMAIN) \
$(CRT) \
$(APE_NO_MODIFY_SELF)
@$(APELINK)
.PHONY: o/$(MODE)/test/libc/unicode
o/$(MODE)/test/libc/unicode: \
$(TEST_LIBC_UNICODE_BINS) \
$(TEST_LIBC_UNICODE_CHECKS)

View file

@ -35,7 +35,6 @@ TEST_LIBC_X_DIRECTDEPS = \
LIBC_STUBS \ LIBC_STUBS \
LIBC_SYSV \ LIBC_SYSV \
LIBC_TESTLIB \ LIBC_TESTLIB \
LIBC_UNICODE \
LIBC_X \ LIBC_X \
THIRD_PARTY_GDTOA THIRD_PARTY_GDTOA

View file

@ -41,7 +41,6 @@ TEST_TOOL_ARGS_DIRECTDEPS = \
LIBC_STUBS \ LIBC_STUBS \
LIBC_SYSV \ LIBC_SYSV \
LIBC_TESTLIB \ LIBC_TESTLIB \
LIBC_UNICODE \
LIBC_ZIPOS \ LIBC_ZIPOS \
LIBC_X \ LIBC_X \
THIRD_PARTY_COMPILER_RT \ THIRD_PARTY_COMPILER_RT \

View file

@ -23,7 +23,7 @@
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/testlib/ezbench.h" #include "libc/testlib/ezbench.h"
#include "libc/testlib/testlib.h" #include "libc/testlib/testlib.h"
#include "libc/unicode/unicode.h" #include "libc/str/unicode.h"
#include "tool/build/lib/pty.h" #include "tool/build/lib/pty.h"
char *render(struct Pty *pty) { char *render(struct Pty *pty) {

View file

@ -41,7 +41,6 @@ TEST_TOOL_BUILD_LIB_DIRECTDEPS = \
LIBC_STUBS \ LIBC_STUBS \
LIBC_SYSV \ LIBC_SYSV \
LIBC_TESTLIB \ LIBC_TESTLIB \
LIBC_UNICODE \
LIBC_X \ LIBC_X \
THIRD_PARTY_COMPILER_RT \ THIRD_PARTY_COMPILER_RT \
TOOL_BUILD_LIB \ TOOL_BUILD_LIB \

View file

@ -42,7 +42,6 @@ TEST_TOOL_NET_DIRECTDEPS = \
LIBC_STUBS \ LIBC_STUBS \
LIBC_SYSV \ LIBC_SYSV \
LIBC_TESTLIB \ LIBC_TESTLIB \
LIBC_UNICODE \
LIBC_X \ LIBC_X \
LIBC_ZIPOS \ LIBC_ZIPOS \
THIRD_PARTY_REGEX \ THIRD_PARTY_REGEX \

View file

@ -49,7 +49,6 @@ TEST_TOOL_PLINKO_DIRECTDEPS = \
LIBC_STUBS \ LIBC_STUBS \
LIBC_SYSV \ LIBC_SYSV \
LIBC_TESTLIB \ LIBC_TESTLIB \
LIBC_UNICODE \
LIBC_X \ LIBC_X \
LIBC_ZIPOS \ LIBC_ZIPOS \
THIRD_PARTY_COMPILER_RT \ THIRD_PARTY_COMPILER_RT \

View file

@ -36,7 +36,6 @@ TEST_TOOL_VIZ_LIB_DIRECTDEPS = \
LIBC_STR \ LIBC_STR \
LIBC_TIME \ LIBC_TIME \
LIBC_TINYMATH \ LIBC_TINYMATH \
LIBC_UNICODE \
LIBC_X \ LIBC_X \
TOOL_VIZ_LIB TOOL_VIZ_LIB

View file

@ -26,7 +26,6 @@ THIRD_PARTY_ARGON2_A_DIRECTDEPS = \
LIBC_RUNTIME \ LIBC_RUNTIME \
LIBC_SYSV_CALLS \ LIBC_SYSV_CALLS \
LIBC_STR \ LIBC_STR \
LIBC_UNICODE \
LIBC_STUBS LIBC_STUBS
THIRD_PARTY_ARGON2_A_DEPS := \ THIRD_PARTY_ARGON2_A_DEPS := \

View file

@ -23,7 +23,7 @@
#include "libc/str/str.h" #include "libc/str/str.h"
#include "libc/time/struct/tm.h" #include "libc/time/struct/tm.h"
#include "libc/time/time.h" #include "libc/time/time.h"
#include "libc/unicode/unicode.h" #include "libc/str/unicode.h"
#include "libc/x/x.h" #include "libc/x/x.h"
#include "third_party/gdtoa/gdtoa.h" #include "third_party/gdtoa/gdtoa.h"
#include "tool/build/lib/javadown.h" #include "tool/build/lib/javadown.h"

View file

@ -56,7 +56,6 @@ THIRD_PARTY_CHIBICC_A_DIRECTDEPS = \
LIBC_STUBS \ LIBC_STUBS \
LIBC_SYSV \ LIBC_SYSV \
LIBC_TIME \ LIBC_TIME \
LIBC_UNICODE \
LIBC_X \ LIBC_X \
THIRD_PARTY_COMPILER_RT \ THIRD_PARTY_COMPILER_RT \
THIRD_PARTY_DLMALLOC \ THIRD_PARTY_DLMALLOC \

View file

@ -44,7 +44,6 @@ THIRD_PARTY_CHIBICC_TEST_DIRECTDEPS = \
LIBC_STR \ LIBC_STR \
LIBC_STUBS \ LIBC_STUBS \
LIBC_TINYMATH \ LIBC_TINYMATH \
LIBC_UNICODE \
LIBC_X \ LIBC_X \
THIRD_PARTY_CHIBICC \ THIRD_PARTY_CHIBICC \
THIRD_PARTY_COMPILER_RT THIRD_PARTY_COMPILER_RT

View file

@ -73,7 +73,6 @@ THIRD_PARTY_DOUBLECONVERSION_A_DIRECTDEPS = \
LIBC_SYSV \ LIBC_SYSV \
LIBC_STR \ LIBC_STR \
LIBC_STUBS \ LIBC_STUBS \
LIBC_UNICODE \
LIBC_TINYMATH \ LIBC_TINYMATH \
THIRD_PARTY_GDTOA \ THIRD_PARTY_GDTOA \
THIRD_PARTY_LIBCXX THIRD_PARTY_LIBCXX

View file

@ -26,7 +26,6 @@ THIRD_PARTY_FINGER_A_DIRECTDEPS = \
LIBC_DNS \ LIBC_DNS \
LIBC_SOCK \ LIBC_SOCK \
LIBC_TIME \ LIBC_TIME \
LIBC_UNICODE \
THIRD_PARTY_MUSL \ THIRD_PARTY_MUSL \
THIRD_PARTY_GETOPT THIRD_PARTY_GETOPT

View file

@ -16,7 +16,7 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
#include "third_party/gdtoa/gdtoa.h" #include "third_party/gdtoa/gdtoa.h"
double strtod_l(const char *s, char **endptr, locale_t l) { double strtod_l(const char *s, char **endptr, locale_t l) {

View file

@ -16,7 +16,7 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE. PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
#include "third_party/gdtoa/gdtoa.h" #include "third_party/gdtoa/gdtoa.h"
float strtof_l(const char *s, char **sp, locale_t l) { float strtof_l(const char *s, char **sp, locale_t l) {

View file

@ -29,7 +29,7 @@
THIS SOFTWARE. THIS SOFTWARE.
*/ */
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
#include "third_party/gdtoa/gdtoa.h" #include "third_party/gdtoa/gdtoa.h"
/** /**

View file

@ -19,7 +19,7 @@
#include "libc/assert.h" #include "libc/assert.h"
#include "libc/fmt/conv.h" #include "libc/fmt/conv.h"
#include "libc/runtime/runtime.h" #include "libc/runtime/runtime.h"
#include "libc/unicode/locale.h" #include "libc/str/locale.h"
double wcstod(const wchar_t *nptr, wchar_t **endptr) { double wcstod(const wchar_t *nptr, wchar_t **endptr) {
assert(!"not implemented"); assert(!"not implemented");

Some files were not shown because too many files have changed in this diff Show more