| 121 | } |
| 122 | |
| 123 | inline int ProgressBar::get_console_width() |
| 124 | { |
| 125 | #ifdef _WIN32 |
| 126 | GetConsoleScreenBufferInfo(console, &info); |
| 127 | return info.srWindow.Right - info.srWindow.Left + 1; |
| 128 | #else |
| 129 | if (ioctl(fileno(stdout), TIOCGWINSZ, &ws) < 0 || !ws.ws_col) |
| 130 | return 0; |
| 131 | return ws.ws_col; |
| 132 | #endif |
| 133 | } |
| 134 | |
| 135 | void MTProgress::update(const std::string &path) |
| 136 | { |
nothing calls this directly
no outgoing calls
no test coverage detected