Merge branch 'refactor-convertion' of github.com:ecmwf/eccodes into refactor-convertion

This commit is contained in:
Baudouin Raoult 2023-06-28 14:28:20 +01:00
commit 6197c93ea3
257 changed files with 352 additions and 2028 deletions

View File

@ -396,8 +396,7 @@ list( APPEND eccodes_extra_src_files
grib_bits_fast_big_endian_omp.cc grib_bits_any_endian_omp.cc
encode_double_array.cc
grib_bits_ibmpow.cc
grib_bits_ibmpow_opt.cc
minmax_val.cc )
grib_bits_ibmpow_opt.cc )
list( APPEND eccodes_src_files
cpp/eccodes/accessor/Accessor.cc

View File

@ -102,9 +102,3 @@ grib_accessor_class* grib_accessor_class_NAME = &_grib_accessor_class_NAME;
ADD_TO_FILE grib_accessor_class.h extern grib_accessor_class* grib_accessor_class_NAME;
ADD_TO_FILE grib_accessor_factory.h { "NAME", &grib_accessor_class_NAME, },
ADD_TO_FILE grib_accessor_factory_hash_list NAME, &grib_accessor_class_NAME
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}

View File

@ -10,7 +10,7 @@ static int execute(grib_action* a,grib_handle* h);
typedef struct grib_action_NAME {
grib_action act;
grib_action act;
MEMBERS
} grib_action_NAME;

View File

