Lines Matching refs:ucs

281 static int in_interval_table(unsigned ucs, const struct interval *table, unsigned max)  in in_interval_table()  argument
286 if (ucs < table[0].first || ucs > table[max].last) in in_interval_table()
292 if (ucs > table[mid].last) in in_interval_table()
294 else if (ucs < table[mid].first) in in_interval_table()
302 static int in_uint16_table(unsigned ucs, const uint16_t *table, unsigned max) in in_uint16_table() argument
309 if (ucs < first) in in_uint16_table()
312 if (ucs > last) in in_uint16_table()
320 if (ucs > last) in in_uint16_table()
322 else if (ucs < first) in in_uint16_table()
454 int FAST_FUNC wcwidth(unsigned ucs) in wcwidth() argument
608 if (ucs == 0) in wcwidth()
612 if ((ucs & ~0x80) < 0x20 || ucs == 0x7f) in wcwidth()
615 if (ucs > CONFIG_LAST_SUPPORTED_WCHAR) in wcwidth()
619 if (CONFIG_LAST_SUPPORTED_WCHAR < 0x300 || ucs < 0x300) in wcwidth()
624 if (in_interval_table(ucs, combining, ARRAY_SIZE(combining) - 1)) in wcwidth()
626 if (in_uint16_table(ucs, combining1, ARRAY_SIZE(combining1) - 1)) in wcwidth()
630 if (CONFIG_LAST_SUPPORTED_WCHAR < 0x1100 || ucs < 0x1100) in wcwidth()
638 if ((CONFIG_LAST_SUPPORTED_WCHAR >= 0xd800 && ucs >= 0xd800 && ucs <= 0xf8ff) in wcwidth()
639 || (CONFIG_LAST_SUPPORTED_WCHAR >= 0xfdd0 && ucs >= 0xfdd0 && ucs <= 0xfdef) in wcwidth()
644 if (CONFIG_LAST_SUPPORTED_WCHAR >= 0xfffe && ((ucs & 0xfffe) == 0xfffe)) { in wcwidth()
649 if (ucs >= 0x10000) { in wcwidth()
658 if (in_interval_table(ucs ^ 0x10000, combining0x10000, ARRAY_SIZE(combining0x10000) - 1)) in wcwidth()
662 && ( ucs == 0xE0001 in wcwidth()
663 || (ucs >= 0xE0020 && ucs <= 0xE007F) in wcwidth()
664 || (ucs >= 0xE0100 && ucs <= 0xE01EF) in wcwidth()
676 ( (/*ucs >= 0x1100 &&*/ ucs <= 0x115f) /* Hangul Jamo init. consonants */ in wcwidth()
677 || ucs == 0x2329 /* left-pointing angle bracket; also CJK punct. char */ in wcwidth()
678 || ucs == 0x232a /* right-pointing angle bracket; also CJK punct. char */ in wcwidth()
680 || (ucs >= 0x2e80 && ucs <= 0xa4cf && ucs != 0x303f) /* CJK ... Yi */ in wcwidth()
683 || (ucs >= 0xac00 && ucs <= 0xd7a3) /* Hangul Syllables */ in wcwidth()
686 || (ucs >= 0xf900 && ucs <= 0xfaff) /* CJK Compatibility Ideographs */ in wcwidth()
687 || (ucs >= 0xfe10 && ucs <= 0xfe19) /* Vertical forms */ in wcwidth()
688 || (ucs >= 0xfe30 && ucs <= 0xfe6f) /* CJK Compatibility Forms */ in wcwidth()
689 || (ucs >= 0xff00 && ucs <= 0xff60) /* Fullwidth Forms */ in wcwidth()
690 || (ucs >= 0xffe0 && ucs <= 0xffe6) in wcwidth()
693 || ((ucs >> 17) == (2 >> 1)) /* 20000..3ffff: Supplementary and Tertiary Ideographic Planes */ in wcwidth()