X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "Anthony" Newsgroups: comp.os.msdos.djgpp Subject: Re: What is portable equivalent of getch()? Date: Thu, 4 Mar 2004 15:53:21 +0300 Organization: Radio-MSU NOC, Moscow State University Lines: 20 Message-ID: References: <40470F8C DOT AA25BECD AT yahoo DOT com> NNTP-Posting-Host: integra.rmt.ru X-Trace: alpha2.radio-msu.net 1078404805 56324 81.13.30.150 (4 Mar 2004 12:53:25 GMT) X-Complaints-To: usenet AT radio-msu DOT net NNTP-Posting-Date: Thu, 4 Mar 2004 12:53:25 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "CBFalconer" ???????/???????? ? ???????? ?????????: news:40470F8C DOT AA25BECD AT yahoo DOT com... > You can wait for an ENTER (cr) keypress, with something like: > > int flushln(FILE *f) > { > int ch; > > while ((EOF != (ch = getc(f)) && ('\n' != ch)) continue; > return ch; > } /* flushln */ > > which is capable of detecting EOF. > Ok, what if I want no echo? I mean, if user press 'a''a''a''cr' I want 'a'-s not to be printed on the screan? Thanks.