diagnostic.c (init_output_buffer): Make it possible to output at least 32 characters if we're given a too long prefix.

2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>

        * diagnostic.c (init_output_buffer): Make it possible to output at
        least 32 characters if we're given a too long prefix.

From-SVN: r32091
This commit is contained in:
Gabriel Dos Reis 2000-02-21 20:17:41 +00:00 committed by Gabriel Dos Reis
parent cb9a3ff816
commit abcabbbf3e
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
* diagnostic.c (init_output_buffer): Make it possible to output at
least 32 characters if we're given a too long prefix.
2000-02-20 Mark Mitchell <mark@codesourcery.com>
* varasm.c (initializer_constant_valid_p): Call

View File

@ -152,10 +152,17 @@ init_output_buffer (buffer, prefix, max_length)
char *prefix;
int max_length;
{
int prefix_length = strlen (prefix);
obstack_init (&buffer->obstack);
buffer->prefix = prefix;
buffer->line_length = 0;
buffer->max_length = max_length;
/* If the prefix is ridiculously too long, output at least
32 characters. */
if (max_length - prefix_length < 32)
buffer->max_length = max_length + 32;
else
buffer->max_length = max_length;
}
/* Return BUFFER's prefix. */