Lines Matching refs:byte_idx

220   Idx byte_idx, end_idx, remain_len;  in build_wcs_buffer()  local
226 for (byte_idx = pstr->valid_len; byte_idx < end_idx;) in build_wcs_buffer()
231 remain_len = end_idx - byte_idx; in build_wcs_buffer()
240 ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i]; in build_wcs_buffer()
241 buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch]; in build_wcs_buffer()
246 p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx; in build_wcs_buffer()
254 wc = (wchar_t) pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; in build_wcs_buffer()
267 pstr->wcs[byte_idx++] = wc; in build_wcs_buffer()
269 for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) in build_wcs_buffer()
270 pstr->wcs[byte_idx++] = WEOF; in build_wcs_buffer()
272 pstr->valid_len = byte_idx; in build_wcs_buffer()
273 pstr->valid_raw_len = byte_idx; in build_wcs_buffer()
284 Idx src_idx, byte_idx, end_idx, remain_len; in build_wcs_upper_buffer() local
293 byte_idx = pstr->valid_len; in build_wcs_upper_buffer()
300 while (byte_idx < end_idx) in build_wcs_upper_buffer()
303 unsigned char ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; in build_wcs_upper_buffer()
312 pstr->mbs[byte_idx] = wcu; in build_wcs_upper_buffer()
313 pstr->wcs[byte_idx] = wcu; in build_wcs_upper_buffer()
314 byte_idx++; in build_wcs_upper_buffer()
319 remain_len = end_idx - byte_idx; in build_wcs_upper_buffer()
323 + byte_idx), remain_len, &pstr->cur_state); in build_wcs_upper_buffer()
333 memcpy (pstr->mbs + byte_idx, buf, mbclen); in build_wcs_upper_buffer()
336 src_idx = byte_idx; in build_wcs_upper_buffer()
341 memcpy (pstr->mbs + byte_idx, in build_wcs_upper_buffer()
342 pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx, mbclen); in build_wcs_upper_buffer()
343 pstr->wcs[byte_idx++] = wcu; in build_wcs_upper_buffer()
345 for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) in build_wcs_upper_buffer()
346 pstr->wcs[byte_idx++] = WEOF; in build_wcs_upper_buffer()
353 pstr->mbs[byte_idx] = ch; in build_wcs_upper_buffer()
355 pstr->wcs[byte_idx++] = (wchar_t) ch; in build_wcs_upper_buffer()
366 pstr->valid_len = byte_idx; in build_wcs_upper_buffer()
367 pstr->valid_raw_len = byte_idx; in build_wcs_upper_buffer()
371 for (src_idx = pstr->valid_raw_len; byte_idx < end_idx;) in build_wcs_upper_buffer()
376 remain_len = end_idx - byte_idx; in build_wcs_upper_buffer()
401 memcpy (pstr->mbs + byte_idx, buf, mbclen); in build_wcs_upper_buffer()
406 if (byte_idx + mbcdlen > pstr->bufs_len) in build_wcs_upper_buffer()
421 for (i = 0; i < (size_t) byte_idx; ++i) in build_wcs_upper_buffer()
426 memcpy (pstr->mbs + byte_idx, buf, mbcdlen); in build_wcs_upper_buffer()
427 pstr->wcs[byte_idx] = wcu; in build_wcs_upper_buffer()
428 pstr->offsets[byte_idx] = src_idx; in build_wcs_upper_buffer()
431 pstr->offsets[byte_idx + i] in build_wcs_upper_buffer()
433 pstr->wcs[byte_idx + i] = WEOF; in build_wcs_upper_buffer()
440 byte_idx += mbcdlen; in build_wcs_upper_buffer()
445 memcpy (pstr->mbs + byte_idx, p, mbclen); in build_wcs_upper_buffer()
448 memcpy (pstr->mbs + byte_idx, p, mbclen); in build_wcs_upper_buffer()
454 pstr->offsets[byte_idx + i] = src_idx + i; in build_wcs_upper_buffer()
458 pstr->wcs[byte_idx++] = wcu; in build_wcs_upper_buffer()
460 for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) in build_wcs_upper_buffer()
461 pstr->wcs[byte_idx++] = WEOF; in build_wcs_upper_buffer()
471 pstr->mbs[byte_idx] = ch; in build_wcs_upper_buffer()
474 pstr->offsets[byte_idx] = src_idx; in build_wcs_upper_buffer()
478 pstr->wcs[byte_idx++] = (wchar_t) ch; in build_wcs_upper_buffer()
489 pstr->valid_len = byte_idx; in build_wcs_upper_buffer()