]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Do gasmix as an empty element XML too
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 2 Sep 2011 00:44:13 +0000 (17:44 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 2 Sep 2011 00:44:13 +0000 (17:44 -0700)
Let's make it a goal that the XML we output is pretty.  That clearly was
never a goal for the Suunto XML, but we can be oh-so-much-better than that.

I still don't love XML, but let's try to make the best of a bad situation,
and take pride in what we do.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
save-xml.c

index 9a6c5c16552f3aee2185433d6f716d7e5c2d3652..efff300886b54fe6a03031bff53b3d160802146f 100644 (file)
@@ -66,7 +66,7 @@ static void save_gasmix(FILE *f, struct dive *dive)
                fprintf(f, "  <gasmix o2='%u.%u%%'", FRACTION(o2, 10));
                if (mix->he.permille)
                        fprintf(f, " he='%u.%u%%'", FRACTION(he, 10));
-               fprintf(f, " n2='%u.%u%%'></gasmix>\n", FRACTION(n2, 10));
+               fprintf(f, " n2='%u.%u%%' />\n", FRACTION(n2, 10));
        }
 }