X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/600cad3b84d52923ef08f0265e0f76670b36e1d9..ce209526ed8568799ed15e41e8e1d4221a49b51d:/src/print_graph.c diff --git a/src/print_graph.c b/src/print_graph.c index 5dca0920..a021a7c7 100644 --- a/src/print_graph.c +++ b/src/print_graph.c @@ -36,7 +36,7 @@ static graph_t graph; -static unsigned node_output_size = 0; +static size_t node_output_size = 0; /* Return an unambiguous printable representated, allocated in slot 0, for NAME, suitable for C strings. */ @@ -246,10 +246,15 @@ print_state (int state) } /* `obstack_cat' NODE_OBSTACK to GRAPH_OBSTACK. */ - obstack_grow (&graph_obstack, - obstack_base (&node_obstack), - obstack_object_size (&node_obstack)); - obstack_finish (&node_obstack); + { + size_t obs_size; + + obs_size = obstack_object_size (&node_obstack); + obstack_grow (&graph_obstack, + obstack_base (&node_obstack), + obs_size); + obstack_free (&node_obstack, 0); + } } @@ -268,7 +273,7 @@ print_graph (void) #endif graph.display_edge_labels = yes; - graph.layoutalgorithm = 0; + graph.layoutalgorithm = normal; graph.port_sharing = no; graph.finetuning = yes;