diff options
author | Quentin Rameau <quinq@fifth.space> | 2018-11-29 00:17:12 +0100 |
---|---|---|
committer | Guus Sliepen <guus@tinc-vpn.org> | 2018-11-30 14:37:38 +0100 |
commit | d22f4cb856db361cc413a2f9bcd326404afa470e (patch) | |
tree | 98d164e8ce593172bb7e0c7303227f1a1c80be13 | |
parent | 228a03aaa707a5fcced9dd5148a4bdb7e5ef025b (diff) |
Double-quote nodes in graphviz network file
This is needed for all nodes with a name starting with a digit,
otherwise the IDÂ would be interpreted as a numeral.
-rw-r--r-- | src/graph.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/graph.c b/src/graph.c index 3529d011..c63fdf9c 100644 --- a/src/graph.c +++ b/src/graph.c @@ -360,13 +360,13 @@ void dump_graph(void) { /* dump all nodes first */ for(node = node_tree->head; node; node = node->next) { n = node->data; - fprintf(file, " %s [label = \"%s\"];\n", n->name, n->name); + fprintf(file, " \"%s\" [label = \"%s\"];\n", n->name, n->name); } /* now dump all edges */ for(node = edge_weight_tree->head; node; node = node->next) { e = node->data; - fprintf(file, " %s -> %s;\n", e->from->name, e->to->name); + fprintf(file, " \"%s\" -> \"%s\";\n", e->from->name, e->to->name); } fprintf(file, "}\n"); |