diff options
author | gdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-06-06 20:11:40 +0000 |
---|---|---|
committer | gdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-06-06 20:11:40 +0000 |
commit | 990339ddd1d110fcbd9b738dd6b4f9dbd8f2f7aa (patch) | |
tree | 426d57102b49f5aa4ea84d91a2b883687998bed2 /gcc/diagnostic.h | |
parent | 66ccab27df40e3b083daba6f69dbb71fa936f713 (diff) | |
download | gcc-990339ddd1d110fcbd9b738dd6b4f9dbd8f2f7aa.tar.gz |
2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
* diagnostic.c (output_maximum_width): Remove.
(doing_line_wrapping): Tweak.
(diagnostic_buffer): New object.
(global_output_buffer): New object.
(output_destroy_prefix): New function.
(default_initialize_buffer): Likewise.
(reshape_diagnostic_buffer): Likewise.
(initialize_diagnostics): Likewise.
(output_clear): Tweak.
(line_wrapper_printf): Adjust call to init_output_buffer.
(vline_wrapper_message_with_location): Likewise. Use
output_destroy_prefix.
(v_message_with_decl): Likewise.
* diagnostic.h (struct output_buffer): Constify prefix.
(init_output_buffer, output_get_prefix): Constify.
(diagnostic_message_length_per_line): Likewise.
(reshape_diagnostic_buffer): Declare.
(default_initialize_buffer): Declare.
(initialize_diagnostics): Declare.
(diagnostic_buffer): Declare new obbject.
* toplev.c: #include diagnostic.h
(display_help): Document diagnostic formatting options.
(decode_f_option): Handle diagnostic formatting options.
(main): Setup initialization for diagnostic messages outputter.
* toplev.h (set_message_length): Remove.
* Makefile.in (toplev.o): Depends upon diagnostic.h
* invoke.texi : Document diagnostics formatting options.
cp/
2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
* lex.c (lang_init_options): Tweak.
* decl2.c: Remove #inclusion of diagnostic.h
(lang_decode_option): Move diagnostic formatting options to
toplevel.
* lang-options.h: Remove documentation for diagnostic options.
* Makefile.in (lex.o): Depends upon diagnostic.h
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34435 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/diagnostic.h')
-rw-r--r-- | gcc/diagnostic.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h index 38edfc9c3db..e8a2d67af90 100644 --- a/gcc/diagnostic.h +++ b/gcc/diagnostic.h @@ -44,7 +44,7 @@ struct output_buffer /* The obstack where the text is built up. */ struct obstack obstack; /* The prefix for each new line. */ - char *prefix; + const char *prefix; /* The amount of characters output so far. */ int line_length; /* The real upper bound of number of characters per line, taking into @@ -83,11 +83,24 @@ struct output_buffer extern printer_fn lang_printer; +extern int diagnostic_message_length_per_line; + +/* This output buffer is used by front-ends that directly output + diagnostic messages without going through `error', `warning', + and simillar functions. In general, such usage should be + avoided. This global buffer will go away, once all such usage + has been removed. */ +extern output_buffer *diagnostic_buffer; + /* Prototypes */ -void init_output_buffer PARAMS ((output_buffer *, char *, int)); +void initialize_diagnostics PARAMS ((void)); +void reshape_diagnostic_buffer PARAMS ((void)); +void default_initialize_buffer PARAMS ((output_buffer *)); +void init_output_buffer PARAMS ((output_buffer *, const char *, int)); void output_clear PARAMS ((output_buffer *)); -char *output_get_prefix PARAMS ((const output_buffer *)); -void output_set_prefix PARAMS ((output_buffer *, char *)); +const char *output_get_prefix PARAMS ((const output_buffer *)); +void output_set_prefix PARAMS ((output_buffer *, const char *)); +void output_destroy_prefix PARAMS ((output_buffer *)); void output_set_maximum_length PARAMS ((output_buffer *, int)); void output_emit_prefix PARAMS ((output_buffer *)); void output_add_newline PARAMS ((output_buffer *)); |