diff --git a/CLI/CLI.c b/CLI/CLI.c index 1b5eb5d..5233b57 100644 --- a/CLI/CLI.c +++ b/CLI/CLI.c @@ -173,7 +173,7 @@ int tryExecute(CLI_t* cli, FIFOBuffChar_t* fifo) #ifdef HISTORY History_put(cli->History, line); #endif - int ret = (*(cmd->fn))(line); + int ret = (*(cmd->fn))(line, cli); if (ret != INT_MIN) { diff --git a/CLI/CLI.h b/CLI/CLI.h index f78a9a1..19138c9 100644 --- a/CLI/CLI.h +++ b/CLI/CLI.h @@ -39,6 +39,8 @@ extern void CLI_PrintHistory(CLI_t* cli); // to recive a single caracter bool CLI_charIn(CLI_t* cli, char c); +void CLI_charOut_save(CLI_t* cli, char ch); +void CLI_stringOut(CLI_t* cli, char* str); #endif \ No newline at end of file diff --git a/CMDList/CMDList.h b/CMDList/CMDList.h index 215ae41..42029e6 100644 --- a/CMDList/CMDList.h +++ b/CMDList/CMDList.h @@ -3,7 +3,7 @@ typedef struct CMD_t { char* cmd; - int (*fn)(char* line); + int (*fn)(char* line, void* cli); } CMD_t; typedef struct CMDList_s {