From cfbc61d1f76b7c1965e0848b925b4cdf47975991 Mon Sep 17 00:00:00 2001 From: Sude Date: Sat, 6 Apr 2013 05:50:44 +0300 Subject: [PATCH] Formatting changes to repair --- src/downloader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/downloader.cpp b/src/downloader.cpp index 69fe936..fe0138f 100644 --- a/src/downloader.cpp +++ b/src/downloader.cpp @@ -690,7 +690,7 @@ int Downloader::repairFile(std::string url, std::string filepath, std::string xm std::string range = ss.str(); ss.str(std::string()); - std::cout << "\tChunk " << i << " (" << chunk_size << " bytes): "; + std::cout << "\033[0K\rChunk " << i << " (" << chunk_size << " bytes): "; fseek(outfile, begin, SEEK_SET); unsigned char *chunk = (unsigned char *) malloc(chunk_size * sizeof(unsigned char *)); if (chunk == NULL) @@ -724,12 +724,12 @@ int Downloader::repairFile(std::string url, std::string filepath, std::string xm } else { - std::cout << "OK" << std::endl; + std::cout << "OK\r" << std::flush; } free(chunk); res = 1; } - + std::cout << std::endl; fclose(outfile); return res;