1: /* There are two important structures used by the command processor.
2: Cmdtab encodes the current commands. Each command corresponds to
3: an element in cmdtab and is type struct cmdstruct. Four fields
4: determine the command. Cmd_char is the character which, when
5: pressed, calls the command. Cmd_proc is the procedure which
6: runs the command. Cmd_argv is used as a parameter to that proc.
7: Cmd_xdir, when on, indicates the command may be run anywhere, and
8: not just on the directory page.
9:
10: The classtab is used to map statements from the .vshrc file to
11: cmdtab elements. The keyword in a .vshrc statement is looked
12: up in classtab, and then the classtab element is used to load
13: the cmdtab element.
14: */
15:
16: struct classstruct { /* Classification structure */
17: char * cl_name; /* Name (key word) */
18: int (*cl_proc)(); /* Command procedure */
19: short cl_count; /* Number of args */
20: char cl_xdir; /* Is ok outside dir page */
21: };
22:
23: struct cmdstruct { /* Command structure */
24: char cmd_char; /* Command char */
25: int (*cmd_proc)(); /* Command procedure */
26: char ** cmd_argv; /* Array of arguments for command */
27: char cmd_xdir; /* Is ok outside dir page */
28: };
29:
30: struct classstruct *classloc();
31: struct cmdstruct *cmdloc ();
32: extern (*cmdproc ())();
33:
34: extern struct classstruct classtab[];
35: extern struct cmdstruct cmdtab[];
36:
37: /* Command characters for important commands */
38:
39: #define CMD_DATE 0x80
40: #define CMD_SE 0x81
41: #define CMD_SG 0x82
Defined struct's
Defined macros
Usage of this include