From 956dba3a7c0e15bd356d025c0393b807ec72bd31 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Wed, 20 Dec 2000 12:41:52 +0000 Subject: [PATCH] * src/files.c (open_files): Fix the computation of short_base_name in the case of `-o foo.tab.c'. --- .cvsignore | 7 ++++--- ChangeLog | 5 +++++ src/files.c | 4 ++-- tests/.cvsignore | 8 +++++--- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.cvsignore b/.cvsignore index 2ad4fc8d..2b19aa56 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,10 +1,11 @@ -Makefile -Makefile.in +configure +Makefile Makefile.in aclocal.m4 config.cache -config.h +config.h config.hin config.log config.status intl stamp-h bison-*.tar.gz +patches update-log diff --git a/ChangeLog b/ChangeLog index 5780eb18..091c26ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-12-20 Akim Demaille + + * src/files.c (open_files): Fix the computation of short_base_name + in the case of `-o foo.tab.c'. + 2000-12-20 Akim Demaille * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at) diff --git a/src/files.c b/src/files.c index 24a17fa6..2e65c5ae 100644 --- a/src/files.c +++ b/src/files.c @@ -185,11 +185,11 @@ compute_base_names (void) base_length = strlen (spec_outfile); if (strsuffix (spec_outfile, ".c")) base_length -= 2; + base_name = strndup (spec_outfile, base_length); /* SHORT_BASE_LENGTH includes neither ".tab" nor ".c". */ short_base_length = base_length; - if (strsuffix (spec_outfile, ".tab") || strsuffix (spec_outfile, "_tab")) + if (strsuffix (base_name, ".tab") || strsuffix (base_name, "_tab")) short_base_length -= 4; - base_name = strndup (spec_outfile, base_length); short_base_name = strndup (spec_outfile, short_base_length); return; diff --git a/tests/.cvsignore b/tests/.cvsignore index 3124e01e..1c394283 100644 --- a/tests/.cvsignore +++ b/tests/.cvsignore @@ -1,6 +1,7 @@ Makefile -at-check-line -at-setup-line +Makefile.in +at-* +debug-* atconfig empty experr @@ -8,5 +9,6 @@ expout stderr stdout testsuite -calc.[ch] +calc.[chy] +calc.c.* calc -- 2.47.2