summaryrefslogtreecommitdiff
path: root/src/utf8.c
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2022-01-11 09:58:43 +0800
committerJSDurand <mmemmew@gmail.com>2022-01-11 09:58:43 +0800
commit91016bd3855375796fd1eabd501ebc12491f2655 (patch)
treec4a608966b686c9639a90b92c31c00632532fac8 /src/utf8.c
parent949888ad5d0cd0f9f9a87f9938a632b3e32df051 (diff)
Add the framework for character classes.
Now we have the potential to recognize character classes. But the most important task for us now is to experiment with ((B)RN)GLR algorithms, so we leave the character classes at the present state for a moment.
Diffstat (limited to 'src/utf8.c')
-rw-r--r--src/utf8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utf8.c b/src/utf8.c
index f840600..ce47faf 100644
--- a/src/utf8.c
+++ b/src/utf8.c
@@ -41,7 +41,7 @@ decode(UTF8_State *state, uint32_t *codep, uint8_t byte)
}
str_info
-utf8_get_info(str *s, UNUM n)
+utf8_get_info(const str * const restrict s, UNUM n)
{
UTF8_State state = UTF8_STATE_ACCEPT;
uint32_t code = 0;
@@ -85,7 +85,7 @@ new_utf8(char *string, UNUM size)
}
/* result should be long enough to hold the data */
-unsigned char
+BOOL
encode(NUM code_point, str *result)
{
/* calculate the number of bits of CODE_POINT */