aboutsummaryrefslogtreecommitdiff
path: root/bin/stty/key.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2000-04-27 21:31:23 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2000-04-27 21:31:23 +0000
commitd0834e7f9dc7284bf4ba993f69fb9a836ee8ee99 (patch)
tree64e432893b0b3b846c313c9d88b7fad51506f77c /bin/stty/key.c
parentfc5361f9d8f993bcd1602158d87f2e9ec65d0627 (diff)
downloadsrc-d0834e7f9dc7284bf4ba993f69fb9a836ee8ee99.tar.gz
src-d0834e7f9dc7284bf4ba993f69fb9a836ee8ee99.zip
Add ability to manipulate with drain wait time
Notes
Notes: svn path=/head/; revision=59714
Diffstat (limited to 'bin/stty/key.c')
-rw-r--r--bin/stty/key.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/bin/stty/key.c b/bin/stty/key.c
index ba33a81c405f..9aed9a15e3bd 100644
--- a/bin/stty/key.c
+++ b/bin/stty/key.c
@@ -56,6 +56,7 @@ void f_all __P((struct info *));
void f_cbreak __P((struct info *));
void f_columns __P((struct info *));
void f_dec __P((struct info *));
+void f_drainwait __P((struct info *));
void f_everything __P((struct info *));
void f_extproc __P((struct info *));
void f_ispeed __P((struct info *));
@@ -82,6 +83,7 @@ static struct key {
{ "columns", f_columns, F_NEEDARG },
{ "cooked", f_sane, 0 },
{ "dec", f_dec, 0 },
+ { "drainwait", f_drainwait, F_NEEDARG },
{ "everything", f_everything, 0 },
{ "extproc", f_extproc, F_OFFOK },
{ "ispeed", f_ispeed, F_NEEDARG },
@@ -140,7 +142,7 @@ void
f_all(ip)
struct info *ip;
{
- print(&ip->t, &ip->win, ip->ldisc, BSD);
+ print(&ip->t, &ip->win, ip->ldisc, ip->timeout, BSD);
}
void
@@ -183,11 +185,20 @@ f_dec(ip)
}
void
+f_drainwait(ip)
+ struct info *ip;
+{
+
+ ip->timeout = atoi(ip->arg);
+ ip->tset = 1;
+}
+
+void
f_everything(ip)
struct info *ip;
{
- print(&ip->t, &ip->win, ip->ldisc, BSD);
+ print(&ip->t, &ip->win, ip->ldisc, ip->timeout, BSD);
}
void