Crossfire Client, Branches
R11627
|
#include <client.h>
#include <external.h>
#include <script.h>
#include <p_cmd.h>
#include "../help/chelp.h"
Go to the source code of this file.
Macros | |
#define | assumed_wrap get_info_width() |
#define | H1(a) draw_info(a, NDI_BLACK) |
#define | H2(a) draw_info(a, NDI_BLACK) |
#define | LINE(a) draw_info(a, NDI_BLACK) |
#define | NUM_COMMANDS ((int)(sizeof(commands) / sizeof(char*))) |
#define | tolower(C) (((C) >= 'A' && (C) <= 'Z')? (C) - 'A' + 'a': (C)) |
Functions | |
static void | command_foodbep (const char *cpnext) |
static void | command_help (const char *cpnext) |
const char * | complete_command (const char *command) |
static void | do_clearinfo (const char *ignored) |
static void | do_clienthelp (const char *arg) |
static void | do_clienthelp_list (void) |
static void | do_disconnect (const char *ignored) |
static void | do_inv (const char *ignored) |
static void | do_magicmap (const char *ignored) |
static void | do_metaserver (const char *ignored) |
static void | do_num_free_items (const char *ignored) |
static void | do_savedefaults (const char *ignored) |
static void | do_savewinpos (const char *ignored) |
static void | do_script_list (const char *ignored) |
static void | do_serverhelp (const char *arg) |
static void | do_take (const char *used) |
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) |
static const char * | help_bind (void) |
static const char * | help_clienthelp (void) |
static const char * | help_cwindow (void) |
static const char * | help_help (void) |
static const char * | help_inv (void) |
static const char * | help_magicmap (void) |
static const char * | help_metaserver (void) |
static const char * | help_savewinpos (void) |
static const char * | help_script (void) |
static const char * | help_scriptkill (void) |
static const char * | help_scripttell (void) |
static const char * | help_serverhelp (void) |
static const char * | help_showweight (void) |
static const char * | help_unbind (void) |
void | init_commands (void) |
static void | set_command_window (const char *cpnext) |
static void | show_help (const ConsoleCommand *cc) |
static int | sort_by_category (const void *a_, const void *b_) |
static int | sort_by_name (const void *a_, const void *b_) |
Variables | |
static ConsoleCommand ** | cat_sorted_commands |
static const char *const | commands [] |
static ConsoleCommand | CommonCommands [] |
const int | CommonCommandsSize = sizeof(CommonCommands) / sizeof(ConsoleCommand) |
static ConsoleCommand ** | name_sorted_commands |
int | num_commands |
#define assumed_wrap get_info_width() |
Definition at line 67 of file p_cmd.c.
Referenced by do_clienthelp_list().
Definition at line 62 of file p_cmd.c.
Referenced by do_clienthelp_list(), and show_help().
Definition at line 63 of file p_cmd.c.
Referenced by do_clienthelp_list(), and show_help().
Definition at line 64 of file p_cmd.c.
Referenced by do_clienthelp_list(), and show_help().
#define NUM_COMMANDS ((int)(sizeof(commands) / sizeof(char*))) |
Definition at line 965 of file p_cmd.c.
Referenced by complete_command().
#define tolower | ( | C | ) | (((C) >= 'A' && (C) <= 'Z')? (C) - 'A' + 'a': (C)) |
Definition at line 799 of file p_cmd.c.
Referenced by find_command().
|
static |
Definition at line 319 of file p_cmd.c.
References CONFIG_FOODBEEP, draw_info(), NDI_BLACK, use_config, and want_config.
|
static |
Definition at line 257 of file p_cmd.c.
References do_clienthelp_list(), find_command(), MAX_BUF, send_command(), and show_help().
const char* complete_command | ( | const char * | command | ) |
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().
|
static |
Definition at line 361 of file p_cmd.c.
References menu_clear().
|
static |
Definition at line 192 of file p_cmd.c.
References do_clienthelp_list(), draw_info(), find_command(), MAX_BUF, NDI_BLACK, and show_help().
|
static |
Definition at line 71 of file p_cmd.c.
References assumed_wrap, ConsoleCommand::cat, COMM_CAT_MISC, ConsoleCommand::desc, get_cat_sorted_commands(), get_category_name(), get_num_commands(), H1, H2, LINE, MAX_BUF, and ConsoleCommand::name.
Referenced by command_help(), and do_clienthelp().
|
static |
Definition at line 363 of file p_cmd.c.
References cleanup_connection(), csocket, and ClientSocket::fd.
|
static |
Definition at line 390 of file p_cmd.c.
References cpl, Player_Struct::ob, and print_inventory().
|
static |
Definition at line 392 of file p_cmd.c.
References cpl, draw_magic_map(), and Player_Struct::showmagic.
|
static |
Definition at line 397 of file p_cmd.c.
References draw_info(), FALSE, meta_port, meta_server, metaserver_get_info(), metaserver_show(), and NDI_BLACK.
|
static |
Definition at line 410 of file p_cmd.c.
References LOG(), LOG_INFO, and num_free_items().
|
static |
Definition at line 404 of file p_cmd.c.
References save_defaults().
|
static |
Definition at line 406 of file p_cmd.c.
References save_winpos().
|
static |
Definition at line 360 of file p_cmd.c.
References script_list().
|
static |
Definition at line 229 of file p_cmd.c.
References MAX_BUF, and send_command().
|
static |
Definition at line 408 of file p_cmd.c.
References command_take().
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().
|
static |
Definition at line 419 of file p_cmd.c.
References HELP_BIND_LONG.
|
static |
Definition at line 425 of file p_cmd.c.
References HELP_INV_LONG.
|
static |
Definition at line 423 of file p_cmd.c.
References HELP_MAGICMAP_LONG.
|
static |
Definition at line 421 of file p_cmd.c.
References HELP_UNBIND_LONG.
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().
|
static |
Definition at line 306 of file p_cmd.c.
References COMMAND_WINDOW, CONFIG_CWINDOW, draw_info(), NDI_BLACK, use_config, and want_config.
|
static |
Definition at line 160 of file p_cmd.c.
References ConsoleCommand::cat, ConsoleCommand::desc, get_category_name(), H1, H2, ConsoleCommand::helpfunc, LINE, MAX_BUF, and ConsoleCommand::name.
Referenced by command_help(), and do_clienthelp().
|
static |
Definition at line 742 of file p_cmd.c.
References ConsoleCommand::cat, and ConsoleCommand::name.
Referenced by init_commands().
|
static |
Definition at line 731 of file p_cmd.c.
References ConsoleCommand::name.
Referenced by find_command(), and init_commands().
|
static |
Definition at line 739 of file p_cmd.c.
Referenced by get_cat_sorted_commands().
|
static |
|
static |
const int CommonCommandsSize = sizeof(CommonCommands) / sizeof(ConsoleCommand) |
Definition at line 715 of file p_cmd.c.
Referenced by complete_command(), and init_commands().
|
static |
int num_commands |
Definition at line 725 of file p_cmd.c.
Referenced by get_num_commands().