X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/7333d403168b95318108cd572d228881c82ff341..20e8e5cadf2f68d6e90aff9f862023c1ad5f0960:/src/files.c?ds=inline diff --git a/src/files.c b/src/files.c index 4946477d..721f1e5e 100644 --- a/src/files.c +++ b/src/files.c @@ -1,5 +1,5 @@ /* Open and close files for bison, - Copyright 1984, 1986, 1989, 1992, 2000 Free Software Foundation, Inc. + Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -34,6 +34,7 @@ struct obstack table_obstack; struct obstack defines_obstack; struct obstack guard_obstack; struct obstack output_obstack; +struct obstack graph_obstack; char *spec_outfile = NULL; /* for -o. */ char *spec_file_prefix = NULL; /* for -b. */ @@ -213,7 +214,7 @@ compute_exts_from_gf(const char *ext) { src_extension = tr(ext, 'y', 'c'); src_extension = tr(src_extension, 'Y', 'C'); - } + } if (!header_extension) { header_extension = tr(ext, 'y', 'h'); @@ -228,7 +229,7 @@ compute_exts_from_src(const char *ext) if (!src_extension) src_extension = xstrdup(ext); if (!header_extension) - { + { header_extension = tr(ext, 'c', 'h'); header_extension = tr(header_extension, 'C', 'H'); } @@ -348,6 +349,7 @@ open_files (void) obstack_init (&defines_obstack); obstack_init (&guard_obstack); obstack_init (&output_obstack); + obstack_init (&graph_obstack); } @@ -406,4 +408,7 @@ output_files (void) /* We used to use just .out if spec_name_prefix (-p) was used, but that conflicts with Posix. */ obstack_save (&output_obstack, stringappend (short_base_name, EXT_OUTPUT)); + + if (graph_flag) + obstack_save (&graph_obstack, stringappend (short_base_name, ".vcg")); }