From 99c111e34833bb7b8af2ad5a6494790191b18e2c Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 1 Sep 2011 16:41:10 -0700 Subject: 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 --- save-xml.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'save-xml.c') 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, " %u.%03u m\n", FRACTION(dive->maxdepth.mm, 1000)); show_temperature(f, dive->airtemp, " ", " C\n"); + show_temperature(f, dive->watertemp, " ", " C\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, ">\n"); -- cgit v1.2.3-70-g09d2