/[bison]/bison/src/vcg.c
ViewVC logotype

Diff of /bison/src/vcg.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5.2.2 by marc, Sun Aug 26 23:48:50 2001 UTC revision 1.5.2.3 by marc, Mon Aug 27 12:02:47 2001 UTC
# Line 19  Line 19 
19     Boston, MA 02111-1307, USA.  */     Boston, MA 02111-1307, USA.  */
20    
21  #include "system.h"  #include "system.h"
22    #include "xalloc.h"
23  #include "vcg.h"  #include "vcg.h"
24  #include "vcg_defaults.h"  #include "vcg_defaults.h"
25    
# Line 425  add_edge (graph_t *graph, edge_t *edge) Line 426  add_edge (graph_t *graph, edge_t *edge)
426    graph->edge_list = edge;    graph->edge_list = edge;
427  }  }
428    
429    void
430    add_classname (graph_t *g, int val, char *name)
431    {
432      struct classname_s *classname;
433      
434      classname = XMALLOC (struct classname_s, 1);
435      classname->no = val;
436      classname->name = name;
437      classname->next = g->classname;
438      g->classname = classname;
439    }
440    
441    void
442    add_infoname (graph_t *g, int integer, char *string)
443    {
444      struct infoname_s *infoname;
445      
446      infoname = XMALLOC (struct infoname_s, 1);
447      infoname->integer = integer;
448      infoname->string = string;
449      infoname->next = g->infoname;
450      g->infoname = infoname;
451    }
452    
453    /* Build a colorentry struct and add it to the list.  */
454    void
455    add_colorentry (graph_t *g, int color_idx, int red_cp,
456                    int green_cp, int blue_cp)
457    {
458      struct colorentry_s *ce;
459      
460      ce = XMALLOC (struct colorentry_s, 1);
461      ce->color_index = color_idx;
462      ce->red_cp = red_cp;
463      ce->green_cp = green_cp;
464      ce->blue_cp = blue_cp;
465      ce->next = g->colorentry;
466      g->colorentry = ce;
467    }
468    
469  /*-------------------------------------.  /*-------------------------------------.
470  | Open and close functions (formatted) |  | Open and close functions (formatted) |
471  `-------------------------------------*/  `-------------------------------------*/
# Line 480  close_graph(graph_t *graph, struct obsta Line 521  close_graph(graph_t *graph, struct obsta
521  {  {
522    obstack_1grow (os, '\n');    obstack_1grow (os, '\n');
523    
524      /* FIXME: Unallocate nodes and edges if required.  */
525    {    {
526      node_t *node;      node_t *node;
527    
# Line 702  output_graph (graph_t *graph, struct obs Line 744  output_graph (graph_t *graph, struct obs
744    
745    if (graph->hidden != G_HIDDEN)    if (graph->hidden != G_HIDDEN)
746      obstack_fgrow1 (os, "\thidden:\t%d\n", graph->hidden);      obstack_fgrow1 (os, "\thidden:\t%d\n", graph->hidden);
747      
748      /* FIXME: Unallocate struct list if required.  
749         Maybe with a little function.  */
750    if (graph->classname != G_CLASSNAME)    if (graph->classname != G_CLASSNAME)
751      {      {
752        struct classname_s *ite;        struct classname_s *ite;

Legend:
Removed from v.1.5.2.2  
changed lines
  Added in v.1.5.2.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26