Skip to content

Commit

Permalink
fix a stupid typo and clarify windows error code
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronliu0130 committed Dec 7, 2023
1 parent c4e12b5 commit 7573de8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/tiv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ int main(int argc, char *argv[]) {
// implementations are welcome Fallback sizes when unsuccesful
int maxWidth = 80;
int maxHeight = 24;
#ifdef __POSIX_VERSION
#ifdef _POSIX_VERSION
struct winsize w;
// If redirecting STDOUT to one file ( col or row == 0, or the previous
// ioctl call's failed )
Expand All @@ -584,10 +584,9 @@ int main(int argc, char *argv[]) {
maxWidth = w.dwSize.X * 4;
maxHeight = w.dwSize.Y * 8;
} else {
std::cerr << GetLastError();
std::cerr << "Warning: failed to determine most reasonable size, "
"defaulting to 80x24"
<< std::endl;
std::cerr
<< "Warning: failed to determine most reasonable size: Error code"
<< GetLastError() << ", defaulting to 80x24" << std::endl;
}
#else
std::cerr << "Warning: failed to determine most reasonable size: "
Expand Down

0 comments on commit 7573de8

Please sign in to comment.