MCPcopy Create free account
hub / github.com/complexlogic/rsgain / get_console_width

Method get_console_width

src/output.cpp:123–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123inline 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
135void MTProgress::update(const std::string &path)
136{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected