From 95db0aeb236eebd0f6c517078bc8df299599a02a Mon Sep 17 00:00:00 2001 From: ods15 Date: Sun, 25 Dec 2005 18:26:35 +0000 Subject: Use termcap "erase to end of line" character code instead of using spaces to end of screen. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17241 b3059339-0415-0410-9bf9-f77b7e298cf2 --- osdep/getch2.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'osdep/getch2.c') diff --git a/osdep/getch2.c b/osdep/getch2.c index e4a5c9cb1c..ac9c5e8395 100644 --- a/osdep/getch2.c +++ b/osdep/getch2.c @@ -40,6 +40,7 @@ static char getch2_buf[BUF_LEN]; int screen_width=80; int screen_height=24; +char * erase_to_end_of_line = "\033[J"; typedef struct { int len; @@ -78,6 +79,7 @@ char *p=tgetstr(id,&term_p); static int success=0; int load_termcap(char *termtype){ + char * p; if(!termtype) termtype=getenv("TERM"); if(!termtype) termtype="unknown"; success=tgetent(term_buffer, termtype); @@ -88,6 +90,7 @@ int load_termcap(char *termtype){ screen_height=tgetnum("li"); if(screen_width<1 || screen_width>255) screen_width=80; if(screen_height<1 || screen_height>255) screen_height=24; + if ((p = tgetstr("cd",&term_p))) erase_to_end_of_line=p; termcap_add("kP",KEY_PGUP); termcap_add("kN",KEY_PGDWN); -- cgit v1.2.3