3 * The Command DB collects all commands the user can give. It only contains
4 * identifiers and descriptions of commands, not the functions executing these
5 * commands. Coupling with those happens elsewhere.
11 #include <stdint.h> /* for uint8_t */
17 uint8_t id; /* unique identifier of command */
18 char * dsc_short; /* short string name of command to be used internally */
19 char * dsc_long; /* long string description of command for the user */
24 uint8_t n; /* number of Command structs in database*/
25 struct Command * cmds; /* pointer to first Command struct in database */
30 /* Is "id" the ID of command whose dsc_short is "shortdsc"? Answer in binary. */
31 extern uint8_t is_command_id_shortdsc(uint8_t id, char * shortdsc);
33 /* Give short description of command ("dsc_short"), get its ID. */
34 extern uint8_t get_command_id(char * dsc_short);
36 /* Give short description of command ("dsc_short"), get long description. */
37 extern char * get_command_longdsc(char * dsc_short);
39 /* Read in CommandDB from file "config/commands" to world.cmd_db. */
40 extern void init_command_db();
42 /* Free all memory allocated with init_command_db. */
43 extern void free_command_db();