| 20 |
#include <string.h> |
#include <string.h> |
| 21 |
|
|
| 22 |
static const BBS_CMD bbs_cmd_list[] = { |
static const BBS_CMD bbs_cmd_list[] = { |
| 23 |
|
{"LIST_SECTION", list_section}, |
| 24 |
{"RunMBEM", exec_mbem}, |
{"RunMBEM", exec_mbem}, |
| 25 |
{"EXITBBS", exitbbs}, |
{"EXITBBS", exit_bbs}, |
| 26 |
{"LICENSE", license}, |
{"LICENSE", license}, |
| 27 |
{"COPYRIGHT", copyright}, |
{"COPYRIGHT", copyright}, |
| 28 |
{"RELOADMENU", reloadbbsmenu}, |
{"RELOADCONF", reload_bbs_conf}, |
| 29 |
{"SHUTDOWN", shutdownbbs}}; |
{"SHUTDOWN", shutdown_bbs}, |
| 30 |
|
{"M_FAVOR_SECTION", favor_section_filter}, |
| 31 |
|
{"VIEW_EX_ARTICLE", view_ex_article}, |
| 32 |
|
{"LIST_EX_SECTION", list_ex_section}, |
| 33 |
|
{"TOP10", show_top10_menu}, |
| 34 |
|
{"LOCATE_ARTICLE", locate_article}, |
| 35 |
|
{"FAVOR_TOPIC", favor_topic}, |
| 36 |
|
}; |
| 37 |
|
|
| 38 |
static const int bbs_cmd_count = 6; |
static const int bbs_cmd_count = 13; |
| 39 |
|
|
| 40 |
static TRIE_NODE *p_bbs_cmd_dict; |
static TRIE_NODE *p_bbs_cmd_dict; |
| 41 |
|
|
| 67 |
void unload_cmd() |
void unload_cmd() |
| 68 |
{ |
{ |
| 69 |
trie_dict_destroy(p_bbs_cmd_dict); |
trie_dict_destroy(p_bbs_cmd_dict); |
| 70 |
|
p_bbs_cmd_dict = NULL; |
| 71 |
} |
} |
| 72 |
|
|
| 73 |
bbs_cmd_handler get_cmd_handler(const char *cmd) |
bbs_cmd_handler get_cmd_handler(const char *cmd) |