Commit 255fcfbb by Gabriel Dos Reis Committed by Gabriel Dos Reis

diagnostic.c (digit_buffer): Remove as global.

	* diagnostic.c (digit_buffer): Remove as global.  Move to...
	* diagnostic.h (struct output_buffer): ... here.
	* diagnostic.c (output_formatted_integer): Adjust use of digit_buffer.

From-SVN: r43567
parent c0aa7221
2001-06-26 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
* diagnostic.c (digit_buffer): Remove as global. Move to...
* diagnostic.h (struct output_buffer): ... here.
* diagnostic.c (output_formatted_integer): Adjust use of digit_buffer.
2001-06-25 Steve Ellcey <sje@cup.hp.com> 2001-06-25 Steve Ellcey <sje@cup.hp.com>
* config.gcc (ia64*-*-hpux*): Add ia64/hpux_longdouble.h to tm_file. * config.gcc (ia64*-*-hpux*): Add ia64/hpux_longdouble.h to tm_file.
......
...@@ -44,8 +44,8 @@ Boston, MA 02111-1307, USA. */ ...@@ -44,8 +44,8 @@ Boston, MA 02111-1307, USA. */
#define output_formatted_integer(BUFFER, FORMAT, INTEGER) \ #define output_formatted_integer(BUFFER, FORMAT, INTEGER) \
do { \ do { \
sprintf (digit_buffer, FORMAT, INTEGER); \ sprintf ((BUFFER)->digit_buffer, FORMAT, INTEGER); \
output_add_string (BUFFER, digit_buffer); \ output_add_string (BUFFER, (BUFFER)->digit_buffer); \
} while (0) } while (0)
#define output_text_length(BUFFER) (BUFFER)->line_length #define output_text_length(BUFFER) (BUFFER)->line_length
...@@ -108,10 +108,6 @@ extern int warnings_are_errors; ...@@ -108,10 +108,6 @@ extern int warnings_are_errors;
/* Front-end specific tree formatter, if non-NULL. */ /* Front-end specific tree formatter, if non-NULL. */
printer_fn lang_printer = NULL; printer_fn lang_printer = NULL;
/* This must be large enough to hold any printed integer or
floating-point value. */
static char digit_buffer[128];
/* An output_buffer surrogate for stderr. */ /* An output_buffer surrogate for stderr. */
static output_buffer global_output_buffer; static output_buffer global_output_buffer;
output_buffer *diagnostic_buffer = &global_output_buffer; output_buffer *diagnostic_buffer = &global_output_buffer;
......
...@@ -108,6 +108,10 @@ struct output_buffer ...@@ -108,6 +108,10 @@ struct output_buffer
/* The amount of characters output so far. */ /* The amount of characters output so far. */
int line_length; int line_length;
/* This must be large enough to hold any printed integer or
floating-point value. */
char digit_buffer[128];
}; };
#define output_buffer_state(BUFFER) (BUFFER)->state #define output_buffer_state(BUFFER) (BUFFER)->state
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment