That !%$@ 3-character buffer.

Glenn R. Stone gs26 at prism.gatech.EDU
Thu Nov 22 03:16:51 AEST 1990


In <1190 at cameron.egr.duke.edu> jpe at 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 <sys/tty.h> instead of
<sgtty.h>; 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 at prism.gatech.edu, glenns at eas.gatech.edu <--- the '6000
Earth and Atmospheric Sciences, Georgia Tech, Atlanta, GA 30332-0340
(404) 894-3890 M-F 1000-1700 EST



More information about the Comp.unix.aix mailing list