Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site genrad.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!harvard!wjh12!genrad!john From: john@genrad.UUCP (John Nelson) Newsgroups: net.unix-wizards Subject: Re: -cbreak on System III Message-ID: <327@genrad.UUCP> Date: Mon, 20-Aug-84 14:00:22 EDT Article-I.D.: genrad.327 Posted: Mon Aug 20 14:00:22 1984 Date-Received: Wed, 22-Aug-84 03:11:18 EDT References: <528@ucbtopaz.CC.Berkeley.ARPA> Organization: GenRad, Bolton, Mass. Lines: 19 > 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!