CMDList: separate command name from comand object for alias
This commit is contained in:
parent
c9fdbac547
commit
64a72b70ef
@ -36,15 +36,15 @@ int CMDList_deinit(CMDList_t *list)
|
||||
}
|
||||
|
||||
// add a command in the command tree
|
||||
int CMDList_add(CMDList_t *list, CMD_t* cmd)
|
||||
int CMDList_add(CMDList_t *list, CMD_t* cmd, char* cmdName)
|
||||
{
|
||||
int returnCode = 0;
|
||||
char* read_p = cmd->cmd;
|
||||
char* read_p = cmdName;
|
||||
CMDList_t** list_p = (CMDList_t**)list;
|
||||
|
||||
if (read_p == NULL)
|
||||
{ // cmd is missing a string for the commnad name
|
||||
returnCode = -1;
|
||||
{
|
||||
read_p = cmd->cmd;
|
||||
}
|
||||
|
||||
while (returnCode == 0)
|
||||
|
||||
@ -46,7 +46,7 @@ extern CMDList_t* CMDList_init();
|
||||
extern int CMDList_deinit(CMDList_t *list);
|
||||
|
||||
// add a command in the command tree
|
||||
extern int CMDList_add(CMDList_t *list, CMD_t* cmd);
|
||||
extern int CMDList_add(CMDList_t *list, CMD_t* cmd, char* cmdName);
|
||||
|
||||
// search command in the tree
|
||||
extern CMD_t* CMDList_get(CMDList_t *list, char* cmd);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user