aboutsummaryrefslogtreecommitdiff
path: root/src/regex/regex_graph.c
diff options
context:
space:
mode:
authorMaximilian Szengel <gnunet@maxsz.de>2012-08-13 16:17:51 +0000
committerMaximilian Szengel <gnunet@maxsz.de>2012-08-13 16:17:51 +0000
commit08a7d99253dc2bf1291ad9ab212b426a26fbb4a4 (patch)
tree7050019167a00ea8e14180e890920f1262a1d9de /src/regex/regex_graph.c
parent8e2f63c53202198ba8499393041c83bbd93ea6f7 (diff)
downloadgnunet-08a7d99253dc2bf1291ad9ab212b426a26fbb4a4.tar.gz
gnunet-08a7d99253dc2bf1291ad9ab212b426a26fbb4a4.zip
using strings as labels
Diffstat (limited to 'src/regex/regex_graph.c')
-rw-r--r--src/regex/regex_graph.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/regex/regex_graph.c b/src/regex/regex_graph.c
index 9dfdb15a4..06546e8f7 100644
--- a/src/regex/regex_graph.c
+++ b/src/regex/regex_graph.c
@@ -188,7 +188,8 @@ GNUNET_REGEX_automaton_save_graph_step (void *cls, unsigned int count,
188 } 188 }
189 else if (GNUNET_YES == ctx->coloring) 189 else if (GNUNET_YES == ctx->coloring)
190 { 190 {
191 GNUNET_asprintf (&s_acc, "\"%s\" [shape=circle, color=\"0.%i 0.8 0.95\"];\n", name, 191 GNUNET_asprintf (&s_acc,
192 "\"%s\" [shape=circle, color=\"0.%i 0.8 0.95\"];\n", name,
192 s->scc_id); 193 s->scc_id);
193 } 194 }
194 else 195 else
@@ -224,7 +225,7 @@ GNUNET_REGEX_automaton_save_graph_step (void *cls, unsigned int count,
224 else 225 else
225 GNUNET_asprintf (&to_name, "%i", ctran->to_state->proof_id); 226 GNUNET_asprintf (&to_name, "%i", ctran->to_state->proof_id);
226 227
227 if (ctran->label == 0) 228 if (NULL == ctran->label)
228 { 229 {
229 if (GNUNET_YES == ctx->coloring) 230 if (GNUNET_YES == ctx->coloring)
230 { 231 {
@@ -234,8 +235,8 @@ GNUNET_REGEX_automaton_save_graph_step (void *cls, unsigned int count,
234 } 235 }
235 else 236 else
236 { 237 {
237 GNUNET_asprintf (&s_tran, "\"%s\" -> \"%s\" [label = \"ε\"];\n", 238 GNUNET_asprintf (&s_tran, "\"%s\" -> \"%s\" [label = \"ε\"];\n", name,
238 name, to_name, s->scc_id); 239 to_name, s->scc_id);
239 } 240 }
240 } 241 }
241 else 242 else
@@ -243,12 +244,12 @@ GNUNET_REGEX_automaton_save_graph_step (void *cls, unsigned int count,
243 if (GNUNET_YES == ctx->coloring) 244 if (GNUNET_YES == ctx->coloring)
244 { 245 {
245 GNUNET_asprintf (&s_tran, 246 GNUNET_asprintf (&s_tran,
246 "\"%s\" -> \"%s\" [label = \"%c\", color=\"0.%i 0.8 0.95\"];\n", 247 "\"%s\" -> \"%s\" [label = \"%s\", color=\"0.%i 0.8 0.95\"];\n",
247 name, to_name, ctran->label, s->scc_id); 248 name, to_name, ctran->label, s->scc_id);
248 } 249 }
249 else 250 else
250 { 251 {
251 GNUNET_asprintf (&s_tran, "\"%s\" -> \"%s\" [label = \"%c\"];\n", name, 252 GNUNET_asprintf (&s_tran, "\"%s\" -> \"%s\" [label = \"%s\"];\n", name,
252 to_name, ctran->label, s->scc_id); 253 to_name, ctran->label, s->scc_id);
253 } 254 }
254 } 255 }