X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/0db97c0d2f4568c2b5b5f5f9b791b8025b4732aa..49e57291d78de2b583d6f2197ae6f9d9ff05e456:/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