/
commands.h
33 lines (27 loc) · 1.05 KB
/
commands.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**************************************************************************
* This program is Copyright (C) 1986-2002 by Jonathan Payne. JOVE is *
* provided by Jonathan and Jovehacks without charge and without *
* warranty. You may copy, modify, and/or distribute JOVE, provided that *
* this notice is included in all the source files and documentation. *
**************************************************************************/
typedef void(*cmdproc_t) ptrproto((void));
struct cmd {
/* Type and Name must match data_obj */
unsigned Type;
const char *Name;
const cmdproc_t c_proc;
#ifdef MAC
char c_map; /* prefix map for About Jove... */
char c_key; /* key binding for About Jove... */
#endif
};
extern const struct cmd commands[];
#define SEARCHCMD_TYPE_INVALID 0
#define SEARCHCMD_TYPE_RANDOM_PREFIX 1
#define SEARCHCMD_TYPE_FIRST_PREFIX 2
#define SEARCHCMD_TYPE_EXACT_MATCH 3
extern const struct cmd
*searchcmd proto((char *name, int type)),
*FindCmd proto((cmdproc_t));
extern void
ExecCmd proto((const data_obj *cp));