mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
build: remove extern "C" linkage
No more C source files, no more necessity to use C-linkage. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
03b910ee7f
commit
b56dd13add
104 changed files with 364 additions and 577 deletions
|
@ -216,7 +216,7 @@ static double vpmb_tolerated_ambient_pressure(struct deco_state *ds, double refe
|
|||
return ds->tissue_n2_sat[ci] + ds->tissue_he_sat[ci] + vpmb_config.other_gases_pressure - total_gradient;
|
||||
}
|
||||
|
||||
extern "C" double tissue_tolerance_calc(struct deco_state *ds, const struct dive *dive, double pressure, bool in_planner)
|
||||
double tissue_tolerance_calc(struct deco_state *ds, const struct dive *dive, double pressure, bool in_planner)
|
||||
{
|
||||
int ci = -1;
|
||||
double ret_tolerance_limit_ambient_pressure = 0.0;
|
||||
|
@ -323,7 +323,7 @@ static double calc_surface_phase(double surface_pressure, double he_pressure, do
|
|||
return 0;
|
||||
}
|
||||
|
||||
extern "C" void vpmb_start_gradient(struct deco_state *ds)
|
||||
void vpmb_start_gradient(struct deco_state *ds)
|
||||
{
|
||||
int ci;
|
||||
|
||||
|
@ -333,7 +333,7 @@ extern "C" void vpmb_start_gradient(struct deco_state *ds)
|
|||
}
|
||||
}
|
||||
|
||||
extern "C" void vpmb_next_gradient(struct deco_state *ds, double deco_time, double surface_pressure, bool in_planner)
|
||||
void vpmb_next_gradient(struct deco_state *ds, double deco_time, double surface_pressure, bool in_planner)
|
||||
{
|
||||
int ci;
|
||||
double n2_b, n2_c;
|
||||
|
@ -379,7 +379,7 @@ static double solve_cubic(double A, double B, double C)
|
|||
}
|
||||
|
||||
|
||||
extern "C" void nuclear_regeneration(struct deco_state *ds, double time)
|
||||
void nuclear_regeneration(struct deco_state *ds, double time)
|
||||
{
|
||||
time /= 60.0;
|
||||
int ci;
|
||||
|
@ -411,7 +411,7 @@ static double calc_inner_pressure(double crit_radius, double onset_tension, doub
|
|||
}
|
||||
|
||||
// Calculates the crushing pressure in the given moment. Updates crushing_onset_tension and critical radius if needed
|
||||
extern "C" void calc_crushing_pressure(struct deco_state *ds, double pressure)
|
||||
void calc_crushing_pressure(struct deco_state *ds, double pressure)
|
||||
{
|
||||
int ci;
|
||||
double gradient;
|
||||
|
@ -443,7 +443,7 @@ extern "C" void calc_crushing_pressure(struct deco_state *ds, double pressure)
|
|||
}
|
||||
|
||||
/* add period_in_seconds at the given pressure and gas to the deco calculation */
|
||||
extern "C" void add_segment(struct deco_state *ds, double pressure, struct gasmix gasmix, int period_in_seconds, int ccpo2, enum divemode_t divemode, int, bool in_planner)
|
||||
void add_segment(struct deco_state *ds, double pressure, struct gasmix gasmix, int period_in_seconds, int ccpo2, enum divemode_t divemode, int, bool in_planner)
|
||||
{
|
||||
int ci;
|
||||
struct gas_pressures pressures;
|
||||
|
@ -476,7 +476,7 @@ extern "C" void add_segment(struct deco_state *ds, double pressure, struct gasmi
|
|||
}
|
||||
|
||||
#if DECO_CALC_DEBUG
|
||||
extern "C" void dump_tissues(struct deco_state *ds)
|
||||
void dump_tissues(struct deco_state *ds)
|
||||
{
|
||||
int ci;
|
||||
printf("N2 tissues:");
|
||||
|
@ -489,7 +489,7 @@ extern "C" void dump_tissues(struct deco_state *ds)
|
|||
}
|
||||
#endif
|
||||
|
||||
extern "C" void clear_vpmb_state(struct deco_state *ds)
|
||||
void clear_vpmb_state(struct deco_state *ds)
|
||||
{
|
||||
int ci;
|
||||
for (ci = 0; ci < 16; ci++) {
|
||||
|
@ -501,7 +501,7 @@ extern "C" void clear_vpmb_state(struct deco_state *ds)
|
|||
ds->max_bottom_ceiling_pressure.mbar = 0;
|
||||
}
|
||||
|
||||
extern "C" void clear_deco(struct deco_state *ds, double surface_pressure, bool in_planner)
|
||||
void clear_deco(struct deco_state *ds, double surface_pressure, bool in_planner)
|
||||
{
|
||||
int ci;
|
||||
|
||||
|
@ -545,7 +545,7 @@ void deco_state_cache::restore(struct deco_state *target, bool keep_vpmb_state)
|
|||
*target = *data;
|
||||
}
|
||||
|
||||
extern "C" int deco_allowed_depth(double tissues_tolerance, double surface_pressure, const struct dive *dive, bool smooth)
|
||||
int deco_allowed_depth(double tissues_tolerance, double surface_pressure, const struct dive *dive, bool smooth)
|
||||
{
|
||||
int depth;
|
||||
double pressure_delta;
|
||||
|
@ -564,7 +564,7 @@ extern "C" int deco_allowed_depth(double tissues_tolerance, double surface_press
|
|||
return depth;
|
||||
}
|
||||
|
||||
extern "C" void set_gf(short gflow, short gfhigh)
|
||||
void set_gf(short gflow, short gfhigh)
|
||||
{
|
||||
if (gflow != -1)
|
||||
buehlmann_config.gf_low = (double)gflow / 100.0;
|
||||
|
@ -572,7 +572,7 @@ extern "C" void set_gf(short gflow, short gfhigh)
|
|||
buehlmann_config.gf_high = (double)gfhigh / 100.0;
|
||||
}
|
||||
|
||||
extern "C" void set_vpmb_conservatism(short conservatism)
|
||||
void set_vpmb_conservatism(short conservatism)
|
||||
{
|
||||
if (conservatism < 0)
|
||||
vpmb_config.conservatism = 0;
|
||||
|
@ -582,7 +582,7 @@ extern "C" void set_vpmb_conservatism(short conservatism)
|
|||
vpmb_config.conservatism = conservatism;
|
||||
}
|
||||
|
||||
extern "C" double get_gf(struct deco_state *ds, double ambpressure_bar, const struct dive *dive)
|
||||
double get_gf(struct deco_state *ds, double ambpressure_bar, const struct dive *dive)
|
||||
{
|
||||
double surface_pressure_bar = get_surface_pressure_in_mbar(dive, true) / 1000.0;
|
||||
double gf_low = buehlmann_config.gf_low;
|
||||
|
@ -596,7 +596,7 @@ extern "C" double get_gf(struct deco_state *ds, double ambpressure_bar, const st
|
|||
return gf;
|
||||
}
|
||||
|
||||
extern "C" double regressiona(const struct deco_state *ds)
|
||||
double regressiona(const struct deco_state *ds)
|
||||
{
|
||||
if (ds->sum1 > 1) {
|
||||
double avxy = ds->sumxy / ds->sum1;
|
||||
|
@ -609,7 +609,7 @@ extern "C" double regressiona(const struct deco_state *ds)
|
|||
return 0.0;
|
||||
}
|
||||
|
||||
extern "C" double regressionb(const struct deco_state *ds)
|
||||
double regressionb(const struct deco_state *ds)
|
||||
{
|
||||
if (ds->sum1)
|
||||
return ds->sumy / ds->sum1 - ds->sumx * regressiona(ds) / ds->sum1;
|
||||
|
@ -617,14 +617,14 @@ extern "C" double regressionb(const struct deco_state *ds)
|
|||
return 0.0;
|
||||
}
|
||||
|
||||
extern "C" void reset_regression(struct deco_state *ds)
|
||||
void reset_regression(struct deco_state *ds)
|
||||
{
|
||||
ds->sum1 = 0;
|
||||
ds->sumxx = ds->sumx = 0L;
|
||||
ds->sumy = ds->sumxy = 0.0;
|
||||
}
|
||||
|
||||
extern "C" void update_regression(struct deco_state *ds, const struct dive *dive)
|
||||
void update_regression(struct deco_state *ds, const struct dive *dive)
|
||||
{
|
||||
if (!ds->plot_depth)
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue