Changeset: f558192077d3 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/f558192077d3 Modified Files: clients/ChangeLog.Mar2025 clients/mapiclient/mclient.c Branch: Mar2025 Log Message:
Figure out width and height of terminal window on Windows. diffs (30 lines): diff --git a/clients/ChangeLog.Mar2025 b/clients/ChangeLog.Mar2025 --- a/clients/ChangeLog.Mar2025 +++ b/clients/ChangeLog.Mar2025 @@ -1,3 +1,8 @@ # ChangeLog file for clients # This file is updated with Maddlog +* Thu Aug 28 2025 Sjoerd Mullender <[email protected]> +- We now try to figure out the size of the terminal window on Windows. + This means that mclient will, by default, format tabular output to + not wrap long lines, like is already done on Unix/Linux. + diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -1690,6 +1690,14 @@ setWidth(void) pagewidth = ws.ws_col; pageheight = ws.ws_row; } else +#else +#ifdef _MSC_VER + CONSOLE_SCREEN_BUFFER_INFO csbi; + if (GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi) != 0) { + pagewidth = csbi.srWindow.Right - csbi.srWindow.Left; + pageheight = csbi.srWindow.Bottom - csbi.srWindow.Top + 1; + } else +#endif #endif { pagewidth = pageheight = -1; _______________________________________________ checkin-list mailing list -- [email protected] To unsubscribe send an email to [email protected]
