![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /proc/self/root/usr/share/graphviz/gvpr/ |
/* Detect directed cycle and print one if found */ BEG_G{ node_t tp, hp; node_t stk[node_t]; $tvtype = TV_prepostfwd; $tvroot = fstnode($); } N { if (stk[$]) { stk[$] = NULL; } else if ($tvedge == NULL) { /* current root */ stk[$] = $; } else { stk[$] = $tvedge.tail; } } E { if (stk[$.head]) { tp = $.tail; hp = $.head; while (tp != $.head) { printf ("%s -> %s\n", tp.name, hp.name); hp = tp; tp = stk[tp]; } printf ("%s -> %s\n", tp.name, hp.name); exit(0); } }