1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

terminfo_clear_screen

This commit is contained in:
Witold Filipczyk 2017-11-20 11:28:53 +01:00
parent ab15a9301f
commit d8e749c0f4
3 changed files with 13 additions and 0 deletions

View File

@ -1393,6 +1393,12 @@ erase_screen(struct terminal *term)
want_draw();
}
#ifdef CONFIG_TERMINFO
if (get_cmd_opt_bool("terminfo")) {
char *text = terminfo_clear_screen();
hard_write(term->fdout, text, strlen(text));
} else
#endif
hard_write(term->fdout, "\033[2J\033[1;1H", 10);
if (term->master) done_draw();
}

View File

@ -25,6 +25,12 @@ terminfo_setupterm(char *term, int fildes)
return setupterm(term, fildes, NULL);
}
char *
terminfo_clear_screen(void)
{
return tiparm(clear_screen);
}
char *
terminfo_set_bold(int arg)
{

View File

@ -2,6 +2,7 @@
#define EL__TERMINAL_TERMINFO_H
int terminfo_setupterm(char *term, int fildes);
char *terminfo_clear_screen(void);
char *terminfo_set_bold(int arg);
char *terminfo_set_italics(int arg);
char *terminfo_set_underline(int arg);