re-add error message formatting from 7b5d790
This commit is contained in:
parent
b783c67f66
commit
4cb242b7f5
1 changed files with 6 additions and 7 deletions
|
@ -296,9 +296,8 @@ int main(int argc, char *argv[]) {
|
|||
// ioctl call's failed )
|
||||
if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) != 0 ||
|
||||
(w.ws_col | w.ws_row) == 0) {
|
||||
std::cerr << "Warning: failed to determine most reasonable size, "
|
||||
"defaulting to 80x24"
|
||||
<< std::endl;
|
||||
std::cerr << "Warning: failed to determine most reasonable size: "
|
||||
<< strerror(errno) << ", defaulting to 20x6" << std::endl;
|
||||
} else {
|
||||
maxWidth = w.ws_col * 4;
|
||||
maxHeight = w.ws_row * 8;
|
||||
|
@ -312,8 +311,8 @@ int main(int argc, char *argv[]) {
|
|||
maxHeight = w.dwSize.Y * 8;
|
||||
} else {
|
||||
std::cerr << "Warning: failed to determine most reasonable size: "
|
||||
"Error code"
|
||||
<< GetLastError() << ", defaulting to 80x24" << std::endl;
|
||||
<< std::system_category().message(GetLastError())
|
||||
<< ", defaulting to 80x24" << std::endl;
|
||||
}
|
||||
#else
|
||||
std::cerr << "Warning: failed to determine most reasonable size: "
|
||||
|
|
Loading…
Reference in a new issue