aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbanx <banxoo+github@gmail.com>2013-12-28 06:24:54 -0800
committerbanx <banxoo+github@gmail.com>2013-12-28 06:24:54 -0800
commit39b07a4031b0e25078859c4b65649d7b92ec0092 (patch)
treea4c9bc649e15835fc63d510a0f79e8ac2ea8ab7a
parente7dbe44fc3d6c98e0abd6e36e23671b4b9627fb5 (diff)
simplifying is_arabic_letter
-rw-r--r--arabtype.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arabtype.c b/arabtype.c
index d9ac78d..9971078 100644
--- a/arabtype.c
+++ b/arabtype.c
@@ -71,14 +71,12 @@ char_form arabic_forms_b[] =
bool is_arabic_letter(uint32_t cp)
{
- if( cp >= ARABIC_LETTER_START && cp <= ARABIC_LETTER_END )
- return true;
- return false;
+ return ( cp >= ARABIC_LETTER_START && cp <= ARABIC_LETTER_END );
}
bool is_linking_type(uint32_t cp)
{
- if( cp >= ARABIC_LETTER_START && cp <= ARABIC_LETTER_END )
+ if is_arabic_letter(cp)
if( arabic_forms_b[cp - ARABIC_LETTER_START][INITIAL] || arabic_forms_b[cp - ARABIC_LETTER_START][MEDIAL] )
return true;
return false;