| 555 | |
| 556 | /* Apply TRANS to the buffer in PSTR. */ |
| 557 | |
| 558 | static void |
| 559 | internal_function |
| 560 | re_string_translate_buffer (re_string_t *pstr) |
| 561 | { |
| 562 | int buf_idx, end_idx; |
| 563 | end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; |
| 564 | |
| 565 | for (buf_idx = pstr->valid_len; buf_idx < end_idx; ++buf_idx) |
| 566 | { |
| 567 | int ch = pstr->raw_mbs[pstr->raw_mbs_idx + buf_idx]; |
| 568 | pstr->mbs[buf_idx] = pstr->trans[ch]; |
| 569 | } |
| 570 | |
| 571 | pstr->valid_len = buf_idx; |
| 572 | pstr->valid_raw_len = buf_idx; |
| 573 | } |
| 574 | |
| 575 | /* This function re-construct the buffers. |
no outgoing calls
no test coverage detected