Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BEGIN {
- int visited[node_t];
- int visit(node_t n, edge_t e) {
- if (visited[n] == 0) {
- visited[n] = 1;
- for (e = fstin(n); e; e = nxtin(e)) {
- visit(e.tail, NULL);
- }
- printf("%s\n", n.name);
- }
- return 0;
- }
- }
- N {
- visit($, NULL);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement