fn() getTerminalSizeRetrieve size of terminal.
Retrieve size of terminal.
Defined in | <seqan/misc/terminal.h> |
---|---|
Signature |
bool getTerminalSize(cols, rows);
|
Parameters
cols
|
An unsigned value the column count is written to. |
---|---|
rows
|
An unsigned value the row count is written to. |
Return Values
bool |
true on success, false otherwise. |
---|
Detailed Description
Remarks
On Windows, rows contains the number o frows in the terminal buffer, not the window.
Examples
The following demonstrates the usage.
#include <iostream> #include <seqan/misc/terminal.h> using namespace seqan; int main() { // Get terminal size and print it to stdout. unsigned cols = 0, rows = 0; getTerminalSize(cols, rows); std::cout << "cols == " << cols << ", rows == " << rows << "\n"; return 0; }
Data Races
Thread safety unknown!