delete shit

This commit is contained in:
Catfood 2023-01-12 19:28:53 +08:00
parent 000c2a4b7c
commit f9e7459bbb
4 changed files with 0 additions and 44 deletions

View File

@ -39,7 +39,6 @@ void keyboard_read();
/* tty.c */
// added by mingxuan 2019-5-19
void in_process(TTY *p_tty, u32 key);
void task_tty();
void tty_write(NTTY *tty, char *buf, int len);
int tty_read(NTTY *tty, char *buf, int len);

View File

@ -27,28 +27,6 @@
#define TTY_STATE_WAIT_SPACE 2 /*010*/
#define TTY_STATE_DISPLAY 1 /*001*/
struct s_tty;
struct s_console;
/* TTY */
typedef struct s_tty
{
u32 ibuf[TTY_IN_BYTES]; /* TTY input buffer */
u32 *ibuf_head; /* the next free slot */
u32 *ibuf_tail; /* 缓冲区显示位置指针 */
u32 *ibuf_read;
int ibuf_cnt; /* how many */
int ibuf_read_cnt;
int status;
int mouse_left_button;
int mouse_mid_button;
int mouse_X;
int mouse_Y;
struct s_console *console;
} TTY;
typedef struct n_tty
{
int driver_type; // 1-vga&kbd; 2-serial
@ -110,7 +88,6 @@ NTTY *get_tty(const int nr_tty);
void vga_tty_init(NTTY *tty);
void vga_tty_write(NTTY *tty, char ch);
void vga_tty_flush(NTTY *tty);
void vga_tty_backspace(NTTY *tty);
void vga_tty_scroll(NTTY *tty, int direction);
void vga_tty_select(NTTY *tty);

View File

@ -78,6 +78,3 @@ system_call sys_call_table[NR_SYS_CALL] = {
sys_createdir, // added by mingxuan 2019-5-17
sys_deletedir // added by mingxuan 2019-5-17
};
TTY tty_table[NR_CONSOLES]; // added by mingxuan 2019-5-19
CONSOLE console_table[NR_CONSOLES]; // added by mingxuan 2019-5-19

View File

@ -633,23 +633,6 @@ void vga_tty_write(NTTY *tty, char ch)
// kprintf("row: %d; ", vga->cur_row);
}
void vga_tty_backspace(NTTY *tty)
{
vga_buf *vga = tty->output_buf;
u16 *buf = vga->buf;
if (vga->cur_col == 0)
{
vga->cur_col = SCR_WIDTH - 1;
vga->scr_cur_line = LASTLINE(vga->scr_cur_line);
}
else
{
vga->cur_col--;
}
buf[INDEX(vga->scr_cur_line, vga->cur_col)] = BLANK;
vga->cur_row = CYCLE_SUB(vga->scr_top_line, vga->scr_cur_line, SCR_MAXLINE);
}
void vga_tty_flush(NTTY *tty)
{
vga_buf *vga = tty->output_buf;