summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-07-31 13:34:22 -0400
committerJune McEnroe <june@causal.agency>2019-07-31 13:34:22 -0400
commitbfacd885f6f32e2f1445bcab8b35d4ba148b3d15 (patch)
treed81af5bd43c65191828af3ac7fa6c8495d6d354d
parentImport terminal emulation from shotty (diff)
downloadstream-bfacd885f6f32e2f1445bcab8b35d4ba148b3d15.tar.gz
stream-bfacd885f6f32e2f1445bcab8b35d4ba148b3d15.zip
Update ingest terminal
-rw-r--r--ingest.c9
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) {