Commit 0deaa813 by Gabriel Dos Reis Committed by Gabriel Dos Reis

diagnostic.h (diagnostic_prefixing_rule_t): New enum type.

	* diagnostic.h (diagnostic_prefixing_rule_t): New enum type.
	(set_message_prefixing_rule): Adjust prototype.
	* diagnostic.c (current_prefixing_rule): Adjust type.

From-SVN: r43573
parent 4b76a1e3
2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
* diagnostic.h (diagnostic_prefixing_rule_t): New enum type.
(set_message_prefixing_rule): Adjust prototype.
* diagnostic.c (current_prefixing_rule): Adjust type.
2001-06-26 Neil Booth <neil@daikokuya.demon.co.uk> 2001-06-26 Neil Booth <neil@daikokuya.demon.co.uk>
* defaults.h: Default escape sequences to ASCII. * defaults.h: Default escape sequences to ASCII.
......
...@@ -137,7 +137,7 @@ int diagnostic_message_length_per_line; ...@@ -137,7 +137,7 @@ int diagnostic_message_length_per_line;
/* Used to control every diagnostic message formatting. Front-ends should /* Used to control every diagnostic message formatting. Front-ends should
call set_message_prefixing_rule to set up their policies. */ call set_message_prefixing_rule to set up their policies. */
static int current_prefixing_rule; static diagnostic_prefixing_rule_t current_prefixing_rule;
/* Prevent recursion into the error handler. */ /* Prevent recursion into the error handler. */
static int diagnostic_lock; static int diagnostic_lock;
...@@ -195,7 +195,7 @@ initialize_diagnostics () ...@@ -195,7 +195,7 @@ initialize_diagnostics ()
void void
set_message_prefixing_rule (rule) set_message_prefixing_rule (rule)
int rule; diagnostic_prefixing_rule_t rule;
{ {
current_prefixing_rule = rule; current_prefixing_rule = rule;
} }
......
...@@ -41,9 +41,17 @@ typedef enum ...@@ -41,9 +41,17 @@ typedef enum
#define pedantic_error_kind() (flag_pedantic_errors ? DK_ERROR : DK_WARNING) #define pedantic_error_kind() (flag_pedantic_errors ? DK_ERROR : DK_WARNING)
#define DIAGNOSTICS_SHOW_PREFIX_ONCE 0x0 /* How often diagnostics are prefixed by their locations:
#define DIAGNOSTICS_SHOW_PREFIX_NEVER 0x1 o DIAGNOSTICS_SHOW_PREFIX_NEVER: never - not yet supported;
#define DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE 0x2 o DIAGNOSTICS_SHOW_PREFIX_ONCE: emit only once;
o DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE: emit each time a physical
line is started. */
typedef enum
{
DIAGNOSTICS_SHOW_PREFIX_ONCE = 0x0,
DIAGNOSTICS_SHOW_PREFIX_NEVER = 0x1,
DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE = 0x2
} diagnostic_prefixing_rule_t;
/* The type of front-end specific hook that formats trees into an /* The type of front-end specific hook that formats trees into an
output_buffer. A language specific printer returns a truth value if output_buffer. A language specific printer returns a truth value if
...@@ -73,12 +81,8 @@ typedef struct ...@@ -73,12 +81,8 @@ typedef struct
/* Nonzero means one should emit a newline before outputing anything. */ /* Nonzero means one should emit a newline before outputing anything. */
int need_newline_p; int need_newline_p;
/* Tells how often current PREFIX should be emitted: /* Current prefixing rule. */
o DIAGNOSTICS_SHOW_PREFIX_NEVER: never - not yet supported; diagnostic_prefixing_rule_t prefixing_rule;
o DIAGNOSTICS_SHOW_PREFIX_ONCE: emit current PREFIX only once;
o DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE: emit current PREFIX each time
a physical line is started. */
int prefixing_rule;
/* The current char to output. Updated by front-end (*format_map) when /* The current char to output. Updated by front-end (*format_map) when
it is called to report front-end printer for a specified format. */ it is called to report front-end printer for a specified format. */
...@@ -246,7 +250,7 @@ extern void output_clear_message_text PARAMS ((output_buffer *)); ...@@ -246,7 +250,7 @@ extern void output_clear_message_text PARAMS ((output_buffer *));
extern void output_printf PARAMS ((output_buffer *, const char *, extern void output_printf PARAMS ((output_buffer *, const char *,
...)) ATTRIBUTE_PRINTF_2; ...)) ATTRIBUTE_PRINTF_2;
extern int output_is_line_wrapping PARAMS ((output_buffer *)); extern int output_is_line_wrapping PARAMS ((output_buffer *));
extern void set_message_prefixing_rule PARAMS ((int)); extern void set_message_prefixing_rule PARAMS ((diagnostic_prefixing_rule_t));
extern void output_verbatim PARAMS ((output_buffer *, const char *, extern void output_verbatim PARAMS ((output_buffer *, const char *,
...)) ATTRIBUTE_PRINTF_2; ...)) ATTRIBUTE_PRINTF_2;
extern void verbatim PARAMS ((const char *, ...)) extern void verbatim PARAMS ((const char *, ...))
......
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