]> git.tdb.fi Git - ext/subsurface.git/blobdiff - dive.h
Further work on libdivecomputer integration
[ext/subsurface.git] / dive.h
diff --git a/dive.h b/dive.h
index 3ed233ddbc85830d19670926e60f3484b2b15aa2..d96e0102d443fd91f5b62c8348d9f2cb70ed20af 100644 (file)
--- 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)