diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-11-16 23:11:18 +0000 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-11-16 23:20:39 +0000 |
commit | 23304f69c04f13ba87f32e8574a75c08212a3608 (patch) | |
tree | 7925373ac99b32cb1306cd885b43ffe3f084f8ab /save-xml.c | |
parent | 202c5cbfeb6888b05ae4b14b4f563666bc6ca763 (diff) | |
download | subsurface-23304f69c04f13ba87f32e8574a75c08212a3608.tar.gz |
Load and save the dc type for CCR dives
Oddly we already had code to load this from XML, but nothing else.
This makes the load from XML work like the rest of our code and adds the
save to XML plus the load and save for the git format.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'save-xml.c')
-rw-r--r-- | save-xml.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/save-xml.c b/save-xml.c index 31ad436bc..736e6a4db 100644 --- a/save-xml.c +++ b/save-xml.c @@ -351,6 +351,11 @@ static void save_dc(struct membuffer *b, struct dive *dive, struct divecomputer show_date(b, dc->when); if (dc->duration.seconds && dc->duration.seconds != dive->dc.duration.seconds) put_duration(b, dc->duration, " duration='", " min'"); + if (dc->dctype != OC) { + for (enum dive_comp_type i = 0; i < NUM_DC_TYPE; i++) + if (dc->dctype == i) + show_utf8(b, dctype_text[i], " dctype='", "'", 1); + } put_format(b, ">\n"); save_depths(b, dc); save_temperatures(b, dc); |