mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 18:13:24 +00:00
Save cylinder O2/He content after the cylinder type description
This changes the save format xml to be a bit more readable: instead of putting the gasmix first, put the cylinder type (size, workpressure and description) first, then gasmix, then pressure details. It makes no difference for machine parsing, but I think it's a lot more logical for humans that actually look at the xml file. And we really do want to make the xml file readable by humans. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
b4938ec2de
commit
5c2fca2620
1 changed files with 5 additions and 5 deletions
10
save-xml.c
10
save-xml.c
|
@ -202,16 +202,16 @@ static void save_cylinder_info(FILE *f, struct dive *dive)
|
|||
if (!o2 && !volume && !start && !end)
|
||||
return;
|
||||
fprintf(f, " <cylinder");
|
||||
if (o2) {
|
||||
fprintf(f, " o2='%u.%u%%'", FRACTION(o2, 10));
|
||||
if (he)
|
||||
fprintf(f, " he='%u.%u%%'", FRACTION(he, 10));
|
||||
}
|
||||
if (volume)
|
||||
show_milli(f, " size='", volume, " l", "'");
|
||||
show_pressure(f, cylinder->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");
|
||||
|
|
Loading…
Add table
Reference in a new issue