diagnostics: clean up convention for colored diagnostics

* data/diagnostics.css: Rename as...
* data/bison-default.css: this.
Add the GPL header.
This is the convention followed by Bruno Haible in gettext.
Adjust dependencies.
* src/complain.c (complain_init_color): Use BISON_STYLE instead of
BISON_DIAGNOSTICS_STYLE.
This commit is contained in:
Akim Demaille
2019-05-18 09:21:03 +02:00
parent a1a847bfb5
commit cae8132690
5 changed files with 36 additions and 22 deletions

View File

@@ -255,14 +255,13 @@ complain_init_color (void)
|| color_mode == color_html
|| (color_mode == color_tty && isatty (STDERR_FILENO)))
{
style_file_prepare ("BISON_DIAGNOSTICS_STYLE", NULL,
pkgdatadir (),
"diagnostics.css");
style_file_prepare ("BISON_STYLE", NULL, pkgdatadir (),
"bison-default.css");
/* As a fallback, use the default in the current directory. */
struct stat statbuf;
if ((style_file_name == NULL || stat (style_file_name, &statbuf) < 0)
&& stat ("diagnostics.css", &statbuf) == 0)
style_file_name = "diagnostics.css";
&& stat ("bison-default.css", &statbuf) == 0)
style_file_name = "bison-default.css";
}
else
/* No styling. */