aboutsummaryrefslogtreecommitdiff
path: root/ncurses/tinfo/tinfo_driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'ncurses/tinfo/tinfo_driver.c')
-rw-r--r--ncurses/tinfo/tinfo_driver.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/ncurses/tinfo/tinfo_driver.c b/ncurses/tinfo/tinfo_driver.c
index c28d76415549..fd993b820381 100644
--- a/ncurses/tinfo/tinfo_driver.c
+++ b/ncurses/tinfo/tinfo_driver.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright 2018-2019,2020 Thomas E. Dickey *
+ * Copyright 2018-2022,2023 Thomas E. Dickey *
* Copyright 2008-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@@ -52,7 +52,7 @@
# endif
#endif
-MODULE_ID("$Id: tinfo_driver.c,v 1.71 2020/12/12 01:06:40 tom Exp $")
+MODULE_ID("$Id: tinfo_driver.c,v 1.74 2023/09/16 10:44:33 tom Exp $")
/*
* SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS,
@@ -206,8 +206,8 @@ drv_CanHandle(TERMINAL_CONTROL_BLOCK * TCB, const char *tname, int *errret)
save_ttytype(termp);
#endif
- if (command_character)
- _nc_tinfo_cmdch(termp, *command_character);
+ if (VALID_STRING(command_character))
+ _nc_tinfo_cmdch(termp, UChar(*command_character));
/*
* If an application calls setupterm() rather than initscr() or
@@ -1282,10 +1282,7 @@ drv_read(TERMINAL_CONTROL_BLOCK * TCB, int *buf)
assert(buf);
SetSP();
-# if USE_PTHREADS_EINTR
- if ((pthread_self) && (pthread_kill) && (pthread_equal))
- _nc_globals.read_thread = pthread_self();
-# endif
+ _nc_set_read_thread(TRUE);
#ifdef EXP_WIN32_DRIVER
n = _nc_console_read(sp,
_nc_console_handle(sp->_ifd),
@@ -1293,9 +1290,7 @@ drv_read(TERMINAL_CONTROL_BLOCK * TCB, int *buf)
#else
n = (int) read(sp->_ifd, &c2, (size_t) 1);
#endif
-#if USE_PTHREADS_EINTR
- _nc_globals.read_thread = 0;
-#endif
+ _nc_set_read_thread(FALSE);
#ifndef EXP_WIN32_DRIVER
*buf = (int) c2;
#endif
@@ -1532,7 +1527,7 @@ _nc_get_driver(TERMINAL_CONTROL_BLOCK * TCB, const char *name, int *errret)
res = DriverTable[i].driver;
#ifdef _NC_WINDOWS
if ((i + 1) == SIZEOF(DriverTable)) {
- /* For Windows >= 10.0.17763 Windows Console interface implements
+ /* For Windows >= 10.0.17763 Windows Console interface implements
virtual Terminal functionality.
If on Windows td_CanHandle returned FALSE although the terminal
name is empty, we default to ms-terminal as tinfo TERM type.