From 39b07a4031b0e25078859c4b65649d7b92ec0092 Mon Sep 17 00:00:00 2001 From: banx Date: Sat, 28 Dec 2013 06:24:54 -0800 Subject: simplifying is_arabic_letter --- arabtype.c | 6 ++---- 1 file 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; -- cgit v1.2.3 From 2b4aaa8715d709a9d360e5b6c662747055afda04 Mon Sep 17 00:00:00 2001 From: banx Date: Sat, 28 Dec 2013 10:25:12 -0800 Subject: parens --- arabtype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arabtype.c b/arabtype.c index 9971078..12c6b43 100644 --- a/arabtype.c +++ b/arabtype.c @@ -76,7 +76,7 @@ bool is_arabic_letter(uint32_t cp) bool is_linking_type(uint32_t cp) { - if is_arabic_letter(cp) + 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; -- cgit v1.2.3