diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-04-01 16:03:29 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-04-01 16:03:47 +0200 |
commit | 8c2f9268ab976015edcff16e26a13398bba8396c (patch) | |
tree | 3a4d21799f29fe0bb17e4cda9aae45106ff54aab /lib/unicode/prop | |
parent | 436969300bbc0a70179afab252d4dd1a8462febc (diff) |
Add unicode/prop.h
Diffstat (limited to 'lib/unicode/prop')
-rw-r--r-- | lib/unicode/prop/uprop_get_gc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/unicode/prop/uprop_get_gc.c b/lib/unicode/prop/uprop_get_gc.c new file mode 100644 index 0000000..da75b98 --- /dev/null +++ b/lib/unicode/prop/uprop_get_gc.c @@ -0,0 +1,12 @@ +#include "__bsearch.h" +#include "rune.h" +#include "unicode/__gc.h" +#include "unicode/prop.h" + +__MLIB_DEFINE_BSEARCH(enum uprop_gc, __mlib_gc_lt, GC_CN) + +enum uprop_gc +uprop_get_gc(rune ch) +{ + return ch <= LATIN1_MAX ? __mlib_gc_lat1_lt[ch] : mlib_lookup(ch); +} |