diff --git a/core/plannernotes.c b/core/plannernotes.c
index 44e470948..96a1f1b9c 100644
--- a/core/plannernotes.c
+++ b/core/plannernotes.c
@@ -57,21 +57,21 @@ int add_icd_entry(char *icdbuffer, unsigned int maxsize, struct icd_data *icdval
len += snprintf(icdbuffer + len, maxsize - len, "
%s
", temp);
/* Print gas consumption: This loop covers all cylinders */
@@ -498,20 +498,20 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d
mingas_depth = get_depth_units(lastbottomdp->depth.mm, NULL, &depth_unit);
/* Print it to results */
if (cyl->start.mbar > lastbottomdp->minimum_gas.mbar) {
- snprintf(mingas, sizeof(mingas), "
—
%s (%s %.1fx%s/+%d%s@%.0f%s): "
- "%.0f%s/%.0f%s
/Δ:%+.0f%s",
- mingas_d_pressure > 0 ? "green" :"red",
- translate("gettextFromC", "Minimum gas"),
- translate("gettextFromC", "based on"),
- prefs.sacfactor / 100.0,
- translate("gettextFromC", "SAC"),
- prefs.problemsolvingtime,
- translate("gettextFromC", "min"),
- mingas_depth, depth_unit,
- mingas_volume, unit,
- mingas_pressure, pressure_unit,
- mingas_d_pressure > 0 ? "grey" :"indianred",
- mingas_d_pressure, pressure_unit);
+ snprintf_loc(mingas, sizeof(mingas), "
—
%s (%s %.1fx%s/+%d%s@%.0f%s): "
+ "%.0f%s/%.0f%s
/Δ:%+.0f%s",
+ mingas_d_pressure > 0 ? "green" :"red",
+ translate("gettextFromC", "Minimum gas"),
+ translate("gettextFromC", "based on"),
+ prefs.sacfactor / 100.0,
+ translate("gettextFromC", "SAC"),
+ prefs.problemsolvingtime,
+ translate("gettextFromC", "min"),
+ mingas_depth, depth_unit,
+ mingas_volume, unit,
+ mingas_pressure, pressure_unit,
+ mingas_d_pressure > 0 ? "grey" :"indianred",
+ mingas_d_pressure, pressure_unit);
} else {
snprintf(warning, sizeof(warning), "
—
%s %s",
translate("gettextFromC", "Warning:"),
@@ -520,19 +520,19 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d
}
/* Print the gas consumption for every cylinder here to temp buffer. */
if (lrint(volume) > 0) {
- snprintf(temp, sz_temp, translate("gettextFromC", "%.0f%s/%.0f%s of
%s (%.0f%s/%.0f%s in planned ascent)"),
- volume, unit, pressure, pressure_unit, gasname(&cyl->gasmix), deco_volume, unit, deco_pressure, pressure_unit);
+ snprintf_loc(temp, sz_temp, translate("gettextFromC", "%.0f%s/%.0f%s of
%s (%.0f%s/%.0f%s in planned ascent)"),
+ volume, unit, pressure, pressure_unit, gasname(&cyl->gasmix), deco_volume, unit, deco_pressure, pressure_unit);
} else {
- snprintf(temp, sz_temp, translate("gettextFromC", "%.0f%s/%.0f%s of
%s"),
- volume, unit, pressure, pressure_unit, gasname(&cyl->gasmix));
+ snprintf_loc(temp, sz_temp, translate("gettextFromC", "%.0f%s/%.0f%s of
%s"),
+ volume, unit, pressure, pressure_unit, gasname(&cyl->gasmix));
}
} else {
if (lrint(volume) > 0) {
- snprintf(temp, sz_temp, translate("gettextFromC", "%.0f%s of
%s (%.0f%s during planned ascent)"),
- volume, unit, gasname(&cyl->gasmix), deco_volume, unit);
+ snprintf_loc(temp, sz_temp, translate("gettextFromC", "%.0f%s of
%s (%.0f%s during planned ascent)"),
+ volume, unit, gasname(&cyl->gasmix), deco_volume, unit);
} else {
- snprintf(temp, sz_temp, translate("gettextFromC", "%.0f%s of
%s"),
- volume, unit, gasname(&cyl->gasmix));
+ snprintf_loc(temp, sz_temp, translate("gettextFromC", "%.0f%s of
%s"),
+ volume, unit, gasname(&cyl->gasmix));
}
}
/* Gas consumption: Now finally print all strings to output */
@@ -569,9 +569,9 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d
if (!o2warning_exist)
len += snprintf(buffer + len, sz_buffer - len, "
");
o2warning_exist = true;
- snprintf(temp, sz_temp,
- translate("gettextFromC", "high pO₂ value %.2f at %d:%02u with gas %s at depth %.*f %s"),
- pressures.o2, FRACTION(dp->time, 60), gasname(gasmix), decimals, depth_value, depth_unit);
+ snprintf_loc(temp, sz_temp,
+ translate("gettextFromC", "high pO₂ value %.2f at %d:%02u with gas %s at depth %.*f %s"),
+ pressures.o2, FRACTION(dp->time, 60), gasname(gasmix), decimals, depth_value, depth_unit);
len += snprintf(buffer + len, sz_buffer - len, "
%s %s
",
translate("gettextFromC", "Warning:"), temp);
} else if (pressures.o2 < 0.16) {
@@ -582,9 +582,9 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d
if (!o2warning_exist)
len += snprintf(buffer + len, sz_buffer - len, "
");
o2warning_exist = true;
- snprintf(temp, sz_temp,
- translate("gettextFromC", "low pO₂ value %.2f at %d:%02u with gas %s at depth %.*f %s"),
- pressures.o2, FRACTION(dp->time, 60), gasname(gasmix), decimals, depth_value, depth_unit);
+ snprintf_loc(temp, sz_temp,
+ translate("gettextFromC", "low pO₂ value %.2f at %d:%02u with gas %s at depth %.*f %s"),
+ pressures.o2, FRACTION(dp->time, 60), gasname(gasmix), decimals, depth_value, depth_unit);
len += snprintf(buffer + len, sz_buffer - len, "%s %s
",
translate("gettextFromC", "Warning:"), temp);