Article 5545 of comp.sys.amiga: Path: mcdsun!noao!hao!husc6!mit-eddie!genrad!decvax!decwrl!pyramid!oliveb!sun!pepper!cmcmanis From: cmcmanis%pepper@Sun.COM (Chuck McManis) Newsgroups: comp.sys.amiga Subject: Set your console to raw mode Keywords: cbreak() raw() cooked() Message-ID: <21174@sun.uucp> Date: 16 Jun 87 09:09:27 GMT Sender: news@sun.uucp Lines: 256 Many times I have wanted to set 'stdin' in my programs to what is often referred to as 'CBREAK' mode. Basically, that means that every time you call getchar() you get a character. Up until now there was no easy way to do that. The enclosed shar file contains three files, testraw.c raw.c and sendpacket.c. The interesting one is raw.c which contains the functions raw() and cooked(). These take a file pointer (FILE *) and convert it to raw mode or cooked mode respectively. The testraw.c file shows how it is done. Note that this will probably only work for Lattice users since it uses the Lattice ios1.h file to find the DOS FileHandle associated with a 'Level 2' file. Anyway, it was short so it is included here complete. --Chuck McManis uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@sun.com These opinions are my own and no one elses, but you knew that didn't you.