@ -55,9 +55,12 @@ static grib_action_class _grib_action_class_set_iarray = {
&init_class, /* init_class */
0, /* init */
&destroy, /* destroy */
&dump, /* dump */
&xref, /* xref */
0, /* create_accessor*/
0, /* notify_change */
0, /* reparse */
&execute, /* execute */

View File

@ -1,65 +0,0 @@
/*
* (C) Copyright 2005- ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
*
* In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
* virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
*/
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class jgribapi_GribFile */
#ifndef _Included_jgribapi_GribFile
#define _Included_jgribapi_GribFile
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: jgribapi_GribFile
* Method: gribGetNextHandle
* Signature: (J)Ljgribapi/GribHandle;
*/
JNIEXPORT jobject JNICALL Java_jgribapi_GribFile_gribGetNextHandle(JNIEnv*, jobject, jlong);
/*
* Class: jgribapi_GribFile
* Method: gribEOFReached
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_jgribapi_GribFile_gribEOFReached(JNIEnv*, jobject, jlong);
/*
* Class: jgribapi_GribFile
* Method: gribGetGribFile
* Signature: (Ljava/lang/String;)J
*/
JNIEXPORT jlong JNICALL Java_jgribapi_GribFile_gribGetGribFile(JNIEnv*, jobject, jstring);
/*
* Class: jgribapi_GribFile
* Method: gribCloseFile
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_jgribapi_GribFile_gribCloseFile(JNIEnv*, jobject, jlong);
/*
* Class: jgribapi_GribFile
* Method: gribNewFile
* Signature: (Ljava/lang/String;)J
*/
JNIEXPORT jlong JNICALL Java_jgribapi_GribFile_gribNewFile(JNIEnv*, jobject, jstring);
/*
* Class: jgribapi_GribFile
* Method: gribWriteHandle
* Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_jgribapi_GribFile_gribWriteHandle(JNIEnv*, jobject, jlong, jlong);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,156 +0,0 @@
/*
* (C) Copyright 2005- ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
*
* In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
* virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
*/
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class jgribapi_GribHandle */
#ifndef _Included_jgribapi_GribHandle
#define _Included_jgribapi_GribHandle
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: jgribapi_GribHandle
* Method: getIteratorID
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_jgribapi_GribHandle_getIteratorID(JNIEnv*, jobject, jlong);
/*
* Class: jgribapi_GribHandle
* Method: gribGetString
* Signature: (JLjava/lang/String;)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_jgribapi_GribHandle_gribGetString(JNIEnv*, jobject, jlong, jstring);
/*
* Class: jgribapi_GribHandle
* Method: gribGetLong
* Signature: (JLjava/lang/String;)J
*/
JNIEXPORT jlong JNICALL Java_jgribapi_GribHandle_gribGetLong(JNIEnv*, jobject, jlong, jstring);
/*
* Class: jgribapi_GribHandle
* Method: gribGetDouble
* Signature: (JLjava/lang/String;)D
*/
JNIEXPORT jdouble JNICALL Java_jgribapi_GribHandle_gribGetDouble(JNIEnv*, jobject, jlong, jstring);
/*
* Class: jgribapi_GribHandle
* Method: gribGetLongArray
* Signature: (JLjava/lang/String;)[J
*/
JNIEXPORT jlongArray JNICALL Java_jgribapi_GribHandle_gribGetLongArray(JNIEnv*, jobject, jlong, jstring);
/*
* Class: jgribapi_GribHandle
* Method: gribGetDoubleArray
* Signature: (JLjava/lang/String;)[D
*/
JNIEXPORT jdoubleArray JNICALL Java_jgribapi_GribHandle_gribGetDoubleArray(JNIEnv*, jobject, jlong, jstring);
/*
* Class: jgribapi_GribHandle
* Method: gribSetString
* Signature: (JLjava/lang/String;Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribSetString(JNIEnv*, jobject, jlong, jstring, jstring);
/*
* Class: jgribapi_GribHandle
* Method: gribCreateNext
* Signature: (J)Ljgribapi/GribKey;
*/
JNIEXPORT jobject JNICALL Java_jgribapi_GribHandle_gribCreateNext(JNIEnv*, jobject, jlong);
/*
* Class: jgribapi_GribHandle
* Method: gribSetSearch
* Signature: (JLjava/lang/String;)J
*/
JNIEXPORT jlong JNICALL Java_jgribapi_GribHandle_gribSetSearch(JNIEnv*, jobject, jlong, jstring);
/*
* Class: jgribapi_GribHandle
* Method: gribSetLong
* Signature: (JLjava/lang/String;J)I
*/
JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribSetLong(JNIEnv*, jobject, jlong, jstring, jlong);
/*
* Class: jgribapi_GribHandle
* Method: gribSetDouble
* Signature: (JLjava/lang/String;D)I
*/
JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribSetDouble(JNIEnv*, jobject, jlong, jstring, jdouble);
/*
* Class: jgribapi_GribHandle
* Method: gribSetLongArray
* Signature: (JLjava/lang/String;[J)I
*/
JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribSetLongArray(JNIEnv*, jobject, jlong, jstring, jlongArray);
/*
* Class: jgribapi_GribHandle
* Method: gribSetDoubleArray
* Signature: (JLjava/lang/String;[D)I
*/
JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribSetDoubleArray(JNIEnv*, jobject, jlong, jstring, jdoubleArray);
/*
* Class: jgribapi_GribHandle
* Method: gribGetXml
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_jgribapi_GribHandle_gribGetXml__J(JNIEnv*, jobject, jlong);
/*
* Class: jgribapi_GribHandle
* Method: gribGetXml
* Signature: (JLjava/lang/String;)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_jgribapi_GribHandle_gribGetXml__JLjava_lang_String_2(JNIEnv*, jobject, jlong, jstring);
/*
* Class: jgribapi_GribHandle
* Method: gribGetAscii
* Signature: (JLjava/lang/String;)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_jgribapi_GribHandle_gribGetAscii(JNIEnv*, jobject, jlong, jstring);
/*
* Class: jgribapi_GribHandle
* Method: gribGetBytes
* Signature: (JLjava/lang/String;)[B
*/
JNIEXPORT jbyteArray JNICALL Java_jgribapi_GribHandle_gribGetBytes(JNIEnv*, jobject, jlong, jstring);
/*
* Class: jgribapi_GribHandle
* Method: gribDeleteHandle
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribDeleteHandle(JNIEnv*, jobject, jlong);
/*
* Class: jgribapi_GribHandle
* Method: gribResetHandle
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_jgribapi_GribHandle_gribResetHandle(JNIEnv*, jobject, jlong);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,37 +0,0 @@
/*
* (C) Copyright 2005- ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
*
* In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
* virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
*/
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class jgribapi_GribIterator */
#ifndef _Included_jgribapi_GribIterator
#define _Included_jgribapi_GribIterator
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: jgribapi_GribIterator
* Method: gribIteratorGetNext
* Signature: (J)Ljgribapi/GribPoint;
*/
JNIEXPORT jobject JNICALL Java_jgribapi_GribIterator_gribIteratorGetNext(JNIEnv*, jobject, jlong);
/*
* Class: jgribapi_GribIterator
* Method: gribIteratorHasNext
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_jgribapi_GribIterator_gribIteratorHasNext(JNIEnv*, jobject, jlong);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,178 @@
#define ROT(x, c) ((x << c) | (x >> (32 - c)))
#define ECC_F(x, y, z) ((x & y) | ((~x) & z))
#define ECC_G(x, y, z) ((x & z) | (y & (~z)))
#define ECC_H(x, y, z) (x ^ y ^ z)
#define ECC_I(x, y, z) (y ^ (x | (~z)))
#define F_(A, B, C, D, g, i) \
A += ECC_F(B, C, D) + w[g] + k[i]; \
A &= 0xffffffff; \
A = ROT(A, r[i]); \
A += B;
#define G_(A, B, C, D, g, i) \
A += ECC_G(B, C, D) + w[g] + k[i]; \
A &= 0xffffffff; \
A = ROT(A, r[i]); \
A += B;
#define H_(A, B, C, D, g, i) \
A += ECC_H(B, C, D) + w[g] + k[i]; \
A &= 0xffffffff; \
A = ROT(A, r[i]); \
A += B;
#define I_(A, B, C, D, g, i) \
A += ECC_I(B, C, D) + w[g] + k[i]; \
A &= 0xffffffff; \
A = ROT(A, r[i]); \
A += B;
static void grib_md5_flush(grib_md5_state* s)
{
#if 1
unsigned long a = s->h0;
unsigned long b = s->h1;
unsigned long c = s->h2;
unsigned long d = s->h3;
unsigned long* w = &s->words[0];
F_(a, b, c, d, 0, 0);
F_(d, a, b, c, 1, 1);
F_(c, d, a, b, 2, 2);
F_(b, c, d, a, 3, 3);
F_(a, b, c, d, 4, 4);
F_(d, a, b, c, 5, 5);
F_(c, d, a, b, 6, 6);
F_(b, c, d, a, 7, 7);
F_(a, b, c, d, 8, 8);
F_(d, a, b, c, 9, 9);
F_(c, d, a, b, 10, 10);
F_(b, c, d, a, 11, 11);
F_(a, b, c, d, 12, 12);
F_(d, a, b, c, 13, 13);
F_(c, d, a, b, 14, 14);
F_(b, c, d, a, 15, 15);
G_(a, b, c, d, 1, 16);
G_(d, a, b, c, 6, 17);
G_(c, d, a, b, 11, 18);
G_(b, c, d, a, 0, 19);
G_(a, b, c, d, 5, 20);
G_(d, a, b, c, 10, 21);
G_(c, d, a, b, 15, 22);
G_(b, c, d, a, 4, 23);
G_(a, b, c, d, 9, 24);
G_(d, a, b, c, 14, 25);
G_(c, d, a, b, 3, 26);
G_(b, c, d, a, 8, 27);
G_(a, b, c, d, 13, 28);
G_(d, a, b, c, 2, 29);
G_(c, d, a, b, 7, 30);
G_(b, c, d, a, 12, 31);
H_(a, b, c, d, 5, 32);
H_(d, a, b, c, 8, 33);
H_(c, d, a, b, 11, 34);
H_(b, c, d, a, 14, 35);
H_(a, b, c, d, 1, 36);
H_(d, a, b, c, 4, 37);
H_(c, d, a, b, 7, 38);
H_(b, c, d, a, 10, 39);
H_(a, b, c, d, 13, 40);
H_(d, a, b, c, 0, 41);
H_(c, d, a, b, 3, 42);
H_(b, c, d, a, 6, 43);
H_(a, b, c, d, 9, 44);
H_(d, a, b, c, 12, 45);
H_(c, d, a, b, 15, 46);
H_(b, c, d, a, 2, 47);
I_(a, b, c, d, 0, 48);
I_(d, a, b, c, 7, 49);
I_(c, d, a, b, 14, 50);
I_(b, c, d, a, 5, 51);
I_(a, b, c, d, 12, 52);
I_(d, a, b, c, 3, 53);
I_(c, d, a, b, 10, 54);
I_(b, c, d, a, 1, 55);
I_(a, b, c, d, 8, 56);
I_(d, a, b, c, 15, 57);
I_(c, d, a, b, 6, 58);
I_(b, c, d, a, 13, 59);
I_(a, b, c, d, 4, 60);
I_(d, a, b, c, 11, 61);
I_(c, d, a, b, 2, 62);
I_(b, c, d, a, 9, 63);
#else
unsigned long i, g;
unsigned long a = s->h0;
unsigned long b = s->h1;
unsigned long c = s->h2;
unsigned long d = s->h3;
unsigned long f;
unsigned long temp;
unsigned long* w = &s->words[0];
unsigned long h;
for (i = 0; i < 16; i++) {
f = F(b, c, d);
g = i;
temp = d;
d = c;
c = b;
h = a + f + k[i] + w[g];
b = b + rotate(h, r[i]);
a = temp;
}
for (i = 16; i < 32; i++) {
f = G(b, c, d);
g = (5 * i + 1) % 16;
temp = d;
d = c;
c = b;
h = a + f + k[i] + w[g];
b = b + rotate(h, r[i]);
a = temp;
}
for (i = 32; i < 48; i++) {
f = H(b, c, d);
g = (3 * i + 5) % 16;
temp = d;
d = c;
c = b;
h = a + f + k[i] + w[g];
b = b + rotate(h, r[i]);
a = temp;
}
for (i = 48; i < 64; i++) {
f = I(b, c, d);
g = (7 * i) % 16;
temp = d;
d = c;
c = b;
h = a + f + k[i] + w[g];
b = b + rotate(h, r[i]);
a = temp;
}
#endif
s->h0 += a;
s->h1 += b;
s->h2 += c;
s->h3 += d;
s->word_count = 0;
}

View File

@ -14,8 +14,8 @@ static void header (grib_dumper*,grib_handle*);
static void footer (grib_dumper*,grib_handle*);
typedef struct grib_dumper_NAME {
grib_dumper dumper;
MEMBERS
grib_dumper dumper;
MEMBERS
} grib_dumper_NAME;
extern grib_dumper_class* SUPER;

View File

@ -493,8 +493,6 @@ int grib_g1_step_get_steps(grib_accessor* a, long* start, long* theEnd);
/* grib_accessor_class_ieeefloat.cc*/
/* grib_accessor_class_constant.cc*/
void accessor_constant_set_type(grib_accessor* a, int type);
void accessor_constant_set_dval(grib_accessor* a, double dval);
/* grib_accessor_class_iterator.cc*/
grib_iterator* grib_iterator_new(const grib_handle* h, unsigned long flags, int* error);

View File

@ -26,20 +26,18 @@ extern grib_expression_class* SUPER;
static grib_expression_class _grib_expression_class_NAME = {
&SUPER, /* super */
"NAME", /* name */
sizeof(grib_expression_NAME),/* size of instance */
sizeof(grib_expression_NAME),/* size of instance */
0, /* inited */
&init_class, /* init_class */
&init, /* constructor */
&destroy, /* destructor */
&print,
&add_dependency,
&native_type,
&get_name,
&evaluate_long,
&evaluate_double,
&evaluate_string,
&print,
&add_dependency,
&native_type,
&get_name,
&evaluate_long,
&evaluate_double,
&evaluate_string,
};
grib_expression_class* grib_expression_class_NAME = &_grib_expression_class_NAME;

View File

@ -101,10 +101,4 @@ static grib_accessor_class _grib_accessor_class_abstract_long_vector = {
grib_accessor_class* grib_accessor_class_abstract_long_vector = &_grib_accessor_class_abstract_long_vector;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */

View File

@ -96,10 +96,4 @@ static grib_accessor_class _grib_accessor_class_abstract_vector = {
grib_accessor_class* grib_accessor_class_abstract_vector = &_grib_accessor_class_abstract_vector;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */

View File

@ -101,12 +101,6 @@ static grib_accessor_class _grib_accessor_class_array = {
grib_accessor_class* grib_accessor_class_array = &_grib_accessor_class_array;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */

View File

@ -113,12 +113,6 @@ static grib_accessor_class _grib_accessor_class_ascii = {
grib_accessor_class* grib_accessor_class_ascii = &_grib_accessor_class_ascii;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long len, grib_arguments* arg)

View File

@ -101,12 +101,6 @@ static grib_accessor_class _grib_accessor_class_assert = {
grib_accessor_class* grib_accessor_class_assert = &_grib_accessor_class_assert;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long len, grib_arguments* arg)

View File

@ -103,12 +103,6 @@ static grib_accessor_class _grib_accessor_class_bit = {
grib_accessor_class* grib_accessor_class_bit = &_grib_accessor_class_bit;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long len, grib_arguments* arg)

View File

@ -119,12 +119,6 @@ static grib_accessor_class _grib_accessor_class_bitmap = {
grib_accessor_class* grib_accessor_class_bitmap = &_grib_accessor_class_bitmap;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */

View File

@ -125,12 +125,6 @@ static grib_accessor_class _grib_accessor_class_bits = {
grib_accessor_class* grib_accessor_class_bits = &_grib_accessor_class_bits;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long l, grib_arguments* c)

View File

@ -104,12 +104,6 @@ static grib_accessor_class _grib_accessor_class_bits_per_value = {
grib_accessor_class* grib_accessor_class_bits_per_value = &_grib_accessor_class_bits_per_value;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long l, grib_arguments* args)

View File

@ -97,12 +97,6 @@ static grib_accessor_class _grib_accessor_class_blob = {
grib_accessor_class* grib_accessor_class_blob = &_grib_accessor_class_blob;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long len, grib_arguments* arg)

View File

@ -104,12 +104,6 @@ static grib_accessor_class _grib_accessor_class_budgdate = {
grib_accessor_class* grib_accessor_class_budgdate = &_grib_accessor_class_budgdate;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long l, grib_arguments* c)

View File

@ -208,12 +208,6 @@ static grib_accessor_class _grib_accessor_class_bufr_data_array = {
grib_accessor_class* grib_accessor_class_bufr_data_array = &_grib_accessor_class_bufr_data_array;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
#define MAX_NESTED_REPLICATIONS 8
@ -2503,8 +2497,8 @@ static int create_keys(const grib_accessor* a, long onlySubset, long startSubset
section = gaGroup->sub_section;
/*rootSection=section;*/
/*sectionUp=self->dataKeys;*/
accessor_constant_set_type(gaGroup, GRIB_TYPE_LONG);
accessor_constant_set_dval(gaGroup, groupNumber);
//accessor_constant_set_type(gaGroup, GRIB_TYPE_LONG);
//accessor_constant_set_dval(gaGroup, groupNumber);
/* ECC-765: Don't empty out the section_4 keys otherwise there will be memory leaks. */
/* Setting first and last to zero effectively masks out those section 4 keys! */
/* self->dataKeys->block->first=0; */
@ -2566,8 +2560,8 @@ static int create_keys(const grib_accessor* a, long onlySubset, long startSubset
gaGroup->sub_section = grib_section_create(hand, gaGroup);
gaGroup->bufr_group_number = groupNumber;
accessor_constant_set_type(gaGroup, GRIB_TYPE_LONG);
accessor_constant_set_dval(gaGroup, groupNumber);
//accessor_constant_set_type(gaGroup, GRIB_TYPE_LONG);
//accessor_constant_set_dval(gaGroup, groupNumber);
grib_push_accessor(gaGroup, groupSection->block);
section = gaGroup->sub_section;
@ -2610,8 +2604,8 @@ static int create_keys(const grib_accessor* a, long onlySubset, long startSubset
gaGroup = grib_accessor_factory(groupSection, &creatorGroup, 0, NULL);
gaGroup->sub_section = grib_section_create(hand, gaGroup);
gaGroup->bufr_group_number = groupNumber;
accessor_constant_set_type(gaGroup, GRIB_TYPE_LONG);
accessor_constant_set_dval(gaGroup, groupNumber);
//accessor_constant_set_type(gaGroup, GRIB_TYPE_LONG);
//accessor_constant_set_dval(gaGroup, groupNumber);
grib_push_accessor(gaGroup, groupSection->block);
section = gaGroup->sub_section;

View File

@ -139,12 +139,6 @@ static grib_accessor_class _grib_accessor_class_bufr_data_element = {
grib_accessor_class* grib_accessor_class_bufr_data_element = &_grib_accessor_class_bufr_data_element;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static grib_accessor* make_clone(grib_accessor* a, grib_section* s, int* err)

View File

@ -139,12 +139,6 @@ static grib_accessor_class _grib_accessor_class_bufr_elements_table = {
grib_accessor_class* grib_accessor_class_bufr_elements_table = &_grib_accessor_class_bufr_elements_table;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long len, grib_arguments* params)

View File

@ -116,12 +116,6 @@ static grib_accessor_class _grib_accessor_class_bufr_extract_area_subsets = {
grib_accessor_class* grib_accessor_class_bufr_extract_area_subsets = &_grib_accessor_class_bufr_extract_area_subsets;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long len, grib_arguments* arg)

View File

@ -102,12 +102,6 @@ static grib_accessor_class _grib_accessor_class_bufr_extract_datetime_subsets =
grib_accessor_class* grib_accessor_class_bufr_extract_datetime_subsets = &_grib_accessor_class_bufr_extract_datetime_subsets;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long len, grib_arguments* arg)

View File

@ -104,12 +104,6 @@ static grib_accessor_class _grib_accessor_class_bufr_extract_subsets = {
grib_accessor_class* grib_accessor_class_bufr_extract_subsets = &_grib_accessor_class_bufr_extract_subsets;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void get_accessors(grib_accessor* a)

View File

@ -100,12 +100,6 @@ static grib_accessor_class _grib_accessor_class_bufr_group = {
grib_accessor_class* grib_accessor_class_bufr_group = &_grib_accessor_class_bufr_group;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void dump(grib_accessor* a, grib_dumper* dumper)

View File

@ -108,12 +108,6 @@ static grib_accessor_class _grib_accessor_class_bufr_simple_thinning = {
grib_accessor_class* grib_accessor_class_bufr_simple_thinning = &_grib_accessor_class_bufr_simple_thinning;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long len, grib_arguments* arg)

View File

@ -116,12 +116,6 @@ static grib_accessor_class _grib_accessor_class_bufr_string_values = {
grib_accessor_class* grib_accessor_class_bufr_string_values = &_grib_accessor_class_bufr_string_values;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long len, grib_arguments* args)

View File

@ -114,12 +114,6 @@ static grib_accessor_class _grib_accessor_class_bufrdc_expanded_descriptors = {
grib_accessor_class* grib_accessor_class_bufrdc_expanded_descriptors = &_grib_accessor_class_bufrdc_expanded_descriptors;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long len, grib_arguments* args)

View File

@ -98,12 +98,6 @@ static grib_accessor_class _grib_accessor_class_bytes = {
grib_accessor_class* grib_accessor_class_bytes = &_grib_accessor_class_bytes;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long len, grib_arguments* arg)

View File

@ -106,12 +106,6 @@ static grib_accessor_class _grib_accessor_class_change_alternative_row_scanning
grib_accessor_class* grib_accessor_class_change_alternative_row_scanning = &_grib_accessor_class_change_alternative_row_scanning;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long len, grib_arguments* args)

View File

@ -114,12 +114,6 @@ static grib_accessor_class _grib_accessor_class_change_scanning_direction = {
grib_accessor_class* grib_accessor_class_change_scanning_direction = &_grib_accessor_class_change_scanning_direction;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long len, grib_arguments* args)

View File

@ -97,12 +97,6 @@ static grib_accessor_class _grib_accessor_class_check_internal_version = {
grib_accessor_class* grib_accessor_class_check_internal_version = &_grib_accessor_class_check_internal_version;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
/* This is the internal engine version number */

View File

@ -120,12 +120,6 @@ static grib_accessor_class _grib_accessor_class_closest_date = {
grib_accessor_class* grib_accessor_class_closest_date = &_grib_accessor_class_closest_date;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long l, grib_arguments* c)

View File

@ -106,12 +106,6 @@ static grib_accessor_class _grib_accessor_class_codeflag = {
grib_accessor_class* grib_accessor_class_codeflag = &_grib_accessor_class_codeflag;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long len, grib_arguments* param)

View File

@ -150,12 +150,6 @@ static grib_accessor_class _grib_accessor_class_codetable = {
grib_accessor_class* grib_accessor_class_codetable = &_grib_accessor_class_codetable;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static int grib_load_codetable(grib_context* c, const char* filename, const char* recomposed_name, size_t size, grib_codetable* t);
@ -612,11 +606,7 @@ static int unpack_string(grib_accessor* a, char* buffer, size_t* len)
strcpy(tmp, table->entries[value].abbreviation);
}
else {
#if 1
snprintf(tmp, sizeof(tmp), "%d", (int)value);
#else
return GRIB_DECODING_ERROR;
#endif
}
l = strlen(tmp) + 1;

View File

@ -98,12 +98,6 @@ static grib_accessor_class _grib_accessor_class_codetable_title = {
grib_accessor_class* grib_accessor_class_codetable_title = &_grib_accessor_class_codetable_title;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
typedef struct grib_accessor_codetable
@ -157,11 +151,7 @@ static int unpack_string(grib_accessor* a, char* buffer, size_t* len)
strcpy(tmp, table->entries[value].title);
}
else {
#if 1
snprintf(tmp, sizeof(tmp), "%d", (int)value);
#else
return GRIB_DECODING_ERROR;
#endif
}
l = strlen(tmp) + 1;

View File

@ -98,12 +98,6 @@ static grib_accessor_class _grib_accessor_class_codetable_units = {
grib_accessor_class* grib_accessor_class_codetable_units = &_grib_accessor_class_codetable_units;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
typedef struct grib_accessor_codetable

View File

@ -115,12 +115,6 @@ static grib_accessor_class _grib_accessor_class_concept = {
grib_accessor_class* grib_accessor_class_concept = &_grib_accessor_class_concept;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
#define MAX_CONCEPT_STRING_LENGTH 255
@ -593,53 +587,6 @@ static void destroy(grib_context* c, grib_accessor* a)
//grib_context_free(c,self->cval);
}
// static int is_local_ecmwf_grib2_param_key(grib_accessor* a, long edition, long centre)
// {
// if (edition == 2 && centre == 98) {
// if (a->parent->owner && a->parent->owner->name && strcmp(a->parent->owner->name, "parameters") == 0)
// return 1;
// }
// return 0;
// }
// /* Try to get the name, shortName, units etc for a GRIB2 message with
// * local ECMWF coding i.e. discipline=192 etc
// */
// static const char* get_ECMWF_local_parameter(grib_accessor* a, grib_handle* h)
// {
// int err = 0;
// const char* key_name = a->name; /*this is the key whose value we want*/
// long edition, centre;
// if (h->product_kind != PRODUCT_GRIB)
// return NULL;
// err = grib_get_long(h, "centre", &centre);
// if (err)
// return NULL;
// err = grib_get_long(h, "edition", &edition);
// if (err)
// return NULL;
// if (is_local_ecmwf_grib2_param_key(a, edition, centre)) {
// /* Must be one of: 'name', 'shortName', 'units', 'cfName' etc */
// grib_accessor* a2 = NULL;
// const long pid_guess = guess_paramId(h);
// if (pid_guess == -1)
// return NULL;
// /* Change the paramId so we can get the other string key*/
// err = grib_set_long(h, "paramId", pid_guess);
// if (err)
// return NULL;
// /* Get the string value of key. Do not call grib_get_string() to avoid
// * dangers of infinite recursion as that calls unpack_string()!
// */
// a2 = grib_find_accessor(h, key_name);
// if (!a2)
// return NULL;
// return concept_evaluate(a2);
// }
// return NULL;
// }
static int unpack_string(grib_accessor* a, char* val, size_t* len)
{
size_t slen;

View File

@ -107,26 +107,8 @@ static grib_accessor_class _grib_accessor_class_constant = {
grib_accessor_class* grib_accessor_class_constant = &_grib_accessor_class_constant;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
void accessor_constant_set_type(grib_accessor* a, int type)
{
grib_accessor_constant* self = (grib_accessor_constant*)a;
self->type = type;
}
void accessor_constant_set_dval(grib_accessor* a, double dval)
{
grib_accessor_constant* self = (grib_accessor_constant*)a;
self->dval = dval;
}
static void init(grib_accessor* a, const long len, grib_arguments* arg)
{
a->flags |= GRIB_ACCESSOR_FLAG_READ_ONLY;

View File

@ -99,12 +99,6 @@ static grib_accessor_class _grib_accessor_class_count_file = {
grib_accessor_class* grib_accessor_class_count_file = &_grib_accessor_class_count_file;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long l, grib_arguments* c)

View File

@ -106,12 +106,6 @@ static grib_accessor_class _grib_accessor_class_count_missing = {
grib_accessor_class* grib_accessor_class_count_missing = &_grib_accessor_class_count_missing;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static const unsigned char bitsoff[] = {
@ -133,26 +127,6 @@ static const unsigned char bitsoff[] = {
0
};
/*
static const unsigned char bitson[]={
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1,
2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2,
2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3,
4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3,
2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3,
4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4,
4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5,
6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4,
2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3,
4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4,
4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5,
6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5,
4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5,
6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6,
6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7,
8 };
*/
static void init(grib_accessor* a, const long len, grib_arguments* arg)
{
int n = 0;

View File

@ -101,12 +101,6 @@ static grib_accessor_class _grib_accessor_class_count_total = {
grib_accessor_class* grib_accessor_class_count_total = &_grib_accessor_class_count_total;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long l, grib_arguments* c)

View File

@ -154,12 +154,6 @@ static grib_accessor_class _grib_accessor_class_data_2order_packing = {
grib_accessor_class* grib_accessor_class_data_2order_packing = &_grib_accessor_class_data_2order_packing;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)

View File

@ -118,12 +118,6 @@ static grib_accessor_class _grib_accessor_class_data_apply_bitmap = {
grib_accessor_class* grib_accessor_class_data_apply_bitmap = &_grib_accessor_class_data_apply_bitmap;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)

View File

@ -116,12 +116,6 @@ static grib_accessor_class _grib_accessor_class_data_apply_boustrophedonic = {
grib_accessor_class* grib_accessor_class_data_apply_boustrophedonic = &_grib_accessor_class_data_apply_boustrophedonic;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)

View File

@ -119,12 +119,6 @@ static grib_accessor_class _grib_accessor_class_data_apply_boustrophedonic_bitma
grib_accessor_class* grib_accessor_class_data_apply_boustrophedonic_bitmap = &_grib_accessor_class_data_apply_boustrophedonic_bitmap;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)

View File

@ -123,12 +123,6 @@ static grib_accessor_class _grib_accessor_class_data_apply_gdsnotpresent = {
grib_accessor_class* grib_accessor_class_data_apply_gdsnotpresent = &_grib_accessor_class_data_apply_gdsnotpresent;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)

View File

@ -135,12 +135,6 @@ static grib_accessor_class _grib_accessor_class_data_ccsds_packing = {
grib_accessor_class* grib_accessor_class_data_ccsds_packing = &_grib_accessor_class_data_ccsds_packing;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)

View File

@ -142,12 +142,6 @@ static grib_accessor_class _grib_accessor_class_data_complex_packing = {
grib_accessor_class* grib_accessor_class_data_complex_packing = &_grib_accessor_class_data_complex_packing;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
typedef unsigned long (*encode_float_proc)(double);

View File

@ -128,12 +128,6 @@ static grib_accessor_class _grib_accessor_class_data_dummy_field = {
grib_accessor_class* grib_accessor_class_data_dummy_field = &_grib_accessor_class_data_dummy_field;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)

View File

@ -135,12 +135,6 @@ static grib_accessor_class _grib_accessor_class_data_g1complex_packing = {
grib_accessor_class* grib_accessor_class_data_g1complex_packing = &_grib_accessor_class_data_g1complex_packing;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)
@ -209,17 +203,17 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
if (ret == GRIB_SUCCESS) {
n = a->offset + 4 * ((sub_k + 1) * (sub_k + 2));
#if 1
/* Octet number starts from beginning of message but shouldn't */
if ((ret = grib_set_long_internal(grib_handle_of_accessor(a), self->N, n)) != GRIB_SUCCESS)
return ret;
#else
ret = grib_get_long_internal(grib_handle_of_accessor(a), self->offsetsection, &offsetsection);
if (ret != GRIB_SUCCESS)
return ret;
if ((ret = grib_set_long_internal(grib_handle_of_accessor(a), self->N, n - offsetsection)) != GRIB_SUCCESS)
return ret;
#endif
// ret = grib_get_long_internal(grib_handle_of_accessor(a), self->offsetsection, &offsetsection);
// if (ret != GRIB_SUCCESS)
// return ret;
// if ((ret = grib_set_long_internal(grib_handle_of_accessor(a), self->N, n - offsetsection)) != GRIB_SUCCESS)
// return ret;
ret = grib_get_long_internal(grib_handle_of_accessor(a), self->bits_per_value, &bits_per_value);
if (ret != GRIB_SUCCESS)
return ret;

View File

@ -155,12 +155,6 @@ static grib_accessor_class _grib_accessor_class_data_g1second_order_constant_wid
grib_accessor_class* grib_accessor_class_data_g1second_order_constant_width_packing = &_grib_accessor_class_data_g1second_order_constant_width_packing;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)

View File

@ -48,6 +48,8 @@
MEMBERS=const char* dataFlag
MEMBERS=double* dvalues
MEMBERS=float* fvalues
MEMBERS=int double_dirty
MEMBERS=int float_dirty
MEMBERS=size_t size
MEMBERS=int double_dirty
MEMBERS=int float_dirty
@ -180,12 +182,6 @@ static grib_accessor_class _grib_accessor_class_data_g1second_order_general_exte
grib_accessor_class* grib_accessor_class_data_g1second_order_general_extended_packing = &_grib_accessor_class_data_g1second_order_general_extended_packing;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
#define MAX_NUMBER_OF_GROUPS 65534

View File

@ -154,12 +154,6 @@ static grib_accessor_class _grib_accessor_class_data_g1second_order_general_pack
grib_accessor_class* grib_accessor_class_data_g1second_order_general_packing = &_grib_accessor_class_data_g1second_order_general_packing;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)

View File

@ -152,12 +152,6 @@ static grib_accessor_class _grib_accessor_class_data_g1second_order_row_by_row_p
grib_accessor_class* grib_accessor_class_data_g1second_order_row_by_row_packing = &_grib_accessor_class_data_g1second_order_row_by_row_packing;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)

View File

@ -104,12 +104,6 @@ static grib_accessor_class _grib_accessor_class_data_g1secondary_bitmap = {
grib_accessor_class* grib_accessor_class_data_g1secondary_bitmap = &_grib_accessor_class_data_g1secondary_bitmap;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)

View File

@ -99,12 +99,6 @@ static grib_accessor_class _grib_accessor_class_data_g1shsimple_packing = {
grib_accessor_class* grib_accessor_class_data_g1shsimple_packing = &_grib_accessor_class_data_g1shsimple_packing;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */

View File

@ -124,12 +124,6 @@ static grib_accessor_class _grib_accessor_class_data_g1simple_packing = {
grib_accessor_class* grib_accessor_class_data_g1simple_packing = &_grib_accessor_class_data_g1simple_packing;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)

View File

@ -155,12 +155,6 @@ static grib_accessor_class _grib_accessor_class_data_g22order_packing = {
grib_accessor_class* grib_accessor_class_data_g22order_packing = &_grib_accessor_class_data_g22order_packing;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)

View File

@ -151,12 +151,6 @@ static grib_accessor_class _grib_accessor_class_data_g2bifourier_packing = {
grib_accessor_class* grib_accessor_class_data_g2bifourier_packing = &_grib_accessor_class_data_g2bifourier_packing;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
typedef unsigned long (*encode_float_proc)(double);

View File

@ -128,12 +128,6 @@ static grib_accessor_class _grib_accessor_class_data_g2complex_packing = {
grib_accessor_class* grib_accessor_class_data_g2complex_packing = &_grib_accessor_class_data_g2complex_packing;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)

View File

@ -104,12 +104,6 @@ static grib_accessor_class _grib_accessor_class_data_g2secondary_bitmap = {
grib_accessor_class* grib_accessor_class_data_g2secondary_bitmap = &_grib_accessor_class_data_g2secondary_bitmap;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)

View File

@ -107,12 +107,6 @@ static grib_accessor_class _grib_accessor_class_data_g2shsimple_packing = {
grib_accessor_class* grib_accessor_class_data_g2shsimple_packing = &_grib_accessor_class_data_g2shsimple_packing;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)

View File

@ -118,12 +118,6 @@ static grib_accessor_class _grib_accessor_class_data_g2simple_packing = {
grib_accessor_class* grib_accessor_class_data_g2simple_packing = &_grib_accessor_class_data_g2simple_packing;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)

View File

@ -124,12 +124,6 @@ static grib_accessor_class _grib_accessor_class_data_g2simple_packing_with_prepr
grib_accessor_class* grib_accessor_class_data_g2simple_packing_with_preprocessing = &_grib_accessor_class_data_g2simple_packing_with_preprocessing;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)

View File

@ -140,12 +140,6 @@ static grib_accessor_class _grib_accessor_class_data_jpeg2000_packing = {
grib_accessor_class* grib_accessor_class_data_jpeg2000_packing = &_grib_accessor_class_data_jpeg2000_packing;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static int first = 1;

View File

@ -132,12 +132,6 @@ static grib_accessor_class _grib_accessor_class_data_png_packing = {
grib_accessor_class* grib_accessor_class_data_png_packing = &_grib_accessor_class_data_png_packing;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)

View File

@ -118,12 +118,6 @@ static grib_accessor_class _grib_accessor_class_data_raw_packing = {
grib_accessor_class* grib_accessor_class_data_raw_packing = &_grib_accessor_class_data_raw_packing;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)

View File

@ -119,12 +119,6 @@ static grib_accessor_class _grib_accessor_class_data_run_length_packing = {
grib_accessor_class* grib_accessor_class_data_run_length_packing = &_grib_accessor_class_data_run_length_packing;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)

View File

@ -106,12 +106,6 @@ static grib_accessor_class _grib_accessor_class_data_secondary_bitmap = {
grib_accessor_class* grib_accessor_class_data_secondary_bitmap = &_grib_accessor_class_data_secondary_bitmap;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)

View File

@ -137,12 +137,6 @@ static grib_accessor_class _grib_accessor_class_data_sh_packed = {
grib_accessor_class* grib_accessor_class_data_sh_packed = &_grib_accessor_class_data_sh_packed;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
typedef unsigned long (*encode_float_proc)(double);

View File

@ -137,12 +137,6 @@ static grib_accessor_class _grib_accessor_class_data_sh_unpacked = {
grib_accessor_class* grib_accessor_class_data_sh_unpacked = &_grib_accessor_class_data_sh_unpacked;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
typedef unsigned long (*encode_float_proc)(double);

View File

@ -104,12 +104,6 @@ static grib_accessor_class _grib_accessor_class_data_shsimple_packing = {
grib_accessor_class* grib_accessor_class_data_shsimple_packing = &_grib_accessor_class_data_shsimple_packing;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)

View File

@ -136,12 +136,6 @@ static grib_accessor_class _grib_accessor_class_data_simple_packing = {
grib_accessor_class* grib_accessor_class_data_simple_packing = &_grib_accessor_class_data_simple_packing;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long v, grib_arguments* args)
@ -582,31 +576,6 @@ static int unpack_double_subarray(grib_accessor* a, double* val, size_t start, s
return _unpack_double(a, val, plen, buf, pos, nvals);
}
#if GRIB_IBMPOWER67_OPT
#define restrict
#include "minmax_val.cc"
#undef restrict
#endif
// static int grib_producing_large_constant_fields(const grib_context* c, grib_handle* h, int edition)
// {
// /* GRIB-802: If override key is set, ignore env. var and produce compressed fields */
// if (c->large_constant_fields) { /* This is set by the environment variable */
// /* check the override key */
// int err = 0;
// long override_large_constant_fields = 0;
// err = grib_get_long_internal(h, "override_large_constant_fields", &override_large_constant_fields);
// if (err == GRIB_SUCCESS && override_large_constant_fields) {
// return 0;
// }
// return 1;
// }
// if (c->gribex_mode_on==1 && edition==1) {
// return 1;
// }
// return 0;
// }
static int pack_double(grib_accessor* a, const double* val, size_t* len)
{
grib_accessor_data_simple_packing* self = (grib_accessor_data_simple_packing*)a;
@ -659,14 +628,11 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
max = val[0];
min = max;
#if GRIB_IBMPOWER67_OPT
minmax_val(val + 1, n_vals - 1, &min, &max);
#else
for (i = 1; i < n_vals; i++) {
if (val[i] > max) max = val[i];
else if (val[i] < min) min = val[i];
}
#endif
if ((err = grib_check_data_values_range(gh, min, max)) != GRIB_SUCCESS) {
return err;
}

View File

@ -108,12 +108,6 @@ static grib_accessor_class _grib_accessor_class_decimal_precision = {
grib_accessor_class* grib_accessor_class_decimal_precision = &_grib_accessor_class_decimal_precision;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long l, grib_arguments* args)

View File

@ -111,12 +111,6 @@ static grib_accessor_class _grib_accessor_class_dictionary = {
grib_accessor_class* grib_accessor_class_dictionary = &_grib_accessor_class_dictionary;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long len, grib_arguments* params)
@ -134,7 +128,7 @@ static void init(grib_accessor* a, const long len, grib_arguments* params)
a->flags |= GRIB_ACCESSOR_FLAG_READ_ONLY;
}
static grib_trie* load_dictionary(grib_accessor* a, grib_context* c, int* err)
static grib_trie* load_dictionary(grib_accessor* a, int* err)
{
grib_accessor_dictionary* self = (grib_accessor_dictionary*)a;
@ -151,6 +145,7 @@ static grib_trie* load_dictionary(grib_accessor* a, grib_context* c, int* err)
FILE* f = NULL;
int i = 0;
grib_handle* h = grib_handle_of_accessor(a);
grib_context* c = a->context;
*err = GRIB_SUCCESS;
@ -276,7 +271,7 @@ static int unpack_string(grib_accessor* a, char* buffer, size_t* len)
size_t rsize = 0;
int i = 0;
grib_trie* dictionary = load_dictionary(a, a->context, &err);
grib_trie* dictionary = load_dictionary(a, &err);
if (err)
return err;

View File

@ -103,12 +103,6 @@ static grib_accessor_class _grib_accessor_class_dirty = {
grib_accessor_class* grib_accessor_class_dirty = &_grib_accessor_class_dirty;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long l, grib_arguments* c)

View File

@ -104,12 +104,6 @@ static grib_accessor_class _grib_accessor_class_divdouble = {
grib_accessor_class* grib_accessor_class_divdouble = &_grib_accessor_class_divdouble;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long l, grib_arguments* c)

View File

@ -104,12 +104,6 @@ static grib_accessor_class _grib_accessor_class_double = {
grib_accessor_class* grib_accessor_class_double = &_grib_accessor_class_double;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static int get_native_type(grib_accessor* a)

View File

@ -106,12 +106,6 @@ static grib_accessor_class _grib_accessor_class_element = {
grib_accessor_class* grib_accessor_class_element = &_grib_accessor_class_element;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long l, grib_arguments* c)

View File

@ -99,12 +99,6 @@ static grib_accessor_class _grib_accessor_class_evaluate = {
grib_accessor_class* grib_accessor_class_evaluate = &_grib_accessor_class_evaluate;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long l, grib_arguments* c)

View File

@ -131,12 +131,6 @@ static grib_accessor_class _grib_accessor_class_expanded_descriptors = {
grib_accessor_class* grib_accessor_class_expanded_descriptors = &_grib_accessor_class_expanded_descriptors;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
#define MYDEBUG 0
@ -836,10 +830,9 @@ static int value_count(grib_accessor* a, long* rlen)
static void destroy(grib_context* c, grib_accessor* a)
{
/* grib_accessor_expanded_descriptors* self = (grib_accessor_expanded_descriptors*)a; */
/* if (self->rank==0 && self->expanded) { */
/* grib_bufr_descriptors_array_delete(self->expanded); */
/* } */
// grib_accessor_expanded_descriptors* self = (grib_accessor_expanded_descriptors*)a;
// if (self->rank==0 && self->expanded)
// grib_bufr_descriptors_array_delete(self->expanded);
}
static int get_native_type(grib_accessor* a)

View File

@ -109,12 +109,6 @@ static grib_accessor_class _grib_accessor_class_from_scale_factor_scaled_value =
grib_accessor_class* grib_accessor_class_from_scale_factor_scaled_value = &_grib_accessor_class_from_scale_factor_scaled_value;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long l, grib_arguments* c)

View File

@ -102,12 +102,6 @@ static grib_accessor_class _grib_accessor_class_g1_half_byte_codeflag = {
grib_accessor_class* grib_accessor_class_g1_half_byte_codeflag = &_grib_accessor_class_g1_half_byte_codeflag;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long len, grib_arguments* arg)

View File

@ -102,12 +102,6 @@ static grib_accessor_class _grib_accessor_class_g1_message_length = {
grib_accessor_class* grib_accessor_class_g1_message_length = &_grib_accessor_class_g1_message_length;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long len, grib_arguments* args)
@ -200,10 +194,8 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len)
/* Do not do the length checks in this special case */
if ((ret = pack_long_unsigned_helper(a, &tlen, len, /*check=*/0)) != GRIB_SUCCESS)
return ret;
/*
if((ret = super->pack_long(a,&tlen,len)) != GRIB_SUCCESS)
return ret;
*/
// if((ret = super->pack_long(a,&tlen,len)) != GRIB_SUCCESS) return ret;
{
long total_length = -1, sec4_length = -1;

View File

@ -102,12 +102,6 @@ static grib_accessor_class _grib_accessor_class_g1_section4_length = {
grib_accessor_class* grib_accessor_class_g1_section4_length = &_grib_accessor_class_g1_section4_length;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long len, grib_arguments* args)

View File

@ -110,12 +110,6 @@ static grib_accessor_class _grib_accessor_class_g1area = {
grib_accessor_class* grib_accessor_class_g1area = &_grib_accessor_class_g1area;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long l, grib_arguments* c)

View File

@ -106,12 +106,6 @@ static grib_accessor_class _grib_accessor_class_g1bitmap = {
grib_accessor_class* grib_accessor_class_g1bitmap = &_grib_accessor_class_g1bitmap;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */

View File

@ -113,12 +113,6 @@ static grib_accessor_class _grib_accessor_class_g1date = {
grib_accessor_class* grib_accessor_class_g1date = &_grib_accessor_class_g1date;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long l, grib_arguments* c)

View File

@ -104,12 +104,6 @@ static grib_accessor_class _grib_accessor_class_g1day_of_the_year_date = {
grib_accessor_class* grib_accessor_class_g1day_of_the_year_date = &_grib_accessor_class_g1day_of_the_year_date;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */

View File

@ -105,12 +105,6 @@ static grib_accessor_class _grib_accessor_class_g1end_of_interval_monthly = {
grib_accessor_class* grib_accessor_class_g1end_of_interval_monthly = &_grib_accessor_class_g1end_of_interval_monthly;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long l, grib_arguments* c)

View File

@ -106,12 +106,6 @@ static grib_accessor_class _grib_accessor_class_g1fcperiod = {
grib_accessor_class* grib_accessor_class_g1fcperiod = &_grib_accessor_class_g1fcperiod;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static int unpack_string(grib_accessor* a, char* val, size_t* len)

View File

@ -111,12 +111,6 @@ static grib_accessor_class _grib_accessor_class_g1forecastmonth = {
grib_accessor_class* grib_accessor_class_g1forecastmonth = &_grib_accessor_class_g1forecastmonth;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long l, grib_arguments* c)
@ -142,12 +136,12 @@ static void dump(grib_accessor* a, grib_dumper* dumper)
static int calculate_fcmonth(grib_accessor* a, long verification_yearmonth, long base_date, long day, long hour, long* result)
{
long base_yearmonth = 0;
long base_yearmonth = 0;
long vyear = 0;
long vmonth = 0;
long byear = 0;
long bmonth = 0;
long fcmonth = 0;
long fcmonth = 0;
base_yearmonth = base_date / 100;

View File

@ -105,12 +105,6 @@ static grib_accessor_class _grib_accessor_class_g1monthlydate = {
grib_accessor_class* grib_accessor_class_g1monthlydate = &_grib_accessor_class_g1monthlydate;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long l, grib_arguments* c)

View File

@ -115,12 +115,6 @@ static grib_accessor_class _grib_accessor_class_g1number_of_coded_values_sh_comp
grib_accessor_class* grib_accessor_class_g1number_of_coded_values_sh_complex = &_grib_accessor_class_g1number_of_coded_values_sh_complex;
//static void init_class(grib_accessor_class* c)
//{
// INIT
//}
/* END_CLASS_IMP */
static void init(grib_accessor* a, const long l, grib_arguments* c)

Some files were not shown because too many files have changed in this diff Show More