Crossfire Client, Branches  R11627
p_cmd.h File Reference
+ This graph shows which files directly or indirectly include this file:

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 ConsoleCommandfind_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)
 

Typedef Documentation

typedef void(* CommFunc)(const char *params)

Definition at line 40 of file p_cmd.h.

typedef const char*(* CommHelpFunc)(void)

Definition at line 45 of file p_cmd.h.

Enumeration Type Documentation

enum CommCat
Enumerator
COMM_CAT_MISC 
COMM_CAT_HELP 
COMM_CAT_INFO 
COMM_CAT_SETUP 
COMM_CAT_SCRIPT 
COMM_CAT_DEBUG 

Definition at line 48 of file p_cmd.h.

Function Documentation

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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: