added basic heredoc function

Some things are broken:
navigation in multiline inputs
history buffer for multiline inputs
some things not been noticed yet
This commit is contained in:
prozessorkern
2019-07-29 01:30:16 +02:00
parent fc8a34dd1c
commit 280e512746
4 changed files with 126 additions and 44 deletions

View File

@@ -22,8 +22,7 @@ static bool exitRequest = false;
int f;
shellmatta_handle_t handle;
void
set_blocking (int fd, int should_block)
void set_blocking (int fd, int should_block)
{
struct termios tty;
memset (&tty, 0, sizeof tty);
@@ -80,7 +79,7 @@ int main(void)
static char historyBuffer[4096];
static shellmatta_instance_t instance;
f = open("/dev/pts/3", O_RDWR | O_SYNC);
f = open("/dev/pts/1", O_RDWR | O_SYNC);
if (f < 0)
{