/* VCG description handler for Bison.
- Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
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;
`----------------------------------------------*/
static const char *
-get_color_str (enum color c)
+get_color_str (enum color color)
{
- switch (c)
+ switch (color)
{
case white: return "white";
case blue: return "blue";
}
static const char *
-get_textmode_str (enum textmode t)
+get_textmode_str (enum textmode textmode)
{
- switch (t)
+ switch (textmode)
{
case centered: return "center";
case left_justify: return "left_justify";
}
static const char *
-get_shape_str (enum shape s)
+get_shape_str (enum shape shape)
{
- switch (s)
+ switch (shape)
{
case box: return "box";
case rhomb: return "rhomb";
}
static const char *
-get_layoutalgorithm_str (enum layoutalgorithm l)
+get_layoutalgorithm_str (enum layoutalgorithm layoutalgorithm)
{
- switch (l)
+ switch (layoutalgorithm)
{
case normal: return "normal";
case maxdepth: return "maxdepth";
}
static const char *
-get_decision_str (enum decision d)
+get_decision_str (enum decision decision)
{
- switch (d)
+ switch (decision)
{
case no: return "no";
case yes: return "yes";
}
static const char *
-get_orientation_str (enum orientation o)
+get_orientation_str (enum orientation orientation)
{
- switch (o)
+ switch (orientation)
{
case top_to_bottom: return "top_to_bottom";
case bottom_to_top: return "bottom_to_top";
}
static const char *
-get_node_alignment_str (enum alignment a)
+get_node_alignment_str (enum alignment alignment)
{
- switch (a)
+ switch (alignment)
{
case center: return "center";
case top: return "top";
}
static const char *
-get_arrow_mode_str (enum arrow_mode a)
+get_arrow_mode_str (enum arrow_mode arrow_mode)
{
- switch (a)
+ switch (arrow_mode)
{
case fixed: return "fixed";
case free_a: return "free";
}
static const char *
-get_crossing_type_str (enum crossing_type c)
+get_crossing_type_str (enum crossing_type crossing_type)
{
- switch (c)
+ switch (crossing_type)
{
case bary: return "bary";
case median: return "median";
}
static const char *
-get_view_str (enum view v)
+get_view_str (enum view view)
{
- switch (v)
+ switch (view)
{
case normal_view: return "normal_view";
case cfish: return "cfish";
}
static const char *
-get_linestyle_str (enum linestyle l)
+get_linestyle_str (enum linestyle linestyle)
{
- switch (l)
+ switch (linestyle)
{
case continuous: return "continuous";
case dashed: return "dashed";
}
static const char *
-get_arrowstyle_str (enum arrowstyle a)
+get_arrowstyle_str (enum arrowstyle arrowstyle)
{
- switch (a)
+ switch (arrowstyle)
{
case solid: return "solid";
case line: return "line";
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;
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;
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;
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));