| 34 | DEBUG ONLY |
| 35 | /* Output graph in detailed adjacency list format. */ |
| 36 | static void graph_show_adj(Graph g, FILE *fp) |
| 37 | { |
| 38 | Node n; |
| 39 | fprintf(stdout, "graph, %sdirected\n", g->directed ? "" : "un"); |
| 40 | for (n = g->nodes; n; n = n->next) { |
| 41 | Edge e; |
| 42 | fprintf(fp, "node id: %u, ", n->visited); |
| 43 | show(fp, n->label, 0); |
| 44 | fputc('\n', fp); |
| 45 | show_attrs(fp, n->attrs, 0); |
| 46 | if (n->attrs) fputc('\n', fp); |
| 47 | for (e = n->outgoing; e; e = e->next_adj_out) { |
| 48 | /* Get node ids: */ |
| 49 | fprintf(fp, "%u -%c %u\n", |
| 50 | e->from->visited, |
| 51 | g->directed ? '>' : '-', |
| 52 | e->to->visited); |
| 53 | } |
| 54 | } |
| 55 | } |
| 56 | #endif |
| 57 | |
| 58 | /* Decode the coordinates attribute. */ |
nothing calls this directly
no test coverage detected