| 304 | }; |
| 305 | |
| 306 | static int get_terminal_width() { |
| 307 | #if defined(_WIN32) |
| 308 | CONSOLE_SCREEN_BUFFER_INFO csbi; |
| 309 | GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi); |
| 310 | return csbi.srWindow.Right - csbi.srWindow.Left + 1; |
| 311 | #else |
| 312 | struct winsize w; |
| 313 | ioctl(STDOUT_FILENO, TIOCGWINSZ, &w); |
| 314 | return w.ws_col; |
| 315 | #endif |
| 316 | } |
| 317 | |
| 318 | class File { |
| 319 | public: |
no outgoing calls
no test coverage detected