1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
--- a/file.c
+++ b/file.c
@@ -368,6 +368,7 @@
return 0;
}
+#ifdef TIOCSTAT
static int
cl_status(struct cmdline *cl, int c)
{
@@ -377,6 +378,7 @@
return 0;
}
+#endif
const struct termios *
setup_tty(int on)
@@ -763,7 +765,9 @@
{ cl_literal, VLNEXT },
{ cl_recognize, VEOL },
{ cl_reprint, VREPRINT },
+#ifdef TIOCSTAT
{ cl_status, VSTATUS },
+#endif
{ cl_insert, -1 }
};
unsigned char buf[BUFSIZ];
@@ -784,8 +788,10 @@
cl.size = sizeof(buf);
if (inputline_size < cl.size)
cl.size = inputline_size;
+#ifdef ALTWERASE
if (cl.istty && tio->c_lflag & ALTWERASE)
- cl.flags |= CL_ALTWERASE;
+ cl.flags |= CL_ALTWERASE;
+#endif
if (needprompt) {
needprompt = 0;
cl.flags |= CL_PROMPT;
|