version 1.1.1.2, 2016/11/01 09:56:12
|
version 1.1.1.3, 2021/03/17 00:39:23
|
Line 16
|
Line 16
|
* DEFINITIONS |
* DEFINITIONS |
*/ |
*/ |
|
|
#define CMD_SUBMENU ((int (*)(Context ctx, int ac, char *av[], void *arg)) 1) | #define CMD_SUBMENU ((int (*)(Context ctx, int ac, const char *const av[], const void *arg)) 1) |
|
|
#define CMD_ERR_USAGE -1 |
#define CMD_ERR_USAGE -1 |
#define CMD_ERR_UNDEF -2 |
#define CMD_ERR_UNDEF -2 |
Line 46
|
Line 46
|
{ |
{ |
const char *name; |
const char *name; |
const char *desc; |
const char *desc; |
int (*func)(Context ctx, int ac, char *av[], void *arg); | int (*func)(Context ctx, int ac, const char *const av[], const void *arg); |
int (*admit)(Context ctx, CmdTab cmd); |
int (*admit)(Context ctx, CmdTab cmd); |
int priv; |
int priv; |
void *arg; | const void *arg; |
}; |
}; |
|
|
extern const struct cmdtab gCommands[]; |
extern const struct cmdtab gCommands[]; |
Line 59
|
Line 59
|
*/ |
*/ |
|
|
extern int DoConsole(void); |
extern int DoConsole(void); |
extern int DoCommand(Context ctx, int ac, char *av[], const char *file, int line); | extern int DoCommand(Context ctx, int ac, const char *const av[], const char *file, int line); |
extern int DoCommandTab(Context ctx, CmdTab cmdlist, int ac, char *av[]); | extern int DoCommandTab(Context ctx, CmdTab cmdlist, int ac, const char *const av[]); |
extern int HelpCommand(Context ctx, int ac, char *av[], void *arg); | extern int HelpCommand(Context ctx, int ac, const char *const av[], const void *arg); |
extern int FindCommand(Context ctx, CmdTab cmds, char* str, CmdTab *cp); | extern int FindCommand(Context ctx, CmdTab cmds, const char* str, CmdTab *cp); |
extern int AdmitBund(Context ctx, CmdTab cmd); |
extern int AdmitBund(Context ctx, CmdTab cmd); |
extern int AdmitLink(Context ctx, CmdTab cmd); |
extern int AdmitLink(Context ctx, CmdTab cmd); |
extern int AdmitRep(Context ctx, CmdTab cmd); |
extern int AdmitRep(Context ctx, CmdTab cmd); |