summaryrefslogtreecommitdiff
path: root/lib/unictype/digit.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unictype/digit.c')
-rw-r--r--lib/unictype/digit.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/unictype/digit.c b/lib/unictype/digit.c
index 21545c7..ba999a2 100644
--- a/lib/unictype/digit.c
+++ b/lib/unictype/digit.c
@@ -1,5 +1,5 @@
/* Values of digit 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,19 +31,19 @@ uc_digit_value (ucs4_t uc)
{
int lookup1 = u_digit.level1[index1];
if (lookup1 >= 0)
- {
- unsigned int index2 = (uc >> digit_header_2) & digit_header_3;
- int lookup2 = u_digit.level2[lookup1 + index2];
- if (lookup2 >= 0)
- {
- unsigned int index3 = (uc & digit_header_4) + lookup2;
- /* level3 contains 4-bit values. */
- unsigned int lookup3 =
- (u_digit.level3[index3>>1] >> ((index3 % 2) * 4)) & 0x0f;
-
- return (int) lookup3 - 1;
- }
- }
+ {
+ unsigned int index2 = (uc >> digit_header_2) & digit_header_3;
+ int lookup2 = u_digit.level2[lookup1 + index2];
+ if (lookup2 >= 0)
+ {
+ unsigned int index3 = (uc & digit_header_4) + lookup2;
+ /* level3 contains 4-bit values. */
+ unsigned int lookup3 =
+ (u_digit.level3[index3>>1] >> ((index3 % 2) * 4)) & 0x0f;
+
+ return (int) lookup3 - 1;
+ }
+ }
}
return -1;
}