From a4f75309f2e467a701ebd8bfb0faf79c011226a6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 24 Sep 2007 06:34:44 +0000 Subject: [PATCH] * 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. --- ChangeLog | 8 ++++++++ src/conflicts.c | 6 +++--- src/print-xml.c | 5 ++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index b381e502..3a0284df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-09-23 Paul Eggert + + * 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 Pacify ./configure --enable-gcc-warnings. diff --git a/src/conflicts.c b/src/conflicts.c index 3a8edba4..0f1f9298 100644 --- a/src/conflicts.c +++ b/src/conflicts.c @@ -145,7 +145,7 @@ log_resolution (rule *r, symbol_number token, case shift_resolution: case right_resolution: obstack_fgrow2 (&solved_conflicts_xml_obstack, - "", 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, - "", 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, - "", r->number, xml_escape (symbols[token]->tag)); diff --git a/src/print-xml.c b/src/print-xml.c index cde23665..acc481ce 100644 --- a/src/print-xml.c +++ b/src/print-xml.c @@ -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); -- 2.45.2