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 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.
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));
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));
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));
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);
}
va_list arglist;
for (i = 0; i < level; i++)
- fputc (' ', out);
+ fputs (" ", out);
va_start (arglist, fmt);
vfprintf (out, fmt, arglist);