summaryrefslogtreecommitdiffstats
path: root/dive.c
diff options
context:
space:
mode:
Diffstat (limited to 'dive.c')
-rw-r--r--dive.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/dive.c b/dive.c
index d9943c23f..7e211f163 100644
--- a/dive.c
+++ b/dive.c
@@ -65,6 +65,17 @@ void add_event(struct divecomputer *dc, int time, int type, int flags, int value
remember_event(name);
}
+void remove_event(struct event* event)
+{
+ struct event **ep = &current_dc->events;
+ while (ep && *ep != event)
+ ep = &(*ep)->next;
+ if (ep) {
+ *ep = event->next;
+ free(event);
+ }
+}
+
int get_pressure_units(unsigned int mb, const char **units)
{
int pressure;