Lines Matching refs:buf
115 static int utf32_utf8(char *buf, int k) in utf32_utf8() argument
120 buf[0] = k; in utf32_utf8()
123 buf[0] = 0xc0 | (k >> 6); in utf32_utf8()
124 buf[1] = 0x80 | (k & 0x3f); in utf32_utf8()
127 buf[0] = 0xe0 | (k >> 12); in utf32_utf8()
128 buf[1] = 0x80 | ((k >> 6) & 0x3f); in utf32_utf8()
129 buf[2] = 0x80 | (k & 0x3f); in utf32_utf8()
132 buf[0] = 0xf0 | (k >> 18); in utf32_utf8()
133 buf[1] = 0x80 | ((k >> 12) & 0x3f); in utf32_utf8()
134 buf[2] = 0x80 | ((k >> 6) & 0x3f); in utf32_utf8()
135 buf[3] = 0x80 | (k & 0x3f); in utf32_utf8()
138 buf[0] = 0xf8 | (k >> 24); in utf32_utf8()
139 buf[1] = 0x80 | ((k >> 18) & 0x3f); in utf32_utf8()
140 buf[2] = 0x80 | ((k >> 12) & 0x3f); in utf32_utf8()
141 buf[3] = 0x80 | ((k >> 6) & 0x3f); in utf32_utf8()
142 buf[4] = 0x80 | (k & 0x3f); in utf32_utf8()
145 buf[0] = 0xfc | (k >> 30); in utf32_utf8()
146 buf[1] = 0x80 | ((k >> 24) & 0x3f); in utf32_utf8()
147 buf[2] = 0x80 | ((k >> 18) & 0x3f); in utf32_utf8()
148 buf[3] = 0x80 | ((k >> 12) & 0x3f); in utf32_utf8()
149 buf[4] = 0x80 | ((k >> 6) & 0x3f); in utf32_utf8()
150 buf[5] = 0x80 | (k & 0x3f); in utf32_utf8()
153 buf[retval] = '\0'; in utf32_utf8()
382 char buf[1024]; in main() local
408 while (fgets(buf, sizeof(buf), fp)) { in main()
410 char *p = buf; in main()