aboutsummaryrefslogtreecommitdiffstats
path: root/src/internal.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-10-07 15:19:39 -0400
committerDavid Robillard <d@drobilla.net>2022-10-07 15:22:43 -0400
commit17d90bda87dd445a974de7e644629593ade617d8 (patch)
tree319a23c713a4d089863d9c169d63a1d2d413521c /src/internal.c
parented4c8a50505ab02a8f3a01e41f5f86acca04b81d (diff)
downloadpugl-17d90bda87dd445a974de7e644629593ade617d8.tar.gz
pugl-17d90bda87dd445a974de7e644629593ade617d8.tar.bz2
pugl-17d90bda87dd445a974de7e644629593ade617d8.zip
Use uppercase integer literal suffixes
Diffstat (limited to 'src/internal.c')
-rw-r--r--src/internal.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/internal.c b/src/internal.c
index 69f220e..dd1b7f1 100644
--- a/src/internal.c
+++ b/src/internal.c
@@ -67,29 +67,29 @@ puglDecodeUTF8(const uint8_t* buf)
}
if (buf[0] < 0xE0) {
- FAIL_IF((buf[1] & 0xC0u) != 0x80);
- return ((uint32_t)buf[0] << 6u) + buf[1] - 0x3080u;
+ FAIL_IF((buf[1] & 0xC0U) != 0x80);
+ return ((uint32_t)buf[0] << 6U) + buf[1] - 0x3080U;
}
if (buf[0] < 0xF0) {
- FAIL_IF((buf[1] & 0xC0u) != 0x80);
+ FAIL_IF((buf[1] & 0xC0U) != 0x80);
FAIL_IF(buf[0] == 0xE0 && buf[1] < 0xA0);
- FAIL_IF((buf[2] & 0xC0u) != 0x80);
- return ((uint32_t)buf[0] << 12u) + //
- ((uint32_t)buf[1] << 6u) + //
- ((uint32_t)buf[2] - 0xE2080u);
+ FAIL_IF((buf[2] & 0xC0U) != 0x80);
+ return ((uint32_t)buf[0] << 12U) + //
+ ((uint32_t)buf[1] << 6U) + //
+ ((uint32_t)buf[2] - 0xE2080U);
}
if (buf[0] < 0xF5) {
- FAIL_IF((buf[1] & 0xC0u) != 0x80);
+ FAIL_IF((buf[1] & 0xC0U) != 0x80);
FAIL_IF(buf[0] == 0xF0 && buf[1] < 0x90);
FAIL_IF(buf[0] == 0xF4 && buf[1] >= 0x90);
- FAIL_IF((buf[2] & 0xC0u) != 0x80u);
- FAIL_IF((buf[3] & 0xC0u) != 0x80u);
- return (((uint32_t)buf[0] << 18u) + //
- ((uint32_t)buf[1] << 12u) + //
- ((uint32_t)buf[2] << 6u) + //
- ((uint32_t)buf[3] - 0x3C82080u));
+ FAIL_IF((buf[2] & 0xC0U) != 0x80U);
+ FAIL_IF((buf[3] & 0xC0U) != 0x80U);
+ return (((uint32_t)buf[0] << 18U) + //
+ ((uint32_t)buf[1] << 12U) + //
+ ((uint32_t)buf[2] << 6U) + //
+ ((uint32_t)buf[3] - 0x3C82080U));
}
return 0xFFFD;