Massive cleanup

Mostly coding style and whitespace changes plus making lots of functions
static that have no need to be extern. This also helped find a bit of code
that is actually no longer used.

This should have absolutely no functional impact - all changes should be
purely cosmetic. But it removes a bunch of lines of code and makes the
rest easier to read.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-01-30 08:10:46 +11:00
parent 468d3f28f9
commit e3a8ed5183
17 changed files with 103 additions and 164 deletions

10
deco.c
View file

@ -104,9 +104,9 @@ static double tissue_tolerance_calc(const struct dive *dive)
#if !GF_LOW_AT_MAXDEPTH
lowest_ceiling = (buehlmann_inertgas_b * tissue_inertgas_saturation - gf_low * buehlmann_inertgas_a * buehlmann_inertgas_b) /
((1.0 - buehlmann_inertgas_b) * gf_low + buehlmann_inertgas_b);
if(lowest_ceiling > gf_low_pressure_this_dive)
gf_low_pressure_this_dive = lowest_ceiling;
((1.0 - buehlmann_inertgas_b) * gf_low + buehlmann_inertgas_b);
if (lowest_ceiling > gf_low_pressure_this_dive)
gf_low_pressure_this_dive = lowest_ceiling;
#endif
tissue_tolerated_ambient_pressure[ci] = (-buehlmann_inertgas_a * buehlmann_inertgas_b * (gf_high * gf_low_pressure_this_dive - gf_low * surface) -
@ -258,10 +258,10 @@ unsigned int deco_allowed_depth(double tissues_tolerance, double surface_pressur
depth = rel_mbar_to_depth(pressure_delta * 1000, dive);
if(!smooth)
if (!smooth)
depth = ceil(depth / DECO_STOPS_MULTIPLIER_MM) * DECO_STOPS_MULTIPLIER_MM;
if(depth > 0 && depth < buehlmann_config.last_deco_stop_in_mtr * 1000)
if (depth > 0 && depth < buehlmann_config.last_deco_stop_in_mtr * 1000)
depth = buehlmann_config.last_deco_stop_in_mtr * 1000;
return depth;