diff options
author | June McEnroe <june@causal.agency> | 2019-07-31 13:34:22 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-07-31 13:34:22 -0400 |
commit | bfacd885f6f32e2f1445bcab8b35d4ba148b3d15 (patch) | |
tree | d81af5bd43c65191828af3ac7fa6c8495d6d354d | |
parent | Import terminal emulation from shotty (diff) | |
download | stream-bfacd885f6f32e2f1445bcab8b35d4ba148b3d15.tar.gz stream-bfacd885f6f32e2f1445bcab8b35d4ba148b3d15.zip |
Update ingest terminal
Diffstat (limited to '')
-rw-r--r-- | ingest.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ingest.c b/ingest.c index 27035af..abb7451 100644 --- a/ingest.c +++ b/ingest.c @@ -78,7 +78,14 @@ int main(void) { maxClient--; } - // TODO: Update local terminal. + ssize_t pos = 0; + while (pos < rlen) { + wchar_t ch; + int n = mbtowc(&ch, &buf[pos], rlen - pos); + if (n <= 0) break; + termUpdate(ch); + pos += n; + } } if (fds[1].revents) { |