mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Consistently use uppercase hex digits
This commit is contained in:
@@ -1945,7 +1945,7 @@ z80_ldio : T_Z80_LDH T_MODE_A T_COMMA op_mem_ind {
|
|||||||
|
|
||||||
c_ind : T_LBRACK T_MODE_C T_RBRACK
|
c_ind : T_LBRACK T_MODE_C T_RBRACK
|
||||||
| T_LBRACK relocexpr T_OP_ADD T_MODE_C T_RBRACK {
|
| T_LBRACK relocexpr T_OP_ADD T_MODE_C T_RBRACK {
|
||||||
if (!rpn_isKnown(&$2) || $2.val != 0xff00)
|
if (!rpn_isKnown(&$2) || $2.val != 0xFF00)
|
||||||
error("Expected constant expression equal to $FF00 for \"$ff00+c\"\n");
|
error("Expected constant expression equal to $FF00 for \"$ff00+c\"\n");
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ static unsigned int mergeSectUnion(struct Section *sect, enum SectionType type,
|
|||||||
!= (sect->alignOfs & mask(alignment))) {
|
!= (sect->alignOfs & mask(alignment))) {
|
||||||
fail("Section already declared with incompatible %u"
|
fail("Section already declared with incompatible %u"
|
||||||
"-byte alignment (offset %" PRIu16 ")\n",
|
"-byte alignment (offset %" PRIu16 ")\n",
|
||||||
1u << sect->align, sect->alignOfs);
|
1U << sect->align, sect->alignOfs);
|
||||||
} else if (alignment > sect->align) {
|
} else if (alignment > sect->align) {
|
||||||
// If the section is not fixed, its alignment is the largest of both
|
// If the section is not fixed, its alignment is the largest of both
|
||||||
sect->align = alignment;
|
sect->align = alignment;
|
||||||
@@ -212,7 +212,7 @@ static unsigned int mergeFragments(struct Section *sect, enum SectionType type,
|
|||||||
} else if ((curOfs & mask(sect->align)) != (sect->alignOfs & mask(alignment))) {
|
} else if ((curOfs & mask(sect->align)) != (sect->alignOfs & mask(alignment))) {
|
||||||
fail("Section already declared with incompatible %u"
|
fail("Section already declared with incompatible %u"
|
||||||
"-byte alignment (offset %" PRIu16 ")\n",
|
"-byte alignment (offset %" PRIu16 ")\n",
|
||||||
1u << sect->align, sect->alignOfs);
|
1U << sect->align, sect->alignOfs);
|
||||||
} else if (alignment > sect->align) {
|
} else if (alignment > sect->align) {
|
||||||
// If the section is not fixed, its alignment is the largest of both
|
// If the section is not fixed, its alignment is the largest of both
|
||||||
sect->align = alignment;
|
sect->align = alignment;
|
||||||
|
|||||||
2
src/extern/getopt.c
vendored
2
src/extern/getopt.c
vendored
@@ -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);
|
k = mbtowc(&c, argv[musl_optind] + musl_optpos, MB_LEN_MAX);
|
||||||
if (k < 0) {
|
if (k < 0) {
|
||||||
k = 1;
|
k = 1;
|
||||||
c = 0xfffd; /* replacement char */
|
c = 0xFFFD; /* replacement char */
|
||||||
}
|
}
|
||||||
optchar = argv[musl_optind] + musl_optpos;
|
optchar = argv[musl_optind] + musl_optpos;
|
||||||
musl_optpos += k;
|
musl_optpos += k;
|
||||||
|
|||||||
4
src/extern/utf8decoder.c
vendored
4
src/extern/utf8decoder.c
vendored
@@ -43,8 +43,8 @@ uint32_t decode(uint32_t *state, uint32_t *codep, uint8_t byte)
|
|||||||
uint32_t type = utf8d[byte];
|
uint32_t type = utf8d[byte];
|
||||||
|
|
||||||
*codep = (*state != 0) ?
|
*codep = (*state != 0) ?
|
||||||
(byte & 0x3fu) | (*codep << 6) :
|
(byte & 0x3FU) | (*codep << 6) :
|
||||||
(0xff >> type) & (byte);
|
(0xFF >> type) & (byte);
|
||||||
|
|
||||||
*state = utf8d[256 + *state * 16 + type];
|
*state = utf8d[256 + *state * 16 + type];
|
||||||
return *state;
|
return *state;
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ void reverse() {
|
|||||||
// TODO: -U
|
// TODO: -U
|
||||||
|
|
||||||
std::vector<std::array<Rgba, 4>> palettes{
|
std::vector<std::array<Rgba, 4>> palettes{
|
||||||
{Rgba(0xffffffff), Rgba(0xaaaaaaff), Rgba(0x555555ff), Rgba(0x000000ff)}
|
{Rgba(0xFFFFFFFF), Rgba(0xAAAAAAFF), Rgba(0x555555FF), Rgba(0x000000FF)}
|
||||||
};
|
};
|
||||||
if (!options.palettes.empty()) {
|
if (!options.palettes.empty()) {
|
||||||
File file;
|
File file;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ struct HashMapEntry {
|
|||||||
struct HashMapEntry *next;
|
struct HashMapEntry *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define FNV_OFFSET_BASIS 0x811c9dc5
|
#define FNV_OFFSET_BASIS 0x811C9DC5
|
||||||
#define FNV_PRIME 16777619
|
#define FNV_PRIME 16777619
|
||||||
|
|
||||||
// FNV-1a hash
|
// FNV-1a hash
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ static unsigned long long getRandomBits(unsigned count) {
|
|||||||
randbits |= (unsigned long long)data << randcount;
|
randbits |= (unsigned long long)data << randcount;
|
||||||
randcount += 8;
|
randcount += 8;
|
||||||
}
|
}
|
||||||
unsigned long long result = randbits & ((1ull << count) - 1);
|
unsigned long long result = randbits & ((1ULL << count) - 1);
|
||||||
randbits >>= count;
|
randbits >>= count;
|
||||||
randcount -= count;
|
randcount -= count;
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Reference in New Issue
Block a user