X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=dive.h;h=9e5d2c49e4ab7a1db5fe9cc887887c2e8a703ed4;hb=9cb60c910681b0fb3c04d22c77bcf9c2754bfa7f;hp=3b5e5abd75a0e9b757aaa2f0582be802a3ebbe40;hpb=6538e5bba00b51a7253b6cff927c8774f1b39e2b;p=ext%2Fsubsurface.git diff --git a/dive.h b/dive.h index 3b5e5ab..9e5d2c4 100644 --- a/dive.h +++ b/dive.h @@ -128,7 +128,7 @@ struct sample { #define MAX_CYLINDERS (8) struct dive { - int nr; + int number; time_t when; char *location; char *notes; @@ -166,6 +166,9 @@ struct dive_table { 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)