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

View File

@@ -190,7 +190,7 @@ sanitize_name(namebuf)
char *namebuf;
{
int c;
boolean strip_8th_bit = (!strcmp(windowprocs.name, "tty")
boolean strip_8th_bit = (WINDOWPORT("tty")
&& !iflags.wc_eight_bit_input);
/* it's tempting to skip this for single-user platforms, since