aboutsummaryrefslogtreecommitdiffstats
path: root/core/divelist.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-05-31 16:09:14 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-06-19 13:11:10 -0700
commit7f4d9db962e73aa5d5089c43c99b78b3690ffb87 (patch)
tree87e143b80ed394fc321765885a75cac229bf9f18 /core/divelist.h
parentf1c2cd375e295730d92e23093e44777baf838f1d (diff)
downloadsubsurface-7f4d9db962e73aa5d5089c43c99b78b3690ffb87.tar.gz
Cleanup: move trip-related functions into own translation unit
These functions were spread out over dive.c and divelist.c. Move them into their own file to make all this a bit less monolithic. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/divelist.h')
-rw-r--r--core/divelist.h18
1 files changed, 3 insertions, 15 deletions
diff --git a/core/divelist.h b/core/divelist.h
index 86f40941f..f2e243b00 100644
--- a/core/divelist.h
+++ b/core/divelist.h
@@ -35,33 +35,23 @@ extern struct dive **grow_dive_table(struct dive_table *table);
extern int dive_table_get_insertion_index(struct dive_table *table, struct dive *dive);
extern void add_to_dive_table(struct dive_table *table, int idx, struct dive *dive);
extern void append_dive(struct dive *dive);
+extern void insert_dive(struct dive_table *table, struct dive *d);
extern void get_dive_gas(const struct dive *dive, int *o2_p, int *he_p, int *o2low_p);
extern int get_divenr(const struct dive *dive);
-extern struct dive_trip *unregister_dive_from_trip(struct dive *dive);
extern int remove_dive(const struct dive *dive, struct dive_table *table);
-extern void remove_dive_from_trip(struct dive *dive, struct trip_table *trip_table_arg);
-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, struct trip_table *trip_table_arg);
-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();
extern void select_dive(struct dive *dive);
extern void deselect_dive(struct dive *dive);
-extern void select_dives_in_trip(struct dive_trip *trip);
-extern void deselect_dives_in_trip(struct dive_trip *trip);
extern void filter_dive(struct dive *d, bool shown);
-extern dive_trip_t *combine_trips(struct dive_trip *trip_a, struct dive_trip *trip_b);
extern struct dive *first_selected_dive();
extern struct dive *last_selected_dive();
-extern bool is_trip_before_after(const struct dive *dive, bool before);
extern int get_dive_nr_at_idx(int idx);
extern void set_dive_nr_for_current_dive();
extern timestamp_t get_surface_interval(timestamp_t when);
extern void delete_dive_from_table(struct dive_table *table, int idx);
extern struct dive *find_next_visible_dive(timestamp_t when);
-extern bool trip_is_single_day(const struct dive_trip *trip);
-extern int trip_shown_dives(const struct dive_trip *trip);
+
+extern int comp_dives(const struct dive *a, const struct dive *b);
int get_min_datafile_version();
void reset_min_datafile_version();
@@ -69,13 +59,11 @@ void report_datafile_version(int version);
int get_dive_id_closest_to(timestamp_t when);
void clear_dive_file_data();
void clear_table(struct dive_table *table);
-void clear_trip_table(struct trip_table *table);
typedef enum {PO2VAL, SINGLE_EXP, SINGLE_SLOPE, DAILY_EXP, DAILY_SLOPE, NO_COLUMNS} cns_table_headers;
#ifdef DEBUG_TRIP
extern void dump_selection(void);
-extern void dump_trip_list(void);
#endif
#ifdef __cplusplus