summaryrefslogtreecommitdiffstats
path: root/save-xml.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-09-01 16:41:10 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-09-01 16:41:10 -0700
commit99c111e34833bb7b8af2ad5a6494790191b18e2c (patch)
tree95f3aa08972990352cef1aee15fe25685c6f1558 /save-xml.c
parent1155ad3f0fb2471163335d1d7c6856a81f495e49 (diff)
downloadsubsurface-99c111e34833bb7b8af2ad5a6494790191b18e2c.tar.gz
Fix up small details in input/output
Be more careful with FP conversions, and with the Kelvin<->C offset. And make sure to use the same names when saving as when parsing. Now when we save a set of dives, then re-load them, and save again, the second save image is identical to the first one. Of course, we don't actually save everything we load, so we still do lose information when we load and then save the result. But at least we now don't lose the information that we *do* save. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'save-xml.c')
-rw-r--r--save-xml.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/save-xml.c b/save-xml.c
index 64254b45e..29f22e6dd 100644
--- a/save-xml.c
+++ b/save-xml.c
@@ -26,6 +26,7 @@ static void save_overview(FILE *f, struct dive *dive)
{
fprintf(f, " <maxdepth>%u.%03u m</maxdepth>\n", FRACTION(dive->maxdepth.mm, 1000));
show_temperature(f, dive->airtemp, " <airtemp>", " C</airtemp>\n");
+ show_temperature(f, dive->watertemp, " <watertemp>", " C</airtemp>\n");
}
static void save_gasmix(FILE *f, struct dive *dive)
@@ -53,7 +54,7 @@ static void save_sample(FILE *f, struct sample *sample)
FRACTION(sample->depth.mm, 1000));
show_temperature(f, sample->temperature, " temp='", " C'");
if (sample->tankpressure.mbar) {
- fprintf(f, " tankpressure='%u.%03u bar'",
+ fprintf(f, " pressure='%u.%03u bar'",
FRACTION(sample->tankpressure.mbar, 1000));
}
fprintf(f, "></sample>\n");