improve behaviour under VPC, fixes from nicolas tittley.
[minix.git] / commands / yap / commands.h
blob73df1ca1e29da6bf4351abafe6d2179514915d77
1 /* Copyright (c) 1985 Ceriel J.H. Jacobs */
3 /* $Header$ */
5 # ifndef _COMMANDS_
6 # define PUBLIC extern
7 # else
8 # define PUBLIC
9 # endif
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 */
29 } commands[];
31 int do_chkm();
33 * int do_chkm(cnt)
34 * long cnt; Ignored
36 * Switch to other keymap
39 VOID do_comm();
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.
48 int lookup();
50 * int lookup(str)
51 * char *str;
53 * Searches the string "str" in the command list.
54 * It returns its index if it exists, otherwise it returns 0.
57 VOID wrt_fd();
59 * void wrt_fd(fd)
60 * int fd; File descriptor
62 * Write input to file descriptor fd
64 # undef PUBLIC