public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Assume "unknown" terminal type by default
@ 2020-06-02  3:52 Stephanos Ioannidis
  2020-06-02 15:22 ` Eli Zaretskii
  2020-06-15 14:07 ` Tom Tromey
  0 siblings, 2 replies; 5+ messages in thread
From: Stephanos Ioannidis @ 2020-06-02  3:52 UTC (permalink / raw)
  To: gdb-patches; +Cc: Stephanos Ioannidis

This patch modifies the `_rl_init_terminal_io` function to pass
`unknown` terminal type instead of `dumb` when no terminal name is
provided by the caller (e.g. when the `TERM` environment variable is
not set on Win32).

This ensures that the termcap provider (e.g. ncurses) resolves the
default preferred terminal type instead of using the `dumb` terminal
type.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
---
 readline/readline/terminal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/readline/readline/terminal.c b/readline/readline/terminal.c
index e557389776..086211d408 100644
--- a/readline/readline/terminal.c
+++ b/readline/readline/terminal.c
@@ -444,7 +444,7 @@ _rl_init_terminal_io (const char *terminal_name)
   tty = rl_instream ? fileno (rl_instream) : 0;
 
   if (term == 0)
-    term = "dumb";
+    term = "unknown";
 
 #ifdef __MSDOS__
   _rl_term_im = _rl_term_ei = _rl_term_ic = _rl_term_IC = (char *)NULL;
-- 
2.26.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-06-15 14:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-02  3:52 [PATCH] Assume "unknown" terminal type by default Stephanos Ioannidis
2020-06-02 15:22 ` Eli Zaretskii
2020-06-02 16:15   ` Stephanos Ioannidis
     [not found]   ` <SLXP216MB0285D95A8DA9B4C0AB87C6D8BD8B0@SLXP216MB0285.KORP216.PROD.OUTLOOK.COM>
2020-06-02 16:18     ` Eli Zaretskii
2020-06-15 14:07 ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).