some tty updates
Add a note about NO_TERMS to include/wintty.h for clarity. Rename tty_startup and tty_shutdown to term_startup() and term_shutdown(). They are found in termcap.c for !NO_TERMS like most of the other term_ routines, as well as having versions for several of the NO_TERMS platforms. They aren't part of the tty_interface called from the core. The tty implementation does call and rely on them. Remove some conditional #ifdef's around term_shutdown() (formerly tty_shutdown()) and just ensure that all the tty platforms have an implementation that they can link with, even if it is just a stub presently. Put the protype for nethack_exit in extern.h to reduce maintenance to a single spot, and remove it from other locations. A warning in the msdos cross-compile led to this change.
This commit is contained in:
+8
-2
@@ -78,7 +78,7 @@ static char tgotobuf[20];
|
||||
static char tty_standout_on[16], tty_standout_off[16];
|
||||
|
||||
void
|
||||
tty_startup(int *wid, int *hgt)
|
||||
term_startup(int *wid, int *hgt)
|
||||
{
|
||||
#ifdef TERMLIB
|
||||
const char *term;
|
||||
@@ -336,7 +336,7 @@ tty_startup(int *wid, int *hgt)
|
||||
*/
|
||||
/* deallocate resources prior to final termination */
|
||||
void
|
||||
tty_shutdown(void)
|
||||
term_shutdown(void)
|
||||
{
|
||||
/* we only attempt to clean up a few individual termcap variables */
|
||||
#if defined(TERMLIB) || defined(ANSI_DEFAULT)
|
||||
@@ -1494,10 +1494,16 @@ term_start_bgcolor(int color)
|
||||
void
|
||||
term_curs_set(int visibility)
|
||||
{
|
||||
static int vis = -1;
|
||||
|
||||
if (vis == visibility)
|
||||
return;
|
||||
|
||||
if (!visibility && nh_VI)
|
||||
xputs(nh_VI);
|
||||
else if (visibility && nh_VE)
|
||||
xputs(nh_VE);
|
||||
vis = visibility;
|
||||
}
|
||||
|
||||
#ifdef CHANGE_COLOR
|
||||
|
||||
Reference in New Issue
Block a user