ECC-1335: Remove deprecated functions

This commit is contained in:
Shahram Najm 2022-05-19 11:02:35 +01:00
parent a21b7c422f
commit 63988c67a9
7 changed files with 11 additions and 33 deletions

View File

@ -520,22 +520,6 @@ void codes_get_reduced_row_p(long pl, double lon_first, double lon_last, long* n
grib_get_reduced_row_p(pl, lon_first, lon_last, npoints, olon_first, olon_last);
}
grib_box* codes_box_new(grib_handle* h, int* error)
{
/* This function is deprecated and will later be removed */
return grib_box_new(h, error);
}
grib_points* codes_box_get_points(grib_box* box, double north, double west, double south, double east, int* err)
{
/* This function is deprecated and will later be removed */
return grib_box_get_points(box, north, west, south, east, err);
}
int codes_points_get_values(grib_handle* h, grib_points* points, double* val)
{
/* This function is deprecated and will later be removed */
return grib_points_get_values(h, points, val);
}
void codes_context_delete(grib_context* c)
{
grib_context_delete(c);

View File

@ -1231,9 +1231,6 @@ int codes_get_product_kind(const codes_handle* h, ProductKind* product_kind);
int codes_check_message_header(const void* bytes, size_t length, ProductKind product);
int codes_check_message_footer(const void* bytes, size_t length, ProductKind product);
codes_box* codes_box_new(codes_handle* h, int* error) ECCODES_DEPRECATED;
codes_points* codes_box_get_points(codes_box* box, double north, double west, double south, double east, int* err) ECCODES_DEPRECATED;
int codes_points_get_values(codes_handle* h, codes_points* points, double* val) ECCODES_DEPRECATED;
/* --------------------------------------- */

View File

@ -1324,10 +1324,7 @@ grib_expression* new_string_expression(grib_context* c, const char* value);
grib_expression* new_sub_string_expression(grib_context* c, const char* value, size_t start, size_t length);
/* grib_box.c */
grib_points* grib_box_get_points(grib_box* box, double north, double west, double south, double east, int* err);
int grib_box_init(grib_box* box, grib_handle* h, grib_arguments* args);
int grib_box_delete(grib_box* box);
grib_points* grib_points_new(grib_context* c, size_t size);
void grib_points_delete(grib_points* points);
/* grib_box_class.c */

View File

@ -142,6 +142,7 @@ static void dump(grib_accessor* a, grib_dumper* dumper)
grib_dump_label(dumper, a, NULL);
}
#if 0
grib_box* grib_box_new(grib_handle* h, int* error)
{
grib_context_log(grib_context_get_default(), GRIB_LOG_ERROR,
@ -149,7 +150,6 @@ grib_box* grib_box_new(grib_handle* h, int* error)
*error = GRIB_INTERNAL_ERROR;
return NULL;
#if 0
grib_accessor* a = NULL;
grib_accessor_box* na = NULL;
grib_box* n = NULL;
@ -166,5 +166,5 @@ grib_box* grib_box_new(grib_handle* h, int* error)
*error = GRIB_SUCCESS;
return n;
#endif
}
#endif

View File

@ -1399,11 +1399,6 @@ struct grib_points
size_t size;
};
/* These box functions are deprecated and will later be removed */
grib_box* grib_box_new(grib_handle* h, int* error);
grib_points* grib_box_get_points(grib_box* box, double north, double west, double south, double east, int* err);
int grib_points_get_values(grib_handle* h, grib_points* points, double* val);
/* --------------------------------------- */
#define GRIB_UTIL_GRID_SPEC_REGULAR_LL 1

View File

@ -17,14 +17,14 @@
#include "grib_api_internal.h"
#if 0
grib_points* grib_box_get_points(grib_box* box, double north, double west, double south, double east, int* err)
{
grib_context_log(grib_context_get_default(), GRIB_LOG_ERROR,
"The grib_box_get_points function is deprecated and will be removed later.");
"The grib_box_get_points function is deprecated.");
*err = GRIB_INTERNAL_ERROR;
return NULL;
#if 0
grib_box_class* c = box->cclass;
while (c) {
grib_box_class* s = c->super ? *(c->super) : NULL;
@ -35,8 +35,8 @@ grib_points* grib_box_get_points(grib_box* box, double north, double west, doubl
}
Assert(0);
return 0;
#endif
}
#endif
/* For this one, ALL init are called */
@ -82,6 +82,7 @@ int grib_box_delete(grib_box* box)
return 0;
}
#if 0
grib_points* grib_points_new(grib_context* c, size_t size)
{
grib_points* points = (grib_points*)grib_context_malloc_clear(c, sizeof(grib_points));
@ -96,6 +97,7 @@ grib_points* grib_points_new(grib_context* c, size_t size)
return points;
}
#endif
void grib_points_delete(grib_points* points)
{

View File

@ -15,6 +15,7 @@
/* This file is generated by ./make_class.pl */
#include "grib_box_class.h"
#if 0
struct table_entry
{
const char* type;
@ -25,9 +26,11 @@ static const struct table_entry table[] = {
/* This file is generated by ./make_class.pl */
#include "grib_box_factory.h"
};
#endif
grib_box* grib_box_factory(grib_handle* h, grib_arguments* args)
{
#if 0
int i;
int ret = GRIB_SUCCESS;
char* type = (char*)grib_arguments_get_name(h, args, 0);
@ -46,6 +49,6 @@ grib_box* grib_box_factory(grib_handle* h, grib_arguments* args)
}
grib_context_log(h->context, GRIB_LOG_ERROR, "grib_box_factory : Unknown type : %s for box", type);
#endif
return NULL;
}