MCPcopy Index your code
hub / github.com/IBM/Project_CodeNet / graph_show_adj

Function graph_show_adj

tools/json-graph/src/jsonml2jgf.c:36–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34DEBUG ONLY
35/* Output graph in detailed adjacency list format. */
36static 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. */

Callers

nothing calls this directly

Calls 2

showFunction · 0.85
show_attrsFunction · 0.85

Tested by

no test coverage detected