diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-11-26 23:39:37 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-01-09 20:58:04 -0800 |
commit | ec37c71f5eeb7d4b0c4b8719b52583fadb0b8f4c (patch) | |
tree | b1af183d2fb5c827e940591b90547390eb70c31b /core/divelist.h | |
parent | 7df8d8c888cb8e1cdb12a171a4715c8f5af7c80d (diff) | |
download | subsurface-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/divelist.h')
-rw-r--r-- | core/divelist.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/divelist.h b/core/divelist.h index 49e161191..4cb76ef1c 100644 --- a/core/divelist.h +++ b/core/divelist.h @@ -28,10 +28,10 @@ extern void get_dive_gas(const struct dive *dive, int *o2_p, int *he_p, int *o2l extern int get_divenr(const struct dive *dive); extern int get_divesite_idx(const struct dive_site *ds); extern struct dive_trip *unregister_dive_from_trip(struct dive *dive); -extern void remove_dive_from_trip(struct dive *dive); +extern void remove_dive_from_trip(struct dive *dive, struct trip_table *trip_table); extern dive_trip_t *alloc_trip(void); extern dive_trip_t *create_trip_from_dive(struct dive *dive); -extern dive_trip_t *create_and_hookup_trip_from_dive(struct dive *dive); +extern dive_trip_t *create_and_hookup_trip_from_dive(struct dive *dive, struct trip_table *trip_table); extern dive_trip_t *get_dives_to_autogroup(struct dive_table *table, int start, int *from, int *to, bool *allocated); extern dive_trip_t *get_trip_for_new_dive(struct dive *new_dive, bool *allocated); extern bool consecutive_selected(); |