summaryrefslogtreecommitdiffstats
path: root/statistics.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2013-02-22 16:18:39 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-02-22 20:17:39 -0800
commit0eb53fab52acdcca60a3a80d4d0d9e1e9fffb38b (patch)
tree6d48ad790d3f9c181a2494a62bf03c34b11e0bf2 /statistics.c
parent48de523f15a275bec106333fe64779dc8d3a4bb8 (diff)
downloadsubsurface-0eb53fab52acdcca60a3a80d4d0d9e1e9fffb38b.tar.gz
Flesh out the UDDF xml parsing a bit more
Commit 28aba5a2062c ("Flesh out the UDDF xml parsing a bit more") improved on parsing UDDF files by teaching "percent()" to also handle pure fractions like UDDF uses. So in a UDDF file, an o2 value of "1.0" means "100%". But it turns out that I have a few dives with "1% He", and the "Turn fractions into percent" logic also turns that into 100%. So this makes the 'percent()' function a bit smarter. If it actually finds a percentage-sign after the number, it knows it is already percent, not a fraction. That disambiguates the two cases: "1.0" is 100%, but "1.0%" (note the explicit percentage sign) is 1%. So now our native format cannot get confused, because it generally tries to avoid naked numbers. Good choice. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'statistics.c')
0 files changed, 0 insertions, 0 deletions