summaryrefslogtreecommitdiffstats
path: root/bin/stty/gfmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/stty/gfmt.c')
-rw-r--r--bin/stty/gfmt.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/bin/stty/gfmt.c b/bin/stty/gfmt.c
index b34a117..38ee46f 100644
--- a/bin/stty/gfmt.c
+++ b/bin/stty/gfmt.c
@@ -59,10 +59,11 @@ gerr(s)
}
void
-gprint(tp, wp, ldisc)
+gprint(tp, wp, ldisc, timeout)
struct termios *tp;
struct winsize *wp;
int ldisc;
+ int timeout;
{
struct cchar *cp;
@@ -71,13 +72,14 @@ gprint(tp, wp, ldisc)
(u_long)tp->c_oflag);
for (cp = cchars1; cp->name; ++cp)
(void)printf("%s=%x:", cp->name, tp->c_cc[cp->sub]);
- (void)printf("ispeed=%lu:ospeed=%lu\n",
- (u_long)cfgetispeed(tp), (u_long)cfgetospeed(tp));
+ (void)printf("ispeed=%lu:ospeed=%lu:drainwait=%d\n",
+ (u_long)cfgetispeed(tp), (u_long)cfgetospeed(tp), timeout);
}
void
-gread(tp, s)
+gread(tp, top, s)
struct termios *tp;
+ int *top;
char *s;
{
struct cchar *cp;
@@ -122,6 +124,11 @@ gread(tp, s)
tp->c_ospeed = tmp;
continue;
}
+ if (CHK("drainwait")) {
+ (void)sscanf(ep, "%ld", &tmp);
+ *top = tmp;
+ continue;
+ }
for (cp = cchars1; cp->name != NULL; ++cp)
if (CHK(cp->name)) {
if (cp->sub == VMIN || cp->sub == VTIME)
OpenPOWER on IntegriCloud