summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2000-02-27 17:30:41 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2000-02-27 17:30:41 +0000
commit4a611e417604c98955460ceb9293c866488ed8be (patch)
tree3e7f874dc6836feb8e410b42f08dfd78977d7646
parent48aa4a9dbeb8d5bc73b3f5fe21f0b38097adc9d6 (diff)
make this compile on systems w/o TCSASOFT
-rw-r--r--usr.bin/mg/ttyio.c14
1 files changed, 14 insertions, 0 deletions
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;
}