Lines Matching refs:i

55 	size_t i;  in mappings_add()  local
60 i = (s + e) / 2; in mappings_add()
61 entry = &map->entries[i]; in mappings_add()
62 if (e == i || entry->cp_uni > cp_uni) { in mappings_add()
63 if (e == i) { in mappings_add()
67 if (map->n > i) { in mappings_add()
68 size_t n = map->n - i, a = sizeof(*map->entries) * n; in mappings_add()
71 memmove(&map->entries[i + 1], &map->entries[i], a); in mappings_add()
74 entry = &map->entries[i]; in mappings_add()
79 e = i; in mappings_add()
81 if (s == i) { in mappings_add()
85 if (map->n > i + 1) { in mappings_add()
86 size_t n = (map->n - i - 1), a = sizeof(*map->entries) * n; in mappings_add()
89 memmove(&map->entries[i + 2], &map->entries[i + 1], a); in mappings_add()
92 entry = &map->entries[i + 1]; in mappings_add()
97 s = i; in mappings_add()
200 int i; in to_cp932_visitor() local
205 i = utf32_utf8(buf_uni, entry->cp_uni); in to_cp932_visitor()
206 buf_uni[i * 4] = '\0'; in to_cp932_visitor()
207 while (--i >= 0) { in to_cp932_visitor()
208 unsigned char c = ((unsigned char *)buf_uni)[i]; in to_cp932_visitor()
209 buf_uni[i * 4] = '\\'; in to_cp932_visitor()
210 buf_uni[i * 4 + 1] = 'x'; in to_cp932_visitor()
211 buf_uni[i * 4 + 2] = "0123456789abcdef"[c >> 4]; in to_cp932_visitor()
212 buf_uni[i * 4 + 3] = "0123456789abcdef"[c & 15]; in to_cp932_visitor()
220 for (i = 0; i < entry->n; ++i) { in to_cp932_visitor()
222 const int c = entry->cp_932[i]; in to_cp932_visitor()
239 int i, len; in from_cp932_visitor() local
246 i = len; in from_cp932_visitor()
247 while (--i >= 0) { in from_cp932_visitor()
248 unsigned char c = ((unsigned char *)buf_uni)[i]; in from_cp932_visitor()
249 buf_uni[i * 3] = '%'; in from_cp932_visitor()
250 buf_uni[i * 3 + 1] = "0123456789abcdef"[c >> 4]; in from_cp932_visitor()
251 buf_uni[i * 3 + 2] = "0123456789abcdef"[c & 15]; in from_cp932_visitor()
254 for (i = 0; i < entry->n; ++i) { in from_cp932_visitor()
255 const int c = entry->cp_932[i]; in from_cp932_visitor()
273 int i; in to_cp50220_visitor() local
278 i = utf32_utf8(buf_uni, entry->cp_uni); in to_cp50220_visitor()
279 buf_uni[i * 4] = '\0'; in to_cp50220_visitor()
280 while (--i >= 0) { in to_cp50220_visitor()
281 unsigned char c = ((unsigned char *)buf_uni)[i]; in to_cp50220_visitor()
282 buf_uni[i * 4] = '\\'; in to_cp50220_visitor()
283 buf_uni[i * 4 + 1] = 'x'; in to_cp50220_visitor()
284 buf_uni[i * 4 + 2] = "0123456789abcdef"[c >> 4]; in to_cp50220_visitor()
285 buf_uni[i * 4 + 3] = "0123456789abcdef"[c & 15]; in to_cp50220_visitor()
293 for (i = 0; i < entry->n; ++i) { in to_cp50220_visitor()
295 const int c = entry->cp_932[i]; in to_cp50220_visitor()
327 int i; in to_cp50222_visitor() local
332 i = utf32_utf8(buf_uni, entry->cp_uni); in to_cp50222_visitor()
333 buf_uni[i * 4] = '\0'; in to_cp50222_visitor()
334 while (--i >= 0) { in to_cp50222_visitor()
335 unsigned char c = ((unsigned char *)buf_uni)[i]; in to_cp50222_visitor()
336 buf_uni[i * 4] = '\\'; in to_cp50222_visitor()
337 buf_uni[i * 4 + 1] = 'x'; in to_cp50222_visitor()
338 buf_uni[i * 4 + 2] = "0123456789abcdef"[c >> 4]; in to_cp50222_visitor()
339 buf_uni[i * 4 + 3] = "0123456789abcdef"[c & 15]; in to_cp50222_visitor()
347 for (i = 0; i < entry->n; ++i) { in to_cp50222_visitor()
349 const int c = entry->cp_932[i]; in to_cp50222_visitor()
483 size_t i; in main() local
485 for (i = 0; i < map.n; ++i) in main()
486 gen->visitor(&map.entries[i]); in main()