possible O2 PP display bug

Linus Torvalds torvalds at linux-foundation.org
Sat Mar 2 10:07:31 PST 2013


On Sat, Mar 2, 2013 at 10:00 AM, Linus Torvalds
<torvalds at linux-foundation.org> wrote:
>
> We could recognize old files that haven't been over-saved at all with
> new versions. They have numbers in the form "x. y" or "x.y0" or
> "x.yz0", none of which happen in new files. So the old format is
> recognizable, but:
>
> Once it's been loaded and then saved in the new format, there's no
> going back. That would be true regardless of the details new format
> (ie also if it was always fixed at three decimal digits (ie w.xyz)..

Actually, there's a much bigger "but".

Recognizing the old format doesn't actually help. It really doesn't
matter. If it's in the old format, it's crap. End of story.

Why?

Because if it was ever in the old format, YOU DO NOT KNOW HOW MANY
TIMES IT HAS BEEN SAVED.

In particular, the *first* time a pO2 of 0.009 was saved, it was saved
as "0. 9 bar". Then, when you load that, and re-save it, what do you
get?

You don't get "0. 9 bar" again. No. You get "0. 0 bar", because the
"9" in "0. 9" was never parsed due to the space.

Same goes for "1.020" bar. The *first* time it was saved, it was saved
as "1.20". Then it gets parsed as 1200 mbar, and now it gets saved as
"1.200".

See? The old format was so broken that *even*if*you*recognize* it, you
can't do shit about it. It's not just the format that was bad, the
actual *values* have been corrupted.

               Linus


More information about the subsurface mailing list