From kleiweg@let.rug.nl  Sat Dec 23 12:16:03 2000
From: kleiweg@let.rug.nl (Peter Kleiweg)
Date: Sat, 23 Dec 2000 13:16:03 +0100 (CET)
Subject: [Rd] (HP-UX) scan: last line gets duplicated (PR#790)
In-Reply-To: <Pine.LNX.4.21.0012222156530.1578-100000@kleigh.nl>
Message-ID: <Pine.LNX.4.21.0012231306490.624-100000@kleigh.nl>

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


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