Lines Matching refs:msa
330 #define MATCH_ARG_INIT(msa, arg_option, arg_region, arg_start) do {\ argument
331 (msa).stack_p = (void* )0;\
332 (msa).options = (arg_option);\
333 (msa).region = (arg_region);\
334 (msa).start = (arg_start);\
335 (msa).best_len = ONIG_MISMATCH;\
338 #define MATCH_ARG_INIT(msa, arg_option, arg_region, arg_start) do {\ argument
339 (msa).stack_p = (void* )0;\
340 (msa).options = (arg_option);\
341 (msa).region = (arg_region);\
342 (msa).start = (arg_start);\
350 #define STATE_CHECK_BUFF_INIT(msa, str_len, offset, state_num) do { \ argument
356 (msa).state_check_buff = (void* )xmalloc(size);\
358 (msa).state_check_buff = (void* )xalloca(size);\
359 xmemset(((char* )((msa).state_check_buff)+(offset)), 0, \
361 (msa).state_check_buff_size = size;\
364 (msa).state_check_buff = (void* )0;\
365 (msa).state_check_buff_size = 0;\
369 (msa).state_check_buff = (void* )0;\
370 (msa).state_check_buff_size = 0;\
374 #define MATCH_ARG_FREE(msa) do {\ argument
375 if ((msa).stack_p) xfree((msa).stack_p);\
376 if ((msa).state_check_buff_size >= STATE_CHECK_BUFF_MALLOC_THRESHOLD_SIZE) { \
377 if ((msa).state_check_buff) xfree((msa).state_check_buff);\
381 #define STATE_CHECK_BUFF_INIT(msa, str_len, offset, state_num) argument
382 #define MATCH_ARG_FREE(msa) if ((msa).stack_p) xfree((msa).stack_p) argument
388 if (msa->stack_p) {\
390 stk_alloc = (OnigStackType* )(msa->stack_p);\
393 stk_end = stk_base + msa->stack_n;\
407 msa->stack_p = stk_base;\
408 msa->stack_n = stk_end - stk_base;\
429 OnigStackType** arg_stk, OnigStackType* stk_alloc, OnigMatchArg* msa) in stack_double() argument
439 if (stk_base == stk_alloc && IS_NULL(msa->stack_p)) { in stack_double()
470 int r = stack_double(&stk_base, &stk_end, &stk, stk_alloc, msa);\
1242 const UChar* sstart, UChar* sprev, OnigMatchArg* msa) in match_at() argument
1263 unsigned char* state_check_buff = msa->state_check_buff; in match_at()
1322 if (n > msa->best_len) { in match_at()
1323 msa->best_len = n; in match_at()
1324 msa->best_s = (UChar* )sstart; in match_at()
1331 region = msa->region; in match_at()
1334 if (IS_POSIX_REGION(msa->options)) { in match_at()
1994 if (IS_NOTBOL(msa->options)) goto fail; in match_at()
2010 if (IS_NOTEOL(msa->options)) goto fail; in match_at()
2035 if (IS_NOTEOL(msa->options)) goto fail; in match_at()
2061 if (s != msa->start) in match_at()
3049 OnigMatchArg msa; in onig_match() local
3076 MATCH_ARG_INIT(msa, option, region, at); in onig_match()
3080 STATE_CHECK_BUFF_INIT(msa, end - str, offset, reg->num_comb_exp_check); in onig_match()
3100 at, prev, &msa); in onig_match()
3103 MATCH_ARG_FREE(msa); in onig_match()
3359 OnigMatchArg msa; in onig_search() local
3411 r = match_at(reg, str, end, (upper_range), s, prev, &msa); \ in onig_search()
3422 r = match_at(reg, str, end, (upper_range), s, prev, &msa); \ in onig_search()
3433 r = match_at(reg, str, end, s, prev, &msa);\ in onig_search()
3444 r = match_at(reg, str, end, s, prev, &msa);\ in onig_search()
3554 MATCH_ARG_INIT(msa, option, region, start); in onig_search()
3556 msa.state_check_buff = (void* )0; in onig_search()
3557 msa.state_check_buff_size = 0; /* NO NEED, for valgrind */ in onig_search()
3570 MATCH_ARG_INIT(msa, option, region, orig_start); in onig_search()
3574 STATE_CHECK_BUFF_INIT(msa, end - str, offset, reg->num_comb_exp_check); in onig_search()
3711 if (msa.best_len >= 0) { in onig_search()
3712 s = msa.best_s; in onig_search()
3720 MATCH_ARG_FREE(msa); in onig_search()
3751 MATCH_ARG_FREE(msa); in onig_search()