Lines Matching refs:region

150 onig_get_capture_tree(OnigRegion* region)  in onig_get_capture_tree()  argument
152 return region->history_root; in onig_get_capture_tree()
157 onig_region_clear(OnigRegion* region) in onig_region_clear() argument
161 for (i = 0; i < region->num_regs; i++) { in onig_region_clear()
162 region->beg[i] = region->end[i] = ONIG_REGION_NOTPOS; in onig_region_clear()
165 history_root_free(region); in onig_region_clear()
170 onig_region_resize(OnigRegion* region, int n) in onig_region_resize() argument
172 region->num_regs = n; in onig_region_resize()
177 if (region->allocated == 0) { in onig_region_resize()
178 region->beg = (int* )xmalloc(n * sizeof(int)); in onig_region_resize()
179 region->end = (int* )xmalloc(n * sizeof(int)); in onig_region_resize()
181 if (region->beg == 0 || region->end == 0) in onig_region_resize()
184 region->allocated = n; in onig_region_resize()
186 else if (region->allocated < n) { in onig_region_resize()
187 region->beg = (int* )xrealloc(region->beg, n * sizeof(int)); in onig_region_resize()
188 region->end = (int* )xrealloc(region->end, n * sizeof(int)); in onig_region_resize()
190 if (region->beg == 0 || region->end == 0) in onig_region_resize()
193 region->allocated = n; in onig_region_resize()
200 onig_region_resize_clear(OnigRegion* region, int n) in onig_region_resize_clear() argument
204 r = onig_region_resize(region, n); in onig_region_resize_clear()
206 onig_region_clear(region); in onig_region_resize_clear()
211 onig_region_set(OnigRegion* region, int at, int beg, int end) in onig_region_set() argument
215 if (at >= region->allocated) { in onig_region_set()
216 int r = onig_region_resize(region, at + 1); in onig_region_set()
220 region->beg[at] = beg; in onig_region_set()
221 region->end[at] = end; in onig_region_set()
226 onig_region_init(OnigRegion* region) in onig_region_init() argument
228 region->num_regs = 0; in onig_region_init()
229 region->allocated = 0; in onig_region_init()
230 region->beg = (int* )0; in onig_region_init()
231 region->end = (int* )0; in onig_region_init()
232 region->history_root = (OnigCaptureTreeNode* )0; in onig_region_init()
372 OnigRegion* region; member
388 (msa).region = (arg_region);\
396 (msa).region = (arg_region);\
1501 OnigRegion* region; in match_at() local
1513 region = msa->region; in match_at()
1514 if (region) { in match_at()
1517 posix_regmatch_t* rmt = (posix_regmatch_t* )region; in match_at()
1539 region->beg[0] = sstart - str; in match_at()
1540 region->end[0] = s - str; in match_at()
1544 region->beg[i] = STACK_AT(mem_start_stk[i])->u.mem.pstr - str; in match_at()
1546 region->beg[i] = (UChar* )((void* )mem_start_stk[i]) - str; in match_at()
1548 region->end[i] = (BIT_STATUS_AT(reg->bt_mem_end, i) in match_at()
1553 region->beg[i] = region->end[i] = ONIG_REGION_NOTPOS; in match_at()
1562 if (IS_NULL(region->history_root)) { in match_at()
1563 region->history_root = node = history_node_new(); in match_at()
1567 node = region->history_root; in match_at()
1576 r = make_capture_history_tree(region->history_root, &stkp, in match_at()
3237 onig_match(regex_t* reg, const UChar* str, const UChar* end, const UChar* at, OnigRegion* region, in onig_match() argument
3269 MATCH_ARG_INIT(msa, option, region, at); in onig_match()
3277 if (region in onig_match()
3282 r = onig_region_resize_clear(region, reg->num_mem + 1); in onig_match()
3531 const UChar* start, const UChar* range, OnigRegion* region, OnigOptionType option) in onig_search() argument
3569 if (region in onig_search()
3574 r = onig_region_resize_clear(region, reg->num_mem + 1); in onig_search()
3701 MATCH_ARG_INIT(msa, option, region, start); in onig_search()
3717 MATCH_ARG_INIT(msa, option, region, orig_start); in onig_search()
3867 if (IS_FIND_NOT_EMPTY(reg->options) && region in onig_search()
3872 onig_region_clear(region); in onig_search()