diff options
| author | Miguel <m.i@gmx.at> | 2018-08-18 13:23:53 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-08-18 13:23:53 +0200 |
| commit | 7b0d88b2dff9b635d9ff69f6d51b6832c1ca4c40 (patch) | |
| tree | 22c452e9c7ad586136721e776e0b67b23fb33119 /terminal/terminal.c | |
| parent | 17fd357bad5f6c3362cfdab1d807aa463c69a4e9 (diff) | |
cleaning up syscalls and playing with new pipes
Diffstat (limited to 'terminal/terminal.c')
| -rw-r--r-- | terminal/terminal.c | 17 |
1 files changed, 12 insertions, 5 deletions
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 <stddef.h> + 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;} |
