| 585 | } |
| 586 | |
| 587 | static int calculate_progress_bar_width(const std::string & progress_prefix, const std::string & progress_suffix) { |
| 588 | int progress_bar_width = get_terminal_width() - progress_prefix.size() - progress_suffix.size() - 3; |
| 589 | if (progress_bar_width < 1) { |
| 590 | progress_bar_width = 1; |
| 591 | } |
| 592 | |
| 593 | return progress_bar_width; |
| 594 | } |
| 595 | |
| 596 | static std::string generate_progress_bar(int progress_bar_width, curl_off_t percentage, |
| 597 | std::string & progress_bar) { |
nothing calls this directly
no test coverage detected