]> git.tdb.fi Git - ext/subsurface.git/blobdiff - parse-xml.c
Change calling convention of 'edit_cylinder_info'
[ext/subsurface.git] / parse-xml.c
index 50f83f68bf8845977739e0d2db821f58d1c2bd1f..efae6b61fd196e893cacc46df8fcffc280f21fd9 100644 (file)
@@ -587,6 +587,8 @@ static void try_to_fill_event(const char *name, char *buf)
                return;
        if (MATCH(".flags", get_index, &event.flags))
                return;
+       if (MATCH(".value", get_index, &event.value))
+               return;
        nonmatch("event", name, buf);
 }
 
@@ -1083,7 +1085,7 @@ static void match_standard_cylinder(cylinder_type_t *type)
                return;
 
        cuft = type->size.mliter / 28317.0;
-       cuft *= type->workingpressure.mbar / 1013.25;
+       cuft *= to_ATM(type->workingpressure);
        psi = type->workingpressure.mbar / 68.95;
 
        switch (psi) {
@@ -1138,7 +1140,7 @@ static void sanitize_cylinder_type(cylinder_type_t *type)
 
        if (input_units.volume == CUFT || import_source == SUUNTO) {
                volume_of_air = type->size.mliter * 28.317;     /* milli-cu ft to milliliter */
-               atm = type->workingpressure.mbar / 1013.25;     /* working pressure in atm */
+               atm = to_ATM(type->workingpressure);            /* working pressure in atm */
                volume = volume_of_air / atm;                   /* milliliters at 1 atm: "true size" */
                type->size.mliter = volume + 0.5;
        }