summaryrefslogtreecommitdiff
path: root/terminal
diff options
context:
space:
mode:
Diffstat (limited to 'terminal')
-rw-r--r--terminal/terminal.c18
-rw-r--r--terminal/terminal.h2
2 files changed, 6 insertions, 14 deletions
diff --git a/terminal/terminal.c b/terminal/terminal.c
index 6dca075..872a7fb 100644
--- a/terminal/terminal.c
+++ b/terminal/terminal.c
@@ -4,10 +4,14 @@
// man 4 console_codes
//
+#define FOOLOS_MODULE_NAME "terminal"
+
#include "terminal.h"
#include "kernel/kmalloc.h"
#include "driver/screen.h"
+#include "lib/logger/log.h"
+
typedef enum {
ecma48_reset,
@@ -168,7 +172,6 @@ static void process_graphic_npar(terminal_tty *tty, terminal_settings s)
}
}
-
static void process_graphic_npars(terminal_tty *tty)
{
@@ -218,14 +221,14 @@ terminal_tty terminal_init(term_out *screen,term_in *input)
tty.data=kballoc(2);
tty.set_buff=true;
- tty.set_buff=false;
+// tty.set_buff=false;
tty.set_lfnl=true;
// tty.set_lfnl=false;
tty.set_echo=true;
- tty.set_echo=false;
+// tty.set_echo=false;
tty.command=kballoc(1);
tty.command_l=0;
@@ -248,11 +251,8 @@ 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);
if(tty->set_buff)
@@ -400,10 +400,8 @@ bool terminal_put(terminal_tty *tty, uint8_t c)
tty->x--;
}
-
///
-
if(c=='c'){reset(tty);} // RESET
if(c=='D'){tty->y++;} // LINEFEED
@@ -496,10 +494,6 @@ bool terminal_put(terminal_tty *tty, uint8_t c)
}
-
-
-
-
//autobreak
if(tty->x>=tty->width)
{
diff --git a/terminal/terminal.h b/terminal/terminal.h
index 06b8f5a..0106f29 100644
--- a/terminal/terminal.h
+++ b/terminal/terminal.h
@@ -4,7 +4,6 @@
#include <stdint.h>
#include <stdbool.h>
-
//
// Terminal emulator implementing (a subset) of console codes of the
// linux console (see man 4 console_codes)
@@ -74,5 +73,4 @@ terminal_tty terminal_init(term_out *screen,term_in *input);
bool terminal_put(terminal_tty *tty, uint8_t c);
void terminal_kb(terminal_tty *tty, uint8_t c);
-
#endif