- print_stats (stderr, _("Total bytes read"),
- records_read * record_size);
- print_stats (stderr, _("Total bytes written"),
- prev_written + bytes_written);
- fprintf (stderr, _("Total bytes deleted: %s\n"),
- STRINGIFY_BIGINT ((records_read - records_skipped)
- * record_size
- - (prev_written + bytes_written), buf));
+ n = print_stats (fp, formats[TF_READ],
+ records_read * record_size);
+
+ fputc (eor, fp);
+ n++;
+
+ n += print_stats (fp, formats[TF_WRITE],
+ prev_written + bytes_written);
+
+ fputc (eor, fp);
+ n++;
+
+ if (formats[TF_DELETED] && formats[TF_DELETED][0])
+ n += fprintf (fp, "%s: ", gettext (formats[TF_DELETED]));
+ n += fprintf (fp, "%s",
+ STRINGIFY_BIGINT ((records_read - records_skipped)
+ * record_size
+ - (prev_written + bytes_written), buf));