Mail Archives: djgpp/1999/04/28/10:55:21
bowman wrote:
>
> Ralph Gesler <rgesler AT pacificnet DOT net> wrote in message
> news:37260199 DOT 6FFD6B6D AT pacificnet DOT net...
> >
> > All errata for Stroustrup's 3rd edition, up through the 9th printing are
> > available at http://www.research.att.com/~bs/3rd_errata.html.
>
> thanks for that link. Now, if I could get sed to work on hardcopy books
> .....
>
> > "Note that on some systems, it can be hard to determine if input
> > is available.
> > Thus, in_avail() might be (poorly) implemented to return 0
> > in cases where an input operation would succeed."
>
> I didn't spend too much time playing with it, and I must confess I can't
> recall which compiler I was using (CygWin or DJGPP g++, or Ming's egcs), but
> the behavior I saw was consistent with in_avail() always returning 0. I
> guess a little more controlled test is in order.
I took a quick look at the header file for DJGPP and in_avail() just
tells you how many characters are buffered by the stream, it never
tries to see if there are any more in the keyboard buffer or on the
disk.
Here is the relevant line from the header file:
int in_avail() { return _IO_read_end - _IO_read_ptr; }
I guess that is not EXACTLY useless, but it is far from
what I had hoped for.
Dennis Yelle
--
Want to get paid for using the internet?
If so, go to: http://alladvantage.com/go.asp?refid=BAL536
- Raw text -