summaryrefslogtreecommitdiffstats
path: root/bin/stty/key.c
diff options
context:
space:
mode:
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 ba33a81..9aed9a1 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
OpenPOWER on IntegriCloud