From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5812 invoked from network); 25 Apr 2003 14:55:04 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 25 Apr 2003 14:55:04 -0000 Received: (qmail 26577 invoked by alias); 25 Apr 2003 14:54:44 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6049 Received: (qmail 26568 invoked from network); 25 Apr 2003 14:54:44 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 25 Apr 2003 14:54:44 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [195.207.101.245] by sunsite.dk (MessageWall 1.0.8) with SMTP; 25 Apr 2003 14:54:43 -0000 Received: from btm34m.sh.bel.alcatel.be (btm34m.sh.bel.alcatel.be [138.203.192.124]) by relay4.alcatel.be (8.12.9/8.12.9) with ESMTP id h3PEugLC018036 for ; Fri, 25 Apr 2003 16:56:45 +0200 Received: from bt0pls.sh.bel.alcatel.be (bt0pls [138.203.84.98]) by btm34m.sh.bel.alcatel.be (8.8.8+Sun/8.8.8/1.1) with ESMTP id QAA08492 for ; Fri, 25 Apr 2003 16:54:39 +0200 (MET DST) Received: (from kvho@localhost) by bt0pls.sh.bel.alcatel.be (8.8.8+Sun/8.8.8) id QAA27621; Fri, 25 Apr 2003 16:54:37 +0200 (MET DST) Date: Fri, 25 Apr 2003 16:54:37 +0200 (MET DST) Message-Id: <200304251454.QAA27621@bt0pls.sh.bel.alcatel.be> To: zsh-users@sunsite.dk From: koen.van_hoo1@skynet.be Subject: wrong LINES, COLUMNS X-Scanned-By: MIMEDefang 2.28 (www . roaringpenguin . com / mimedefang) Hi, Recently it did install some patches on our servers, which caused ioctl(SHTTY, TIOCGWINSZ, (char *)&shttyinfo.winsize) to return an error. In that case ws_row and ws_col in shttyinfo.winsize are set to 0 in Src/utils.c, and a lot off tools like vi, more, less, ... don't work properly anymore. If it was changed into ======================================= #ifdef TIOCGWINSZ if (SHTTY == -1) return; if (ioctl(SHTTY, TIOCGWINSZ, (char *)&shttyinfo.winsize) == 0) { resetzle = (ttyrows != shttyinfo.winsize.ws_row || ttycols != shttyinfo.winsize.ws_col); if (from == 0 && resetzle && ttyrows && ttycols) from = 1; /* Signal missed while a job owned the tty? */ ttyrows = shttyinfo.winsize.ws_row; ttycols = shttyinfo.winsize.ws_col; } else { /* Set to unknown on failure */ shttyinfo.winsize.ws_row = lines; shttyinfo.winsize.ws_col = columns; resetzle = from == 1; } #else resetzle = from == 1; #endif /* TIOCGWINSZ */ ========================================== it is possible to set LINES and COLUMNS from the commandline, and have vi, less, more, ... to work just fin. -- Koen