From 7ebaff34c68e243cff0d8a4a680292a08d0ca75b Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Sun, 21 Jul 2024 15:54:17 -0700 Subject: [PATCH] Fix ctype.h and wctype.h --- ctl/istream.cc | 1 + ctl/istringstream.cc | 1 + examples/kilo.c | 1 + examples/ttyinfo.c | 1 + examples/unbourne.c | 17 +++++-- examples/whois.c | 1 + libc/calls/read-nt.c | 3 +- libc/calls/readlinkat-nt.c | 1 + libc/ctype.h | 26 ++++++++++ libc/fmt/atoi.c | 1 + libc/fmt/atol.c | 1 + libc/fmt/internal.h | 1 + libc/fmt/sizetol.c | 1 + libc/intrin/kprintf.greg.c | 1 + libc/isystem/ctype.h | 2 +- libc/isystem/wctype.h | 4 +- libc/proc/cocmd.c | 1 + libc/sock/inet_aton.c | 1 + libc/sock/inet_pton.c | 1 + libc/stdio/fmt.c | 1 + libc/stdio/readpassphrase.c | 1 + libc/stdio/stdio.h | 9 ++-- libc/str/isalnum.c | 2 +- libc/str/isalpha.c | 2 +- libc/str/isascii.c | 2 +- libc/str/isblank.c | 2 +- libc/str/iscntrl.c | 2 +- libc/str/isdigit.c | 2 +- libc/str/isgraph.c | 2 +- libc/str/islower.c | 2 +- libc/str/isprint.c | 2 +- libc/str/ispunct.c | 2 +- libc/str/isspace.c | 2 +- libc/str/isupper.c | 2 +- libc/str/iswalnum.c | 2 +- libc/str/iswalpha.c | 2 +- libc/str/iswblank.c | 2 +- libc/str/iswcntrl.c | 2 +- libc/str/iswctype.c | 2 +- libc/str/iswdigit.c | 2 +- libc/str/iswgraph.c | 2 +- libc/str/iswlower.c | 2 +- libc/str/iswprint.c | 2 +- libc/str/iswpunct.c | 2 +- libc/str/iswseparator.c | 2 +- libc/str/iswspace.c | 2 +- libc/str/iswupper.c | 2 +- libc/str/iswxdigit.c | 2 +- libc/str/isxdigit.c | 5 +- libc/str/str.h | 48 ++----------------- libc/str/strcasecmp16.c | 1 + libc/str/strncasecmp16.c | 1 + libc/str/strverscmp.c | 1 + libc/str/towctrans.c | 2 +- libc/str/wcscasecmp.c | 1 + libc/str/wcsncasecmp.c | 1 + libc/str/wctrans.c | 1 + libc/str/wctype.c | 2 +- libc/str/wcwidth.c | 2 +- libc/testlib/formatint.c | 1 + libc/testlib/formatstr.c | 1 + libc/vga/tty.greg.c | 1 + libc/wctype.h | 35 ++++++++++++++ net/http/isacceptablehost.c | 1 + net/http/parsecidr.c | 1 + net/http/parsecontentlength.c | 1 + net/http/parseforwarded.c | 1 + net/http/parsehttpmessage.c | 1 + net/http/parseip.c | 1 + net/turfwar/blackholed.c | 1 + net/turfwar/turfwar.c | 1 + test/libc/calls/getcwd_test.c | 1 + test/libc/calls/shm_open_test.c | 1 + test/libc/intrin/strcmp_test.c | 1 + test/libc/str/towupper_test.c | 1 + test/tool/build/lib/interner_test.c | 1 + third_party/chibicc/as.c | 1 + third_party/chibicc/asm.c | 1 + third_party/chibicc/tokenize.c | 1 + third_party/ctags/args.c | 1 + third_party/ctags/asm.c | 1 + third_party/ctags/asp.c | 1 + third_party/ctags/awk.c | 1 + third_party/ctags/basic.c | 1 + third_party/ctags/beta.c | 1 + third_party/ctags/eiffel.c | 1 + third_party/ctags/entry.c | 1 + third_party/ctags/erlang.c | 1 + third_party/ctags/flex.c | 2 + third_party/ctags/general.h | 1 + third_party/ctags/get.c | 1 + third_party/ctags/go.c | 1 + third_party/ctags/jscript.c | 2 + third_party/ctags/lisp.c | 1 + third_party/ctags/lregex.c | 1 + third_party/ctags/lua.c | 1 + third_party/ctags/make.c | 1 + third_party/ctags/parse.c | 1 + third_party/ctags/pascal.c | 1 + third_party/ctags/perl.c | 1 + third_party/ctags/python.c | 1 + third_party/ctags/read.c | 1 + third_party/ctags/readtags.c | 1 + third_party/ctags/routines.c | 1 + third_party/ctags/ruby.c | 1 + third_party/ctags/scheme.c | 1 + third_party/ctags/sh.c | 1 + third_party/ctags/sml.c | 1 + third_party/ctags/tcl.c | 1 + third_party/ctags/tex.c | 2 + third_party/ctags/verilog.c | 1 + third_party/ctags/vhdl.c | 1 + third_party/ctags/vim.c | 1 + third_party/ctags/vstring.c | 1 + third_party/finger/util.c | 1 + third_party/hiredis/async.c | 1 + third_party/hiredis/hiredis.c | 1 + third_party/hiredis/read.c | 1 + third_party/hiredis/sds.c | 1 + third_party/linenoise/linenoise.c | 1 + third_party/lua/lbaselib.c | 1 + third_party/lua/liolib.c | 1 + third_party/lua/lstrlib.c | 1 + third_party/lua/luac.main.c | 1 + third_party/musl/crypt_sha256.c | 1 + third_party/musl/crypt_sha512.c | 1 + third_party/musl/fnmatch.c | 1 + third_party/musl/getnameinfo.c | 1 + third_party/musl/lookup_ipliteral.c | 1 + third_party/musl/lookup_name.c | 1 + third_party/musl/lookup_serv.c | 1 + third_party/musl/resolvconf.c | 1 + third_party/musl/strfmon.c | 1 + third_party/musl/strptime.c | 1 + third_party/ncurses/read_entry.c | 1 + third_party/pcre/pcre2_compile.c | 1 + third_party/pcre/pcre2_context.c | 1 + third_party/pcre/pcre2_convert.c | 1 + third_party/pcre/pcre2_maketables.c | 1 + .../python/Modules/_decimal/_decimal.c | 1 + .../python/Modules/_decimal/libmpdec/io.c | 1 + third_party/python/Modules/_hashmbedtls.c | 1 + third_party/python/Objects/bytesobject.c | 1 + third_party/python/Parser/grammar.c | 1 + third_party/python/Parser/tokenizer.c | 1 + third_party/python/runpythonmodule.c | 1 + third_party/regex/regcomp.c | 1 + third_party/regex/tre.inc | 1 + third_party/sed/compile.c | 1 + third_party/sed/process.c | 2 + third_party/sqlite3/completion.c | 1 + third_party/sqlite3/decimal.c | 1 + third_party/sqlite3/geopoly.inc | 1 + third_party/sqlite3/shell.c | 1 + third_party/sqlite3/uint.c | 1 + third_party/tidy/attrs.c | 1 + third_party/tidy/language.c | 1 + third_party/tidy/pprint.c | 1 + third_party/tr/next.c | 1 + third_party/tree/html.c | 1 + third_party/tree/json.c | 1 + third_party/tree/tree.c | 2 + third_party/zlib/trees.c | 1 + tool/build/BUILD.mk | 2 +- tool/build/apelink.c | 1 + tool/build/killall.c | 1 + tool/build/lib/javadown.c | 1 + tool/build/pecheck.c | 1 + tool/build/pledge.c | 1 + tool/decode/ent.c | 1 + tool/decode/x86opinfo.c | 1 + tool/lambda/bru2bin.c | 1 + tool/lambda/lam2bin.c | 2 + tool/lambda/lib/debug.c | 1 + tool/lambda/lib/getbit.c | 1 + tool/net/ljson.c | 1 + tool/net/redbean.c | 1 + tool/viz/life.c | 1 + tool/viz/memzoom.c | 1 + tool/viz/printvideo.c | 1 + 180 files changed, 264 insertions(+), 92 deletions(-) create mode 100644 libc/ctype.h create mode 100644 libc/wctype.h diff --git a/ctl/istream.cc b/ctl/istream.cc index bb2837a0b..fa6d0d1db 100644 --- a/ctl/istream.cc +++ b/ctl/istream.cc @@ -17,6 +17,7 @@ // PERFORMANCE OF THIS SOFTWARE. #include "istream.h" +#include "libc/ctype.h" #include "libc/fmt/conv.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" diff --git a/ctl/istringstream.cc b/ctl/istringstream.cc index bfaed7a37..254e5d0d6 100644 --- a/ctl/istringstream.cc +++ b/ctl/istringstream.cc @@ -17,6 +17,7 @@ // PERFORMANCE OF THIS SOFTWARE. #include "istringstream.h" +#include "libc/ctype.h" #include "libc/fmt/conv.h" #include "libc/str/str.h" diff --git a/examples/kilo.c b/examples/kilo.c index 055b29853..513b3277e 100644 --- a/examples/kilo.c +++ b/examples/kilo.c @@ -60,6 +60,7 @@ Contact: antirez@gmail.com"); #include "libc/calls/calls.h" #include "libc/calls/termios.h" #include "libc/calls/weirdtypes.h" +#include "libc/ctype.h" #include "libc/errno.h" #include "libc/log/log.h" #include "libc/mem/alg.h" diff --git a/examples/ttyinfo.c b/examples/ttyinfo.c index 6f111acbe..16e3c23a8 100644 --- a/examples/ttyinfo.c +++ b/examples/ttyinfo.c @@ -14,6 +14,7 @@ #include "libc/calls/struct/sigaction.h" #include "libc/calls/struct/sigset.h" #include "libc/calls/termios.h" +#include "libc/ctype.h" #include "libc/errno.h" #include "libc/log/check.h" #include "libc/log/log.h" diff --git a/examples/unbourne.c b/examples/unbourne.c index 0500f1088..81f67fea3 100644 --- a/examples/unbourne.c +++ b/examples/unbourne.c @@ -119,6 +119,7 @@ #include "libc/calls/struct/stat.h" #include "libc/calls/struct/tms.h" #include "libc/calls/termios.h" +#include "libc/ctype.h" #include "libc/dce.h" #include "libc/errno.h" #include "libc/fmt/conv.h" @@ -11142,7 +11143,9 @@ static void exitreset() { inps4 = 0; } /* from expand.c: */ - { ifsfree(); } + { + ifsfree(); + } /* from redir.c: */ { /* @@ -11165,9 +11168,13 @@ static void forkreset() { } } /* from main.c: */ - { handler = &main_handler; } + { + handler = &main_handler; + } /* from redir.c: */ - { redirlist = NULL; } + { + redirlist = NULL; + } /* from trap.c: */ { char **tp; @@ -11198,7 +11205,9 @@ static void reset() { popallfiles(); } /* from var.c: */ - { unwindlocalvars(0); } + { + unwindlocalvars(0); + } } static void calcsize(union node *n) { diff --git a/examples/whois.c b/examples/whois.c index 95154787f..81b3e0214 100644 --- a/examples/whois.c +++ b/examples/whois.c @@ -30,6 +30,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/calls/calls.h" #include "libc/calls/weirdtypes.h" +#include "libc/ctype.h" #include "libc/errno.h" #include "libc/log/bsd.h" #include "libc/mem/mem.h" diff --git a/libc/calls/read-nt.c b/libc/calls/read-nt.c index e49d6b3d7..bd460a4f3 100644 --- a/libc/calls/read-nt.c +++ b/libc/calls/read-nt.c @@ -20,15 +20,16 @@ #include "libc/calls/internal.h" #include "libc/calls/sig.internal.h" #include "libc/calls/state.internal.h" -#include "libc/intrin/fds.h" #include "libc/calls/struct/iovec.h" #include "libc/calls/struct/sigset.internal.h" #include "libc/calls/syscall_support-nt.internal.h" #include "libc/cosmo.h" +#include "libc/ctype.h" #include "libc/errno.h" #include "libc/fmt/itoa.h" #include "libc/intrin/describeflags.h" #include "libc/intrin/dll.h" +#include "libc/intrin/fds.h" #include "libc/intrin/nomultics.h" #include "libc/intrin/strace.h" #include "libc/intrin/weaken.h" diff --git a/libc/calls/readlinkat-nt.c b/libc/calls/readlinkat-nt.c index 9a82c9845..bd2423272 100644 --- a/libc/calls/readlinkat-nt.c +++ b/libc/calls/readlinkat-nt.c @@ -18,6 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/calls/struct/sigset.internal.h" #include "libc/calls/syscall_support-nt.internal.h" +#include "libc/ctype.h" #include "libc/intrin/strace.h" #include "libc/mem/alloca.h" #include "libc/nt/createfile.h" diff --git a/libc/ctype.h b/libc/ctype.h new file mode 100644 index 000000000..b7fabc097 --- /dev/null +++ b/libc/ctype.h @@ -0,0 +1,26 @@ +#ifndef COSMOPOLITAN_CTYPE_H_ +#define COSMOPOLITAN_CTYPE_H_ +COSMOPOLITAN_C_START_ + +#define _tolower(u) (0040 | (u)) +#define _toupper(u) (0137 & (u)) + +int isascii(int) libcesque; +int isspace(int) libcesque; +int isalpha(int) libcesque; +int isdigit(int) libcesque; +int isalnum(int) libcesque; +int isxdigit(int) libcesque; +int isprint(int) libcesque; +int islower(int) libcesque; +int isupper(int) libcesque; +int isblank(int) libcesque; +int iscntrl(int) libcesque; +int isgraph(int) libcesque; +int tolower(int) libcesque; +int ispunct(int) libcesque; +int toupper(int) libcesque; +int toascii(int) libcesque; + +COSMOPOLITAN_C_END_ +#endif /* COSMOPOLITAN_CTYPE_H_ */ diff --git a/libc/fmt/atoi.c b/libc/fmt/atoi.c index bca5be980..ac2450add 100644 --- a/libc/fmt/atoi.c +++ b/libc/fmt/atoi.c @@ -16,6 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ +#include "libc/ctype.h" #include "libc/fmt/conv.h" #include "libc/str/str.h" diff --git a/libc/fmt/atol.c b/libc/fmt/atol.c index 5bce5bcac..c922b82d2 100644 --- a/libc/fmt/atol.c +++ b/libc/fmt/atol.c @@ -16,6 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ +#include "libc/ctype.h" #include "libc/fmt/conv.h" #include "libc/str/str.h" diff --git a/libc/fmt/internal.h b/libc/fmt/internal.h index b05b1085b..65e80281a 100644 --- a/libc/fmt/internal.h +++ b/libc/fmt/internal.h @@ -1,5 +1,6 @@ #ifndef COSMOPOLITAN_LIBC_FMT_STRTOL_H_ #define COSMOPOLITAN_LIBC_FMT_STRTOL_H_ +#include "libc/ctype.h" #include "libc/errno.h" #include "libc/str/str.h" diff --git a/libc/fmt/sizetol.c b/libc/fmt/sizetol.c index e1828fc9d..e1d8b3107 100644 --- a/libc/fmt/sizetol.c +++ b/libc/fmt/sizetol.c @@ -16,6 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ +#include "libc/ctype.h" #include "libc/fmt/conv.h" #include "libc/stdckdint.h" #include "libc/str/str.h" diff --git a/libc/intrin/kprintf.greg.c b/libc/intrin/kprintf.greg.c index 1677f8953..21eac26a6 100644 --- a/libc/intrin/kprintf.greg.c +++ b/libc/intrin/kprintf.greg.c @@ -65,6 +65,7 @@ #include "libc/thread/tls.h" #include "libc/thread/tls2.internal.h" #include "libc/vga/vga.internal.h" +#include "libc/wctype.h" #define STACK_ERROR "kprintf error: stack is about to overflow\n" diff --git a/libc/isystem/ctype.h b/libc/isystem/ctype.h index c375b5004..5fcf04c7a 100644 --- a/libc/isystem/ctype.h +++ b/libc/isystem/ctype.h @@ -1,4 +1,4 @@ #ifndef _CTYPE_H #define _CTYPE_H -#include "libc/str/str.h" +#include "libc/ctype.h" #endif /* _CTYPE_H */ diff --git a/libc/isystem/wctype.h b/libc/isystem/wctype.h index ba782a3bc..4de842c45 100644 --- a/libc/isystem/wctype.h +++ b/libc/isystem/wctype.h @@ -1,6 +1,4 @@ #ifndef _WCTYPE_H #define _WCTYPE_H -#include "libc/calls/calls.h" -#include "libc/fmt/conv.h" -#include "libc/str/str.h" +#include "libc/wctype.h" #endif /* _WCTYPE_H */ diff --git a/libc/proc/cocmd.c b/libc/proc/cocmd.c index 7babef174..4632ab559 100644 --- a/libc/proc/cocmd.c +++ b/libc/proc/cocmd.c @@ -20,6 +20,7 @@ #include "libc/calls/calls.h" #include "libc/calls/struct/stat.h" #include "libc/calls/struct/timespec.h" +#include "libc/ctype.h" #include "libc/dce.h" #include "libc/errno.h" #include "libc/fmt/conv.h" diff --git a/libc/sock/inet_aton.c b/libc/sock/inet_aton.c index d08e5c0d9..270033eb0 100644 --- a/libc/sock/inet_aton.c +++ b/libc/sock/inet_aton.c @@ -25,6 +25,7 @@ │ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. │ │ │ ╚─────────────────────────────────────────────────────────────────────────────*/ +#include "libc/ctype.h" #include "libc/fmt/conv.h" #include "libc/sock/sock.h" #include "libc/sock/struct/sockaddr.h" diff --git a/libc/sock/inet_pton.c b/libc/sock/inet_pton.c index 5693977b9..dd226eaae 100644 --- a/libc/sock/inet_pton.c +++ b/libc/sock/inet_pton.c @@ -16,6 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ +#include "libc/ctype.h" #include "libc/macros.internal.h" #include "libc/sock/internal.h" #include "libc/sock/sock.h" diff --git a/libc/stdio/fmt.c b/libc/stdio/fmt.c index cafe4f63e..69d6da94f 100644 --- a/libc/stdio/fmt.c +++ b/libc/stdio/fmt.c @@ -39,6 +39,7 @@ │ THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/assert.h" +#include "libc/ctype.h" #include "libc/errno.h" #include "libc/fmt/conv.h" #include "libc/fmt/divmod10.internal.h" diff --git a/libc/stdio/readpassphrase.c b/libc/stdio/readpassphrase.c index bff7a96f3..140c2134e 100644 --- a/libc/stdio/readpassphrase.c +++ b/libc/stdio/readpassphrase.c @@ -26,6 +26,7 @@ #include "libc/calls/calls.h" #include "libc/calls/struct/sigaction.h" #include "libc/calls/termios.h" +#include "libc/ctype.h" #include "libc/errno.h" #include "libc/paths.h" #include "libc/str/str.h" diff --git a/libc/stdio/stdio.h b/libc/stdio/stdio.h index d9f560b2b..02773651b 100644 --- a/libc/stdio/stdio.h +++ b/libc/stdio/stdio.h @@ -1,11 +1,10 @@ #ifndef COSMOPOLITAN_LIBC_STDIO_H_ #define COSMOPOLITAN_LIBC_STDIO_H_ -#define EOF -1 /* end of file */ -#define WEOF -1u /* end of file (multibyte) */ -#define _IOFBF 0 /* fully buffered */ -#define _IOLBF 1 /* line buffered */ -#define _IONBF 2 /* no buffering */ +#define EOF -1 /* end of file */ +#define _IOFBF 0 /* fully buffered */ +#define _IOLBF 1 /* line buffered */ +#define _IONBF 2 /* no buffering */ #define L_tmpnam 20 #define L_ctermid 20 diff --git a/libc/str/isalnum.c b/libc/str/isalnum.c index e202f503b..910cebbe3 100644 --- a/libc/str/isalnum.c +++ b/libc/str/isalnum.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/ctype.h" /** * Returns nonzero if c is lower, alpha, or digit. diff --git a/libc/str/isalpha.c b/libc/str/isalpha.c index 6aee95aa8..5e4823f08 100644 --- a/libc/str/isalpha.c +++ b/libc/str/isalpha.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/ctype.h" /** * Returns nonzero if c is upper or lower. diff --git a/libc/str/isascii.c b/libc/str/isascii.c index 1a85dd308..617830d5b 100644 --- a/libc/str/isascii.c +++ b/libc/str/isascii.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/ctype.h" /** * Returns nonzero if c is ascii. diff --git a/libc/str/isblank.c b/libc/str/isblank.c index c99897b19..71b63e3ae 100644 --- a/libc/str/isblank.c +++ b/libc/str/isblank.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/ctype.h" /** * Returns nonzero if c is space or tab. diff --git a/libc/str/iscntrl.c b/libc/str/iscntrl.c index 7e3fef430..a98c3f754 100644 --- a/libc/str/iscntrl.c +++ b/libc/str/iscntrl.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/ctype.h" /** * Returns nonzero if c is C0 ASCII control code or DEL. diff --git a/libc/str/isdigit.c b/libc/str/isdigit.c index b7400f4ad..da34a2f85 100644 --- a/libc/str/isdigit.c +++ b/libc/str/isdigit.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/ctype.h" /** * Returns nonzero if c is decimal digit. diff --git a/libc/str/isgraph.c b/libc/str/isgraph.c index cd2401b50..46bc713f4 100644 --- a/libc/str/isgraph.c +++ b/libc/str/isgraph.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/ctype.h" /** * Returns nonzero if c is printable ascii that isn't space. diff --git a/libc/str/islower.c b/libc/str/islower.c index 49ecc83b4..f9a764d81 100644 --- a/libc/str/islower.c +++ b/libc/str/islower.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/ctype.h" /** * Returns nonzero if c is lowercase alpha ascii character. diff --git a/libc/str/isprint.c b/libc/str/isprint.c index d27c40dd2..8f3c81edb 100644 --- a/libc/str/isprint.c +++ b/libc/str/isprint.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/ctype.h" /** * Returns nonzero if c is printable ascii including space. diff --git a/libc/str/ispunct.c b/libc/str/ispunct.c index 6928950d7..a67f9137b 100644 --- a/libc/str/ispunct.c +++ b/libc/str/ispunct.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/ctype.h" /** * Returns nonzero if ``c ∈ !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~`` diff --git a/libc/str/isspace.c b/libc/str/isspace.c index a82c74be4..350efb337 100644 --- a/libc/str/isspace.c +++ b/libc/str/isspace.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/ctype.h" /** * Returns nonzero if c is space, \t, \r, \n, \f, or \v. diff --git a/libc/str/isupper.c b/libc/str/isupper.c index 1666bc28b..d07bace8b 100644 --- a/libc/str/isupper.c +++ b/libc/str/isupper.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/ctype.h" /** * Returns nonzero if c is uppercase alpha ascii character. diff --git a/libc/str/iswalnum.c b/libc/str/iswalnum.c index f08c085d7..7c979def3 100644 --- a/libc/str/iswalnum.c +++ b/libc/str/iswalnum.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/wctype.h" /** * Returns nonzero if c is lower, alpha, or digit. diff --git a/libc/str/iswalpha.c b/libc/str/iswalpha.c index db8872b1f..573392d42 100644 --- a/libc/str/iswalpha.c +++ b/libc/str/iswalpha.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/wctype.h" /** * Returns nonzero if c is alphabetical. diff --git a/libc/str/iswblank.c b/libc/str/iswblank.c index 07a7b9bb9..4d42bcc6d 100644 --- a/libc/str/iswblank.c +++ b/libc/str/iswblank.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/wctype.h" /** * Returns nonzero if c is space or tab. diff --git a/libc/str/iswcntrl.c b/libc/str/iswcntrl.c index 2a103395f..b67dbf854 100644 --- a/libc/str/iswcntrl.c +++ b/libc/str/iswcntrl.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/wctype.h" /** * Returns nonzero if c is C0 or C1 control code. diff --git a/libc/str/iswctype.c b/libc/str/iswctype.c index 9aefb7278..0c2b83fab 100644 --- a/libc/str/iswctype.c +++ b/libc/str/iswctype.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.internal.h" -#include "libc/str/str.h" +#include "libc/wctype.h" typedef int (*isw_f)(wint_t); diff --git a/libc/str/iswdigit.c b/libc/str/iswdigit.c index 6d7b0232c..16ae3d9a6 100644 --- a/libc/str/iswdigit.c +++ b/libc/str/iswdigit.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/wctype.h" /** * Returns nonzero if c is decimal digit. diff --git a/libc/str/iswgraph.c b/libc/str/iswgraph.c index 8e420286a..def864fc0 100644 --- a/libc/str/iswgraph.c +++ b/libc/str/iswgraph.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/wctype.h" /** * Returns nonzero if c is printable and not a space. diff --git a/libc/str/iswlower.c b/libc/str/iswlower.c index aba9180c6..546ee379f 100644 --- a/libc/str/iswlower.c +++ b/libc/str/iswlower.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/wctype.h" /** * Returns nonzero if c is lowercase letter. diff --git a/libc/str/iswprint.c b/libc/str/iswprint.c index 95e2e6cf1..030e45d46 100644 --- a/libc/str/iswprint.c +++ b/libc/str/iswprint.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/wctype.h" /** * Returns nonzero if c is printable. diff --git a/libc/str/iswpunct.c b/libc/str/iswpunct.c index 96c16f34b..d66779b76 100644 --- a/libc/str/iswpunct.c +++ b/libc/str/iswpunct.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/wctype.h" /** * Returns nonzero if c is punctuation mark. diff --git a/libc/str/iswseparator.c b/libc/str/iswseparator.c index 2a3a24d86..224fec28a 100644 --- a/libc/str/iswseparator.c +++ b/libc/str/iswseparator.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/wctype.h" static const unsigned short kCodes[][2] = { {0x00aa, 0x00aa}, /* 1x English */ diff --git a/libc/str/iswspace.c b/libc/str/iswspace.c index d97a48242..44d62af9d 100644 --- a/libc/str/iswspace.c +++ b/libc/str/iswspace.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/wctype.h" /** * Returns nonzero if c is space character. diff --git a/libc/str/iswupper.c b/libc/str/iswupper.c index f965d51a6..aad3dd6e7 100644 --- a/libc/str/iswupper.c +++ b/libc/str/iswupper.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/wctype.h" /** * Returns nonzero if c is uppercase letter. diff --git a/libc/str/iswxdigit.c b/libc/str/iswxdigit.c index c325efc6f..75e4347f2 100644 --- a/libc/str/iswxdigit.c +++ b/libc/str/iswxdigit.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/wctype.h" /** * Returns nonzero if c is ascii hex digit. diff --git a/libc/str/isxdigit.c b/libc/str/isxdigit.c index e31788738..03af7c9cc 100644 --- a/libc/str/isxdigit.c +++ b/libc/str/isxdigit.c @@ -16,10 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/assert.h" -#include "libc/calls/calls.h" -#include "libc/limits.h" -#include "libc/str/str.h" +#include "libc/ctype.h" /** * Returns true if c is hexadecimal digit. diff --git a/libc/str/str.h b/libc/str/str.h index fdc97b244..ed9553633 100644 --- a/libc/str/str.h +++ b/libc/str/str.h @@ -3,9 +3,6 @@ #define INVALID_CODEPOINT 0xfffd -#define _tolower(u) (0040 | (u)) -#define _toupper(u) (0137 & (u)) - #ifdef _COSMO_SOURCE #define chomp _chomp #define chomp16 _chomp16 @@ -20,42 +17,13 @@ #define wcsstartswith _wcsstartswith #endif /* _COSMO_SOURCE */ +#ifndef WEOF +#define WEOF -1u +#endif + #if !(__ASSEMBLER__ + __LINKER__ + 0) COSMOPOLITAN_C_START_ -int isascii(int) libcesque; -int isspace(int) libcesque; -int isalpha(int) libcesque; -int isdigit(int) libcesque; -int isalnum(int) libcesque; -int isxdigit(int) libcesque; -int isprint(int) libcesque; -int islower(int) libcesque; -int isupper(int) libcesque; -int isblank(int) libcesque; -int iscntrl(int) libcesque; -int isgraph(int) libcesque; -int tolower(int) libcesque; -int ispunct(int) libcesque; -int toupper(int) libcesque; -int toascii(int) libcesque; - -int iswalnum(wint_t) libcesque; -int iswalpha(wint_t) libcesque; -int iswblank(wint_t) libcesque; -int iswcntrl(wint_t) libcesque; -int iswdigit(wint_t) libcesque; -int iswgraph(wint_t) libcesque; -int iswlower(wint_t) libcesque; -int iswspace(wint_t) libcesque; -int iswupper(wint_t) libcesque; -int iswxdigit(wint_t) libcesque; -int iswpunct(wint_t) libcesque; -int iswprint(wint_t) libcesque; -int iswseparator(wint_t) libcesque; -wint_t towlower(wint_t) libcesque; -wint_t towupper(wint_t) libcesque; - void *memset(void *, int, size_t) memcpyesque; void *memmove(void *, const void *, size_t) memcpyesque; void *memcpy(void *restrict, const void *restrict, size_t) memcpyesque; @@ -157,14 +125,6 @@ int wctomb(char *, wchar_t) libcesque; int wctob(wint_t) libcesque; wint_t btowc(int) libcesque; -typedef unsigned wctype_t; -wctype_t wctype(const char *) strlenesque; -pureconst int iswctype(wint_t, wctype_t) libcesque; - -typedef const int *wctrans_t; -wctrans_t wctrans(const char *) libcesque; -wint_t towctrans(wint_t, wctrans_t) libcesque; - int getsubopt(char **, char *const *, char **) libcesque paramsnonnull(); char *strsignal(int) returnsnonnull libcesque; char *strerror(int) returnsnonnull dontthrow dontcallback; diff --git a/libc/str/strcasecmp16.c b/libc/str/strcasecmp16.c index 8420ba882..49f0d9c05 100644 --- a/libc/str/strcasecmp16.c +++ b/libc/str/strcasecmp16.c @@ -17,6 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" +#include "libc/wctype.h" /** * Compares NUL-terminated UCS-2 strings case-insensitively. diff --git a/libc/str/strncasecmp16.c b/libc/str/strncasecmp16.c index 4d39f6bea..8919e866a 100644 --- a/libc/str/strncasecmp16.c +++ b/libc/str/strncasecmp16.c @@ -17,6 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" +#include "libc/wctype.h" /** * Compares NUL-terminated UCS-2 strings case-insensitively w/ limit. diff --git a/libc/str/strverscmp.c b/libc/str/strverscmp.c index 3cc3740ef..22596fc49 100644 --- a/libc/str/strverscmp.c +++ b/libc/str/strverscmp.c @@ -25,6 +25,7 @@ │ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. │ │ │ ╚─────────────────────────────────────────────────────────────────────────────*/ +#include "libc/ctype.h" #include "libc/str/str.h" __static_yoink("musl_libc_notice"); diff --git a/libc/str/towctrans.c b/libc/str/towctrans.c index 87f1a87bc..ed928df67 100644 --- a/libc/str/towctrans.c +++ b/libc/str/towctrans.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/str/str.h" +#include "libc/wctype.h" wint_t towctrans(wint_t c, wctrans_t t) { if (t == (wctrans_t)1) diff --git a/libc/str/wcscasecmp.c b/libc/str/wcscasecmp.c index 8f32d77cc..288eb5da4 100644 --- a/libc/str/wcscasecmp.c +++ b/libc/str/wcscasecmp.c @@ -17,6 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" +#include "libc/wctype.h" /** * Compares NUL-terminated wide strings case-insensitively. diff --git a/libc/str/wcsncasecmp.c b/libc/str/wcsncasecmp.c index b98b4baaa..c91af94e9 100644 --- a/libc/str/wcsncasecmp.c +++ b/libc/str/wcsncasecmp.c @@ -17,6 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" +#include "libc/wctype.h" /** * Compares NUL-terminated wide strings case-insensitively w/ limit. diff --git a/libc/str/wctrans.c b/libc/str/wctrans.c index 2fa75a817..19c4fa376 100644 --- a/libc/str/wctrans.c +++ b/libc/str/wctrans.c @@ -17,6 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" +#include "libc/wctype.h" wctrans_t wctrans(const char *s) { if (!strcmp(s, "toupper")) diff --git a/libc/str/wctype.c b/libc/str/wctype.c index 588439a25..20516dc47 100644 --- a/libc/str/wctype.c +++ b/libc/str/wctype.c @@ -16,9 +16,9 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ +#include "libc/wctype.h" #include "libc/macros.internal.h" #include "libc/serialize.h" -#include "libc/str/str.h" static const char kWcTypeNames[][8] = { "alnum", // diff --git a/libc/str/wcwidth.c b/libc/str/wcwidth.c index 093133c2e..66a7a9113 100644 --- a/libc/str/wcwidth.c +++ b/libc/str/wcwidth.c @@ -17,9 +17,9 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/intrin/likely.h" -#include "libc/str/str.h" #include "libc/str/unicode.h" #include "libc/str/wcwidth_osx.internal.h" +#include "libc/wctype.h" /** * Returns cell width of monospace character. diff --git a/libc/testlib/formatint.c b/libc/testlib/formatint.c index 169ab7654..cf349237b 100644 --- a/libc/testlib/formatint.c +++ b/libc/testlib/formatint.c @@ -17,6 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/atomic.h" +#include "libc/ctype.h" #include "libc/fmt/itoa.h" #include "libc/fmt/magnumstrs.internal.h" #include "libc/intrin/atomic.h" diff --git a/libc/testlib/formatstr.c b/libc/testlib/formatstr.c index be7ffc145..9775cbbaa 100644 --- a/libc/testlib/formatstr.c +++ b/libc/testlib/formatstr.c @@ -16,6 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ +#include "libc/ctype.h" #include "libc/intrin/atomic.h" #include "libc/serialize.h" #include "libc/str/str.h" diff --git a/libc/vga/tty.greg.c b/libc/vga/tty.greg.c index 85ce5f74a..ad1f009d7 100644 --- a/libc/vga/tty.greg.c +++ b/libc/vga/tty.greg.c @@ -16,6 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ +#include "libc/ctype.h" #include "libc/fmt/bing.internal.h" #include "libc/fmt/itoa.h" #include "libc/intrin/directmap.h" diff --git a/libc/wctype.h b/libc/wctype.h new file mode 100644 index 000000000..af1c246fe --- /dev/null +++ b/libc/wctype.h @@ -0,0 +1,35 @@ +#ifndef COSMOPOLITAN_WCTYPE_H_ +#define COSMOPOLITAN_WCTYPE_H_ +COSMOPOLITAN_C_START_ + +#ifndef WEOF +#define WEOF -1u +#endif + +typedef unsigned wctype_t; +typedef const int *wctrans_t; + +int iswalnum(wint_t) libcesque; +int iswalpha(wint_t) libcesque; +int iswblank(wint_t) libcesque; +int iswcntrl(wint_t) libcesque; +int iswdigit(wint_t) libcesque; +int iswgraph(wint_t) libcesque; +int iswlower(wint_t) libcesque; +int iswspace(wint_t) libcesque; +int iswupper(wint_t) libcesque; +int iswxdigit(wint_t) libcesque; +int iswpunct(wint_t) libcesque; +int iswprint(wint_t) libcesque; +int iswseparator(wint_t) libcesque; +wint_t towlower(wint_t) libcesque; +wint_t towupper(wint_t) libcesque; + +wctype_t wctype(const char *) strlenesque; +pureconst int iswctype(wint_t, wctype_t) libcesque; + +wctrans_t wctrans(const char *) libcesque; +wint_t towctrans(wint_t, wctrans_t) libcesque; + +COSMOPOLITAN_C_END_ +#endif /* COSMOPOLITAN_WCTYPE_H_ */ diff --git a/net/http/isacceptablehost.c b/net/http/isacceptablehost.c index f8dc7feed..1eb8ff046 100644 --- a/net/http/isacceptablehost.c +++ b/net/http/isacceptablehost.c @@ -16,6 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ +#include "libc/ctype.h" #include "libc/str/str.h" #include "net/http/http.h" diff --git a/net/http/parsecidr.c b/net/http/parsecidr.c index 01ede3523..5fb1f6fbb 100644 --- a/net/http/parsecidr.c +++ b/net/http/parsecidr.c @@ -16,6 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ +#include "libc/ctype.h" #include "libc/str/str.h" #include "net/http/ip.h" diff --git a/net/http/parsecontentlength.c b/net/http/parsecontentlength.c index 3755e63ff..d2bf3ae85 100644 --- a/net/http/parsecontentlength.c +++ b/net/http/parsecontentlength.c @@ -16,6 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ +#include "libc/ctype.h" #include "libc/stdckdint.h" #include "libc/str/str.h" #include "net/http/http.h" diff --git a/net/http/parseforwarded.c b/net/http/parseforwarded.c index 0d3e746b3..f999f3f71 100644 --- a/net/http/parseforwarded.c +++ b/net/http/parseforwarded.c @@ -16,6 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ +#include "libc/ctype.h" #include "libc/str/str.h" #include "net/http/http.h" diff --git a/net/http/parsehttpmessage.c b/net/http/parsehttpmessage.c index 91ef243b7..1a52fce57 100644 --- a/net/http/parsehttpmessage.c +++ b/net/http/parsehttpmessage.c @@ -17,6 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/assert.h" +#include "libc/ctype.h" #include "libc/limits.h" #include "libc/mem/alg.h" #include "libc/mem/arraylist.internal.h" diff --git a/net/http/parseip.c b/net/http/parseip.c index 700f49044..72df550ea 100644 --- a/net/http/parseip.c +++ b/net/http/parseip.c @@ -16,6 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ +#include "libc/ctype.h" #include "libc/stdckdint.h" #include "libc/str/str.h" #include "net/http/ip.h" diff --git a/net/turfwar/blackholed.c b/net/turfwar/blackholed.c index ccbd8a5ef..a7175dbd7 100644 --- a/net/turfwar/blackholed.c +++ b/net/turfwar/blackholed.c @@ -22,6 +22,7 @@ #include "libc/calls/struct/sigset.h" #include "libc/calls/struct/sigset.internal.h" #include "libc/calls/struct/timespec.h" +#include "libc/ctype.h" #include "libc/dce.h" #include "libc/errno.h" #include "libc/fmt/conv.h" diff --git a/net/turfwar/turfwar.c b/net/turfwar/turfwar.c index 41a37df79..6a0b956cc 100644 --- a/net/turfwar/turfwar.c +++ b/net/turfwar/turfwar.c @@ -27,6 +27,7 @@ #include "libc/calls/struct/sysinfo.h" #include "libc/calls/struct/timespec.h" #include "libc/calls/struct/timeval.h" +#include "libc/ctype.h" #include "libc/dce.h" #include "libc/errno.h" #include "libc/fmt/conv.h" diff --git a/test/libc/calls/getcwd_test.c b/test/libc/calls/getcwd_test.c index f9e8f22e3..0cd9919a6 100644 --- a/test/libc/calls/getcwd_test.c +++ b/test/libc/calls/getcwd_test.c @@ -17,6 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/calls/calls.h" +#include "libc/ctype.h" #include "libc/dce.h" #include "libc/errno.h" #include "libc/fmt/libgen.h" diff --git a/test/libc/calls/shm_open_test.c b/test/libc/calls/shm_open_test.c index da7909fef..3a83ea298 100644 --- a/test/libc/calls/shm_open_test.c +++ b/test/libc/calls/shm_open_test.c @@ -5,6 +5,7 @@ #include "libc/atomic.h" #include "libc/calls/calls.h" #include "libc/calls/struct/sigaction.h" +#include "libc/ctype.h" #include "libc/dce.h" #include "libc/errno.h" #include "libc/runtime/runtime.h" diff --git a/test/libc/intrin/strcmp_test.c b/test/libc/intrin/strcmp_test.c index a17153f58..742dac914 100644 --- a/test/libc/intrin/strcmp_test.c +++ b/test/libc/intrin/strcmp_test.c @@ -17,6 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/assert.h" +#include "libc/ctype.h" #include "libc/dce.h" #include "libc/macros.internal.h" #include "libc/mem/gc.h" diff --git a/test/libc/str/towupper_test.c b/test/libc/str/towupper_test.c index 479e41c94..b0779d608 100644 --- a/test/libc/str/towupper_test.c +++ b/test/libc/str/towupper_test.c @@ -20,6 +20,7 @@ #include "libc/str/str.h" #include "libc/testlib/ezbench.h" #include "libc/testlib/testlib.h" +#include "libc/wctype.h" TEST(iswupper, test) { EXPECT_TRUE(iswupper(L'𝐵')); diff --git a/test/tool/build/lib/interner_test.c b/test/tool/build/lib/interner_test.c index b26709ae7..ece510d30 100644 --- a/test/tool/build/lib/interner_test.c +++ b/test/tool/build/lib/interner_test.c @@ -17,6 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "tool/build/lib/interner.h" +#include "libc/ctype.h" #include "libc/mem/gc.h" #include "libc/mem/mem.h" #include "libc/stdio/stdio.h" diff --git a/third_party/chibicc/as.c b/third_party/chibicc/as.c index e4aa4b02c..e17c68d27 100644 --- a/third_party/chibicc/as.c +++ b/third_party/chibicc/as.c @@ -38,6 +38,7 @@ #include "third_party/chibicc/file.h" #include "third_party/gdtoa/gdtoa.h" #include "libc/serialize.h" +#include "libc/ctype.h" #include "tool/build/lib/elfwriter.h" #define OSZ 0x66 diff --git a/third_party/chibicc/asm.c b/third_party/chibicc/asm.c index 7a10b8631..5dd73b871 100644 --- a/third_party/chibicc/asm.c +++ b/third_party/chibicc/asm.c @@ -18,6 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/intrin/bsf.h" #include "libc/intrin/bsr.h" +#include "libc/ctype.h" #include "third_party/chibicc/chibicc.h" #define PRECIOUS 0b1111000000101000 // bx,bp,r12-r15 diff --git a/third_party/chibicc/tokenize.c b/third_party/chibicc/tokenize.c index 15ba6c6e5..cc297966a 100644 --- a/third_party/chibicc/tokenize.c +++ b/third_party/chibicc/tokenize.c @@ -5,6 +5,7 @@ #include "libc/str/tab.internal.h" #include "third_party/chibicc/chibicc.h" #include "third_party/chibicc/file.h" +#include "libc/ctype.h" #include "third_party/chibicc/kw.h" // Input file diff --git a/third_party/ctags/args.c b/third_party/ctags/args.c index e8770d204..0dec366a6 100644 --- a/third_party/ctags/args.c +++ b/third_party/ctags/args.c @@ -13,6 +13,7 @@ #include "libc/str/str.h" #include "third_party/ctags/args.h" #include "third_party/ctags/debug.h" +#include "libc/ctype.h" #include "third_party/ctags/routines.h" /* diff --git a/third_party/ctags/asm.c b/third_party/ctags/asm.c index 3b3cc3a40..02069ca36 100644 --- a/third_party/ctags/asm.c +++ b/third_party/ctags/asm.c @@ -13,6 +13,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/mem/alg.h" diff --git a/third_party/ctags/asp.c b/third_party/ctags/asp.c index fd8d1df75..8e90b4cfe 100644 --- a/third_party/ctags/asp.c +++ b/third_party/ctags/asp.c @@ -13,6 +13,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/mem/alg.h" diff --git a/third_party/ctags/awk.c b/third_party/ctags/awk.c index ab4c17ca3..8a3fd2add 100644 --- a/third_party/ctags/awk.c +++ b/third_party/ctags/awk.c @@ -12,6 +12,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/mem/alg.h" diff --git a/third_party/ctags/basic.c b/third_party/ctags/basic.c index b53b97b2b..89be4b8c2 100644 --- a/third_party/ctags/basic.c +++ b/third_party/ctags/basic.c @@ -15,6 +15,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/mem/alg.h" diff --git a/third_party/ctags/beta.c b/third_party/ctags/beta.c index 08d1c3d4d..7fa63c2f4 100644 --- a/third_party/ctags/beta.c +++ b/third_party/ctags/beta.c @@ -15,6 +15,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/mem/alg.h" diff --git a/third_party/ctags/eiffel.c b/third_party/ctags/eiffel.c index 0a4d0042e..1f2a48da8 100644 --- a/third_party/ctags/eiffel.c +++ b/third_party/ctags/eiffel.c @@ -14,6 +14,7 @@ * INCLUDE FILES */ #include "libc/fmt/conv.h" +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #ifdef TYPE_REFERENCE_TOOL diff --git a/third_party/ctags/entry.c b/third_party/ctags/entry.c index 13126d298..a60ab0a1c 100644 --- a/third_party/ctags/entry.c +++ b/third_party/ctags/entry.c @@ -13,6 +13,7 @@ * INCLUDE FILES */ #include "libc/runtime/runtime.h" +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/mem/alg.h" diff --git a/third_party/ctags/erlang.c b/third_party/ctags/erlang.c index c4844d5a7..570e883dd 100644 --- a/third_party/ctags/erlang.c +++ b/third_party/ctags/erlang.c @@ -13,6 +13,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/mem/alg.h" diff --git a/third_party/ctags/flex.c b/third_party/ctags/flex.c index dd02cd75a..3676f0758 100644 --- a/third_party/ctags/flex.c +++ b/third_party/ctags/flex.c @@ -22,6 +22,8 @@ #include "third_party/ctags/general.h" /* must always come first */ #include "libc/str/str.h" /* to define isalpha () */ #include "libc/runtime/runtime.h" +#include "libc/ctype.h" + #ifdef DEBUG #include "libc/calls/calls.h" #include "libc/stdio/dprintf.h" diff --git a/third_party/ctags/general.h b/third_party/ctags/general.h index ca8c0c515..15b9774c0 100644 --- a/third_party/ctags/general.h +++ b/third_party/ctags/general.h @@ -11,6 +11,7 @@ #ifndef _GENERAL_H #define _GENERAL_H #include "third_party/ctags/config.h" +#include "libc/ctype.h" /* Define standard error destination */ diff --git a/third_party/ctags/get.c b/third_party/ctags/get.c index 7e938c98f..f8df96aea 100644 --- a/third_party/ctags/get.c +++ b/third_party/ctags/get.c @@ -13,6 +13,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/mem/alg.h" diff --git a/third_party/ctags/go.c b/third_party/ctags/go.c index 6d2de2b46..bb55f22c4 100644 --- a/third_party/ctags/go.c +++ b/third_party/ctags/go.c @@ -2,6 +2,7 @@ * INCLUDE FILES */ #include "third_party/ctags/general.h" /* must always come first */ +#include "libc/ctype.h" #include "libc/runtime/runtime.h" #include "third_party/ctags/debug.h" diff --git a/third_party/ctags/jscript.c b/third_party/ctags/jscript.c index c8bf53917..bccd0c852 100644 --- a/third_party/ctags/jscript.c +++ b/third_party/ctags/jscript.c @@ -21,6 +21,8 @@ #include "third_party/ctags/general.h" /* must always come first */ #include "libc/str/str.h" /* to define isalpha () */ #include "libc/runtime/runtime.h" +#include "libc/ctype.h" + #ifdef DEBUG #include "libc/calls/calls.h" #include "libc/stdio/dprintf.h" diff --git a/third_party/ctags/lisp.c b/third_party/ctags/lisp.c index 8a47e7b20..5041888a6 100644 --- a/third_party/ctags/lisp.c +++ b/third_party/ctags/lisp.c @@ -12,6 +12,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "third_party/ctags/parse.h" diff --git a/third_party/ctags/lregex.c b/third_party/ctags/lregex.c index 40a67907d..1f905e1e4 100644 --- a/third_party/ctags/lregex.c +++ b/third_party/ctags/lregex.c @@ -16,6 +16,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/mem/alg.h" diff --git a/third_party/ctags/lua.c b/third_party/ctags/lua.c index 47c9d5893..d86ff839c 100644 --- a/third_party/ctags/lua.c +++ b/third_party/ctags/lua.c @@ -12,6 +12,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/mem/alg.h" diff --git a/third_party/ctags/make.c b/third_party/ctags/make.c index 794560cbf..ec1360518 100644 --- a/third_party/ctags/make.c +++ b/third_party/ctags/make.c @@ -12,6 +12,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/mem/alg.h" diff --git a/third_party/ctags/parse.c b/third_party/ctags/parse.c index 84cd8869f..d3dffd91b 100644 --- a/third_party/ctags/parse.c +++ b/third_party/ctags/parse.c @@ -13,6 +13,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/mem/alg.h" diff --git a/third_party/ctags/pascal.c b/third_party/ctags/pascal.c index 9ffc2834f..d6b22e666 100644 --- a/third_party/ctags/pascal.c +++ b/third_party/ctags/pascal.c @@ -13,6 +13,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/mem/alg.h" diff --git a/third_party/ctags/perl.c b/third_party/ctags/perl.c index 4fda42f3c..186cf7c8a 100644 --- a/third_party/ctags/perl.c +++ b/third_party/ctags/perl.c @@ -13,6 +13,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/mem/alg.h" diff --git a/third_party/ctags/python.c b/third_party/ctags/python.c index 7bdf3baf2..cbe02d8ce 100644 --- a/third_party/ctags/python.c +++ b/third_party/ctags/python.c @@ -13,6 +13,7 @@ * INCLUDE FILES */ #include "libc/mem/mem.h" +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/mem/alg.h" diff --git a/third_party/ctags/read.c b/third_party/ctags/read.c index 521413fd6..3ddf7da58 100644 --- a/third_party/ctags/read.c +++ b/third_party/ctags/read.c @@ -13,6 +13,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/mem/alg.h" diff --git a/third_party/ctags/readtags.c b/third_party/ctags/readtags.c index a6c56642d..dc069e522 100644 --- a/third_party/ctags/readtags.c +++ b/third_party/ctags/readtags.c @@ -14,6 +14,7 @@ #include "libc/mem/mem.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" +#include "libc/ctype.h" #include "third_party/ctags/readtags.h" /* diff --git a/third_party/ctags/routines.c b/third_party/ctags/routines.c index f1b8cb2f3..10c39e470 100644 --- a/third_party/ctags/routines.c +++ b/third_party/ctags/routines.c @@ -19,6 +19,7 @@ #include "libc/sysv/consts/s.h" #include "third_party/ctags/config.h" #include "third_party/ctags/debug.h" +#include "libc/ctype.h" #include "third_party/ctags/routines.h" /* diff --git a/third_party/ctags/ruby.c b/third_party/ctags/ruby.c index 89569449f..956ac6dd3 100644 --- a/third_party/ctags/ruby.c +++ b/third_party/ctags/ruby.c @@ -15,6 +15,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/mem/alg.h" diff --git a/third_party/ctags/scheme.c b/third_party/ctags/scheme.c index 152efcdbc..1d84e44db 100644 --- a/third_party/ctags/scheme.c +++ b/third_party/ctags/scheme.c @@ -13,6 +13,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/mem/alg.h" diff --git a/third_party/ctags/sh.c b/third_party/ctags/sh.c index 130cca513..8409f62fd 100644 --- a/third_party/ctags/sh.c +++ b/third_party/ctags/sh.c @@ -13,6 +13,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/mem/alg.h" diff --git a/third_party/ctags/sml.c b/third_party/ctags/sml.c index d9a460eac..b3f94d823 100644 --- a/third_party/ctags/sml.c +++ b/third_party/ctags/sml.c @@ -12,6 +12,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/mem/alg.h" diff --git a/third_party/ctags/tcl.c b/third_party/ctags/tcl.c index 600a23742..d193ce2d4 100644 --- a/third_party/ctags/tcl.c +++ b/third_party/ctags/tcl.c @@ -12,6 +12,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/mem/alg.h" diff --git a/third_party/ctags/tex.c b/third_party/ctags/tex.c index f881aee59..3ce844a73 100644 --- a/third_party/ctags/tex.c +++ b/third_party/ctags/tex.c @@ -18,6 +18,8 @@ #include "third_party/ctags/general.h" /* must always come first */ #include "libc/str/str.h" /* to define isalpha () */ #include "libc/runtime/runtime.h" +#include "libc/ctype.h" + #ifdef DEBUG #include "libc/calls/calls.h" #include "libc/stdio/dprintf.h" diff --git a/third_party/ctags/verilog.c b/third_party/ctags/verilog.c index 705175d2f..737fdaee6 100644 --- a/third_party/ctags/verilog.c +++ b/third_party/ctags/verilog.c @@ -19,6 +19,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/mem/alg.h" diff --git a/third_party/ctags/vhdl.c b/third_party/ctags/vhdl.c index a6c8016fa..1b970ce66 100644 --- a/third_party/ctags/vhdl.c +++ b/third_party/ctags/vhdl.c @@ -12,6 +12,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/str/str.h" /* to define isalpha () */ diff --git a/third_party/ctags/vim.c b/third_party/ctags/vim.c index d2c0009b1..e0cd9b0d9 100644 --- a/third_party/ctags/vim.c +++ b/third_party/ctags/vim.c @@ -15,6 +15,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/mem/alg.h" diff --git a/third_party/ctags/vstring.c b/third_party/ctags/vstring.c index cc92117e6..01311d421 100644 --- a/third_party/ctags/vstring.c +++ b/third_party/ctags/vstring.c @@ -12,6 +12,7 @@ /* * INCLUDE FILES */ +#include "libc/ctype.h" #include "third_party/ctags/general.h" /* must always come first */ #include "libc/limits.h" diff --git a/third_party/finger/util.c b/third_party/finger/util.c index 14a544d64..7de3544b9 100644 --- a/third_party/finger/util.c +++ b/third_party/finger/util.c @@ -43,6 +43,7 @@ #include "libc/stdio/stdio.h" #include "libc/str/str.h" #include "libc/sysv/consts/o.h" +#include "libc/ctype.h" #include "third_party/finger/finger.h" #ifndef lint diff --git a/third_party/hiredis/async.c b/third_party/hiredis/async.c index b6c721d45..23220df77 100644 --- a/third_party/hiredis/async.c +++ b/third_party/hiredis/async.c @@ -56,6 +56,7 @@ #include "third_party/hiredis/async.h" #include "third_party/hiredis/net.h" #include "third_party/hiredis/dict.c" +#include "libc/ctype.h" #include "third_party/hiredis/sds.h" #include "third_party/hiredis/async_private.inc" diff --git a/third_party/hiredis/hiredis.c b/third_party/hiredis/hiredis.c index 372da65d9..67c2185ac 100644 --- a/third_party/hiredis/hiredis.c +++ b/third_party/hiredis/hiredis.c @@ -51,6 +51,7 @@ #include "libc/assert.h" #include "libc/errno.h" #include "libc/mem/gc.h" +#include "libc/ctype.h" #include "libc/str/str.h" #include "third_party/hiredis/hiredis.h" diff --git a/third_party/hiredis/read.c b/third_party/hiredis/read.c index a907520a5..86aa95920 100644 --- a/third_party/hiredis/read.c +++ b/third_party/hiredis/read.c @@ -73,6 +73,7 @@ #include "libc/sysv/consts/limits.h" #include "libc/sysv/consts/xopen.h" #include "libc/thread/thread.h" +#include "libc/ctype.h" #include "libc/math.h" #include "third_party/hiredis/alloc.h" diff --git a/third_party/hiredis/sds.c b/third_party/hiredis/sds.c index 1e7b108e9..75ab85089 100644 --- a/third_party/hiredis/sds.c +++ b/third_party/hiredis/sds.c @@ -62,6 +62,7 @@ #include "libc/sysv/consts/xopen.h" #include "libc/thread/thread.h" #include "third_party/hiredis/sds.h" +#include "libc/ctype.h" #include "third_party/hiredis/sdsalloc.h" #pragma GCC diagnostic ignored "-Wstringop-overflow" diff --git a/third_party/linenoise/linenoise.c b/third_party/linenoise/linenoise.c index ca9b35f87..94ecebb90 100644 --- a/third_party/linenoise/linenoise.c +++ b/third_party/linenoise/linenoise.c @@ -168,6 +168,7 @@ #include "libc/sysv/consts/termios.h" #include "libc/sysv/errfuns.h" #include "net/http/escape.h" +#include "libc/wctype.h" #include "tool/build/lib/case.h" __notice(linenoise_notice, "\ diff --git a/third_party/lua/lbaselib.c b/third_party/lua/lbaselib.c index 10a0e75f1..f8b778d33 100644 --- a/third_party/lua/lbaselib.c +++ b/third_party/lua/lbaselib.c @@ -32,6 +32,7 @@ #include "third_party/lua/lauxlib.h" #include "third_party/lua/lprefix.h" #include "third_party/lua/lua.h" +#include "libc/ctype.h" #include "third_party/lua/lualib.h" __static_yoink("lua_notice"); diff --git a/third_party/lua/liolib.c b/third_party/lua/liolib.c index a668b0c1c..18bba75a1 100644 --- a/third_party/lua/liolib.c +++ b/third_party/lua/liolib.c @@ -37,6 +37,7 @@ #include "third_party/lua/lauxlib.h" #include "third_party/lua/lprefix.h" #include "third_party/lua/lua.h" +#include "libc/ctype.h" #include "third_party/lua/lualib.h" __static_yoink("lua_notice"); diff --git a/third_party/lua/lstrlib.c b/third_party/lua/lstrlib.c index 9c8c7a1ba..7fd3a842c 100644 --- a/third_party/lua/lstrlib.c +++ b/third_party/lua/lstrlib.c @@ -34,6 +34,7 @@ #include "third_party/lua/lauxlib.h" #include "third_party/lua/lprefix.h" #include "third_party/lua/lua.h" +#include "libc/ctype.h" #include "third_party/lua/lualib.h" __static_yoink("lua_notice"); diff --git a/third_party/lua/luac.main.c b/third_party/lua/luac.main.c index 456343e2b..2898af946 100644 --- a/third_party/lua/luac.main.c +++ b/third_party/lua/luac.main.c @@ -43,6 +43,7 @@ #include "third_party/lua/lstate.h" #include "third_party/lua/lua.h" #include "third_party/lua/lualib.h" +#include "libc/ctype.h" #include "third_party/lua/lundump.h" __static_yoink("lua_notice"); diff --git a/third_party/musl/crypt_sha256.c b/third_party/musl/crypt_sha256.c index d5e2f8059..57d311911 100644 --- a/third_party/musl/crypt_sha256.c +++ b/third_party/musl/crypt_sha256.c @@ -39,6 +39,7 @@ #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" #include "third_party/gdtoa/gdtoa.h" +#include "libc/ctype.h" #include "third_party/musl/crypt.internal.h" __static_yoink("musl_libc_notice"); diff --git a/third_party/musl/crypt_sha512.c b/third_party/musl/crypt_sha512.c index 7d3b4414b..a0e8bcc1a 100644 --- a/third_party/musl/crypt_sha512.c +++ b/third_party/musl/crypt_sha512.c @@ -39,6 +39,7 @@ #include "libc/str/str.h" #include "libc/sysv/consts/exit.h" #include "third_party/gdtoa/gdtoa.h" +#include "libc/ctype.h" #include "third_party/musl/crypt.internal.h" __static_yoink("musl_libc_notice"); diff --git a/third_party/musl/fnmatch.c b/third_party/musl/fnmatch.c index d2f32e259..6ccf0a2e7 100644 --- a/third_party/musl/fnmatch.c +++ b/third_party/musl/fnmatch.c @@ -27,6 +27,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/limits.h" #include "libc/str/str.h" +#include "libc/wctype.h" #include "third_party/musl/fnmatch.h" __static_yoink("musl_libc_notice"); diff --git a/third_party/musl/getnameinfo.c b/third_party/musl/getnameinfo.c index 173822278..193e6b2e3 100644 --- a/third_party/musl/getnameinfo.c +++ b/third_party/musl/getnameinfo.c @@ -36,6 +36,7 @@ #include "libc/sysv/consts/af.h" #include "third_party/musl/lookup.internal.h" #include "third_party/musl/netdb.h" +#include "libc/ctype.h" #include "third_party/musl/resolv.internal.h" __static_yoink("musl_libc_notice"); diff --git a/third_party/musl/lookup_ipliteral.c b/third_party/musl/lookup_ipliteral.c index a02b0239b..b0fc6462d 100644 --- a/third_party/musl/lookup_ipliteral.c +++ b/third_party/musl/lookup_ipliteral.c @@ -31,6 +31,7 @@ #include "libc/fmt/conv.h" #include "libc/limits.h" #include "libc/sock/sock.h" +#include "libc/ctype.h" #include "third_party/musl/lookup.internal.h" __static_yoink("musl_libc_notice"); diff --git a/third_party/musl/lookup_name.c b/third_party/musl/lookup_name.c index 291178213..1b9ca1611 100644 --- a/third_party/musl/lookup_name.c +++ b/third_party/musl/lookup_name.c @@ -39,6 +39,7 @@ #include "libc/sysv/consts/sock.h" #include "third_party/musl/lookup.internal.h" #include "third_party/musl/netdb.h" +#include "libc/ctype.h" #include "third_party/musl/resolv.internal.h" __static_yoink("musl_libc_notice"); diff --git a/third_party/musl/lookup_serv.c b/third_party/musl/lookup_serv.c index cc7fbffb2..a0fff8a23 100644 --- a/third_party/musl/lookup_serv.c +++ b/third_party/musl/lookup_serv.c @@ -32,6 +32,7 @@ #include "libc/stdio/internal.h" #include "libc/errno.h" #include "libc/calls/sysdir.internal.h" +#include "libc/ctype.h" #include "third_party/musl/lookup.internal.h" __static_yoink("musl_libc_notice"); diff --git a/third_party/musl/resolvconf.c b/third_party/musl/resolvconf.c index ddc44b363..0c766d9e1 100644 --- a/third_party/musl/resolvconf.c +++ b/third_party/musl/resolvconf.c @@ -37,6 +37,7 @@ #include "libc/str/str.h" #include "libc/sysv/consts/af.h" #include "libc/sock/sock.h" +#include "libc/ctype.h" #include "third_party/musl/lookup.internal.h" __static_yoink("musl_libc_notice"); diff --git a/third_party/musl/strfmon.c b/third_party/musl/strfmon.c index 95e590612..b80801d5f 100644 --- a/third_party/musl/strfmon.c +++ b/third_party/musl/strfmon.c @@ -29,6 +29,7 @@ #include "libc/stdio/stdio.h" #include "libc/str/locale.h" #include "libc/str/str.h" +#include "libc/ctype.h" #include "libc/thread/tls.h" __static_yoink("musl_libc_notice"); diff --git a/third_party/musl/strptime.c b/third_party/musl/strptime.c index 1c334640e..682d33d77 100644 --- a/third_party/musl/strptime.c +++ b/third_party/musl/strptime.c @@ -28,6 +28,7 @@ #include "libc/fmt/conv.h" #include "libc/macros.internal.h" #include "libc/str/str.h" +#include "libc/ctype.h" #include "libc/time.h" __static_yoink("musl_libc_notice"); diff --git a/third_party/ncurses/read_entry.c b/third_party/ncurses/read_entry.c index d481d924f..0d2b42d53 100644 --- a/third_party/ncurses/read_entry.c +++ b/third_party/ncurses/read_entry.c @@ -2853,6 +2853,7 @@ __static_yoink("usr/share/terminfo/z/ztx11"); */ #include "curses.priv.h" +#include "libc/ctype.h" #include "hashed_db.h" #include "tic.h" diff --git a/third_party/pcre/pcre2_compile.c b/third_party/pcre/pcre2_compile.c index 4fc63cd57..b5d076a9f 100644 --- a/third_party/pcre/pcre2_compile.c +++ b/third_party/pcre/pcre2_compile.c @@ -1,3 +1,4 @@ +#include "libc/ctype.h" #include "libc/str/str.h" /************************************************* diff --git a/third_party/pcre/pcre2_context.c b/third_party/pcre/pcre2_context.c index 9788a6336..d573debe9 100644 --- a/third_party/pcre/pcre2_context.c +++ b/third_party/pcre/pcre2_context.c @@ -1,4 +1,5 @@ #include "libc/mem/mem.h" +#include "libc/ctype.h" #include "libc/str/str.h" /************************************************* diff --git a/third_party/pcre/pcre2_convert.c b/third_party/pcre/pcre2_convert.c index 79d7ce86a..7a352cbb0 100644 --- a/third_party/pcre/pcre2_convert.c +++ b/third_party/pcre/pcre2_convert.c @@ -1,3 +1,4 @@ +#include "libc/ctype.h" #include "libc/str/str.h" /************************************************* diff --git a/third_party/pcre/pcre2_maketables.c b/third_party/pcre/pcre2_maketables.c index ab0aa5d6e..771396de9 100644 --- a/third_party/pcre/pcre2_maketables.c +++ b/third_party/pcre/pcre2_maketables.c @@ -2,6 +2,7 @@ * Perl-Compatible Regular Expressions * *************************************************/ #include "libc/str/str.h" +#include "libc/ctype.h" #include "libc/mem/mem.h" /* PCRE is a library of functions to support regular expressions whose syntax diff --git a/third_party/python/Modules/_decimal/_decimal.c b/third_party/python/Modules/_decimal/_decimal.c index 3940663c9..7c3a66c54 100644 --- a/third_party/python/Modules/_decimal/_decimal.c +++ b/third_party/python/Modules/_decimal/_decimal.c @@ -46,6 +46,7 @@ #include "third_party/python/Include/tupleobject.h" #include "third_party/python/Include/yoink.h" #include "third_party/python/Modules/_decimal/docstrings.h" +#include "libc/ctype.h" #include "third_party/python/Modules/_decimal/libmpdec/mpdecimal.h" PYTHON_PROVIDE("_decimal"); diff --git a/third_party/python/Modules/_decimal/libmpdec/io.c b/third_party/python/Modules/_decimal/libmpdec/io.c index 687417335..86e1ea79f 100644 --- a/third_party/python/Modules/_decimal/libmpdec/io.c +++ b/third_party/python/Modules/_decimal/libmpdec/io.c @@ -34,6 +34,7 @@ #include "third_party/python/Modules/_decimal/libmpdec/constants.h" #include "third_party/python/Modules/_decimal/libmpdec/io.h" #include "third_party/python/Modules/_decimal/libmpdec/mpdecimal.h" +#include "libc/ctype.h" #include "third_party/python/Modules/_decimal/libmpdec/typearith.h" __static_yoink("libmpdec_notice"); diff --git a/third_party/python/Modules/_hashmbedtls.c b/third_party/python/Modules/_hashmbedtls.c index d045940c8..26202c7b5 100644 --- a/third_party/python/Modules/_hashmbedtls.c +++ b/third_party/python/Modules/_hashmbedtls.c @@ -32,6 +32,7 @@ #include "third_party/python/Include/pystrhex.h" #include "third_party/python/Include/structmember.h" #include "third_party/python/Include/yoink.h" +#include "libc/ctype.h" #include "third_party/python/Modules/hashlib.h" PYTHON_PROVIDE("_hashlib"); diff --git a/third_party/python/Objects/bytesobject.c b/third_party/python/Objects/bytesobject.c index 8190e3c4d..803c2a2b1 100644 --- a/third_party/python/Objects/bytesobject.c +++ b/third_party/python/Objects/bytesobject.c @@ -26,6 +26,7 @@ #include "third_party/python/Include/pystrhex.h" #include "third_party/python/Include/pystrtod.h" #include "third_party/python/Include/sliceobject.h" +#include "libc/ctype.h" #include "third_party/python/Include/warnings.h" /*[clinic input] diff --git a/third_party/python/Parser/grammar.c b/third_party/python/Parser/grammar.c index f8e113451..b4c385dc2 100644 --- a/third_party/python/Parser/grammar.c +++ b/third_party/python/Parser/grammar.c @@ -9,6 +9,7 @@ #include "third_party/python/Include/objimpl.h" #include "third_party/python/Include/pgenheaders.h" #include "third_party/python/Include/pyerrors.h" +#include "libc/ctype.h" #include "third_party/python/Include/token.h" extern int Py_DebugFlag; diff --git a/third_party/python/Parser/tokenizer.c b/third_party/python/Parser/tokenizer.c index bdf7615a4..c87720ea9 100644 --- a/third_party/python/Parser/tokenizer.c +++ b/third_party/python/Parser/tokenizer.c @@ -23,6 +23,7 @@ #include "third_party/python/Include/pymacro.h" #include "third_party/python/Include/pymem.h" #include "third_party/python/Include/sysmodule.h" +#include "libc/ctype.h" #include "third_party/python/Include/unicodeobject.h" #endif diff --git a/third_party/python/runpythonmodule.c b/third_party/python/runpythonmodule.c index f3410c136..ba23daa13 100644 --- a/third_party/python/runpythonmodule.c +++ b/third_party/python/runpythonmodule.c @@ -49,6 +49,7 @@ #include "third_party/python/Include/unicodeobject.h" #include "third_party/python/Include/yoink.h" #include "libc/runtime/stack.h" +#include "libc/ctype.h" #include "third_party/xed/x86.h" STATIC_STACK_SIZE(0x100000); diff --git a/third_party/regex/regcomp.c b/third_party/regex/regcomp.c index fbec0a48f..f0fffdc78 100644 --- a/third_party/regex/regcomp.c +++ b/third_party/regex/regcomp.c @@ -57,6 +57,7 @@ │ │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/mem/alg.h" +#include "libc/ctype.h" #include "third_party/regex/tre.inc" #define CHARCLASS_NAME_MAX 14 diff --git a/third_party/regex/tre.inc b/third_party/regex/tre.inc index 2f6e39854..a86cb46b7 100644 --- a/third_party/regex/tre.inc +++ b/third_party/regex/tre.inc @@ -60,6 +60,7 @@ #include "libc/mem/alg.h" #include "libc/mem/mem.h" #include "libc/str/str.h" +#include "libc/wctype.h" #include "third_party/regex/regex.h" #undef TRE_MBSTATE diff --git a/third_party/sed/compile.c b/third_party/sed/compile.c index 66758b242..1f86d24f1 100644 --- a/third_party/sed/compile.c +++ b/third_party/sed/compile.c @@ -47,6 +47,7 @@ #include "libc/sysv/consts/s.h" #include "libc/sysv/consts/utime.h" #include "libc/mem/gc.h" +#include "libc/ctype.h" #include "libc/time.h" #include "libc/str/str.h" diff --git a/third_party/sed/process.c b/third_party/sed/process.c index 1a50f1061..fbef8809a 100644 --- a/third_party/sed/process.c +++ b/third_party/sed/process.c @@ -47,6 +47,8 @@ #include "libc/sysv/consts/s.h" #include "libc/sysv/consts/termios.h" #include "third_party/sed/defs.h" +#include "libc/wctype.h" +#include "libc/ctype.h" #include "third_party/sed/extern.h" static SPACE HS, PS, SS, YS; diff --git a/third_party/sqlite3/completion.c b/third_party/sqlite3/completion.c index e7279f297..e47d66482 100644 --- a/third_party/sqlite3/completion.c +++ b/third_party/sqlite3/completion.c @@ -35,6 +35,7 @@ */ #include "libc/assert.h" #include "libc/str/str.h" +#include "libc/ctype.h" #include "third_party/sqlite3/sqlite3ext.h" SQLITE_EXTENSION_INIT1 diff --git a/third_party/sqlite3/decimal.c b/third_party/sqlite3/decimal.c index f6326842a..76d91ecf7 100644 --- a/third_party/sqlite3/decimal.c +++ b/third_party/sqlite3/decimal.c @@ -17,6 +17,7 @@ #include "libc/assert.h" #include "libc/mem/mem.h" #include "libc/str/str.h" +#include "libc/ctype.h" #include "third_party/sqlite3/sqlite3ext.h" SQLITE_EXTENSION_INIT1 diff --git a/third_party/sqlite3/geopoly.inc b/third_party/sqlite3/geopoly.inc index 8de1fdbee..5874571e1 100644 --- a/third_party/sqlite3/geopoly.inc +++ b/third_party/sqlite3/geopoly.inc @@ -16,6 +16,7 @@ ** This file is #include-ed onto the end of "rtree.c" so that it has ** access to all of the R-Tree internals. */ +#include "libc/ctype.h" #include "libc/fmt/conv.h" /* Enable -DGEOPOLY_ENABLE_DEBUG for debugging facilities */ diff --git a/third_party/sqlite3/shell.c b/third_party/sqlite3/shell.c index 1144c6e73..e81818669 100644 --- a/third_party/sqlite3/shell.c +++ b/third_party/sqlite3/shell.c @@ -30,6 +30,7 @@ ** This file contains code to implement the "sqlite" command line ** utility for accessing SQLite databases. */ +#include "libc/ctype.h" #include "libc/dce.h" #if (defined(_WIN32) || defined(WIN32)) && !defined(_CRT_SECURE_NO_WARNINGS) /* This needs to come before any includes for MSVC compiler */ diff --git a/third_party/sqlite3/uint.c b/third_party/sqlite3/uint.c index 5bbc9ed08..835f78bed 100644 --- a/third_party/sqlite3/uint.c +++ b/third_party/sqlite3/uint.c @@ -29,6 +29,7 @@ */ #include "libc/assert.h" #include "libc/str/str.h" +#include "libc/ctype.h" #include "third_party/sqlite3/sqlite3ext.h" SQLITE_EXTENSION_INIT1 diff --git a/third_party/tidy/attrs.c b/third_party/tidy/attrs.c index 3b96f361f..b85208a7c 100644 --- a/third_party/tidy/attrs.c +++ b/third_party/tidy/attrs.c @@ -10,6 +10,7 @@ #include "third_party/tidy/message.h" #include "third_party/tidy/tmbstr.h" #include "libc/assert.h" +#include "libc/ctype.h" #include "third_party/tidy/utf8.h" #if __GNUC__ >= 11 /* [jart] this one looks legit */ diff --git a/third_party/tidy/language.c b/third_party/tidy/language.c index ea80ad7a2..b540225c5 100644 --- a/third_party/tidy/language.c +++ b/third_party/tidy/language.c @@ -7,6 +7,7 @@ #include "third_party/tidy/language.h" #include "third_party/tidy/tmbstr.h" +#include "libc/ctype.h" #include "libc/assert.h" #include "third_party/tidy/language_en.inc" diff --git a/third_party/tidy/pprint.c b/third_party/tidy/pprint.c index d7a98f4cd..d77ae7844 100644 --- a/third_party/tidy/pprint.c +++ b/third_party/tidy/pprint.c @@ -14,6 +14,7 @@ #include "third_party/tidy/tmbstr.h" #include "third_party/tidy/utf8.h" #include "libc/assert.h" +#include "libc/ctype.h" #include "third_party/tidy/sprtf.h" diff --git a/third_party/tr/next.c b/third_party/tr/next.c index 802197dd7..e71c31c97 100644 --- a/third_party/tr/next.c +++ b/third_party/tr/next.c @@ -35,6 +35,7 @@ #include "libc/mem/alg.h" #include "libc/mem/mem.h" #include "libc/str/str.h" +#include "libc/ctype.h" #include "third_party/tr/extern.h" static int backslash(STR *); diff --git a/third_party/tree/html.c b/third_party/tree/html.c index 41b731d19..c6f3a941e 100644 --- a/third_party/tree/html.c +++ b/third_party/tree/html.c @@ -15,6 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "libc/ctype.h" #include "third_party/tree/tree.h" extern char *version, *hversion; diff --git a/third_party/tree/json.c b/third_party/tree/json.c index e9ef424e9..414b25975 100644 --- a/third_party/tree/json.c +++ b/third_party/tree/json.c @@ -16,6 +16,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "libc/sysv/consts/s.h" +#include "libc/ctype.h" #include "third_party/tree/tree.h" extern bool dflag, lflag, pflag, sflag, Fflag, aflag, fflag, uflag, gflag; diff --git a/third_party/tree/tree.c b/third_party/tree/tree.c index d68e8ad96..005e6d0fc 100644 --- a/third_party/tree/tree.c +++ b/third_party/tree/tree.c @@ -29,6 +29,8 @@ #include "libc/calls/struct/stat.macros.h" #include "libc/calls/struct/dirent.h" #include "libc/mem/alg.h" +#include "libc/ctype.h" +#include "libc/wctype.h" #include "third_party/tree/tree.h" char *version = "$Version: $ tree v2.1.1 %s 1996 - 2023 by Steve Baker, Thomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro $"; diff --git a/third_party/zlib/trees.c b/third_party/zlib/trees.c index 578ac9cf6..b3bcd67e5 100644 --- a/third_party/zlib/trees.c +++ b/third_party/zlib/trees.c @@ -10,6 +10,7 @@ #include "libc/stdio/stdio.h" #include "libc/temp.h" #include "libc/str/str.h" +#include "libc/ctype.h" #include "third_party/zlib/deflate.internal.h" /* diff --git a/tool/build/BUILD.mk b/tool/build/BUILD.mk index 844a0ab28..bfbb2ccb2 100644 --- a/tool/build/BUILD.mk +++ b/tool/build/BUILD.mk @@ -96,7 +96,7 @@ o/$(MODE)/tool/build/dso/sandbox.o: \ libc/calls/pledge.h \ libc/runtime/runtime.h \ libc/calls/pledge.internal.h \ - libc/intrin/promises.internal.h \ + libc/intrin/promises.h \ tool/build/BUILD.mk o/$(MODE)/tool/build/dso/sandbox-$(ARCH).so: \ diff --git a/tool/build/apelink.c b/tool/build/apelink.c index cfdcaea61..2c707ab61 100644 --- a/tool/build/apelink.c +++ b/tool/build/apelink.c @@ -19,6 +19,7 @@ #include "ape/ape.h" #include "libc/assert.h" #include "libc/calls/calls.h" +#include "libc/ctype.h" #include "libc/dce.h" #include "libc/dos.internal.h" #include "libc/elf/def.h" diff --git a/tool/build/killall.c b/tool/build/killall.c index 7a250983b..75a41e5c7 100644 --- a/tool/build/killall.c +++ b/tool/build/killall.c @@ -30,6 +30,7 @@ #include "libc/stdio/stdio.h" #include "libc/str/str.h" #include "libc/sysv/consts/sig.h" +#include "libc/wctype.h" #include "libc/x/x.h" #include "third_party/getopt/getopt.internal.h" diff --git a/tool/build/lib/javadown.c b/tool/build/lib/javadown.c index 476da98ca..313d95d0e 100644 --- a/tool/build/lib/javadown.c +++ b/tool/build/lib/javadown.c @@ -17,6 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "tool/build/lib/javadown.h" +#include "libc/ctype.h" #include "libc/mem/mem.h" #include "libc/str/str.h" diff --git a/tool/build/pecheck.c b/tool/build/pecheck.c index 3585f26e3..199cfed02 100644 --- a/tool/build/pecheck.c +++ b/tool/build/pecheck.c @@ -17,6 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/calls/calls.h" +#include "libc/ctype.h" #include "libc/limits.h" #include "libc/nt/struct/imageimportbyname.internal.h" #include "libc/nt/struct/imageimportdescriptor.internal.h" diff --git a/tool/build/pledge.c b/tool/build/pledge.c index 6968f7797..379301069 100644 --- a/tool/build/pledge.c +++ b/tool/build/pledge.c @@ -29,6 +29,7 @@ #include "libc/calls/syscall-nt.internal.h" #include "libc/calls/syscall-sysv.internal.h" #include "libc/calls/syscall_support-sysv.internal.h" +#include "libc/ctype.h" #include "libc/dce.h" #include "libc/elf/def.h" #include "libc/elf/elf.h" diff --git a/tool/decode/ent.c b/tool/decode/ent.c index ff4db3982..585452a61 100644 --- a/tool/decode/ent.c +++ b/tool/decode/ent.c @@ -30,6 +30,7 @@ #include "libc/stdio/rand.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" +#include "libc/ctype.h" #include "third_party/getopt/getopt.internal.h" #define UPDATE "January 28th, 2008" diff --git a/tool/decode/x86opinfo.c b/tool/decode/x86opinfo.c index 79ac631e5..6b741c304 100644 --- a/tool/decode/x86opinfo.c +++ b/tool/decode/x86opinfo.c @@ -16,6 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ +#include "libc/ctype.h" #include "libc/errno.h" #include "libc/macros.internal.h" #include "libc/runtime/runtime.h" diff --git a/tool/lambda/bru2bin.c b/tool/lambda/bru2bin.c index 2516ff0f9..dd317af19 100644 --- a/tool/lambda/bru2bin.c +++ b/tool/lambda/bru2bin.c @@ -23,6 +23,7 @@ #include "libc/stdio/stdio.h" #include "libc/str/locale.h" #include "libc/str/str.h" +#include "libc/wctype.h" #include "third_party/getopt/getopt.internal.h" #define USAGE \ diff --git a/tool/lambda/lam2bin.c b/tool/lambda/lam2bin.c index 9c8dd8fb5..3e0efb9a2 100644 --- a/tool/lambda/lam2bin.c +++ b/tool/lambda/lam2bin.c @@ -17,12 +17,14 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/calls/calls.h" +#include "libc/ctype.h" #include "libc/intrin/kprintf.h" #include "libc/mem/mem.h" #include "libc/runtime/runtime.h" #include "libc/stdio/stdio.h" #include "libc/str/locale.h" #include "libc/str/str.h" +#include "libc/wctype.h" #include "third_party/getopt/getopt.internal.h" #define USAGE \ diff --git a/tool/lambda/lib/debug.c b/tool/lambda/lib/debug.c index f841a1ac3..8a6ea7a43 100644 --- a/tool/lambda/lib/debug.c +++ b/tool/lambda/lib/debug.c @@ -16,6 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ +#include "libc/ctype.h" #include "libc/fmt/itoa.h" #include "libc/intrin/kprintf.h" #include "libc/str/str.h" diff --git a/tool/lambda/lib/getbit.c b/tool/lambda/lib/getbit.c index 8c64eff0f..db22a1a67 100644 --- a/tool/lambda/lib/getbit.c +++ b/tool/lambda/lib/getbit.c @@ -17,6 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" +#include "libc/wctype.h" #include "tool/lambda/lib/blc.h" char GetBit(FILE* f) { diff --git a/tool/net/ljson.c b/tool/net/ljson.c index 10a17c1f6..a3c73616c 100644 --- a/tool/net/ljson.c +++ b/tool/net/ljson.c @@ -18,6 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "tool/net/ljson.h" #include "libc/assert.h" +#include "libc/ctype.h" #include "libc/intrin/likely.h" #include "libc/log/check.h" #include "libc/log/log.h" diff --git a/tool/net/redbean.c b/tool/net/redbean.c index e86be3ab9..0eec73175 100644 --- a/tool/net/redbean.c +++ b/tool/net/redbean.c @@ -31,6 +31,7 @@ #include "libc/calls/struct/termios.h" #include "libc/calls/struct/timespec.h" #include "libc/calls/termios.h" +#include "libc/ctype.h" #include "libc/dce.h" #include "libc/dos.internal.h" #include "libc/errno.h" diff --git a/tool/viz/life.c b/tool/viz/life.c index bbf7df3d3..8ca83fb8b 100644 --- a/tool/viz/life.c +++ b/tool/viz/life.c @@ -22,6 +22,7 @@ #include "libc/calls/struct/termios.h" #include "libc/calls/struct/winsize.h" #include "libc/calls/termios.h" +#include "libc/ctype.h" #include "libc/errno.h" #include "libc/fmt/conv.h" #include "libc/fmt/itoa.h" diff --git a/tool/viz/memzoom.c b/tool/viz/memzoom.c index 034ea4265..e3f16a046 100644 --- a/tool/viz/memzoom.c +++ b/tool/viz/memzoom.c @@ -25,6 +25,7 @@ #include "libc/calls/struct/winsize.h" #include "libc/calls/termios.h" #include "libc/calls/ucontext.h" +#include "libc/ctype.h" #include "libc/dce.h" #include "libc/errno.h" #include "libc/fmt/conv.h" diff --git a/tool/viz/printvideo.c b/tool/viz/printvideo.c index f412911d4..04c7da6b6 100644 --- a/tool/viz/printvideo.c +++ b/tool/viz/printvideo.c @@ -37,6 +37,7 @@ #include "libc/calls/struct/winsize.h" #include "libc/calls/termios.h" #include "libc/calls/ucontext.h" +#include "libc/ctype.h" #include "libc/cxxabi.h" #include "libc/errno.h" #include "libc/fmt/conv.h"