/* VCG description handler for Bison.
- Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
+ Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
You should have received a copy of the GNU General Public License
along with Bison; see the file COPYING. If not, write to
- the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+#include <config.h>
#include "system.h"
#include <quotearg.h>
}
/*----------------------------------------------.
-| Get functions. |
+| Get functions. |
| Return string corresponding to an enum value. |
`----------------------------------------------*/
{
switch (color)
{
+ default: abort ();
case white: return "white";
case blue: return "blue";
case red: return "red";
case orange: return "orange";
case orchid: return "orchid";
case black: return "black";
- default: abort (); return NULL;
}
}
{
switch (textmode)
{
+ default: abort ();
case centered: return "center";
case left_justify: return "left_justify";
case right_justify: return "right_justify";
- default: abort (); return NULL;
}
}
{
switch (shape)
{
+ default: abort ();
case box: return "box";
case rhomb: return "rhomb";
case ellipse: return "ellipse";
case triangle: return "triangle";
- default: abort (); return NULL;
}
}
{
switch (decision)
{
+ default: abort ();
case no: return "no";
case yes: return "yes";
- default: abort (); return NULL;
}
}
{
switch (orientation)
{
+ default: abort ();
case top_to_bottom: return "top_to_bottom";
case bottom_to_top: return "bottom_to_top";
case left_to_right: return "left_to_right";
case right_to_left: return "right_to_left";
- default: abort (); return NULL;
}
}
{
switch (alignment)
{
+ default: abort ();
case center: return "center";
case top: return "top";
case bottom: return "bottom";
- default: abort (); return NULL;
}
}
{
switch (arrow_mode)
{
+ default: abort ();
case fixed: return "fixed";
case free_a: return "free";
- default: abort (); return NULL;
}
}
{
switch (crossing_type)
{
+ default: abort ();
case bary: return "bary";
case median: return "median";
case barymedian: return "barymedian";
case medianbary: return "medianbary";
- default: abort (); return NULL;
}
}
so it is an error here if view == normal_view. */
switch (view)
{
+ default: abort ();
case cfish: return "cfish";
case pfish: return "pfish";
case fcfish: return "fcfish";
case fpfish: return "fpfish";
- default: abort (); return NULL;
}
}
{
switch (linestyle)
{
+ default: abort ();
case continuous: return "continuous";
case dashed: return "dashed";
case dotted: return "dotted";
case invisible: return "invisible";
- default: abort (); return NULL;
}
}
{
switch (arrowstyle)
{
+ default: abort ();
case solid: return "solid";
case line: return "line";
case none: return "none";
- default: abort (); return NULL;
}
}
/*------------------------------.
-| Add functions. |
+| Add functions. |
| Edge and nodes into a graph. |
`------------------------------*/
fprintf (fout, "\t\tlabel:\t%s\n", quote (e->label));
if (e->linestyle != E_LINESTYLE)
- fprintf (fout, "\t\tlinestyle:\t%s\n",
- quote (get_linestyle_str (e->linestyle)));
+ fprintf (fout, "\t\tlinestyle:\t%s\n", get_linestyle_str (e->linestyle));
if (e->thickness != E_THICKNESS)
fprintf (fout, "\t\tthickness:\t%d\n", e->thickness);
fprintf (fout, "\tcrossing_optimization:\t%s\n",
get_decision_str (g->crossing_optimization));
- if (g->view != G_VIEW)
+ if (g->view != normal_view)
fprintf (fout, "\tview:\t%s\n", get_view_str (g->view));
if (g->edges != G_EDGES)