1 /* Copyright (c) 1985 Ceriel J.H. Jacobs */
11 /* Flags, describing properties of commands */
13 # define SCREENSIZE_ADAPT 01 /* Can change screen size */
14 # define SCROLLSIZE_ADAPT 02 /* Can change scrollsize */
15 # define TONEXTFILE 04 /* to next file */
16 # define AHEAD 010 /* goes ahead in the file */
17 # define BACK 020 /* goes back in the file */
18 # define NEEDS_SCREEN 040 /* needs screen info */
19 # define TOPREVFILE 0100 /* to previous file */
20 # define STICKY 0200 /* remember for lastcomm */
21 # define NEEDS_COUNT 0400 /* command needs a count */
22 # define ESC 01000 /* shell or pipe escape */
24 extern struct commands
{
25 char *c_cmd
; /* Short mnemonic for a command */
26 int c_flags
; /* describes command properties */
27 int (*c_func
)(); /* Function executing the command */
28 char *c_descr
; /* Short command description */
36 * Switch to other keymap
41 * void do_comm(command, count)
42 * int command; Index in the commands array
43 * long count; Some commands possibly take a count
45 * Checks and executes commands.
53 * Searches the string "str" in the command list.
54 * It returns its index if it exists, otherwise it returns 0.
60 * int fd; File descriptor
62 * Write input to file descriptor fd