summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2015-05-14 23:33:48 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-05-17 15:07:02 -0700
commit907ccb0b7123e55908a10c12c851d47710cac05a (patch)
tree29911be38a2b19ff4758e1794b80bae625f6bc6e
parent253d9ff300e7d3f871fb67c5a16463c08fdef519 (diff)
downloadsubsurface-907ccb0b7123e55908a10c12c851d47710cac05a.tar.gz
Allow "oxygen" as a gas name
...as this what comes in when the user selects this gas in the add dive/dive planner contet menu. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--planner.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/planner.c b/planner.c
index ed7687ec9..92ddc8491 100644
--- a/planner.c
+++ b/planner.c
@@ -1179,6 +1179,10 @@ int validate_gas(const char *text, struct gasmix *gas)
o2 = O2_IN_AIR;
he = 0;
text += strlen(translate("gettextFromC", "air"));
+ } else if (!strcasecmp(text, translate("gettextFromC", "oxygen"))) {
+ o2 = 1000;
+ he = 0;
+ text += strlen(translate("gettextFromC", "oxygen"));
} else if (!strncasecmp(text, translate("gettextFromC", "ean"), 3)) {
o2 = get_permille(text + 3, &text);
he = 0;