cbreak mode

Andrew Siegel abs at nbc1.UUCP
Fri Jan 16 03:27:29 AEST 1987


> ... I found that the program
> 
> #include <stdio.h>
> #include <curses.h>
> 
> main()
> {
>    cbreak();
>    nocbreak();
> }
> 
> would leave the machine in cbreak mode.  Furthermore, I
> wrote my own routines to set and unset cbreak mode using
> ioctl() and had the same result.

If you're using curses, you must begin your program with a call to
initscr(), and terminate it with endwin().  The endwin() call returns
the tty parameters to their original setting.

Good luck.
-- 
Andrew Siegel, N2CN		NBC Computer Imaging, New York, NY
philabs!nbc1!abs		(212)664-5776



More information about the Comp.unix.questions mailing list