mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 05:43:03 +00:00
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:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user