From: Bruno Haible Date: Mon, 13 Feb 2023 22:05:20 +0000 (+0100) Subject: libtextstyle: Turn off hyperlinks on the Solaris console. X-Git-Tag: v0.22~150 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=12cf1769cad8a1cf6dd4a04f7cc6174da148aa39;p=thirdparty%2Fgettext.git libtextstyle: Turn off hyperlinks on the Solaris console. The Solaris 11 console prints garbage when a hyperlink is output. Tested on Solaris 11.4/x86 and Solaris 11 OmniOS/x86. * libtextstyle/gnulib-local/lib/term-ostream.oo.c (should_enable_hyperlinks): Return false for the Solaris console. --- diff --git a/libtextstyle/gnulib-local/lib/term-ostream.oo.c b/libtextstyle/gnulib-local/lib/term-ostream.oo.c index 33f46509d..99d7c7e4d 100644 --- a/libtextstyle/gnulib-local/lib/term-ostream.oo.c +++ b/libtextstyle/gnulib-local/lib/term-ostream.oo.c @@ -1,5 +1,5 @@ /* Output stream for attributed text, producing ANSI escape sequences. - Copyright (C) 2006-2008, 2017, 2019-2020, 2022 Free Software Foundation, Inc. + Copyright (C) 2006-2008, 2017, 2019-2020, 2022-2023 Free Software Foundation, Inc. Written by Bruno Haible , 2006. This program is free software: you can redistribute it and/or modify @@ -2354,6 +2354,15 @@ should_enable_hyperlinks (const char *term) return !known_buggy; } } + + /* Solaris console. + Program | TERM | Supports hyperlinks? + -----------------------------------+-----------+--------------------------- + Solaris kernel's terminal emulator | sun-color | produces garbage + SPARC PROM's terminal emulator | sun | ? + */ + if (strcmp (term, "sun") == 0 || strcmp (term, "sun-color") == 0) + return false; } /* In case of doubt, enable hyperlinks. So this code does not need to change