delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/04/19/22:57:01

Message-Id: <199904200356.DAA32542@out2.ibm.net>
From: "Mark E." <snowball3 AT usa DOT net>
To: djgpp-workers AT delorie DOT com
Date: Mon, 19 Apr 1999 23:57:11 -0400
MIME-Version: 1.0
Subject: Re: Bug no. 277
X-mailer: Pegasus Mail for Win32 (v3.01d)
Reply-To: djgpp-workers AT delorie DOT com

> > 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 -


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