- new_node (&node); /* Set node attributs default value. */
- sprintf (name, "%d", state);
- node.title = name; /* Give a name to the node. */
- open_node (&node_obstack);
- /* Output a VCG formatted attributs list. */
- output_node (&node, &node_obstack);
-
- {
- /* Here we begin to compute the node label. */
- obstack_sgrow (&node_obstack, "\t\tlabel:\t\""); /* Open Label */
-
- /* Keep the size of NODE_OBSTACK before computing the label. It is
- useful to format the label. */
- node_output_size = obstack_object_size (&node_obstack);
-
- /* Compute the labels of nodes on the fly. */
- print_core (state, &node_obstack);
- /* Compute edges and additionnal parts of node label. */
- print_actions (state, node.title, &node_obstack);
-
- obstack_sgrow (&node_obstack, "\"\n"); /* Close Label. */
-
- close_node (&node_obstack);
- }
-
- /* `obstack_cat' NODE_OBSTACK to GRAPH_OBSTACK. */
- obstack_grow (&graph_obstack,
- obstack_base (&node_obstack),
- obstack_object_size (&node_obstack));
- obstack_finish (&node_obstack);
+ print_core (&node_obstack, s);
+ obstack_1grow (&node_obstack, '\0');
+ output_node (s->number, obstack_finish (&node_obstack), fgraph);
+ obstack_free (&node_obstack, 0);
+
+ /* Output the edges. */
+ print_actions (s, fgraph);