ALib C++ Framework
by
Library Version: 2605 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
console.cpp
1namespace alib::system {
2
3// static instance representing current process
5
6
7int Console::GetWidth( bool forceRedetect, int defaultWidth ) {
8 if( Console::lastReceivedWidth > 0 && !forceRedetect )
10
11 #if defined (_WIN32)
12
13 #elif defined(__GLIBC__) && defined(__unix__) || defined(__ANDROID_NDK__)
14
15 struct winsize w;
16 if( ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) != 0 )
18 else
20
21 #elif defined (__APPLE__)
22
23 #else
24 #pragma message ("Unknown Platform in file: " __FILE__ )
25 #endif
26
28}
29
30} // namespace [ alib::system]
static int GetWidth(bool forceRedetect=false, int defaultWidth=80)
Definition console.cpp:7
static int lastReceivedWidth
Console text width.
Definition console.hpp:17