Mail Archives: djgpp/1998/01/01/09:02:01
--- On Sun, 28 Dec 1997 11:45:47 +0200 (IST) Eli Zaretskii
<eliz AT is DOT elta DOT co DOT il> 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
- Raw text -