X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=dive.h;h=d96e0102d443fd91f5b62c8348d9f2cb70ed20af;hb=d5b7f7dc06827cab8dd57d6d373a08d6be111c79;hp=6191b60b9179d2fcde0847cde6efcdbf36ead229;hpb=88dc170af6c1aef2a5c9746f1db53f51c5ae450d;p=ext%2Fsubsurface.git diff --git a/dive.h b/dive.h index 6191b60..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; @@ -128,6 +128,7 @@ struct sample { #define MAX_CYLINDERS (8) struct dive { + int number; time_t when; char *location; char *notes; @@ -165,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)