Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!ut-emx!ibmchs!auschs!panews!skate.awdpa.ibm.com!ericm From: ericm@ibmpa.awdpa.ibm.com (Eric Murray) Newsgroups: comp.unix.aix Subject: Re: MAIL on AIX V. 3 Message-ID: <1991Apr11.190305.7741@ibmpa.awdpa.ibm.com> Date: 11 Apr 91 19:03:05 GMT References: <1991Apr2.215813.12245@uvm.edu> <6506@awdprime.UUCP> Sender: news@ibmpa.awdpa.ibm.com (news id) Reply-To: ericm@skate.awdpa.ibm.com (Eric Murray) Organization: This line intentionally left blank. Lines: 73 In article <6506@awdprime.UUCP> geo@george.austin.ibm.com (George Noren) writes: >In article <1991Apr2.215813.12245@uvm.edu>, moore@emily.uvm.edu (Bryan >Moore) writes: >> >> I am having a problem with the mail system on AIX V. 3. >> Previously on AIX 2.2.1 on the RT, when a user was looking at >> mail, the system would prompt for a key-press when the screen >> filled up ( like it was piped into pg). On the RS/6000, the >> information just scrolls through the mail message even if it >> is 10 pages long. >> >> Maybe this is a parameter in the .mailrc file, but I don't know >> which one. >> > > >The parameter is: > > set crt= > >where is the number of lines in the crt screen (or x-window). This >can be put >in $HOME/.mailrc for each user, or in /usr/lib/Mail.rc for system-wide effect. >The entry causes the mail program to feed the message through the pg program if >the message exceeds number of lines. Even better, you can get the page size to automagically change when you change your window size: set crt=`${HOME}/bin/ttylines` and here's ttylines.c: (god, I love programs that port directly from BSD!) /* issue an TIOCGWINSZ ioctl on our pty tp get the window size */ #include #include /*struct winsize { ** unsigned short ws_row; ** unsigned short ws_col; ** unsigned short ws_xpixel; ** unsigned short ws_ypixel; };*/ main(argc,argv) int argc; char **argv; { register int fp, new; struct winsize ws; fp = open("/dev/tty",O_RDWR,0); ioctl(fp,TIOCGWINSZ,&ws); if (argc > 1 && ((new = atoi(argv[1])) != ws.ws_row)) { /* user wants to set size & it's not right */ ws.ws_row = new; ioctl(fp,TIOCSWINSZ,&ws); } /* print out rows */ printf("%d\n",ws.ws_row); close(fp); } eric murray ericm@angst.awdpa.ibm.com ericm@ibminet.awdpa.ibm.com the lawyers make me say: this posting doesn't represent official ibm policy