* src/files.c (compute_base_names): When computing the output file

names from the input file name, strip the directory part.
This commit is contained in:
Akim Demaille
2002-06-18 12:39:54 +00:00
parent ca98bf5758
commit 8c165d891d
4 changed files with 13 additions and 74 deletions

View File

@@ -384,11 +384,11 @@ compute_base_names (void)
else
{
/* Otherwise, the short base name is computed from the input
grammar: `foo.yy' => `foo'. */
grammar: `foo/bar.yy' => `bar'. */
filename_split (infile, &base, &tab, &ext);
short_base_name =
xstrndup (infile,
(strlen (infile) - (ext ? strlen (ext) : 0)));
xstrndup (base,
(strlen (base) - (ext ? strlen (ext) : 0)));
}
/* In these cases, always append `.tab'. */