michael@uni-paderborn.de (Michael Schmidt) (11/26/90)
I just tried to install the more replacement less on our rs6000. All comilations went fine, I got a working executable. But, ... the behaviour is strange. When viewing a file you have to type in FOUR chracters, before the first is honored. And then all behaves like a queue. After typing in the fifth character the second gets handles and so on. Giving it a 'q' to quit and three more characters less will quit and the three characters show up on the command line. Looks pretty wierd to me. Any ideas? -- Michael Schmidt, FB 17, Uni-GH Paderborn, Warburgerstr. 100, D-4790 Paderborn, West Germany Mail: michael@pbinfo.UUCP or michael@uni-paderborn.de
gs26@prism.gatech.EDU (Glenn R. Stone) (11/27/90)
In <MICHAEL.90Nov26153750@athene.uni-paderborn.de> michael@uni-paderborn.de (Michael Schmidt) writes: >I just tried to install the more replacement less on our rs6000. All >comilations went fine, I got a working executable. But, ... the >behaviour is strange. >When viewing a file you have to type in FOUR chracters.... Aha. POSIX strikes again. Compile less for a System V machine, and it works like a charm..... 'cept that you have to diddle with the malloc() code, because malloc() is a void in AIX3, not an int.... You obviously tried to compile it for a Berkeley setup, and got the POSIX line discipline problem.... you can MAKE it run in a Berkeley environment, but it's not worth your time. Oh, and make sure to link with -lcurses instead of -lterminfo..... libterminfo.a don't exist under AIX3. -- Glenn R. Stone gs26@prism.gatech.edu
geoff@edm.uucp (Geoff Coleman) (11/27/90)
From article <MICHAEL.90Nov26153750@athene.uni-paderborn.de>, by michael@uni-paderborn.de (Michael Schmidt): > > I just tried to install the more replacement less on our rs6000. All > comilations went fine, I got a working executable. But, ... the > behaviour is strange. > > When viewing a file you have to type in FOUR chracters, before the > first is honored. And then all behaves like a queue. After typing in > the fifth character the second gets handles and so on. Giving it a 'q' > to quit and three more characters less will quit and the three > characters show up on the command line. > > Looks pretty wierd to me. Any ideas? As a guess you are using the ioctls for BSD style tty driver while the active driver is the POSIX driver. It sounds like raw mode isn't being set up right. check the return values for any ioctl calls. Geoff Coleman Unexsys Systems > -- > Michael Schmidt, FB 17, Uni-GH Paderborn, Warburgerstr. 100, > D-4790 Paderborn, West Germany > Mail: michael@pbinfo.UUCP or michael@uni-paderborn.de
dcm@nostromo.austin.ibm.com (craig miller) (11/27/90)
In article <17570@hydra.gatech.EDU> gs26@prism.gatech.EDU (Glenn R. Stone) writes: >... >and it works like a charm..... 'cept that you have to diddle with >the malloc() code, because malloc() is a void in AIX3, not an int.... > >-- Glenn R. Stone >gs26@prism.gatech.edu Just one minor point here: Glenn, what do you mean, "malloc() is a void in AIX3, not an int...."? AIXV3's malloc() returns a void *, per ANSI. I've never heard of a malloc() that returned int... Just curious... Craig ------ Craig Miller Locus Computing Corporation, Austin, TX. UUCP: ..!cs.utexas.edu!ibmchs!auschs!slaughter!dcm "I do not represent LCC or IBM. I represent myself (usually)."
ron@woan (Ronald S. Woan) (11/28/90)
In article <4355@awdprime.UUCP>, dcm@nostromo.austin.ibm.com (craig miller) writes: Craig> Just one minor point here: Glenn, what do you mean, "malloc() Craig> is a void in AIX3, not an int...."? Craig> AIXV3's malloc() returns a void *, per ANSI. I've never heard Craig> of a malloc() that returned int... Agreeing that "void *malloc()" is the way to go, I think Glenn was just mis-stating the more traditional "char *malloc()" of UNIX versions gone by. +-----All Views Expressed Are My Own And Are Not Necessarily Shared By------+ +------------------------------My Employer----------------------------------+ + Ronald S. Woan woan@peyote.cactus.org or woan%austin@iinus1.ibm.com + + other email addresses Prodigy: XTCR74A Compuserve: 73530,2537 +
gs26@prism.gatech.EDU (Glenn R. Stone) (11/28/90)
In <4355@awdprime.UUCP> dcm@nostromo.austin.ibm.com (craig miller) writes: >In article <17570@hydra.gatech.EDU> gs26@prism.gatech.EDU (yours truly) writes: >>... >>and it works like a charm..... 'cept that you have to diddle with >>the malloc() code, because malloc() is a void in AIX3, not an int.... > Just one minor point here: Glenn, what do you mean, "malloc() > is a void in AIX3, not an int...."? So I was working from memory. calloc, not malloc.... DYNIX 3 (4.2 BSDish for the Sequent, the machine from which I post) has char *calloc.... and the less code assumes that, and does not cast the pointers explicitly. You have to go in and ANSI-ise the code... which is also good programming practice in non-ANSI (or at least to document the fact that hey! I'm assuming char *{m,c}alloc instead of void....) P'raps Henry should add to the First Commandment.... When weirdnesses happen in code thou didst not write, thou shalt REALLY study the output of _lint_ thy eternal friend and companion. -- Glenn R. Stone (gs26@prism.gatech.edu)
jgabriel@mtecv2.mty.itesm.mx (Juan Gabriel Ruiz Pinto) (11/28/90)
michael@uni-paderborn.de (Michael Schmidt) writes: >When viewing a file you have to type in FOUR chracters, before the >first is honored. And then all behaves like a queue. After typing in >the fifth character the second gets handles and so on. Giving it a 'q' >to quit and three more characters less will quit and the three >characters show up on the command line. I had the same problem with the less program, and I use the next steps to compile it and it works fine now: 1. Use the makefile.bsd42 2. Change the GLOB variable to 0 in the makefile 3. Change the LIBS variable to '-lcurses -lbsd' 4. Type make and enjoy less! Hope this helps... -- ***** Greetings from Mexico! ***** Juan Gabriel Ruiz Pinto Internet: Ing. Sistemas Electronicos jgabriel@mtecv2.mty.itesm.mx I.T.E.S.M. Campus Monterrey
michael@uni-paderborn.de (Michael Schmidt) (12/05/90)
>>>>> About Re: Has anyone got less to work under AIX-3.1 on a RS6000 >>>>> ?, Glenn R. Stone said: Glenn> Aha. POSIX strikes again. Compile less for a System V Glenn> machine, and it works like a charm..... 'cept that you have to Glenn> diddle with the malloc() code, because malloc() is a void in Glenn> AIX3, not an int.... I configured it for a SysV machine, and it works perfect. -- Michael Schmidt, FB 17, Uni-GH Paderborn, Warburgerstr. 100, D-4790 Paderborn, West Germany Mail: michael@pbinfo.UUCP or michael@uni-paderborn.de