mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-06 11:18:30 +00:00
Fold conv package into fmt
Both packages had nearly identical dependency requirements, so merging them should help reduce the complexity of the build graph.
This commit is contained in:
parent
978b7858f9
commit
1fc91f3580
203 changed files with 352 additions and 563 deletions
4
third_party/chibicc/chibicc.h
vendored
4
third_party/chibicc/chibicc.h
vendored
|
@ -5,10 +5,10 @@
|
|||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/struct/stat.h"
|
||||
#include "libc/calls/weirdtypes.h"
|
||||
#include "libc/conv/conv.h"
|
||||
#include "libc/conv/itoa.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/fmt/itoa.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/log/check.h"
|
||||
#include "libc/log/log.h"
|
||||
|
|
1
third_party/chibicc/chibicc.mk
vendored
1
third_party/chibicc/chibicc.mk
vendored
|
@ -42,7 +42,6 @@ THIRD_PARTY_CHIBICC_A_DIRECTDEPS = \
|
|||
LIBC_BITS \
|
||||
LIBC_CALLS \
|
||||
LIBC_CALLS_HEFTY \
|
||||
LIBC_CONV \
|
||||
LIBC_FMT \
|
||||
LIBC_LOG \
|
||||
LIBC_MEM \
|
||||
|
|
13
third_party/chibicc/preprocess.c
vendored
13
third_party/chibicc/preprocess.c
vendored
|
@ -1301,18 +1301,6 @@ static void join_adjacent_string_literals(Token *tok) {
|
|||
tok1 = tok1->next;
|
||||
continue;
|
||||
}
|
||||
#if 0
|
||||
assert(tok1->ty->base->size == tok2->ty->base->size);
|
||||
Token *t = copy_token(tok1);
|
||||
t->ty =
|
||||
array_of(tok1->ty->base, tok1->ty->array_len + tok2->ty->array_len - 1);
|
||||
t->str = calloc(1, t->ty->size);
|
||||
t->next = tok2->next;
|
||||
memcpy(mempcpy(t->str, tok1->str, tok1->ty->size - tok1->ty->base->size),
|
||||
tok2->str, tok2->ty->size);
|
||||
t->len = strlen(t->loc);
|
||||
*tok1 = *t;
|
||||
#else
|
||||
Token *tok2 = tok1->next;
|
||||
while (tok2->kind == TK_STR) tok2 = tok2->next;
|
||||
int len = tok1->ty->array_len;
|
||||
|
@ -1330,7 +1318,6 @@ static void join_adjacent_string_literals(Token *tok) {
|
|||
tok1->str = buf;
|
||||
tok1->next = tok2;
|
||||
tok1 = tok2;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
13
third_party/ctags/ctags.mk
vendored
13
third_party/ctags/ctags.mk
vendored
|
@ -15,17 +15,16 @@ THIRD_PARTY_CTAGS_CHECKS = \
|
|||
THIRD_PARTY_CTAGS_DIRECTDEPS = \
|
||||
LIBC_CALLS \
|
||||
LIBC_CALLS_HEFTY \
|
||||
LIBC_CONV \
|
||||
LIBC_RUNTIME \
|
||||
LIBC_MEM \
|
||||
LIBC_FMT \
|
||||
LIBC_LOG \
|
||||
LIBC_TIME \
|
||||
LIBC_SYSV \
|
||||
LIBC_MEM \
|
||||
LIBC_NEXGEN32E \
|
||||
LIBC_RUNTIME \
|
||||
LIBC_STDIO \
|
||||
LIBC_STR \
|
||||
LIBC_STUBS \
|
||||
LIBC_STDIO \
|
||||
LIBC_NEXGEN32E \
|
||||
LIBC_SYSV \
|
||||
LIBC_TIME \
|
||||
LIBC_UNICODE \
|
||||
THIRD_PARTY_MUSL \
|
||||
THIRD_PARTY_REGEX
|
||||
|
|
2
third_party/ctags/eiffel.c
vendored
2
third_party/ctags/eiffel.c
vendored
|
@ -12,7 +12,7 @@
|
|||
#include "third_party/ctags/general.h"
|
||||
/* must always come first */
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/conv/conv.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/ctags/debug.h"
|
||||
|
|
2
third_party/ctags/readtags.c
vendored
2
third_party/ctags/readtags.c
vendored
|
@ -9,8 +9,8 @@
|
|||
*/
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/weirdtypes.h"
|
||||
#include "libc/conv/conv.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
|
|
2
third_party/dlmalloc/dlmalloc.c
vendored
2
third_party/dlmalloc/dlmalloc.c
vendored
|
@ -2,8 +2,8 @@
|
|||
#include "libc/bits/safemacros.internal.h"
|
||||
#include "libc/calls/internal.h"
|
||||
#include "libc/calls/struct/sysinfo.h"
|
||||
#include "libc/conv/conv.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/macros.h"
|
||||
#include "libc/mem/mem.h"
|
||||
|
|
1
third_party/dlmalloc/dlmalloc.mk
vendored
1
third_party/dlmalloc/dlmalloc.mk
vendored
|
@ -27,7 +27,6 @@ THIRD_PARTY_DLMALLOC_A_CHECKS = \
|
|||
THIRD_PARTY_DLMALLOC_A_DIRECTDEPS = \
|
||||
LIBC_BITS \
|
||||
LIBC_CALLS \
|
||||
LIBC_CONV \
|
||||
LIBC_FMT \
|
||||
LIBC_NEXGEN32E \
|
||||
LIBC_RUNTIME \
|
||||
|
|
2
third_party/dlmalloc/mtrace.c
vendored
2
third_party/dlmalloc/mtrace.c
vendored
|
@ -17,7 +17,7 @@
|
|||
│ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │
|
||||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/conv/itoa.h"
|
||||
#include "libc/fmt/itoa.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/dlmalloc/dlmalloc.internal.h"
|
||||
|
|
2
third_party/duktape/duk_config.h
vendored
2
third_party/duktape/duk_config.h
vendored
|
@ -44,8 +44,8 @@
|
|||
#include "libc/calls/termios.h"
|
||||
#include "libc/calls/typedef/sighandler_t.h"
|
||||
#include "libc/calls/weirdtypes.h"
|
||||
#include "libc/conv/conv.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/inttypes.h"
|
||||
#include "libc/limits.h"
|
||||
|
|
9
third_party/f2c/f2c.mk
vendored
9
third_party/f2c/f2c.mk
vendored
|
@ -22,16 +22,15 @@ THIRD_PARTY_F2C_A_CHECKS = \
|
|||
$(THIRD_PARTY_F2C_A_HDRS:%=o/$(MODE)/%.ok)
|
||||
|
||||
THIRD_PARTY_F2C_A_DIRECTDEPS = \
|
||||
LIBC_CONV \
|
||||
LIBC_CALLS \
|
||||
LIBC_CALLS_HEFTY \
|
||||
LIBC_RUNTIME \
|
||||
LIBC_MEM \
|
||||
LIBC_FMT \
|
||||
LIBC_MEM \
|
||||
LIBC_NEXGEN32E \
|
||||
LIBC_RUNTIME \
|
||||
LIBC_STDIO \
|
||||
LIBC_STR \
|
||||
LIBC_STUBS \
|
||||
LIBC_STDIO \
|
||||
LIBC_NEXGEN32E \
|
||||
LIBC_UNICODE
|
||||
|
||||
THIRD_PARTY_F2C_A_DEPS := \
|
||||
|
|
2
third_party/f2c/wref.c
vendored
2
third_party/f2c/wref.c
vendored
|
@ -1,4 +1,4 @@
|
|||
#include "libc/conv/conv.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/f2c/fmt.h"
|
||||
|
|
2
third_party/lemon/lemon.c
vendored
2
third_party/lemon/lemon.c
vendored
|
@ -10,7 +10,7 @@
|
|||
#include "libc/alg/alg.h"
|
||||
#include "libc/assert.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/conv/conv.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/runtime/gc.h"
|
||||
|
|
1
third_party/lemon/lemon.mk
vendored
1
third_party/lemon/lemon.mk
vendored
|
@ -22,7 +22,6 @@ THIRD_PARTY_LEMON_LINK = \
|
|||
THIRD_PARTY_LEMON_DIRECTDEPS = \
|
||||
LIBC_ALG \
|
||||
LIBC_CALLS \
|
||||
LIBC_CONV \
|
||||
LIBC_FMT \
|
||||
LIBC_MEM \
|
||||
LIBC_NEXGEN32E \
|
||||
|
|
2
third_party/lex/buf.c
vendored
2
third_party/lex/buf.c
vendored
|
@ -42,7 +42,7 @@
|
|||
#include "libc/mem/mem.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/math.h"
|
||||
#include "libc/conv/conv.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "flexdef.h"
|
||||
|
||||
/* Take note: The buffer object is sometimes used as a String buffer (one
|
||||
|
|
1
third_party/lex/lex.mk
vendored
1
third_party/lex/lex.mk
vendored
|
@ -60,7 +60,6 @@ THIRD_PARTY_LEX_DIRECTDEPS = \
|
|||
LIBC_ALG \
|
||||
LIBC_CALLS \
|
||||
LIBC_CALLS_HEFTY \
|
||||
LIBC_CONV \
|
||||
LIBC_FMT \
|
||||
LIBC_LOG \
|
||||
LIBC_MATH \
|
||||
|
|
2
third_party/lex/main.c
vendored
2
third_party/lex/main.c
vendored
|
@ -50,7 +50,7 @@ asm(".include \"third_party/lex/COPYING\"");
|
|||
#include "libc/str/str.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/math.h"
|
||||
#include "libc/conv/conv.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/runtime/gc.h"
|
||||
#include "libc/x/x.h"
|
||||
|
|
2
third_party/lex/regex.c
vendored
2
third_party/lex/regex.c
vendored
|
@ -31,7 +31,7 @@
|
|||
#include "libc/str/str.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/conv/conv.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "flexdef.h"
|
||||
|
||||
|
||||
|
|
2
third_party/lex/scanopt.c
vendored
2
third_party/lex/scanopt.c
vendored
|
@ -39,7 +39,7 @@
|
|||
|
||||
#include "flexdef.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/conv/conv.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/str/str.h"
|
||||
|
|
2
third_party/lex/tables.c
vendored
2
third_party/lex/tables.c
vendored
|
@ -1,7 +1,7 @@
|
|||
/*-*- mode:c;indent-tabs-mode:t;c-basic-offset:8;tab-width:8;coding:utf-8 -*-│
|
||||
│vi: set et ft=c ts=8 sw=8 fenc=utf-8 :vi│
|
||||
└─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/conv/conv.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/sock/sock.h"
|
||||
#include "libc/str/str.h"
|
||||
|
|
2
third_party/m4/eval.c
vendored
2
third_party/m4/eval.c
vendored
|
@ -41,7 +41,7 @@
|
|||
*/
|
||||
|
||||
#include "libc/bits/safemacros.internal.h"
|
||||
#include "libc/conv/conv.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/log/bsd.h"
|
||||
|
|
2
third_party/m4/gnum4.c
vendored
2
third_party/m4/gnum4.c
vendored
|
@ -38,7 +38,7 @@
|
|||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/log/bsd.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/conv/conv.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/calls/weirdtypes.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/errno.h"
|
||||
|
|
2
third_party/m4/tokenizer.c
vendored
2
third_party/m4/tokenizer.c
vendored
|
@ -1,4 +1,4 @@
|
|||
#include "libc/conv/conv.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/str/str.h"
|
||||
|
|
11
third_party/stb/stb.mk
vendored
11
third_party/stb/stb.mk
vendored
|
@ -28,18 +28,17 @@ THIRD_PARTY_STB_A_OBJS = \
|
|||
THIRD_PARTY_STB_A_DIRECTDEPS = \
|
||||
DSP_CORE \
|
||||
LIBC_ALG \
|
||||
LIBC_FMT \
|
||||
LIBC_STDIO \
|
||||
LIBC_BITS \
|
||||
LIBC_CONV \
|
||||
LIBC_FMT \
|
||||
LIBC_LOG \
|
||||
LIBC_MEM \
|
||||
LIBC_NEXGEN32E \
|
||||
LIBC_TINYMATH \
|
||||
LIBC_RUNTIME \
|
||||
LIBC_STDIO \
|
||||
LIBC_STR \
|
||||
LIBC_LOG \
|
||||
LIBC_X \
|
||||
LIBC_STUBS \
|
||||
LIBC_TINYMATH \
|
||||
LIBC_X \
|
||||
THIRD_PARTY_ZLIB
|
||||
|
||||
THIRD_PARTY_STB_A_DEPS := \
|
||||
|
|
2
third_party/stb/stb_image.c
vendored
2
third_party/stb/stb_image.c
vendored
|
@ -20,7 +20,7 @@
|
|||
#include "libc/assert.h"
|
||||
#include "libc/bits/bits.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/conv/conv.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/log/gdb.h"
|
||||
#include "libc/log/log.h"
|
||||
|
|
2
third_party/stb/stb_image_write.c
vendored
2
third_party/stb/stb_image_write.c
vendored
|
@ -120,7 +120,7 @@
|
|||
*/
|
||||
#include "dsp/core/core.h"
|
||||
#include "libc/assert.h"
|
||||
#include "libc/conv/conv.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/macros.h"
|
||||
|
|
2
third_party/stb/stb_image_write_png.c
vendored
2
third_party/stb/stb_image_write_png.c
vendored
|
@ -119,7 +119,7 @@
|
|||
* Public Domain (www.unlicense.org)
|
||||
*/
|
||||
#include "libc/assert.h"
|
||||
#include "libc/conv/conv.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
|
|
2
third_party/stb/stb_vorbis.c
vendored
2
third_party/stb/stb_vorbis.c
vendored
|
@ -36,7 +36,7 @@
|
|||
#include "libc/assert.h"
|
||||
#include "libc/bits/bits.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/conv/conv.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/math.h"
|
||||
#include "libc/mem/alloca.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue