How to get label
Created by: cqf00
I want to get the label of a edge. When I use agnameof , it return null. What should I do?
Example:
test.gv
digraph g{ "node a" -> "node b" [label="edge label"] }
c code: fp = fopen("test.gv", "r"); if (g = agread(fp, 0)) { for (v = agfstnode(g); v; v = agnxtnode(g,v)) { for (e = agfstout(g,v); e; e = agnxtout(g,e)) { printf("agtail: %s\n", agnameof(agtail(e))); printf("aghead: %s\n", agnameof(aghead(e))); printf("edge: %s\n", agnameof(e)); } } }
Then, the result: agtail: node a aghead: node b edge: (null)