From 561a189f49441a4d211c0217dce8127f2ce7c32e Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 5 Aug 2017 04:06:53 +0300 Subject: Fix printing progress to non-terminal STDERR --- libbutl/diagnostics.hxx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'libbutl/diagnostics.hxx') diff --git a/libbutl/diagnostics.hxx b/libbutl/diagnostics.hxx index 9544945..c1491d6 100644 --- a/libbutl/diagnostics.hxx +++ b/libbutl/diagnostics.hxx @@ -52,13 +52,14 @@ namespace butl // Progress line facility. // // The idea is to keep a progress line at the bottom of the terminal with - // other output scrolling above it. The printing of the progress line is - // integrated into diag_stream_lock and diag_progress_lock. To print or - // update the progress acquire diag_progress_lock and update the - // diag_progress string. To remove the progress line, set this string to - // empty. For better readability start the progress line with a space - // (which is where the cursor will be parked). Should only be used if - // diag_stream points to std::cerr. + // other output scrolling above it. For a non-terminal STDERR the progress + // line is printed as a regular one terminated with the newline character. + // The printing of the progress line is integrated into diag_stream_lock and + // diag_progress_lock. To print or update the progress acquire + // diag_progress_lock and update the diag_progress string. To remove the + // progress line, set this string to empty. For better readability start the + // progress line with a space (which is where the cursor will be parked). + // Should only be used if diag_stream points to std::cerr. // // Note that child processes writing to the same stream may not completely // overwrite the progress line so in this case it makes sense to keep the -- cgit v1.1