bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fix bugs I introduced when integrating Bison XML patches


From: Paul Eggert
Subject: fix bugs I introduced when integrating Bison XML patches
Date: Sun, 23 Sep 2007 23:37:14 -0700
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

I installed this:

2007-09-23  Paul Eggert  <address@hidden>

        * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
        Problem reported by Wojciech Polak.
        * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
        (xml_printf): Undo change I made on 21 September; that is,
        indent 2 spaces, not 1.

Index: src/conflicts.c
===================================================================
RCS file: /cvsroot/bison/bison/src/conflicts.c,v
retrieving revision 1.122
diff -u -p -r1.122 conflicts.c
--- src/conflicts.c     21 Sep 2007 22:53:57 -0000      1.122
+++ src/conflicts.c     24 Sep 2007 06:34:40 -0000
@@ -145,7 +145,7 @@ log_resolution (rule *r, symbol_number t
            case shift_resolution:
            case right_resolution:
              obstack_fgrow2 (&solved_conflicts_xml_obstack,
-                             "<resolution rule=\"%d\" symbol=\"%s\""
+                             "        <resolution rule=\"%d\" symbol=\"%s\""
                              " type=\"shift\">",
                              r->number,
                              xml_escape (symbols[token]->tag));
@@ -154,7 +154,7 @@ log_resolution (rule *r, symbol_number t
            case reduce_resolution:
            case left_resolution:
              obstack_fgrow2 (&solved_conflicts_xml_obstack,
-                             "<resolution rule=\"%d\" symbol=\"%s\""
+                             "        <resolution rule=\"%d\" symbol=\"%s\""
                              " type=\"reduce\">",
                              r->number,
                              xml_escape (symbols[token]->tag));
@@ -162,7 +162,7 @@ log_resolution (rule *r, symbol_number t

            case nonassoc_resolution:
              obstack_fgrow2 (&solved_conflicts_xml_obstack,
-                             "<resolution rule=\"%d\" symbol=\"%s\""
+                             "        <resolution rule=\"%d\" symbol=\"%s\""
                              " type=\"error\">",
                              r->number,
                              xml_escape (symbols[token]->tag));
Index: src/print-xml.c
===================================================================
RCS file: /cvsroot/bison/bison/src/print-xml.c,v
retrieving revision 1.2
diff -u -p -r1.2 print-xml.c
--- src/print-xml.c     24 Sep 2007 01:41:35 -0000      1.2
+++ src/print-xml.c     24 Sep 2007 06:34:40 -0000
@@ -494,9 +494,8 @@ void
 xml_puts (FILE *out, int level, char const *s)
 {
   int i;
-  level *= 2;
   for (i = 0; i < level; i++)
-    fputc (' ', out);
+    fputs ("  ", out);
   fputs (s, out);
   fputc ('\n', out);
 }
@@ -508,7 +507,7 @@ xml_printf (FILE *out, int level, char c
   va_list arglist;

   for (i = 0; i < level; i++)
-    fputc (' ', out);
+    fputs ("  ", out);

   va_start (arglist, fmt);
   vfprintf (out, fmt, arglist);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]