diff options
Diffstat (limited to 'src/server/shared/Utilities/ProgressBar.cpp')
-rwxr-xr-x | src/server/shared/Utilities/ProgressBar.cpp | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/src/server/shared/Utilities/ProgressBar.cpp b/src/server/shared/Utilities/ProgressBar.cpp index 6d6cdf893d1..01f467b798f 100755 --- a/src/server/shared/Utilities/ProgressBar.cpp +++ b/src/server/shared/Utilities/ProgressBar.cpp @@ -21,17 +21,7 @@ #include "ProgressBar.h" char const* const barGoLink::empty = " "; -#ifdef _WIN32 -char const* const barGoLink::full = "\x3D"; -#else char const* const barGoLink::full = "*"; -#endif - -barGoLink::~barGoLink() -{ - printf( "\n" ); - fflush(stdout); -} barGoLink::barGoLink( uint64 row_count ) { @@ -39,17 +29,9 @@ barGoLink::barGoLink( uint64 row_count ) rec_pos = 0; indic_len = 50; num_rec = row_count; - #ifdef _WIN32 - printf( "\x3D" ); - #else printf( "[" ); - #endif for (uint64 i = 0; i < indic_len; ++i) printf( empty ); - #ifdef _WIN32 - printf( "\x3D 0%%\r\x3D" ); - #else printf( "] 0%%\r[" ); - #endif fflush(stdout); } @@ -62,22 +44,20 @@ void barGoLink::step( void ) n = rec_no * indic_len / num_rec; if ( n != rec_pos ) { - #ifdef _WIN32 - printf( "\r\x3D" ); - #else printf( "\r[" ); - #endif for (i = 0; i < n; i++ ) printf( full ); for (; i < indic_len; i++ ) printf( empty ); float percent = (((float)n/(float)indic_len)*100); - #ifdef _WIN32 - printf( "\x3D %i%% \r\x3D", (int)percent); - #else printf( "] %i%% \r[", (int)percent); - #endif fflush(stdout); rec_pos = n; } + + if( num_rec == rec_no) + { + printf( "\n" ); + fflush(stdout); + } } |