]> git.saurik.com Git - bison.git/blobdiff - src/vcg.c
* src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
[bison.git] / src / vcg.c
index c68233de15ca63eec9cda1ad88ef9e7623a0bf01..d5f88141224aecb5beb5a4a38d9b5eda0fb43426 100644 (file)
--- a/src/vcg.c
+++ b/src/vcg.c
@@ -96,7 +96,6 @@ new_graph (graph *g)
   g->dirty_edge_labels = G_DIRTY_EDGE_LABELS;
   g->finetuning = G_FINETUNING;
   g->ignore_singles = G_IGNORE_SINGLES;
-  g->long_straight_phase = G_LONG_STRAIGHT_PHASE;
   g->priority_phase = G_PRIORITY_PHASE;
   g->manhattan_edges = G_MANHATTAN_EDGES;
   g->smanhattan_edges = G_SMANHATTAN_EDGES;
@@ -419,9 +418,7 @@ add_edge (graph *g, edge *e)
 void
 add_classname (graph *g, int val, const char *name)
 {
-  struct classname *classname;
-
-  MALLOC (classname, 1);
+  struct classname *classname = xmalloc (sizeof *classname);
   classname->no = val;
   classname->name = name;
   classname->next = g->classname;
@@ -431,9 +428,7 @@ add_classname (graph *g, int val, const char *name)
 void
 add_infoname (graph *g, int integer, const char *str)
 {
-  struct infoname *infoname;
-
-  MALLOC (infoname, 1);
+  struct infoname *infoname = xmalloc (sizeof *infoname);
   infoname->integer = integer;
   infoname->chars = str;
   infoname->next = g->infoname;
@@ -445,9 +440,7 @@ void
 add_colorentry (graph *g, int color_idx, int red_cp,
                int green_cp, int blue_cp)
 {
-  struct colorentry *ce;
-
-  MALLOC (ce, 1);
+  struct colorentry *ce = xmalloc (sizeof *ce);
   ce->color_index = color_idx;
   ce->red_cp = red_cp;
   ce->green_cp = green_cp;
@@ -797,9 +790,6 @@ output_graph (graph *g, FILE *fout)
   if (g->ignore_singles != G_IGNORE_SINGLES)
     fprintf (fout, "\tignore_singles:\t%s\n",
             get_decision_str (g->ignore_singles));
-  if (g->long_straight_phase != G_LONG_STRAIGHT_PHASE)
-    fprintf (fout, "\tlong_straight_phase:\t%s\n",
-            get_decision_str (g->long_straight_phase));
   if (g->priority_phase != G_PRIORITY_PHASE)
     fprintf (fout, "\tpriority_phase:\t%s\n",
             get_decision_str (g->priority_phase));