From 4a611e417604c98955460ceb9293c866488ed8be Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sun, 27 Feb 2000 17:30:41 +0000 Subject: make this compile on systems w/o TCSASOFT --- usr.bin/mg/ttyio.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'usr.bin/mg/ttyio.c') diff --git a/usr.bin/mg/ttyio.c b/usr.bin/mg/ttyio.c index 5870d6cb901..236c26e274a 100644 --- a/usr.bin/mg/ttyio.c +++ b/usr.bin/mg/ttyio.c @@ -17,6 +17,10 @@ #define NOBUF 512 /* Output buffer size. */ +#ifndef TCSASOFT +#define TCSASOFT 0 +#endif + char obuf[NOBUF]; /* Output buffer. */ int nobuf; /* buffer count */ @@ -55,6 +59,16 @@ ttopen() nt.c_oflag &= ~OPOST; nt.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); +#if !TCSASOFT + /* + * If we don't have TCSASOFT, force terminal to + * 8 bits, no parity. + */ + nt.c_iflag &= ~ISTRIP; + nt.c_cflag &= ~(CSIZE|PARENB); + nt.c_cflag |= CS8; +#endif + ttysavedp = TRUE; } -- cgit v1.2.3