dvd-sector-copy.c: Force return to start of line on progress output.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 16 Feb 2022 21:20:10 +0000 (21:20 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 16 Feb 2022 23:35:38 +0000 (23:35 +0000)
dvd-sector-copy.c

index 31677b8..c6bad44 100644 (file)
@@ -285,7 +285,10 @@ static void put_title(dvd_reader_t *dvd, unsigned title)
 static int progresslen = 0;
 
 static void clear_progress_internal(void)
-  { while (progresslen) { fputs("\b \b", stdout); progresslen--; } }
+{
+  while (progresslen) { fputs("\b \b", stdout); progresslen--; }
+  putchar('\r');
+}
 static void clear_progress(void)
   { clear_progress_internal(); fflush(stdout); }
 static void vappend_progress(const char *fmt, va_list ap)