mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-11 23:22:28 +00:00
Integrate more chibicc changes
This commit is contained in:
parent
2ed7956be4
commit
15280753e2
13 changed files with 293 additions and 182 deletions
8
third_party/chibicc/unicode.c
vendored
8
third_party/chibicc/unicode.c
vendored
|
@ -66,9 +66,9 @@ static bool in_range(uint32_t *range, uint32_t c) {
|
|||
return false;
|
||||
}
|
||||
|
||||
// C11 allows not only ASCII but some multibyte characters in certan
|
||||
// Unicode ranges to be used in an identifier. See C11 Annex D for the
|
||||
// details.
|
||||
// [https://www.sigbus.info/n1570#D] C11 allows not only ASCII but
|
||||
// some multibyte characters in certan Unicode ranges to be used in an
|
||||
// identifier.
|
||||
//
|
||||
// This function returns true if a given character is acceptable as
|
||||
// the first character of an identifier.
|
||||
|
@ -108,7 +108,7 @@ bool is_ident2(uint32_t c) {
|
|||
|
||||
// Returns the number of columns needed to display a given
|
||||
// string in a fixed-width font.
|
||||
int str_width(char *p, int len) {
|
||||
int display_width(char *p, int len) {
|
||||
char *start = p;
|
||||
int w = 0;
|
||||
while (p - start < len) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue