diff --git a/Makefile b/Makefile index 33b74720b..4cfa46c9b 100644 --- a/Makefile +++ b/Makefile @@ -119,7 +119,6 @@ include libc/fmt/fmt.mk #─┘ include libc/calls/calls.mk #─┐ include libc/runtime/runtime.mk # ├──SYSTEMS RUNTIME include libc/crt/crt.mk # │ You can issue system calls -include libc/unicode/unicode.mk # │ include third_party/dlmalloc/dlmalloc.mk #─┘ include libc/mem/mem.mk #─┐ 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/str/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/x/test.mk include test/libc/xed/test.mk @@ -284,7 +283,6 @@ COSMOPOLITAN_OBJECTS = \ LIBC_X \ THIRD_PARTY_GETOPT \ LIBC_LOG \ - LIBC_UNICODE \ LIBC_TIME \ LIBC_ZIPOS \ THIRD_PARTY_ZLIB \ @@ -339,7 +337,6 @@ COSMOPOLITAN_HEADERS = \ LIBC_THREAD \ LIBC_TIME \ LIBC_TINYMATH \ - LIBC_UNICODE \ LIBC_X \ LIBC_ZIPOS \ NET_HTTP \ diff --git a/dsp/mpeg/mpeg.mk b/dsp/mpeg/mpeg.mk index 4e4bf4c76..bf0b0a01b 100644 --- a/dsp/mpeg/mpeg.mk +++ b/dsp/mpeg/mpeg.mk @@ -37,8 +37,7 @@ DSP_MPEG_A_DIRECTDEPS = \ LIBC_STUBS \ LIBC_SYSV \ LIBC_TIME \ - LIBC_TINYMATH \ - LIBC_UNICODE + LIBC_TINYMATH DSP_MPEG_A_DEPS := \ $(call uniq,$(foreach x,$(DSP_MPEG_A_DIRECTDEPS),$($(x)))) diff --git a/dsp/tty/tty.mk b/dsp/tty/tty.mk index 84f0a7333..e7a04f583 100644 --- a/dsp/tty/tty.mk +++ b/dsp/tty/tty.mk @@ -40,8 +40,7 @@ DSP_TTY_A_DIRECTDEPS = \ LIBC_SYSV \ LIBC_TINYMATH \ LIBC_TIME \ - LIBC_X \ - LIBC_UNICODE + LIBC_X DSP_TTY_A_DEPS := \ $(call uniq,$(foreach x,$(DSP_TTY_A_DIRECTDEPS),$($(x)))) diff --git a/examples/examples.mk b/examples/examples.mk index 183a8c4ff..1deecdb80 100644 --- a/examples/examples.mk +++ b/examples/examples.mk @@ -66,7 +66,6 @@ EXAMPLES_DIRECTDEPS = \ LIBC_THREAD \ LIBC_TIME \ LIBC_TINYMATH \ - LIBC_UNICODE \ LIBC_X \ LIBC_ZIPOS \ NET_HTTP \ diff --git a/libc/fmt/stoa.c b/libc/fmt/stoa.c index 587662b06..26d999902 100644 --- a/libc/fmt/stoa.c +++ b/libc/fmt/stoa.c @@ -27,7 +27,7 @@ #include "libc/str/thompike.h" #include "libc/str/tpenc.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 (*emit_f)(out_f, void *, uint64_t); diff --git a/libc/fmt/strtoll_l.c b/libc/fmt/strtoll_l.c index 0bbb5ea32..377bf4cc8 100644 --- a/libc/fmt/strtoll_l.c +++ b/libc/fmt/strtoll_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #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) { return strtoll(nptr, endptr, base); diff --git a/libc/fmt/strtoull_l.c b/libc/fmt/strtoull_l.c index 52cf9313b..4f526865b 100644 --- a/libc/fmt/strtoull_l.c +++ b/libc/fmt/strtoull_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #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, locale_t l) { diff --git a/libc/fmt/wcstoll_l.c b/libc/fmt/wcstoll_l.c index 441ed661c..6cd67cea8 100644 --- a/libc/fmt/wcstoll_l.c +++ b/libc/fmt/wcstoll_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #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, locale_t l) { diff --git a/libc/fmt/wcstoull_l.c b/libc/fmt/wcstoull_l.c index 926035623..e6003b8e0 100644 --- a/libc/fmt/wcstoull_l.c +++ b/libc/fmt/wcstoull_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #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, locale_t l) { diff --git a/libc/isystem/langinfo.h b/libc/isystem/langinfo.h index 58829e26f..4f4c7361a 100644 --- a/libc/isystem/langinfo.h +++ b/libc/isystem/langinfo.h @@ -1,5 +1,5 @@ #ifndef 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_ */ diff --git a/libc/isystem/locale.h b/libc/isystem/locale.h index e0ef4adc3..307fc6ab2 100644 --- a/libc/isystem/locale.h +++ b/libc/isystem/locale.h @@ -1,4 +1,4 @@ #ifndef 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_ */ diff --git a/libc/isystem/nl_types.h b/libc/isystem/nl_types.h index eb7a3d22a..31da124fc 100644 --- a/libc/isystem/nl_types.h +++ b/libc/isystem/nl_types.h @@ -1,4 +1,4 @@ #ifndef 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_ */ diff --git a/libc/libc.mk b/libc/libc.mk index d17a5471e..3dde7c5f4 100644 --- a/libc/libc.mk +++ b/libc/libc.mk @@ -30,7 +30,6 @@ o/$(MODE)/libc: o/$(MODE)/libc/calls \ o/$(MODE)/libc/thread \ o/$(MODE)/libc/time \ o/$(MODE)/libc/tinymath \ - o/$(MODE)/libc/unicode \ o/$(MODE)/libc/x \ o/$(MODE)/libc/zipos \ $(LIBC_CHECKS) diff --git a/libc/log/log.mk b/libc/log/log.mk index 9d38c6641..1e5c7a86e 100644 --- a/libc/log/log.mk +++ b/libc/log/log.mk @@ -42,7 +42,6 @@ LIBC_LOG_A_DIRECTDEPS = \ LIBC_SYSV_CALLS \ LIBC_TIME \ LIBC_TINYMATH \ - LIBC_UNICODE \ THIRD_PARTY_DLMALLOC \ THIRD_PARTY_GDTOA diff --git a/libc/sock/sock.mk b/libc/sock/sock.mk index 47a0c2ed4..2924c1878 100644 --- a/libc/sock/sock.mk +++ b/libc/sock/sock.mk @@ -44,7 +44,6 @@ LIBC_SOCK_A_DIRECTDEPS = \ LIBC_STUBS \ LIBC_SYSV_CALLS \ LIBC_TIME \ - LIBC_UNICODE \ LIBC_SYSV LIBC_SOCK_A_DEPS := \ diff --git a/libc/stdio/iconv.c b/libc/stdio/iconv.c index 38b9a8b5b..b71ed9160 100644 --- a/libc/stdio/iconv.c +++ b/libc/stdio/iconv.c @@ -31,7 +31,7 @@ #include "libc/stdio/iconv.h" #include "libc/str/str.h" #include "libc/thread/thread.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" // clang-format off asm(".ident\t\"\\n\\n\ diff --git a/libc/unicode/SpecialCasing.txt b/libc/str/SpecialCasing.txt similarity index 100% rename from libc/unicode/SpecialCasing.txt rename to libc/str/SpecialCasing.txt diff --git a/libc/unicode/blocks.txt b/libc/str/blocks.txt similarity index 100% rename from libc/unicode/blocks.txt rename to libc/str/blocks.txt diff --git a/libc/unicode/eastasianwidth.txt b/libc/str/eastasianwidth.txt similarity index 100% rename from libc/unicode/eastasianwidth.txt rename to libc/str/eastasianwidth.txt diff --git a/libc/unicode/freelocale.c b/libc/str/freelocale.c similarity index 98% rename from libc/unicode/freelocale.c rename to libc/str/freelocale.c index cc2fdc131..32e51a45b 100644 --- a/libc/unicode/freelocale.c +++ b/libc/str/freelocale.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" void freelocale(locale_t l) { // TODO: implement me diff --git a/libc/unicode/isdigit_l.c b/libc/str/isdigit_l.c similarity index 98% rename from libc/unicode/isdigit_l.c rename to libc/str/isdigit_l.c index ec1ec68e0..9eed85682 100644 --- a/libc/unicode/isdigit_l.c +++ b/libc/str/isdigit_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" int isdigit_l(int c, locale_t l) { return iswdigit(c); diff --git a/libc/unicode/islower_l.c b/libc/str/islower_l.c similarity index 98% rename from libc/unicode/islower_l.c rename to libc/str/islower_l.c index 94f9dd97e..1558e76ac 100644 --- a/libc/unicode/islower_l.c +++ b/libc/str/islower_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" int islower_l(int c, locale_t l) { return islower(c); diff --git a/libc/unicode/isupper_l.c b/libc/str/isupper_l.c similarity index 98% rename from libc/unicode/isupper_l.c rename to libc/str/isupper_l.c index 0ec0da520..a95a84b29 100644 --- a/libc/unicode/isupper_l.c +++ b/libc/str/isupper_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" int isupper_l(int c, locale_t l) { return isupper(c); diff --git a/libc/unicode/iswalpha_l.c b/libc/str/iswalpha_l.c similarity index 98% rename from libc/unicode/iswalpha_l.c rename to libc/str/iswalpha_l.c index b2f7a2a79..0f07f3285 100644 --- a/libc/unicode/iswalpha_l.c +++ b/libc/str/iswalpha_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" int iswalpha_l(wint_t c, locale_t l) { return iswalpha(c); diff --git a/libc/unicode/iswblank_l.c b/libc/str/iswblank_l.c similarity index 98% rename from libc/unicode/iswblank_l.c rename to libc/str/iswblank_l.c index df81263fd..d689b62a2 100644 --- a/libc/unicode/iswblank_l.c +++ b/libc/str/iswblank_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" int iswblank_l(wint_t c, locale_t l) { return iswblank(c); diff --git a/libc/unicode/iswcntrl_l.c b/libc/str/iswcntrl_l.c similarity index 98% rename from libc/unicode/iswcntrl_l.c rename to libc/str/iswcntrl_l.c index 69c4dc19b..088b535b2 100644 --- a/libc/unicode/iswcntrl_l.c +++ b/libc/str/iswcntrl_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" int iswcntrl_l(wint_t c, locale_t l) { return iswcntrl(c); diff --git a/libc/unicode/iswdigit_l.c b/libc/str/iswdigit_l.c similarity index 98% rename from libc/unicode/iswdigit_l.c rename to libc/str/iswdigit_l.c index ab2e945e5..b981c7d9b 100644 --- a/libc/unicode/iswdigit_l.c +++ b/libc/str/iswdigit_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" int iswdigit_l(wint_t c, locale_t l) { return iswdigit(c); diff --git a/libc/unicode/iswlower_l.c b/libc/str/iswlower_l.c similarity index 98% rename from libc/unicode/iswlower_l.c rename to libc/str/iswlower_l.c index 41f33ed0e..9b8a95f62 100644 --- a/libc/unicode/iswlower_l.c +++ b/libc/str/iswlower_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" int iswlower_l(wint_t c, locale_t l) { return iswlower(c); diff --git a/libc/unicode/iswprint_l.c b/libc/str/iswprint_l.c similarity index 98% rename from libc/unicode/iswprint_l.c rename to libc/str/iswprint_l.c index a834b8353..af3cd8925 100644 --- a/libc/unicode/iswprint_l.c +++ b/libc/str/iswprint_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" int iswprint_l(wint_t c, locale_t l) { return iswprint(c); diff --git a/libc/unicode/iswpunct_l.c b/libc/str/iswpunct_l.c similarity index 98% rename from libc/unicode/iswpunct_l.c rename to libc/str/iswpunct_l.c index d97d0ac89..dca7f55f7 100644 --- a/libc/unicode/iswpunct_l.c +++ b/libc/str/iswpunct_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" int iswpunct_l(wint_t c, locale_t l) { return iswpunct(c); diff --git a/libc/unicode/iswspace_l.c b/libc/str/iswspace_l.c similarity index 98% rename from libc/unicode/iswspace_l.c rename to libc/str/iswspace_l.c index 5ee4c8594..899dc5014 100644 --- a/libc/unicode/iswspace_l.c +++ b/libc/str/iswspace_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" int iswspace_l(wint_t c, locale_t l) { return iswspace(c); diff --git a/libc/unicode/iswupper_l.c b/libc/str/iswupper_l.c similarity index 98% rename from libc/unicode/iswupper_l.c rename to libc/str/iswupper_l.c index 604a0ce41..08ef1de48 100644 --- a/libc/unicode/iswupper_l.c +++ b/libc/str/iswupper_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" int iswupper_l(wint_t c, locale_t l) { return iswupper(c); diff --git a/libc/unicode/iswxdigit_l.c b/libc/str/iswxdigit_l.c similarity index 98% rename from libc/unicode/iswxdigit_l.c rename to libc/str/iswxdigit_l.c index 63bdd78a8..c16c63e5a 100644 --- a/libc/unicode/iswxdigit_l.c +++ b/libc/str/iswxdigit_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" int iswxdigit_l(wint_t c, locale_t l) { return iswxdigit(c); diff --git a/libc/unicode/isxdigit_l.c b/libc/str/isxdigit_l.c similarity index 98% rename from libc/unicode/isxdigit_l.c rename to libc/str/isxdigit_l.c index b11f4bbc4..ed6f078af 100644 --- a/libc/unicode/isxdigit_l.c +++ b/libc/str/isxdigit_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" int isxdigit_l(int c, locale_t l) { return iswxdigit(c); diff --git a/libc/unicode/kcombiningchars.S b/libc/str/kcombiningchars.S similarity index 100% rename from libc/unicode/kcombiningchars.S rename to libc/str/kcombiningchars.S diff --git a/libc/unicode/keastasianwidth.s b/libc/str/keastasianwidth.s similarity index 100% rename from libc/unicode/keastasianwidth.s rename to libc/str/keastasianwidth.s diff --git a/libc/unicode/langinfo.c b/libc/str/langinfo.c similarity index 97% rename from libc/unicode/langinfo.c rename to libc/str/langinfo.c index 154b0d9f2..9451b444d 100644 --- a/libc/unicode/langinfo.c +++ b/libc/str/langinfo.c @@ -27,9 +27,9 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/nexgen32e/gettls.h" #include "libc/thread/thread.h" -#include "libc/unicode/langinfo.h" -#include "libc/unicode/locale.h" -#include "libc/unicode/nltypes.h" +#include "libc/str/langinfo.h" +#include "libc/str/locale.h" +#include "libc/str/nltypes.h" asm(".ident\t\"\\n\\n\ Musl libc (MIT License)\\n\ diff --git a/libc/unicode/langinfo.h b/libc/str/langinfo.h similarity index 92% rename from libc/unicode/langinfo.h rename to libc/str/langinfo.h index 67d6ab62d..82db4442d 100644 --- a/libc/unicode/langinfo.h +++ b/libc/str/langinfo.h @@ -1,5 +1,5 @@ -#ifndef COSMOPOLITAN_LIBC_UNICODE_LANGINFO_H_ -#define COSMOPOLITAN_LIBC_UNICODE_LANGINFO_H_ +#ifndef COSMOPOLITAN_LIBC_STR_LANGINFO_H_ +#define COSMOPOLITAN_LIBC_STR_LANGINFO_H_ #if !(__ASSEMBLER__ + __LINKER__ + 0) COSMOPOLITAN_C_START_ @@ -83,4 +83,4 @@ char *nl_langinfo(int); COSMOPOLITAN_C_END_ #endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ -#endif /* COSMOPOLITAN_LIBC_UNICODE_LANGINFO_H_ */ +#endif /* COSMOPOLITAN_LIBC_STR_LANGINFO_H_ */ diff --git a/libc/unicode/locale.h b/libc/str/locale.h similarity index 94% rename from libc/unicode/locale.h rename to libc/str/locale.h index 41a46a1bb..d979a9be3 100644 --- a/libc/unicode/locale.h +++ b/libc/str/locale.h @@ -1,5 +1,5 @@ -#ifndef COSMOPOLITAN_LIBC_UNICODE_LOCALE_H_ -#define COSMOPOLITAN_LIBC_UNICODE_LOCALE_H_ +#ifndef COSMOPOLITAN_LIBC_STR_LOCALE_H_ +#define COSMOPOLITAN_LIBC_STR_LOCALE_H_ #include "libc/fmt/conv.h" #include "libc/time/struct/tm.h" @@ -79,4 +79,4 @@ wint_t towupper_l(wint_t, locale_t); COSMOPOLITAN_C_END_ #endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ -#endif /* COSMOPOLITAN_LIBC_UNICODE_LOCALE_H_ */ +#endif /* COSMOPOLITAN_LIBC_STR_LOCALE_H_ */ diff --git a/libc/unicode/localeconv.c b/libc/str/localeconv.c similarity index 98% rename from libc/unicode/localeconv.c rename to libc/str/localeconv.c index f262cc824..5d23bcd59 100644 --- a/libc/unicode/localeconv.c +++ b/libc/str/localeconv.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/limits.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" static const struct lconv kLocaleConv = { .decimal_point = ".", diff --git a/libc/unicode/newlocale.c b/libc/str/newlocale.c similarity index 98% rename from libc/unicode/newlocale.c rename to libc/str/newlocale.c index 5aff68183..b6b696716 100644 --- a/libc/unicode/newlocale.c +++ b/libc/str/newlocale.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #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) { // TODO: implement me diff --git a/libc/unicode/nltypes.h b/libc/str/nltypes.h similarity index 70% rename from libc/unicode/nltypes.h rename to libc/str/nltypes.h index c356265fe..51965a51d 100644 --- a/libc/unicode/nltypes.h +++ b/libc/str/nltypes.h @@ -1,5 +1,5 @@ -#ifndef COSMOPOLITAN_LIBC_UNICODE_NLTYPES_H_ -#define COSMOPOLITAN_LIBC_UNICODE_NLTYPES_H_ +#ifndef COSMOPOLITAN_LIBC_STR_NLTYPES_H_ +#define COSMOPOLITAN_LIBC_STR_NLTYPES_H_ #define NL_SETD 1 #define NL_CAT_LOCALE 1 @@ -16,4 +16,4 @@ int catclose(nl_catd); COSMOPOLITAN_C_END_ #endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ -#endif /* COSMOPOLITAN_LIBC_UNICODE_NLTYPES_H_ */ +#endif /* COSMOPOLITAN_LIBC_STR_NLTYPES_H_ */ diff --git a/libc/unicode/setlocale.c b/libc/str/setlocale.c similarity index 98% rename from libc/unicode/setlocale.c rename to libc/str/setlocale.c index aca1d840f..190c0ce57 100644 --- a/libc/unicode/setlocale.c +++ b/libc/str/setlocale.c @@ -18,7 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/intrin/safemacros.internal.h" #include "libc/str/str.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" /** * Sets program locale. diff --git a/libc/str/str.mk b/libc/str/str.mk index 4066a6e2c..a7e418fab 100644 --- a/libc/str/str.mk +++ b/libc/str/str.mk @@ -94,6 +94,32 @@ o/$(MODE)/libc/fmt/strsignal.greg.o: private \ -ffreestanding \ $(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_SRCS = $(foreach x,$(LIBC_STR_ARTIFACTS),$($(x)_SRCS)) LIBC_STR_HDRS = $(foreach x,$(LIBC_STR_ARTIFACTS),$($(x)_HDRS)) diff --git a/libc/unicode/strcoll_l.c b/libc/str/strcoll_l.c similarity index 98% rename from libc/unicode/strcoll_l.c rename to libc/str/strcoll_l.c index b08cd6b1b..a0477aecc 100644 --- a/libc/unicode/strcoll_l.c +++ b/libc/str/strcoll_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #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) { return strcmp(p, q); diff --git a/libc/unicode/strnwidth.c b/libc/str/strnwidth.c similarity index 99% rename from libc/unicode/strnwidth.c rename to libc/str/strnwidth.c index 431b93787..3354ff316 100644 --- a/libc/unicode/strnwidth.c +++ b/libc/str/strnwidth.c @@ -23,7 +23,7 @@ #include "libc/nexgen32e/bsf.h" #include "libc/str/str.h" #include "libc/str/thompike.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" /** * Returns monospace display width of UTF-8 string. diff --git a/libc/unicode/strnwidth16.c b/libc/str/strnwidth16.c similarity index 98% rename from libc/unicode/strnwidth16.c rename to libc/str/strnwidth16.c index 09f5124fc..d99f50684 100644 --- a/libc/unicode/strnwidth16.c +++ b/libc/str/strnwidth16.c @@ -19,7 +19,7 @@ #include "libc/intrin/safemacros.internal.h" #include "libc/str/oldutf16.internal.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. diff --git a/libc/unicode/strwidth.c b/libc/str/strwidth.c similarity index 98% rename from libc/unicode/strwidth.c rename to libc/str/strwidth.c index 7711f0577..cc5af4605 100644 --- a/libc/unicode/strwidth.c +++ b/libc/str/strwidth.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" /** * Returns monospace display width of UTF-8 string. diff --git a/libc/unicode/strwidth16.c b/libc/str/strwidth16.c similarity index 98% rename from libc/unicode/strwidth16.c rename to libc/str/strwidth16.c index 21d8be632..e14700ffe 100644 --- a/libc/unicode/strwidth16.c +++ b/libc/str/strwidth16.c @@ -18,7 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/intrin/safemacros.internal.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. diff --git a/libc/unicode/strxfrm_l.c b/libc/str/strxfrm_l.c similarity index 98% rename from libc/unicode/strxfrm_l.c rename to libc/str/strxfrm_l.c index fc558a855..b0f1c7e30 100644 --- a/libc/unicode/strxfrm_l.c +++ b/libc/str/strxfrm_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #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) { return strxfrm(dest, src, count); diff --git a/libc/unicode/tolower_l.c b/libc/str/tolower_l.c similarity index 98% rename from libc/unicode/tolower_l.c rename to libc/str/tolower_l.c index 4051e7f4d..0dbb85e56 100644 --- a/libc/unicode/tolower_l.c +++ b/libc/str/tolower_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" int tolower_l(int c, locale_t l) { return tolower(c); diff --git a/libc/unicode/toupper_l.c b/libc/str/toupper_l.c similarity index 98% rename from libc/unicode/toupper_l.c rename to libc/str/toupper_l.c index 75fc24261..a4edcc6c7 100644 --- a/libc/unicode/toupper_l.c +++ b/libc/str/toupper_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" int toupper_l(int c, locale_t l) { return toupper(c); diff --git a/libc/unicode/towlower_l.c b/libc/str/towlower_l.c similarity index 98% rename from libc/unicode/towlower_l.c rename to libc/str/towlower_l.c index 3a0041dbe..90f338ec1 100644 --- a/libc/unicode/towlower_l.c +++ b/libc/str/towlower_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #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) { return towlower(c); diff --git a/libc/unicode/towupper_l.c b/libc/str/towupper_l.c similarity index 98% rename from libc/unicode/towupper_l.c rename to libc/str/towupper_l.c index 75bffa24b..d4a72c07a 100644 --- a/libc/unicode/towupper_l.c +++ b/libc/str/towupper_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #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) { return towupper(c); diff --git a/libc/unicode/unicode-properties.txt b/libc/str/unicode-properties.txt similarity index 100% rename from libc/unicode/unicode-properties.txt rename to libc/str/unicode-properties.txt diff --git a/libc/unicode/unicode.h b/libc/str/unicode.h similarity index 88% rename from libc/unicode/unicode.h rename to libc/str/unicode.h index dcda307a4..4da460be3 100644 --- a/libc/unicode/unicode.h +++ b/libc/str/unicode.h @@ -1,5 +1,5 @@ -#ifndef COSMOPOLITAN_LIBC_UNICODE_UNICODE_H_ -#define COSMOPOLITAN_LIBC_UNICODE_UNICODE_H_ +#ifndef COSMOPOLITAN_LIBC_STR_UNICODE_H_ +#define COSMOPOLITAN_LIBC_STR_UNICODE_H_ #if !(__ASSEMBLER__ + __LINKER__ + 0) COSMOPOLITAN_C_START_ @@ -41,4 +41,4 @@ struct lconv *localeconv(void); COSMOPOLITAN_C_END_ #endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ -#endif /* COSMOPOLITAN_LIBC_UNICODE_UNICODE_H_ */ +#endif /* COSMOPOLITAN_LIBC_STR_UNICODE_H_ */ diff --git a/libc/unicode/unicodedata.txt b/libc/str/unicodedata.txt similarity index 100% rename from libc/unicode/unicodedata.txt rename to libc/str/unicodedata.txt diff --git a/libc/str/update.sh b/libc/str/update.sh new file mode 100755 index 000000000..62ca31faa --- /dev/null +++ b/libc/str/update.sh @@ -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 diff --git a/libc/unicode/uselocale.c b/libc/str/uselocale.c similarity index 98% rename from libc/unicode/uselocale.c rename to libc/str/uselocale.c index 84cf0bca3..ee5091b62 100644 --- a/libc/unicode/uselocale.c +++ b/libc/str/uselocale.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/sysv/errfuns.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" locale_t uselocale(locale_t l) { // TODO: implement me! diff --git a/libc/unicode/wcscoll_l.c b/libc/str/wcscoll_l.c similarity index 98% rename from libc/unicode/wcscoll_l.c rename to libc/str/wcscoll_l.c index 9fec90a52..2e2fad18d 100644 --- a/libc/unicode/wcscoll_l.c +++ b/libc/str/wcscoll_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #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) { return wcscmp(p, q); diff --git a/libc/unicode/wcsnwidth.c b/libc/str/wcsnwidth.c similarity index 98% rename from libc/unicode/wcsnwidth.c rename to libc/str/wcsnwidth.c index f8f0edf82..0fd76a322 100644 --- a/libc/unicode/wcsnwidth.c +++ b/libc/str/wcsnwidth.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" /** * Returns monospace display width of wide character string. diff --git a/libc/unicode/wcswidth.c b/libc/str/wcswidth.c similarity index 98% rename from libc/unicode/wcswidth.c rename to libc/str/wcswidth.c index 2083b4239..7c1c2eca0 100644 --- a/libc/unicode/wcswidth.c +++ b/libc/str/wcswidth.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/limits.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" /** * Returns monospace display width of wide character string. diff --git a/libc/unicode/wcsxfrm_l.c b/libc/str/wcsxfrm_l.c similarity index 98% rename from libc/unicode/wcsxfrm_l.c rename to libc/str/wcsxfrm_l.c index 8ac2f5317..25611bf38 100644 --- a/libc/unicode/wcsxfrm_l.c +++ b/libc/str/wcsxfrm_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #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) { return wcsxfrm(dest, src, count); diff --git a/libc/unicode/wcwidth.c b/libc/str/wcwidth.c similarity index 98% rename from libc/unicode/wcwidth.c rename to libc/str/wcwidth.c index 1a3384bdf..b94dc6f3f 100644 --- a/libc/unicode/wcwidth.c +++ b/libc/str/wcwidth.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/intrin/likely.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" extern const uint8_t kEastAsianWidth[]; extern const uint32_t kEastAsianWidthBits; diff --git a/libc/testlib/testlib.mk b/libc/testlib/testlib.mk index af6ecf985..b4b422893 100644 --- a/libc/testlib/testlib.mk +++ b/libc/testlib/testlib.mk @@ -108,7 +108,6 @@ LIBC_TESTLIB_A_DIRECTDEPS = \ LIBC_SYSV_CALLS \ LIBC_TIME \ LIBC_TINYMATH \ - LIBC_UNICODE \ LIBC_X \ LIBC_ZIPOS \ THIRD_PARTY_DLMALLOC \ diff --git a/libc/thread/thread.h b/libc/thread/thread.h index ede8edbe0..900041004 100644 --- a/libc/thread/thread.h +++ b/libc/thread/thread.h @@ -3,7 +3,7 @@ #include "libc/calls/struct/timespec.h" #include "libc/intrin/pthread.h" #include "libc/runtime/runtime.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #define CTHREAD_CREATE_DETACHED 1 #define CTHREAD_CREATE_JOINABLE 0 diff --git a/libc/time/strftime.c b/libc/time/strftime.c index ab673610a..9090c569b 100644 --- a/libc/time/strftime.c +++ b/libc/time/strftime.c @@ -21,7 +21,7 @@ #include "libc/stdio/stdio.h" #include "libc/time/time.h" #include "libc/time/tz.internal.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" // clang-format off // converts broken-down timestamp to string diff --git a/libc/unicode/unicode.mk b/libc/unicode/unicode.mk deleted file mode 100644 index a9ba5f79b..000000000 --- a/libc/unicode/unicode.mk +++ /dev/null @@ -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 $@ $< diff --git a/libc/unicode/update.sh b/libc/unicode/update.sh deleted file mode 100755 index 01280e065..000000000 --- a/libc/unicode/update.sh +++ /dev/null @@ -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 diff --git a/test/libc/calls/test.mk b/test/libc/calls/test.mk index dc25f85c7..ab64f1fea 100644 --- a/test/libc/calls/test.mk +++ b/test/libc/calls/test.mk @@ -46,7 +46,6 @@ TEST_LIBC_CALLS_DIRECTDEPS = \ LIBC_THREAD \ LIBC_TIME \ LIBC_TESTLIB \ - LIBC_UNICODE \ LIBC_X \ LIBC_ZIPOS \ THIRD_PARTY_XED diff --git a/test/libc/fmt/test.mk b/test/libc/fmt/test.mk index 3b081db2b..3c76b56ea 100644 --- a/test/libc/fmt/test.mk +++ b/test/libc/fmt/test.mk @@ -30,7 +30,6 @@ TEST_LIBC_FMT_DIRECTDEPS = \ LIBC_SYSV \ LIBC_TESTLIB \ LIBC_TINYMATH \ - LIBC_UNICODE \ LIBC_X \ THIRD_PARTY_GDTOA diff --git a/test/libc/intrin/test.mk b/test/libc/intrin/test.mk index 075025548..5eb021c64 100644 --- a/test/libc/intrin/test.mk +++ b/test/libc/intrin/test.mk @@ -37,7 +37,6 @@ TEST_LIBC_INTRIN_DIRECTDEPS = \ LIBC_THREAD \ LIBC_TESTLIB \ LIBC_TINYMATH \ - LIBC_UNICODE \ LIBC_X \ TOOL_VIZ_LIB \ THIRD_PARTY_COMPILER_RT diff --git a/test/libc/nexgen32e/kcp437_test.c b/test/libc/nexgen32e/kcp437_test.c index 03c69c9c4..2497ff162 100644 --- a/test/libc/nexgen32e/kcp437_test.c +++ b/test/libc/nexgen32e/kcp437_test.c @@ -19,7 +19,7 @@ #include "libc/nexgen32e/nexgen32e.h" #include "libc/str/str.h" #include "libc/testlib/testlib.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" TEST(kcp437, test) { long i; diff --git a/test/libc/nexgen32e/test.mk b/test/libc/nexgen32e/test.mk index 14b546476..4728a7cbb 100644 --- a/test/libc/nexgen32e/test.mk +++ b/test/libc/nexgen32e/test.mk @@ -37,7 +37,6 @@ TEST_LIBC_NEXGEN32E_DIRECTDEPS = \ LIBC_STUBS \ LIBC_SYSV \ LIBC_TESTLIB \ - LIBC_UNICODE \ LIBC_X \ TOOL_VIZ_LIB \ THIRD_PARTY_XED diff --git a/test/libc/runtime/test.mk b/test/libc/runtime/test.mk index bbd0300f8..e1678f71f 100644 --- a/test/libc/runtime/test.mk +++ b/test/libc/runtime/test.mk @@ -37,7 +37,6 @@ TEST_LIBC_RUNTIME_DIRECTDEPS = \ LIBC_THREAD \ LIBC_TESTLIB \ LIBC_TINYMATH \ - LIBC_UNICODE \ LIBC_X \ LIBC_ZIPOS \ TOOL_BUILD_LIB \ diff --git a/test/libc/stdio/test.mk b/test/libc/stdio/test.mk index 2f5191e97..845cfa4be 100644 --- a/test/libc/stdio/test.mk +++ b/test/libc/stdio/test.mk @@ -38,7 +38,6 @@ TEST_LIBC_STDIO_DIRECTDEPS = \ LIBC_THREAD \ LIBC_TIME \ LIBC_LOG \ - LIBC_UNICODE \ LIBC_X \ LIBC_ZIPOS \ THIRD_PARTY_GDTOA \ diff --git a/test/libc/str/pututf16_test.c b/test/libc/str/pututf16_test.c index e2172efa1..49e1fa5d5 100644 --- a/test/libc/str/pututf16_test.c +++ b/test/libc/str/pututf16_test.c @@ -22,7 +22,7 @@ #include "libc/str/oldutf16.internal.h" #include "libc/str/str.h" #include "libc/testlib/testlib.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" unsigned n; size_t size; diff --git a/test/libc/unicode/strnwidth_test.c b/test/libc/str/strnwidth_test.c similarity index 98% rename from test/libc/unicode/strnwidth_test.c rename to test/libc/str/strnwidth_test.c index 4d04c77d0..e6590267c 100644 --- a/test/libc/unicode/strnwidth_test.c +++ b/test/libc/str/strnwidth_test.c @@ -20,7 +20,7 @@ #include "libc/testlib/ezbench.h" #include "libc/testlib/hyperion.h" #include "libc/testlib/testlib.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" TEST(strwidth, test) { EXPECT_EQ(5, strwidth("hello", 0)); diff --git a/test/libc/str/test.mk b/test/libc/str/test.mk index d8269191d..73ff4c7b0 100644 --- a/test/libc/str/test.mk +++ b/test/libc/str/test.mk @@ -45,7 +45,6 @@ TEST_LIBC_STR_DIRECTDEPS = \ LIBC_SYSV \ LIBC_SYSV_CALLS \ LIBC_TESTLIB \ - LIBC_UNICODE \ LIBC_X \ LIBC_ZIPOS \ THIRD_PARTY_MBEDTLS \ @@ -74,19 +73,9 @@ o/$(MODE)/test/libc/str/%.com.dbg: \ $(APE_NO_MODIFY_SELF) @$(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 \ - DEFAULT_CCFLAGS += \ - -fno-builtin + DEFAULT_CCFLAGS += \ + -fno-builtin o/$(MODE)/test/libc/str/memmove_test.o: private \ OVERRIDE_CFLAGS += \ diff --git a/test/libc/unicode/wcwidth_test.c b/test/libc/str/wcwidth_test.c similarity index 99% rename from test/libc/unicode/wcwidth_test.c rename to test/libc/str/wcwidth_test.c index 898ebfc3c..6b68f3e5e 100644 --- a/test/libc/unicode/wcwidth_test.c +++ b/test/libc/str/wcwidth_test.c @@ -20,7 +20,7 @@ #include "libc/str/str.h" #include "libc/testlib/ezbench.h" #include "libc/testlib/testlib.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" TEST(wcwidth, test) { ASSERT_EQ(0, wcwidth(0)); diff --git a/test/libc/test.mk b/test/libc/test.mk index ec2c0eca5..ef908621a 100644 --- a/test/libc/test.mk +++ b/test/libc/test.mk @@ -18,6 +18,5 @@ o/$(MODE)/test/libc: \ o/$(MODE)/test/libc/thread \ o/$(MODE)/test/libc/time \ o/$(MODE)/test/libc/tinymath \ - o/$(MODE)/test/libc/unicode \ o/$(MODE)/test/libc/x \ o/$(MODE)/test/libc/xed diff --git a/test/libc/tinymath/test.mk b/test/libc/tinymath/test.mk index 5df1991ce..44f155c04 100644 --- a/test/libc/tinymath/test.mk +++ b/test/libc/tinymath/test.mk @@ -35,7 +35,6 @@ TEST_LIBC_TINYMATH_DIRECTDEPS = \ LIBC_SYSV \ LIBC_TESTLIB \ LIBC_TINYMATH \ - LIBC_UNICODE \ LIBC_X \ THIRD_PARTY_GDTOA \ THIRD_PARTY_DOUBLECONVERSION diff --git a/test/libc/unicode/test.mk b/test/libc/unicode/test.mk deleted file mode 100644 index 85ecba50c..000000000 --- a/test/libc/unicode/test.mk +++ /dev/null @@ -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) diff --git a/test/libc/x/test.mk b/test/libc/x/test.mk index 06f3aaa4b..af205505e 100644 --- a/test/libc/x/test.mk +++ b/test/libc/x/test.mk @@ -35,7 +35,6 @@ TEST_LIBC_X_DIRECTDEPS = \ LIBC_STUBS \ LIBC_SYSV \ LIBC_TESTLIB \ - LIBC_UNICODE \ LIBC_X \ THIRD_PARTY_GDTOA diff --git a/test/tool/args/test.mk b/test/tool/args/test.mk index 91bd5eca5..673946eaa 100644 --- a/test/tool/args/test.mk +++ b/test/tool/args/test.mk @@ -41,7 +41,6 @@ TEST_TOOL_ARGS_DIRECTDEPS = \ LIBC_STUBS \ LIBC_SYSV \ LIBC_TESTLIB \ - LIBC_UNICODE \ LIBC_ZIPOS \ LIBC_X \ THIRD_PARTY_COMPILER_RT \ diff --git a/test/tool/build/lib/pty_test.c b/test/tool/build/lib/pty_test.c index 048882cd8..c5bdbfd76 100644 --- a/test/tool/build/lib/pty_test.c +++ b/test/tool/build/lib/pty_test.c @@ -23,7 +23,7 @@ #include "libc/str/str.h" #include "libc/testlib/ezbench.h" #include "libc/testlib/testlib.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" #include "tool/build/lib/pty.h" char *render(struct Pty *pty) { diff --git a/test/tool/build/lib/test.mk b/test/tool/build/lib/test.mk index 28ffd7bee..0fb48fcb2 100644 --- a/test/tool/build/lib/test.mk +++ b/test/tool/build/lib/test.mk @@ -41,7 +41,6 @@ TEST_TOOL_BUILD_LIB_DIRECTDEPS = \ LIBC_STUBS \ LIBC_SYSV \ LIBC_TESTLIB \ - LIBC_UNICODE \ LIBC_X \ THIRD_PARTY_COMPILER_RT \ TOOL_BUILD_LIB \ diff --git a/test/tool/net/test.mk b/test/tool/net/test.mk index 7e9e669ba..5555bdf85 100644 --- a/test/tool/net/test.mk +++ b/test/tool/net/test.mk @@ -42,7 +42,6 @@ TEST_TOOL_NET_DIRECTDEPS = \ LIBC_STUBS \ LIBC_SYSV \ LIBC_TESTLIB \ - LIBC_UNICODE \ LIBC_X \ LIBC_ZIPOS \ THIRD_PARTY_REGEX \ diff --git a/test/tool/plinko/test.mk b/test/tool/plinko/test.mk index 7cb129807..0c6b1ca50 100644 --- a/test/tool/plinko/test.mk +++ b/test/tool/plinko/test.mk @@ -49,7 +49,6 @@ TEST_TOOL_PLINKO_DIRECTDEPS = \ LIBC_STUBS \ LIBC_SYSV \ LIBC_TESTLIB \ - LIBC_UNICODE \ LIBC_X \ LIBC_ZIPOS \ THIRD_PARTY_COMPILER_RT \ diff --git a/test/tool/viz/lib/test.mk b/test/tool/viz/lib/test.mk index 54a639c32..12208a778 100644 --- a/test/tool/viz/lib/test.mk +++ b/test/tool/viz/lib/test.mk @@ -36,7 +36,6 @@ TEST_TOOL_VIZ_LIB_DIRECTDEPS = \ LIBC_STR \ LIBC_TIME \ LIBC_TINYMATH \ - LIBC_UNICODE \ LIBC_X \ TOOL_VIZ_LIB diff --git a/third_party/argon2/argon2.mk b/third_party/argon2/argon2.mk index 977dfd2c6..e550db33d 100644 --- a/third_party/argon2/argon2.mk +++ b/third_party/argon2/argon2.mk @@ -26,7 +26,6 @@ THIRD_PARTY_ARGON2_A_DIRECTDEPS = \ LIBC_RUNTIME \ LIBC_SYSV_CALLS \ LIBC_STR \ - LIBC_UNICODE \ LIBC_STUBS THIRD_PARTY_ARGON2_A_DEPS := \ diff --git a/third_party/chibicc/chibicc.h b/third_party/chibicc/chibicc.h index 24586cd8f..61d254d50 100644 --- a/third_party/chibicc/chibicc.h +++ b/third_party/chibicc/chibicc.h @@ -23,7 +23,7 @@ #include "libc/str/str.h" #include "libc/time/struct/tm.h" #include "libc/time/time.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" #include "libc/x/x.h" #include "third_party/gdtoa/gdtoa.h" #include "tool/build/lib/javadown.h" diff --git a/third_party/chibicc/chibicc.mk b/third_party/chibicc/chibicc.mk index 6702c71ca..f0eee938e 100644 --- a/third_party/chibicc/chibicc.mk +++ b/third_party/chibicc/chibicc.mk @@ -56,7 +56,6 @@ THIRD_PARTY_CHIBICC_A_DIRECTDEPS = \ LIBC_STUBS \ LIBC_SYSV \ LIBC_TIME \ - LIBC_UNICODE \ LIBC_X \ THIRD_PARTY_COMPILER_RT \ THIRD_PARTY_DLMALLOC \ diff --git a/third_party/chibicc/test/test.mk b/third_party/chibicc/test/test.mk index 06829d6d2..f6a451c88 100644 --- a/third_party/chibicc/test/test.mk +++ b/third_party/chibicc/test/test.mk @@ -44,7 +44,6 @@ THIRD_PARTY_CHIBICC_TEST_DIRECTDEPS = \ LIBC_STR \ LIBC_STUBS \ LIBC_TINYMATH \ - LIBC_UNICODE \ LIBC_X \ THIRD_PARTY_CHIBICC \ THIRD_PARTY_COMPILER_RT diff --git a/third_party/double-conversion/double-conversion.mk b/third_party/double-conversion/double-conversion.mk index eb68607ae..358641f72 100644 --- a/third_party/double-conversion/double-conversion.mk +++ b/third_party/double-conversion/double-conversion.mk @@ -73,7 +73,6 @@ THIRD_PARTY_DOUBLECONVERSION_A_DIRECTDEPS = \ LIBC_SYSV \ LIBC_STR \ LIBC_STUBS \ - LIBC_UNICODE \ LIBC_TINYMATH \ THIRD_PARTY_GDTOA \ THIRD_PARTY_LIBCXX diff --git a/third_party/finger/finger.mk b/third_party/finger/finger.mk index 9910d2cca..f29c90a0d 100644 --- a/third_party/finger/finger.mk +++ b/third_party/finger/finger.mk @@ -26,7 +26,6 @@ THIRD_PARTY_FINGER_A_DIRECTDEPS = \ LIBC_DNS \ LIBC_SOCK \ LIBC_TIME \ - LIBC_UNICODE \ THIRD_PARTY_MUSL \ THIRD_PARTY_GETOPT diff --git a/third_party/gdtoa/strtod_l.c b/third_party/gdtoa/strtod_l.c index 346894004..e89b5cda1 100644 --- a/third_party/gdtoa/strtod_l.c +++ b/third_party/gdtoa/strtod_l.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "third_party/gdtoa/gdtoa.h" double strtod_l(const char *s, char **endptr, locale_t l) { diff --git a/third_party/gdtoa/strtof_l.c b/third_party/gdtoa/strtof_l.c index e302df715..48ba3d17b 100644 --- a/third_party/gdtoa/strtof_l.c +++ b/third_party/gdtoa/strtof_l.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "third_party/gdtoa/gdtoa.h" float strtof_l(const char *s, char **sp, locale_t l) { diff --git a/third_party/gdtoa/strtold_l.c b/third_party/gdtoa/strtold_l.c index 5f1934242..3559fb55e 100644 --- a/third_party/gdtoa/strtold_l.c +++ b/third_party/gdtoa/strtold_l.c @@ -29,7 +29,7 @@ │ THIS SOFTWARE. │ │ │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "third_party/gdtoa/gdtoa.h" /** diff --git a/third_party/gdtoa/wcstod.c b/third_party/gdtoa/wcstod.c index 41b1439e3..d0391444c 100644 --- a/third_party/gdtoa/wcstod.c +++ b/third_party/gdtoa/wcstod.c @@ -19,7 +19,7 @@ #include "libc/assert.h" #include "libc/fmt/conv.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) { assert(!"not implemented"); diff --git a/third_party/gdtoa/wcstof.c b/third_party/gdtoa/wcstof.c index 7b1ac07c6..2d6cba421 100644 --- a/third_party/gdtoa/wcstof.c +++ b/third_party/gdtoa/wcstof.c @@ -19,7 +19,7 @@ #include "libc/assert.h" #include "libc/fmt/conv.h" #include "libc/runtime/runtime.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "third_party/gdtoa/gdtoa.h" float wcstof(const wchar_t *nptr, wchar_t **endptr) { diff --git a/third_party/gdtoa/wcstold.c b/third_party/gdtoa/wcstold.c index b925100eb..17cdaa38b 100644 --- a/third_party/gdtoa/wcstold.c +++ b/third_party/gdtoa/wcstold.c @@ -19,7 +19,7 @@ #include "libc/assert.h" #include "libc/fmt/conv.h" #include "libc/runtime/runtime.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "third_party/gdtoa/gdtoa.h" long double wcstold(const wchar_t *nptr, wchar_t **endptr) { diff --git a/third_party/gdtoa/wcstold_l.c b/third_party/gdtoa/wcstold_l.c index 8b75c0d84..f7682a623 100644 --- a/third_party/gdtoa/wcstold_l.c +++ b/third_party/gdtoa/wcstold_l.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/fmt/conv.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "third_party/gdtoa/gdtoa.h" long double wcstold_l(const wchar_t *nptr, wchar_t **endptr, locale_t l) { diff --git a/third_party/getopt/getopt.mk b/third_party/getopt/getopt.mk index 71c417018..07e5dec93 100644 --- a/third_party/getopt/getopt.mk +++ b/third_party/getopt/getopt.mk @@ -31,7 +31,6 @@ THIRD_PARTY_GETOPT_A_DIRECTDEPS = \ LIBC_NEXGEN32E \ LIBC_STDIO \ LIBC_STR \ - LIBC_UNICODE \ LIBC_STUBS THIRD_PARTY_GETOPT_A_DEPS := \ diff --git a/third_party/libcxx/__bsd_locale_fallbacks.h b/third_party/libcxx/__bsd_locale_fallbacks.h index 62bf14b9c..019fb3f97 100644 --- a/third_party/libcxx/__bsd_locale_fallbacks.h +++ b/third_party/libcxx/__bsd_locale_fallbacks.h @@ -15,7 +15,7 @@ #include "third_party/libcxx/stdlib.h" #include "libc/mem/fmt.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" #include "third_party/libcxx/memory" #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/third_party/libcxx/clocale b/third_party/libcxx/clocale index 169d079b2..5c6653892 100644 --- a/third_party/libcxx/clocale +++ b/third_party/libcxx/clocale @@ -36,7 +36,7 @@ lconv* localeconv(); */ #include "third_party/libcxx/__config" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/third_party/libcxx/libcxx.mk b/third_party/libcxx/libcxx.mk index 040c1fd73..08a90f280 100644 --- a/third_party/libcxx/libcxx.mk +++ b/third_party/libcxx/libcxx.mk @@ -163,7 +163,6 @@ THIRD_PARTY_LIBCXX_A_DIRECTDEPS = \ LIBC_SYSV \ LIBC_TIME \ LIBC_TINYMATH \ - LIBC_UNICODE \ THIRD_PARTY_GDTOA THIRD_PARTY_LIBCXX_A_DEPS := \ diff --git a/third_party/libcxx/locale b/third_party/libcxx/locale index e66d0dc15..bef8d232f 100644 --- a/third_party/libcxx/locale +++ b/third_party/libcxx/locale @@ -25,7 +25,7 @@ #include "third_party/libcxx/ctime" #include "third_party/libcxx/cstdio" #ifdef _LIBCPP_HAS_CATOPEN -# include "libc/unicode/locale.h" +# include "libc/str/locale.h" # include "third_party/libcxx/nl_types.h" #endif diff --git a/third_party/libcxx/locale.cc b/third_party/libcxx/locale.cc index ca0ac9651..c5a8efc24 100644 --- a/third_party/libcxx/locale.cc +++ b/third_party/libcxx/locale.cc @@ -27,7 +27,7 @@ #include "third_party/libcxx/cwctype" #include "third_party/libcxx/__sso_allocator" #include "third_party/libcxx/include/atomic_support.hh" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "third_party/libcxx/__undef_macros" // On Linux, wint_t and wchar_t have different signed-ness, and this causes diff --git a/third_party/linenoise/linenoise.c b/third_party/linenoise/linenoise.c index e0e7e281d..efc7d2506 100644 --- a/third_party/linenoise/linenoise.c +++ b/third_party/linenoise/linenoise.c @@ -164,7 +164,7 @@ #include "libc/sysv/consts/sig.h" #include "libc/sysv/consts/termios.h" #include "libc/sysv/errfuns.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" #include "net/http/escape.h" #include "third_party/linenoise/linenoise.h" #include "tool/build/lib/case.h" diff --git a/third_party/linenoise/linenoise.mk b/third_party/linenoise/linenoise.mk index 9c9ea594a..32228934c 100644 --- a/third_party/linenoise/linenoise.mk +++ b/third_party/linenoise/linenoise.mk @@ -28,7 +28,6 @@ THIRD_PARTY_LINENOISE_A_DIRECTDEPS = \ LIBC_LOG \ LIBC_SYSV_CALLS \ LIBC_STR \ - LIBC_UNICODE \ LIBC_STUBS \ NET_HTTP diff --git a/third_party/lua/loslib.c b/third_party/lua/loslib.c index f1f6baf0d..71ea84c8b 100644 --- a/third_party/lua/loslib.c +++ b/third_party/lua/loslib.c @@ -36,7 +36,7 @@ #include "libc/sysv/consts/exit.h" #include "libc/time/struct/tm.h" #include "libc/time/time.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "third_party/lua/lauxlib.h" #include "third_party/lua/lprefix.h" #include "third_party/lua/lua.h" diff --git a/third_party/lua/lua.mk b/third_party/lua/lua.mk index 76704abee..c66574ca7 100644 --- a/third_party/lua/lua.mk +++ b/third_party/lua/lua.mk @@ -129,7 +129,6 @@ THIRD_PARTY_LUA_A_DIRECTDEPS = \ LIBC_TIME \ LIBC_X \ LIBC_TINYMATH \ - LIBC_UNICODE \ NET_HTTP \ THIRD_PARTY_LINENOISE \ THIRD_PARTY_DOUBLECONVERSION \ @@ -260,7 +259,6 @@ THIRD_PARTY_LUA_LUAC_DIRECTDEPS = \ LIBC_STDIO \ LIBC_STR \ LIBC_SYSV \ - LIBC_UNICODE \ THIRD_PARTY_LUA \ TOOL_ARGS diff --git a/third_party/lua/luaconf.h b/third_party/lua/luaconf.h index 0f2ac4403..0a6d34fc5 100644 --- a/third_party/lua/luaconf.h +++ b/third_party/lua/luaconf.h @@ -4,7 +4,7 @@ #include "libc/dce.h" #include "libc/fmt/fmt.h" #include "libc/limits.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" #include "third_party/gdtoa/gdtoa.h" #define LUA_USE_POSIX diff --git a/third_party/lz4cli/lz4cli.mk b/third_party/lz4cli/lz4cli.mk index 7fb87a94a..1041a6a53 100644 --- a/third_party/lz4cli/lz4cli.mk +++ b/third_party/lz4cli/lz4cli.mk @@ -42,8 +42,7 @@ THIRD_PARTY_LZ4CLI_DIRECTDEPS = \ LIBC_INTRIN \ LIBC_STDIO \ LIBC_LOG \ - LIBC_TIME \ - LIBC_UNICODE + LIBC_TIME THIRD_PARTY_LZ4CLI_DEPS := \ $(call uniq,$(foreach x,$(THIRD_PARTY_LZ4CLI_DIRECTDEPS),$($(x)))) diff --git a/third_party/make/make.mk b/third_party/make/make.mk index 47670bd78..3df09c3db 100644 --- a/third_party/make/make.mk +++ b/third_party/make/make.mk @@ -124,7 +124,6 @@ THIRD_PARTY_MAKE_DIRECTDEPS = \ LIBC_SYSV_CALLS \ LIBC_TIME \ LIBC_TINYMATH \ - LIBC_UNICODE \ LIBC_X \ THIRD_PARTY_COMPILER_RT \ THIRD_PARTY_MUSL \ diff --git a/third_party/make/makeint.inc b/third_party/make/makeint.inc index eea604cfa..9a6421ae2 100644 --- a/third_party/make/makeint.inc +++ b/third_party/make/makeint.inc @@ -50,7 +50,7 @@ this program. If not, see . */ #include "libc/sysv/consts/w.h" #include "libc/time/struct/tm.h" #include "libc/time/time.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "libc/x/x.h" #include "third_party/gdtoa/gdtoa.h" #include "third_party/musl/glob.h" diff --git a/third_party/maxmind/maxmind.mk b/third_party/maxmind/maxmind.mk index 19d030d6f..4b5e8c935 100644 --- a/third_party/maxmind/maxmind.mk +++ b/third_party/maxmind/maxmind.mk @@ -27,8 +27,7 @@ THIRD_PARTY_MAXMIND_A_DIRECTDEPS = \ LIBC_STDIO \ LIBC_STR \ LIBC_STUBS \ - LIBC_SYSV \ - LIBC_UNICODE + LIBC_SYSV THIRD_PARTY_MAXMIND_A_DEPS := \ $(call uniq,$(foreach x,$(THIRD_PARTY_MAXMIND_A_DIRECTDEPS),$($(x)))) diff --git a/third_party/mbedtls/mbedtls.mk b/third_party/mbedtls/mbedtls.mk index afab323c1..9cb296a37 100644 --- a/third_party/mbedtls/mbedtls.mk +++ b/third_party/mbedtls/mbedtls.mk @@ -29,7 +29,6 @@ THIRD_PARTY_MBEDTLS_A_DIRECTDEPS = \ LIBC_STR \ LIBC_SYSV \ LIBC_TIME \ - LIBC_UNICODE \ NET_HTTP \ THIRD_PARTY_COMPILER_RT \ THIRD_PARTY_GDTOA \ diff --git a/third_party/mbedtls/test/test.mk b/third_party/mbedtls/test/test.mk index 1b6b20fa2..d7acf12b5 100644 --- a/third_party/mbedtls/test/test.mk +++ b/third_party/mbedtls/test/test.mk @@ -107,7 +107,6 @@ THIRD_PARTY_MBEDTLS_TEST_DIRECTDEPS = \ LIBC_SYSV \ LIBC_TIME \ LIBC_TESTLIB \ - LIBC_UNICODE \ LIBC_X \ LIBC_ZIPOS \ THIRD_PARTY_COMPILER_RT \ diff --git a/third_party/python/Modules/_decimal/libmpdec/io.c b/third_party/python/Modules/_decimal/libmpdec/io.c index 79f191360..5a7818157 100644 --- a/third_party/python/Modules/_decimal/libmpdec/io.c +++ b/third_party/python/Modules/_decimal/libmpdec/io.c @@ -29,8 +29,8 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/errno.h" #include "libc/fmt/fmt.h" -#include "libc/unicode/locale.h" -#include "libc/unicode/unicode.h" +#include "libc/str/locale.h" +#include "libc/str/unicode.h" #include "third_party/python/Modules/_decimal/libmpdec/bits.h" #include "third_party/python/Modules/_decimal/libmpdec/constants.h" #include "third_party/python/Modules/_decimal/libmpdec/io.h" diff --git a/third_party/python/Modules/_localemodule.c b/third_party/python/Modules/_localemodule.c index bbe0e0d40..76b175881 100644 --- a/third_party/python/Modules/_localemodule.c +++ b/third_party/python/Modules/_localemodule.c @@ -5,9 +5,9 @@ │ https://docs.python.org/3/license.html │ ╚─────────────────────────────────────────────────────────────────────────────*/ #define PY_SSIZE_T_CLEAN -#include "libc/unicode/langinfo.h" -#include "libc/unicode/locale.h" -#include "libc/unicode/unicode.h" +#include "libc/str/langinfo.h" +#include "libc/str/locale.h" +#include "libc/str/unicode.h" #include "third_party/python/Include/dictobject.h" #include "third_party/python/Include/fileutils.h" #include "third_party/python/Include/import.h" diff --git a/third_party/python/Modules/main.c b/third_party/python/Modules/main.c index 44563a5d6..ad87a68dd 100644 --- a/third_party/python/Modules/main.c +++ b/third_party/python/Modules/main.c @@ -9,7 +9,7 @@ #include "libc/errno.h" #include "libc/stdio/stdio.h" #include "libc/sysv/consts/s.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "third_party/python/Include/abstract.h" #include "third_party/python/Include/bytesobject.h" #include "third_party/python/Include/ceval.h" diff --git a/third_party/python/Python/fileutils.c b/third_party/python/Python/fileutils.c index c796db2f0..ae11d2482 100644 --- a/third_party/python/Python/fileutils.c +++ b/third_party/python/Python/fileutils.c @@ -14,8 +14,8 @@ #include "libc/sysv/consts/fd.h" #include "libc/sysv/consts/fio.h" #include "libc/sysv/consts/o.h" -#include "libc/unicode/locale.h" -#include "libc/unicode/unicode.h" +#include "libc/str/locale.h" +#include "libc/str/unicode.h" #include "third_party/python/Include/bytesobject.h" #include "third_party/python/Include/ceval.h" #include "third_party/python/Include/fileutils.h" diff --git a/third_party/python/Python/formatter_unicode.c b/third_party/python/Python/formatter_unicode.c index 4ffb80010..e078df711 100644 --- a/third_party/python/Python/formatter_unicode.c +++ b/third_party/python/Python/formatter_unicode.c @@ -5,7 +5,7 @@ │ https://docs.python.org/3/license.html │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/math.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "third_party/python/Include/abstract.h" #include "third_party/python/Include/complexobject.h" #include "third_party/python/Include/fileutils.h" diff --git a/third_party/python/Python/frozenmain.c b/third_party/python/Python/frozenmain.c index e94925fcf..b679b35e0 100644 --- a/third_party/python/Python/frozenmain.c +++ b/third_party/python/Python/frozenmain.c @@ -6,7 +6,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/calls/calls.h" #include "libc/stdio/stdio.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "third_party/python/Include/fileutils.h" #include "third_party/python/Include/import.h" #include "third_party/python/Include/pydebug.h" diff --git a/third_party/python/Python/initimport.c b/third_party/python/Python/initimport.c index 0a90e4d1f..f28332fd7 100644 --- a/third_party/python/Python/initimport.c +++ b/third_party/python/Python/initimport.c @@ -5,7 +5,7 @@ │ https://docs.python.org/3/license.html │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/calls/internal.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "third_party/python/Include/abstract.h" #include "third_party/python/Include/boolobject.h" #include "third_party/python/Include/codecs.h" diff --git a/third_party/python/Python/initstdio.c b/third_party/python/Python/initstdio.c index 7fb079843..8f7f623a5 100644 --- a/third_party/python/Python/initstdio.c +++ b/third_party/python/Python/initstdio.c @@ -5,7 +5,7 @@ │ https://docs.python.org/3/license.html │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/calls/internal.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "third_party/python/Include/abstract.h" #include "third_party/python/Include/boolobject.h" #include "third_party/python/Include/codecs.h" diff --git a/third_party/python/Python/pylifecycle.c b/third_party/python/Python/pylifecycle.c index 3f5a34ef3..ca43dfd2e 100644 --- a/third_party/python/Python/pylifecycle.c +++ b/third_party/python/Python/pylifecycle.c @@ -14,7 +14,7 @@ #include "libc/runtime/runtime.h" #include "libc/stdio/stdio.h" #include "libc/sysv/consts/sig.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "third_party/python/Include/Python-ast.h" #include "third_party/python/Include/abstract.h" #include "third_party/python/Include/ast.h" diff --git a/third_party/python/Python/pystrtod.c b/third_party/python/Python/pystrtod.c index 91050fc83..3038fdf6a 100644 --- a/third_party/python/Python/pystrtod.c +++ b/third_party/python/Python/pystrtod.c @@ -7,7 +7,7 @@ #include "libc/assert.h" #include "libc/errno.h" #include "libc/fmt/fmt.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "third_party/python/Include/dtoa.h" #include "third_party/python/Include/object.h" #include "third_party/python/Include/pyctype.h" diff --git a/third_party/python/Python/pythonrun.c b/third_party/python/Python/pythonrun.c index 0a4b428a2..762fd5a6c 100644 --- a/third_party/python/Python/pythonrun.c +++ b/third_party/python/Python/pythonrun.c @@ -5,7 +5,7 @@ │ https://docs.python.org/3/license.html │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/stdio/stdio.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "third_party/python/Include/Python-ast.h" #include "third_party/python/Include/abstract.h" #include "third_party/python/Include/ast.h" diff --git a/third_party/python/Python/sysmodule.c b/third_party/python/Python/sysmodule.c index 512de60b4..ff5768aec 100644 --- a/third_party/python/Python/sysmodule.c +++ b/third_party/python/Python/sysmodule.c @@ -14,7 +14,7 @@ #include "libc/stdio/stdio.h" #include "libc/sysv/consts/exit.h" #include "libc/sysv/consts/s.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "libc/x/x.h" #include "third_party/python/Include/abstract.h" #include "third_party/python/Include/boolobject.h" diff --git a/third_party/python/python.mk b/third_party/python/python.mk index 608a09d94..0c3ab081f 100644 --- a/third_party/python/python.mk +++ b/third_party/python/python.mk @@ -456,7 +456,6 @@ THIRD_PARTY_PYTHON_STAGE1_A_DIRECTDEPS = \ LIBC_SYSV_CALLS \ LIBC_TIME \ LIBC_TINYMATH \ - LIBC_UNICODE \ LIBC_X \ TOOL_BUILD_LIB \ THIRD_PARTY_DLMALLOC \ @@ -1136,7 +1135,6 @@ THIRD_PARTY_PYTHON_STAGE2_A_DIRECTDEPS = \ LIBC_SYSV_CALLS \ LIBC_TIME \ LIBC_TINYMATH \ - LIBC_UNICODE \ LIBC_X \ LIBC_ZIPOS \ NET_HTTPS \ @@ -2056,7 +2054,6 @@ THIRD_PARTY_PYTHON_PYTEST_PYMAINS_DIRECTDEPS = \ LIBC_INTRIN \ LIBC_X \ LIBC_STR \ - LIBC_UNICODE \ LIBC_STDIO \ LIBC_CALLS \ LIBC_RUNTIME \ @@ -4288,7 +4285,6 @@ THIRD_PARTY_PYTHON_PYTHON_DIRECTDEPS = \ LIBC_STUBS \ LIBC_LOG \ LIBC_SYSV \ - LIBC_UNICODE \ LIBC_X \ LIBC_ZIPOS \ THIRD_PARTY_GETOPT \ @@ -4330,7 +4326,6 @@ THIRD_PARTY_PYTHON_FREEZE_DIRECTDEPS = \ LIBC_STR \ LIBC_STUBS \ LIBC_SYSV \ - LIBC_UNICODE \ LIBC_X \ THIRD_PARTY_GETOPT \ THIRD_PARTY_XED \ @@ -4370,7 +4365,7 @@ o/$(MODE)/third_party/python/chibicc.inc: \ libc/runtime/symbolic.h \ libc/stdio/stdio.h \ libc/str/str.h \ - libc/unicode/unicode.h \ + libc/str/unicode.h \ third_party/python/Include/Python.h \ third_party/python/Include/abstract.h \ third_party/python/Include/bltinmodule.h \ diff --git a/third_party/python/runpythonmodule.c b/third_party/python/runpythonmodule.c index b5862f428..69d6de764 100644 --- a/third_party/python/runpythonmodule.c +++ b/third_party/python/runpythonmodule.c @@ -29,7 +29,7 @@ #include "libc/sysv/consts/prot.h" #include "libc/sysv/consts/sig.h" #include "libc/time/time.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "libc/x/x.h" #include "third_party/linenoise/linenoise.h" #include "third_party/python/Include/abstract.h" diff --git a/third_party/quickjs/quickjs.mk b/third_party/quickjs/quickjs.mk index 7f21dcd2b..bf0987a12 100644 --- a/third_party/quickjs/quickjs.mk +++ b/third_party/quickjs/quickjs.mk @@ -85,7 +85,6 @@ THIRD_PARTY_QUICKJS_A_DIRECTDEPS = \ LIBC_SYSV_CALLS \ LIBC_TIME \ LIBC_TINYMATH \ - LIBC_UNICODE \ LIBC_X \ THIRD_PARTY_COMPILER_RT \ THIRD_PARTY_GDTOA \ diff --git a/third_party/regex/regex.mk b/third_party/regex/regex.mk index 0cb64bcd8..6fc141aa4 100644 --- a/third_party/regex/regex.mk +++ b/third_party/regex/regex.mk @@ -21,7 +21,6 @@ THIRD_PARTY_REGEX_A_DIRECTDEPS = \ LIBC_NEXGEN32E \ LIBC_RUNTIME \ LIBC_STR \ - LIBC_UNICODE \ LIBC_STUBS THIRD_PARTY_REGEX_A_DEPS := \ diff --git a/third_party/smallz4/smallz4.mk b/third_party/smallz4/smallz4.mk index a47b7ca86..dd1e4b326 100644 --- a/third_party/smallz4/smallz4.mk +++ b/third_party/smallz4/smallz4.mk @@ -34,7 +34,6 @@ THIRD_PARTY_SMALLZ4_A_DIRECTDEPS = \ LIBC_NEXGEN32E \ LIBC_RUNTIME \ LIBC_CALLS \ - LIBC_UNICODE \ LIBC_STDIO \ LIBC_STR \ LIBC_STUBS \ diff --git a/third_party/sqlite3/fts3_icu.c b/third_party/sqlite3/fts3_icu.c index f864e9c07..75cb54d3b 100644 --- a/third_party/sqlite3/fts3_icu.c +++ b/third_party/sqlite3/fts3_icu.c @@ -18,7 +18,7 @@ #include "libc/assert.h" #include "libc/str/str.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" #include "third_party/sqlite3/fts3_tokenizer.inc" typedef struct IcuTokenizer IcuTokenizer; diff --git a/third_party/sqlite3/icu.c b/third_party/sqlite3/icu.c index ced08d6bd..ba6862706 100644 --- a/third_party/sqlite3/icu.c +++ b/third_party/sqlite3/icu.c @@ -34,7 +34,7 @@ /* Include ICU headers */ #include "libc/assert.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" #ifndef SQLITE_CORE #include "third_party/sqlite3/sqlite3ext.h" diff --git a/third_party/sqlite3/sqlite3.mk b/third_party/sqlite3/sqlite3.mk index 649f7125c..8f4fd901b 100644 --- a/third_party/sqlite3/sqlite3.mk +++ b/third_party/sqlite3/sqlite3.mk @@ -56,7 +56,6 @@ THIRD_PARTY_SQLITE3_A_DIRECTDEPS = \ LIBC_SYSV_CALLS \ LIBC_TIME \ LIBC_TINYMATH \ - LIBC_UNICODE \ THIRD_PARTY_GDTOA \ THIRD_PARTY_LINENOISE \ THIRD_PARTY_MUSL \ diff --git a/third_party/tidy/tidy.mk b/third_party/tidy/tidy.mk index 82b4fee99..97ff350fd 100644 --- a/third_party/tidy/tidy.mk +++ b/third_party/tidy/tidy.mk @@ -24,7 +24,6 @@ THIRD_PARTY_TIDY_A_DIRECTDEPS = \ LIBC_NEXGEN32E \ LIBC_RUNTIME \ LIBC_CALLS \ - LIBC_UNICODE \ LIBC_STDIO \ LIBC_SYSV \ LIBC_STR \ diff --git a/third_party/unzip/unzip.mk b/third_party/unzip/unzip.mk index 906ae6ad7..2d86ceb74 100644 --- a/third_party/unzip/unzip.mk +++ b/third_party/unzip/unzip.mk @@ -25,7 +25,6 @@ THIRD_PARTY_UNZIP_A_DIRECTDEPS = \ LIBC_STUBS \ LIBC_SYSV \ LIBC_TIME \ - LIBC_UNICODE \ LIBC_ZIPOS \ THIRD_PARTY_BZIP2 diff --git a/third_party/unzip/unzpriv.h b/third_party/unzip/unzpriv.h index ac1d9ce62..4cbc79356 100644 --- a/third_party/unzip/unzpriv.h +++ b/third_party/unzip/unzpriv.h @@ -26,7 +26,7 @@ #include "libc/sysv/consts/s.h" #include "libc/calls/calls.h" #include "libc/str/str.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "libc/errno.h" #include "third_party/unzip/unzpriv.h" #include "libc/calls/calls.h" diff --git a/third_party/zip/tailor.h b/third_party/zip/tailor.h index b259295d2..ff4ba9a97 100644 --- a/third_party/zip/tailor.h +++ b/third_party/zip/tailor.h @@ -259,7 +259,7 @@ IZ_IMP char *mktemp(); */ #ifdef UNICODE_SUPPORT # if defined( UNIX) || defined( VMS) -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" # endif /* defined( UNIX) || defined( VMS) */ #include "libc/str/str.h" #endif /* def UNICODE_SUPPORT */ diff --git a/third_party/zip/zip.mk b/third_party/zip/zip.mk index a74f6c782..472e6eeee 100644 --- a/third_party/zip/zip.mk +++ b/third_party/zip/zip.mk @@ -91,7 +91,6 @@ THIRD_PARTY_ZIP_DIRECTDEPS = \ LIBC_STUBS \ LIBC_SYSV \ LIBC_TIME \ - LIBC_UNICODE \ LIBC_X \ THIRD_PARTY_BZIP2 diff --git a/tool/build/blinkenlights.c b/tool/build/blinkenlights.c index 541bff42f..579bb965d 100644 --- a/tool/build/blinkenlights.c +++ b/tool/build/blinkenlights.c @@ -72,7 +72,7 @@ #include "libc/sysv/consts/termios.h" #include "libc/sysv/errfuns.h" #include "libc/time/time.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" #include "libc/x/x.h" #include "third_party/gdtoa/gdtoa.h" #include "third_party/getopt/getopt.h" diff --git a/tool/build/build.mk b/tool/build/build.mk index f7bc6a866..0329076ce 100644 --- a/tool/build/build.mk +++ b/tool/build/build.mk @@ -58,7 +58,6 @@ TOOL_BUILD_DIRECTDEPS = \ LIBC_THREAD \ LIBC_TIME \ LIBC_TINYMATH \ - LIBC_UNICODE \ LIBC_X \ LIBC_ZIPOS \ NET_HTTPS \ diff --git a/tool/build/lib/buildlib.mk b/tool/build/lib/buildlib.mk index c244feb22..966d8ddb9 100644 --- a/tool/build/lib/buildlib.mk +++ b/tool/build/lib/buildlib.mk @@ -48,7 +48,6 @@ TOOL_BUILD_LIB_A_DIRECTDEPS = \ LIBC_SYSV_CALLS \ LIBC_TIME \ LIBC_TINYMATH \ - LIBC_UNICODE \ LIBC_X \ NET_HTTPS \ THIRD_PARTY_COMPILER_RT \ diff --git a/tool/build/lib/message.c b/tool/build/lib/message.c index 3108b8c0f..56069faf0 100644 --- a/tool/build/lib/message.c +++ b/tool/build/lib/message.c @@ -21,7 +21,7 @@ #include "libc/math.h" #include "libc/mem/mem.h" #include "libc/str/str.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" #include "tool/build/lib/buffer.h" #include "tool/build/lib/lines.h" #include "tool/build/lib/panel.h" diff --git a/tool/build/lib/panel.c b/tool/build/lib/panel.c index 005899482..89fe5f454 100644 --- a/tool/build/lib/panel.c +++ b/tool/build/lib/panel.c @@ -21,7 +21,7 @@ #include "libc/mem/mem.h" #include "libc/str/str.h" #include "libc/str/tpdecode.internal.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" #include "tool/build/lib/buffer.h" #include "tool/build/lib/panel.h" diff --git a/tool/build/lib/pty.c b/tool/build/lib/pty.c index 57715d85a..25f8d554f 100644 --- a/tool/build/lib/pty.c +++ b/tool/build/lib/pty.c @@ -32,7 +32,7 @@ #include "libc/str/thompike.h" #include "libc/str/tpenc.h" #include "libc/sysv/errfuns.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" #include "libc/x/x.h" #include "tool/build/lib/pty.h" diff --git a/tool/decode/decode.mk b/tool/decode/decode.mk index bfa304d2a..14628ef53 100644 --- a/tool/decode/decode.mk +++ b/tool/decode/decode.mk @@ -36,7 +36,6 @@ TOOL_DECODE_DIRECTDEPS = \ LIBC_SYSV_CALLS \ LIBC_TIME \ LIBC_TINYMATH \ - LIBC_UNICODE \ LIBC_X \ THIRD_PARTY_GDTOA \ THIRD_PARTY_GETOPT \ diff --git a/tool/decode/lib/decodelib.mk b/tool/decode/lib/decodelib.mk index 7bb5451eb..a9d94db59 100644 --- a/tool/decode/lib/decodelib.mk +++ b/tool/decode/lib/decodelib.mk @@ -29,8 +29,7 @@ TOOL_DECODE_LIB_A_DIRECTDEPS = \ LIBC_STDIO \ LIBC_STR \ LIBC_STUBS \ - LIBC_SYSV \ - LIBC_UNICODE + LIBC_SYSV TOOL_DECODE_LIB_A_DEPS := \ $(call uniq,$(foreach x,$(TOOL_DECODE_LIB_A_DIRECTDEPS),$($(x)))) diff --git a/tool/decode/scrubdox.c b/tool/decode/scrubdox.c index c990fe908..ecf9c08d4 100644 --- a/tool/decode/scrubdox.c +++ b/tool/decode/scrubdox.c @@ -76,7 +76,7 @@ #include "libc/runtime/gc.internal.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" #include "libc/x/x.h" #define IsSpace(C) ((C) == ' ') diff --git a/tool/hash/hash.mk b/tool/hash/hash.mk index 456c76c9f..139ec3d8f 100644 --- a/tool/hash/hash.mk +++ b/tool/hash/hash.mk @@ -22,7 +22,6 @@ TOOL_HASH_DIRECTDEPS = \ LIBC_RUNTIME \ LIBC_STDIO \ LIBC_STR \ - LIBC_UNICODE \ LIBC_STUBS TOOL_HASH_DEPS := \ diff --git a/tool/lambda/blcdump.c b/tool/lambda/blcdump.c index c56676b86..3ca572cc0 100644 --- a/tool/lambda/blcdump.c +++ b/tool/lambda/blcdump.c @@ -20,7 +20,7 @@ #include "libc/calls/struct/rlimit.h" #include "libc/runtime/runtime.h" #include "libc/sysv/consts/rlimit.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "third_party/getopt/getopt.h" #include "tool/lambda/lib/blc.h" diff --git a/tool/lambda/bru2bin.c b/tool/lambda/bru2bin.c index 24658c31d..274a29f05 100644 --- a/tool/lambda/bru2bin.c +++ b/tool/lambda/bru2bin.c @@ -22,7 +22,7 @@ #include "libc/runtime/runtime.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "third_party/getopt/getopt.h" #define USAGE \ diff --git a/tool/lambda/lam2bin.c b/tool/lambda/lam2bin.c index d11442659..3d5e97493 100644 --- a/tool/lambda/lam2bin.c +++ b/tool/lambda/lam2bin.c @@ -22,7 +22,7 @@ #include "libc/runtime/runtime.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "third_party/getopt/getopt.h" #define USAGE \ diff --git a/tool/lambda/lambda.c b/tool/lambda/lambda.c index f6a68e6cc..75f61ed97 100644 --- a/tool/lambda/lambda.c +++ b/tool/lambda/lambda.c @@ -27,7 +27,7 @@ #include "libc/sysv/consts/prot.h" #include "libc/sysv/consts/rlimit.h" #include "libc/sysv/consts/sig.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "third_party/getopt/getopt.h" #include "tool/lambda/lib/blc.h" diff --git a/tool/lambda/lambda.mk b/tool/lambda/lambda.mk index 034da7a6b..f06d50116 100644 --- a/tool/lambda/lambda.mk +++ b/tool/lambda/lambda.mk @@ -21,7 +21,6 @@ TOOL_LAMBDA_DIRECTDEPS = \ LIBC_MEM \ LIBC_CALLS \ LIBC_RUNTIME \ - LIBC_UNICODE \ LIBC_FMT \ LIBC_STR \ LIBC_SYSV \ diff --git a/tool/lambda/lib/lib.mk b/tool/lambda/lib/lib.mk index 03b042637..898b031e1 100644 --- a/tool/lambda/lib/lib.mk +++ b/tool/lambda/lib/lib.mk @@ -29,7 +29,6 @@ TOOL_LAMBDA_LIB_A_DIRECTDEPS = \ LIBC_LOG \ LIBC_NEXGEN32E \ LIBC_RUNTIME \ - LIBC_UNICODE \ LIBC_MEM \ LIBC_FMT \ LIBC_SOCK \ diff --git a/tool/net/net.mk b/tool/net/net.mk index 7cbf7d990..47ed64f39 100644 --- a/tool/net/net.mk +++ b/tool/net/net.mk @@ -48,7 +48,6 @@ TOOL_NET_DIRECTDEPS = \ LIBC_TIME \ LIBC_THREAD \ LIBC_TINYMATH \ - LIBC_UNICODE \ LIBC_X \ LIBC_ZIPOS \ NET_FINGER \ diff --git a/tool/plinko/plinko.mk b/tool/plinko/plinko.mk index 623e6f70b..337a13fed 100644 --- a/tool/plinko/plinko.mk +++ b/tool/plinko/plinko.mk @@ -21,7 +21,6 @@ TOOL_PLINKO_DIRECTDEPS = \ LIBC_MEM \ LIBC_CALLS \ LIBC_RUNTIME \ - LIBC_UNICODE \ LIBC_SYSV \ LIBC_STDIO \ LIBC_X \ diff --git a/tool/viz/basicidea.c b/tool/viz/basicidea.c index 079cb1eef..b924dbbb8 100644 --- a/tool/viz/basicidea.c +++ b/tool/viz/basicidea.c @@ -32,7 +32,7 @@ #include "libc/sysv/consts/o.h" #include "libc/sysv/consts/prot.h" #include "libc/sysv/consts/termios.h" -#include "libc/unicode/locale.h" +#include "libc/str/locale.h" #include "third_party/stb/stb_image.h" #define SQR(X) ((X) * (X)) diff --git a/tool/viz/lib/formatstringtable-assembly.c b/tool/viz/lib/formatstringtable-assembly.c index b7f9f7a89..af2971b73 100644 --- a/tool/viz/lib/formatstringtable-assembly.c +++ b/tool/viz/lib/formatstringtable-assembly.c @@ -21,7 +21,7 @@ #include "libc/fmt/itoa.h" #include "libc/runtime/gc.internal.h" #include "libc/str/str.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" #include "libc/x/x.h" #include "tool/viz/lib/formatstringtable.h" diff --git a/tool/viz/lib/formatstringtable.c b/tool/viz/lib/formatstringtable.c index 59fe879e2..236477f01 100644 --- a/tool/viz/lib/formatstringtable.c +++ b/tool/viz/lib/formatstringtable.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/intrin/safemacros.internal.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" #include "tool/viz/lib/formatstringtable.h" void *FreeStringTableCells(long yn, long xn, char *T[yn][xn]) { diff --git a/tool/viz/lib/vizlib.mk b/tool/viz/lib/vizlib.mk index f20180dbb..ec8db4f35 100644 --- a/tool/viz/lib/vizlib.mk +++ b/tool/viz/lib/vizlib.mk @@ -41,7 +41,6 @@ TOOL_VIZ_LIB_A_DIRECTDEPS = \ LIBC_TESTLIB \ LIBC_TIME \ LIBC_TINYMATH \ - LIBC_UNICODE \ LIBC_X \ THIRD_PARTY_DLMALLOC \ THIRD_PARTY_GDTOA diff --git a/tool/viz/life.c b/tool/viz/life.c index f03ab6e78..6fccdc0f9 100644 --- a/tool/viz/life.c +++ b/tool/viz/life.c @@ -80,7 +80,7 @@ #include "libc/sysv/consts/prot.h" #include "libc/sysv/consts/termios.h" #include "libc/time/time.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" #include "libc/x/x.h" #include "third_party/getopt/getopt.h" diff --git a/tool/viz/memzoom.c b/tool/viz/memzoom.c index 3eb082b53..487dd1386 100644 --- a/tool/viz/memzoom.c +++ b/tool/viz/memzoom.c @@ -50,7 +50,7 @@ #include "libc/sysv/consts/sig.h" #include "libc/sysv/consts/termios.h" #include "libc/time/time.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" #include "third_party/getopt/getopt.h" #define USAGE \ diff --git a/tool/viz/printvideo.c b/tool/viz/printvideo.c index 46e0adf4d..434fc40e2 100644 --- a/tool/viz/printvideo.c +++ b/tool/viz/printvideo.c @@ -89,7 +89,7 @@ #include "libc/sysv/consts/w.h" #include "libc/sysv/errfuns.h" #include "libc/time/time.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" #include "libc/x/x.h" #include "third_party/getopt/getopt.h" #include "third_party/stb/stb_image_resize.h" diff --git a/tool/viz/tabalign.c b/tool/viz/tabalign.c index b9b875ab7..d94015871 100644 --- a/tool/viz/tabalign.c +++ b/tool/viz/tabalign.c @@ -28,7 +28,7 @@ #include "libc/str/str.h" #include "libc/sysv/consts/ex.h" #include "libc/sysv/consts/exit.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" #include "third_party/getopt/getopt.h" #define kOneTrueTabWidth 8 diff --git a/tool/viz/unicode.c b/tool/viz/unicode.c index 2d6b11538..f6258cbbd 100644 --- a/tool/viz/unicode.c +++ b/tool/viz/unicode.c @@ -21,7 +21,7 @@ #include "libc/runtime/gc.internal.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" -#include "libc/unicode/unicode.h" +#include "libc/str/unicode.h" #include "libc/x/x.h" int a, b, w, i; @@ -77,7 +77,7 @@ int main(int argc, char *argv[]) { char *line; size_t linesize; printf("\n\n\n\n\n UNICODE PLANES\n\n\n\n"); - f = fopen("libc/unicode/blocks.txt", "r"); + f = fopen("libc/str/blocks.txt", "r"); line = NULL; linesize = 0; while (!feof(f)) { diff --git a/tool/viz/viz.mk b/tool/viz/viz.mk index 1e7a8b993..dd02a7a94 100644 --- a/tool/viz/viz.mk +++ b/tool/viz/viz.mk @@ -41,7 +41,6 @@ TOOL_VIZ_DIRECTDEPS = \ LIBC_TESTLIB \ LIBC_TIME \ LIBC_TINYMATH \ - LIBC_UNICODE \ LIBC_X \ LIBC_ZIPOS \ NET_HTTP \