diff options
Diffstat (limited to 'src/regex')
-rw-r--r-- | src/regex/regex_test_lib.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/regex/regex_test_lib.c b/src/regex/regex_test_lib.c index 4e388a70b..814380246 100644 --- a/src/regex/regex_test_lib.c +++ b/src/regex/regex_test_lib.c | |||
@@ -99,8 +99,7 @@ c2i (char c, int size) | |||
99 | static void | 99 | static void |
100 | space (int n) | 100 | space (int n) |
101 | { | 101 | { |
102 | int i; | 102 | for (int i = 0; i < n; i++) |
103 | for (i = 0; i < n; i++) | ||
104 | fprintf (stderr, "| "); | 103 | fprintf (stderr, "| "); |
105 | } | 104 | } |
106 | 105 | ||
@@ -114,8 +113,7 @@ space (int n) | |||
114 | static void | 113 | static void |
115 | debugctx (struct RegexCombineCtx *ctx, int level) | 114 | debugctx (struct RegexCombineCtx *ctx, int level) |
116 | { | 115 | { |
117 | return; | 116 | #if DEBUG_REGEX |
118 | unsigned int i; | ||
119 | if (NULL != ctx->s) | 117 | if (NULL != ctx->s) |
120 | { | 118 | { |
121 | space (level - 1); | 119 | space (level - 1); |
@@ -123,7 +121,7 @@ debugctx (struct RegexCombineCtx *ctx, int level) | |||
123 | } | 121 | } |
124 | else | 122 | else |
125 | fprintf (stderr, "ROOT (base %u)\n", ctx->size); | 123 | fprintf (stderr, "ROOT (base %u)\n", ctx->size); |
126 | for (i = 0; i < ctx->size; i++) | 124 | for (unsigned int i = 0; i < ctx->size; i++) |
127 | { | 125 | { |
128 | if (NULL != ctx->children[i]) | 126 | if (NULL != ctx->children[i]) |
129 | { | 127 | { |
@@ -132,6 +130,7 @@ debugctx (struct RegexCombineCtx *ctx, int level) | |||
132 | } | 130 | } |
133 | } | 131 | } |
134 | fflush(stderr); | 132 | fflush(stderr); |
133 | #endif | ||
135 | } | 134 | } |
136 | 135 | ||
137 | 136 | ||
@@ -142,7 +141,8 @@ debugctx (struct RegexCombineCtx *ctx, int level) | |||
142 | * @param regex Regex to add. | 141 | * @param regex Regex to add. |
143 | */ | 142 | */ |
144 | static void | 143 | static void |
145 | regex_add (struct RegexCombineCtx *ctx, const char *regex); | 144 | regex_add (struct RegexCombineCtx *ctx, |
145 | const char *regex); | ||
146 | 146 | ||
147 | 147 | ||
148 | /** | 148 | /** |