diff --git a/mbsebbs/mbsebbs.c b/mbsebbs/mbsebbs.c index a561d55b..bb308b5b 100644 --- a/mbsebbs/mbsebbs.c +++ b/mbsebbs/mbsebbs.c @@ -55,11 +55,12 @@ time_t t_start; int main(int argc, char **argv) { - FILE *pTty; - char *p, *tty, temp[PATH_MAX]; - int i, rc; - struct stat sb; - + FILE *pTty; + char *p, *tty, temp[PATH_MAX]; + int i, rc; + struct stat sb; + struct winsize ws; + pTTY = calloc(15, sizeof(char)); tty = ttyname(1); @@ -100,6 +101,10 @@ int main(int argc, char **argv) Syslog(' ', " "); 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) { WriteError("Unable to set raw mode"); Quick_Bye(MBERR_OK);;