diff options
Diffstat (limited to 'dive.c')
-rw-r--r-- | dive.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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 = ¤t_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; |