cbreak solution and wonderment
cnrdean at ucbtopaz.BERKELEY.EDU
cnrdean at ucbtopaz.BERKELEY.EDU
Fri Feb 14 12:39:24 AEST 1986
Thank you ALL for your help with my cbreak problem. The
consensus was to use the setbuf (example below). But, what is
interesting is that if I issue the command:
system("stty cbreak -echo nl");
Output is unbuffered automatically. That is, I can use putchar();
Sam Scalise
*************************************************************
Sample using setbuf:
struct sgttyb
rawmode; /* Controlling tty raw mode */
gtty(0,&rawmode); /* restore it later */
rawmode.sg_flags |= (CBREAK);
rawmode.sg_flags &= ~(ECHO|XTABS|CRMOD);
stty(0,&rawmode); /* Put tty in raw mode */
---> setbuf(stdout,NULL);
More information about the Comp.unix.wizards
mailing list