Date: Thu, 1 Jan 98 15:39:38 PST From: Noam Rotem Subject: Re: Escape Sequences / Reading from Console To: Eli Zaretskii Cc: djgpp AT delorie DOT com Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Precedence: bulk --- On Sun, 28 Dec 1997 11:45:47 +0200 (IST) Eli Zaretskii wrote: >> 2. Is there any portable function or asm code for reading one >> single character from the console? (with DOS, I can use BIOS >> interrupt 16h, but with unix I can't, as far as I understand >> it). > >What's wrong with `getc'? It can read single characters as well, if >you switch stdin to binary mode (use `setmode') and make it unbuffered >(use `setvbuf'). Did you try it? I can't use 'setmode' under UNIX. This is what's wrong with it... Is there any other way to do it (using ANSI C / stdio.h)? --------------------------------------------- Noam Rotem John Bryce Training Centre Tel Aviv, Israel. 03-7535803 ============================================= 1. Take upon yourself an impossible mission. 2. Accomplish the mission. 3. Go back to step 1. It's the only sane answer to modern life. --- 01/01/98 15:39:38