Consistently use uppercase hex digits

This commit is contained in:
Rangi42
2023-10-29 14:24:58 -04:00
committed by Rangi
parent ae38ebaf6f
commit 45c2a5e4ec
7 changed files with 9 additions and 9 deletions

2
src/extern/getopt.c vendored
View File

@@ -82,7 +82,7 @@ static int getopt(int argc, char *argv[], char const *optstring)
k = mbtowc(&c, argv[musl_optind] + musl_optpos, MB_LEN_MAX);
if (k < 0) {
k = 1;
c = 0xfffd; /* replacement char */
c = 0xFFFD; /* replacement char */
}
optchar = argv[musl_optind] + musl_optpos;
musl_optpos += k;

View File

@@ -43,8 +43,8 @@ uint32_t decode(uint32_t *state, uint32_t *codep, uint8_t byte)
uint32_t type = utf8d[byte];
*codep = (*state != 0) ?
(byte & 0x3fu) | (*codep << 6) :
(0xff >> type) & (byte);
(byte & 0x3FU) | (*codep << 6) :
(0xFF >> type) & (byte);
*state = utf8d[256 + *state * 16 + type];
return *state;