Lines Matching refs:w

54 extern int mbfl_bisec_srch2(int w, const unsigned short tbl[], int n);
77 static bool mbfilter_conv_map_tbl(int c, int *w, unsigned int n, const unsigned short map[/* n */][… in mbfilter_conv_map_tbl() argument
81 *w = c - map[i][0] + map[i][2]; in mbfilter_conv_map_tbl()
88 static bool mbfilter_conv_r_map_tbl(int c, int *w, unsigned int n, const unsigned short map[/* n */… in mbfilter_conv_r_map_tbl() argument
93 *w = c + map[i][0] - map[i][2]; in mbfilter_conv_r_map_tbl()
545 uint32_t w = *in++; in mb_wchar_to_utf8() local
546 if (w < 0x80) { in mb_wchar_to_utf8()
547 out = mb_convert_buf_add(out, w & 0xFF); in mb_wchar_to_utf8()
548 } else if (w < 0x800) { in mb_wchar_to_utf8()
550 out = mb_convert_buf_add2(out, ((w >> 6) & 0x1F) | 0xC0, (w & 0x3F) | 0x80); in mb_wchar_to_utf8()
551 } else if (w < 0x10000) { in mb_wchar_to_utf8()
553 …out = mb_convert_buf_add3(out, ((w >> 12) & 0xF) | 0xE0, ((w >> 6) & 0x3F) | 0x80, (w & 0x3F) | 0x… in mb_wchar_to_utf8()
554 } else if (w < 0x110000) { in mb_wchar_to_utf8()
556 …out = mb_convert_buf_add4(out, ((w >> 18) & 0x7) | 0xF0, ((w >> 12) & 0x3F) | 0x80, ((w >> 6) & 0x… in mb_wchar_to_utf8()
558 MB_CONVERT_ERROR(buf, out, limit, w, mb_wchar_to_utf8); in mb_wchar_to_utf8()
843 uint32_t w = *in++; in mb_wchar_to_utf8_docomo() local
847 if (w < 0x110000) { in mb_wchar_to_utf8_docomo()
848 if ((w == '#' || (w >= '0' && w <= '9')) && len) { in mb_wchar_to_utf8_docomo()
852 if (w == '#') { in mb_wchar_to_utf8_docomo()
854 } else if (w == '0') { in mb_wchar_to_utf8_docomo()
857 s = 0x2966 + (w - '1'); in mb_wchar_to_utf8_docomo()
862 } else if (w == 0xA9) { /* Copyright sign */ in mb_wchar_to_utf8_docomo()
864 } else if (w == 0xAE) { /* Registered sign */ in mb_wchar_to_utf8_docomo()
866 } else if (w >= mb_tbl_uni_docomo2code2_min && w <= mb_tbl_uni_docomo2code2_max) { in mb_wchar_to_utf8_docomo()
867 int i = mbfl_bisec_srch2(w, mb_tbl_uni_docomo2code2_key, mb_tbl_uni_docomo2code2_len); in mb_wchar_to_utf8_docomo()
871 } else if (w >= mb_tbl_uni_docomo2code3_min && w <= mb_tbl_uni_docomo2code3_max) { in mb_wchar_to_utf8_docomo()
872 int i = mbfl_bisec_srch2(w - 0x10000, mb_tbl_uni_docomo2code3_key, mb_tbl_uni_docomo2code3_len); in mb_wchar_to_utf8_docomo()
876 } else if (w >= mb_tbl_uni_docomo2code5_min && w <= mb_tbl_uni_docomo2code5_max) { in mb_wchar_to_utf8_docomo()
877 int i = mbfl_bisec_srch2(w - 0xF0000, mb_tbl_uni_docomo2code5_key, mb_tbl_uni_docomo2code5_len); in mb_wchar_to_utf8_docomo()
884 w = c1; in mb_wchar_to_utf8_docomo()
887 if (w <= 0x7F) { in mb_wchar_to_utf8_docomo()
888 out = mb_convert_buf_add(out, w); in mb_wchar_to_utf8_docomo()
889 } else if (w <= 0x7FF) { in mb_wchar_to_utf8_docomo()
891 out = mb_convert_buf_add2(out, ((w >> 6) & 0x1F) | 0xC0, (w & 0x3F) | 0x80); in mb_wchar_to_utf8_docomo()
892 } else if (w <= 0xFFFF) { in mb_wchar_to_utf8_docomo()
894 …out = mb_convert_buf_add3(out, ((w >> 12) & 0xF) | 0xE0, ((w >> 6) & 0x3F) | 0x80, (w & 0x3F) | 0x… in mb_wchar_to_utf8_docomo()
897 …out = mb_convert_buf_add4(out, ((w >> 18) & 0x7) | 0xF0, ((w >> 12) & 0x3F) | 0x80, ((w >> 6) & 0x… in mb_wchar_to_utf8_docomo()
900 MB_CONVERT_ERROR(buf, out, limit, w, mb_wchar_to_utf8_docomo); in mb_wchar_to_utf8_docomo()
920 uint32_t w = *in++; in mb_wchar_to_utf8_kddi() local
924 if (w < 0x110000) { in mb_wchar_to_utf8_kddi()
925 if ((w == '#' || (w >= '0' && w <= '9')) && len) { in mb_wchar_to_utf8_kddi()
929 if (w == '#') { in mb_wchar_to_utf8_kddi()
931 } else if (w == '0') { in mb_wchar_to_utf8_kddi()
934 s = 0x27A6 + (w - '1'); in mb_wchar_to_utf8_kddi()
939 } else if (w >= NFLAGS('C') && w <= NFLAGS('U')) { /* C for CN, U for US */ in mb_wchar_to_utf8_kddi()
945 if (w == NFLAGS(nflags_s[i][0]) && w2 == NFLAGS(nflags_s[i][1])) { in mb_wchar_to_utf8_kddi()
955 MB_CONVERT_ERROR(buf, out, limit, w, error_handler); in mb_wchar_to_utf8_kddi()
958 } else if (w == 0xA9) { /* Copyright sign */ in mb_wchar_to_utf8_kddi()
960 } else if (w == 0xAE) { /* Registered sign */ in mb_wchar_to_utf8_kddi()
962 } else if (w >= mb_tbl_uni_kddi2code2_min && w <= mb_tbl_uni_kddi2code2_max) { in mb_wchar_to_utf8_kddi()
963 int i = mbfl_bisec_srch2(w, mb_tbl_uni_kddi2code2_key, mb_tbl_uni_kddi2code2_len); in mb_wchar_to_utf8_kddi()
967 } else if (w >= mb_tbl_uni_kddi2code3_min && w <= mb_tbl_uni_kddi2code3_max) { in mb_wchar_to_utf8_kddi()
968 int i = mbfl_bisec_srch2(w - 0x10000, mb_tbl_uni_kddi2code3_key, mb_tbl_uni_kddi2code3_len); in mb_wchar_to_utf8_kddi()
972 } else if (w >= mb_tbl_uni_kddi2code5_min && w <= mb_tbl_uni_kddi2code5_max) { in mb_wchar_to_utf8_kddi()
973 int i = mbfl_bisec_srch2(w - 0xF0000, mb_tbl_uni_kddi2code5_key, mb_tbl_uni_kddi2code5_len); in mb_wchar_to_utf8_kddi()
981 w = c1; in mb_wchar_to_utf8_kddi()
984 if (w <= 0x7F) { in mb_wchar_to_utf8_kddi()
985 out = mb_convert_buf_add(out, w); in mb_wchar_to_utf8_kddi()
986 } else if (w <= 0x7FF) { in mb_wchar_to_utf8_kddi()
988 out = mb_convert_buf_add2(out, ((w >> 6) & 0x1F) | 0xC0, (w & 0x3F) | 0x80); in mb_wchar_to_utf8_kddi()
989 } else if (w <= 0xFFFF) { in mb_wchar_to_utf8_kddi()
991 …out = mb_convert_buf_add3(out, ((w >> 12) & 0xF) | 0xE0, ((w >> 6) & 0x3F) | 0x80, (w & 0x3F) | 0x… in mb_wchar_to_utf8_kddi()
994 …out = mb_convert_buf_add4(out, ((w >> 18) & 0x7) | 0xF0, ((w >> 12) & 0x3F) | 0x80, ((w >> 6) & 0x… in mb_wchar_to_utf8_kddi()
997 MB_CONVERT_ERROR(buf, out, limit, w, error_handler); in mb_wchar_to_utf8_kddi()
1032 uint32_t w = *in++; in mb_wchar_to_utf8_sb() local
1036 if (w < 0x110000) { in mb_wchar_to_utf8_sb()
1037 if ((w == '#' || (w >= '0' && w <= '9')) && len) { in mb_wchar_to_utf8_sb()
1041 if (w == '#') { in mb_wchar_to_utf8_sb()
1043 } else if (w == '0') { in mb_wchar_to_utf8_sb()
1046 s = 0x2823 + (w - '1'); in mb_wchar_to_utf8_sb()
1051 } else if (w >= NFLAGS('C') && w <= NFLAGS('U')) { /* C for CN, U for US */ in mb_wchar_to_utf8_sb()
1057 if (w == NFLAGS(nflags_s[i][0]) && w2 == NFLAGS(nflags_s[i][1])) { in mb_wchar_to_utf8_sb()
1067 MB_CONVERT_ERROR(buf, out, limit, w, mb_wchar_to_utf8_sb); in mb_wchar_to_utf8_sb()
1070 } else if (w == 0xA9) { /* Copyright sign */ in mb_wchar_to_utf8_sb()
1072 } else if (w == 0xAE) { /* Registered sign */ in mb_wchar_to_utf8_sb()
1074 } else if (w >= mb_tbl_uni_sb2code2_min && w <= mb_tbl_uni_sb2code2_max) { in mb_wchar_to_utf8_sb()
1075 int i = mbfl_bisec_srch2(w, mb_tbl_uni_sb2code2_key, mb_tbl_uni_sb2code2_len); in mb_wchar_to_utf8_sb()
1079 } else if (w >= mb_tbl_uni_sb2code3_min && w <= mb_tbl_uni_sb2code3_max) { in mb_wchar_to_utf8_sb()
1080 int i = mbfl_bisec_srch2(w - 0x10000, mb_tbl_uni_sb2code3_key, mb_tbl_uni_sb2code3_len); in mb_wchar_to_utf8_sb()
1084 } else if (w >= mb_tbl_uni_sb2code5_min && w <= mb_tbl_uni_sb2code5_max) { in mb_wchar_to_utf8_sb()
1085 int i = mbfl_bisec_srch2(w - 0xF0000, mb_tbl_uni_sb2code5_key, mb_tbl_uni_sb2code5_len); in mb_wchar_to_utf8_sb()
1093 w = c1; in mb_wchar_to_utf8_sb()
1096 if (w <= 0x7F) { in mb_wchar_to_utf8_sb()
1097 out = mb_convert_buf_add(out, w); in mb_wchar_to_utf8_sb()
1098 } else if (w <= 0x7FF) { in mb_wchar_to_utf8_sb()
1100 out = mb_convert_buf_add2(out, ((w >> 6) & 0x1F) | 0xC0, (w & 0x3F) | 0x80); in mb_wchar_to_utf8_sb()
1101 } else if (w <= 0xFFFF) { in mb_wchar_to_utf8_sb()
1103 …out = mb_convert_buf_add3(out, ((w >> 12) & 0xF) | 0xE0, ((w >> 6) & 0x3F) | 0x80, (w & 0x3F) | 0x… in mb_wchar_to_utf8_sb()
1106 …out = mb_convert_buf_add4(out, ((w >> 18) & 0x7) | 0xF0, ((w >> 12) & 0x3F) | 0x80, ((w >> 6) & 0x… in mb_wchar_to_utf8_sb()
1109 MB_CONVERT_ERROR(buf, out, limit, w, mb_wchar_to_utf8_sb); in mb_wchar_to_utf8_sb()