add a macro to ease conditional testing based on active window port

Add WINDOWPORT macro

example:
if (WINDOWPORT("tty"))
	pline("Look at me, I'm on tty at the moment!");
This commit is contained in:
nhmall
2018-12-02 09:56:44 -05:00
parent 38b31dd9ca
commit 4a4b3fb8f1
10 changed files with 35 additions and 27 deletions
+2 -2
View File
@@ -198,7 +198,7 @@ getlock()
#ifndef SELF_RECOVER
if (eraseoldlocks()) {
#if defined(WIN32) && defined(TTY_GRAPHICS)
if (!strncmpi(windowprocs.name, "tty", 3))
if (WINDOWPORT("tty"))
clear_screen(); /* display gets fouled up otherwise */
#endif
goto gotlock;
@@ -212,7 +212,7 @@ getlock()
#else /*SELF_RECOVER*/
if (recover_savefile()) {
#if defined(WIN32) && defined(TTY_GRAPHICS)
if (!strncmpi(windowprocs.name, "tty", 3))
if (WINDOWPORT("tty"))
clear_screen(); /* display gets fouled up otherwise */
#endif
goto gotlock;