Home | History | Annotate | Download | only in tsort

Lines Matching refs:NODE

76  *  sometimes says a node is in a cycle when it isn't).
82 #define NF_ACYCLIC 0x2 /* this node is cycle free */
85 typedef struct node_str NODE;
88 NODE **n_prevp; /* pointer to previous node's n_next */
89 NODE *n_next; /* next node in graph */
90 NODE **n_arcs; /* array of arcs to other nodes */
93 size_t n_refcnt; /* # of arcs pointing to this node */
95 char n_name[1]; /* name of this node */
104 static NODE *graph, **cycle_buf, **longest_cycle;
109 static size_t find_cycle(NODE *, NODE *, size_t, size_t);
110 static NODE *get_node(const char *);
111 static void remove_node(NODE *);
200 * add an arc from node s1 to node s2 in the graph. If s1 or s2 are not in
206 NODE *n1;
207 NODE *n2;
237 /* Find a node in the graph (insert if not found) and return a pointer to it. */
238 static NODE *
242 NODE *n;
262 n = emalloc(sizeof(NODE) + key.size);
292 NODE *n;
302 NODE *n, *next;
359 /* print node and remove from graph (does not actually free node) */
361 remove_node(NODE *n)
363 NODE **np;
376 /* look for the longest? cycle from node from to node to. */
378 find_cycle(NODE *from, NODE *to, size_t longest_len, size_t depth)
380 NODE **np;
397 longest_len * sizeof(NODE *));