aboutsummaryrefslogtreecommitdiffstats
path: root/utf8.h
diff options
context:
space:
mode:
authorN-R-K <79544946+N-R-K@users.noreply.github.com>2021-10-28 22:00:53 +0200
committerGitHub <noreply@github.com>2021-10-28 22:00:53 +0200
commit850bc788c3fd4bb96f425ceedfe4237754cabe46 (patch)
tree8007a27013fe67601640e257310161a2c254f3ba /utf8.h
parent03eb664e89d01cb9a28a9a2dcbad6aac208fa03b (diff)
downloadnsxiv-850bc788c3fd4bb96f425ceedfe4237754cabe46.tar.zst
code-style: general cleanups (#137)
* tns_clean_cache: remove unused function arg * remove malloc casting * improve consistency use sizeof(T) at the end * avoid comparing integers of different signedness * use Window type for embed and parent * remove unnecessary comparisons * remove cpp style comments * improve consistency: remove comma from the end of enumerator list * Removed useless _IMAGE_CONFIG defines * consistency: use the same order as snprintf * Resolve c89 warnings Co-authored-by: uidops <uidops@protonmail.com> Co-authored-by: Arthur Williams <taaparthur@gmail.com>
Diffstat (limited to 'utf8.h')
-rw-r--r--utf8.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/utf8.h b/utf8.h
index 8c6a7a0..a9be2d4 100644
--- a/utf8.h
+++ b/utf8.h
@@ -53,13 +53,13 @@ utf8_decode(void *buf, uint32_t *c, int *e)
*c >>= shiftc[len];
/* Accumulate the various error conditions. */
- *e = (*c < mins[len]) << 6; // non-canonical encoding
- *e |= ((*c >> 11) == 0x1b) << 7; // surrogate half?
- *e |= (*c > 0x10FFFF) << 8; // out of range?
+ *e = (*c < mins[len]) << 6; /* non-canonical encoding */
+ *e |= ((*c >> 11) == 0x1b) << 7; /* surrogate half? */
+ *e |= (*c > 0x10FFFF) << 8; /* out of range? */
*e |= (s[1] & 0xc0) >> 2;
*e |= (s[2] & 0xc0) >> 4;
*e |= (s[3] ) >> 6;
- *e ^= 0x2a; // top two bits of each tail byte correct?
+ *e ^= 0x2a; /* top two bits of each tail byte correct? */
*e >>= shifte[len];
return next;