diff options
author | Maximilian Szengel <gnunet@maxsz.de> | 2012-08-17 10:03:56 +0000 |
---|---|---|
committer | Maximilian Szengel <gnunet@maxsz.de> | 2012-08-17 10:03:56 +0000 |
commit | 39e159b2613be7460dd47bb5d290ac84dc3a9196 (patch) | |
tree | c2915a29c382399282afa8231fa935c3df1f32d7 /src/regex/regex_graph.c | |
parent | 2162464f34cff436c90e61bf967be0f0ec74d31e (diff) | |
download | gnunet-39e159b2613be7460dd47bb5d290ac84dc3a9196.tar.gz gnunet-39e159b2613be7460dd47bb5d290ac84dc3a9196.zip |
Added multi-striding capabilities to regex.
Diffstat (limited to 'src/regex/regex_graph.c')
-rw-r--r-- | src/regex/regex_graph.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/regex/regex_graph.c b/src/regex/regex_graph.c index 06546e8f7..9223200c8 100644 --- a/src/regex/regex_graph.c +++ b/src/regex/regex_graph.c | |||
@@ -167,10 +167,10 @@ GNUNET_REGEX_automaton_save_graph_step (void *cls, unsigned int count, | |||
167 | char *to_name; | 167 | char *to_name; |
168 | 168 | ||
169 | if (GNUNET_YES == ctx->verbose) | 169 | if (GNUNET_YES == ctx->verbose) |
170 | GNUNET_asprintf (&name, "%i (%s) (%s) (%s)", s->proof_id, s->name, s->proof, | 170 | GNUNET_asprintf (&name, "%i (%s) (%s) (%s)", s->dfs_id, s->name, s->proof, |
171 | GNUNET_h2s (&s->hash)); | 171 | GNUNET_h2s (&s->hash)); |
172 | else | 172 | else |
173 | GNUNET_asprintf (&name, "%i", s->proof_id); | 173 | GNUNET_asprintf (&name, "%i", s->dfs_id); |
174 | 174 | ||
175 | if (s->accepting) | 175 | if (s->accepting) |
176 | { | 176 | { |
@@ -218,12 +218,12 @@ GNUNET_REGEX_automaton_save_graph_step (void *cls, unsigned int count, | |||
218 | 218 | ||
219 | if (GNUNET_YES == ctx->verbose) | 219 | if (GNUNET_YES == ctx->verbose) |
220 | { | 220 | { |
221 | GNUNET_asprintf (&to_name, "%i (%s) (%s) (%s)", ctran->to_state->proof_id, | 221 | GNUNET_asprintf (&to_name, "%i (%s) (%s) (%s)", ctran->to_state->dfs_id, |
222 | ctran->to_state->name, ctran->to_state->proof, | 222 | ctran->to_state->name, ctran->to_state->proof, |
223 | GNUNET_h2s (&ctran->to_state->hash)); | 223 | GNUNET_h2s (&ctran->to_state->hash)); |
224 | } | 224 | } |
225 | else | 225 | else |
226 | GNUNET_asprintf (&to_name, "%i", ctran->to_state->proof_id); | 226 | GNUNET_asprintf (&to_name, "%i", ctran->to_state->dfs_id); |
227 | 227 | ||
228 | if (NULL == ctran->label) | 228 | if (NULL == ctran->label) |
229 | { | 229 | { |
@@ -320,7 +320,8 @@ GNUNET_REGEX_automaton_save_graph (struct GNUNET_REGEX_Automaton *a, | |||
320 | start = "digraph G {\nrankdir=LR\n"; | 320 | start = "digraph G {\nrankdir=LR\n"; |
321 | fwrite (start, strlen (start), 1, ctx.filep); | 321 | fwrite (start, strlen (start), 1, ctx.filep); |
322 | 322 | ||
323 | GNUNET_REGEX_automaton_traverse (a, &GNUNET_REGEX_automaton_save_graph_step, | 323 | GNUNET_REGEX_automaton_traverse (a, a->start, |
324 | &GNUNET_REGEX_automaton_save_graph_step, | ||
324 | &ctx); | 325 | &ctx); |
325 | 326 | ||
326 | end = "\n}\n"; | 327 | end = "\n}\n"; |