From da37ef7bbb7da5bd0b21f9e47659077769a46451 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sun, 5 Feb 2006 11:20:59 +0000 Subject: [PATCH] Added more info on screen detection --- mbsebbs/mbsebbs.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mbsebbs/mbsebbs.c b/mbsebbs/mbsebbs.c index f43a521e..03111b9d 100644 --- a/mbsebbs/mbsebbs.c +++ b/mbsebbs/mbsebbs.c @@ -105,6 +105,14 @@ int main(int argc, char **argv) if (ioctl(1, TIOCGWINSZ, &ws) != -1 && (ws.ws_col > 0) && (ws.ws_row > 0)) { cols = ws.ws_col; rows = ws.ws_row; + } else { + Syslog('b', "Could not get screensize using ioctl() call"); + if (getenv("LINES") != NULL) { + rows = atoi(getenv("LINES")); + } else { + Syslog('b', "Could net get screensize from environment too"); + } + /* use linux/vt.h + ioctl VT_RESIZE */ } if ((rc = rawport()) != 0) {