]> git.tdb.fi Git - ext/subsurface.git/blobdiff - equipment.c
Use the right function to get resource path on Mac
[ext/subsurface.git] / equipment.c
index 023db75d4a256d1cd6ae0bc4dd7f679abed5894c..d2c7891aef4569c334d2a3c210be73aaf51d25cc 100644 (file)
@@ -64,9 +64,8 @@ static int convert_pressure(int mbar, double *p)
        return decimals;
 }
 
-static int convert_volume_pressure(int ml, int mbar, double *v, double *p)
+static void convert_volume_pressure(int ml, int mbar, double *v, double *p)
 {
-       int decimals = 1;
        double volume, pressure;
 
        volume = ml / 1000.0;
@@ -78,13 +77,11 @@ static int convert_volume_pressure(int ml, int mbar, double *v, double *p)
 
                if (output_units.pressure == PSI) {
                        pressure = mbar_to_PSI(mbar);
-                       decimals = 0;
                } else
                        pressure = mbar / 1000.0;
        }
        *v = volume;
        *p = pressure;
-       return decimals;
 }
 
 static void set_cylinder_type_spinbuttons(struct cylinder_widget *cylinder, int ml, int mbar)
@@ -288,7 +285,7 @@ static void show_cylinder(cylinder_t *cyl, struct cylinder_widget *cylinder)
        o2 = cyl->gasmix.o2.permille / 10.0;
        he = cyl->gasmix.he.permille / 10.0;
        if (!o2)
-               o2 = 21.0;
+               o2 = AIR_PERMILLE / 10.0;
        gtk_spin_button_set_value(GTK_SPIN_BUTTON(cylinder->o2), o2);
        gtk_spin_button_set_value(GTK_SPIN_BUTTON(cylinder->he), he);
 }