diff options
author | Jakub Jelinek <jakub@redhat.com> | 2013-04-26 08:54:54 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2013-04-26 08:54:54 +0200 |
commit | e78e8a0b19f9becc90a0bcb4684fb83eae10533f (patch) | |
tree | 445f8e0a123deaa48447d0f3140806f626a413a0 /gcc/diagnostic.c | |
parent | 013e5ef956c191f9f6748615b22b78653a5e762a (diff) | |
download | gcc-e78e8a0b19f9becc90a0bcb4684fb83eae10533f.zip gcc-e78e8a0b19f9becc90a0bcb4684fb83eae10533f.tar.gz gcc-e78e8a0b19f9becc90a0bcb4684fb83eae10533f.tar.bz2 |
diagnostic.h (file_name_as_prefix): Add context argument.
* diagnostic.h (file_name_as_prefix): Add context argument.
* diagnostic.c (file_name_as_prefix): Likewise. Colorize
the string as locus.
* langhooks.c (lhd_print_error_function): Adjust caller.
cp/
* error.c (cp_print_error_function): Adjust file_name_as_prefix
caller.
From-SVN: r198331
Diffstat (limited to 'gcc/diagnostic.c')
-rw-r--r-- | gcc/diagnostic.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index e454cf3..f9a236b 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -72,9 +72,12 @@ build_message_string (const char *msg, ...) /* Same as diagnostic_build_prefix, but only the source FILE is given. */ char * -file_name_as_prefix (const char *f) +file_name_as_prefix (diagnostic_context *context, const char *f) { - return build_message_string ("%s: ", f); + const char *locus_cs + = colorize_start (pp_show_color (context->printer), "locus"); + const char *locus_ce = colorize_stop (pp_show_color (context->printer)); + return build_message_string ("%s%s:%s ", locus_cs, f, locus_ce); } |