From 7b0d88b2dff9b635d9ff69f6d51b6832c1ca4c40 Mon Sep 17 00:00:00 2001 From: Miguel Date: Sat, 18 Aug 2018 13:23:53 +0200 Subject: cleaning up syscalls and playing with new pipes --- terminal/terminal.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'terminal/terminal.c') diff --git a/terminal/terminal.c b/terminal/terminal.c index 872a7fb..2f10ab8 100644 --- a/terminal/terminal.c +++ b/terminal/terminal.c @@ -12,6 +12,8 @@ #include "lib/logger/log.h" +#include + typedef enum { ecma48_reset, @@ -251,6 +253,7 @@ terminal_tty terminal_init(term_out *screen,term_in *input) return tty; } +/* void terminal_kb(terminal_tty *tty, uint8_t c) { if(tty->set_echo)terminal_put(tty,c); @@ -280,6 +283,7 @@ void terminal_kb(terminal_tty *tty, uint8_t c) } } +*/ // send one ASCII character to the terminal bool terminal_put(terminal_tty *tty, uint8_t c) @@ -431,11 +435,14 @@ bool terminal_put(terminal_tty *tty, uint8_t c) if(c=='Z'){// IDENTIFY: claim we are vt102 - tty->input->put_char(0x1B); //ESC - tty->input->put_char('['); - tty->input->put_char('?'); - tty->input->put_char('6'); - tty->input->put_char('c'); + if(tty->input!=NULL) + { + tty->input->put_char(0x1B); //ESC + tty->input->put_char('['); + tty->input->put_char('?'); + tty->input->put_char('6'); + tty->input->put_char('c'); + } return;} -- cgit v1.2.3