Dive list: move trip merging logic into divelist.c

This also fixes a couple of issues with the existing code:
- removes a memory leak
- treats null and "" the same

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-05-24 14:02:08 -07:00
parent 10e5675151
commit e4b8cf89a1
3 changed files with 21 additions and 9 deletions

View file

@ -32,6 +32,7 @@ extern void select_dive(int idx);
extern void deselect_dive(int idx);
extern void select_dives_in_trip(struct dive_trip *trip);
extern void deselect_dives_in_trip(struct dive_trip *trip);
extern void combine_trips(struct dive_trip *trip_a, struct dive_trip *trip_b);
extern void find_new_trip_start_time(dive_trip_t *trip);
extern struct dive *first_selected_dive();
extern struct dive *last_selected_dive();