added continuous mode support fix #3

If a command returns SHELLMATTA_CONTINUE all received data is passed to this command until it returns != SHELLMATTA_CONTINUE or a cancel is received
The data is passed stdin like and can be read byte by byte vie shellmatta_read
The stdin buffer is overwritten witch each new char
This commit is contained in:
prozessorkern
2020-03-22 21:27:18 +01:00
parent 17bb88d292
commit 5e84f1b022
7 changed files with 115 additions and 52 deletions

View File

@@ -144,6 +144,7 @@ typedef struct
shellmatta_write_t write; /**< pointer to write function */
shellmatta_cmd_t helpCmd; /**< help command structure */
shellmatta_cmd_t *cmdList; /**< pointer to the first command */
shellmatta_cmd_t *continuousCmd; /**< command to be called continuously */
bool cmdListIsConst; /**< true if the #cmdList was passed during
initialization */
shellmatta_opt_t optionParser; /**< option parser sructure */