Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!emory!gatech!prism!gs26 From: gs26@prism.gatech.EDU (Glenn R. Stone) Newsgroups: comp.unix.aix Subject: Re: That !%$@ 3-character buffer. Keywords: buffer tty Message-ID: <17436@hydra.gatech.EDU> Date: 21 Nov 90 16:16:51 GMT References: <1190@cameron.egr.duke.edu> Organization: Dead Poets Society Lines: 30 In <1190@cameron.egr.duke.edu> jpe@egr.duke.edu (John P. Eisenmenger) writes: >I'm having a problem with my RS6000 buffering input. I compiled >Berkeley's vi (along with the "new" termcap library) and everything >works fine, *except* that input is buffered by three characters. I >had seen this resolved before, but unfortunately didn't save the >posting. Could someone please post some help (direct mail will be >accepted also)? You've run headlong into the POSIX line discipline. You need to change "O_NDELAY" to "O_NONBLOCK" on your open statements, and you also need to change the line discipline itself, with TXGETLD (get line discipline, to restore it later) and TXSETLD (set it) ioctl() calls; you'll want to save the original discipline string in a char var[TTNAMEMAX], and set the discipline to "bsd" (that's right, TXSETLD takes a string). Oh, yeah. #include instead of ; sys/tty.h does everything sgtty.h does (with #includes), and also adds the stuff you need to change the discipline. I think everything else works, assuming you're using the bsdcc stanza from /usr/lpp/bos/bsdport..... that's all I did (in that vein) to kermit, and it seems to work ok.... I'll be glad to mail (or, if enough requests, post) my kermit diffs so you can see exactly how it's done.... but that's 160 lines of bandwidth I'm not going to use unless there's demand for it.... -- Glenn R. Stone gs26@prism.gatech.edu, glenns@eas.gatech.edu <--- the '6000 Earth and Atmospheric Sciences, Georgia Tech, Atlanta, GA 30332-0340 (404) 894-3890 M-F 1000-1700 EST