www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/01/09:02:01

Date: Thu, 1 Jan 98 15:39:38 PST
From: Noam Rotem <nrotem AT johnbryce DOT co DOT il>
Subject: Re: Escape Sequences / Reading from Console
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Cc: djgpp AT delorie DOT com
Message-ID: <Chameleon.980101155719.nrotem@netvision.netvision>
MIME-Version: 1.0

--- 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019