Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site rlgvax.UUCP Path: utzoo!linus!genrad!mit-eddi!mit-vax!eagle!harpo!seismo!rlgvax!guy From: guy@rlgvax.UUCP Newsgroups: net.unix-wizards Subject: Re: raw/cooked single char i/o Message-ID: <622@rlgvax.UUCP> Date: Sat, 11-Jun-83 00:59:55 EDT Article-I.D.: rlgvax.622 Posted: Sat Jun 11 00:59:55 1983 Date-Received: Sat, 11-Jun-83 11:15:39 EDT References: <211@gatech.UUCP> Organization: RLG Corp., Reston, VA Lines: 40 The difference between RAW and CBREAK mode, in 25 words or less: RAW mode means 8-bit data path, with no parity checking no special character interpretation whatsoever wakeup on every character is possible no special output processing whatsoever CBREAK mode means 7-bit data path, with whatever parity checking is enabled "line processing" (erase, kill, EOF, special EOL, and retype on 4.1BSD) is disabled, BUT the interrupt and quit characters are enabled (as are the other signalling characters on 4.1BSD); furthermore, XON/XOFF processing is also active wakeup on every character is possible no change to the output processing from COOKED mode whatsoever Programs which run interactively on a keystroke basis should NEVER run in RAW mode, only CBREAK mode. CBREAK mode is intended for exactly those kinds of programs; RAW mode is SOLELY intended for binary data transmission (like UUCP). For USG UNIX, read ~ICANON mode for CBREAK mode and read "some very complicated set of bits turned on and off" for RAW mode. "curses" has the "functions" (actually macros, at least in 4.1BSD) "crmode" and "nocrmode", which function analogously to "raw" and "noraw" except that they put the terminal in CBREAK mode rather than RAW mode. I've noticed several references to RAW mode being what screen editors and the like run in. This is either due to the fact that RAW mode was all you had on V6, or due to people simply not being aware of CBREAK mode, or due to people not being aware how obnoxious RAW mode is for interaction with a human at a terminal. In USG UNIX, you CAN turn on 8-bit characters without turning off the interrupt characters and XON/XOFF, but your terminal better use the 8th bit for information rather than parity. Guy Harris RLG Corporation {seismo,mcnc,we13,brl-bmd,allegra}!rlgvax!guy