<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From c8e57e81594dd9d8333e221fe64cf00e82213b30 Mon Sep 17 00:00:00 2001
From: Akim Demaille &lt;akim.demaille@gmail.com&gt;
Date: Sun, 19 May 2019 18:14:21 +0200
Subject: [PATCH] diagnostics: don't crash when libtextstyle is installed

Reported by neok m4700.
https://lists.gnu.org/archive/html/bison-patches/2019-05/msg00025.html
https://github.com/akimd/bison/pull/11

* src/complain.c (complain_init_color): style_file_prepare _needs_ a
string as second argument.
---
 THANKS         | 1 +
 src/complain.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/THANKS b/THANKS
index 50b33f48d..07355b23 100644
--- a/THANKS
+++ b/THANKS
@@ -118,6 +118,7 @@ Mike Sullivan             Mike.sullivan@Oracle.COM
 Nate Guerin               nathan.guerin@riseup.net
 Neil Booth                NeilB@earthling.net
 Nelson H. F. Beebe        beebe@math.utah.edu
+neok m4700                neok.m4700@gmail.com
 Nick Bowler               nbowler@elliptictech.com
 Nicolas Bedon             nicolas.bedon@univ-rouen.fr
 Nicolas Burrus            nicolas.burrus@epita.fr
diff --git a/src/complain.c b/src/complain.c
index cd5ee19c..19c03cc3 100644
--- a/src/complain.c
+++ b/src/complain.c
@@ -255,7 +255,7 @@ complain_init_color (void)
       || color_mode == color_html
       || (color_mode == color_tty &amp;&amp; isatty (STDERR_FILENO)))
     {
-      style_file_prepare ("BISON_STYLE", NULL, pkgdatadir (),
+      style_file_prepare ("BISON_STYLE", "BISON_STYLEDIR", pkgdatadir (),
                           "bison-default.css");
       /* As a fallback, use the default in the current directory.  */
       struct stat statbuf;
</pre></body></html>