pstr 21 maint/gnulib/lib/regex_internal.c re_string_t *pstr, pstr 31 maint/gnulib/lib/regex_internal.c static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr, pstr 33 maint/gnulib/lib/regex_internal.c static void build_wcs_buffer (re_string_t *pstr); pstr 34 maint/gnulib/lib/regex_internal.c static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr); pstr 35 maint/gnulib/lib/regex_internal.c static void build_upper_buffer (re_string_t *pstr); pstr 36 maint/gnulib/lib/regex_internal.c static void re_string_translate_buffer (re_string_t *pstr); pstr 47 maint/gnulib/lib/regex_internal.c re_string_allocate (re_string_t *pstr, const char *str, Idx len, Idx init_len, pstr 57 maint/gnulib/lib/regex_internal.c re_string_construct_common (str, len, pstr, trans, icase, dfa); pstr 59 maint/gnulib/lib/regex_internal.c ret = re_string_realloc_buffers (pstr, init_buf_len); pstr 63 maint/gnulib/lib/regex_internal.c pstr->word_char = dfa->word_char; pstr 64 maint/gnulib/lib/regex_internal.c pstr->word_ops_used = dfa->word_ops_used; pstr 65 maint/gnulib/lib/regex_internal.c pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; pstr 66 maint/gnulib/lib/regex_internal.c pstr->valid_len = (pstr->mbs_allocated || dfa->mb_cur_max > 1) ? 0 : len; pstr 67 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len = pstr->valid_len; pstr 75 maint/gnulib/lib/regex_internal.c re_string_construct (re_string_t *pstr, const char *str, Idx len, pstr 79 maint/gnulib/lib/regex_internal.c memset (pstr, '\0', sizeof (re_string_t)); pstr 80 maint/gnulib/lib/regex_internal.c re_string_construct_common (str, len, pstr, trans, icase, dfa); pstr 84 maint/gnulib/lib/regex_internal.c ret = re_string_realloc_buffers (pstr, len + 1); pstr 88 maint/gnulib/lib/regex_internal.c pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; pstr 96 maint/gnulib/lib/regex_internal.c ret = build_wcs_upper_buffer (pstr); pstr 99 maint/gnulib/lib/regex_internal.c if (pstr->valid_raw_len >= len) pstr 101 maint/gnulib/lib/regex_internal.c if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max) pstr 103 maint/gnulib/lib/regex_internal.c ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); pstr 109 maint/gnulib/lib/regex_internal.c build_upper_buffer (pstr); pstr 114 maint/gnulib/lib/regex_internal.c build_wcs_buffer (pstr); pstr 118 maint/gnulib/lib/regex_internal.c re_string_translate_buffer (pstr); pstr 121 maint/gnulib/lib/regex_internal.c pstr->valid_len = pstr->bufs_len; pstr 122 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len = pstr->bufs_len; pstr 134 maint/gnulib/lib/regex_internal.c re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len) pstr 136 maint/gnulib/lib/regex_internal.c if (pstr->mb_cur_max > 1) pstr 146 maint/gnulib/lib/regex_internal.c new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len); pstr 149 maint/gnulib/lib/regex_internal.c pstr->wcs = new_wcs; pstr 150 maint/gnulib/lib/regex_internal.c if (pstr->offsets != NULL) pstr 152 maint/gnulib/lib/regex_internal.c Idx *new_offsets = re_realloc (pstr->offsets, Idx, new_buf_len); pstr 155 maint/gnulib/lib/regex_internal.c pstr->offsets = new_offsets; pstr 158 maint/gnulib/lib/regex_internal.c if (pstr->mbs_allocated) pstr 160 maint/gnulib/lib/regex_internal.c unsigned char *new_mbs = re_realloc (pstr->mbs, unsigned char, pstr 164 maint/gnulib/lib/regex_internal.c pstr->mbs = new_mbs; pstr 166 maint/gnulib/lib/regex_internal.c pstr->bufs_len = new_buf_len; pstr 172 maint/gnulib/lib/regex_internal.c re_string_construct_common (const char *str, Idx len, re_string_t *pstr, pstr 176 maint/gnulib/lib/regex_internal.c pstr->raw_mbs = (const unsigned char *) str; pstr 177 maint/gnulib/lib/regex_internal.c pstr->len = len; pstr 178 maint/gnulib/lib/regex_internal.c pstr->raw_len = len; pstr 179 maint/gnulib/lib/regex_internal.c pstr->trans = trans; pstr 180 maint/gnulib/lib/regex_internal.c pstr->icase = icase; pstr 181 maint/gnulib/lib/regex_internal.c pstr->mbs_allocated = (trans != NULL || icase); pstr 182 maint/gnulib/lib/regex_internal.c pstr->mb_cur_max = dfa->mb_cur_max; pstr 183 maint/gnulib/lib/regex_internal.c pstr->is_utf8 = dfa->is_utf8; pstr 184 maint/gnulib/lib/regex_internal.c pstr->map_notascii = dfa->map_notascii; pstr 185 maint/gnulib/lib/regex_internal.c pstr->stop = pstr->len; pstr 186 maint/gnulib/lib/regex_internal.c pstr->raw_stop = pstr->stop; pstr 202 maint/gnulib/lib/regex_internal.c build_wcs_buffer (re_string_t *pstr) pstr 206 maint/gnulib/lib/regex_internal.c DEBUG_ASSERT (MB_LEN_MAX >= pstr->mb_cur_max); pstr 216 maint/gnulib/lib/regex_internal.c end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; pstr 217 maint/gnulib/lib/regex_internal.c for (byte_idx = pstr->valid_len; byte_idx < end_idx;) pstr 223 maint/gnulib/lib/regex_internal.c prev_st = pstr->cur_state; pstr 225 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->trans != NULL)) pstr 229 maint/gnulib/lib/regex_internal.c for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) pstr 231 maint/gnulib/lib/regex_internal.c ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i]; pstr 232 maint/gnulib/lib/regex_internal.c buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch]; pstr 237 maint/gnulib/lib/regex_internal.c p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx; pstr 238 maint/gnulib/lib/regex_internal.c mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state); pstr 241 maint/gnulib/lib/regex_internal.c && pstr->bufs_len >= pstr->len))) pstr 245 maint/gnulib/lib/regex_internal.c wc = (wchar_t) pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; pstr 246 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->trans != NULL)) pstr 247 maint/gnulib/lib/regex_internal.c wc = pstr->trans[wc]; pstr 248 maint/gnulib/lib/regex_internal.c pstr->cur_state = prev_st; pstr 253 maint/gnulib/lib/regex_internal.c pstr->cur_state = prev_st; pstr 258 maint/gnulib/lib/regex_internal.c pstr->wcs[byte_idx++] = wc; pstr 261 maint/gnulib/lib/regex_internal.c pstr->wcs[byte_idx++] = WEOF; pstr 263 maint/gnulib/lib/regex_internal.c pstr->valid_len = byte_idx; pstr 264 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len = byte_idx; pstr 272 maint/gnulib/lib/regex_internal.c build_wcs_upper_buffer (re_string_t *pstr) pstr 279 maint/gnulib/lib/regex_internal.c DEBUG_ASSERT (pstr->mb_cur_max <= MB_LEN_MAX); pstr 284 maint/gnulib/lib/regex_internal.c byte_idx = pstr->valid_len; pstr 285 maint/gnulib/lib/regex_internal.c end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; pstr 289 maint/gnulib/lib/regex_internal.c if (! pstr->map_notascii && pstr->trans == NULL && !pstr->offsets_needed) pstr 294 maint/gnulib/lib/regex_internal.c unsigned char ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; pstr 296 maint/gnulib/lib/regex_internal.c if (isascii (ch) && mbsinit (&pstr->cur_state)) pstr 303 maint/gnulib/lib/regex_internal.c pstr->mbs[byte_idx] = wcu; pstr 304 maint/gnulib/lib/regex_internal.c pstr->wcs[byte_idx] = wcu; pstr 311 maint/gnulib/lib/regex_internal.c prev_st = pstr->cur_state; pstr 313 maint/gnulib/lib/regex_internal.c ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx pstr 314 maint/gnulib/lib/regex_internal.c + byte_idx), remain_len, &pstr->cur_state); pstr 324 maint/gnulib/lib/regex_internal.c memcpy (pstr->mbs + byte_idx, buf, mbclen); pstr 332 maint/gnulib/lib/regex_internal.c memcpy (pstr->mbs + byte_idx, pstr 333 maint/gnulib/lib/regex_internal.c pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx, mbclen); pstr 334 maint/gnulib/lib/regex_internal.c pstr->wcs[byte_idx++] = wcu; pstr 337 maint/gnulib/lib/regex_internal.c pstr->wcs[byte_idx++] = WEOF; pstr 340 maint/gnulib/lib/regex_internal.c || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len)) pstr 344 maint/gnulib/lib/regex_internal.c pstr->mbs[byte_idx] = ch; pstr 346 maint/gnulib/lib/regex_internal.c pstr->wcs[byte_idx++] = (wchar_t) ch; pstr 348 maint/gnulib/lib/regex_internal.c pstr->cur_state = prev_st; pstr 353 maint/gnulib/lib/regex_internal.c pstr->cur_state = prev_st; pstr 357 maint/gnulib/lib/regex_internal.c pstr->valid_len = byte_idx; pstr 358 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len = byte_idx; pstr 362 maint/gnulib/lib/regex_internal.c for (src_idx = pstr->valid_raw_len; byte_idx < end_idx;) pstr 368 maint/gnulib/lib/regex_internal.c prev_st = pstr->cur_state; pstr 369 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->trans != NULL)) pstr 373 maint/gnulib/lib/regex_internal.c for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) pstr 375 maint/gnulib/lib/regex_internal.c ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i]; pstr 376 maint/gnulib/lib/regex_internal.c buf[i] = pstr->trans[ch]; pstr 381 maint/gnulib/lib/regex_internal.c p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + src_idx; pstr 382 maint/gnulib/lib/regex_internal.c mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state); pstr 392 maint/gnulib/lib/regex_internal.c memcpy (pstr->mbs + byte_idx, buf, mbclen); pstr 397 maint/gnulib/lib/regex_internal.c if (byte_idx + mbcdlen > pstr->bufs_len) pstr 399 maint/gnulib/lib/regex_internal.c pstr->cur_state = prev_st; pstr 403 maint/gnulib/lib/regex_internal.c if (pstr->offsets == NULL) pstr 405 maint/gnulib/lib/regex_internal.c pstr->offsets = re_malloc (Idx, pstr->bufs_len); pstr 407 maint/gnulib/lib/regex_internal.c if (pstr->offsets == NULL) pstr 410 maint/gnulib/lib/regex_internal.c if (!pstr->offsets_needed) pstr 413 maint/gnulib/lib/regex_internal.c pstr->offsets[i] = i; pstr 414 maint/gnulib/lib/regex_internal.c pstr->offsets_needed = 1; pstr 417 maint/gnulib/lib/regex_internal.c memcpy (pstr->mbs + byte_idx, buf, mbcdlen); pstr 418 maint/gnulib/lib/regex_internal.c pstr->wcs[byte_idx] = wcu; pstr 419 maint/gnulib/lib/regex_internal.c pstr->offsets[byte_idx] = src_idx; pstr 422 maint/gnulib/lib/regex_internal.c pstr->offsets[byte_idx + i] pstr 424 maint/gnulib/lib/regex_internal.c pstr->wcs[byte_idx + i] = WEOF; pstr 426 maint/gnulib/lib/regex_internal.c pstr->len += mbcdlen - mbclen; pstr 427 maint/gnulib/lib/regex_internal.c if (pstr->raw_stop > src_idx) pstr 428 maint/gnulib/lib/regex_internal.c pstr->stop += mbcdlen - mbclen; pstr 429 maint/gnulib/lib/regex_internal.c end_idx = (pstr->bufs_len > pstr->len) pstr 430 maint/gnulib/lib/regex_internal.c ? pstr->len : pstr->bufs_len; pstr 436 maint/gnulib/lib/regex_internal.c memcpy (pstr->mbs + byte_idx, p, mbclen); pstr 439 maint/gnulib/lib/regex_internal.c memcpy (pstr->mbs + byte_idx, p, mbclen); pstr 441 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->offsets_needed != 0)) pstr 445 maint/gnulib/lib/regex_internal.c pstr->offsets[byte_idx + i] = src_idx + i; pstr 449 maint/gnulib/lib/regex_internal.c pstr->wcs[byte_idx++] = wcu; pstr 452 maint/gnulib/lib/regex_internal.c pstr->wcs[byte_idx++] = WEOF; pstr 455 maint/gnulib/lib/regex_internal.c || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len)) pstr 458 maint/gnulib/lib/regex_internal.c int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx]; pstr 460 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->trans != NULL)) pstr 461 maint/gnulib/lib/regex_internal.c ch = pstr->trans [ch]; pstr 462 maint/gnulib/lib/regex_internal.c pstr->mbs[byte_idx] = ch; pstr 464 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->offsets_needed != 0)) pstr 465 maint/gnulib/lib/regex_internal.c pstr->offsets[byte_idx] = src_idx; pstr 469 maint/gnulib/lib/regex_internal.c pstr->wcs[byte_idx++] = (wchar_t) ch; pstr 471 maint/gnulib/lib/regex_internal.c pstr->cur_state = prev_st; pstr 476 maint/gnulib/lib/regex_internal.c pstr->cur_state = prev_st; pstr 480 maint/gnulib/lib/regex_internal.c pstr->valid_len = byte_idx; pstr 481 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len = src_idx; pstr 489 maint/gnulib/lib/regex_internal.c re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc) pstr 497 maint/gnulib/lib/regex_internal.c for (rawbuf_idx = pstr->raw_mbs_idx + pstr->valid_raw_len; pstr 501 maint/gnulib/lib/regex_internal.c Idx remain_len = pstr->raw_len - rawbuf_idx; pstr 502 maint/gnulib/lib/regex_internal.c prev_st = pstr->cur_state; pstr 503 maint/gnulib/lib/regex_internal.c mbclen = __mbrtowc (&wc2, (const char *) pstr->raw_mbs + rawbuf_idx, pstr 504 maint/gnulib/lib/regex_internal.c remain_len, &pstr->cur_state); pstr 512 maint/gnulib/lib/regex_internal.c wc = *(unsigned char *) (pstr->raw_mbs + rawbuf_idx); pstr 514 maint/gnulib/lib/regex_internal.c pstr->cur_state = prev_st; pstr 529 maint/gnulib/lib/regex_internal.c build_upper_buffer (re_string_t *pstr) pstr 532 maint/gnulib/lib/regex_internal.c end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; pstr 534 maint/gnulib/lib/regex_internal.c for (char_idx = pstr->valid_len; char_idx < end_idx; ++char_idx) pstr 536 maint/gnulib/lib/regex_internal.c int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx]; pstr 537 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->trans != NULL)) pstr 538 maint/gnulib/lib/regex_internal.c ch = pstr->trans[ch]; pstr 539 maint/gnulib/lib/regex_internal.c pstr->mbs[char_idx] = toupper (ch); pstr 541 maint/gnulib/lib/regex_internal.c pstr->valid_len = char_idx; pstr 542 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len = char_idx; pstr 548 maint/gnulib/lib/regex_internal.c re_string_translate_buffer (re_string_t *pstr) pstr 551 maint/gnulib/lib/regex_internal.c end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; pstr 553 maint/gnulib/lib/regex_internal.c for (buf_idx = pstr->valid_len; buf_idx < end_idx; ++buf_idx) pstr 555 maint/gnulib/lib/regex_internal.c int ch = pstr->raw_mbs[pstr->raw_mbs_idx + buf_idx]; pstr 556 maint/gnulib/lib/regex_internal.c pstr->mbs[buf_idx] = pstr->trans[ch]; pstr 559 maint/gnulib/lib/regex_internal.c pstr->valid_len = buf_idx; pstr 560 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len = buf_idx; pstr 569 maint/gnulib/lib/regex_internal.c re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) pstr 573 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->raw_mbs_idx <= idx)) pstr 574 maint/gnulib/lib/regex_internal.c offset = idx - pstr->raw_mbs_idx; pstr 578 maint/gnulib/lib/regex_internal.c if (pstr->mb_cur_max > 1) pstr 579 maint/gnulib/lib/regex_internal.c memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); pstr 580 maint/gnulib/lib/regex_internal.c pstr->len = pstr->raw_len; pstr 581 maint/gnulib/lib/regex_internal.c pstr->stop = pstr->raw_stop; pstr 582 maint/gnulib/lib/regex_internal.c pstr->valid_len = 0; pstr 583 maint/gnulib/lib/regex_internal.c pstr->raw_mbs_idx = 0; pstr 584 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len = 0; pstr 585 maint/gnulib/lib/regex_internal.c pstr->offsets_needed = 0; pstr 586 maint/gnulib/lib/regex_internal.c pstr->tip_context = ((eflags & REG_NOTBOL) ? CONTEXT_BEGBUF pstr 588 maint/gnulib/lib/regex_internal.c if (!pstr->mbs_allocated) pstr 589 maint/gnulib/lib/regex_internal.c pstr->mbs = (unsigned char *) pstr->raw_mbs; pstr 596 maint/gnulib/lib/regex_internal.c if (__glibc_likely (offset < pstr->valid_raw_len)) pstr 599 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->offsets_needed)) pstr 601 maint/gnulib/lib/regex_internal.c Idx low = 0, high = pstr->valid_len, mid; pstr 605 maint/gnulib/lib/regex_internal.c if (pstr->offsets[mid] > offset) pstr 607 maint/gnulib/lib/regex_internal.c else if (pstr->offsets[mid] < offset) pstr 613 maint/gnulib/lib/regex_internal.c if (pstr->offsets[mid] < offset) pstr 615 maint/gnulib/lib/regex_internal.c pstr->tip_context = re_string_context_at (pstr, mid - 1, pstr 621 maint/gnulib/lib/regex_internal.c if (pstr->valid_len > offset pstr 622 maint/gnulib/lib/regex_internal.c && mid == offset && pstr->offsets[mid] == offset) pstr 624 maint/gnulib/lib/regex_internal.c memmove (pstr->wcs, pstr->wcs + offset, pstr 625 maint/gnulib/lib/regex_internal.c (pstr->valid_len - offset) * sizeof (wint_t)); pstr 626 maint/gnulib/lib/regex_internal.c memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); pstr 627 maint/gnulib/lib/regex_internal.c pstr->valid_len -= offset; pstr 628 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len -= offset; pstr 629 maint/gnulib/lib/regex_internal.c for (low = 0; low < pstr->valid_len; low++) pstr 630 maint/gnulib/lib/regex_internal.c pstr->offsets[low] = pstr->offsets[low + offset] - offset; pstr 636 maint/gnulib/lib/regex_internal.c pstr->len = pstr->raw_len - idx + offset; pstr 637 maint/gnulib/lib/regex_internal.c pstr->stop = pstr->raw_stop - idx + offset; pstr 638 maint/gnulib/lib/regex_internal.c pstr->offsets_needed = 0; pstr 639 maint/gnulib/lib/regex_internal.c while (mid > 0 && pstr->offsets[mid - 1] == offset) pstr 641 maint/gnulib/lib/regex_internal.c while (mid < pstr->valid_len) pstr 642 maint/gnulib/lib/regex_internal.c if (pstr->wcs[mid] != WEOF) pstr 646 maint/gnulib/lib/regex_internal.c if (mid == pstr->valid_len) pstr 647 maint/gnulib/lib/regex_internal.c pstr->valid_len = 0; pstr 650 maint/gnulib/lib/regex_internal.c pstr->valid_len = pstr->offsets[mid] - offset; pstr 651 maint/gnulib/lib/regex_internal.c if (pstr->valid_len) pstr 653 maint/gnulib/lib/regex_internal.c for (low = 0; low < pstr->valid_len; ++low) pstr 654 maint/gnulib/lib/regex_internal.c pstr->wcs[low] = WEOF; pstr 655 maint/gnulib/lib/regex_internal.c memset (pstr->mbs, 255, pstr->valid_len); pstr 658 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len = pstr->valid_len; pstr 663 maint/gnulib/lib/regex_internal.c pstr->tip_context = re_string_context_at (pstr, offset - 1, pstr 665 maint/gnulib/lib/regex_internal.c if (pstr->mb_cur_max > 1) pstr 666 maint/gnulib/lib/regex_internal.c memmove (pstr->wcs, pstr->wcs + offset, pstr 667 maint/gnulib/lib/regex_internal.c (pstr->valid_len - offset) * sizeof (wint_t)); pstr 668 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->mbs_allocated)) pstr 669 maint/gnulib/lib/regex_internal.c memmove (pstr->mbs, pstr->mbs + offset, pstr 670 maint/gnulib/lib/regex_internal.c pstr->valid_len - offset); pstr 671 maint/gnulib/lib/regex_internal.c pstr->valid_len -= offset; pstr 672 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len -= offset; pstr 673 maint/gnulib/lib/regex_internal.c DEBUG_ASSERT (pstr->valid_len > 0); pstr 679 maint/gnulib/lib/regex_internal.c Idx prev_valid_len = pstr->valid_len; pstr 681 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->offsets_needed)) pstr 683 maint/gnulib/lib/regex_internal.c pstr->len = pstr->raw_len - idx + offset; pstr 684 maint/gnulib/lib/regex_internal.c pstr->stop = pstr->raw_stop - idx + offset; pstr 685 maint/gnulib/lib/regex_internal.c pstr->offsets_needed = 0; pstr 687 maint/gnulib/lib/regex_internal.c pstr->valid_len = 0; pstr 688 maint/gnulib/lib/regex_internal.c if (pstr->mb_cur_max > 1) pstr 693 maint/gnulib/lib/regex_internal.c if (pstr->is_utf8) pstr 699 maint/gnulib/lib/regex_internal.c raw = pstr->raw_mbs + pstr->raw_mbs_idx; pstr 700 maint/gnulib/lib/regex_internal.c end = raw + (offset - pstr->mb_cur_max); pstr 701 maint/gnulib/lib/regex_internal.c if (end < pstr->raw_mbs) pstr 702 maint/gnulib/lib/regex_internal.c end = pstr->raw_mbs; pstr 707 maint/gnulib/lib/regex_internal.c if (isascii (*p) && __glibc_likely (pstr->trans == NULL)) pstr 709 maint/gnulib/lib/regex_internal.c memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); pstr 720 maint/gnulib/lib/regex_internal.c Idx mlen = raw + pstr->len - p; pstr 725 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->trans != NULL)) pstr 729 maint/gnulib/lib/regex_internal.c buf[i] = pstr->trans[p[i]]; pstr 740 maint/gnulib/lib/regex_internal.c memset (&pstr->cur_state, '\0', pstr 742 maint/gnulib/lib/regex_internal.c pstr->valid_len = mbclen - (raw + offset - p); pstr 750 maint/gnulib/lib/regex_internal.c pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx; pstr 752 maint/gnulib/lib/regex_internal.c pstr->tip_context pstr 753 maint/gnulib/lib/regex_internal.c = re_string_context_at (pstr, prev_valid_len - 1, eflags); pstr 755 maint/gnulib/lib/regex_internal.c pstr->tip_context = ((__glibc_unlikely (pstr->word_ops_used != 0) pstr 759 maint/gnulib/lib/regex_internal.c && pstr->newline_anchor) pstr 761 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->valid_len)) pstr 763 maint/gnulib/lib/regex_internal.c for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx) pstr 764 maint/gnulib/lib/regex_internal.c pstr->wcs[wcs_idx] = WEOF; pstr 765 maint/gnulib/lib/regex_internal.c if (pstr->mbs_allocated) pstr 766 maint/gnulib/lib/regex_internal.c memset (pstr->mbs, 255, pstr->valid_len); pstr 768 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len = pstr->valid_len; pstr 772 maint/gnulib/lib/regex_internal.c int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1]; pstr 773 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len = 0; pstr 774 maint/gnulib/lib/regex_internal.c if (pstr->trans) pstr 775 maint/gnulib/lib/regex_internal.c c = pstr->trans[c]; pstr 776 maint/gnulib/lib/regex_internal.c pstr->tip_context = (bitset_contain (pstr->word_char, c) pstr 778 maint/gnulib/lib/regex_internal.c : ((IS_NEWLINE (c) && pstr->newline_anchor) pstr 782 maint/gnulib/lib/regex_internal.c if (!__glibc_unlikely (pstr->mbs_allocated)) pstr 783 maint/gnulib/lib/regex_internal.c pstr->mbs += offset; pstr 785 maint/gnulib/lib/regex_internal.c pstr->raw_mbs_idx = idx; pstr 786 maint/gnulib/lib/regex_internal.c pstr->len -= offset; pstr 787 maint/gnulib/lib/regex_internal.c pstr->stop -= offset; pstr 790 maint/gnulib/lib/regex_internal.c if (pstr->mb_cur_max > 1) pstr 792 maint/gnulib/lib/regex_internal.c if (pstr->icase) pstr 794 maint/gnulib/lib/regex_internal.c reg_errcode_t ret = build_wcs_upper_buffer (pstr); pstr 799 maint/gnulib/lib/regex_internal.c build_wcs_buffer (pstr); pstr 802 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->mbs_allocated)) pstr 804 maint/gnulib/lib/regex_internal.c if (pstr->icase) pstr 805 maint/gnulib/lib/regex_internal.c build_upper_buffer (pstr); pstr 806 maint/gnulib/lib/regex_internal.c else if (pstr->trans != NULL) pstr 807 maint/gnulib/lib/regex_internal.c re_string_translate_buffer (pstr); pstr 810 maint/gnulib/lib/regex_internal.c pstr->valid_len = pstr->len; pstr 812 maint/gnulib/lib/regex_internal.c pstr->cur_idx = 0; pstr 818 maint/gnulib/lib/regex_internal.c re_string_peek_byte_case (const re_string_t *pstr, Idx idx) pstr 824 maint/gnulib/lib/regex_internal.c if (__glibc_likely (!pstr->mbs_allocated)) pstr 825 maint/gnulib/lib/regex_internal.c return re_string_peek_byte (pstr, idx); pstr 827 maint/gnulib/lib/regex_internal.c if (pstr->mb_cur_max > 1 pstr 828 maint/gnulib/lib/regex_internal.c && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx)) pstr 829 maint/gnulib/lib/regex_internal.c return re_string_peek_byte (pstr, idx); pstr 831 maint/gnulib/lib/regex_internal.c off = pstr->cur_idx + idx; pstr 832 maint/gnulib/lib/regex_internal.c if (pstr->offsets_needed) pstr 833 maint/gnulib/lib/regex_internal.c off = pstr->offsets[off]; pstr 835 maint/gnulib/lib/regex_internal.c ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; pstr 841 maint/gnulib/lib/regex_internal.c if (pstr->offsets_needed && !isascii (ch)) pstr 842 maint/gnulib/lib/regex_internal.c return re_string_peek_byte (pstr, idx); pstr 848 maint/gnulib/lib/regex_internal.c re_string_fetch_byte_case (re_string_t *pstr) pstr 850 maint/gnulib/lib/regex_internal.c if (__glibc_likely (!pstr->mbs_allocated)) pstr 851 maint/gnulib/lib/regex_internal.c return re_string_fetch_byte (pstr); pstr 853 maint/gnulib/lib/regex_internal.c if (pstr->offsets_needed) pstr 865 maint/gnulib/lib/regex_internal.c if (!re_string_first_byte (pstr, pstr->cur_idx)) pstr 866 maint/gnulib/lib/regex_internal.c return re_string_fetch_byte (pstr); pstr 868 maint/gnulib/lib/regex_internal.c off = pstr->offsets[pstr->cur_idx]; pstr 869 maint/gnulib/lib/regex_internal.c ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; pstr 872 maint/gnulib/lib/regex_internal.c return re_string_fetch_byte (pstr); pstr 874 maint/gnulib/lib/regex_internal.c re_string_skip_bytes (pstr, pstr 875 maint/gnulib/lib/regex_internal.c re_string_char_size_at (pstr, pstr->cur_idx)); pstr 879 maint/gnulib/lib/regex_internal.c return pstr->raw_mbs[pstr->raw_mbs_idx + pstr->cur_idx++]; pstr 883 maint/gnulib/lib/regex_internal.c re_string_destruct (re_string_t *pstr) pstr 885 maint/gnulib/lib/regex_internal.c re_free (pstr->wcs); pstr 886 maint/gnulib/lib/regex_internal.c re_free (pstr->offsets); pstr 887 maint/gnulib/lib/regex_internal.c if (pstr->mbs_allocated) pstr 888 maint/gnulib/lib/regex_internal.c re_free (pstr->mbs); pstr 425 maint/gnulib/lib/regex_internal.h #define re_string_peek_byte(pstr, offset) \ pstr 426 maint/gnulib/lib/regex_internal.h ((pstr)->mbs[(pstr)->cur_idx + offset]) pstr 427 maint/gnulib/lib/regex_internal.h #define re_string_fetch_byte(pstr) \ pstr 428 maint/gnulib/lib/regex_internal.h ((pstr)->mbs[(pstr)->cur_idx++]) pstr 429 maint/gnulib/lib/regex_internal.h #define re_string_first_byte(pstr, idx) \ pstr 430 maint/gnulib/lib/regex_internal.h ((idx) == (pstr)->valid_len || (pstr)->wcs[idx] != WEOF) pstr 431 maint/gnulib/lib/regex_internal.h #define re_string_is_single_byte_char(pstr, idx) \ pstr 432 maint/gnulib/lib/regex_internal.h ((pstr)->wcs[idx] != WEOF && ((pstr)->valid_len == (idx) + 1 \ pstr 433 maint/gnulib/lib/regex_internal.h || (pstr)->wcs[(idx) + 1] != WEOF)) pstr 434 maint/gnulib/lib/regex_internal.h #define re_string_eoi(pstr) ((pstr)->stop <= (pstr)->cur_idx) pstr 435 maint/gnulib/lib/regex_internal.h #define re_string_cur_idx(pstr) ((pstr)->cur_idx) pstr 436 maint/gnulib/lib/regex_internal.h #define re_string_get_buffer(pstr) ((pstr)->mbs) pstr 437 maint/gnulib/lib/regex_internal.h #define re_string_length(pstr) ((pstr)->len) pstr 438 maint/gnulib/lib/regex_internal.h #define re_string_byte_at(pstr,idx) ((pstr)->mbs[idx]) pstr 439 maint/gnulib/lib/regex_internal.h #define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx)) pstr 440 maint/gnulib/lib/regex_internal.h #define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx)) pstr 776 maint/gnulib/lib/regex_internal.h re_string_char_size_at (const re_string_t *pstr, Idx idx) pstr 779 maint/gnulib/lib/regex_internal.h if (pstr->mb_cur_max == 1) pstr 781 maint/gnulib/lib/regex_internal.h for (byte_idx = 1; idx + byte_idx < pstr->valid_len; ++byte_idx) pstr 782 maint/gnulib/lib/regex_internal.h if (pstr->wcs[idx + byte_idx] != WEOF) pstr 789 maint/gnulib/lib/regex_internal.h re_string_wchar_at (const re_string_t *pstr, Idx idx) pstr 791 maint/gnulib/lib/regex_internal.h if (pstr->mb_cur_max == 1) pstr 792 maint/gnulib/lib/regex_internal.h return (wint_t) pstr->mbs[idx]; pstr 793 maint/gnulib/lib/regex_internal.h return (wint_t) pstr->wcs[idx]; pstr 802 maint/gnulib/lib/regex_internal.h re_string_elem_size_at (const re_string_t *pstr, Idx idx) pstr 816 maint/gnulib/lib/regex_internal.h p = pstr->mbs + idx; pstr 817 maint/gnulib/lib/regex_internal.h findidx (table, indirect, extra, &p, pstr->len - idx); pstr 818 maint/gnulib/lib/regex_internal.h return p - pstr->mbs - idx; pstr 3950 maint/gnulib/lib/regexec.c re_string_t *pstr = &mctx->input; pstr 3954 maint/gnulib/lib/regexec.c <= pstr->bufs_len)) pstr 3958 maint/gnulib/lib/regexec.c ret = re_string_realloc_buffers (pstr, pstr 3960 maint/gnulib/lib/regexec.c MIN (pstr->len, pstr->bufs_len * 2))); pstr 3971 maint/gnulib/lib/regexec.c pstr->bufs_len + 1); pstr 3978 maint/gnulib/lib/regexec.c if (pstr->icase) pstr 3980 maint/gnulib/lib/regexec.c if (pstr->mb_cur_max > 1) pstr 3982 maint/gnulib/lib/regexec.c ret = build_wcs_upper_buffer (pstr); pstr 3987 maint/gnulib/lib/regexec.c build_upper_buffer (pstr); pstr 3991 maint/gnulib/lib/regexec.c if (pstr->mb_cur_max > 1) pstr 3992 maint/gnulib/lib/regexec.c build_wcs_buffer (pstr); pstr 3995 maint/gnulib/lib/regexec.c if (pstr->trans != NULL) pstr 3996 maint/gnulib/lib/regexec.c re_string_translate_buffer (pstr);