fix a stupid typo and clarify windows error code
This commit is contained in:
parent
c4e12b539a
commit
7573de8a61
1 changed files with 4 additions and 5 deletions
|
@ -563,7 +563,7 @@ int main(int argc, char *argv[]) {
|
||||||
// implementations are welcome Fallback sizes when unsuccesful
|
// implementations are welcome Fallback sizes when unsuccesful
|
||||||
int maxWidth = 80;
|
int maxWidth = 80;
|
||||||
int maxHeight = 24;
|
int maxHeight = 24;
|
||||||
#ifdef __POSIX_VERSION
|
#ifdef _POSIX_VERSION
|
||||||
struct winsize w;
|
struct winsize w;
|
||||||
// If redirecting STDOUT to one file ( col or row == 0, or the previous
|
// If redirecting STDOUT to one file ( col or row == 0, or the previous
|
||||||
// ioctl call's failed )
|
// ioctl call's failed )
|
||||||
|
@ -584,10 +584,9 @@ int main(int argc, char *argv[]) {
|
||||||
maxWidth = w.dwSize.X * 4;
|
maxWidth = w.dwSize.X * 4;
|
||||||
maxHeight = w.dwSize.Y * 8;
|
maxHeight = w.dwSize.Y * 8;
|
||||||
} else {
|
} else {
|
||||||
std::cerr << GetLastError();
|
std::cerr
|
||||||
std::cerr << "Warning: failed to determine most reasonable size, "
|
<< "Warning: failed to determine most reasonable size: Error code"
|
||||||
"defaulting to 80x24"
|
<< GetLastError() << ", defaulting to 80x24" << std::endl;
|
||||||
<< std::endl;
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
std::cerr << "Warning: failed to determine most reasonable size: "
|
std::cerr << "Warning: failed to determine most reasonable size: "
|
||||||
|
|
Loading…
Reference in a new issue