Skip to content
Snippets Groups Projects
Unverified Commit c4292b0c authored by Aleksandr Lysikov's avatar Aleksandr Lysikov Committed by GitHub
Browse files

Merge pull request #17 from kelvinblockchain/master

master->feature-2272
parents ac5a11c8 6f78b455
No related branches found
No related tags found
No related merge requests found
Subproject commit 657f42e138dba298deb06134586ca09aaba3b38d
Subproject commit 10476728dbc21816ea314b4b089e1903132b80b3
Subproject commit 9729b3341b4a1d5cc90007be760d3c8931f2bf3d
Subproject commit f6c1c2cd593ca61b6cc5140855d5dbd9bc61aed3
......@@ -79,7 +79,7 @@ static char** split_word(char *line, int *argc)
int execute_line(char *line)
{
register int i;
const COMMAND *command;
dap_chain_node_cmd_item_t *command;
char *word;
/* Isolate the command word. */
......@@ -198,19 +198,12 @@ int main(int argc, const char * argv[])
free_cmd_state(cmd);
}*/
const COMMAND *command = NULL;
// in the first argument of command line look for the command
if(argc > 1)
command = find_command(argv[1]);
// command found
if(command)
{
if(argc > 1){
// Call the function
//int res = ((*(command->func))(argc - 2, argv + 2));
cmd_state cmd;
memset(&cmd, 0, sizeof(cmd_state));
cmd.cmd_name = (char *) argv[1];
cmd.cmd_name = strdup(argv[1]);
cmd.cmd_param_count = argc - 2;
if(cmd.cmd_param_count > 0)
cmd.cmd_param = (char**) (argv + 2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment