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>
This commit is contained in:
Dirk Hohndel 2013-06-12 12:07:47 -04:00
parent 04a7374917
commit ee3bf421e1

View file

@ -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);
}