#define MAX_CYLINDERS (8)
struct dive {
+ int number;
time_t when;
char *location;
char *notes;
extern struct dive_table dive_table;
+extern int selected_dive;
+#define current_dive (get_dive(selected_dive))
+
static inline struct dive *get_dive(unsigned int nr)
{
if (nr >= dive_table.nr)