mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-26 04:20: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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue