[MPlayer-cvslog] CVS: main mplayer.c,1.897,1.898

Oded Shimon CVS syncmail at mplayerhq.hu
Thu Dec 29 12:27:24 CET 2005


CVS change done by Oded Shimon CVS

Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv24

Modified Files:
	mplayer.c 
Log Message:
change erase to end of line, fall back to old behavior if no termcap found


Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.897
retrieving revision 1.898
diff -u -r1.897 -r1.898
--- mplayer.c	27 Dec 2005 10:42:02 -0000	1.897
+++ mplayer.c	29 Dec 2005 11:27:22 -0000	1.898
@@ -962,8 +962,14 @@
     saddf(line, &pos, width, "%4.2fx ", playback_speed);
 
   // end
-  line[pos] = 0;
-  mp_msg(MSGT_AVSYNC, MSGL_STATUS, "%s%s\r", erase_to_end_of_line, line);
+  if (erase_to_end_of_line) {
+    line[pos] = 0;
+    mp_msg(MSGT_AVSYNC, MSGL_STATUS, "%s%s\r", line, erase_to_end_of_line);
+  } else {
+    memset(&line[pos], ' ', width - pos);
+    line[width] = 0;
+    mp_msg(MSGT_AVSYNC, MSGL_STATUS, "%s\r", line);
+  }
   free(line);
 }
 




More information about the MPlayer-cvslog mailing list