diff options
author | szengel <szengel@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-08-17 10:03:56 +0000 |
---|---|---|
committer | szengel <szengel@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-08-17 10:03:56 +0000 |
commit | d4d90243ba64a9d0bd001421121f5553ca01ec87 (patch) | |
tree | c2915a29c382399282afa8231fa935c3df1f32d7 /src/regex/regex_graph.c | |
parent | b27caaec2688454d4a4d4df8b3d86eebab6f0f76 (diff) |
Added multi-striding capabilities to regex.
git-svn-id: https://gnunet.org/svn/gnunet@23280 140774ce-b5e7-0310-ab8b-a85725594a96
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 06546e8f75..9223200c8f 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, char *to_name; if (GNUNET_YES == ctx->verbose) - GNUNET_asprintf (&name, "%i (%s) (%s) (%s)", s->proof_id, s->name, s->proof, + GNUNET_asprintf (&name, "%i (%s) (%s) (%s)", s->dfs_id, s->name, s->proof, GNUNET_h2s (&s->hash)); else - GNUNET_asprintf (&name, "%i", s->proof_id); + GNUNET_asprintf (&name, "%i", s->dfs_id); if (s->accepting) { @@ -218,12 +218,12 @@ GNUNET_REGEX_automaton_save_graph_step (void *cls, unsigned int count, if (GNUNET_YES == ctx->verbose) { - GNUNET_asprintf (&to_name, "%i (%s) (%s) (%s)", ctran->to_state->proof_id, + GNUNET_asprintf (&to_name, "%i (%s) (%s) (%s)", ctran->to_state->dfs_id, ctran->to_state->name, ctran->to_state->proof, GNUNET_h2s (&ctran->to_state->hash)); } else - GNUNET_asprintf (&to_name, "%i", ctran->to_state->proof_id); + GNUNET_asprintf (&to_name, "%i", ctran->to_state->dfs_id); if (NULL == ctran->label) { @@ -320,7 +320,8 @@ GNUNET_REGEX_automaton_save_graph (struct GNUNET_REGEX_Automaton *a, start = "digraph G {\nrankdir=LR\n"; fwrite (start, strlen (start), 1, ctx.filep); - GNUNET_REGEX_automaton_traverse (a, &GNUNET_REGEX_automaton_save_graph_step, + GNUNET_REGEX_automaton_traverse (a, a->start, + &GNUNET_REGEX_automaton_save_graph_step, &ctx); end = "\n}\n"; |