{
uoff_t beg_and_transferred;
unsigned since_last_update, elapsed;
- int barlength;
+ int notty;
int kiloscale;
//transferred = 1234; /* use for stall detection testing */
}
}
+ notty = !isatty(STDERR_FILENO);
+
if (ENABLE_UNICODE_SUPPORT)
- fprintf(stderr, "\r%s", p->curfile);
+ fprintf(stderr, "\r%s" + notty, p->curfile);
else
- fprintf(stderr, "\r%-20.20s", p->curfile);
+ fprintf(stderr, "\r%-20.20s" + notty, p->curfile);
beg_and_transferred = beg_size + transferred;
if (totalsize != 0) {
+ int barlength;
unsigned ratio = 100 * beg_and_transferred / totalsize;
fprintf(stderr, "%4u%%", ratio);
hours = eta / 3600;
fprintf(stderr, "%3u:%02u:%02u ETA", hours, secs / 60, secs % 60);
}
+ if (notty)
+ fputc('\n', stderr);
}