Fix ctype.h and wctype.h

This commit is contained in:
Justine Tunney 2024-07-21 15:54:17 -07:00
parent e7be5a5e2b
commit 7ebaff34c6
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
180 changed files with 264 additions and 92 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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"
/*

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -11,6 +11,7 @@
#ifndef _GENERAL_H
#define _GENERAL_H
#include "third_party/ctags/config.h"
#include "libc/ctype.h"
/* Define standard error destination
*/

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"
/*

View file

@ -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"
/*

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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 () */

View file

@ -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"

View file

@ -12,6 +12,7 @@
/*
* INCLUDE FILES
*/
#include "libc/ctype.h"
#include "third_party/ctags/general.h" /* must always come first */
#include "libc/limits.h"

View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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, "\

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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"

View file

@ -1,3 +1,4 @@
#include "libc/ctype.h"
#include "libc/str/str.h"
/*************************************************

View file

@ -1,4 +1,5 @@
#include "libc/mem/mem.h"
#include "libc/ctype.h"
#include "libc/str/str.h"
/*************************************************

View file

@ -1,3 +1,4 @@
#include "libc/ctype.h"
#include "libc/str/str.h"
/*************************************************

View file

@ -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

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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]

View file

@ -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;

View file

@ -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

View file

@ -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);

View file

@ -57,6 +57,7 @@
*/
#include "libc/mem/alg.h"
#include "libc/ctype.h"
#include "third_party/regex/tre.inc"
#define CHARCLASS_NAME_MAX 14

View file

@ -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

View file

@ -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"

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -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 */

View file

@ -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 */

View file

@ -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

View file

@ -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 */

View file

@ -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"

View file

@ -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"

View file

@ -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 *);

View file

@ -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;

View file

@ -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;

View file

@ -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 $";

View file

@ -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"
/*