octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: octave delimited stream peek function


From: John W. Eaton
Subject: Re: octave delimited stream peek function
Date: Wed, 18 Sep 2019 16:12:22 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 9/17/19 8:06 PM, Rik wrote:

I just fixed https://savannah.gnu.org/bugs/?56917, but it was incredibly
painful to find the root cause.  It turns out that the peek function for a
delimited_stream in oct-stream.cc does NOT necessarily return or set the
EOF indication when at the end of the file.  This is contrary to the C++
input stream behavior which returns what the next get() operation would
return (which in this case would be EOF).  I put a FIXME note in
oct-stream.cc, but is this a behavior that we are actually relying on and
want to keep?  I can't say for sure because I know there was a lot of
buffer optimization to support textscan() functionality.

I don't know the answer to that as I am not the original author of the textscan function in C++. Even if I were, I don't know that I would remember enough of the details at this point anyway.

jwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]