Crossfire Client, Branches
R11627
|
Go to the source code of this file.
Data Structures | |
struct | ConsoleCommand |
Typedefs | |
typedef void(* | CommFunc )(const char *params) |
typedef const char *(* | CommHelpFunc )(void) |
Enumerations | |
enum | CommCat { COMM_CAT_MISC = 0, COMM_CAT_HELP = 1, COMM_CAT_INFO = 2, COMM_CAT_SETUP = 3, COMM_CAT_SCRIPT = 4, COMM_CAT_DEBUG = 5 } |
Functions | |
const char * | complete_command (const char *ocommand) |
void | extended_command (const char *ocommand) |
const ConsoleCommand * | find_command (const char *cmd) |
ConsoleCommand ** | get_cat_sorted_commands (void) |
const char * | get_category_name (CommCat cat) |
int | get_num_commands (void) |
int | handle_local_command (const char *cp, const char *cpnext) |
void | init_commands (void) |
enum CommCat |
const char* complete_command | ( | const char * | ocommand | ) |
Definition at line 972 of file p_cmd.c.
References CommonCommandsSize, display, draw_info(), list, name, ConsoleCommand::name, NDI_BLACK, and NUM_COMMANDS.
Referenced by gtk_complete_command(), and write_ch().
void extended_command | ( | const char * | ocommand | ) |
Definition at line 890 of file p_cmd.c.
References Player_Struct::count, cpl, handle_local_command(), MAX_BUF, script_lua_command(), and send_command().
Referenced by do_key_press(), enter_callback(), menu_apply(), menu_disarm(), menu_quit_character(), menu_search(), menu_who(), on_entry_commands_activate(), parse_key(), and sexit().
const ConsoleCommand* find_command | ( | const char * | cmd | ) |
Definition at line 802 of file p_cmd.c.
References sort_by_name(), and tolower.
Referenced by chelp_entry_callback(), command_help(), do_clienthelp(), and handle_local_command().
ConsoleCommand** get_cat_sorted_commands | ( | void | ) |
Returns a pointer to the head of an array of ConsoleCommands sorted by category, then by name.
It's num_commands long.
Definition at line 846 of file p_cmd.c.
References cat_sorted_commands.
Referenced by do_clienthelp_list(), and set_default_text().
const char* get_category_name | ( | CommCat | cat | ) |
Definition at line 335 of file p_cmd.c.
References COMM_CAT_DEBUG, COMM_CAT_HELP, COMM_CAT_INFO, COMM_CAT_MISC, COMM_CAT_SCRIPT, and COMM_CAT_SETUP.
Referenced by chelp_entry_callback(), do_clienthelp_list(), set_default_text(), and show_help().
int get_num_commands | ( | void | ) |
Definition at line 727 of file p_cmd.c.
References num_commands.
Referenced by do_clienthelp_list(), and set_default_text().
int handle_local_command | ( | const char * | cp, |
const char * | cpnext | ||
) |
Definition at line 858 of file p_cmd.c.
References ConsoleCommand::dofunc, draw_info(), FALSE, find_command(), MAX_BUF, ConsoleCommand::name, NDI_RED, and TRUE.
Referenced by extended_command(), and script_process_cmd().
void init_commands | ( | void | ) |
Fills some internal arrays. Run this on startup, but not before filling in ToolkitCommands and ToolkitCommandsSize.
Definition at line 755 of file p_cmd.c.
References CommonCommandsSize, sort_by_category(), and sort_by_name().
Referenced by init_client_vars().