Skip to content
Snippets Groups Projects
Commit 9976fd9b authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Add GETDIM @-code to get the current ANSI terminal dimensions (rows and cols)

This code will do nothing if there's no user logged-in or their terminal is
not ANSI or their terminal dimensions (rows and cols) are set to specific
values (not auto-detected). This code does the same thing as calling JS
console.getdimensions(). Since it waits (up to 5 seconds) for a CPR response
from the terminal, this does potentially slow down output, so caveat emptor.

This could be used by a sysop to address issue #529.
parent 2b8acf99
Branches
Tags
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #3959 passed
......@@ -731,6 +731,11 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, int* pmode, bool
return(nulstr);
}
if(strcmp(sp, "GETDIM") == 0) {
ansi_getlines();
return nulstr;
}
if(strcmp(sp, "GETKEY") == 0) {
getkey();
return(nulstr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment