cnrdean@ucbtopaz.BERKELEY.EDU (02/14/86)
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);