Expressions: Dead code removal

This commit is contained in:
shahramn 2024-02-23 15:58:16 +00:00
parent 27b7b44eb7
commit be75fa1a78
18 changed files with 111 additions and 302 deletions

View File

@ -1,20 +1,14 @@
typedef const char* string; /* to keep make_class.pl happy */ typedef const char* string; /* to keep make_class.pl happy */
static void init(grib_expression* e);
static void init_class (grib_expression_class*); static void destroy(grib_context*,grib_expression* e);
static void print(grib_context*,grib_expression*,grib_handle*);
static void init(grib_expression* e); static void add_dependency(grib_expression* e, grib_accessor* observer);
static void destroy(grib_context*,grib_expression* e); static string get_name(grib_expression* e);
static int native_type(grib_expression*,grib_handle*);
static void print(grib_context*,grib_expression*,grib_handle*); static int evaluate_long(grib_expression*,grib_handle*,long*);
static void add_dependency(grib_expression* e, grib_accessor* observer); static int evaluate_double(grib_expression*,grib_handle*,double*);
static string get_name(grib_expression* e); static string evaluate_string(grib_expression*,grib_handle*,char*,size_t*,int*);
static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
static int evaluate_double(grib_expression*,grib_handle*,double*);
static string evaluate_string(grib_expression*,grib_handle*,char*,size_t*,int*);
typedef struct grib_expression_NAME{ typedef struct grib_expression_NAME{
grib_expression base; grib_expression base;
@ -28,7 +22,6 @@ static grib_expression_class _grib_expression_class_NAME = {
"NAME", /* name */ "NAME", /* name */
sizeof(grib_expression_NAME),/* size of instance */ sizeof(grib_expression_NAME),/* size of instance */
0, /* inited */ 0, /* inited */
&init_class, /* init_class */
&init, /* constructor */ &init, /* constructor */
&destroy, /* destructor */ &destroy, /* destructor */
&print, &print,
@ -44,8 +37,3 @@ grib_expression_class* grib_expression_class_NAME = &_grib_expression_class_NAME
ADD_TO_FILE grib_expression_class.h extern grib_expression_class* grib_expression_class_NAME; ADD_TO_FILE grib_expression_class.h extern grib_expression_class* grib_expression_class_NAME;
ADD_TO_FILE grib_expression_factory.h { "NAME", &grib_expression_class_NAME, }, ADD_TO_FILE grib_expression_factory.h { "NAME", &grib_expression_class_NAME, },
static void init_class(grib_expression_class* c)
{
INIT
}

View File

@ -1086,7 +1086,6 @@ struct grib_expression_class
size_t size; size_t size;
int inited; int inited;
expression_class_init_proc init_class;
expression_init_proc init; expression_init_proc init;
expression_destroy_proc destroy; expression_destroy_proc destroy;

View File

@ -41,20 +41,14 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */ typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void init_class (grib_expression_class*); static void print(grib_context*,grib_expression*,grib_handle*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static void destroy(grib_context*,grib_expression* e); static string get_name(grib_expression* e);
static int native_type(grib_expression*,grib_handle*);
static void print(grib_context*,grib_expression*,grib_handle*); static int evaluate_long(grib_expression*,grib_handle*,long*);
static void add_dependency(grib_expression* e, grib_accessor* observer); static int evaluate_double(grib_expression*,grib_handle*,double*);
static string get_name(grib_expression* e); static string evaluate_string(grib_expression*,grib_handle*,char*,size_t*,int*);
static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
static int evaluate_double(grib_expression*,grib_handle*,double*);
static string evaluate_string(grib_expression*,grib_handle*,char*,size_t*,int*);
typedef struct grib_expression_accessor{ typedef struct grib_expression_accessor{
grib_expression base; grib_expression base;
@ -70,7 +64,6 @@ static grib_expression_class _grib_expression_class_accessor = {
"accessor", /* name */ "accessor", /* name */
sizeof(grib_expression_accessor),/* size of instance */ sizeof(grib_expression_accessor),/* size of instance */
0, /* inited */ 0, /* inited */
&init_class, /* init_class */
0, /* constructor */ 0, /* constructor */
&destroy, /* destructor */ &destroy, /* destructor */
&print, &print,
@ -84,10 +77,6 @@ static grib_expression_class _grib_expression_class_accessor = {
grib_expression_class* grib_expression_class_accessor = &_grib_expression_class_accessor; grib_expression_class* grib_expression_class_accessor = &_grib_expression_class_accessor;
static void init_class(grib_expression_class* c)
{
}
/* END_CLASS_IMP */ /* END_CLASS_IMP */
static const char* get_name(grib_expression* g) static const char* get_name(grib_expression* g)

View File

@ -41,18 +41,12 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */ typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void init_class (grib_expression_class*); static void print(grib_context*,grib_expression*,grib_handle*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static void destroy(grib_context*,grib_expression* e); static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
static void print(grib_context*,grib_expression*,grib_handle*); static int evaluate_double(grib_expression*,grib_handle*,double*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
static int evaluate_double(grib_expression*,grib_handle*,double*);
typedef struct grib_expression_binop{ typedef struct grib_expression_binop{
grib_expression base; grib_expression base;
@ -70,7 +64,6 @@ static grib_expression_class _grib_expression_class_binop = {
"binop", /* name */ "binop", /* name */
sizeof(grib_expression_binop),/* size of instance */ sizeof(grib_expression_binop),/* size of instance */
0, /* inited */ 0, /* inited */
&init_class, /* init_class */
0, /* constructor */ 0, /* constructor */
&destroy, /* destructor */ &destroy, /* destructor */
&print, &print,
@ -84,10 +77,6 @@ static grib_expression_class _grib_expression_class_binop = {
grib_expression_class* grib_expression_class_binop = &_grib_expression_class_binop; grib_expression_class* grib_expression_class_binop = &_grib_expression_class_binop;
static void init_class(grib_expression_class* c)
{
}
/* END_CLASS_IMP */ /* END_CLASS_IMP */
static int evaluate_long(grib_expression* g, grib_handle* h, long* lres) static int evaluate_long(grib_expression* g, grib_handle* h, long* lres)

View File

@ -37,18 +37,12 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */ typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void init_class (grib_expression_class*); static void print(grib_context*,grib_expression*,grib_handle*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static void destroy(grib_context*,grib_expression* e); static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
static void print(grib_context*,grib_expression*,grib_handle*); static int evaluate_double(grib_expression*,grib_handle*,double*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
static int evaluate_double(grib_expression*,grib_handle*,double*);
typedef struct grib_expression_double{ typedef struct grib_expression_double{
grib_expression base; grib_expression base;
@ -62,7 +56,6 @@ static grib_expression_class _grib_expression_class_double = {
"double", /* name */ "double", /* name */
sizeof(grib_expression_double),/* size of instance */ sizeof(grib_expression_double),/* size of instance */
0, /* inited */ 0, /* inited */
&init_class, /* init_class */
0, /* constructor */ 0, /* constructor */
&destroy, /* destructor */ &destroy, /* destructor */
&print, &print,
@ -76,10 +69,6 @@ static grib_expression_class _grib_expression_class_double = {
grib_expression_class* grib_expression_class_double = &_grib_expression_class_double; grib_expression_class* grib_expression_class_double = &_grib_expression_class_double;
static void init_class(grib_expression_class* c)
{
}
/* END_CLASS_IMP */ /* END_CLASS_IMP */
static int evaluate_long(grib_expression* g, grib_handle* h, long* lres) static int evaluate_long(grib_expression* g, grib_handle* h, long* lres)

View File

@ -37,17 +37,11 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */ typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void init_class (grib_expression_class*); static void print(grib_context*,grib_expression*,grib_handle*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static void destroy(grib_context*,grib_expression* e); static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
static void print(grib_context*,grib_expression*,grib_handle*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
typedef struct grib_expression_functor{ typedef struct grib_expression_functor{
grib_expression base; grib_expression base;
@ -62,7 +56,6 @@ static grib_expression_class _grib_expression_class_functor = {
"functor", /* name */ "functor", /* name */
sizeof(grib_expression_functor),/* size of instance */ sizeof(grib_expression_functor),/* size of instance */
0, /* inited */ 0, /* inited */
&init_class, /* init_class */
0, /* constructor */ 0, /* constructor */
&destroy, /* destructor */ &destroy, /* destructor */
&print, &print,
@ -76,10 +69,6 @@ static grib_expression_class _grib_expression_class_functor = {
grib_expression_class* grib_expression_class_functor = &_grib_expression_class_functor; grib_expression_class* grib_expression_class_functor = &_grib_expression_class_functor;
static void init_class(grib_expression_class* c)
{
}
/* END_CLASS_IMP */ /* END_CLASS_IMP */
static int evaluate_long(grib_expression* g, grib_handle* h, long* lres) static int evaluate_long(grib_expression* g, grib_handle* h, long* lres)

View File

@ -39,19 +39,13 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */ typedef const char* string; /* to keep make_class.pl happy */
static void print(grib_context*,grib_expression*,grib_handle*);
static void init_class (grib_expression_class*); static void add_dependency(grib_expression* e, grib_accessor* observer);
static string get_name(grib_expression* e);
static int native_type(grib_expression*,grib_handle*);
static void print(grib_context*,grib_expression*,grib_handle*); static int evaluate_long(grib_expression*,grib_handle*,long*);
static void add_dependency(grib_expression* e, grib_accessor* observer); static int evaluate_double(grib_expression*,grib_handle*,double*);
static string get_name(grib_expression* e); static string evaluate_string(grib_expression*,grib_handle*,char*,size_t*,int*);
static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
static int evaluate_double(grib_expression*,grib_handle*,double*);
static string evaluate_string(grib_expression*,grib_handle*,char*,size_t*,int*);
typedef struct grib_expression_is_in_dict{ typedef struct grib_expression_is_in_dict{
grib_expression base; grib_expression base;
@ -66,7 +60,6 @@ static grib_expression_class _grib_expression_class_is_in_dict = {
"is_in_dict", /* name */ "is_in_dict", /* name */
sizeof(grib_expression_is_in_dict),/* size of instance */ sizeof(grib_expression_is_in_dict),/* size of instance */
0, /* inited */ 0, /* inited */
&init_class, /* init_class */
0, /* constructor */ 0, /* constructor */
0, /* destructor */ 0, /* destructor */
&print, &print,
@ -80,10 +73,6 @@ static grib_expression_class _grib_expression_class_is_in_dict = {
grib_expression_class* grib_expression_class_is_in_dict = &_grib_expression_class_is_in_dict; grib_expression_class* grib_expression_class_is_in_dict = &_grib_expression_class_is_in_dict;
static void init_class(grib_expression_class* c)
{
}
/* END_CLASS_IMP */ /* END_CLASS_IMP */

View File

@ -40,20 +40,14 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */ typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void init_class (grib_expression_class*); static void print(grib_context*,grib_expression*,grib_handle*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static void destroy(grib_context*,grib_expression* e); static string get_name(grib_expression* e);
static int native_type(grib_expression*,grib_handle*);
static void print(grib_context*,grib_expression*,grib_handle*); static int evaluate_long(grib_expression*,grib_handle*,long*);
static void add_dependency(grib_expression* e, grib_accessor* observer); static int evaluate_double(grib_expression*,grib_handle*,double*);
static string get_name(grib_expression* e); static string evaluate_string(grib_expression*,grib_handle*,char*,size_t*,int*);
static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
static int evaluate_double(grib_expression*,grib_handle*,double*);
static string evaluate_string(grib_expression*,grib_handle*,char*,size_t*,int*);
typedef struct grib_expression_is_in_list{ typedef struct grib_expression_is_in_list{
grib_expression base; grib_expression base;
@ -68,7 +62,6 @@ static grib_expression_class _grib_expression_class_is_in_list = {
"is_in_list", /* name */ "is_in_list", /* name */
sizeof(grib_expression_is_in_list),/* size of instance */ sizeof(grib_expression_is_in_list),/* size of instance */
0, /* inited */ 0, /* inited */
&init_class, /* init_class */
0, /* constructor */ 0, /* constructor */
&destroy, /* destructor */ &destroy, /* destructor */
&print, &print,
@ -82,10 +75,6 @@ static grib_expression_class _grib_expression_class_is_in_list = {
grib_expression_class* grib_expression_class_is_in_list = &_grib_expression_class_is_in_list; grib_expression_class* grib_expression_class_is_in_list = &_grib_expression_class_is_in_list;
static void init_class(grib_expression_class* c)
{
}
/* END_CLASS_IMP */ /* END_CLASS_IMP */

View File

@ -41,20 +41,14 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */ typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void init_class (grib_expression_class*); static void print(grib_context*,grib_expression*,grib_handle*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static void destroy(grib_context*,grib_expression* e); static string get_name(grib_expression* e);
static int native_type(grib_expression*,grib_handle*);
static void print(grib_context*,grib_expression*,grib_handle*); static int evaluate_long(grib_expression*,grib_handle*,long*);
static void add_dependency(grib_expression* e, grib_accessor* observer); static int evaluate_double(grib_expression*,grib_handle*,double*);
static string get_name(grib_expression* e); static string evaluate_string(grib_expression*,grib_handle*,char*,size_t*,int*);
static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
static int evaluate_double(grib_expression*,grib_handle*,double*);
static string evaluate_string(grib_expression*,grib_handle*,char*,size_t*,int*);
typedef struct grib_expression_is_integer{ typedef struct grib_expression_is_integer{
grib_expression base; grib_expression base;
@ -70,7 +64,6 @@ static grib_expression_class _grib_expression_class_is_integer = {
"is_integer", /* name */ "is_integer", /* name */
sizeof(grib_expression_is_integer),/* size of instance */ sizeof(grib_expression_is_integer),/* size of instance */
0, /* inited */ 0, /* inited */
&init_class, /* init_class */
0, /* constructor */ 0, /* constructor */
&destroy, /* destructor */ &destroy, /* destructor */
&print, &print,
@ -84,10 +77,6 @@ static grib_expression_class _grib_expression_class_is_integer = {
grib_expression_class* grib_expression_class_is_integer = &_grib_expression_class_is_integer; grib_expression_class* grib_expression_class_is_integer = &_grib_expression_class_is_integer;
static void init_class(grib_expression_class* c)
{
}
/* END_CLASS_IMP */ /* END_CLASS_IMP */
static const char* get_name(grib_expression* g) static const char* get_name(grib_expression* g)

View File

@ -41,20 +41,14 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */ typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void init_class (grib_expression_class*); static void print(grib_context*,grib_expression*,grib_handle*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static void destroy(grib_context*,grib_expression* e); static string get_name(grib_expression* e);
static int native_type(grib_expression*,grib_handle*);
static void print(grib_context*,grib_expression*,grib_handle*); static int evaluate_long(grib_expression*,grib_handle*,long*);
static void add_dependency(grib_expression* e, grib_accessor* observer); static int evaluate_double(grib_expression*,grib_handle*,double*);
static string get_name(grib_expression* e); static string evaluate_string(grib_expression*,grib_handle*,char*,size_t*,int*);
static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
static int evaluate_double(grib_expression*,grib_handle*,double*);
static string evaluate_string(grib_expression*,grib_handle*,char*,size_t*,int*);
typedef struct grib_expression_length{ typedef struct grib_expression_length{
grib_expression base; grib_expression base;
@ -70,7 +64,6 @@ static grib_expression_class _grib_expression_class_length = {
"length", /* name */ "length", /* name */
sizeof(grib_expression_length),/* size of instance */ sizeof(grib_expression_length),/* size of instance */
0, /* inited */ 0, /* inited */
&init_class, /* init_class */
0, /* constructor */ 0, /* constructor */
&destroy, /* destructor */ &destroy, /* destructor */
&print, &print,
@ -84,10 +77,6 @@ static grib_expression_class _grib_expression_class_length = {
grib_expression_class* grib_expression_class_length = &_grib_expression_class_length; grib_expression_class* grib_expression_class_length = &_grib_expression_class_length;
static void init_class(grib_expression_class* c)
{
}
/* END_CLASS_IMP */ /* END_CLASS_IMP */
static const char* get_name(grib_expression* g) static const char* get_name(grib_expression* g)

View File

@ -15,7 +15,6 @@
START_CLASS_DEF START_CLASS_DEF
CLASS = expression CLASS = expression
IMPLEMENTS = init_class
IMPLEMENTS = destroy IMPLEMENTS = destroy
IMPLEMENTS = native_type IMPLEMENTS = native_type
IMPLEMENTS = evaluate_long IMPLEMENTS = evaluate_long
@ -39,18 +38,12 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */ typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void init_class (grib_expression_class*); static void print(grib_context*,grib_expression*,grib_handle*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static void destroy(grib_context*,grib_expression* e); static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
static void print(grib_context*,grib_expression*,grib_handle*); static int evaluate_double(grib_expression*,grib_handle*,double*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
static int evaluate_double(grib_expression*,grib_handle*,double*);
typedef struct grib_expression_logical_and{ typedef struct grib_expression_logical_and{
grib_expression base; grib_expression base;
@ -65,7 +58,6 @@ static grib_expression_class _grib_expression_class_logical_and = {
"logical_and", /* name */ "logical_and", /* name */
sizeof(grib_expression_logical_and),/* size of instance */ sizeof(grib_expression_logical_and),/* size of instance */
0, /* inited */ 0, /* inited */
&init_class, /* init_class */
0, /* constructor */ 0, /* constructor */
&destroy, /* destructor */ &destroy, /* destructor */
&print, &print,
@ -79,10 +71,6 @@ static grib_expression_class _grib_expression_class_logical_and = {
grib_expression_class* grib_expression_class_logical_and = &_grib_expression_class_logical_and; grib_expression_class* grib_expression_class_logical_and = &_grib_expression_class_logical_and;
static void init_class(grib_expression_class* c)
{
}
/* END_CLASS_IMP */ /* END_CLASS_IMP */
static int evaluate_long(grib_expression* g, grib_handle* h, long* lres) static int evaluate_long(grib_expression* g, grib_handle* h, long* lres)

View File

@ -15,7 +15,6 @@
START_CLASS_DEF START_CLASS_DEF
CLASS = expression CLASS = expression
IMPLEMENTS = init_class
IMPLEMENTS = destroy IMPLEMENTS = destroy
IMPLEMENTS = native_type IMPLEMENTS = native_type
IMPLEMENTS = evaluate_long IMPLEMENTS = evaluate_long
@ -39,18 +38,12 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */ typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void init_class (grib_expression_class*); static void print(grib_context*,grib_expression*,grib_handle*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static void destroy(grib_context*,grib_expression* e); static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
static void print(grib_context*,grib_expression*,grib_handle*); static int evaluate_double(grib_expression*,grib_handle*,double*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
static int evaluate_double(grib_expression*,grib_handle*,double*);
typedef struct grib_expression_logical_or{ typedef struct grib_expression_logical_or{
grib_expression base; grib_expression base;
@ -65,7 +58,6 @@ static grib_expression_class _grib_expression_class_logical_or = {
"logical_or", /* name */ "logical_or", /* name */
sizeof(grib_expression_logical_or),/* size of instance */ sizeof(grib_expression_logical_or),/* size of instance */
0, /* inited */ 0, /* inited */
&init_class, /* init_class */
0, /* constructor */ 0, /* constructor */
&destroy, /* destructor */ &destroy, /* destructor */
&print, &print,
@ -79,10 +71,6 @@ static grib_expression_class _grib_expression_class_logical_or = {
grib_expression_class* grib_expression_class_logical_or = &_grib_expression_class_logical_or; grib_expression_class* grib_expression_class_logical_or = &_grib_expression_class_logical_or;
static void init_class(grib_expression_class* c)
{
}
/* END_CLASS_IMP */ /* END_CLASS_IMP */
static int evaluate_long(grib_expression* g, grib_handle* h, long* lres) static int evaluate_long(grib_expression* g, grib_handle* h, long* lres)

View File

@ -37,18 +37,12 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */ typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void init_class (grib_expression_class*); static void print(grib_context*,grib_expression*,grib_handle*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static void destroy(grib_context*,grib_expression* e); static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
static void print(grib_context*,grib_expression*,grib_handle*); static int evaluate_double(grib_expression*,grib_handle*,double*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
static int evaluate_double(grib_expression*,grib_handle*,double*);
typedef struct grib_expression_long{ typedef struct grib_expression_long{
grib_expression base; grib_expression base;
@ -62,7 +56,6 @@ static grib_expression_class _grib_expression_class_long = {
"long", /* name */ "long", /* name */
sizeof(grib_expression_long),/* size of instance */ sizeof(grib_expression_long),/* size of instance */
0, /* inited */ 0, /* inited */
&init_class, /* init_class */
0, /* constructor */ 0, /* constructor */
&destroy, /* destructor */ &destroy, /* destructor */
&print, &print,
@ -76,10 +69,6 @@ static grib_expression_class _grib_expression_class_long = {
grib_expression_class* grib_expression_class_long = &_grib_expression_class_long; grib_expression_class* grib_expression_class_long = &_grib_expression_class_long;
static void init_class(grib_expression_class* c)
{
}
/* END_CLASS_IMP */ /* END_CLASS_IMP */
static int evaluate_long(grib_expression* g, grib_handle* h, long* lres) static int evaluate_long(grib_expression* g, grib_handle* h, long* lres)

View File

@ -36,17 +36,11 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */ typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void init_class (grib_expression_class*); static void print(grib_context*,grib_expression*,grib_handle*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static void destroy(grib_context*,grib_expression* e); static int native_type(grib_expression*,grib_handle*);
static string evaluate_string(grib_expression*,grib_handle*,char*,size_t*,int*);
static void print(grib_context*,grib_expression*,grib_handle*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static int native_type(grib_expression*,grib_handle*);
static string evaluate_string(grib_expression*,grib_handle*,char*,size_t*,int*);
typedef struct grib_expression_string{ typedef struct grib_expression_string{
grib_expression base; grib_expression base;
@ -60,7 +54,6 @@ static grib_expression_class _grib_expression_class_string = {
"string", /* name */ "string", /* name */
sizeof(grib_expression_string),/* size of instance */ sizeof(grib_expression_string),/* size of instance */
0, /* inited */ 0, /* inited */
&init_class, /* init_class */
0, /* constructor */ 0, /* constructor */
&destroy, /* destructor */ &destroy, /* destructor */
&print, &print,
@ -74,10 +67,6 @@ static grib_expression_class _grib_expression_class_string = {
grib_expression_class* grib_expression_class_string = &_grib_expression_class_string; grib_expression_class* grib_expression_class_string = &_grib_expression_class_string;
static void init_class(grib_expression_class* c)
{
}
/* END_CLASS_IMP */ /* END_CLASS_IMP */
static const char* evaluate_string(grib_expression* g, grib_handle* h, char* buf, size_t* size, int* err) static const char* evaluate_string(grib_expression* g, grib_handle* h, char* buf, size_t* size, int* err)

View File

@ -38,18 +38,12 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */ typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void init_class (grib_expression_class*); static void print(grib_context*,grib_expression*,grib_handle*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static void destroy(grib_context*,grib_expression* e); static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
static void print(grib_context*,grib_expression*,grib_handle*); static int evaluate_double(grib_expression*,grib_handle*,double*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
static int evaluate_double(grib_expression*,grib_handle*,double*);
typedef struct grib_expression_string_compare{ typedef struct grib_expression_string_compare{
grib_expression base; grib_expression base;
@ -64,7 +58,6 @@ static grib_expression_class _grib_expression_class_string_compare = {
"string_compare", /* name */ "string_compare", /* name */
sizeof(grib_expression_string_compare),/* size of instance */ sizeof(grib_expression_string_compare),/* size of instance */
0, /* inited */ 0, /* inited */
&init_class, /* init_class */
0, /* constructor */ 0, /* constructor */
&destroy, /* destructor */ &destroy, /* destructor */
&print, &print,
@ -78,10 +71,6 @@ static grib_expression_class _grib_expression_class_string_compare = {
grib_expression_class* grib_expression_class_string_compare = &_grib_expression_class_string_compare; grib_expression_class* grib_expression_class_string_compare = &_grib_expression_class_string_compare;
static void init_class(grib_expression_class* c)
{
}
/* END_CLASS_IMP */ /* END_CLASS_IMP */
/* Note: A fast cut-down version of strcmp which does NOT return -1 */ /* Note: A fast cut-down version of strcmp which does NOT return -1 */

View File

@ -36,17 +36,11 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */ typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void init_class (grib_expression_class*); static void print(grib_context*,grib_expression*,grib_handle*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static void destroy(grib_context*,grib_expression* e); static int native_type(grib_expression*,grib_handle*);
static string evaluate_string(grib_expression*,grib_handle*,char*,size_t*,int*);
static void print(grib_context*,grib_expression*,grib_handle*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static int native_type(grib_expression*,grib_handle*);
static string evaluate_string(grib_expression*,grib_handle*,char*,size_t*,int*);
typedef struct grib_expression_sub_string{ typedef struct grib_expression_sub_string{
grib_expression base; grib_expression base;
@ -60,7 +54,6 @@ static grib_expression_class _grib_expression_class_sub_string = {
"sub_string", /* name */ "sub_string", /* name */
sizeof(grib_expression_sub_string),/* size of instance */ sizeof(grib_expression_sub_string),/* size of instance */
0, /* inited */ 0, /* inited */
&init_class, /* init_class */
0, /* constructor */ 0, /* constructor */
&destroy, /* destructor */ &destroy, /* destructor */
&print, &print,
@ -74,10 +67,6 @@ static grib_expression_class _grib_expression_class_sub_string = {
grib_expression_class* grib_expression_class_sub_string = &_grib_expression_class_sub_string; grib_expression_class* grib_expression_class_sub_string = &_grib_expression_class_sub_string;
static void init_class(grib_expression_class* c)
{
}
/* END_CLASS_IMP */ /* END_CLASS_IMP */
static const char* evaluate_string(grib_expression* g, grib_handle* h, char* buf, size_t* size, int* err) static const char* evaluate_string(grib_expression* g, grib_handle* h, char* buf, size_t* size, int* err)

View File

@ -36,18 +36,12 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */ typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void init_class (grib_expression_class*); static void print(grib_context*,grib_expression*,grib_handle*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static void destroy(grib_context*,grib_expression* e); static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
static void print(grib_context*,grib_expression*,grib_handle*); static int evaluate_double(grib_expression*,grib_handle*,double*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
static int evaluate_double(grib_expression*,grib_handle*,double*);
typedef struct grib_expression_true{ typedef struct grib_expression_true{
grib_expression base; grib_expression base;
@ -60,7 +54,6 @@ static grib_expression_class _grib_expression_class_true = {
"true", /* name */ "true", /* name */
sizeof(grib_expression_true),/* size of instance */ sizeof(grib_expression_true),/* size of instance */
0, /* inited */ 0, /* inited */
&init_class, /* init_class */
0, /* constructor */ 0, /* constructor */
&destroy, /* destructor */ &destroy, /* destructor */
&print, &print,
@ -74,10 +67,6 @@ static grib_expression_class _grib_expression_class_true = {
grib_expression_class* grib_expression_class_true = &_grib_expression_class_true; grib_expression_class* grib_expression_class_true = &_grib_expression_class_true;
static void init_class(grib_expression_class* c)
{
}
/* END_CLASS_IMP */ /* END_CLASS_IMP */
static int evaluate_long(grib_expression* g, grib_handle* h, long* lres) static int evaluate_long(grib_expression* g, grib_handle* h, long* lres)

View File

@ -39,18 +39,12 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */ typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void init_class (grib_expression_class*); static void print(grib_context*,grib_expression*,grib_handle*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static void destroy(grib_context*,grib_expression* e); static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
static void print(grib_context*,grib_expression*,grib_handle*); static int evaluate_double(grib_expression*,grib_handle*,double*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);
static int evaluate_double(grib_expression*,grib_handle*,double*);
typedef struct grib_expression_unop{ typedef struct grib_expression_unop{
grib_expression base; grib_expression base;
@ -66,7 +60,6 @@ static grib_expression_class _grib_expression_class_unop = {
"unop", /* name */ "unop", /* name */
sizeof(grib_expression_unop),/* size of instance */ sizeof(grib_expression_unop),/* size of instance */
0, /* inited */ 0, /* inited */
&init_class, /* init_class */
0, /* constructor */ 0, /* constructor */
&destroy, /* destructor */ &destroy, /* destructor */
&print, &print,
@ -80,10 +73,6 @@ static grib_expression_class _grib_expression_class_unop = {
grib_expression_class* grib_expression_class_unop = &_grib_expression_class_unop; grib_expression_class* grib_expression_class_unop = &_grib_expression_class_unop;
static void init_class(grib_expression_class* c)
{
}
/* END_CLASS_IMP */ /* END_CLASS_IMP */
static int evaluate_long(grib_expression* g, grib_handle* h, long* lres) static int evaluate_long(grib_expression* g, grib_handle* h, long* lres)