Lines Matching +full:2 +full:c
1 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 /* util/support/utf8.c */
63 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
64 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
89 #undef c
90 #define c const char macro
91 c krb5int_utf8_mintab[] = {
92 (c)0x20, (c)0x80, (c)0x80, (c)0x80, (c)0x80, (c)0x80, (c)0x80, (c)0x80,
93 (c)0x80, (c)0x80, (c)0x80, (c)0x80, (c)0x80, (c)0x80, (c)0x80, (c)0x80,
94 (c)0x30, (c)0x80, (c)0x80, (c)0x80, (c)0x80, (c)0x00, (c)0x00, (c)0x00,
95 (c)0x00, (c)0x00, (c)0x00, (c)0x00, (c)0x00, (c)0x00, (c)0x00, (c)0x00 };
96 #undef c
104 const unsigned char *c = (const unsigned char *) p; in krb5int_utf8_to_ucs4() local
116 ch = c[0] & mask[len]; in krb5int_utf8_to_ucs4()
119 if ((c[i] & 0xc0) != 0x80) in krb5int_utf8_to_ucs4()
123 ch |= c[i] & 0x3f; in krb5int_utf8_to_ucs4()
134 size_t krb5int_ucs4_to_utf8(krb5_ucs4 c, char *buf) in krb5int_ucs4_to_utf8() argument
140 if (c > 0x10ffff) in krb5int_ucs4_to_utf8()
145 if (c < 0x80) return 1; in krb5int_ucs4_to_utf8()
146 else if (c < 0x800) return 2; in krb5int_ucs4_to_utf8()
147 else if (c < 0x10000) return 3; in krb5int_ucs4_to_utf8()
151 if (c < 0x80) { in krb5int_ucs4_to_utf8()
152 p[len++] = c; in krb5int_ucs4_to_utf8()
153 } else if (c < 0x800) { in krb5int_ucs4_to_utf8()
154 p[len++] = 0xc0 | ( c >> 6 ); in krb5int_ucs4_to_utf8()
155 p[len++] = 0x80 | ( c & 0x3f ); in krb5int_ucs4_to_utf8()
156 } else if (c < 0x10000) { in krb5int_ucs4_to_utf8()
157 p[len++] = 0xe0 | ( c >> 12 ); in krb5int_ucs4_to_utf8()
158 p[len++] = 0x80 | ( (c >> 6) & 0x3f ); in krb5int_ucs4_to_utf8()
159 p[len++] = 0x80 | ( c & 0x3f ); in krb5int_ucs4_to_utf8()
160 } else /* if (c < 0x110000) */ { in krb5int_ucs4_to_utf8()
161 p[len++] = 0xf0 | ( c >> 18 ); in krb5int_ucs4_to_utf8()
162 p[len++] = 0x80 | ( (c >> 12) & 0x3f ); in krb5int_ucs4_to_utf8()
163 p[len++] = 0x80 | ( (c >> 6) & 0x3f ); in krb5int_ucs4_to_utf8()
164 p[len++] = 0x80 | ( c & 0x3f ); in krb5int_ucs4_to_utf8()