* 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.
This commit is contained in:
Paul Eggert
2007-09-24 06:34:44 +00:00
parent ad5feac4e2
commit a4f75309f2
3 changed files with 13 additions and 6 deletions

View File

@@ -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.

View 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));

View 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);