[RFC/Patch] What about using seekoff(-1, ...) for unbuffered underflow?

Paolo Carlini pcarlini@unitus.it
Sat Jun 7 08:01:00 GMT 2003


Nathan Myers wrote:

>On Sat, Jun 07, 2003 at 12:41:12AM +0200, Paolo Carlini wrote:
>  
>
>>Paolo Carlini wrote:
>>
>>>.. however, I like even more the below, slightly simpler and which 
>>>definitely keeps pbackfail working correctly (I will prepare a 
>>>testcase for this, anyway). 
>>>      
>>>
>>Actually, I believe a slight change is needed for pbackfail, in order to
>>correctly return to the normal unbuffered situation after a sequence
>>sgetc - putback.
>>    
>>
>This looks much better.  I haven't analyzed it in detail yet, but
>nothing in here sets off alarm bells for me.
>
Thanks Nathan for your feedback. I will consider it in _detail_ later 
today and tomorrow
when I will refine the patch, also adding some testcases. In any case 
will _not_ commit without yours
and Benjamin's ok.

In my opinion, anyway, we are still not there: bad things happens with 
my latest proposal
for mixes of seeks, putbackc, sgetc.

Honestly, right now, my _first_  proposal, using explicitly 
_M_create_pback (like Benjamin's) with
a due additional tweak to pbackfail (it has to consider the pback empty 
if it actually contains the sgetc()
char) seems closer to the right thing.

More tomorrow...
Paolo.



More information about the Libstdc++ mailing list