cnrdean@ucbtopaz.CC.Berkeley.ARPA (08/18/84)
I am a programmer used to BSD Unix. I am now trying to write something for System III. Some old stuff no longer works: In an old BSD program, I have something that says: system("stty cbreak -echo nl"); This allows the user to execute commands with a single keystroke. (It also doesn't print the keystroke on the screen ...) I never bothered to find out how to do this within 'C', rather than making a system call. I can't find the equivalent in System III. Can you tell me either how to do this in 'C', or in System III? Sam Scalise
john@genrad.UUCP (John Nelson) (08/20/84)
> In an old BSD program, I have something that says: > > system("stty cbreak -echo nl"); > >This allows the user to execute commands with a single keystroke. System III does not have "cbreak" mode. Therefore the "stty" program has changed. Try using: system("stty -icanon -echo -onlcr"); to give you a one-character-at-a-time-mode, and the reverse system("stty icanon echo onlcr"); The onlcr is the LF to CR-LF on output flag - similar to but not equal to the "nl" flag in the original call. If you want input of a linefeed to be different than a carriage return, you will also need to set and reset the "inlcr" flag (I think this is the one!) Read the MANUAL!