]> git.saurik.com Git - bison.git/commitdiff
* src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 24 Sep 2007 06:34:44 +0000 (06:34 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 24 Sep 2007 06:34:44 +0000 (06:34 +0000)
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.

ChangeLog
src/conflicts.c
src/print-xml.c

index b381e502c3980e314651a814e9a66b7c702416e8..3a0284dfbf73b1cffb76a4aca5c181558dd7c090 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-09-23  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * 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.
+
 2007-09-23  Joel E. Denny  <jdenny@ces.clemson.edu>
 
        Pacify ./configure --enable-gcc-warnings.
index 3a8edba4529dcd9b120f0148134825970a8cc0c6..0f1f92980fbf421a24f5594d21d2ef85fbe11ec7 100644 (file)
@@ -145,7 +145,7 @@ log_resolution (rule *r, symbol_number token,
            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 token,
            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 token,
 
            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 cde23665329e1c4a687f2bc8a74d62234a6f7416..acc481ce53c1ed6b5219c2876003912bac075af0 100644 (file)
@@ -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 const *fmt, ...)
   va_list arglist;
 
   for (i = 0; i < level; i++)
-    fputc (' ', out);
+    fputs ("  ", out);
 
   va_start (arglist, fmt);
   vfprintf (out, fmt, arglist);