+ int len = snprintf(eol, sizeof eol,
+ " (xfr#%d, to-chk=%d/%d)\n",
+ stats.num_transferred_files,
+ stats.num_files - current_file_index - 1,
+ stats.num_files);
+ if (INFO_GTE(PROGRESS, 2)) {
+ static int last_len = 0;
+ /* Drop \n and pad with spaces if line got shorter. */
+ if (last_len < --len)
+ last_len = len;
+ eol[last_len] = '\0';
+ while (last_len > len)
+ eol[--last_len] = ' ';
+ is_last = 0;
+ }