--- lbbs/include/bbs_cmd.h 2005/03/22 13:43:16 1.2 +++ lbbs/include/bbs_cmd.h 2025/04/28 03:30:59 1.5 @@ -1,9 +1,9 @@ /*************************************************************************** - bbs_cmd.h - description - ------------------- - begin : Wed Mar 16 2004 - copyright : (C) 2005 by Leaflet - email : leaflet@leafok.com + bbs_cmd.h - description + ------------------- + begin : Wed Mar 16 2005 + copyright : (C) 2005 by Leaflet + email : leaflet@leafok.com ***************************************************************************/ /*************************************************************************** @@ -14,22 +14,26 @@ * (at your option) any later version. * * * ***************************************************************************/ +#ifndef _BBS_CMD_H_ +#define _BBS_CMD_H_ -#define MAX_CMD_LENGTH 20 -#define MAX_CMD_ID 100 +#define MAX_CMD_LENGTH 20 +#define MAX_CMD_ID 100 -#define UNKNOWN_CMD 0xff -#define EXITBBS 0x1 -#define BBSNET 0x2 -#define LICENSE 0x3 -#define COPYRIGHT 0x4 +#define MENU_OK 0x0 +#define UNKNOWN_CMD 0xff +#define EXITBBS 0xfe +#define REDRAW 0x1 +#define NOREDRAW 0x2 struct _bbs_cmd { - char cmd[MAX_CMD_LENGTH]; - int value; + char cmd[MAX_CMD_LENGTH]; + int (*p_handle)(const char *p_param); }; typedef struct _bbs_cmd BBS_CMD; extern BBS_CMD bbs_cmd_list[MAX_CMD_ID]; + +#endif //_BBS_CMD_H_