aboutsummaryrefslogtreecommitdiffstats
path: root/core/libdivecomputer.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-11-26 23:39:37 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-01-09 20:58:04 -0800
commitec37c71f5eeb7d4b0c4b8719b52583fadb0b8f4c (patch)
treeb1af183d2fb5c827e940591b90547390eb70c31b /core/libdivecomputer.c
parent7df8d8c888cb8e1cdb12a171a4715c8f5af7c80d (diff)
downloadsubsurface-ec37c71f5eeb7d4b0c4b8719b52583fadb0b8f4c.tar.gz
Core: add trip_table parameter to trip-functions
Currently trips are added to the global trip table. If we want to make dive-import undoable, we should be able to parse trips of a log-file into a distinct table. Therefore, add a trip_table parameter to - insert_trip() - create_and_hookup_trip_from_dive() - autogroup_dives() - unregister_trip() - remove_dive_from_trip() Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/libdivecomputer.c')
-rw-r--r--core/libdivecomputer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c
index 4d2d29bad..47c769275 100644
--- a/core/libdivecomputer.c
+++ b/core/libdivecomputer.c
@@ -826,7 +826,7 @@ static int dive_cb(const unsigned char *data, unsigned int size,
if (devdata->create_new_trip) {
if (!devdata->trip)
- devdata->trip = create_and_hookup_trip_from_dive(dive);
+ devdata->trip = create_and_hookup_trip_from_dive(dive, &trip_table);
else
add_dive_to_trip(dive, devdata->trip);
}