Lines Matching refs:reg
35 #define ONIG_C(reg) ((onig_regex_t* )((reg)->onig)) argument
36 #define PONIG_C(reg) ((onig_regex_t** )(&(reg)->onig)) argument
134 regcomp(regex_t* reg, const char* pattern, int posix_options) in regcomp() argument
151 reg->comp_options = posix_options; in regcomp()
154 r = onig_new(PONIG_C(reg), (UChar* )pattern, (UChar* )(pattern + len), in regcomp()
161 reg->re_nsub = ONIG_C(reg)->num_mem; in regcomp()
166 regexec(regex_t* reg, const char* str, size_t nmatch, in regexec() argument
178 if (nmatch == 0 || (reg->comp_options & REG_NOSUB) != 0) { in regexec()
182 else if ((int )nmatch < ONIG_C(reg)->num_mem + 1) { in regexec()
184 * (ONIG_C(reg)->num_mem + 1)); in regexec()
192 ENC_STRING_LEN(ONIG_C(reg)->enc, str, len); in regexec()
194 r = onig_search(ONIG_C(reg), (UChar* )str, end, (UChar* )str, end, in regexec()
216 if (reg->re_nsub > nmatch - 1) in regexec()
217 reg->re_nsub = (nmatch <= 1 ? 0 : nmatch - 1); in regexec()
224 regfree(regex_t* reg) in regfree() argument
226 onig_free(ONIG_C(reg)); in regfree()
264 reg_name_to_group_numbers(regex_t* reg, in reg_name_to_group_numbers() argument
267 return onig_name_to_group_numbers(ONIG_C(reg), name, name_end, nums); in reg_name_to_group_numbers()
272 regex_t* reg; member
278 onig_regex_t* reg, void* arg) in i_wrapper() argument
282 return (*warg->func)(name, name_end, ng, gs, warg->reg, warg->arg); in i_wrapper()
286 reg_foreach_name(regex_t* reg, in reg_foreach_name() argument
293 warg.reg = reg; in reg_foreach_name()
296 return onig_foreach_name(ONIG_C(reg), i_wrapper, &warg); in reg_foreach_name()
300 reg_number_of_names(regex_t* reg) in reg_number_of_names() argument
302 return onig_number_of_names(ONIG_C(reg)); in reg_number_of_names()