Home | History | Annotate | Download | only in Oniguruma

Lines Matching refs:msa

339 #define MATCH_ARG_INIT(msa, arg_option, arg_region, arg_start) do {\

340 (msa).stack_p = (void* )0;\
341 (msa).options = (arg_option);\
342 (msa).region = (arg_region);\
343 (msa).start = (arg_start);\
344 (msa).best_len = ONIG_MISMATCH;\
347 #define MATCH_ARG_INIT(msa, arg_option, arg_region, arg_start) do {\
348 (msa).stack_p = (void* )0;\
349 (msa).options = (arg_option);\
350 (msa).region = (arg_region);\
351 (msa).start = (arg_start);\
359 #define STATE_CHECK_BUFF_INIT(msa, str_len, offset, state_num) do { \
365 (msa).state_check_buff = (void* )xmalloc(size);\
367 (msa).state_check_buff = (void* )xalloca(size);\
368 xmemset(((char* )((msa).state_check_buff)+(offset)), 0, \
370 (msa).state_check_buff_size = size;\
373 (msa).state_check_buff = (void* )0;\
374 (msa).state_check_buff_size = 0;\
378 (msa).state_check_buff = (void* )0;\
379 (msa).state_check_buff_size = 0;\
383 #define MATCH_ARG_FREE(msa) do {\
384 if ((msa).stack_p) xfree((msa).stack_p);\
385 if ((msa).state_check_buff_size >= STATE_CHECK_BUFF_MALLOC_THRESHOLD_SIZE) { \
386 if ((msa).state_check_buff) xfree((msa).state_check_buff);\
390 #define STATE_CHECK_BUFF_INIT(msa, str_len, offset, state_num)
391 #define MATCH_ARG_FREE(msa) if ((msa).stack_p) xfree((msa).stack_p)
397 if (msa->stack_p) {\
399 stk_alloc = (OnigStackType* )(msa->stack_p);\
402 stk_end = stk_base + msa->stack_n;\
416 msa->stack_p = stk_base;\
417 msa->stack_n = (int)(stk_end - stk_base);\
438 OnigStackType** arg_stk, OnigStackType* stk_alloc, OnigMatchArg* msa)
448 if (stk_base == stk_alloc && IS_NULL(msa->stack_p)) {
479 int r = stack_double(&stk_base, &stk_end, &stk, stk_alloc, msa);\
1251 const UChar* sstart, UChar* sprev, OnigMatchArg* msa)
1272 unsigned char* state_check_buff = msa->state_check_buff;
1331 if (n > msa->best_len) {
1332 msa->best_len = n;
1333 msa->best_s = (UChar* )sstart;
1340 region = msa->region;
1343 if (IS_POSIX_REGION(msa->options)) {
2008 if (IS_NOTBOL(msa->options)) goto fail;
2024 if (IS_NOTEOL(msa->options)) goto fail;
2049 if (IS_NOTEOL(msa->options)) goto fail;
2075 if (s != msa->start)
3067 OnigMatchArg msa;
3094 MATCH_ARG_INIT(msa, option, region, at);
3098 STATE_CHECK_BUFF_INIT(msa, end - str, offset, reg->num_comb_exp_check);
3118 at, prev, &msa);
3121 MATCH_ARG_FREE(msa);
3368 OnigMatchArg msa;
3420 r = match_at(reg, str, end, (upper_range), s, prev, &msa); \
3431 r = match_at(reg, str, end, (upper_range), s, prev, &msa); \
3442 r = match_at(reg, str, end, s, prev, &msa);\
3453 r = match_at(reg, str, end, s, prev, &msa);\
3563 MATCH_ARG_INIT(msa, option, region, start);
3565 msa.state_check_buff = (void* )0;
3566 msa.state_check_buff_size = 0; /* NO NEED, for valgrind */
3579 MATCH_ARG_INIT(msa, option, region, orig_start);
3583 STATE_CHECK_BUFF_INIT(msa, end - str, offset, reg->num_comb_exp_check);
3720 if (msa.best_len >= 0) {
3721 s = msa.best_s;
3729 MATCH_ARG_FREE(msa);
3760 MATCH_ARG_FREE(msa);