]> granicus.if.org Git - onig/commitdiff
refactoring
authorK.Kosako <kosako@sofnec.co.jp>
Fri, 20 Sep 2019 00:27:42 +0000 (09:27 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Fri, 20 Sep 2019 00:27:42 +0000 (09:27 +0900)
src/regexec.c

index 9dfa0634bbabd2e2420031a91d1e6d4174485ee0..40642c7d5670a23793166cb7a5dd7798be1fef87 100644 (file)
@@ -47,6 +47,8 @@
   (MEM_STATUS_AT((reg)->push_mem_end, (i)) != 0 ? \
    STACK_AT(mem_end_stk[i])->u.mem.pstr : (UChar* )((void* )(mem_end_stk[i])))
 
+static int forward_search(regex_t* reg, const UChar* str, const UChar* end, UChar* start, UChar* range, UChar** low, UChar** high, UChar** low_prev);
+
 
 #ifdef USE_CALLOUT
 typedef struct {
@@ -1072,26 +1074,26 @@ struct OnigCalloutArgsStruct {
 
 
 #ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE
-#define MATCH_ARG_INIT(msa, reg, arg_option, arg_region, arg_start, mp) do { \
+#define MATCH_ARG_INIT(msa, reg, arg_option, arg_region, arg_start, mpv) do { \
   (msa).stack_p  = (void* )0;\
   (msa).options  = (arg_option);\
   (msa).region   = (arg_region);\
   (msa).start    = (arg_start);\
-  (msa).match_stack_limit  = (mp)->match_stack_limit;\
-  (msa).retry_limit_in_match = (mp)->retry_limit_in_match;\
-  (msa).mp = mp;\
+  (msa).match_stack_limit  = (mpv)->match_stack_limit;\
+  (msa).retry_limit_in_match = (mpv)->retry_limit_in_match;\
+  (msa).mp = mpv;\
   (msa).best_len = ONIG_MISMATCH;\
   (msa).ptr_num  = (reg)->num_repeat + ((reg)->num_mem + 1) * 2; \
 } while(0)
 #else
-#define MATCH_ARG_INIT(msa, reg, arg_option, arg_region, arg_start, mp) do { \
+#define MATCH_ARG_INIT(msa, reg, arg_option, arg_region, arg_start, mpv) do { \
   (msa).stack_p  = (void* )0;\
   (msa).options  = (arg_option);\
   (msa).region   = (arg_region);\
   (msa).start    = (arg_start);\
-  (msa).match_stack_limit  = (mp)->match_stack_limit;\
-  (msa).retry_limit_in_match = (mp)->retry_limit_in_match;\
-  (msa).mp = mp;\
+  (msa).match_stack_limit  = (mpv)->match_stack_limit;\
+  (msa).retry_limit_in_match = (mpv)->retry_limit_in_match;\
+  (msa).mp = mpv;\
   (msa).ptr_num  = (reg)->num_repeat + ((reg)->num_mem + 1) * 2; \
 } while(0)
 #endif