summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
authorods15 <ods15@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-12-29 11:27:22 +0000
committerods15 <ods15@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-12-29 11:27:22 +0000
commiteaee93051a25350d4a185268f2e3439f43b804cc (patch)
tree61ae9f340ce11c8b089f924e03b66a16b8569c12 /osdep
parent8ae9b081919f29fe55140e382f881dba273f6c02 (diff)
downloadmpv-eaee93051a25350d4a185268f2e3439f43b804cc.tar.bz2
mpv-eaee93051a25350d4a185268f2e3439f43b804cc.tar.xz
change erase to end of line, fall back to old behavior if no termcap found
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17259 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'osdep')
-rw-r--r--osdep/getch2-win.c2
-rw-r--r--osdep/getch2.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/osdep/getch2-win.c b/osdep/getch2-win.c
index e6fb95ca91..449a44b7b4 100644
--- a/osdep/getch2-win.c
+++ b/osdep/getch2-win.c
@@ -22,7 +22,7 @@ int mp_input_win32_slave_cmd_func(int fd,char* dest,int size){
int screen_width=80;
int screen_height=24;
-char * erase_to_end_of_line = " \r";
+char * erase_to_end_of_line = NULL;
void get_screen_size(){
}
diff --git a/osdep/getch2.c b/osdep/getch2.c
index ac9c5e8395..89f369e068 100644
--- a/osdep/getch2.c
+++ b/osdep/getch2.c
@@ -40,7 +40,7 @@ static char getch2_buf[BUF_LEN];
int screen_width=80;
int screen_height=24;
-char * erase_to_end_of_line = "\033[J";
+char * erase_to_end_of_line = NULL;
typedef struct {
int len;
@@ -79,7 +79,6 @@ 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);
@@ -90,7 +89,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;
+ erase_to_end_of_line= tgetstr("cd",&term_p);
termcap_add("kP",KEY_PGUP);
termcap_add("kN",KEY_PGDWN);