changed heredoc to exchange data via a stdin like interface with a read function fix #39

This commit is contained in:
prozessorkern
2020-03-22 20:37:00 +01:00
parent 5a00f22e31
commit 17bb88d292
4 changed files with 75 additions and 34 deletions

View File

@@ -123,6 +123,8 @@ typedef struct
uint32_t inputCount; /**< offset of the current write operation */
uint32_t lastNewlineIdx; /**< index of the lest newline */
uint32_t cursor; /**< offset where the cursor is at */
uint32_t stdinIdx; /**< start index of stdin in buffer */
uint32_t stdinLength; /**< length of the stdin data */
char *historyBuffer; /**< buffer to store the last commands */
uint32_t historyBufferSize; /**< size of the history buffer */
uint32_t historyStart; /**< index of the oldest stored command */
@@ -179,6 +181,10 @@ shellmatta_retCode_t shellmatta_write( shellmatta_handle_t handle,
char *data,
uint32_t length);
shellmatta_retCode_t shellmatta_read( shellmatta_handle_t handle,
char **data,
uint32_t *length);
shellmatta_retCode_t shellmatta_opt( shellmatta_handle_t handle,
char *optionString,
char *option,