e3cf1eff4f8bf621a335ae41ba833a4f2a36aba2
static char *sccsid
= "@(#)cmd2.c 3.27 84/04/08";
char *help_shortcmd
[] = {
"{1-9} Select window {1-9} and return to conversation mode.",
"%{1-9} Select window {1-9} but stay in command mode.",
"escape Return to conversation mode without changing window.",
"^^ Return to conversation mode and change to previous window.",
"c{1-9} Close window {1-9}.",
"m{1-9} Move window {1-9}.",
"M{1-9} Move window {1-9} to previous position.",
"{^Y^E} Scroll {up, down} one line",
"{^U^D} Scroll {up, down} half a window.",
"{^B^F} Scroll {up, down} a full window.",
"{hjkl} Move cursor {left, down, up, right}.",
":%{1-9} Select window {1-9}.",
":close {1-9} . . . Close windows.",
":close all Close all windows.",
":cursor modes Set the cursor modes.",
":escape C Set escape character to C.",
":foreground {1-9} [off]",
" Make {1-9} a foreground window.",
":label {1-9} string Label window {1-9}.",
":list List all windows.",
":nline lines Set the default number of lines",
" in window text buffers.",
":source filename Execute commands in ``filename''.",
":terse [off] Turn on (or off) terse mode.",
":unset variable Deallocate ``variable''.",
":variable List all variables.",
":window row col nrow ncol [nline label]",
" Open a window at ``row'', ``col''",
" of size ``nrow'', ``ncol'',",
" with ``nline'', and ``label''.",
":write {1-9} string . . .",
" Write strings to window {1-9}.",
if ((w
= openiwin(wwnrow
- 3, "Help")) == 0) {
error("Can't open help window: %s.", wwerror());
wwprintf(w
, "The escape character is %c, which gets you into command mode.\n\n",
if (help_print(w
, "Short commands", help_shortcmd
) >= 0)
(void) help_print(w
, "Long commands", help_longcmd
);
help_print(w
, name
, list
)
wwprintf(w
, "%s:\n\n", name
);
wwprintf(w
, "%s: (continued)\n\n", name
);
return more(w
, 1) == 2 ? -1 : 0;
wwputs("Really quit [yn]? ", cmdwin
);
setterse(!quit
&& oldterse
);