From 042e25e19b5fc0cec1d47440c26246c886cf39f6 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Sun, 17 May 2015 20:40:29 +0200 Subject: started big cleanup! --- terminal/vt52.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'terminal/vt52.c') diff --git a/terminal/vt52.c b/terminal/vt52.c index 9ff1150..3fa4137 100644 --- a/terminal/vt52.c +++ b/terminal/vt52.c @@ -54,12 +54,13 @@ static void clear(vt52_tty *tty) } } -vt52_tty vt52_init(term_out *screen) +vt52_tty vt52_init(term_out *screen,term_in *input) { vt52_tty tty; tty.data=kballoc(1); tty.screen=screen; + tty.input=input; tty.x=0; tty.y=0; @@ -80,6 +81,11 @@ static void set_char(vt52_tty *tty, uint32_t x, uint32_t y, uint32_t c) static uint8_t escaping=0; +void vt52_kb(vt52_tty *tty, uint8_t c) +{ + vt52_put(tty,c); + tty->input->put_char(c); +} // send one ASCII character to the terminal void vt52_put(vt52_tty *tty, uint8_t c) { -- cgit v1.2.3