X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=save-xml.c;h=c9085db51554394442e3f92ef2782e52c52ec37f;hb=788ebc0500b12fb502b82473c1459ccca06345a5;hp=d6774b5c7f880bb425f9e43209038b13568756f7;hpb=30ee87be92f0a0fffc98106852d9623a65dfe4ed;p=ext%2Fsubsurface.git diff --git a/save-xml.c b/save-xml.c index d6774b5..c9085db 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"); @@ -262,6 +262,8 @@ static void save_dive(FILE *f, struct dive *dive) fputs("number) fprintf(f, " number='%d'", dive->number); + if (dive->rating) + fprintf(f, " rating='%d'", dive->rating); fprintf(f, " date='%04u-%02u-%02u'", tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday); fprintf(f, " time='%02u:%02u:%02u'",