delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/12/26/16:35:36

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: "Cody" <cody1 AT ktsnet DOT com>
Newsgroups: comp.os.msdos.djgpp
References: <3c24f3be AT leia DOT ktsnet DOT com> <3942-Tue25Dec2001182106+0200-eliz AT is DOT elta DOT co DOT il> <3c2927d7 AT leia DOT ktsnet DOT com> <1659-Wed26Dec2001102358+0200-eliz AT is DOT elta DOT co DOT il>
Subject: Re: bug in djgpp 3.0.2? surely it's my fault
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-Original-NNTP-Posting-Host: kx-nachtx-ppp030.ktsnet.com
Message-ID: <3c2a37c7@leia.ktsnet.com>
Date: Wed, 26 Dec 2001 14:39:46 -0600
NNTP-Posting-Host: 216.60.177.225
X-Complaints-To: abuse AT swbell DOT net
X-Trace: nnrp2.sbc.net 1009399156 216.60.177.225 (Wed, 26 Dec 2001 14:39:16 CST)
NNTP-Posting-Date: Wed, 26 Dec 2001 14:39:16 CST
Organization: SBC Internet Services
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> > > Does it stop waiting if you press [Enter] right after the first key?
> > Only if the first key is EOF
> If so, my theory is probably wrong.
Oh well, any other suggestions?

> I must admit that I don't know enough about the C++ function you
> called to tell how should it work.  Can someone who knows that please
> tell?
Any other takers willing to help me out?

> > > To get a single-key input, you need to use the termios functions to
> > > switch the terminal into raw mode.  The library reference has the
> > > details.
> > Right.  An example would be getch() in conio.h, right?
> No, conio's getch is DOS-specific; it uses a certain system call
> which always works  by single characters.
Right.  I misunderstood you and thought that was what you mean (as in
DOS-specific).  I didn't understand what the termios functions were.

> To write more portable code, which uses standard functions, you need
> to call the tcsetattr function with the ICANON bit reset in the
> c_lflag member of its last argument (which is a structure).  After
> that, any input function that you call will return after a single
> character has been read from the terminal.
I looked up termios in the RHIDE help and found out that it was above my
head.  I would rather just clarify my problem w/ the istream::get() problem
rather than tinker with the termios functions (which I don't understand and
don't need).  Any help with my problem would be greatly appreciated.
__________________________________
Microsoft spel chekar vor sail, worgs grate!



- Raw text -


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