summaryrefslogtreecommitdiffstats
path: root/subsurface-core/dive.h
diff options
context:
space:
mode:
Diffstat (limited to 'subsurface-core/dive.h')
-rw-r--r--subsurface-core/dive.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/subsurface-core/dive.h b/subsurface-core/dive.h
index f8970b237..204d34819 100644
--- a/subsurface-core/dive.h
+++ b/subsurface-core/dive.h
@@ -376,6 +376,7 @@ struct picture {
for (struct picture *picture = (_divestruct).picture_list; picture; picture = picture->next)
extern struct picture *alloc_picture();
+extern struct picture *clone_picture(struct picture *src);
extern bool dive_check_picture_time(struct dive *d, int shift_time, timestamp_t timestamp);
extern void dive_create_picture(struct dive *d, char *filename, int shift_time, bool match_all);
extern void dive_add_picture(struct dive *d, struct picture *newpic);
@@ -385,9 +386,10 @@ extern bool picture_check_valid(char *filename, int shift_time);
extern void picture_load_exif_data(struct picture *p);
extern timestamp_t picture_get_timestamp(char *filename);
extern void dive_set_geodata_from_picture(struct dive *d, struct picture *pic);
+extern void picture_free(struct picture *picture);
extern int explicit_first_cylinder(struct dive *dive, struct divecomputer *dc);
-extern int get_depth_at_time(struct divecomputer *dc, int time);
+extern int get_depth_at_time(struct divecomputer *dc, unsigned int time);
static inline int get_surface_pressure_in_mbar(const struct dive *dive, bool non_null)
{
@@ -493,7 +495,7 @@ extern const struct units SI_units, IMPERIAL_units;
extern struct units xml_parsing_units;
extern struct units *get_units(void);
-extern int run_survey, verbose, quit;
+extern int run_survey, verbose, quit, force_root;
struct dive_table {
int nr, allocated, preexisting;
@@ -567,7 +569,7 @@ static inline struct divecomputer *get_dive_dc(struct dive *dive, int nr)
extern timestamp_t dive_endtime(const struct dive *dive);
extern void make_first_dc(void);
-extern int count_divecomputers(void);
+extern unsigned int count_divecomputers(void);
extern void delete_current_divecomputer(void);
/*
@@ -695,6 +697,7 @@ extern struct zip *subsurface_zip_open_readonly(const char *path, int flags, int
extern int subsurface_zip_close(struct zip *zip);
extern void subsurface_console_init(bool dedicated);
extern void subsurface_console_exit(void);
+extern bool subsurface_user_is_root(void);
extern void shift_times(const timestamp_t amount);
extern timestamp_t get_times();
@@ -728,7 +731,6 @@ extern unsigned int dc_watertemp(struct divecomputer *dc);
extern int split_dive(struct dive *);
extern struct dive *merge_dives(struct dive *a, struct dive *b, int offset, bool prefer_downloaded);
extern struct dive *try_to_merge(struct dive *a, struct dive *b, bool prefer_downloaded);
-extern void renumber_dives(int start_nr, bool selected_only);
extern struct event *clone_event(const struct event *src_ev);
extern void copy_events(struct divecomputer *s, struct divecomputer *d);
extern void free_events(struct event *ev);
@@ -737,7 +739,7 @@ extern void copy_samples(struct divecomputer *s, struct divecomputer *d);
extern bool is_cylinder_used(struct dive *dive, int idx);
extern void fill_default_cylinder(cylinder_t *cyl);
extern void add_gas_switch_event(struct dive *dive, struct divecomputer *dc, int time, int idx);
-extern struct event *add_event(struct divecomputer *dc, int time, int type, int flags, int value, const char *name);
+extern struct event *add_event(struct divecomputer *dc, unsigned int time, int type, int flags, int value, const char *name);
extern void remove_event(struct event *event);
extern void update_event_name(struct dive *d, struct event* event, char *name);
extern void add_extra_data(struct divecomputer *dc, const char *key, const char *value);
@@ -792,7 +794,6 @@ extern void subsurface_command_line_exit(int *, char ***);
extern void add_segment(double pressure, const struct gasmix *gasmix, int period_in_seconds, int setpoint, const struct dive *dive, int sac);
extern void clear_deco(double surface_pressure);
extern void dump_tissues(void);
-extern unsigned int deco_allowed_depth(double tissues_tolerance, double surface_pressure, struct dive *dive, bool smooth);
extern void set_gf(short gflow, short gfhigh, bool gf_low_at_maxdepth);
extern void cache_deco_state(char **datap);
extern void restore_deco_state(char *data);
@@ -804,7 +805,7 @@ extern double tissue_tolerance_calc(const struct dive *dive, double pressure);
/* this should be converted to use our types */
struct divedatapoint {
int time;
- unsigned int depth;
+ int depth;
struct gasmix gasmix;
int setpoint;
bool entered;