summaryrefslogtreecommitdiff
path: root/lib/unictype/bidi_of.c
diff options
context:
space:
mode:
authorManuel A. Fernandez Montecelo <manuel.montezelo@gmail.com>2016-05-26 16:48:39 +0100
committerManuel A. Fernandez Montecelo <manuel.montezelo@gmail.com>2016-05-26 16:48:39 +0100
commit8dfc46115527afe3706e9e4225e9ad019c97d695 (patch)
tree372d5192b218455834781a0037c57e919a06b488 /lib/unictype/bidi_of.c
parent2291cf138eb72ad38d8c59b8b6f762875c8c4ff2 (diff)
parent5f2b09982312c98863eb9a8dfe2c608b81f58259 (diff)
Merge tag 'upstream/0.9.6'
Upstream version 0.9.6
Diffstat (limited to 'lib/unictype/bidi_of.c')
-rw-r--r--lib/unictype/bidi_of.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/unictype/bidi_of.c b/lib/unictype/bidi_of.c
index 4a293a8..4548ef5 100644
--- a/lib/unictype/bidi_of.c
+++ b/lib/unictype/bidi_of.c
@@ -1,5 +1,5 @@
-/* Bidi categories of Unicode characters.
- Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
+/* Bidi classes of Unicode characters.
+ Copyright (C) 2002, 2006, 2011-2015 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
#include "bidi_of.h"
int
-uc_bidi_category (ucs4_t uc)
+uc_bidi_class (ucs4_t uc)
{
unsigned int index1 = uc >> bidi_category_header_0;
if (index1 < bidi_category_header_1)
@@ -40,7 +40,7 @@ uc_bidi_category (ucs4_t uc)
/* level3 contains 5-bit values, packed into 16-bit words. */
unsigned int lookup3 =
((u_bidi_category.level3[index3>>4]
- | (u_bidi_category.level3[(index3>>4)+1] << 16))
+ | ((unsigned int) u_bidi_category.level3[(index3>>4)+1] << 16))
>> (index3 % 16))
& 0x1f;
@@ -50,3 +50,9 @@ uc_bidi_category (ucs4_t uc)
}
return UC_BIDI_L;
}
+
+int
+uc_bidi_category (ucs4_t uc)
+{
+ return uc_bidi_class (uc);
+}