diff options
author | Stefan Fuchs <sfuchs@gmx.de> | 2017-10-18 15:58:36 +0200 |
---|---|---|
committer | Robert C. Helling <helling@atdotde.de> | 2017-10-18 17:41:42 +0200 |
commit | ba7be8f3355f854b6810ff093dff8155ddb462d6 (patch) | |
tree | bf35f8adf00b049ab2c7dce7fe332466db1b4995 /core/plannernotes.c | |
parent | 94e563a94e7e265c94c251d9983353cfc5150e2a (diff) | |
download | subsurface-ba7be8f3355f854b6810ff093dff8155ddb462d6.tar.gz |
plannernotes.c coding style fixes
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Diffstat (limited to 'core/plannernotes.c')
-rw-r--r-- | core/plannernotes.c | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/core/plannernotes.c b/core/plannernotes.c index d332bd837..ffbf0b1cb 100644 --- a/core/plannernotes.c +++ b/core/plannernotes.c @@ -320,7 +320,7 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d len += snprintf(buffer + len, sz_buffer - len, "<br>%s: %i<br></div>", temp, dive->otu); /* Print the settings for the diveplan next. */ - if (decoMode() == BUEHLMANN){ + if (decoMode() == BUEHLMANN) { snprintf(temp, sz_temp, translate("gettextFromC", "Deco model: Bühlmann ZHL-16C with GFLow = %d%% and GFHigh = %d%%"), diveplan->gflow, diveplan->gfhigh); } else if (decoMode() == VPMB){ @@ -417,24 +417,26 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d mingas_d_pressure = get_pressure_units(lrint((double)cyl->end.mbar + deco_pressure_mbar - lastbottomdp->minimum_gas.mbar), &pressure_unit); 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), - "<br> — <span style='color: %s;'>%s</span> (%s %.1fx%s/+%d%s@%.0f%s): \ + if (cyl->start.mbar > lastbottomdp->minimum_gas.mbar) { + snprintf(mingas, sizeof(mingas), "<br> — <span style='color: %s;'>%s</span> (%s %.1fx%s/+%d%s@%.0f%s): \ %.0f%s/%.0f%s<span style='color: %s;'>/Δ:%+.0f%s</span>", - 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), "<br> — <span style='color: red;'>%s </span> %s", - translate("gettextFromC", "Warning:"), - translate("gettextFromC", "required minimum gas for ascent already exceeding start pressure of cylinder!")); + 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), "<br> — <span style='color: red;'>%s </span> %s", + translate("gettextFromC", "Warning:"), + translate("gettextFromC", "required minimum gas for ascent already exceeding start pressure of cylinder!")); + } } /* Print the gas consumption for every cylinder here to temp buffer. */ snprintf(temp, sz_temp, translate("gettextFromC", "%.0f%s/%.0f%s of <span style='color: red;'><b>%s</b></span> (%.0f%s/%.0f%s in planned ascent)"), volume, unit, pressure, pressure_unit, gasname(&cyl->gasmix), deco_volume, unit, deco_pressure, pressure_unit); |