commit 0a8a35770c697b0fd9396046b9b19c1f1c8c9b5a
parent d2b53cb080b8c75b140bb1a3347b409c118e882d
Author: Laslo Hunhold <dev@frign.de>
Date: Sun, 31 May 2020 22:52:59 +0200
Correctly write "code point"
Signed-off-by: Laslo Hunhold <dev@frign.de>
Diffstat:
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/codepoint.c b/src/codepoint.c
@@ -102,7 +102,7 @@ grapheme_cp_decode(uint32_t *cp, const uint8_t *s, size_t n)
return 1 + (i - 1);
}
/*
- * shift codepoint by 6 bits and add the 6 stored bits
+ * shift code point by 6 bits and add the 6 stored bits
* in s[i] to it using the bitmask 0x3F (00111111)
*/
*cp = (*cp << 6) | (s[i] & 0x3F);
@@ -112,7 +112,7 @@ grapheme_cp_decode(uint32_t *cp, const uint8_t *s, size_t n)
BETWEEN(*cp, UINT32_C(0xD800), UINT32_C(0xDFFF)) ||
*cp > UINT32_C(0x10FFFF)) {
/*
- * codepoint is overlong encoded in the sequence, is a
+ * code point is overlong encoded in the sequence, is a
* high or low UTF-16 surrogate half (0xD800..0xDFFF) or
* not representable in UTF-16 (>0x10FFFF) (RFC-3629
* specifies the latter two conditions)
diff --git a/src/grapheme.c b/src/grapheme.c
@@ -35,7 +35,7 @@ grapheme_len(const char *str)
}
while (cp0 != 0) {
- /* get next codepoint */
+ /* get next code point */
ret = grapheme_cp_decode(&cp1, (uint8_t *)(str + len), 5);
if (cp1 == CP_INVALID || boundary(cp0, cp1, &state)) {
diff --git a/src/test_body.c b/src/test_body.c
@@ -55,7 +55,7 @@ static const struct {
uint8_t *arr; /* byte array */
size_t len; /* number of bytes in array */
size_t exp_len; /* expected length returned */
- uint32_t exp_cp; /* expected codepoint returned */
+ uint32_t exp_cp; /* expected code point returned */
} dec_test[] = {
{
/* empty sequence