diff --git a/.gitignore b/.gitignore index 8e0dde988090f39f2c977555d3a22e0011f25845..63e30d621fc768df0bf871b42d9e3a3d66afe428 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ cmake-build-debug autodocs test-data removed +build-windows diff --git a/CMakeLists.txt b/CMakeLists.txt index 81f276fffccc981e8b2a979dcf3ff73878fa5f15..d671d9600b4b9e67e7b3e49bd2be5456cb94f548 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,7 @@ endif() set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) if (WIN32 AND NOT MSVC) - add_compile_options(-D__USE_MINGW_ANSI_STDIO) + add_compile_options(-D__USE_MINGW_ANSI_STDIO=1) endif () diff --git a/src/cats/actions/action_population_grid_output.c b/src/cats/actions/action_population_grid_output.c index e961712148c5460ecee60789c04eccedc124ae59..790ec0faa376d8e41c7aa66ce7075c6f85473129 100644 --- a/src/cats/actions/action_population_grid_output.c +++ b/src/cats/actions/action_population_grid_output.c @@ -40,9 +40,10 @@ enum action_status action_save_adults(struct cats_grid *grid, struct cats_config assert(grid != NULL); if (conf->command_line_options.lambda_test) { if (grid->param.parametrization == PARAM_HYBRID) { - log_message(LOG_RAW, "POP,%d,%d,%f,%LF,%Lf,%d\n", conf->time.year_current, get_adult_population(grid, 0, 0), - get_suitability(grid, 0, 0), grid->param.OT, - grid->param.scale_factor, get_adult_carrying_capacity(grid, 0, 0)); + log_message(LOG_RAW, "POP,%d,%d,%f,%f,%f,%d\n", conf->time.year_current, + get_adult_population(grid, 0, 0), + get_suitability(grid, 0, 0), (double) grid->param.OT, + (double) grid->param.scale_factor, get_adult_carrying_capacity(grid, 0, 0)); } return ACTION_NOT_RUN; } diff --git a/src/cats/actions/process_seed_dispersal.c b/src/cats/actions/process_seed_dispersal.c index 3ccce3d455e11f5fd01c9924665d0f6045f6ef17..6f106be8780ec9eba814ee461f936b68c1f263d6 100644 --- a/src/cats/actions/process_seed_dispersal.c +++ b/src/cats/actions/process_seed_dispersal.c @@ -56,13 +56,13 @@ struct dispersal_stats { void print_dispersal_stats(struct cats_configuration *conf, struct cats_grid *grid, struct dispersal_stats *stats) { const double area_p = 100.0 / (double) raster_cell_count(grid->dimension); - log_message(LOG_INFO, "%s %4d: grid %d ('%s') seeds were produced in %ld (%0.3f%%) cells", + log_message(LOG_INFO, "%s %4d: grid %d ('%s') seeds were produced in %"PRIi64" (%0.3f%%) cells", conf->time.phase_name, conf->time.year_current, grid->id, conf->param[grid->id].species_name, stats->produced_cells, area_p * (double) stats->produced_cells); - log_message(LOG_INFO, "%s %4d: grid %d ('%s') ... and dispersed into %ld (%0.3f%%) cells", + log_message(LOG_INFO, "%s %4d: grid %d ('%s') ... and dispersed into %"PRIi64"(%0.3f%%) cells", conf->time.phase_name, conf->time.year_current, grid->id, conf->param[grid->id].species_name, stats->seeded_cells_initial, area_p * (double) stats->seeded_cells_initial); - log_message(LOG_INFO, "%s %4d: grid %d ('%s') ... after poisson in %ld (%0.3f%%) cells", + log_message(LOG_INFO, "%s %4d: grid %d ('%s') ... after poisson in %"PRIi64" (%0.3f%%) cells", conf->time.phase_name, conf->time.year_current, grid->id, conf->param[grid->id].species_name, stats->seeded_cell_final, area_p * (double) stats->seeded_cell_final); } diff --git a/src/cats/configuration/check_configuration.c b/src/cats/configuration/check_configuration.c index 67260760f04b7d6167eadee33a4848c452a6f2e4..f3dae83058dc9d89cef60e62ec83ab09c21a0656 100644 --- a/src/cats/configuration/check_configuration.c +++ b/src/cats/configuration/check_configuration.c @@ -56,7 +56,7 @@ int32_t int_range_failed(int32_t value, int32_t min_value, int32_t max_value, ch int rate_failed(cats_dt_rates value, char *name) { if (value > 0.0 && value <= 1.0) return 0; - log_message(LOG_ERROR, "%s: %Lf is out of range (1, 0)", name, value); + log_message(LOG_ERROR, "%s: %f is out of range (1, 0)", name, (double) value); return 1; } @@ -64,7 +64,7 @@ int rate_failed(cats_dt_rates value, char *name) int range_float_check_at_least(cats_dt_rates value, cats_dt_rates larger_than, char *name) { if (value < larger_than) { - log_message(LOG_ERROR, "%s out of range: is %Lf, has to be >= %Lf", name, value, larger_than); + log_message(LOG_ERROR, "%s out of range: is %f, has to be >= %f", name, (double) value, (double) larger_than); return 1; } @@ -76,7 +76,7 @@ int range_float_check_at_least(cats_dt_rates value, cats_dt_rates larger_than, c int range_float_check_range_inclusive(cats_dt_rates value, cats_dt_rates lower, cats_dt_rates upper, char *name) { if (value < lower || value > upper || isnan(value)) { - log_message(LOG_ERROR, "%s out of range [%Lf, %Lf]: %Lf", name, lower, upper, value); + log_message(LOG_ERROR, "%s out of range [%f, %f]: %f", name, (double) lower, (double) upper, (double) value); return 1; } @@ -87,7 +87,7 @@ int range_float_check_range_inclusive(cats_dt_rates value, cats_dt_rates lower, int range_float_check_larger_than(cats_dt_rates value, cats_dt_rates larger_than, char *name) { if (value <= larger_than || isnan(value)) { - log_message(LOG_ERROR, "%s out of range: is %Lf, has to be > %Lf", name, value, larger_than); + log_message(LOG_ERROR, "%s out of range: is %f, has to be > %f", name, (double) value, (double) larger_than); return 1; } return 0; diff --git a/src/cats/configuration/configuration.c b/src/cats/configuration/configuration.c index e4907fbcf912fdb35dbe330a8764ef3753c2d8fe..35ed78474e11b09b46374bb3b60325d8b597c3e9 100644 --- a/src/cats/configuration/configuration.c +++ b/src/cats/configuration/configuration.c @@ -48,12 +48,16 @@ #include "inline_vital_rates.h" #include "dispersal/dispersal.h" #include "stats/grid_stats.h" + #ifdef CATS_ON_WINDOWS #include <windows.h> #else + #include <unistd.h> + #endif + void init_cats_configuration(struct cats_configuration *conf) { if (conf == NULL) { @@ -103,8 +107,8 @@ void fix_zts_and_ots(struct cats_configuration *conf) if (conf->param[i].OT <= conf->param[i].ZT) { cats_dt_rates old_zt = conf->param[i].ZT; conf->param[i].ZT = conf->param[i].OT * 0.5; - log_message(LOG_IMPORTANT, "reducing ZT for species %d from %Lf to %Lf (OT is %Lf)", i, old_zt, - conf->param[i].ZT, conf->param[i].OT); + log_message(LOG_IMPORTANT, "reducing ZT for species %d from %f to %f (OT is %f)", i, + (double) old_zt, (double) conf->param[i].ZT, (double) conf->param[i].OT); } } } @@ -135,6 +139,7 @@ void update_juvenile_transition_rates(struct cats_configuration *conf) } } + int32_t get_max_threads(void) { #ifdef CATS_ON_WINDOWS diff --git a/src/cats/configuration/load_configuration_species_params.c b/src/cats/configuration/load_configuration_species_params.c index 250a67f4cb539b17cee540681b25cce8316b3d5e..8bd5ec5c752c5216b1a210d143e78ada9fefc810 100644 --- a/src/cats/configuration/load_configuration_species_params.c +++ b/src/cats/configuration/load_configuration_species_params.c @@ -112,11 +112,11 @@ void load_conf_vital_rate(struct cats_vital_rate *vr, struct cats_configuration } if (req == false && have_max && vr->max_rate != vr->preset.value_maximum && !isnan(vr->preset.value_maximum)) { - log_message(LOG_WARNING, "%s: preset %s specifies %s with %Lf, but user specified value is %Lf", + log_message(LOG_WARNING, "%s: preset %s specifies %s with %f, but user specified value is %f", __func__, get_preset_name(p->presets.preset), vital_rate_maximum, //p->presets.vital_rates[vr_idx].vital_rate_maximum_preset, - vr->preset.value_maximum, - vr->max_rate); + (double) vr->preset.value_maximum, + (double) vr->max_rate); } free(vital_rate_maximum); @@ -169,9 +169,9 @@ void load_plant_species_parameter(struct cats_configuration *conf, struct cats_i if (have_max_adult_cc_fraction && p->presets.have_adult_cc_fraction_preset && p->max_adult_cc_fraction != p->presets.adult_cc_fraction_preset) { log_message(LOG_WARNING, - "%s: preset %s specifies 'maximum adult fraction of carrying capacity = %Lf', but user specified value is %Lf", - __func__, get_preset_name(preset), p->presets.adult_cc_fraction_preset, - p->max_adult_cc_fraction); + "%s: preset %s specifies 'maximum adult fraction of carrying capacity = %f', but user specified value is %f", + __func__, get_preset_name(preset), (double) p->presets.adult_cc_fraction_preset, + (double) p->max_adult_cc_fraction); } load_conf_value(false, ini, species_name, "hapaxanthy", &p->hapaxanthy); @@ -248,7 +248,7 @@ void load_config_species_parameter(struct cats_configuration *conf, struct cats_ load_conf_value(need_ZT_OT, ini, species_section, "ZT", &p->ZT); if (need_ZT_OT && p->ZT >= p->OT) { - log_message(LOG_ERROR, "ZT %Lf >= OT %Lf, ZT must be lower than OT!", p->ZT, p->OT); + log_message(LOG_ERROR, "ZT %f >= OT %f, ZT must be lower than OT!", (double) p->ZT, (double) p->OT); exit_cats(EXIT_FAILURE); } diff --git a/src/cats/configuration/load_vital_rates.c b/src/cats/configuration/load_vital_rates.c index 228326b55759940e11316bbab095808a8404c41f..8788a52a48f211031b9c39a48f92f51d0ba8259c 100644 --- a/src/cats/configuration/load_vital_rates.c +++ b/src/cats/configuration/load_vital_rates.c @@ -140,11 +140,13 @@ void conf_load_vital_rate_hybrid_information(struct cats_vital_rate *vr, struct char *cutoff_value = NULL; char *vr_minimum_value = NULL; - bool have_minimum = load_conf_value(false, ini, species_section, vital_rate_minimum, &vr_minimum_value); // VR::ignored:: + bool have_minimum = load_conf_value(false, ini, species_section, vital_rate_minimum, + &vr_minimum_value); // VR::ignored:: free(vital_rate_minimum); free(vr_minimum_value); - load_conf_value(false, ini, species_section, vital_rate_function, &function_name); // VR::type=string (link function),mode=hybrid::CONF:species:<VITAL RATE>:function + load_conf_value(false, ini, species_section, vital_rate_function, + &function_name); // VR::type=string (link function),mode=hybrid::CONF:species:<VITAL RATE>:function if (function_name) { enum cats_rate_function_type func_type = get_function_type(conf, @@ -206,12 +208,12 @@ void conf_load_vital_rate_scale_information(struct cats_vital_rate *vr, struct c if (have_min_scale_preset && have_rate_scale) { log_message(LOG_WARNING, - "%s: user specified value '%s = %Lf' takes precedence over value '%s minimum scale factor = %Lf' " + "%s: user specified value '%s = %f' takes precedence over value '%s minimum scale factor = %f' " "specified by preset '%s'", __func__, vital_rate_scale_factor, - vr->rate_scale_factor, vr_name, + (double) vr->rate_scale_factor, vr_name, //p->presets.vital_rates[vr_idx].rate_minimum_scale_factor_preset, - vr->preset.value_minimum_scale_factor, + (double) vr->preset.value_minimum_scale_factor, param->preset_name); vr->rate_minimum_scale_factor = -1.0; } @@ -223,13 +225,13 @@ void conf_load_vital_rate_scale_information(struct cats_vital_rate *vr, struct c //p->presets.vital_rates[vr_idx].rate_minimum_scale_factor_preset vr->preset.value_minimum_scale_factor ) { - log_message(LOG_WARNING, "%s: user specified value '%s' is %Lf, but " - "preset '%s' is %Lf ", + log_message(LOG_WARNING, "%s: user specified value '%s' is %f, but " + "preset '%s' is %f ", __func__, vital_rate_minimum_scale_factor, - vr->rate_minimum_scale_factor, + (double) vr->rate_minimum_scale_factor, get_preset_name(param->presets.preset), //p->presets.vital_rates[vr_idx].rate_minimum_scale_factor_preset - vr->preset.value_minimum_scale_factor); + (double) vr->preset.value_minimum_scale_factor); } if (have_rate_scale_min || have_rate_scale) @@ -289,8 +291,8 @@ void update_vital_rate_hybrid_density_thresholds(struct cats_vital_rate *vr, str if (have_dens == true && have_density_ts == false) { set_vital_density(vr, param->scale_factor); log_message(LOG_IMPORTANT, - "species '%s': setting density threshold for '%s' to scale factor %Lf (no default found)", - species_name, vr->name, param->scale_factor); + "species '%s': setting density threshold for '%s' to scale factor %f (no default found)", + species_name, vr->name, (double) param->scale_factor); } free(vital_rate_density); diff --git a/src/cats/configuration/preset.c b/src/cats/configuration/preset.c index ef0f169005ca60f7f2f5781fdde4abb8737972c0..562e3cfca9ca1f55ecf4348c38599efc244fb9aa 100644 --- a/src/cats/configuration/preset.c +++ b/src/cats/configuration/preset.c @@ -143,8 +143,8 @@ void apply_vr_presets(struct cats_species_param *param) if (preset->have_adult_cc_fraction_preset) { log_message(LOG_INFO, - "\tapplying preset '%s': setting 'maximum adult fraction of carrying capacity' = %Lf", - name, preset->adult_cc_fraction_preset); + "\tapplying preset '%s': setting 'maximum adult fraction of carrying capacity' = %f", + name, (double) preset->adult_cc_fraction_preset); param->max_adult_cc_fraction = preset->adult_cc_fraction_preset; } @@ -161,19 +161,19 @@ void apply_vr_presets(struct cats_species_param *param) struct cats_vital_rate *vr = ¶m->vital_rates[rate_id]; if (vr->preset.have_maximum) { vr->max_rate = vr->preset.value_maximum; - log_message(LOG_INFO, "\tapplying preset '%s': setting '%s maximum' = %Lf", + log_message(LOG_INFO, "\tapplying preset '%s': setting '%s maximum' = %f", name, get_default_vital_rate_name(vr), - vr->preset.value_maximum); + (double) vr->preset.value_maximum); } if (vr->preset.have_minimum_scale_factor) { vr->rate_minimum_scale_factor = vr->preset.value_minimum_scale_factor; param->vital_rates[rate_id].have_rate_non_default_scale_factor = true; - log_message(LOG_INFO, "\tapplying preset '%s': setting '%s minimum scale factor' = %Lf", + log_message(LOG_INFO, "\tapplying preset '%s': setting '%s minimum scale factor' = %f", name, get_default_vital_rate_name(¶m->vital_rates[rate_id]), - vr->preset.value_minimum_scale_factor); + (double) vr->preset.value_minimum_scale_factor); } } diff --git a/src/cats/hybrid/scalefactor.c b/src/cats/hybrid/scalefactor.c index defe588b36e578302fc9e6777ba658972cbcb963..63ded6208db510824ba8c799a9712c53cd07280a 100644 --- a/src/cats/hybrid/scalefactor.c +++ b/src/cats/hybrid/scalefactor.c @@ -105,7 +105,8 @@ cats_dt_rates calculate_scale_factor_from_lambda(struct cats_configuration *conf conf->direct_scale_factor = s; cats_dt_rates old_s = s; lambda = calculate_lambda(conf, &l_param, true, func); - log_message(LOG_INFO, "iteration %d: scale factor %0.25Lf resulted in lambda %0.25Lf", iterations, s, lambda); + log_message(LOG_INFO, "iteration %d: scale factor %0.25f resulted in lambda %0.25f", iterations, + (double) s, (double) lambda); if (fabsl(lambda - 1.0) < threshold) { conf->lambda_at_OT = lambda; @@ -134,15 +135,18 @@ cats_dt_rates calculate_scale_factor_from_lambda(struct cats_configuration *conf int32_t max_iterations = 100; if (iterations == 50) { threshold = LAMBDA_EPS * 10.0; - log_message(LOG_IMPORTANT, "%s: decreasing lambda threshold to %Lf", __func__, threshold); + log_message(LOG_IMPORTANT, "%s: decreasing lambda threshold to %f", __func__, + (double) threshold); } if (iterations == 75) { threshold = LAMBDA_EPS * 10.0 * 10.0; - log_message(LOG_IMPORTANT, "%s: decreasing lambda threshold to %Lf", __func__, threshold); + log_message(LOG_IMPORTANT, "%s: decreasing lambda threshold to %f", __func__, + (double) threshold); } if (iterations == 95) { threshold = LAMBDA_EPS * 10.0 * 10.0 * 10.0; - log_message(LOG_IMPORTANT, "%s: decreasing lambda threshold to %Lf", __func__, threshold); + log_message(LOG_IMPORTANT, "%s: decreasing lambda threshold to %f", __func__, + (double) threshold); } if (iterations > max_iterations) { log_message(LOG_ERROR, "could not find scale factor after %d iterations", max_iterations); @@ -151,16 +155,16 @@ cats_dt_rates calculate_scale_factor_from_lambda(struct cats_configuration *conf } log_message(LOG_IMPORTANT, - "Setting scale factor to %Lf based on lambda = 1.0 within %Lg at OT %f after %d iterations", - s, - threshold, + "Setting scale factor to %f based on lambda = 1.0 within %g at OT %f after %d iterations", + (double) s, + (double) threshold, OT, iterations); log_message(LOG_IMPORTANT, - "SCALE;%Lf;%Lg;%Lg;%d", - s, - lambda, - threshold, + "SCALE;%f;%g;%g;%d", + (double) s, + (double) lambda, + (double) threshold, iterations); conf->param[species_id].scale_factor = s; conf->direct_scale_factor = s; @@ -173,7 +177,7 @@ cats_dt_rates calculate_scale_factor_from_lambda(struct cats_configuration *conf void set_scale_factor_all_species(struct cats_configuration *conf, cats_dt_rates scale_factor) { - log_message(LOG_INFO, "setting scale factor for all grids directly to %Lf", scale_factor); + log_message(LOG_INFO, "setting scale factor for all grids directly to %f", (double) scale_factor); for (int id = 0; id < conf->grid_count; id++) { conf->param[id].scale_factor = scale_factor; } @@ -203,7 +207,7 @@ void setup_scale_factor(struct cats_configuration *conf, struct program_options if (options->direct_scale_factor > 0 && options->direct_scale_factor < 1) { conf->direct_scale_factor = options->direct_scale_factor; - log_message(LOG_IMPORTANT, "using pre-calculated scale factor %Lf", conf->direct_scale_factor); + log_message(LOG_IMPORTANT, "using pre-calculated scale factor %f", (double) conf->direct_scale_factor); set_scale_factor_all_species(conf, conf->direct_scale_factor); return; } diff --git a/src/cats/inline.h b/src/cats/inline.h index abff19912c400f922a24621d6f1d03bf4f11194b..da78d7702595de8e57ce90e6454941d9b4b5c172 100644 --- a/src/cats/inline.h +++ b/src/cats/inline.h @@ -122,7 +122,7 @@ density_multiplier(enum cats_density_dependence dependence, static inline cats_dt_rates clamp(cats_dt_rates v, cats_dt_rates min, cats_dt_rates max) { if (isinf(v) || isnan(v)) { - log_message(LOG_ERROR, "calculated rate value is out of range: %Lf\n", v); + log_message(LOG_ERROR, "calculated rate value is out of range: %f\n", (double) v); exit(EXIT_FAILURE); } diff --git a/src/cats/inline_population.h b/src/cats/inline_population.h index b5a058e84b72a5c7e00013ac12227e1f879ed307..933b3d0146be4077f0729cef783dc7e0df7a604b 100644 --- a/src/cats/inline_population.h +++ b/src/cats/inline_population.h @@ -63,8 +63,8 @@ static inline cats_dt_population round_population_safe(cats_dt_rates population) assert(population >= 0.0); if (population > CATS_MAX_POPULATION || population < 0.0) { - log_message(LOG_ERROR, "%s: population %Lf out of allowed population range [0, %d].", - __func__, population, CATS_MAX_POPULATION); + log_message(LOG_ERROR, "%s: population %f out of allowed population range [0, %d].", + __func__, (double) population, CATS_MAX_POPULATION); exit(EXIT_FAILURE); } @@ -124,8 +124,8 @@ static inline cats_dt_population round_population_safe_down(cats_dt_rates popula // b) we truncate instead of rounding down, which is the same only for positive values if (population > CATS_MAX_POPULATION || population < 0.0) { - log_message(LOG_ERROR, "%s: population %Lf out of allowed population range [0, %d].", - __func__, population, CATS_MAX_POPULATION); + log_message(LOG_ERROR, "%s: population %f out of allowed population range [0, %d].", + __func__, (double) population, CATS_MAX_POPULATION); exit(EXIT_FAILURE); } @@ -154,8 +154,8 @@ static inline cats_dt_population_sum round_population_sum_safe(cats_dt_rates pop { if (population > CATS_MAX_POPULATION_SUM || population < 0.0) { - log_message(LOG_ERROR, "%s: population %Lf out of allowed population range [0, %ld].", - __func__, population, CATS_MAX_POPULATION_SUM); + log_message(LOG_ERROR, "%s: population %f out of allowed population range [0, %" PRIi64"].", + __func__, (double) population, CATS_MAX_POPULATION_SUM); exit(EXIT_FAILURE); } cats_dt_population_sum result = (cats_dt_population_sum) llroundl(population); diff --git a/src/cats/lambda/lambda.c b/src/cats/lambda/lambda.c index 696b94a7bf94ac3498149e6d2b0cb0045f6c8871..4df3836972545bda35aa98736f08fe1198b0ce5f 100644 --- a/src/cats/lambda/lambda.c +++ b/src/cats/lambda/lambda.c @@ -112,9 +112,9 @@ void debug_lambda_problem(struct cats_configuration *conf, gsl_complex largest_e struct lambda_parameters *l_param) { if (conf->command_line_options.debug_flags & DEBUG_LAMBDA) { - log_message(LOG_ERROR, "Eigenvalue not real and positive: %g + %gi: %0.12Lf\n", + log_message(LOG_ERROR, "Eigenvalue not real and positive: %g + %gi: %0.12f\n", GSL_REAL(largest_eigen_value), - GSL_IMAG(largest_eigen_value), l_param->suitability); + GSL_IMAG(largest_eigen_value), (double) l_param->suitability); } } @@ -152,8 +152,8 @@ void debug_lambda_1_found(struct cats_configuration *conf, int32_t species_id, g get_rate_for_matrix(VR_GERMINATION_TO_ADULT_SURVIVAL, l_param, true); const struct cats_dispersal *dispersal = &conf->dispersal[species_id]; cats_dt_rates local_dispersal = get_average_local_dispersal(dispersal, conf); - log_message(LOG_INFO, "scale factor: %Lf", conf->param[species_id].scale_factor); - log_message(LOG_INFO, "local dispersal: %Lf", local_dispersal); + log_message(LOG_INFO, "scale factor: %f", (double) conf->param[species_id].scale_factor); + log_message(LOG_INFO, "local dispersal: %f", (double) local_dispersal); log_message(LOG_INFO, "resulting matrix\n"); print_matrix(matrix, N, N); diff --git a/src/cats/lambda/leslie_matrix.c b/src/cats/lambda/leslie_matrix.c index eade70badc0f42d58ab2ba387eeb353f6277bb64..413a266d4fe75e46dff700823f5c9f8a259b0735 100644 --- a/src/cats/lambda/leslie_matrix.c +++ b/src/cats/lambda/leslie_matrix.c @@ -60,17 +60,14 @@ get_rate_for_matrix(enum cats_vital_rate_id rate_type, cats_dt_rates rate = calculate_rate(info, N, param, l_param->grid, l_param->row, l_param->col, &override); if (print) { - log_message(LOG_INFO, "%s: %Lf (maximum %Lf) for adult population density %Lf/%Lf", - info->name, rate, info->max_rate, N, K); + log_message(LOG_INFO, "%s: %f (maximum %f) for adult population density %f/%f", + info->name, (double) rate, (double) info->max_rate, (double) N, (double) K); } return rate; } - - - double * create_leslie_matrix(struct cats_configuration *conf, struct lambda_parameters *l_param, bool silent, int32_t *N_out) { @@ -130,23 +127,24 @@ create_leslie_matrix(struct cats_configuration *conf, struct lambda_parameters * hapaxanthy_survival = (1.0 - l_param->param->hapaxanthy) * flowering_frequency; assert(hapaxanthy_survival >= 0); assert(hapaxanthy_survival <= 1.0); - log_message(LOG_INFO, "hapaxanthy survival: %Lf, times flowering frequency %Lf", (1.0 - l_param->param->hapaxanthy), hapaxanthy_survival); + log_message(LOG_INFO, "hapaxanthy survival: %f, times flowering frequency %f", + (double) (1.0 - l_param->param->hapaxanthy), (double) hapaxanthy_survival); } if (print_rate) { - log_message(LOG_INFO, "juvenile transition: %Lf", juvenile_transition_rate); - log_message(LOG_INFO, "local dispersal %Lf", local_dispersal); + log_message(LOG_INFO, "juvenile transition: %f", (double) juvenile_transition_rate); + log_message(LOG_INFO, "local dispersal %f", (double) local_dispersal); } - double m0 = (double) age_specific_maturation_rate(0, juvenile_transition_rate, mat_min, mat_max); double dl = (double) (flowering_frequency * seed_yield * local_dispersal); if (print_rate) { for (int32_t i = 0; i < mat_max + 1; i++) { log_message(LOG_RAW, "m%d = %f\n", i, - (double) age_specific_maturation_rate(i, juvenile_transition_rate, mat_min, mat_max)); + (double) age_specific_maturation_rate(i, juvenile_transition_rate, mat_min, + mat_max)); } log_message(LOG_RAW, "d = %f\n", dl); } @@ -224,7 +222,7 @@ create_leslie_matrix(struct cats_configuration *conf, struct lambda_parameters * juvenile_transition_rate, 0, mat_min, mat_max); matrix[row * N + s] = (double) (germination_rate * (1.0 - m0) * juvenile_survival_rate); #else - matrix[row * N + s] = (double) ( seed_survival * germination_rate * (1.0 - m0)); + matrix[row * N + s] = (double) (seed_survival * germination_rate * (1.0 - m0)); #endif } @@ -254,7 +252,7 @@ create_leslie_matrix(struct cats_configuration *conf, struct lambda_parameters * #ifndef LM_START matrix[row * N + s] = (double) (germination_rate * m0 * adult_survival); #else - matrix[row * N + s] = (double) (seed_survival *germination_rate * m0 * hapaxanthy_survival); + matrix[row * N + s] = (double) (seed_survival * germination_rate * m0 * hapaxanthy_survival); #endif } diff --git a/src/cats/misc/cats_random.c b/src/cats/misc/cats_random.c index 19ad7aca597ab4a6e986fbe3b3ffd333ce4a0e74..878dbe7a33334c5d6513943e927fa65f5071a63e 100644 --- a/src/cats/misc/cats_random.c +++ b/src/cats/misc/cats_random.c @@ -84,8 +84,8 @@ int32_t poisson_undampened(const gsl_rng *rng, cats_dt_rates value) if (value > CATS_MAX_POPULATION) { - log_message(LOG_WARNING, "poisson called on %Lf > %d", - value, CATS_MAX_POPULATION); + log_message(LOG_WARNING, "poisson called on %f > %d", + (double) value, CATS_MAX_POPULATION); abort(); } if (value <= global.poisson_maximum) { @@ -101,8 +101,8 @@ int32_t poisson_undampened(const gsl_rng *rng, cats_dt_rates value) if (result > CATS_MAX_POPULATION) { - log_message(LOG_WARNING, "poisson called on %Lf resulted in %Lf > %d, returning %d", - value, result, CATS_MAX_POPULATION, CATS_MAX_POPULATION); + log_message(LOG_WARNING, "poisson called on %f resulted in %f > %d, returning %d", + (double) value, (double) result, CATS_MAX_POPULATION, CATS_MAX_POPULATION); return CATS_MAX_POPULATION; } int32_t final = (int32_t) result; @@ -124,7 +124,7 @@ int32_t poisson(const gsl_rng *rng, cats_dt_rates value) if (value > CATS_MAX_POPULATION) { - log_message(LOG_WARNING, "poisson called on %Lf > %d", value, CATS_MAX_POPULATION); + log_message(LOG_WARNING, "poisson called on %f > %d", (double) value, CATS_MAX_POPULATION); abort(); } @@ -149,8 +149,8 @@ int32_t poisson(const gsl_rng *rng, cats_dt_rates value) } if (result > CATS_MAX_POPULATION) { - log_message(LOG_WARNING, "poisson result %Lf resulted in %Lf > %d, returning %d", - value, result, CATS_MAX_POPULATION, CATS_MAX_POPULATION); + log_message(LOG_WARNING, "poisson result %f resulted in %f > %d, returning %d", + (double) value, (double) result, CATS_MAX_POPULATION, CATS_MAX_POPULATION); return CATS_MAX_POPULATION; } int32_t final = (int32_t) result; @@ -178,7 +178,7 @@ cats_dt_seeds poisson_seeds_undampened(const gsl_rng *rng, cats_dt_rates value) cats_dt_rates result; if (value > CATS_MAX_SEEDS) { - log_message(LOG_WARNING, "poisson called on %Lf > %f", value, CATS_MAX_SEEDS); + log_message(LOG_WARNING, "poisson called on %f > %f", (double) value, CATS_MAX_SEEDS); abort(); } @@ -194,8 +194,8 @@ cats_dt_seeds poisson_seeds_undampened(const gsl_rng *rng, cats_dt_rates value) } if (result > CATS_MAX_SEEDS) { - log_message(LOG_WARNING, "poisson called on %Lf resulted in %Lf > %f, returning %f", - value, result, CATS_MAX_SEEDS, CATS_MAX_SEEDS); + log_message(LOG_WARNING, "poisson called on %f resulted in %f > %f, returning %f", + (double) value, (double) result, CATS_MAX_SEEDS, CATS_MAX_SEEDS); return CATS_MAX_SEEDS; } cats_dt_seeds final = (cats_dt_seeds) result; @@ -235,8 +235,8 @@ inline cats_dt_seeds poisson_seeds(const gsl_rng *rng, cats_dt_rates value) } if (result > CATS_MAX_SEEDS) { - log_message(LOG_WARNING, "poisson called on %Lf resulted in %Lf > %f, returning %f", - value, result, CATS_MAX_SEEDS, CATS_MAX_SEEDS); + log_message(LOG_WARNING, "poisson called on %f resulted in %f > %f, returning %f", + (double) value, (double) result, CATS_MAX_SEEDS, CATS_MAX_SEEDS); return CATS_MAX_SEEDS; } diff --git a/src/cats/overlays/overlay_exclusion.c b/src/cats/overlays/overlay_exclusion.c index 9f9b5de3b04d17855e3d4f24efecfd4a0c7bcebd..559b40ee97be7b3e21cd46e07574421e304b6007 100644 --- a/src/cats/overlays/overlay_exclusion.c +++ b/src/cats/overlays/overlay_exclusion.c @@ -75,7 +75,7 @@ void destroy_excluded_cells(const struct cats_configuration *conf, struct cats_g } } - log_message(LOG_INFO, "grid %d (%s): %ld cells pruned", grid->id, grid->param.species_name, + log_message(LOG_INFO, "grid %d (%s): %"PRIi64" cells pruned", grid->id, grid->param.species_name, destroyed_cell_count); } diff --git a/src/cats/plants/juvenile_survival_calculation.c b/src/cats/plants/juvenile_survival_calculation.c index 1ab4a29f7521927ccd7cc66c2bf2b89689d7787e..096f922ff9cc20a014075256682307f8b86c0d2b 100644 --- a/src/cats/plants/juvenile_survival_calculation.c +++ b/src/cats/plants/juvenile_survival_calculation.c @@ -30,33 +30,33 @@ void juvenile_start_status_old(int32_t age, cats_dt_rates start, cats_dt_rates n cats_dt_rates juveniles, cats_dt_rates start_pop) { - log_message(LOG_RAW, "Start of year %02d: %08.4Lf: %08.4Lf (%06.4Lf) new adults, %08.4Lf remaining discarded \n", - age, start, new_adults, m, juveniles); + log_message(LOG_RAW, + "Start of year %02d: %08.4f: %08.4f (%06.4f) new adults, %08.4f remaining discarded \n", + age, (double) start, (double) new_adults, (double) m, (double) juveniles); } void juvenile_dead_old(int32_t age, cats_dt_rates juveniles, cats_dt_rates start_pop) { - log_message(LOG_RAW, "ABC:nodes.append(['J%d', 'D', %Lf])\n", age - 1, juveniles / start_pop); + log_message(LOG_RAW, "ABC:nodes.append(['J%d', 'D', %f])\n", age - 1, (double) juveniles / (double) start_pop); } void juvenile_start_status(int32_t age, cats_dt_rates start, cats_dt_rates new_adults, cats_dt_rates m, cats_dt_rates surviving, cats_dt_rates survival_rate) { - log_message(LOG_RAW, "Start of year %02d: %08.4Lf: %08.4Lf (%06.4Lf) new adults, %08.4Lf (%06.4Lf) surviving \n", - age, start, new_adults, m, surviving, - survival_rate); + log_message(LOG_RAW, "Start of year %02d: %08.4f: %08.4f (%06.4f) new adults, %08.4f (%06.4f) surviving \n", + age, (double) start, (double) new_adults, (double) m, (double) surviving, (double) survival_rate); } void print_juvenile_dead(cats_dt_rates dead, cats_dt_rates start_pop, int32_t age) { if (age == 0) { - log_message(LOG_RAW, "ABC:nodes.append(['G', 'D', %Lf])\n", dead / start_pop); + log_message(LOG_RAW, "ABC:nodes.append(['G', 'D', %f])\n", (double) dead / (double) start_pop); } else { - log_message(LOG_RAW, "ABC:nodes.append(['J%d', 'D', %Lf])\n", age, dead / start_pop); + log_message(LOG_RAW, "ABC:nodes.append(['J%d', 'D', %f])\n", age, (double) dead / (double) start_pop); } } @@ -64,10 +64,11 @@ void print_juvenile_dead(cats_dt_rates dead, cats_dt_rates start_pop, int32_t ag void print_juvenile_adults(cats_dt_rates new_adults, cats_dt_rates start_pop, int32_t age) { if (age == 0) { - log_message(LOG_RAW, "ABC:nodes.append(['G', 'A', %Lf])\n", new_adults / start_pop); + log_message(LOG_RAW, "ABC:nodes.append(['G', 'A', %f])\n", (double) new_adults / (double) start_pop); } else { - log_message(LOG_RAW, "ABC:nodes.append(['J%d', 'A', %Lf])\n", age, new_adults / start_pop); + log_message(LOG_RAW, "ABC:nodes.append(['J%d', 'A', %f])\n", age, + (double) new_adults / (double) start_pop); } } @@ -75,10 +76,10 @@ void print_juvenile_adults(cats_dt_rates new_adults, cats_dt_rates start_pop, in void print_juvenile_trans(cats_dt_rates juveniles, cats_dt_rates start_pop, int32_t age) { if (age == 0) { - log_message(LOG_RAW, "ABC:nodes.append(['G', 'J1', %Lf])\n", juveniles / start_pop); + log_message(LOG_RAW, "ABC:nodes.append(['G', 'J1', %f])\n", (double) juveniles / (double) start_pop); } else { - log_message(LOG_RAW, "ABC:nodes.append(['J%d', 'J%d', %Lf])\n", age, age + 1, - juveniles / start_pop); + log_message(LOG_RAW, "ABC:nodes.append(['J%d', 'J%d', %f])\n", age, age + 1, + (double) juveniles / (double) start_pop); } } @@ -91,7 +92,7 @@ calculate_total_survival(cats_dt_rates survival_rate, int32_t age_min, int32_t a cats_dt_rates adults = 0.0; if (print) { - log_message(LOG_RAW, "Testing juvenile survival rate of %Lf\n", survival_rate); + log_message(LOG_RAW, "Testing juvenile survival rate of %f\n", (double) survival_rate); } for (int32_t age = 0; age < age_max + 1; age++) { @@ -145,14 +146,17 @@ cats_dt_rates calculate_survival_rate(cats_dt_rates total_survival, int32_t age_ cats_dt_rates high = 1.0; cats_dt_rates s = total_survival / 2; if (verbose) { - log_message(LOG_RAW, "finding year-to-year survival for total survival rate %Lf from germination to adult with age min and %d age max %d\n", - total_survival, age_min, age_max); + log_message(LOG_RAW, + "finding year-to-year survival for total survival rate %f from germination to adult with age min and %d age max %d\n", + (double) total_survival, age_min, age_max); } int32_t count = 0; while (true) { count++; cats_dt_rates ts = calculate_total_survival(s, age_min, age_max, false); - if (verbose) { log_message(LOG_RAW, "year survival %Lf -> total survival %Lf\n", s, ts); } + if (verbose) { + log_message(LOG_RAW, "year survival %f -> total survival %f\n", (double) s, (double) ts); + } //printf("ts %Lf\n", fabsl(ts - total_survival)/1e-5); if (fabsl(ts - total_survival) < JUV_SURV_DELTA) { @@ -163,13 +167,14 @@ cats_dt_rates calculate_survival_rate(cats_dt_rates total_survival, int32_t age_ if (count > 1000) { log_message(LOG_ERROR, - "could not calculate juvenile transition rate for germination to adult survival rate %Lf", - total_survival); - log_message(LOG_ERROR, "target %Lf, reached %Lf, abs difference %Lg > %g by %Lg", - total_survival, ts, fabsl(ts - total_survival), JUV_SURV_DELTA, - fabsl(ts - total_survival) - JUV_SURV_DELTA); + "could not calculate juvenile transition rate for germination to adult survival rate %f", + (double) total_survival); + log_message(LOG_ERROR, "target %f, reached %f, abs difference %g > %g by %g", + (double) total_survival, (double) ts, (double) fabsl(ts - total_survival), + JUV_SURV_DELTA, + (double) fabsl(ts - total_survival) - JUV_SURV_DELTA); log_message(LOG_ERROR, "minimum and maximum age of maturity are %d and %d ", age_min, age_max); - log_message(LOG_ERROR, "transition rate %Lf", s); + log_message(LOG_ERROR, "transition rate %f", (double) s); exit_cats(EXIT_FAILURE); } @@ -183,7 +188,7 @@ cats_dt_rates calculate_survival_rate(cats_dt_rates total_survival, int32_t age_ } if (verbose) { - log_message(LOG_RAW, "%Lf\n", s); + log_message(LOG_RAW, "%f\n", (double) s); } //printf("done\n"); diff --git a/src/cats/plants/population_stats.c b/src/cats/plants/population_stats.c index c2a05ac3997f2a313d8a6f8c2bd03983d0cbd9c9..d4a53bd0671b50b39ab6821a5ba83c201ce5c366 100644 --- a/src/cats/plants/population_stats.c +++ b/src/cats/plants/population_stats.c @@ -41,7 +41,7 @@ void print_populated_cell_change_carrying_capacity(struct cats_configuration *co log_message(LOG_INFO, - "CC2 : grid %d (%s) populated cells: %ld (%.3f%%) -> %ld (%.3f%%), %ld lost", + "CC2 : grid %d (%s) populated cells: %"PRIi64" (%.3f%%) -> %"PRId64" (%.3f%%), %"PRId64" lost", i, conf->param[i].species_name, old_pop, old_perc, new_pop, new_perc, old_pop - new_pop); if (old_pop < new_pop) exit(1); diff --git a/src/cats/populations/plant_juveniles.c b/src/cats/populations/plant_juveniles.c index 9ad22ff1847d23e3f2a64e5e1e2581a60b342a2a..fd9e70975c8f4174b70fd27627fd40bc6c803922 100644 --- a/src/cats/populations/plant_juveniles.c +++ b/src/cats/populations/plant_juveniles.c @@ -65,8 +65,8 @@ get_weighted_juvenile_sum(const struct cats_grid *grid, cats_dt_coord row, cats_ cats_dt_rates entry = (cats_dt_rates) juveniles[i] * multi; if (entry < 0) { - log_message(LOG_ERROR, "%s: weighted juveniles for stage %d < 0: multiplier %Lf, juveniles %d", - __func__, i, multi, juveniles[i]); + log_message(LOG_ERROR, "%s: weighted juveniles for stage %d < 0: multiplier %f, juveniles %d", + __func__, i, (double) multi, juveniles[i]); fflush(stdout); assert(entry >= 0); exit_cats(EXIT_FAILURE); @@ -118,10 +118,11 @@ scale_down_juveniles2(struct cats_grid *grid, cats_dt_coord row, cats_dt_coord c if (weighted_juvenile_sum > juvenile_cc) { log_message(LOG_ERROR, "%s: weighted juvenile sum > juvenile CC", __func__); log_message(LOG_RAW, "sum: %"PRId64", cc %"PRId64"\n", weighted_juvenile_sum, juvenile_cc); - log_message(LOG_RAW, "factor %Lf\n", factor); + log_message(LOG_RAW, "factor %f\n", (double) factor); for (int32_t i = 0; i < mat_max + 1 - 1; i++) { - log_message(LOG_RAW, "juvenile stage %d: %d - multiplier %Lf\n", i, grid->juveniles[row][col][i], - juvenile_cc_multiplier(&grid->param, i)); + log_message(LOG_RAW, "juvenile stage %d: %d - multiplier %f\n", i, + grid->juveniles[row][col][i], + (double) juvenile_cc_multiplier(&grid->param, i)); } fflush(stdout); exit_cats(EXIT_FAILURE); diff --git a/src/cats/populations/population.c b/src/cats/populations/population.c index 026f8c25550ce034542a8ee8a82ae7ffe07f5e8c..e5143ea6200926e355d00f7725c0ad969b6d75b9 100644 --- a/src/cats/populations/population.c +++ b/src/cats/populations/population.c @@ -111,7 +111,7 @@ void increase_initial_population_to_cc(struct cats_grid *grid, const struct cats } } - log_message(LOG_INFO, "\tset grid %d (%s) %ld populated cells to local carrying capacity", + log_message(LOG_INFO, "\tset grid %d (%s) %"PRId64" populated cells to local carrying capacity", id, conf->param[id].species_name, populated_cells); //(cats_dt_population) (get_max_rate_from_param(&conf->param[id], VR_CARRYING_CAPACITY) / count)); } @@ -127,8 +127,8 @@ void prune_initial_population_under_threshold(struct cats_configuration *conf, s return; } if (grid->param.initial_population.adjusted == true) return; - log_message(LOG_IMPORTANT, "Pruning initial population of '%s' under threshold %Lf", grid->param.species_name, - grid->param.initial_population.suitability_threshold); + log_message(LOG_IMPORTANT, "Pruning initial population of '%s' under threshold %f", grid->param.species_name, + (double) grid->param.initial_population.suitability_threshold); const cats_dt_coord rows = grid->dimension.rows; const cats_dt_coord cols = grid->dimension.cols; @@ -153,7 +153,7 @@ void prune_initial_population_under_threshold(struct cats_configuration *conf, s } } - log_message(LOG_INFO, "Species '%s': pruned %ld of %ld initial populations (suitability < threshold), %ld remaining", + log_message(LOG_INFO, "Species '%s': pruned %"PRId64" of %"PRId64" initial populations (suitability < threshold), %"PRId64" remaining", grid->param.species_name, destroyed, populated, populated - destroyed); } diff --git a/src/cats/stats/global_stats.c b/src/cats/stats/global_stats.c index 5471588345aeb82ef11c528db2143afdd2699c20..2a813746a4bffeab9455e238022f12d8aa2c31d7 100644 --- a/src/cats/stats/global_stats.c +++ b/src/cats/stats/global_stats.c @@ -142,7 +142,7 @@ struct shannon_stats calculate_global_stats(struct cats_configuration *conf, str #else - log_message(LOG_IMPORTANT, "SHANNON: sum %f count %ld = %f", shannon.shannon_sum, shannon.shannon_count, + log_message(LOG_IMPORTANT, "SHANNON: sum %f count %"PRId64" = %f", shannon.shannon_sum, shannon.shannon_count, shannon.shannon_sum / (double) shannon.shannon_count); #endif return shannon; diff --git a/src/cats/vital_rates/setup_rates.c b/src/cats/vital_rates/setup_rates.c index 36a35924ad41548b1070d41fb73f7dacfbc13230..6e3279338b622a125d8cb4e3b89c0ac8e746277e 100644 --- a/src/cats/vital_rates/setup_rates.c +++ b/src/cats/vital_rates/setup_rates.c @@ -73,13 +73,13 @@ set_vital_cutoff(struct cats_vital_rate *vital, const cats_dt_rates value, const vital->suitability_cutoff = value; } else { log_message(LOG_ERROR, - "%s: vital rate '%s' for species '%s': vital rate cutoff '%Lf' out of range [0, OT = %Lf].", + "%s: vital rate '%s' for species '%s': vital rate cutoff '%f' out of range [0, OT = %f].", __func__, vital->name, param->species_name, - value, param->OT); + (double) value, (double) param->OT); if (value > param->OT) { log_message(LOG_ERROR, - "%s: The cut off value must be lower than the occurrence threshold OT = %Lf", - __func__, param->OT); + "%s: The cut off value must be lower than the occurrence threshold OT = %f", + __func__, (double) param->OT); } exit_cats(EXIT_FAILURE); @@ -113,7 +113,8 @@ void set_vital_density(struct cats_vital_rate *vital, enum cats_density_dependen { assert(vital != NULL); if (vital->is_carrying_capacity && density != NO_DENSITY_DEP) { - log_message(LOG_ERROR, "%s (%s): carrying capacity may never depend on population density", __func__, vital->name); + log_message(LOG_ERROR, "%s (%s): carrying capacity may never depend on population density", __func__, + vital->name); exit_cats(EXIT_FAILURE); } vital->density = density; @@ -124,8 +125,8 @@ void set_vital_density_ts(struct cats_vital_rate *vital, cats_dt_rates ts) { assert(vital != NULL); if (isnan(ts) || ts < 0 || ts > 1) { - log_message(LOG_ERROR, "%s: vital rate '%s' density threshold not in range [0, 1]: %Lf", __func__, - vital->name, ts); + log_message(LOG_ERROR, "%s: vital rate '%s' density threshold not in range [0, 1]: %f", __func__, + vital->name, (double) ts); } vital->density_ts = ts; } diff --git a/src/cats/vital_rates/vital_rate_ranges.c b/src/cats/vital_rates/vital_rate_ranges.c index a5eaba53cc034026759d3f58c60096ac51b5e722..6d3601e7f1d3b05ec75adead7997262c64d85490 100644 --- a/src/cats/vital_rates/vital_rate_ranges.c +++ b/src/cats/vital_rates/vital_rate_ranges.c @@ -80,8 +80,9 @@ int check_vital_rate_all(struct cats_vital_rate *vr) if (is_set(vr->lower_limit_excl) && vr->max_rate <= vr->lower_limit_excl) error++; if (error) { - log_message(LOG_ERROR, "%s: vital rate '%s' maximum value %Lf outside of allowed range %s%Lf, %Lf%s ", - __func__, vr->name, vr->max_rate, lower_symbol, lower, upper, upper_symbol); + log_message(LOG_ERROR, "%s: vital rate '%s' maximum value %f outside of allowed range %s%f, %f%s ", + __func__, vr->name, (double) vr->max_rate, lower_symbol, (double) lower, (double) upper, + upper_symbol); } return error > 0; diff --git a/src/cats_strings/pretty_print.c b/src/cats_strings/pretty_print.c index 42219bd605abea013dfd476993c5f8d11af83701..e9ad133f4ba5e4dfe5d5259ab7da7088f19aca14 100644 --- a/src/cats_strings/pretty_print.c +++ b/src/cats_strings/pretty_print.c @@ -26,7 +26,6 @@ #include "cats_strings.h" #include "logging/logging.h" - void print_string(int indent, const char *name, const char *value) { indent *= 2; @@ -79,6 +78,6 @@ void print_rate(int indent, const char *name, long double value) { indent *= 2; if (indent > 0) log_message(LOG_RAW, "%*s", indent, ""); - log_message(LOG_RAW, "%-*s%*Lf\n", PAD_NAME - indent, name, PAD_VALUE, value); + log_message(LOG_RAW, "%-*s%*f\n", PAD_NAME - indent, name, PAD_VALUE, (double) value); } diff --git a/src/tests/csv_test.c b/src/tests/csv_test.c index a29ef4f9130164c1ed7d4744f9863909381c9598..e8d9176aa93c9f64211f5b9db02a7a8934654e99 100644 --- a/src/tests/csv_test.c +++ b/src/tests/csv_test.c @@ -24,7 +24,6 @@ #include <stdarg.h> #include <setjmp.h> #include <cmocka.h> -#include <bits/types/FILE.h> #include <stdio.h> #include "memory/cats_memory.h" #include "cats_strings/cats_strings.h"