summaryrefslogtreecommitdiff
path: root/lib/unictype/bidi_of.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unictype/bidi_of.c')
-rw-r--r--lib/unictype/bidi_of.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/unictype/bidi_of.c b/lib/unictype/bidi_of.c
index 93fc7a8..4a293a8 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 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 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
@@ -31,22 +31,22 @@ uc_bidi_category (ucs4_t uc)
{
int lookup1 = u_bidi_category.level1[index1];
if (lookup1 >= 0)
- {
- unsigned int index2 = (uc >> bidi_category_header_2) & bidi_category_header_3;
- int lookup2 = u_bidi_category.level2[lookup1 + index2];
- if (lookup2 >= 0)
- {
- unsigned int index3 = ((uc & bidi_category_header_4) + lookup2) * 5;
- /* 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))
- >> (index3 % 16))
- & 0x1f;
-
- return lookup3;
- }
- }
+ {
+ unsigned int index2 = (uc >> bidi_category_header_2) & bidi_category_header_3;
+ int lookup2 = u_bidi_category.level2[lookup1 + index2];
+ if (lookup2 >= 0)
+ {
+ unsigned int index3 = ((uc & bidi_category_header_4) + lookup2) * 5;
+ /* 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))
+ >> (index3 % 16))
+ & 0x1f;
+
+ return lookup3;
+ }
+ }
}
return UC_BIDI_L;
}