enum color_e.
* src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
to `normal'.
* src/reader.c (parse_token_decl): Initialize token with tok_eof.
* src/lex.h: Adjust prototype.
(token_t): Add `tok_undef'.
* src/lex.c (struct percent_table_struct): Retval is now a token_t.
(parse_percent_token): Now returns token_t.
Add default statement in switch.
(lex): Separate `c' as an input variable, from the token_t result
part.
(unlexed): Is a token_t.
+2001-09-10 Marc Autret <autret_m@epita.fr>, Akim Demaille <akim@epita.fr>
+
+ * src/vcg.h (graph_s): color, textcolor, bordercolor are now
+ enum color_e.
+ * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
+ to `normal'.
+ * src/reader.c (parse_token_decl): Initialize token with tok_eof.
+ * src/lex.h: Adjust prototype.
+ (token_t): Add `tok_undef'.
+ * src/lex.c (struct percent_table_struct): Retval is now a token_t.
+ (parse_percent_token): Now returns token_t.
+ Add default statement in switch.
+ (lex): Separate `c' as an input variable, from the token_t result
+ part.
+ (unlexed): Is a token_t.
+
2001-09-10 Akim Demaille <akim@epita.fr>
* configure.in: Bump to 1.29a.
bucket *symval;
int numval;
-static int unlexed; /* these two describe a token to be reread */
-static bucket *unlexed_symval; /* by the next call to lex */
+/* these two describe a token to be reread */
+static token_t unlexed = tok_undef;
+/* by the next call to lex */
+static bucket *unlexed_symval = NULL;
void
init_lex (void)
{
obstack_init (&token_obstack);
- unlexed = -1;
+ unlexed = tok_undef;
}
/* Just to make sure. */
token_buffer = NULL;
- if (unlexed >= 0)
+ if (unlexed != tok_undef)
{
+ token_t res = unlexed;
symval = unlexed_symval;
- c = unlexed;
- unlexed = -1;
- return c;
+ unlexed = tok_undef;
+ return res;
}
c = skip_white_space ();
{
const char *name;
void *set_flag;
- int retval;
+ token_t retval;
};
struct percent_table_struct percent_table[] =
/* Parse a token which starts with %.
Assumes the % has already been read and discarded. */
-int
+token_t
parse_percent_token (void)
{
- int c;
struct percent_table_struct *tx;
- c = getc (finput);
+ int c = getc (finput);
switch (c)
{
case tok_obsolete:
fatal (_("`%s' is no longer supported"), token_buffer);
break;
+
+ default:
+ /* Other cases do not apply here. */
+ break;
}
return tx->retval;
/* Token-type codes. */
typedef enum token_e
{
+ tok_undef, /* Not defined. Used to initial token_t vars. */
tok_eof,
tok_identifier,
tok_comma,
token_t lex PARAMS ((void));
-int parse_percent_token PARAMS ((void));
+token_t parse_percent_token PARAMS ((void));
#endif /* !LEX_H_ */
#endif
graph.display_edge_labels = yes;
- graph.layoutalgorithm = 0;
+ graph.layoutalgorithm = normal;
graph.port_sharing = no;
graph.finetuning = yes;
static void
parse_token_decl (symbol_class what_is, symbol_class what_is_not)
{
- token_t token = 0;
- char *typename = 0;
+ token_t token = tok_undef;
+ char *typename = NULL;
/* The symbol being defined. */
struct bucket *symbol = NULL;
char buff[32];
int c;
int i;
-
+
c = skip_white_space ();
if (c != '"')
complain (_("invalid %s declaration"), from);
return NULL;
}
-
+
c = getc (finput);
for (i = 0; (c >= '!') && (c <= '~'); i++)
{
if ((c < '!') && (c > '~'))
break;
}
-
+
buff[i] = c;
c = getc (finput);
}
buff[i] = '\0';
-
+
if (c != '"')
{
ungetc (c, finput);
{
if (src_extension)
complain (_("multiple %%source_extension declarations"));
-
+
src_extension = parse_dquoted_param ("%source_extension");
}
index 2, green has index 3, etc.
Default is white for background and white or transparent for summary
nodes. */
- unsigned char color;
+ enum color_e color;
/* Textcolor.
need explainations ???
defalut is black for summary nodes. */
- unsigned char textcolor;
+ enum color_e textcolor;
/* Bordercolor is the color of the summary node's border. Default color
is the textcolor. width, height are width and height of the
displayed part of the window of the outermost graph in pixels, or
width and height of the summary node of inner subgraphs.
Default is the defalut of the textcolor. */
- unsigned char bordercolor;
+ enum color_e bordercolor;
/* Width, height are width and height of the displayed part of the
window of the outermost graph in pixels, or width and height of the