1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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:
nobu 2016-05-25 06:05:48 +00:00
parent 44c938c923
commit 4c68173079

View file

@ -5354,7 +5354,7 @@ set_sub_anchor(regex_t* reg, OptAncInfo* anc)
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);
#endif
@ -5464,7 +5464,9 @@ static void print_enc_string(FILE* fp, OnigEncoding enc,
fprintf(fp, "/ (%s)\n", enc->name);
}
#endif /* ONIG_DEBUG */
#if defined(ONIG_DEBUG_COMPILE) || defined(ONIG_DEBUG_MATCH)
static void
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
@ -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));
#endif
#ifdef ONIG_DEBUG_PARSE_TREE
@ -6271,15 +6273,17 @@ op2arg_type(int opcode)
return ARG_SPECIAL;
}
#ifdef ONIG_DEBUG_PARSE_TREE
static void
Indent(FILE* f, int indent)
{
int i;
for (i = 0; i < indent; i++) putc(' ', f);
}
#endif /* ONIG_DEBUG_PARSE_TREE */
static void
p_string(FILE* f, int len, UChar* s)
p_string(FILE* f, ptrdiff_t len, UChar* s)
{
fputs(":", 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;
}
#ifdef ONIG_DEBUG_COMPILE
static void
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");
}
#endif /* ONIG_DEBUG_COMPILE */
#ifdef ONIG_DEBUG_PARSE_TREE
static void
print_indent_tree(FILE* f, Node* node, int indent)
{
@ -6737,12 +6744,11 @@ print_indent_tree(FILE* f, Node* node, int indent)
fflush(f);
}
#endif /* ONIG_DEBUG */
#ifdef ONIG_DEBUG_PARSE_TREE
static void
print_tree(FILE* f, Node* node)
{
print_indent_tree(f, node, 0);
}
#endif
#endif /* ONIG_DEBUG_PARSE_TREE */
#endif /* ONIG_DEBUG */