diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-31 16:33:20 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-31 16:33:20 -0700 |
commit | 00d798854aa2594b819f50dc135efca96a93adb9 (patch) | |
tree | 7ffccc25fb47c287c7677fc965d29c4e5ae69913 /display.h | |
parent | c17300cfaa7dcc95b70112281491b8fb1a530f8e (diff) | |
download | subsurface-00d798854aa2594b819f50dc135efca96a93adb9.tar.gz |
Start cleaning up dive accessors
I'm going to add a menu to import (and eventually export) dives, and so
we'd like to be able to start out with no dives at all. Right now we
croak if that happens - it's not like the code has been written with
actual end users in mind.
So start cleaning things up. First make the 'current_dive' macro work
right even for invalid dives.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'display.h')
-rw-r--r-- | display.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -6,12 +6,12 @@ #include <cairo.h> extern int selected_dive; +#define current_dive (get_dive(selected_dive)) + extern GtkWidget *dive_profile_frame(void); extern GtkWidget *dive_info_frame(void); extern GtkWidget *create_dive_list(void); extern void update_dive_info(struct dive *dive); extern void repaint_dive(void); -#define current_dive (dive_table.dives[selected_dive]) - #endif |