This is the mail archive of the libstdc++@sources.redhat.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: libstdc++/98



> the following patch to your version of bits/istream.tcc _should_ fix
> the problem you desribe.

This was the fix for PR 92.
It does NOT fix the problem described in PR 98.
I've tried it.

> Index: istream.tcc
> ===================================================================
> RCS file: /cvs/gcc/egcs/libstdc++-v3/include/bits/istream.tcc,v
> retrieving revision 1.1
> retrieving revision 1.2
> diff -c -p -3 -r1.1 -r1.2
> *** istream.tcc	2000/10/05 11:27:01	1.1
> --- istream.tcc	2000/10/06 07:12:32	1.2
> *************** namespace std {
> *** 588,598 ****
>   	    bool __testdelim = __c == __idelim;
>   	    bool __testeof =  __c == __eof;
>   	    bool __testput = true;
> - 	    streamsize __n = __this_sb->in_avail();
>   
> ! 	    while (_M_gcount <= __n && !__testeof && !__testdelim 
>   		   && (__testput = __sb.sputc(traits_type::to_char_type(__c)) 
> ! 		                   != __eof))
>   	      {
>   		++_M_gcount;
>   		__c = __this_sb->sbumpc();
> --- 588,597 ----
>   	    bool __testdelim = __c == __idelim;
>   	    bool __testeof =  __c == __eof;
>   	    bool __testput = true;
>   
> ! 	    while (!__testeof && !__testdelim 
>   		   && (__testput = __sb.sputc(traits_type::to_char_type(__c)) 
> ! 		       != __eof))
>   	      {
>   		++_M_gcount;
>   		__c = __this_sb->sbumpc();
> 

Brad Garcia


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]