Home | History | Annotate | Download | only in lib

Lines Matching refs:pstr

431 static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr,
435 static void build_wcs_buffer (re_string_t *pstr) internal_function;
436 static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr)
439 static void build_upper_buffer (re_string_t *pstr) internal_function;
440 static void re_string_translate_buffer (re_string_t *pstr) internal_function;
444 #define re_string_peek_byte(pstr, offset) \
445 ((pstr)->mbs[(pstr)->cur_idx + offset])
446 #define re_string_fetch_byte(pstr) \
447 ((pstr)->mbs[(pstr)->cur_idx++])
448 #define re_string_first_byte(pstr, idx) \
449 ((idx) == (pstr)->valid_len || (pstr)->wcs[idx] != WEOF)
450 #define re_string_is_single_byte_char(pstr, idx) \
451 ((pstr)->wcs[idx] != WEOF && ((pstr)->valid_len == (idx) + 1 \
452 || (pstr)->wcs[(idx) + 1] != WEOF))
453 #define re_string_eoi(pstr) ((pstr)->stop <= (pstr)->cur_idx)
454 #define re_string_cur_idx(pstr) ((pstr)->cur_idx)
455 #define re_string_get_buffer(pstr) ((pstr)->mbs)
456 #define re_string_length(pstr) ((pstr)->len)
457 #define re_string_byte_at(pstr,idx) ((pstr)->mbs[idx])
458 #define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx))
459 #define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx))
810 re_string_char_size_at (const re_string_t *pstr, Idx idx)
813 if (pstr->mb_cur_max == 1)
815 for (byte_idx = 1; idx + byte_idx < pstr->valid_len; ++byte_idx)
816 if (pstr->wcs[idx + byte_idx] != WEOF)
823 re_string_wchar_at (const re_string_t *pstr, Idx idx)
825 if (pstr->mb_cur_max == 1)
826 return (wint_t) pstr->mbs[idx];
827 return (wint_t) pstr->wcs[idx];
832 re_string_elem_size_at (const re_string_t *pstr, Idx idx)
848 p = pstr->mbs + idx;
850 return p - pstr->mbs - idx;