diff options
Diffstat (limited to 'dive.h')
-rw-r--r-- | dive.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -263,6 +263,10 @@ struct dive { struct sample sample[]; }; +/* this is a global spot for a temporary dive structure that we use to + * be able to edit a dive without unintended side effects */ +extern struct dive edit_dive; + extern GList *dive_trip_list; extern gboolean autogroup; /* random threashold: three days without diving -> new trip @@ -272,6 +276,7 @@ extern gboolean autogroup; #define UNGROUPED_DIVE(_dive) ((_dive)->tripflag == NO_TRIP) #define DIVE_IN_TRIP(_dive) ((_dive)->tripflag == IN_TRIP) +#define DIVE_NEEDS_TRIP(_dive) ((_dive)->tripflag == TF_NONE) #define NEXT_TRIP(_entry) ((_entry) ? g_list_next(_entry) : (dive_trip_list)) #define PREV_TRIP(_entry) ((_entry) ? g_list_previous(_entry) : g_list_last(dive_trip_list)) #define DIVE_TRIP(_trip) ((struct dive *)(_trip)->data) @@ -396,6 +401,8 @@ extern void clear_equipment_widgets(void); extern void show_dive_stats(struct dive *); extern void clear_stats_widgets(void); +extern void show_yearly_stats(void); + extern void update_dive(struct dive *new_dive); extern void save_dives(const char *filename); @@ -467,4 +474,6 @@ extern const char *existing_filename; extern const char *subsurface_default_filename(void); #define AIR_PERMILLE 209 +#define FRACTION(n,x) ((unsigned)(n)/(x)),((unsigned)(n)%(x)) + #endif /* DIVE_H */ |