Lines Matching refs:ucs4_t
28 utf8_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
42 *pwc = ((ucs4_t) (c & 0x1f) << 6)
43 | (ucs4_t) (s[1] ^ 0x80);
51 *pwc = ((ucs4_t) (c & 0x0f) << 12)
52 | ((ucs4_t) (s[1] ^ 0x80) << 6)
53 | (ucs4_t) (s[2] ^ 0x80);
55 } else if (c < 0xf8 && sizeof(ucs4_t)*8 >= 32) {
62 *pwc = ((ucs4_t) (c & 0x07) << 18)
63 | ((ucs4_t) (s[1] ^ 0x80) << 12)
64 | ((ucs4_t) (s[2] ^ 0x80) << 6)
65 | (ucs4_t) (s[3] ^ 0x80);
67 } else if (c < 0xfc && sizeof(ucs4_t)*8 >= 32) {
74 *pwc = ((ucs4_t) (c & 0x03) << 24)
75 | ((ucs4_t) (s[1] ^ 0x80) << 18)
76 | ((ucs4_t) (s[2] ^ 0x80) << 12)
77 | ((ucs4_t) (s[3] ^ 0x80) << 6)
78 | (ucs4_t) (s[4] ^ 0x80);
80 } else if (c < 0xfe && sizeof(ucs4_t)*8 >= 32) {
88 *pwc = ((ucs4_t) (c & 0x01) << 30)
89 | ((ucs4_t) (s[1] ^ 0x80) << 24)
90 | ((ucs4_t) (s[2] ^ 0x80) << 18)
91 | ((ucs4_t) (s[3] ^ 0x80) << 12)
92 | ((ucs4_t) (s[4] ^ 0x80) << 6)
93 | (ucs4_t) (s[5] ^ 0x80);
100 utf8_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) /* n == 0 is acceptable */