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 34 maint/gnulib/lib/regex_internal.c static void build_wcs_buffer (re_string_t *pstr); pstr 35 maint/gnulib/lib/regex_internal.c static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr); pstr 37 maint/gnulib/lib/regex_internal.c static void build_upper_buffer (re_string_t *pstr); pstr 38 maint/gnulib/lib/regex_internal.c static void re_string_translate_buffer (re_string_t *pstr); pstr 49 maint/gnulib/lib/regex_internal.c re_string_allocate (re_string_t *pstr, const char *str, Idx len, Idx init_len, pstr 59 maint/gnulib/lib/regex_internal.c re_string_construct_common (str, len, pstr, trans, icase, dfa); pstr 61 maint/gnulib/lib/regex_internal.c ret = re_string_realloc_buffers (pstr, init_buf_len); pstr 65 maint/gnulib/lib/regex_internal.c pstr->word_char = dfa->word_char; pstr 66 maint/gnulib/lib/regex_internal.c pstr->word_ops_used = dfa->word_ops_used; pstr 67 maint/gnulib/lib/regex_internal.c pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; pstr 68 maint/gnulib/lib/regex_internal.c pstr->valid_len = (pstr->mbs_allocated || dfa->mb_cur_max > 1) ? 0 : len; pstr 69 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len = pstr->valid_len; pstr 77 maint/gnulib/lib/regex_internal.c re_string_construct (re_string_t *pstr, const char *str, Idx len, pstr 81 maint/gnulib/lib/regex_internal.c memset (pstr, '\0', sizeof (re_string_t)); pstr 82 maint/gnulib/lib/regex_internal.c re_string_construct_common (str, len, pstr, trans, icase, dfa); pstr 86 maint/gnulib/lib/regex_internal.c ret = re_string_realloc_buffers (pstr, len + 1); pstr 90 maint/gnulib/lib/regex_internal.c pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; pstr 99 maint/gnulib/lib/regex_internal.c ret = build_wcs_upper_buffer (pstr); pstr 102 maint/gnulib/lib/regex_internal.c if (pstr->valid_raw_len >= len) pstr 104 maint/gnulib/lib/regex_internal.c if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max) pstr 106 maint/gnulib/lib/regex_internal.c ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); pstr 113 maint/gnulib/lib/regex_internal.c build_upper_buffer (pstr); pstr 119 maint/gnulib/lib/regex_internal.c build_wcs_buffer (pstr); pstr 124 maint/gnulib/lib/regex_internal.c re_string_translate_buffer (pstr); pstr 127 maint/gnulib/lib/regex_internal.c pstr->valid_len = pstr->bufs_len; pstr 128 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len = pstr->bufs_len; pstr 140 maint/gnulib/lib/regex_internal.c re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len) pstr 143 maint/gnulib/lib/regex_internal.c if (pstr->mb_cur_max > 1) pstr 153 maint/gnulib/lib/regex_internal.c new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len); pstr 156 maint/gnulib/lib/regex_internal.c pstr->wcs = new_wcs; pstr 157 maint/gnulib/lib/regex_internal.c if (pstr->offsets != NULL) pstr 159 maint/gnulib/lib/regex_internal.c Idx *new_offsets = re_realloc (pstr->offsets, Idx, new_buf_len); pstr 162 maint/gnulib/lib/regex_internal.c pstr->offsets = new_offsets; pstr 166 maint/gnulib/lib/regex_internal.c if (pstr->mbs_allocated) pstr 168 maint/gnulib/lib/regex_internal.c unsigned char *new_mbs = re_realloc (pstr->mbs, unsigned char, pstr 172 maint/gnulib/lib/regex_internal.c pstr->mbs = new_mbs; pstr 174 maint/gnulib/lib/regex_internal.c pstr->bufs_len = new_buf_len; pstr 180 maint/gnulib/lib/regex_internal.c re_string_construct_common (const char *str, Idx len, re_string_t *pstr, pstr 184 maint/gnulib/lib/regex_internal.c pstr->raw_mbs = (const unsigned char *) str; pstr 185 maint/gnulib/lib/regex_internal.c pstr->len = len; pstr 186 maint/gnulib/lib/regex_internal.c pstr->raw_len = len; pstr 187 maint/gnulib/lib/regex_internal.c pstr->trans = trans; pstr 188 maint/gnulib/lib/regex_internal.c pstr->icase = icase; pstr 189 maint/gnulib/lib/regex_internal.c pstr->mbs_allocated = (trans != NULL || icase); pstr 190 maint/gnulib/lib/regex_internal.c pstr->mb_cur_max = dfa->mb_cur_max; pstr 191 maint/gnulib/lib/regex_internal.c pstr->is_utf8 = dfa->is_utf8; pstr 192 maint/gnulib/lib/regex_internal.c pstr->map_notascii = dfa->map_notascii; pstr 193 maint/gnulib/lib/regex_internal.c pstr->stop = pstr->len; pstr 194 maint/gnulib/lib/regex_internal.c pstr->raw_stop = pstr->stop; pstr 211 maint/gnulib/lib/regex_internal.c build_wcs_buffer (re_string_t *pstr) pstr 215 maint/gnulib/lib/regex_internal.c DEBUG_ASSERT (MB_LEN_MAX >= pstr->mb_cur_max); pstr 225 maint/gnulib/lib/regex_internal.c end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; pstr 226 maint/gnulib/lib/regex_internal.c for (byte_idx = pstr->valid_len; byte_idx < end_idx;) pstr 232 maint/gnulib/lib/regex_internal.c prev_st = pstr->cur_state; pstr 234 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->trans != NULL)) pstr 238 maint/gnulib/lib/regex_internal.c for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) pstr 240 maint/gnulib/lib/regex_internal.c ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i]; pstr 241 maint/gnulib/lib/regex_internal.c buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch]; pstr 246 maint/gnulib/lib/regex_internal.c p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx; pstr 247 maint/gnulib/lib/regex_internal.c mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state); pstr 250 maint/gnulib/lib/regex_internal.c && pstr->bufs_len >= pstr->len))) pstr 254 maint/gnulib/lib/regex_internal.c wc = (wchar_t) pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; pstr 255 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->trans != NULL)) pstr 256 maint/gnulib/lib/regex_internal.c wc = pstr->trans[wc]; pstr 257 maint/gnulib/lib/regex_internal.c pstr->cur_state = prev_st; pstr 262 maint/gnulib/lib/regex_internal.c pstr->cur_state = prev_st; pstr 267 maint/gnulib/lib/regex_internal.c pstr->wcs[byte_idx++] = wc; pstr 270 maint/gnulib/lib/regex_internal.c pstr->wcs[byte_idx++] = WEOF; pstr 272 maint/gnulib/lib/regex_internal.c pstr->valid_len = byte_idx; pstr 273 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len = byte_idx; pstr 281 maint/gnulib/lib/regex_internal.c build_wcs_upper_buffer (re_string_t *pstr) pstr 288 maint/gnulib/lib/regex_internal.c DEBUG_ASSERT (pstr->mb_cur_max <= MB_LEN_MAX); pstr 293 maint/gnulib/lib/regex_internal.c byte_idx = pstr->valid_len; pstr 294 maint/gnulib/lib/regex_internal.c end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; pstr 298 maint/gnulib/lib/regex_internal.c if (! pstr->map_notascii && pstr->trans == NULL && !pstr->offsets_needed) pstr 303 maint/gnulib/lib/regex_internal.c unsigned char ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; pstr 305 maint/gnulib/lib/regex_internal.c if (isascii (ch) && mbsinit (&pstr->cur_state)) pstr 312 maint/gnulib/lib/regex_internal.c pstr->mbs[byte_idx] = wcu; pstr 313 maint/gnulib/lib/regex_internal.c pstr->wcs[byte_idx] = wcu; pstr 320 maint/gnulib/lib/regex_internal.c prev_st = pstr->cur_state; pstr 322 maint/gnulib/lib/regex_internal.c ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx pstr 323 maint/gnulib/lib/regex_internal.c + byte_idx), remain_len, &pstr->cur_state); pstr 333 maint/gnulib/lib/regex_internal.c memcpy (pstr->mbs + byte_idx, buf, mbclen); pstr 341 maint/gnulib/lib/regex_internal.c memcpy (pstr->mbs + byte_idx, pstr 342 maint/gnulib/lib/regex_internal.c pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx, mbclen); pstr 343 maint/gnulib/lib/regex_internal.c pstr->wcs[byte_idx++] = wcu; pstr 346 maint/gnulib/lib/regex_internal.c pstr->wcs[byte_idx++] = WEOF; pstr 349 maint/gnulib/lib/regex_internal.c || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len)) pstr 353 maint/gnulib/lib/regex_internal.c pstr->mbs[byte_idx] = ch; pstr 355 maint/gnulib/lib/regex_internal.c pstr->wcs[byte_idx++] = (wchar_t) ch; pstr 357 maint/gnulib/lib/regex_internal.c pstr->cur_state = prev_st; pstr 362 maint/gnulib/lib/regex_internal.c pstr->cur_state = prev_st; pstr 366 maint/gnulib/lib/regex_internal.c pstr->valid_len = byte_idx; pstr 367 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len = byte_idx; pstr 371 maint/gnulib/lib/regex_internal.c for (src_idx = pstr->valid_raw_len; byte_idx < end_idx;) pstr 377 maint/gnulib/lib/regex_internal.c prev_st = pstr->cur_state; pstr 378 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->trans != NULL)) pstr 382 maint/gnulib/lib/regex_internal.c for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) pstr 384 maint/gnulib/lib/regex_internal.c ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i]; pstr 385 maint/gnulib/lib/regex_internal.c buf[i] = pstr->trans[ch]; pstr 390 maint/gnulib/lib/regex_internal.c p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + src_idx; pstr 391 maint/gnulib/lib/regex_internal.c mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state); pstr 401 maint/gnulib/lib/regex_internal.c memcpy (pstr->mbs + byte_idx, buf, mbclen); pstr 406 maint/gnulib/lib/regex_internal.c if (byte_idx + mbcdlen > pstr->bufs_len) pstr 408 maint/gnulib/lib/regex_internal.c pstr->cur_state = prev_st; pstr 412 maint/gnulib/lib/regex_internal.c if (pstr->offsets == NULL) pstr 414 maint/gnulib/lib/regex_internal.c pstr->offsets = re_malloc (Idx, pstr->bufs_len); pstr 416 maint/gnulib/lib/regex_internal.c if (pstr->offsets == NULL) pstr 419 maint/gnulib/lib/regex_internal.c if (!pstr->offsets_needed) pstr 422 maint/gnulib/lib/regex_internal.c pstr->offsets[i] = i; pstr 423 maint/gnulib/lib/regex_internal.c pstr->offsets_needed = 1; pstr 426 maint/gnulib/lib/regex_internal.c memcpy (pstr->mbs + byte_idx, buf, mbcdlen); pstr 427 maint/gnulib/lib/regex_internal.c pstr->wcs[byte_idx] = wcu; pstr 428 maint/gnulib/lib/regex_internal.c pstr->offsets[byte_idx] = src_idx; pstr 431 maint/gnulib/lib/regex_internal.c pstr->offsets[byte_idx + i] pstr 433 maint/gnulib/lib/regex_internal.c pstr->wcs[byte_idx + i] = WEOF; pstr 435 maint/gnulib/lib/regex_internal.c pstr->len += mbcdlen - mbclen; pstr 436 maint/gnulib/lib/regex_internal.c if (pstr->raw_stop > src_idx) pstr 437 maint/gnulib/lib/regex_internal.c pstr->stop += mbcdlen - mbclen; pstr 438 maint/gnulib/lib/regex_internal.c end_idx = (pstr->bufs_len > pstr->len) pstr 439 maint/gnulib/lib/regex_internal.c ? pstr->len : pstr->bufs_len; pstr 445 maint/gnulib/lib/regex_internal.c memcpy (pstr->mbs + byte_idx, p, mbclen); pstr 448 maint/gnulib/lib/regex_internal.c memcpy (pstr->mbs + byte_idx, p, mbclen); pstr 450 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->offsets_needed != 0)) pstr 454 maint/gnulib/lib/regex_internal.c pstr->offsets[byte_idx + i] = src_idx + i; pstr 458 maint/gnulib/lib/regex_internal.c pstr->wcs[byte_idx++] = wcu; pstr 461 maint/gnulib/lib/regex_internal.c pstr->wcs[byte_idx++] = WEOF; pstr 464 maint/gnulib/lib/regex_internal.c || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len)) pstr 467 maint/gnulib/lib/regex_internal.c int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx]; pstr 469 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->trans != NULL)) pstr 470 maint/gnulib/lib/regex_internal.c ch = pstr->trans [ch]; pstr 471 maint/gnulib/lib/regex_internal.c pstr->mbs[byte_idx] = ch; pstr 473 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->offsets_needed != 0)) pstr 474 maint/gnulib/lib/regex_internal.c pstr->offsets[byte_idx] = src_idx; pstr 478 maint/gnulib/lib/regex_internal.c pstr->wcs[byte_idx++] = (wchar_t) ch; pstr 480 maint/gnulib/lib/regex_internal.c pstr->cur_state = prev_st; pstr 485 maint/gnulib/lib/regex_internal.c pstr->cur_state = prev_st; pstr 489 maint/gnulib/lib/regex_internal.c pstr->valid_len = byte_idx; pstr 490 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len = src_idx; pstr 498 maint/gnulib/lib/regex_internal.c re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc) pstr 506 maint/gnulib/lib/regex_internal.c for (rawbuf_idx = pstr->raw_mbs_idx + pstr->valid_raw_len; pstr 510 maint/gnulib/lib/regex_internal.c Idx remain_len = pstr->raw_len - rawbuf_idx; pstr 511 maint/gnulib/lib/regex_internal.c prev_st = pstr->cur_state; pstr 512 maint/gnulib/lib/regex_internal.c mbclen = __mbrtowc (&wc2, (const char *) pstr->raw_mbs + rawbuf_idx, pstr 513 maint/gnulib/lib/regex_internal.c remain_len, &pstr->cur_state); pstr 521 maint/gnulib/lib/regex_internal.c wc = *(unsigned char *) (pstr->raw_mbs + rawbuf_idx); pstr 523 maint/gnulib/lib/regex_internal.c pstr->cur_state = prev_st; pstr 539 maint/gnulib/lib/regex_internal.c build_upper_buffer (re_string_t *pstr) pstr 542 maint/gnulib/lib/regex_internal.c end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; pstr 544 maint/gnulib/lib/regex_internal.c for (char_idx = pstr->valid_len; char_idx < end_idx; ++char_idx) pstr 546 maint/gnulib/lib/regex_internal.c int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx]; pstr 547 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->trans != NULL)) pstr 548 maint/gnulib/lib/regex_internal.c ch = pstr->trans[ch]; pstr 549 maint/gnulib/lib/regex_internal.c pstr->mbs[char_idx] = toupper (ch); pstr 551 maint/gnulib/lib/regex_internal.c pstr->valid_len = char_idx; pstr 552 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len = char_idx; pstr 558 maint/gnulib/lib/regex_internal.c re_string_translate_buffer (re_string_t *pstr) pstr 561 maint/gnulib/lib/regex_internal.c end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; pstr 563 maint/gnulib/lib/regex_internal.c for (buf_idx = pstr->valid_len; buf_idx < end_idx; ++buf_idx) pstr 565 maint/gnulib/lib/regex_internal.c int ch = pstr->raw_mbs[pstr->raw_mbs_idx + buf_idx]; pstr 566 maint/gnulib/lib/regex_internal.c pstr->mbs[buf_idx] = pstr->trans[ch]; pstr 569 maint/gnulib/lib/regex_internal.c pstr->valid_len = buf_idx; pstr 570 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len = buf_idx; pstr 579 maint/gnulib/lib/regex_internal.c re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) pstr 583 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->raw_mbs_idx <= idx)) pstr 584 maint/gnulib/lib/regex_internal.c offset = idx - pstr->raw_mbs_idx; pstr 589 maint/gnulib/lib/regex_internal.c if (pstr->mb_cur_max > 1) pstr 590 maint/gnulib/lib/regex_internal.c memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); pstr 592 maint/gnulib/lib/regex_internal.c pstr->len = pstr->raw_len; pstr 593 maint/gnulib/lib/regex_internal.c pstr->stop = pstr->raw_stop; pstr 594 maint/gnulib/lib/regex_internal.c pstr->valid_len = 0; pstr 595 maint/gnulib/lib/regex_internal.c pstr->raw_mbs_idx = 0; pstr 596 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len = 0; pstr 597 maint/gnulib/lib/regex_internal.c pstr->offsets_needed = 0; pstr 598 maint/gnulib/lib/regex_internal.c pstr->tip_context = ((eflags & REG_NOTBOL) ? CONTEXT_BEGBUF pstr 600 maint/gnulib/lib/regex_internal.c if (!pstr->mbs_allocated) pstr 601 maint/gnulib/lib/regex_internal.c pstr->mbs = (unsigned char *) pstr->raw_mbs; pstr 608 maint/gnulib/lib/regex_internal.c if (__glibc_likely (offset < pstr->valid_raw_len)) pstr 612 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->offsets_needed)) pstr 614 maint/gnulib/lib/regex_internal.c Idx low = 0, high = pstr->valid_len, mid; pstr 618 maint/gnulib/lib/regex_internal.c if (pstr->offsets[mid] > offset) pstr 620 maint/gnulib/lib/regex_internal.c else if (pstr->offsets[mid] < offset) pstr 626 maint/gnulib/lib/regex_internal.c if (pstr->offsets[mid] < offset) pstr 628 maint/gnulib/lib/regex_internal.c pstr->tip_context = re_string_context_at (pstr, mid - 1, pstr 634 maint/gnulib/lib/regex_internal.c if (pstr->valid_len > offset pstr 635 maint/gnulib/lib/regex_internal.c && mid == offset && pstr->offsets[mid] == offset) pstr 637 maint/gnulib/lib/regex_internal.c memmove (pstr->wcs, pstr->wcs + offset, pstr 638 maint/gnulib/lib/regex_internal.c (pstr->valid_len - offset) * sizeof (wint_t)); pstr 639 maint/gnulib/lib/regex_internal.c memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); pstr 640 maint/gnulib/lib/regex_internal.c pstr->valid_len -= offset; pstr 641 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len -= offset; pstr 642 maint/gnulib/lib/regex_internal.c for (low = 0; low < pstr->valid_len; low++) pstr 643 maint/gnulib/lib/regex_internal.c pstr->offsets[low] = pstr->offsets[low + offset] - offset; pstr 649 maint/gnulib/lib/regex_internal.c pstr->len = pstr->raw_len - idx + offset; pstr 650 maint/gnulib/lib/regex_internal.c pstr->stop = pstr->raw_stop - idx + offset; pstr 651 maint/gnulib/lib/regex_internal.c pstr->offsets_needed = 0; pstr 652 maint/gnulib/lib/regex_internal.c while (mid > 0 && pstr->offsets[mid - 1] == offset) pstr 654 maint/gnulib/lib/regex_internal.c while (mid < pstr->valid_len) pstr 655 maint/gnulib/lib/regex_internal.c if (pstr->wcs[mid] != WEOF) pstr 659 maint/gnulib/lib/regex_internal.c if (mid == pstr->valid_len) pstr 660 maint/gnulib/lib/regex_internal.c pstr->valid_len = 0; pstr 663 maint/gnulib/lib/regex_internal.c pstr->valid_len = pstr->offsets[mid] - offset; pstr 664 maint/gnulib/lib/regex_internal.c if (pstr->valid_len) pstr 666 maint/gnulib/lib/regex_internal.c for (low = 0; low < pstr->valid_len; ++low) pstr 667 maint/gnulib/lib/regex_internal.c pstr->wcs[low] = WEOF; pstr 668 maint/gnulib/lib/regex_internal.c memset (pstr->mbs, 255, pstr->valid_len); pstr 671 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len = pstr->valid_len; pstr 677 maint/gnulib/lib/regex_internal.c pstr->tip_context = re_string_context_at (pstr, offset - 1, pstr 680 maint/gnulib/lib/regex_internal.c if (pstr->mb_cur_max > 1) pstr 681 maint/gnulib/lib/regex_internal.c memmove (pstr->wcs, pstr->wcs + offset, pstr 682 maint/gnulib/lib/regex_internal.c (pstr->valid_len - offset) * sizeof (wint_t)); pstr 684 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->mbs_allocated)) pstr 685 maint/gnulib/lib/regex_internal.c memmove (pstr->mbs, pstr->mbs + offset, pstr 686 maint/gnulib/lib/regex_internal.c pstr->valid_len - offset); pstr 687 maint/gnulib/lib/regex_internal.c pstr->valid_len -= offset; pstr 688 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len -= offset; pstr 689 maint/gnulib/lib/regex_internal.c DEBUG_ASSERT (pstr->valid_len > 0); pstr 696 maint/gnulib/lib/regex_internal.c Idx prev_valid_len = pstr->valid_len; pstr 698 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->offsets_needed)) pstr 700 maint/gnulib/lib/regex_internal.c pstr->len = pstr->raw_len - idx + offset; pstr 701 maint/gnulib/lib/regex_internal.c pstr->stop = pstr->raw_stop - idx + offset; pstr 702 maint/gnulib/lib/regex_internal.c pstr->offsets_needed = 0; pstr 705 maint/gnulib/lib/regex_internal.c pstr->valid_len = 0; pstr 707 maint/gnulib/lib/regex_internal.c if (pstr->mb_cur_max > 1) pstr 712 maint/gnulib/lib/regex_internal.c if (pstr->is_utf8) pstr 718 maint/gnulib/lib/regex_internal.c raw = pstr->raw_mbs + pstr->raw_mbs_idx; pstr 719 maint/gnulib/lib/regex_internal.c end = raw + (offset - pstr->mb_cur_max); pstr 720 maint/gnulib/lib/regex_internal.c if (end < pstr->raw_mbs) pstr 721 maint/gnulib/lib/regex_internal.c end = pstr->raw_mbs; pstr 726 maint/gnulib/lib/regex_internal.c if (isascii (*p) && __glibc_likely (pstr->trans == NULL)) pstr 728 maint/gnulib/lib/regex_internal.c memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); pstr 739 maint/gnulib/lib/regex_internal.c Idx mlen = raw + pstr->len - p; pstr 744 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->trans != NULL)) pstr 748 maint/gnulib/lib/regex_internal.c buf[i] = pstr->trans[p[i]]; pstr 759 maint/gnulib/lib/regex_internal.c memset (&pstr->cur_state, '\0', pstr 761 maint/gnulib/lib/regex_internal.c pstr->valid_len = mbclen - (raw + offset - p); pstr 769 maint/gnulib/lib/regex_internal.c pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx; pstr 771 maint/gnulib/lib/regex_internal.c pstr->tip_context pstr 772 maint/gnulib/lib/regex_internal.c = re_string_context_at (pstr, prev_valid_len - 1, eflags); pstr 774 maint/gnulib/lib/regex_internal.c pstr->tip_context = ((__glibc_unlikely (pstr->word_ops_used != 0) pstr 778 maint/gnulib/lib/regex_internal.c && pstr->newline_anchor) pstr 780 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->valid_len)) pstr 782 maint/gnulib/lib/regex_internal.c for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx) pstr 783 maint/gnulib/lib/regex_internal.c pstr->wcs[wcs_idx] = WEOF; pstr 784 maint/gnulib/lib/regex_internal.c if (pstr->mbs_allocated) pstr 785 maint/gnulib/lib/regex_internal.c memset (pstr->mbs, 255, pstr->valid_len); pstr 787 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len = pstr->valid_len; pstr 792 maint/gnulib/lib/regex_internal.c int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1]; pstr 793 maint/gnulib/lib/regex_internal.c pstr->valid_raw_len = 0; pstr 794 maint/gnulib/lib/regex_internal.c if (pstr->trans) pstr 795 maint/gnulib/lib/regex_internal.c c = pstr->trans[c]; pstr 796 maint/gnulib/lib/regex_internal.c pstr->tip_context = (bitset_contain (pstr->word_char, c) pstr 798 maint/gnulib/lib/regex_internal.c : ((IS_NEWLINE (c) && pstr->newline_anchor) pstr 802 maint/gnulib/lib/regex_internal.c if (!__glibc_unlikely (pstr->mbs_allocated)) pstr 803 maint/gnulib/lib/regex_internal.c pstr->mbs += offset; pstr 805 maint/gnulib/lib/regex_internal.c pstr->raw_mbs_idx = idx; pstr 806 maint/gnulib/lib/regex_internal.c pstr->len -= offset; pstr 807 maint/gnulib/lib/regex_internal.c pstr->stop -= offset; pstr 811 maint/gnulib/lib/regex_internal.c if (pstr->mb_cur_max > 1) pstr 813 maint/gnulib/lib/regex_internal.c if (pstr->icase) pstr 815 maint/gnulib/lib/regex_internal.c reg_errcode_t ret = build_wcs_upper_buffer (pstr); pstr 820 maint/gnulib/lib/regex_internal.c build_wcs_buffer (pstr); pstr 824 maint/gnulib/lib/regex_internal.c if (__glibc_unlikely (pstr->mbs_allocated)) pstr 826 maint/gnulib/lib/regex_internal.c if (pstr->icase) pstr 827 maint/gnulib/lib/regex_internal.c build_upper_buffer (pstr); pstr 828 maint/gnulib/lib/regex_internal.c else if (pstr->trans != NULL) pstr 829 maint/gnulib/lib/regex_internal.c re_string_translate_buffer (pstr); pstr 832 maint/gnulib/lib/regex_internal.c pstr->valid_len = pstr->len; pstr 834 maint/gnulib/lib/regex_internal.c pstr->cur_idx = 0; pstr 840 maint/gnulib/lib/regex_internal.c re_string_peek_byte_case (const re_string_t *pstr, Idx idx) pstr 846 maint/gnulib/lib/regex_internal.c if (__glibc_likely (!pstr->mbs_allocated)) pstr 847 maint/gnulib/lib/regex_internal.c return re_string_peek_byte (pstr, idx); pstr 850 maint/gnulib/lib/regex_internal.c if (pstr->mb_cur_max > 1 pstr 851 maint/gnulib/lib/regex_internal.c && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx)) pstr 852 maint/gnulib/lib/regex_internal.c return re_string_peek_byte (pstr, idx); pstr 855 maint/gnulib/lib/regex_internal.c off = pstr->cur_idx + idx; pstr 857 maint/gnulib/lib/regex_internal.c if (pstr->offsets_needed) pstr 858 maint/gnulib/lib/regex_internal.c off = pstr->offsets[off]; pstr 861 maint/gnulib/lib/regex_internal.c ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; pstr 868 maint/gnulib/lib/regex_internal.c if (pstr->offsets_needed && !isascii (ch)) pstr 869 maint/gnulib/lib/regex_internal.c return re_string_peek_byte (pstr, idx); pstr 876 maint/gnulib/lib/regex_internal.c re_string_fetch_byte_case (re_string_t *pstr) pstr 878 maint/gnulib/lib/regex_internal.c if (__glibc_likely (!pstr->mbs_allocated)) pstr 879 maint/gnulib/lib/regex_internal.c return re_string_fetch_byte (pstr); pstr 882 maint/gnulib/lib/regex_internal.c if (pstr->offsets_needed) pstr 894 maint/gnulib/lib/regex_internal.c if (!re_string_first_byte (pstr, pstr->cur_idx)) pstr 895 maint/gnulib/lib/regex_internal.c return re_string_fetch_byte (pstr); pstr 897 maint/gnulib/lib/regex_internal.c off = pstr->offsets[pstr->cur_idx]; pstr 898 maint/gnulib/lib/regex_internal.c ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; pstr 901 maint/gnulib/lib/regex_internal.c return re_string_fetch_byte (pstr); pstr 903 maint/gnulib/lib/regex_internal.c re_string_skip_bytes (pstr, pstr 904 maint/gnulib/lib/regex_internal.c re_string_char_size_at (pstr, pstr->cur_idx)); pstr 909 maint/gnulib/lib/regex_internal.c return pstr->raw_mbs[pstr->raw_mbs_idx + pstr->cur_idx++]; pstr 913 maint/gnulib/lib/regex_internal.c re_string_destruct (re_string_t *pstr) pstr 916 maint/gnulib/lib/regex_internal.c re_free (pstr->wcs); pstr 917 maint/gnulib/lib/regex_internal.c re_free (pstr->offsets); pstr 919 maint/gnulib/lib/regex_internal.c if (pstr->mbs_allocated) pstr 920 maint/gnulib/lib/regex_internal.c re_free (pstr->mbs); pstr 434 maint/gnulib/lib/regex_internal.h #define re_string_peek_byte(pstr, offset) \ pstr 435 maint/gnulib/lib/regex_internal.h ((pstr)->mbs[(pstr)->cur_idx + offset]) pstr 436 maint/gnulib/lib/regex_internal.h #define re_string_fetch_byte(pstr) \ pstr 437 maint/gnulib/lib/regex_internal.h ((pstr)->mbs[(pstr)->cur_idx++]) pstr 438 maint/gnulib/lib/regex_internal.h #define re_string_first_byte(pstr, idx) \ pstr 439 maint/gnulib/lib/regex_internal.h ((idx) == (pstr)->valid_len || (pstr)->wcs[idx] != WEOF) pstr 440 maint/gnulib/lib/regex_internal.h #define re_string_is_single_byte_char(pstr, idx) \ pstr 441 maint/gnulib/lib/regex_internal.h ((pstr)->wcs[idx] != WEOF && ((pstr)->valid_len == (idx) + 1 \ pstr 442 maint/gnulib/lib/regex_internal.h || (pstr)->wcs[(idx) + 1] != WEOF)) pstr 443 maint/gnulib/lib/regex_internal.h #define re_string_eoi(pstr) ((pstr)->stop <= (pstr)->cur_idx) pstr 444 maint/gnulib/lib/regex_internal.h #define re_string_cur_idx(pstr) ((pstr)->cur_idx) pstr 445 maint/gnulib/lib/regex_internal.h #define re_string_get_buffer(pstr) ((pstr)->mbs) pstr 446 maint/gnulib/lib/regex_internal.h #define re_string_length(pstr) ((pstr)->len) pstr 447 maint/gnulib/lib/regex_internal.h #define re_string_byte_at(pstr,idx) ((pstr)->mbs[idx]) pstr 448 maint/gnulib/lib/regex_internal.h #define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx)) pstr 449 maint/gnulib/lib/regex_internal.h #define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx)) pstr 786 maint/gnulib/lib/regex_internal.h re_string_char_size_at (const re_string_t *pstr, Idx idx) pstr 789 maint/gnulib/lib/regex_internal.h if (pstr->mb_cur_max == 1) pstr 791 maint/gnulib/lib/regex_internal.h for (byte_idx = 1; idx + byte_idx < pstr->valid_len; ++byte_idx) pstr 792 maint/gnulib/lib/regex_internal.h if (pstr->wcs[idx + byte_idx] != WEOF) pstr 799 maint/gnulib/lib/regex_internal.h re_string_wchar_at (const re_string_t *pstr, Idx idx) pstr 801 maint/gnulib/lib/regex_internal.h if (pstr->mb_cur_max == 1) pstr 802 maint/gnulib/lib/regex_internal.h return (wint_t) pstr->mbs[idx]; pstr 803 maint/gnulib/lib/regex_internal.h return (wint_t) pstr->wcs[idx]; pstr 812 maint/gnulib/lib/regex_internal.h re_string_elem_size_at (const re_string_t *pstr, Idx idx) pstr 826 maint/gnulib/lib/regex_internal.h p = pstr->mbs + idx; pstr 827 maint/gnulib/lib/regex_internal.h findidx (table, indirect, extra, &p, pstr->len - idx); pstr 828 maint/gnulib/lib/regex_internal.h return p - pstr->mbs - idx; pstr 3990 maint/gnulib/lib/regexec.c re_string_t *pstr = &mctx->input; pstr 3994 maint/gnulib/lib/regexec.c <= pstr->bufs_len)) pstr 3998 maint/gnulib/lib/regexec.c ret = re_string_realloc_buffers (pstr, pstr 4000 maint/gnulib/lib/regexec.c MIN (pstr->len, pstr->bufs_len * 2))); pstr 4011 maint/gnulib/lib/regexec.c pstr->bufs_len + 1); pstr 4018 maint/gnulib/lib/regexec.c if (pstr->icase) pstr 4021 maint/gnulib/lib/regexec.c if (pstr->mb_cur_max > 1) pstr 4023 maint/gnulib/lib/regexec.c ret = build_wcs_upper_buffer (pstr); pstr 4029 maint/gnulib/lib/regexec.c build_upper_buffer (pstr); pstr 4034 maint/gnulib/lib/regexec.c if (pstr->mb_cur_max > 1) pstr 4035 maint/gnulib/lib/regexec.c build_wcs_buffer (pstr); pstr 4039 maint/gnulib/lib/regexec.c if (pstr->trans != NULL) pstr 4040 maint/gnulib/lib/regexec.c re_string_translate_buffer (pstr);