X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=dive.h;h=d96e0102d443fd91f5b62c8348d9f2cb70ed20af;hb=a9f74044ae228f912515bebc983f872aa7f37695;hp=3ed233ddbc85830d19670926e60f3484b2b15aa2;hpb=1cc62d581158d52252f2ad7ef076811129510141;p=ext%2Fsubsurface.git diff --git a/dive.h b/dive.h index 3ed233d..d96e010 100644 --- a/dive.h +++ b/dive.h @@ -69,10 +69,10 @@ typedef struct { int grams; } weight_t; -typedef struct { +struct gasmix { fraction_t o2; fraction_t he; -} gasmix_t; +}; typedef struct { volume_t size; @@ -82,7 +82,7 @@ typedef struct { typedef struct { cylinder_type_t type; - gasmix_t gasmix; + struct gasmix gasmix; pressure_t start, end; } cylinder_t; @@ -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)