commit 0a8a35770c697b0fd9396046b9b19c1f1c8c9b5a
Author:     Laslo Hunhold <[email protected]>
AuthorDate: Sun May 31 22:52:59 2020 +0200
Commit:     Laslo Hunhold <[email protected]>
CommitDate: Sun May 31 22:52:59 2020 +0200

    Correctly write "code point"
    
    Signed-off-by: Laslo Hunhold <[email protected]>

diff --git a/src/codepoint.c b/src/codepoint.c
index 976f922..7e76ca5 100644
--- 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
index 80421f8..8478f87 100644
--- 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
index 2ec4546..f7c0c0b 100644
--- 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

Reply via email to