From 356ef21cc59dc2c9c3dc2a62821ad7de2527506a Mon Sep 17 00:00:00 2001 From: Edward Wang Date: Sat, 2 Mar 1985 01:35:01 -0800 Subject: [PATCH] new commands s and S. also better way to stop window output SCCS-vsn: usr.bin/window/cmd.c 3.31 --- usr/src/usr.bin/window/cmd.c | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/usr/src/usr.bin/window/cmd.c b/usr/src/usr.bin/window/cmd.c index e056418f54..90adf2c59e 100644 --- a/usr/src/usr.bin/window/cmd.c +++ b/usr/src/usr.bin/window/cmd.c @@ -1,5 +1,5 @@ #ifndef lint -static char sccsid[] = "@(#)cmd.c 3.30 %G%"; +static char sccsid[] = "@(#)cmd.c 3.31 %G%"; #endif #include "defs.h" @@ -72,8 +72,15 @@ docmd() break; case 'M': if ((w = getwin()) != 0) - movewin(w, w->ww_altpos.r, - w->ww_altpos.c); + movewin(w, w->ww_alt.t, w->ww_alt.l); + break; + case 's': + if ((w = getwin()) != 0) + c_size(w); + break; + case 'S': + if ((w = getwin()) != 0) + sizewin(w, w->ww_alt.nr, w->ww_alt.nc); break; case ':': c_colon(); @@ -109,12 +116,27 @@ docmd() wwscroll(selwin, - selwin->ww_w.nr); break; case ctrl(s): - (void) write(selwin->ww_pty, - &wwwintty.ww_tchars.t_stopc, 1); + if (selwin->ww_pty < 0) + break; + if (selwin->ww_ispty) { + (void) ioctl(selwin->ww_pty, TIOCSTOP, + (char *)0); + selwin->ww_stopped = 1; + } else + (void) write(selwin->ww_pty, + &wwwintty.ww_tchars.t_stopc, 1); break; case ctrl(q): - (void) write(selwin->ww_pty, - &wwwintty.ww_tchars.t_startc, 1); + if (selwin->ww_pty < 0) + break; + if (selwin->ww_ispty) { + (void) ioctl(selwin->ww_pty, TIOCSTART, + (char *)0); + selwin->ww_stopped = 0; + } else + (void) write(selwin->ww_pty, + &wwwintty.ww_tchars.t_startc, + 1); break; case ctrl(l): wwredraw(); -- 2.20.1