regcomp.c: fix debug conditionals
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
44c938c923
commit
4c68173079
20
regcomp.c
20
regcomp.c
@ -5354,7 +5354,7 @@ set_sub_anchor(regex_t* reg, OptAncInfo* anc)
|
|||||||
reg->sub_anchor |= anc->right_anchor & ANCHOR_END_LINE;
|
reg->sub_anchor |= anc->right_anchor & ANCHOR_END_LINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ONIG_DEBUG
|
#if defined(ONIG_DEBUG_COMPILE) || defined(ONIG_DEBUG_MATCH)
|
||||||
static void print_optimize_info(FILE* f, regex_t* reg);
|
static void print_optimize_info(FILE* f, regex_t* reg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -5464,7 +5464,9 @@ static void print_enc_string(FILE* fp, OnigEncoding enc,
|
|||||||
|
|
||||||
fprintf(fp, "/ (%s)\n", enc->name);
|
fprintf(fp, "/ (%s)\n", enc->name);
|
||||||
}
|
}
|
||||||
|
#endif /* ONIG_DEBUG */
|
||||||
|
|
||||||
|
#if defined(ONIG_DEBUG_COMPILE) || defined(ONIG_DEBUG_MATCH)
|
||||||
static void
|
static void
|
||||||
print_distance_range(FILE* f, OnigDistance a, OnigDistance b)
|
print_distance_range(FILE* f, OnigDistance a, OnigDistance b)
|
||||||
{
|
{
|
||||||
@ -5582,7 +5584,7 @@ print_optimize_info(FILE* f, regex_t* reg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* ONIG_DEBUG */
|
#endif /* ONIG_DEBUG_COMPILE || ONIG_DEBUG_MATCH */
|
||||||
|
|
||||||
|
|
||||||
extern void
|
extern void
|
||||||
@ -5683,7 +5685,7 @@ onig_chain_reduce(regex_t* reg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ONIG_DEBUG
|
#ifdef ONIG_DEBUG_COMPILE
|
||||||
static void print_compiled_byte_code_list P_((FILE* f, regex_t* reg));
|
static void print_compiled_byte_code_list P_((FILE* f, regex_t* reg));
|
||||||
#endif
|
#endif
|
||||||
#ifdef ONIG_DEBUG_PARSE_TREE
|
#ifdef ONIG_DEBUG_PARSE_TREE
|
||||||
@ -6271,15 +6273,17 @@ op2arg_type(int opcode)
|
|||||||
return ARG_SPECIAL;
|
return ARG_SPECIAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ONIG_DEBUG_PARSE_TREE
|
||||||
static void
|
static void
|
||||||
Indent(FILE* f, int indent)
|
Indent(FILE* f, int indent)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < indent; i++) putc(' ', f);
|
for (i = 0; i < indent; i++) putc(' ', f);
|
||||||
}
|
}
|
||||||
|
#endif /* ONIG_DEBUG_PARSE_TREE */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
p_string(FILE* f, int len, UChar* s)
|
p_string(FILE* f, ptrdiff_t len, UChar* s)
|
||||||
{
|
{
|
||||||
fputs(":", f);
|
fputs(":", f);
|
||||||
while (len-- > 0) { fputc(*s++, f); }
|
while (len-- > 0) { fputc(*s++, f); }
|
||||||
@ -6544,6 +6548,7 @@ onig_print_compiled_byte_code(FILE* f, UChar* bp, UChar* bpend, UChar** nextp,
|
|||||||
if (nextp) *nextp = bp;
|
if (nextp) *nextp = bp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ONIG_DEBUG_COMPILE
|
||||||
static void
|
static void
|
||||||
print_compiled_byte_code_list(FILE* f, regex_t* reg)
|
print_compiled_byte_code_list(FILE* f, regex_t* reg)
|
||||||
{
|
{
|
||||||
@ -6565,7 +6570,9 @@ print_compiled_byte_code_list(FILE* f, regex_t* reg)
|
|||||||
|
|
||||||
fprintf(f, "\n");
|
fprintf(f, "\n");
|
||||||
}
|
}
|
||||||
|
#endif /* ONIG_DEBUG_COMPILE */
|
||||||
|
|
||||||
|
#ifdef ONIG_DEBUG_PARSE_TREE
|
||||||
static void
|
static void
|
||||||
print_indent_tree(FILE* f, Node* node, int indent)
|
print_indent_tree(FILE* f, Node* node, int indent)
|
||||||
{
|
{
|
||||||
@ -6737,12 +6744,11 @@ print_indent_tree(FILE* f, Node* node, int indent)
|
|||||||
|
|
||||||
fflush(f);
|
fflush(f);
|
||||||
}
|
}
|
||||||
#endif /* ONIG_DEBUG */
|
|
||||||
|
|
||||||
#ifdef ONIG_DEBUG_PARSE_TREE
|
|
||||||
static void
|
static void
|
||||||
print_tree(FILE* f, Node* node)
|
print_tree(FILE* f, Node* node)
|
||||||
{
|
{
|
||||||
print_indent_tree(f, node, 0);
|
print_indent_tree(f, node, 0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* ONIG_DEBUG_PARSE_TREE */
|
||||||
|
#endif /* ONIG_DEBUG */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user