/* VCG description handler for Bison.
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
#include "vcg_defaults.h"
#include "quotearg.h"
-/* Return an unambiguous printable representated, allocated in slot 0,
- for NAME, suitable for C strings. */
+/* Return an unambiguous printable representated, for NAME, suitable
+ for C strings. Use slot 2 since the user may use slots 0 and 1.
+ */
+
static char const *
quote (char const *name)
{
- return quotearg_n_style (0, c_quoting_style, name);
+ return quotearg_n_style (2, c_quoting_style, name);
}
case orange: return "orange";
case orchid: return "orchid";
case black: return "black";
- default:
- assert (!"Not a default color.");
+ default: abort (); return NULL;
}
- return NULL;
}
static const char *
case centered: return "center";
case left_justify: return "left_justify";
case right_justify: return "right_justify";
- default:
- assert (!"Not a text mode.");
+ default: abort (); return NULL;
}
- return NULL;
}
static const char *
case rhomb: return "rhomb";
case ellipse: return "ellipse";
case triangle: return "triangle";
- default:
- assert (!"Not a shape.");
+ default: abort (); return NULL;
}
- return NULL;
}
static const char *
case minbackward: return "minbackward";
case dfs: return "dfs";
case tree: return "tree";
- default:
- assert (!"Not a layout algorithm.");
+ default: abort (); return NULL;
}
- return NULL;
}
static const char *
{
case no: return "no";
case yes: return "yes";
- default:
- assert (!"Either yes nor no.");
+ default: abort (); return NULL;
}
- return NULL;
}
static const char *
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:
- assert (!"Not an orientation.");
+ default: abort (); return NULL;
}
- return NULL;
}
static const char *
case center: return "center";
case top: return "top";
case bottom: return "bottom";
- default:
- assert (!"Not an alignement.");
+ default: abort (); return NULL;
}
- return NULL;
}
static const char *
{
case fixed: return "fixed";
case free_a: return "free";
- default:
- assert (!"Not an arrow mode.");
+ default: abort (); return NULL;
}
- return NULL;
}
static const char *
case median: return "median";
case barymedian: return "barymedian";
case medianbary: return "medianbary";
- default:
- assert (!"Not a crossing type.");
+ default: abort (); return NULL;
}
- return NULL;
}
static const char *
case pfish: return "pfish";
case fcfish: return "fcfish";
case fpfish: return "fpfish";
- default:
- assert (!"Not a view.");
+ default: abort (); return NULL;
}
- return NULL;
}
static const char *
case dashed: return "dashed";
case dotted: return "dotted";
case invisible: return "invisible";
- default:
- assert (!"Not a line style.");
+ default: abort (); return NULL;
}
- return NULL;
}
static const char *
case solid: return "solid";
case line: return "line";
case none: return "none";
- default:
- assert (!"Not an arrow style.");
+ default: abort (); return NULL;
}
- return NULL;
}
/*----------------------------.