[xiph-cvs] cvs commit: vorbis-tools/ogg123 status.c

Kenneth C. Arnold kcarnold at xiph.org
Sun Aug 12 17:59:44 PDT 2001



kcarnold    01/08/12 17:59:44

  Modified:    ogg123   Tag: kcarnold_work status.c
  Log:
  Fix flickering on status line. I think.

Revision  Changes    Path
No                   revision

No                   revision

1.1.2.3   +7 -3      vorbis-tools/ogg123/Attic/status.c

Index: status.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/Attic/status.c,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- status.c	2001/08/13 00:43:20	1.1.2.2
+++ status.c	2001/08/13 00:59:43	1.1.2.3
@@ -11,7 +11,7 @@
  *                                                                  *
  ********************************************************************
 
- last mod: $Id: status.c,v 1.1.2.2 2001/08/13 00:43:20 kcarnold Exp $
+ last mod: $Id: status.c,v 1.1.2.3 2001/08/13 00:59:43 kcarnold Exp $
 
  ********************************************************************/
 
@@ -35,9 +35,8 @@
 
 void UpdateStats (Stat_t stats[])
 {
-  int len = 0;
+  int len = 0, left;
 
-  ClearLine();
   while (stats->formatstr != NULL)
     {
       if (stats->prio > MaxPrio || !stats->enabled) {
@@ -46,6 +45,8 @@
       }
       if (len != 0)
         len += fprintf (stderr, " ");
+      else
+	fputc ('\r', stderr);
       switch (stats->type) {
       case stat_noarg:
         len += fprintf (stderr, stats->formatstr);
@@ -65,6 +66,9 @@
       }
       stats++;
     }
+  left = LastLineLen - len;
+  while (left-- > 0)
+    fputc (' ', stderr);
   LastLineLen = len;
   fputc ('\r', stderr);
 }

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list