summaryrefslogtreecommitdiffstats
path: root/statistics.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-06-12 12:07:47 -0400
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-06-12 12:07:47 -0400
commitee3bf421e1d61996c12430184c82ee65327a178c (patch)
tree0d48023c071bd4e946cf08fab760c93ea9ae321c /statistics.c
parent04a73749171c4f0ea925b84e1beefa77342d62cd (diff)
downloadsubsurface-ee3bf421e1d61996c12430184c82ee65327a178c.tar.gz
Show EANxx for Nitrox in info tab
Showing all gases (except air) as (o2/he) feels a bit odd, most people would only use the two gas notation if they are actually diving trimix. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'statistics.c')
-rw-r--r--statistics.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/statistics.c b/statistics.c
index 6459b3802..ece5419d9 100644
--- a/statistics.c
+++ b/statistics.c
@@ -352,7 +352,11 @@ char *get_gaslist(struct dive *dive)
if (is_air(o2, he))
snprintf(buf + offset, MAXBUF - offset, (offset > 0) ? ", %s" : "%s", _("air"));
else
- snprintf(buf + offset, MAXBUF - offset, (offset > 0) ? ", %d/%d" : "%d/%d",
+ if (he == 0)
+ snprintf(buf + offset, MAXBUF - offset, (offset > 0) ? _(", EAN%d") : _("EAN%d"),
+ (o2 + 5) / 10);
+ else
+ snprintf(buf + offset, MAXBUF - offset, (offset > 0) ? ", %d/%d" : "%d/%d",
(o2 + 5) / 10, (he + 5) / 10);
offset = strlen(buf);
}