CLI: don't print an arrow on exit
This commit is contained in:
parent
e267e6f907
commit
dea1c8ae52
@ -3,6 +3,7 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
#include "../FIFOBuff/FIFOBuffChar.h"
|
#include "../FIFOBuff/FIFOBuffChar.h"
|
||||||
|
|
||||||
@ -76,9 +77,12 @@ int tryExecute(FIFOBuffChar_t* fifo)
|
|||||||
|
|
||||||
if (cmd != NULL)
|
if (cmd != NULL)
|
||||||
{
|
{
|
||||||
(*(cmd->fn))(line);
|
int ret = (*(cmd->fn))(line);
|
||||||
|
|
||||||
CLI_stringOut((char*)"> ");
|
if (ret != INT_MIN)
|
||||||
|
{
|
||||||
|
CLI_stringOut((char*)"> ");
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
typedef struct CMD_t {
|
typedef struct CMD_t {
|
||||||
char* cmd;
|
char* cmd;
|
||||||
void (*fn)(char* line);
|
int (*fn)(char* line);
|
||||||
} CMD_t;
|
} CMD_t;
|
||||||
|
|
||||||
typedef struct CMDList_s {
|
typedef struct CMDList_s {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user