Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!purdue!haven!udel!mmdf From: postmaster@att-in.att.com Newsgroups: comp.os.minix Subject: (none) Message-ID: <8423@nigel.udel.EDU> Date: 16 Jan 90 21:05:57 GMT Sender: mmdf@udel.EDU Lines: 136 Mail to `att.att.com!attmail!mhs!envoy!ics.test/pn=_test_group' alias `att!attmail!mhs!envoy!ics.test/pn=_test_group' from 'VM1.NoDak.EDU!INFO-MINIX%UDEL.EDU' failed. The error message was: destination unknown or forwarding disallowed The message began: Received: from NDSUVM1.BITNET by VM1.NoDak.EDU (IBM VM SMTP R1.2.1MX) with BSMTP id 3283; Tue, 16 Jan 90 13:31:45 CST Received: from NDSUVM1.BITNET by NDSUVM1.BITNET (Mailer R2.03B) with BSMTP id 3268; Tue, 16 Jan 90 13:31:43 CST Date: Tue, 16 Jan 90 19:10:00 GMT Reply-To: INFO-MINIX%UDEL.EDU@VM1.NoDak.EDU Sender: Minix operating system From: Mail_System%vaxb.york.ac.uk%NSFNET-RELAY.AC.UK@VM1.NoDak.EDU Subject: %% Undelivered Mail %% Comments: To: MINIX-L@vm1.nodak.edu To: Multiple recipients of list MINIX-L Your mail was not delivered as follows: %MAIL-E-SENDERR, error sending to user ACB5 %MAIL-E-OPENOUT, error opening !AS as output -RMS-E-CRE, ACP file create failed -SYSTEM-F-EXDISKQUOTA, disk quota exceeded %MAIL-E-SENDERR, error sending to user ACB5 -MAIL-E-OPENOUT, error opening !AS as output -RMS-E-CRE, ACP file create failed -SYSTEM-F-EXDISKQUOTA, disk quota exceeded Your original mail header and message follow. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Via: UK.AC.NSFNET-RELAY; Tue, 16 Jan 90 19:09 GMT Received: from vax.nsfnet-relay.ac.uk by sun.NSFnet-Relay.AC.UK Via Ethernet with SMTP id aa11702; 16 Jan 90 19:05 GMT Received: from cunyvm.cuny.edu by vax.NSFnet-Relay.AC.UK via NSFnet with SMTP id aa22901; 16 Jan 90 18:50 GMT Received: from VM1.NoDak.EDU by CUNYVM.CUNY.EDU (IBM VM SMTP R1.2.2MX) with TCP; Tue, 16 Jan 90 13:59:18 EDT Received: from NDSUVM1.BITNET by VM1.NoDak.EDU (IBM VM SMTP R1.2.1MX) with BSMTP id 9325; Tue, 16 Jan 90 12:27:53 CST Received: from NDSUVM1.BITNET by NDSUVM1.BITNET (Mailer R2.03B) with BSMTP id 9318; Tue, 16 Jan 90 12:27:51 CST Date: Tue, 16 Jan 90 15:16:16 MEZ Reply-To: INFO-MINIX Original-Sender: Minix operating system From: Christoph van Wuellen Subject: elvis fixes To: Multiple recipients of list MINIX-L Sender: MINIX-L%edu.nodak.vm1@edu.cuny.cunyvm Here are two fixes for the recently posted vi-clone elvis: 1.) curses.c -- getting the screen size -- The program assumes that it can get the terminal size through the TIOCGWINSZ ioctl if it is defined. That may not be true (is not true on our Sun if you are on an external terminal). elvis gives up immedeately (and logged me out eventually!). While you are under a window manager, you have to use this ioctl, so it is not clear what to do. I decided to ask termcap about the size of the terminal if TIOCGWINSZ reports 0 columns and 0 rows. *** curses.c.orig Wed Jan 10 17:59:16 1990 --- curses.c Thu Jan 11 09:38:18 1990 *************** *** 259,268 **** /* get the window size, one way or another. */ #ifdef TIOCGWINSZ LINES = COLS = 0; ! if (ioctl(2, TIOCGWINSZ, &size) >= 0) { LINES = size.ws_row; COLS = size.ws_col; } #else LINES = tgetnum("li"); --- 259,274 ---- /* get the window size, one way or another. */ #ifdef TIOCGWINSZ LINES = COLS = 0; ! if (ioctl(2, TIOCGWINSZ, &size) >= 0 && ! size.ws_row>0 && size.ws_col>0) { LINES = size.ws_row; COLS = size.ws_col; + } + else + { + LINES = tgetnum("li"); + COLS = tgetnum("co"); } #else LINES = tgetnum("li"); 2.) (more serious) Nothing happened when the cursor was on the top line and I pressed the up-arrow key! In redraw(), the check on the availability of reverse scrolling is at the wrong place (yes, my terminal does not have reverse scrolling!). If there is no reverse scrolling, it should be the same procedure as moving to a distant line: *** redraw.c.orig Thu Jan 11 09:58:31 1990 --- redraw.c Thu Jan 11 10:04:14 1990 *************** *** 93,102 **** smartdrawtext(text, l); } } ! else if (l < topline && l > topline - LINES) { /* near top - scroll down */ ! if (!mustredraw && (SR || AL)) { move(0,0); while (l < topline) --- 93,102 ---- smartdrawtext(text, l); } } ! else if (l < topline && l > topline - LINES && (SR || AL)) { /* near top - scroll down */ ! if (!mustredraw) { move(0,0); while (l < topline) The first error only occurs when working at a window-workstation using only a terminal screen, the second error occurs with terminals that have no reverse scrolling. But it should be corrected! Now, it works, though vi works better with less intelligent terminals. Christoph van Wuellen. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% End of returned mail