combining.c (1170B)
1 2 #include "wc.h" 3 #ifdef USE_UNICODE 4 #include "ucs.h" 5 #endif 6 #include "map/iso88596_combining.map" 7 #include "map/iso885911_combining.map" 8 #include "map/cp864_combining.map" 9 #include "map/cp874_combining.map" 10 #include "map/cp1255_combining.map" 11 #include "map/cp1256_combining.map" 12 #include "map/cp1258_combining.map" 13 #include "map/tcvn5712_combining.map" 14 15 wc_bool 16 wc_is_combining(wc_wchar_t cc) 17 { 18 switch (WC_CCS_SET(cc.ccs)) { 19 case WC_CCS_ISO_8859_6: 20 return iso88596_combining_map[cc.code & 0x7f]; 21 case WC_CCS_ISO_8859_11: 22 return iso885911_combining_map[cc.code & 0x7f]; 23 case WC_CCS_CP864: 24 return cp864_combining_map[cc.code & 0x7f]; 25 case WC_CCS_CP874: 26 return cp874_combining_map[cc.code & 0x7f]; 27 case WC_CCS_CP1255: 28 return cp1255_combining_map[cc.code & 0x7f]; 29 case WC_CCS_CP1256: 30 return cp1256_combining_map[cc.code & 0x7f]; 31 case WC_CCS_CP1258_1: 32 return cp1258_combining_map[cc.code & 0x7f]; 33 case WC_CCS_TCVN_5712_1: 34 return tcvn5712_combining_map[cc.code & 0x7f]; 35 #ifdef USE_UNICODE 36 case WC_CCS_UCS2: 37 case WC_CCS_UCS4: 38 case WC_CCS_UCS_TAG: 39 return wc_is_ucs_combining(cc.code); 40 #endif 41 } 42 return WC_FALSE; 43 }