static char sccsid
[] = "@(#)cmd.c 3.33 %G%";
* Copyright (c) 1983 Regents of the University of California,
* All rights reserved. Redistribution permitted subject to
* the terms of the Berkeley Software License Agreement.
while ((c
= wwgetc()) >= 0) {
case 'h': case 'j': case 'k': case 'l':
case '1': case '2': case '3': case '4': case '5':
case '6': case '7': case '8': case '9':
if ((w
= window
[c
- '1']) == 0) {
error("%c: No such window.", c
);
if (checkproc(selwin
) >= 0)
if (checkproc(selwin
) >= 0)
error("No previous window.");
movewin(w
, w
->ww_alt
.t
, w
->ww_alt
.l
);
sizewin(w
, w
->ww_alt
.nr
, w
->ww_alt
.nc
);
(void) wwwrite(selwin
, "\b", 1);
(void) wwwrite(selwin
, "\n", 1);
(void) wwwrite(selwin
, "\033A", 2);
(void) wwwrite(selwin
, "\033C", 2);
wwscroll(selwin
, selwin
->ww_w
.nr
/ 2);
wwscroll(selwin
, - selwin
->ww_w
.nr
/ 2);
wwscroll(selwin
, selwin
->ww_w
.nr
);
wwscroll(selwin
, - selwin
->ww_w
.nr
);
if (checkproc(selwin
) >= 0)
if (checkproc(selwin
) >= 0) {
(void) write(selwin
->ww_pty
,
error("Type ? for help.");
wwputs("Command: ", cmdwin
);
wwputs("Which window? ", cmdwin
);
while ((c
= wwgetc()) < 0)
else if (debug
&& c
== 'f')
else if (debug
&& c
== 'b')
else if (c
>= '1' && c
< NWINDOW
+ '1')
if (w
->ww_state
!= WWS_HASPROC
) {
error("No process in window.");
} else if (!new && incmd
) {
} else if (!new && terse
)
* Set the current window.