70 estack_push_back(stk, e);
71 dfs(g, v, state,
false, stk);
78 ep = estack_pop_back(stk);
98 }
else if (
PARENT(u) != v) {
102 if (isRoot && !
BLOCK(u)) {
118 if (!root && state->
N_root) {
130 fprintf (stderr,
"root = %s\n",
agnameof(root));
132 dfs(g, root, state,
true, &stk);
152 for (bp = bp->
next; bp; bp = next) {
195void print_blocktree(
block_t * sn,
int depth)
199 fprintf(stderr,
"%s:",
agnameof(g));
201 fprintf(stderr,
" %s",
agnameof(n));
207 print_blocktree(child, depth);
static void agxbfree(agxbuf *xb)
free any malloced resources
static int agxbprint(agxbuf *xb, const char *fmt,...)
Printf-style output to an agxbuf.
static WUR char * agxbuse(agxbuf *xb)
static Agraph_t * mkBlock(Agraph_t *g, bcstate *stp)
void insertBlock(blocklist_t *bl, block_t *bp)
add block at beginning
int blockSize(block_t *sp)
void freeBlock(block_t *sp)
void initBlocklist(blocklist_t *bl)
void appendBlock(blocklist_t *bl, block_t *bp)
add block at end
static void find_blocks(Agraph_t *g, circ_state *state)
static block_t * makeBlock(Agraph_t *g, circ_state *state)
block_t * createBlocktree(Agraph_t *g, circ_state *state)
static Agraph_t * makeBlockGraph(Agraph_t *g, circ_state *state)
static void dfs(Agraph_t *g, Agnode_t *u, circ_state *state, bool isRoot, estack_t *stk)
void freeBlocktree(block_t *bp)
static void addNode(block_t *bp, Agnode_t *n)
bool late_bool(void *obj, attrsym_t *attr, bool defaultValue)
Agedge_t * agnxtedge(Agraph_t *g, Agedge_t *e, Agnode_t *n)
Agedge_t * agfstedge(Agraph_t *g, Agnode_t *n)
Agnode_t * agnxtnode(Agraph_t *g, Agnode_t *n)
Agnode_t * agfstnode(Agraph_t *g)
Agnode_t * agsubnode(Agraph_t *g, Agnode_t *n, int createflag)
char * agnameof(void *)
returns a string descriptor for the object.
void * agbindrec(void *obj, const char *name, unsigned int recsize, int move_to_front)
attaches a new record of the given size to the object
Agraph_t * agsubg(Agraph_t *g, char *name, int cflag)
static void indent(int ix)
Arithmetic helper functions.
static int imin(int a, int b)
minimum of two integers
#define DEFINE_LIST(name, type)