summaryrefslogtreecommitdiffstats
path: root/planner.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-01 20:56:29 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-01 20:57:11 -0700
commit28093ae957548d5fc1e4d373ca0a345cc1be5069 (patch)
treef8899ae3e24033781bf707ceac959636be063917 /planner.c
parentee36bf8bf34013c35120b6c3cc4ae5edcf74b235 (diff)
downloadsubsurface-28093ae957548d5fc1e4d373ca0a345cc1be5069.tar.gz
Remove is_air() and convert its users to gasmix
Also make gasname() and get_gas_string() global functions (which allows us to delete code elsewhere). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'planner.c')
-rw-r--r--planner.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/planner.c b/planner.c
index 370c8d055..cc8e9d908 100644
--- a/planner.c
+++ b/planner.c
@@ -93,24 +93,6 @@ int get_gasidx(struct dive *dive, struct gasmix *mix)
return -1;
}
-static void get_gas_string(const struct gasmix *gasmix, char *text, int len)
-{
- if (gasmix_is_air(gasmix))
- snprintf(text, len, "%s", translate("gettextFromC", "air"));
- else if (get_he(gasmix) == 0)
- snprintf(text, len, translate("gettextFromC", "EAN%d"), (get_o2(gasmix) + 5) / 10);
- else
- snprintf(text, len, "(%d/%d)", (get_o2(gasmix) + 5) / 10, (get_he(gasmix) + 5) / 10);
-}
-
-/* Returns a static char buffer - only good for immediate use by printf etc */
-static const char *gasname(const struct gasmix *gasmix)
-{
- static char gas[64];
- get_gas_string(gasmix, gas, sizeof(gas));
- return gas;
-}
-
double interpolate_transition(struct dive *dive, int t0, int t1, int d0, int d1, const struct gasmix *gasmix, int ppo2)
{
int j;