summaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2012-11-11 07:20:05 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-11-11 10:48:09 +0100
commitcda1b73bf68d1802c32416bce3be0ef84137002e (patch)
tree8e3e35aa04876e0971a0f80b7ee18e4e6bb746d7 /dive.h
parent7c09991876ef8b34bda6f5615a37f99e1b476b18 (diff)
downloadsubsurface-cda1b73bf68d1802c32416bce3be0ef84137002e.tar.gz
Prepare to merge non-overlapping dives
This just re-organizes the dive merging code so that we expose a new "merge_dives(a, b, offset)" function that merges two dives together into one with the samples (and events) of 'b' at the specified offset after 'a'. We'll want to use this if a dive computer has decided that the dive ended (due to a pause at the surface), but we really want to just turn the two computer dives into one long one with an extended surface swim. No functional changes, but some independent cleanups due to the trip simplifications. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/dive.h b/dive.h
index 8a79de0b2..97668477c 100644
--- a/dive.h
+++ b/dive.h
@@ -413,7 +413,8 @@ extern void finish_sample(struct dive *dive);
extern void report_dives(gboolean imported);
extern struct dive *fixup_dive(struct dive *dive);
-extern struct dive *try_to_merge(struct dive *a, struct dive *b, struct dive *next);
+extern struct dive *merge_dives(struct dive *a, struct dive *b, int offset);
+extern struct dive *try_to_merge(struct dive *a, struct dive *b);
extern void renumber_dives(int nr);