diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-09-02 16:40:28 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-09-02 16:40:28 -0700 |
commit | 5f05173e793d49319c727240014b59a04bd4075c (patch) | |
tree | 166aa17ed74dadf70b9a78cb3385d92d610a7e41 /parse-xml.c | |
parent | ef0d00e76a2343f5d730eff3381d6715e3134ae8 (diff) | |
download | subsurface-5f05173e793d49319c727240014b59a04bd4075c.tar.gz |
Do a dive de-dup pass
If given multiple dives at the same time, just de-dup the dives. This
happens when you've dumped the whole dive-computer several times, and
some dives show up in multiple dumps.
When de-duping, try to avoid dropping data. So if one dive has notes
attached to it, and the other one does not, pick the notes from the dive
that does have them. Obvious stuff like that.
The sample merge is also written so that it should be possible to merge
two dives. Which we don't actually do yet.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'parse-xml.c')
-rw-r--r-- | parse-xml.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/parse-xml.c b/parse-xml.c index 5a1a1601e..3a84e2963 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -636,11 +636,6 @@ static void try_to_fill_dive(struct dive *dive, const char *name, char *buf) nonmatch("dive", name, buf); } -static unsigned int dive_size(int samples) -{ - return sizeof(struct dive) + samples*sizeof(struct sample); -} - /* * File boundaries are dive boundaries. But sometimes there are * multiple dives per file, so there can be other events too that |