summaryrefslogtreecommitdiffstats
path: root/divelist.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-07-20 15:07:57 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-11 08:41:57 -0700
commitd453d5cb37dcec5341c9ef8e6063665dc5b629b8 (patch)
tree315163eca377f38b654b751a89af756282e12235 /divelist.c
parent619c1b3ec9eece0967fc89475a21ff34946eabd6 (diff)
downloadsubsurface-d453d5cb37dcec5341c9ef8e6063665dc5b629b8.tar.gz
Rename dive gas function and defines for clarity
This renames the dive gas functions to not talk about just nitrox, and to instead talk about gas. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divelist.c')
-rw-r--r--divelist.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/divelist.c b/divelist.c
index 1e279efca..75ad42f8f 100644
--- a/divelist.c
+++ b/divelist.c
@@ -434,14 +434,14 @@ void update_cylinder_related_info(struct dive *dive)
}
}
-#define MAX_NITROX_STRING 80
+#define MAX_GAS_STRING 80
#define UTF8_ELLIPSIS "\xE2\x80\xA6"
/* callers needs to free the string */
-char *get_nitrox_string(struct dive *dive)
+char *get_dive_gas_string(struct dive *dive)
{
int o2, he, o2low;
- char *buffer = malloc(MAX_NITROX_STRING);
+ char *buffer = malloc(MAX_GAS_STRING);
if (buffer) {
get_dive_gas(dive, &o2, &he, &o2low);
@@ -450,12 +450,12 @@ char *get_nitrox_string(struct dive *dive)
o2low = (o2low + 5) / 10;
if (he)
- snprintf(buffer, MAX_NITROX_STRING, "%d/%d", o2, he);
+ snprintf(buffer, MAX_GAS_STRING, "%d/%d", o2, he);
else if (o2)
if (o2 == o2low)
- snprintf(buffer, MAX_NITROX_STRING, "%d", o2);
+ snprintf(buffer, MAX_GAS_STRING, "%d", o2);
else
- snprintf(buffer, MAX_NITROX_STRING, "%d" UTF8_ELLIPSIS "%d", o2low, o2);
+ snprintf(buffer, MAX_GAS_STRING, "%d" UTF8_ELLIPSIS "%d", o2low, o2);
else
strcpy(buffer, translate("gettextFromC", "air"));
}