X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/f0c20432f8c9dffd049c785f21cc85d98ff628fd..89fa4d7bfe1d02662a65c4d16faa8a67a3e1041b:/lib/unicode.c diff --git a/lib/unicode.c b/lib/unicode.c index 40b9854..417ae07 100644 --- a/lib/unicode.c +++ b/lib/unicode.c @@ -39,11 +39,7 @@ * - @ref utf8 */ -#include -#include "types.h" - -#include -#include /* TODO */ +#include "common.h" #include "mem.h" #include "vector.h" @@ -109,6 +105,16 @@ static inline int utf32__combining_class(uint32_t c) { return utf32__unidata(c)->ccc; } +/** @brief Return the combining class of @p c + * @param c Code point + * @return Combining class of @p c + * + * @p c can be any 32-bit value, a sensible value will be returned regardless. + */ +int utf32_combining_class(uint32_t c) { + return utf32__combining_class(c); +} + /** @brief Return the General_Category value for @p c * @param c Code point * @return General_Category property value