Re: Press any key to continue... bug?



Michal Szwaczko wrote:
> On Wed, Nov 19, 2003 at 12:51:10PM -0800, Miven Dooligan wrote:
>
>>Does this seem like a reasonable approach?
>>
>
> I don't think so, you are killing legal terminal Fxx sequences.
>
>

Exactly the purpose of what I'm trying to do.
The getch() only uses the first byte of the escape code,
and leaves the rest to show up on the commandline.
Obviously this read() approach would not be used anywhere else
but a situation like this.
AFAIK these lines are only run through after a subshell command
and the continue prompt.

At the point when asked to "Press any key to continue..."
there isn't going to be any use for Fxx sequences, therefore just
treat it all like one getch();
BTW Any function/arrow/etc key leaves junk on my commandline at this
point.

Of course it's possible other read() calls don't behave like mine.
Perhaps some demand 15 bytes and will sit around waiting for them
if they don't show up. Mine just takes what it can get and returns.

Does anyone have a read() that'll wait for 15 bytes even if it only
gets 5?

--
Peace and Cheers.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]