Mail Archives: djgpp-workers/1999/04/19/22:57:01
> > Could people who know their way around C++ in general, and libstdc++ and
> > iostreams in particular, please look at this bug and help me decide
> > whether this has something to do with core DJGPP?
> >
>
[Example snipped]
> Is it intentional that pressing ctrl-z disables all further keyboard input
> from functions like getc() that operate with a FILE pointer?
>
>
If it isn't intentional, here's a patch to not let _IOEOF be set when the
stream is stdin:
Index: djgpp/src/libc/ansi/stdio/filbuf.c
=======================================================
============
RCS file: /cvs/djgpp/djgpp/src/libc/ansi/stdio/filbuf.c,v
retrieving revision 1.3
diff -c -3 -r1.3 filbuf.c
*** filbuf.c 1997/11/14 20:51:48 1.3
--- filbuf.c 1999/04/20 02:53:19
***************
*** 94,100 ****
f->_base = NULL;
if (--f->_cnt < 0) {
if (f->_cnt == -1) {
! f->_flag |= _IOEOF;
if (f->_flag & _IORW)
f->_flag &= ~_IOREAD;
} else
--- 94,101 ----
f->_base = NULL;
if (--f->_cnt < 0) {
if (f->_cnt == -1) {
! if (f != stdin)
! f->_flag |= _IOEOF;
if (f->_flag & _IORW)
f->_flag &= ~_IOREAD;
} else
---
Mark Elbrecht, snowball3 AT usa DOT net
http://snowball.digitalspace.net/
- Raw text -