From cda1b73bf68d1802c32416bce3be0ef84137002e Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sun, 11 Nov 2012 07:20:05 +0100 Subject: 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 Signed-off-by: Dirk Hohndel --- dive.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dive.h') 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); -- cgit v1.2.3-70-g09d2