]> granicus.if.org Git - onig/commitdiff
refactoring
authorK.Kosako <kosako@sofnec.co.jp>
Tue, 26 Feb 2019 02:23:10 +0000 (11:23 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Thu, 28 Feb 2019 05:28:18 +0000 (14:28 +0900)
src/regexec.c

index ab12d9c8bf34a0e1810c1a82852243c1e4737cfb..6b09fb08211e2211887c0abbf3a2cd86e20df656 100644 (file)
@@ -297,9 +297,9 @@ bitset_on_num(BitSetRef bs)
   return n;
 }
 
-extern void
-onig_print_compiled_byte_code(FILE* f, regex_t* reg, int index,
-                              Operation* start, OnigEncoding enc)
+static void
+print_compiled_byte_code(FILE* f, regex_t* reg, int index,
+                         Operation* start, OnigEncoding enc)
 {
   int i, n;
   RelAddrType addr;
@@ -609,7 +609,7 @@ onig_print_compiled_byte_code(FILE* f, regex_t* reg, int index,
     break;
 
   default:
-    fprintf(stderr, "onig_print_compiled_byte_code: undefined code %d\n", opcode);
+    fprintf(stderr, "print_compiled_byte_code: undefined code %d\n", opcode);
     break;
   }
 }
@@ -632,7 +632,7 @@ onig_print_compiled_byte_code_list(FILE* f, regex_t* reg)
     int pos = bp - start;
 
     fprintf(f, "%4d: ", pos);
-    onig_print_compiled_byte_code(f, reg, pos, start, reg->enc);
+    print_compiled_byte_code(f, reg, pos, start, reg->enc);
     fprintf(f, "\n");
     bp++;
   }
@@ -2431,7 +2431,7 @@ typedef struct {
         fprintf(stderr, "----: finish");\
       else {\
         fprintf(stderr, "%4d: ", (int )(xp - reg->ops));\
-        onig_print_compiled_byte_code(stderr, reg, (int )(xp - reg->ops), reg->ops, encode);\
+        print_compiled_byte_code(stderr, reg, (int )(xp - reg->ops), reg->ops, encode);\
       }\
       fprintf(stderr, "\n");\
   } while(0);