It does not work on Windows with MSYS2.
It is verified to work on Linux, FreeBSD and macOS.
/* dependencies */
#include "q3map2.h"
+#if GDEF_OS_POSIX
#include <sys/ioctl.h>
+#endif // GDEF_OS_POSIX
+
static unsigned terminalColumns = 80;
struct HelpOption
printf(" q3map2 -help [stage]\n");
printf(" q3map2 -help all\n\n");
+#if GDEF_OS_POSIX
struct winsize ws;
ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws);
if (ws.ws_col > 60) {
terminalColumns = ws.ws_col;
}
+#endif // GDEF_OS_POSIX
HelpCommon();