From ee3bf421e1d61996c12430184c82ee65327a178c Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 12 Jun 2013 12:07:47 -0400 Subject: 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 --- statistics.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); } -- cgit v1.2.3-70-g09d2