]> git.saurik.com Git - bison.git/commitdiff
Use YYFPRINTF instead of fprintf where appropriate. Reported by
authorJoel E. Denny <jdenny@ces.clemson.edu>
Sat, 24 Feb 2007 05:43:35 +0000 (05:43 +0000)
committerJoel E. Denny <jdenny@ces.clemson.edu>
Sat, 24 Feb 2007 05:43:35 +0000 (05:43 +0000)
Sébastien Fricker at
<http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
* THANKS: Add Sébastien Fricker.
* data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
* doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
accept a variable number of arguments.

ChangeLog
THANKS
data/glr.c
data/push.c
data/yacc.c
doc/bison.texinfo

index b956d3794b1e5601371e42bea6be43d04ae56fe5..8f659f6b2598c62222e4559f3e00b6dafe4a1b0d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2007-02-24  Joel E. Denny  <jdenny@ces.clemson.edu>
+
+       Use YYFPRINTF instead of fprintf where appropriate.  Reported by
+       Sébastien Fricker at
+       <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
+       * THANKS: Add Sébastien Fricker.
+       * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
+       * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
+       accept a variable number of arguments.
+
 2007-02-19  Joel E. Denny  <jdenny@ces.clemson.edu>
 
        * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
diff --git a/THANKS b/THANKS
index 058b1037ef4382ddf2eee35f0b60d3a9fe32a411..a5a4a5a0fa397249f297446e1974a9b0073b0463 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -70,6 +70,7 @@ Raja R Harinath           harinath@cs.umn.edu
 Richard Stallman          rms@gnu.org
 Robert Anisko             anisko_r@epita.fr
 Satya Kiran Popuri        satyakiran@gmail.com
+Sébastien Fricker         sebastien.fricker@gmail.com
 Shura                     debil_urod@ngs.ru
 Steve Murphy              murf@parsetree.com
 Tim Josling               tej@melbpc.org.au
index 5a40a3133b36c84230d099788659fe7759757ecc..681d856f05ba4c975cc8cf27548fb6056c6fb638 100644 (file)
@@ -1442,12 +1442,12 @@ yy_reduce_print (yyGLRStack* yystackp, size_t yyk, yyRuleNum yyrule,
   /* The symbols being reduced.  */
   for (yyi = 0; yyi < yynrhs; yyi++)
     {
-      fprintf (stderr, "   $%d = ", yyi + 1);
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
                       &]b4_rhs_value(yynrhs, yyi + 1)[
                       ]b4_locations_if([, &]b4_rhs_location(yynrhs, yyi + 1))[]dnl
                       b4_user_args[);
-      fprintf (stderr, "\n");
+      YYFPRINTF (stderr, "\n");
     }
 }
 #endif
index 057e2e7080a19f3863f341e14f1bf8f7d2681e27..ee9aa671432318e15ffedda98fbf5ce642845360 100644 (file)
@@ -750,12 +750,12 @@ do {                                                              \
   /* The symbols being reduced.  */
   for (yyi = 0; yyi < yynrhs; yyi++)
     {
-      fprintf (stderr, "   $%d = ", yyi + 1);
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
                       &]b4_rhs_value(yynrhs, yyi + 1)[
                       ]b4_locations_if([, &]b4_rhs_location(yynrhs, yyi + 1))[]dnl
                       b4_user_args[);
-      fprintf (stderr, "\n");
+      YYFPRINTF (stderr, "\n");
     }
 }
 
index 3f5ef7203659ddf1787e33a8dbe98be9f9d39a74..4ec1f4a1d706203b2b33b0e24eb81c37249286fa 100644 (file)
@@ -714,12 +714,12 @@ do {                                                              \
   /* The symbols being reduced.  */
   for (yyi = 0; yyi < yynrhs; yyi++)
     {
-      fprintf (stderr, "   $%d = ", yyi + 1);
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
                       &]b4_rhs_value(yynrhs, yyi + 1)[
                       ]b4_locations_if([, &]b4_rhs_location(yynrhs, yyi + 1))[]dnl
                       b4_user_args[);
-      fprintf (stderr, "\n");
+      YYFPRINTF (stderr, "\n");
     }
 }
 
index 03ed7f734e12b0258514fb0f36022b0370209cdf..c39c325b7519f9baabd1b89b5a596c45e53540dd 100644 (file)
@@ -7236,7 +7236,7 @@ always possible.
 
 The trace facility outputs messages with macro calls of the form
 @code{YYFPRINTF (stderr, @var{format}, @var{args})} where
-@var{format} and @var{args} are the usual @code{printf} format and
+@var{format} and @var{args} are the usual @code{printf} format and variadic
 arguments.  If you define @code{YYDEBUG} to a nonzero value but do not
 define @code{YYFPRINTF}, @code{<stdio.h>} is automatically included
 and @code{YYFPRINTF} is defined to @code{fprintf}.