X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=save-xml.c;h=d6c249730790ffa8aba58139aef07084e24f9944;hb=4891fa812f04da1f46075433d28fa0f33145e125;hp=d6774b5c7f880bb425f9e43209038b13568756f7;hpb=3a77eb85101a5fb1dc186b88a3a02d2ae27690c7;p=ext%2Fsubsurface.git diff --git a/save-xml.c b/save-xml.c index d6774b5..d6c2497 100644 --- a/save-xml.c +++ b/save-xml.c @@ -162,7 +162,7 @@ static void show_location(FILE *f, struct dive *dive) */ if (latitude || longitude) { int len = snprintf(buffer, sizeof(buffer)-4, - " ", + " ", latitude, longitude); if (!dive->location) { memcpy(&buffer[len-1], "/>\n", 4); @@ -202,16 +202,16 @@ static void save_cylinder_info(FILE *f, struct dive *dive) if (!o2 && !volume && !start && !end) return; fprintf(f, " type.workingpressure, " workpressure='", "'"); if (description && *description) fprintf(f, " description='%s'", description); + if (o2) { + fprintf(f, " o2='%u.%u%%'", FRACTION(o2, 10)); + if (he) + fprintf(f, " he='%u.%u%%'", FRACTION(he, 10)); + } show_pressure(f, cylinder->start, " start='", "'"); show_pressure(f, cylinder->end, " end='", "'"); fprintf(f, " />\n");