mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-25 20:10:29 +00:00
Delete old wcwidth() implementation
This shaves away 144kb of bss memory from every binary linking printf at the expense of slightly increased binary footprint. Kudos for Byron Lai.
This commit is contained in:
parent
2db2f40a98
commit
a657f3e878
15 changed files with 11 additions and 814 deletions
|
@ -315,6 +315,16 @@ static struct timespec GetGraceTime(void) {
|
|||
return timespec_sub(deadline_, timespec_real());
|
||||
}
|
||||
|
||||
static char *strntoupper(char *s, size_t n) {
|
||||
size_t i;
|
||||
for (i = 0; s[i] && i < n; ++i) {
|
||||
if ('a' <= s[i] && s[i] <= 'z') {
|
||||
s[i] -= 'a' - 'A';
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
static int GetNamedVector(const struct NamedVector *choices, size_t n,
|
||||
const char *s) {
|
||||
int i;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue