diff --git a/src/grib_api_internal.h b/src/grib_api_internal.h index c103badb4..2492aa9a8 100644 --- a/src/grib_api_internal.h +++ b/src/grib_api_internal.h @@ -65,7 +65,6 @@ extern "C" { #include #include #include - #define ecc_snprintf snprintf #else #define strtok_r strtok_s #include @@ -102,8 +101,6 @@ extern "C" { #define strdup(str) _strdup(str) #endif - #define ecc_snprintf _snprintf - #endif /* ifndef ECCODES_ON_WINDOWS */ diff --git a/src/grib_context.c b/src/grib_context.c index 8910c380d..ed2f62850 100644 --- a/src/grib_context.c +++ b/src/grib_context.c @@ -494,7 +494,7 @@ grib_context* grib_context_get_default() const char* defs_extra = getenv("ECCODES_EXTRA_DEFINITION_PATH"); if (defs_extra) { char buffer[ECC_PATH_MAXLEN]= {0,}; - ecc_snprintf(buffer, ECC_PATH_MAXLEN, "%s%c%s", defs_extra, ECC_PATH_DELIMITER_CHAR, default_grib_context.grib_definition_files_path); + snprintf(buffer, ECC_PATH_MAXLEN, "%s%c%s", defs_extra, ECC_PATH_DELIMITER_CHAR, default_grib_context.grib_definition_files_path); free(default_grib_context.grib_definition_files_path); default_grib_context.grib_definition_files_path = strdup(buffer); } @@ -504,7 +504,7 @@ grib_context* grib_context_get_default() /* ECC-1088 */ if (strstr(default_grib_context.grib_definition_files_path, ECCODES_DEFINITION_PATH) == NULL) { char buffer[ECC_PATH_MAXLEN]= {0,}; - ecc_snprintf(buffer, ECC_PATH_MAXLEN, "%s%c%s", default_grib_context.grib_definition_files_path, + snprintf(buffer, ECC_PATH_MAXLEN, "%s%c%s", default_grib_context.grib_definition_files_path, ECC_PATH_DELIMITER_CHAR, ECCODES_DEFINITION_PATH); free(default_grib_context.grib_definition_files_path); default_grib_context.grib_definition_files_path = strdup(buffer); @@ -517,7 +517,7 @@ grib_context* grib_context_get_default() const char* samples_extra = getenv("ECCODES_EXTRA_SAMPLES_PATH"); if (samples_extra) { char buffer[ECC_PATH_MAXLEN]; - ecc_snprintf(buffer, ECC_PATH_MAXLEN, "%s%c%s", samples_extra, ECC_PATH_DELIMITER_CHAR, default_grib_context.grib_samples_path); + snprintf(buffer, ECC_PATH_MAXLEN, "%s%c%s", samples_extra, ECC_PATH_DELIMITER_CHAR, default_grib_context.grib_samples_path); default_grib_context.grib_samples_path = strdup(buffer); } } @@ -525,7 +525,7 @@ grib_context* grib_context_get_default() { if (strstr(default_grib_context.grib_samples_path, ECCODES_SAMPLES_PATH) == NULL) { char buffer[ECC_PATH_MAXLEN]; - ecc_snprintf(buffer, ECC_PATH_MAXLEN, "%s%c%s", default_grib_context.grib_samples_path, + snprintf(buffer, ECC_PATH_MAXLEN, "%s%c%s", default_grib_context.grib_samples_path, ECC_PATH_DELIMITER_CHAR, ECCODES_SAMPLES_PATH); default_grib_context.grib_samples_path = strdup(buffer); } diff --git a/src/grib_jasper_encoding.c b/src/grib_jasper_encoding.c index fe8facf92..1f9e3bd88 100644 --- a/src/grib_jasper_encoding.c +++ b/src/grib_jasper_encoding.c @@ -216,7 +216,7 @@ int grib_jasper_encode(grib_context* c, j2k_encode_helper* helper) if (helper->compression != 0) { /* Lossy */ - ecc_snprintf(opts, MAXOPTSSIZE, "mode=real\nrate=%f", 1.0 / helper->compression); + snprintf(opts, MAXOPTSSIZE, "mode=real\nrate=%f", 1.0 / helper->compression); } Assert(cmpt.width_ * cmpt.height_ * cmpt.cps_ == buflen); diff --git a/tools/grib_to_netcdf.c b/tools/grib_to_netcdf.c index ffc27c143..491af6930 100644 --- a/tools/grib_to_netcdf.c +++ b/tools/grib_to_netcdf.c @@ -4315,7 +4315,7 @@ int grib_tool_finalise_action(grib_runtime_options* options) stat = nc_create(options->outfile->name, creation_mode, &ncid); if (stat != NC_NOERR) { char msg[1024]; - ecc_snprintf(msg, sizeof(msg), "nc_create: '%s'", options->outfile->name); + snprintf(msg, sizeof(msg), "nc_create: '%s'", options->outfile->name); check_err(msg, stat, __LINE__); } @@ -4341,7 +4341,7 @@ int grib_tool_finalise_action(grib_runtime_options* options) for (i = 0; i < count; ++i) { if (subsets[i].fset) { char dataset[100]; - ecc_snprintf(dataset, sizeof(dataset), subsets[i].att.name, i + 1); + snprintf(dataset, sizeof(dataset), subsets[i].att.name, i + 1); put_data(dims, ncid, dataset, &subsets[i]); } else {