]> git.saurik.com Git - bison.git/commitdiff
* src/files.c (open_files): Fix the computation of short_base_name
authorAkim Demaille <akim@epita.fr>
Wed, 20 Dec 2000 12:41:52 +0000 (12:41 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 20 Dec 2000 12:41:52 +0000 (12:41 +0000)
in the case of `-o foo.tab.c'.

.cvsignore
ChangeLog
src/files.c
tests/.cvsignore

index 2ad4fc8d3a1eebbfb767d8f3d36951e6c9efb608..2b19aa56feb255e2029d904a8dba614ffc5c7a6b 100644 (file)
@@ -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
index 5780eb181fe6ca8710945a614c3f25d8d3422367..091c26aee4aed5ec9282078e6b541d14838dbd9c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-12-20  Akim Demaille  <akim@epita.fr>
+
+       * 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  <akim@epita.fr>
 
        * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
index 24a17fa62e72ee2121f7d3e766219747df55e081..2e65c5ae3526e832b7715736c18370a8c3108695 100644 (file)
@@ -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;
index 3124e01e4ffd3f2a3c1c833acbf2a126c8c903e4..1c394283de7d405442546b87fc994a1758d7f35d 100644 (file)
@@ -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