Added experimental screensize debug logging

This commit is contained in:
Michiel Broek 2005-08-26 20:52:32 +00:00
parent fcc97c6b06
commit 576bbea1b3

View File

@ -59,6 +59,7 @@ int main(int argc, char **argv)
char *p, *tty, temp[PATH_MAX]; char *p, *tty, temp[PATH_MAX];
int i, rc; int i, rc;
struct stat sb; struct stat sb;
struct winsize ws;
pTTY = calloc(15, sizeof(char)); pTTY = calloc(15, sizeof(char));
tty = ttyname(1); tty = ttyname(1);
@ -100,6 +101,10 @@ int main(int argc, char **argv)
Syslog(' ', " "); Syslog(' ', " ");
Syslog(' ', "MBSEBBS v%s", VERSION); Syslog(' ', "MBSEBBS v%s", VERSION);
if(ioctl(1, TIOCGWINSZ, &ws) != -1 && ws.ws_col>0 && ws.ws_row>0){
Syslog('b', "columns=%d lines=%d", ws.ws_col, ws.ws_row);
}
if ((rc = rawport()) != 0) { if ((rc = rawport()) != 0) {
WriteError("Unable to set raw mode"); WriteError("Unable to set raw mode");
Quick_Bye(MBERR_OK);; Quick_Bye(MBERR_OK);;