mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-25 03:50:29 +00:00
Rename _bsr/_bsf to bsr/bsf
Now that these functions are behind _COSMO_SOURCE there's no reason for having the ugly underscore anymore. To use these functions, you need to pass -mcosmo to cosmocc.
This commit is contained in:
parent
a6baba1b07
commit
8bfd56b59e
53 changed files with 110 additions and 93 deletions
6
third_party/linenoise/linenoise.c
vendored
6
third_party/linenoise/linenoise.c
vendored
|
@ -369,7 +369,7 @@ static wint_t Capitalize(wint_t c) {
|
|||
static struct rune DecodeUtf8(int c) {
|
||||
struct rune r;
|
||||
if (c < 252) {
|
||||
r.n = _bsr(255 & ~c);
|
||||
r.n = bsr(255 & ~c);
|
||||
r.c = c & (((1 << r.n) - 1) | 3);
|
||||
r.n = 6 - r.n;
|
||||
} else {
|
||||
|
@ -645,7 +645,7 @@ static void abAppendw(struct abuf *a, unsigned long long w) {
|
|||
p[5] = (0x0000ff0000000000 & w) >> 050;
|
||||
p[6] = (0x00ff000000000000 & w) >> 060;
|
||||
p[7] = (0xff00000000000000 & w) >> 070;
|
||||
a->len += w ? (_bsrll(w) >> 3) + 1 : 1;
|
||||
a->len += w ? (bsrll(w) >> 3) + 1 : 1;
|
||||
p[8] = 0;
|
||||
}
|
||||
|
||||
|
@ -1634,7 +1634,7 @@ static size_t linenoiseEscape(char *d, const char *s, size_t n) {
|
|||
break;
|
||||
}
|
||||
WRITE32LE(p, w);
|
||||
p += (_bsr(w) >> 3) + 1;
|
||||
p += (bsr(w) >> 3) + 1;
|
||||
l = w;
|
||||
}
|
||||
return p - d;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue