[Rd] (HP-UX) scan: last line gets duplicated (PR#790)

Peter Kleiweg kleiweg@let.rug.nl
Sat, 23 Dec 2000 13:16:03 +0100 (CET)


Peter Kleiweg skriver...

[about possible compiler error]

> Usually, bugs aren't. Usually, it's that one compiler just
> happens to produce code and data that won't generate an
> exceptional situation you just hadn't thought of, and you
> won't notice the error until you use another compiler.
> 
> Which seems to be the case here.

[snip faulty patch, see other mail for correct fix]

> You can see what the problem was. The faulty code doesn't
> prevent to test whether the characters *before* the start of
> the buffer are white space, which can be anything.

I've been thinking about this. The original code was apparently
based on the assumption that (at that point in the program) the
buffer could never be empty (apart from white space). Maybe the
assumption is correct, and this bug actually is an expression of
an error somewhere else. An error with handling EOF, or
something, or even a compiler error.

Should this be checked?

-- 
Peter Kleiweg
http://www.let.rug.nl/~kleiweg/

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._