mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
Fold LIBC_UNICODE into LIBC_STR
This commit is contained in:
parent
17aea99bb3
commit
367d06d9e4
173 changed files with 170 additions and 355 deletions
5
Makefile
5
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 \
|
||||
|
|
|
@ -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))))
|
||||
|
|
|
@ -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))))
|
||||
|
|
|
@ -66,7 +66,6 @@ EXAMPLES_DIRECTDEPS = \
|
|||
LIBC_THREAD \
|
||||
LIBC_TIME \
|
||||
LIBC_TINYMATH \
|
||||
LIBC_UNICODE \
|
||||
LIBC_X \
|
||||
LIBC_ZIPOS \
|
||||
NET_HTTP \
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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_ */
|
||||
|
|
|
@ -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_ */
|
||||
|
|
|
@ -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_ */
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -42,7 +42,6 @@ LIBC_LOG_A_DIRECTDEPS = \
|
|||
LIBC_SYSV_CALLS \
|
||||
LIBC_TIME \
|
||||
LIBC_TINYMATH \
|
||||
LIBC_UNICODE \
|
||||
THIRD_PARTY_DLMALLOC \
|
||||
THIRD_PARTY_GDTOA
|
||||
|
||||
|
|
|
@ -44,7 +44,6 @@ LIBC_SOCK_A_DIRECTDEPS = \
|
|||
LIBC_STUBS \
|
||||
LIBC_SYSV_CALLS \
|
||||
LIBC_TIME \
|
||||
LIBC_UNICODE \
|
||||
LIBC_SYSV
|
||||
|
||||
LIBC_SOCK_A_DEPS := \
|
||||
|
|
|
@ -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\
|
||||
|
|
|
@ -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
|
|
@ -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);
|
|
@ -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);
|
|
@ -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);
|
|
@ -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);
|
|
@ -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);
|
|
@ -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);
|
|
@ -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);
|
|
@ -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);
|
|
@ -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);
|
|
@ -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);
|
|
@ -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);
|
|
@ -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);
|
|
@ -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);
|
|
@ -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);
|
|
@ -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\
|
|
@ -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_ */
|
|
@ -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_ */
|
|
@ -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 = ".",
|
|
@ -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
|
|
@ -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_ */
|
|
@ -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.
|
|
@ -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))
|
||||
|
|
|
@ -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);
|
|
@ -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.
|
|
@ -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.
|
|
@ -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.
|
|
@ -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.
|
|
@ -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);
|
|
@ -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);
|
|
@ -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);
|
|
@ -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);
|
|
@ -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);
|
|
@ -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_ */
|
15
libc/str/update.sh
Executable file
15
libc/str/update.sh
Executable 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
|
|
@ -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!
|
|
@ -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);
|
|
@ -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.
|
|
@ -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.
|
|
@ -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);
|
|
@ -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;
|
|
@ -108,7 +108,6 @@ LIBC_TESTLIB_A_DIRECTDEPS = \
|
|||
LIBC_SYSV_CALLS \
|
||||
LIBC_TIME \
|
||||
LIBC_TINYMATH \
|
||||
LIBC_UNICODE \
|
||||
LIBC_X \
|
||||
LIBC_ZIPOS \
|
||||
THIRD_PARTY_DLMALLOC \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 $@ $<
|
|
@ -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
|
|
@ -46,7 +46,6 @@ TEST_LIBC_CALLS_DIRECTDEPS = \
|
|||
LIBC_THREAD \
|
||||
LIBC_TIME \
|
||||
LIBC_TESTLIB \
|
||||
LIBC_UNICODE \
|
||||
LIBC_X \
|
||||
LIBC_ZIPOS \
|
||||
THIRD_PARTY_XED
|
||||
|
|
|
@ -30,7 +30,6 @@ TEST_LIBC_FMT_DIRECTDEPS = \
|
|||
LIBC_SYSV \
|
||||
LIBC_TESTLIB \
|
||||
LIBC_TINYMATH \
|
||||
LIBC_UNICODE \
|
||||
LIBC_X \
|
||||
THIRD_PARTY_GDTOA
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -37,7 +37,6 @@ TEST_LIBC_NEXGEN32E_DIRECTDEPS = \
|
|||
LIBC_STUBS \
|
||||
LIBC_SYSV \
|
||||
LIBC_TESTLIB \
|
||||
LIBC_UNICODE \
|
||||
LIBC_X \
|
||||
TOOL_VIZ_LIB \
|
||||
THIRD_PARTY_XED
|
||||
|
|
|
@ -37,7 +37,6 @@ TEST_LIBC_RUNTIME_DIRECTDEPS = \
|
|||
LIBC_THREAD \
|
||||
LIBC_TESTLIB \
|
||||
LIBC_TINYMATH \
|
||||
LIBC_UNICODE \
|
||||
LIBC_X \
|
||||
LIBC_ZIPOS \
|
||||
TOOL_BUILD_LIB \
|
||||
|
|
|
@ -38,7 +38,6 @@ TEST_LIBC_STDIO_DIRECTDEPS = \
|
|||
LIBC_THREAD \
|
||||
LIBC_TIME \
|
||||
LIBC_LOG \
|
||||
LIBC_UNICODE \
|
||||
LIBC_X \
|
||||
LIBC_ZIPOS \
|
||||
THIRD_PARTY_GDTOA \
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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));
|
|
@ -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,16 +73,6 @@ 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
|
||||
|
|
|
@ -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));
|
|
@ -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
|
||||
|
|
|
@ -35,7 +35,6 @@ TEST_LIBC_TINYMATH_DIRECTDEPS = \
|
|||
LIBC_SYSV \
|
||||
LIBC_TESTLIB \
|
||||
LIBC_TINYMATH \
|
||||
LIBC_UNICODE \
|
||||
LIBC_X \
|
||||
THIRD_PARTY_GDTOA \
|
||||
THIRD_PARTY_DOUBLECONVERSION
|
||||
|
|
|
@ -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)
|
|
@ -35,7 +35,6 @@ TEST_LIBC_X_DIRECTDEPS = \
|
|||
LIBC_STUBS \
|
||||
LIBC_SYSV \
|
||||
LIBC_TESTLIB \
|
||||
LIBC_UNICODE \
|
||||
LIBC_X \
|
||||
THIRD_PARTY_GDTOA
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@ TEST_TOOL_ARGS_DIRECTDEPS = \
|
|||
LIBC_STUBS \
|
||||
LIBC_SYSV \
|
||||
LIBC_TESTLIB \
|
||||
LIBC_UNICODE \
|
||||
LIBC_ZIPOS \
|
||||
LIBC_X \
|
||||
THIRD_PARTY_COMPILER_RT \
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -42,7 +42,6 @@ TEST_TOOL_NET_DIRECTDEPS = \
|
|||
LIBC_STUBS \
|
||||
LIBC_SYSV \
|
||||
LIBC_TESTLIB \
|
||||
LIBC_UNICODE \
|
||||
LIBC_X \
|
||||
LIBC_ZIPOS \
|
||||
THIRD_PARTY_REGEX \
|
||||
|
|
|
@ -49,7 +49,6 @@ TEST_TOOL_PLINKO_DIRECTDEPS = \
|
|||
LIBC_STUBS \
|
||||
LIBC_SYSV \
|
||||
LIBC_TESTLIB \
|
||||
LIBC_UNICODE \
|
||||
LIBC_X \
|
||||
LIBC_ZIPOS \
|
||||
THIRD_PARTY_COMPILER_RT \
|
||||
|
|
|
@ -36,7 +36,6 @@ TEST_TOOL_VIZ_LIB_DIRECTDEPS = \
|
|||
LIBC_STR \
|
||||
LIBC_TIME \
|
||||
LIBC_TINYMATH \
|
||||
LIBC_UNICODE \
|
||||
LIBC_X \
|
||||
TOOL_VIZ_LIB
|
||||
|
||||
|
|
1
third_party/argon2/argon2.mk
vendored
1
third_party/argon2/argon2.mk
vendored
|
@ -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 := \
|
||||
|
|
2
third_party/chibicc/chibicc.h
vendored
2
third_party/chibicc/chibicc.h
vendored
|
@ -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"
|
||||
|
|
1
third_party/chibicc/chibicc.mk
vendored
1
third_party/chibicc/chibicc.mk
vendored
|
@ -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 \
|
||||
|
|
1
third_party/chibicc/test/test.mk
vendored
1
third_party/chibicc/test/test.mk
vendored
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
1
third_party/finger/finger.mk
vendored
1
third_party/finger/finger.mk
vendored
|
@ -26,7 +26,6 @@ THIRD_PARTY_FINGER_A_DIRECTDEPS = \
|
|||
LIBC_DNS \
|
||||
LIBC_SOCK \
|
||||
LIBC_TIME \
|
||||
LIBC_UNICODE \
|
||||
THIRD_PARTY_MUSL \
|
||||
THIRD_PARTY_GETOPT
|
||||
|
||||
|
|
2
third_party/gdtoa/strtod_l.c
vendored
2
third_party/gdtoa/strtod_l.c
vendored
|
@ -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) {
|
||||
|
|
2
third_party/gdtoa/strtof_l.c
vendored
2
third_party/gdtoa/strtof_l.c
vendored
|
@ -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) {
|
||||
|
|
2
third_party/gdtoa/strtold_l.c
vendored
2
third_party/gdtoa/strtold_l.c
vendored
|
@ -29,7 +29,7 @@
|
|||
│ THIS SOFTWARE. │
|
||||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/unicode/locale.h"
|
||||
#include "libc/str/locale.h"
|
||||
#include "third_party/gdtoa/gdtoa.h"
|
||||
|
||||
/**
|
||||
|
|
2
third_party/gdtoa/wcstod.c
vendored
2
third_party/gdtoa/wcstod.c
vendored
|
@ -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");
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue