On 21.4.2013 10:25, Erik de Castro Lopo wrote:
Janne Hyvärinen wrote:
Sorry for spamming but I noticed one more display glitch while doing
further testing. It could leave old status messages at the end of the
line while printing status messages if initial status fit on one line
and new status text required new line.
Patches applied. Thanks!
Erik
Either I sent a wrong patch or the last fix didn't make it in. Here's a
patch to git version to fix old status print staying on the wrong line
with certain filename length.
diff --git a/src/flac/utils.c b/src/flac/utils.c
index 03dbdc8..85a16f0 100644
--- a/src/flac/utils.c
+++ b/src/flac/utils.c
@@ -229,7 +229,7 @@ void stats_print_name(int level, const char *name)
void stats_print_info(int level, const char *format, ...)
{
char tmp[80];
- int len, cleared_len;
+ int len, clear_len;
if (flac__utils_verbosity_ >= level) {
va_list args;
@@ -240,10 +240,10 @@ void stats_print_info(int level, const char *format, ...)
tmp[sizeof(tmp)-1] = '\0';
len = sizeof(tmp)-1;
}
- cleared_len = stats_char_count;
stats_clear();
if (len >= console_chars_left) {
- while (cleared_len > 0 && cleared_len--)
fprintf(stderr, " ");
+ clear_len = console_chars_left;
+ while (clear_len > 0 && clear_len--) fprintf(stderr, "
");
fprintf(stderr, "\n");
console_chars_left = console_width;
}
_______________________________________________
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev