From be43aaecbfb028765086e83f2ac5b704450b0002 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Sat, 21 Jun 2014 12:19:15 +0100 Subject: [PATCH] Merge grib api and eccodes - part 5 --- src/grib_accessor.c | 2 +- src/grib_accessor_class_bits.c | 130 +++++++++++- ...accessor_class_change_scanning_direction.c | 4 + src/grib_accessor_class_codeflag.c | 4 + src/grib_accessor_class_codetable_title.c | 4 + src/grib_accessor_class_codetable_units.c | 4 + src/grib_accessor_class_count_file.c | 4 + src/grib_accessor_class_count_missing.c | 4 + src/grib_accessor_class_count_total.c | 4 + src/grib_accessor_class_data_2order_packing.c | 4 + ...accessor_class_data_2order_packing_count.c | 4 + ..._accessor_class_data_apply_gdsnotpresent.c | 4 + ...grib_accessor_class_data_complex_packing.c | 4 + src/grib_accessor_class_data_constant_field.c | 4 + src/grib_accessor_class_data_dummy_field.c | 4 + ...ib_accessor_class_data_g1complex_packing.c | 4 + ...ta_g1second_order_constant_width_packing.c | 4 + ...lass_data_g1second_order_general_packing.c | 4 + ...s_data_g1second_order_row_by_row_packing.c | 4 + ...b_accessor_class_data_g1secondary_bitmap.c | 4 + ...b_accessor_class_data_g1shsimple_packing.c | 4 + ...rib_accessor_class_data_g1simple_packing.c | 4 + ...rib_accessor_class_data_g22order_packing.c | 4 + ...ib_accessor_class_data_g2complex_packing.c | 4 + ...b_accessor_class_data_g2secondary_bitmap.c | 4 + ...b_accessor_class_data_g2shsimple_packing.c | 4 + ...data_g2simple_packing_with_preprocessing.c | 4 + src/grib_accessor_class_data_png_packing.c | 4 + ...rib_accessor_class_data_secondary_bitmap.c | 4 + src/grib_accessor_class_data_sh_packed.c | 4 + src/grib_accessor_class_data_sh_unpacked.c | 4 + ...rib_accessor_class_data_shsimple_packing.c | 4 + src/grib_accessor_class_decimal_precision.c | 4 + src/grib_accessor_class_dirty.c | 4 + src/grib_accessor_class_divdouble.c | 4 + src/grib_accessor_class_element.c | 4 + src/grib_accessor_class_evaluate.c | 4 + src/grib_accessor_class_forward.c | 4 + ...sor_class_from_scale_factor_scaled_value.c | 4 + src/grib_accessor_class_g1_increment.c | 4 + src/grib_accessor_class_g1_message_length.c | 4 + src/grib_accessor_class_g1_section4_length.c | 4 + src/grib_accessor_class_g1area.c | 4 + src/grib_accessor_class_g1date.c | 4 + ...ib_accessor_class_g1day_of_the_year_date.c | 4 + src/grib_accessor_class_g1fcperiod.c | 4 + src/grib_accessor_class_g1forecastmonth.c | 4 + src/grib_accessor_class_g1monthlydate.c | 4 + ...lass_g1number_of_coded_values_sh_complex.c | 4 + ...class_g1number_of_coded_values_sh_simple.c | 4 + src/grib_accessor_class_g1p1p2.c | 4 + src/grib_accessor_class_g1param.c | 4 + src/grib_accessor_class_g1step_range.c | 4 + src/grib_accessor_class_g1verificationdate.c | 4 + src/grib_accessor_class_g2_eps.c | 4 + src/grib_accessor_class_g2_mars_labeling.c | 4 + src/grib_accessor_class_g2bitmap.c | 4 + src/grib_accessor_class_g2bitmap_present.c | 4 + src/grib_accessor_class_g2date.c | 4 + src/grib_accessor_class_g2end_step.c | 4 + src/grib_accessor_class_g2grid.c | 4 + src/grib_accessor_class_g2latlon.c | 4 + src/grib_accessor_class_g2level.c | 4 + src/grib_accessor_class_g2lon.c | 4 + src/grib_accessor_class_g2step.c | 4 + src/grib_accessor_class_g2step_range.c | 4 + src/grib_accessor_class_gds_is_present.c | 4 + ...ib_accessor_class_gds_not_present_bitmap.c | 4 + src/grib_accessor_class_getenv.c | 4 + src/grib_accessor_class_global_gaussian.c | 4 + src/grib_accessor_class_gts_header.c | 4 + src/grib_accessor_class_headers_only.c | 18 +- src/grib_accessor_class_ifs_param.c | 4 + src/grib_accessor_class_iterator.c | 4 + src/grib_accessor_class_julian_day.c | 4 + src/grib_accessor_class_ksec1expver.c | 4 + src/grib_accessor_class_laplacian.c | 4 + src/grib_accessor_class_latitudes.c | 4 + src/grib_accessor_class_latlon_increment.c | 4 + src/grib_accessor_class_latlonvalues.c | 4 + src/grib_accessor_class_library_version.c | 4 + src/grib_accessor_class_local_definition.c | 4 + src/grib_accessor_class_long_vector.c | 4 + src/grib_accessor_class_longitudes.c | 4 + src/grib_accessor_class_mars_param.c | 4 + src/grib_accessor_class_mars_step.c | 4 + src/grib_accessor_class_nearest.c | 4 + ...ib_accessor_class_number_of_coded_values.c | 4 + src/grib_accessor_class_number_of_points.c | 4 + ...accessor_class_number_of_points_gaussian.c | 4 + src/grib_accessor_class_number_of_values.c | 4 + ..._class_number_of_values_data_raw_packing.c | 4 + src/grib_accessor_class_octect_number.c | 4 + src/grib_accessor_class_offset_file.c | 4 + src/grib_accessor_class_offset_values.c | 4 + ...rib_accessor_class_reference_value_error.c | 4 + src/grib_accessor_class_round.c | 4 + src/grib_accessor_class_scale.c | 4 + src/grib_accessor_class_scale_values.c | 4 + ...cessor_class_second_order_bits_per_value.c | 4 + src/grib_accessor_class_section_length.c | 4 + src/grib_accessor_class_section_pointer.c | 4 + ...grib_accessor_class_select_step_template.c | 4 + ...grib_accessor_class_simple_packing_error.c | 4 + src/grib_accessor_class_size.c | 4 + src/grib_accessor_class_spectral_truncation.c | 4 + src/grib_accessor_class_sprintf.c | 4 + src/grib_accessor_class_step_in_units.c | 4 + src/grib_accessor_class_sum.c | 4 + src/grib_accessor_class_suppressed.c | 4 + src/grib_accessor_class_time.c | 4 + src/grib_accessor_class_times.c | 4 + src/grib_accessor_class_transient.c | 4 + src/grib_accessor_class_validity_date.c | 4 + src/grib_accessor_class_validity_time.c | 4 + src/grib_accessor_class_vector.c | 4 + src/grib_accessor_factory.h | 24 ++- src/grib_api_prototypes.h | 2 +- src/grib_bits_any_endian.c | 58 ++++++ src/grib_bits_fast_big_endian.c | 61 ++++++ src/grib_darray.c | 4 +- src/grib_dumper.c | 15 ++ src/grib_dumper_class.h | 1 + src/grib_dumper_factory.h | 1 + src/grib_errors.c.in | 4 +- src/grib_errors.txt | 4 + src/grib_handle.c | 4 + src/grib_io.c | 190 ++++++++++++++++++ src/grib_query.c | 61 +++++- src/grib_value.c | 29 +++ 130 files changed, 1031 insertions(+), 29 deletions(-) diff --git a/src/grib_accessor.c b/src/grib_accessor.c index 476b68cb2..0adf85d1e 100644 --- a/src/grib_accessor.c +++ b/src/grib_accessor.c @@ -348,7 +348,7 @@ long grib_byte_count(grib_accessor* a) return 0; } -long grib_value_count(grib_accessor* a, long* count) +int grib_value_count(grib_accessor* a,long* count) { grib_accessor_class *c = NULL; int err = 0; diff --git a/src/grib_accessor_class_bits.c b/src/grib_accessor_class_bits.c index c225c03d6..06c9a7588 100644 --- a/src/grib_accessor_class_bits.c +++ b/src/grib_accessor_class_bits.c @@ -22,12 +22,17 @@ START_CLASS_DEF CLASS = accessor SUPER = grib_accessor_class_gen - IMPLEMENTS = unpack_long;get_native_type - IMPLEMENTS = pack_long + IMPLEMENTS = get_native_type + IMPLEMENTS = unpack_long; pack_long + IMPLEMENTS = unpack_double; pack_double + IMPLEMENTS = unpack_string IMPLEMENTS = init MEMBERS=const char* argument MEMBERS=long start MEMBERS=long len + MEMBERS=double referenceValue + MEMBERS=double referenceValuePresent + MEMBERS=double scale END_CLASS_DEF */ @@ -43,8 +48,11 @@ or edit "accessor.class" and rerun ./make_class.pl */ static int get_native_type(grib_accessor*); +static int pack_double(grib_accessor*, const double* val,size_t *len); static int pack_long(grib_accessor*, const long* val,size_t *len); +static int unpack_double(grib_accessor*, double* val,size_t *len); static int unpack_long(grib_accessor*, long* val,size_t *len); +static int unpack_string (grib_accessor*, char*, size_t *len); static void init(grib_accessor*,const long, grib_arguments* ); static void init_class(grib_accessor_class*); @@ -55,6 +63,9 @@ typedef struct grib_accessor_bits { const char* argument; long start; long len; + double referenceValue; + double referenceValuePresent; + double scale; } grib_accessor_bits; extern grib_accessor_class* grib_accessor_class_gen; @@ -80,10 +91,12 @@ static grib_accessor_class _grib_accessor_class_bits = { 0, /* grib_pack procedures long */ &pack_long, /* grib_pack procedures long */ &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_unpack procedures double */ + &pack_double, /* grib_pack procedures double */ + &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ + &unpack_string, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -114,10 +127,9 @@ static void init_class(grib_accessor_class* c) c->sub_section = (*(c->super))->sub_section; c->pack_missing = (*(c->super))->pack_missing; c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; @@ -138,11 +150,22 @@ static void init_class(grib_accessor_class* c) static void init(grib_accessor* a,const long l, grib_arguments* c) { grib_accessor_bits* self = (grib_accessor_bits*)a; + grib_expression* e=NULL; int n = 0; self->argument = grib_arguments_get_name(a->parent->h,c,n++); self->start = grib_arguments_get_long(a->parent->h,c,n++); self->len = grib_arguments_get_long(a->parent->h,c,n++); + e=grib_arguments_get_expression(a->parent->h,c,n++); + if (e) { + grib_expression_evaluate_double(a->parent->h,e,&(self->referenceValue)); + self->referenceValuePresent=1; + } else { + self->referenceValuePresent=0; + } + if (self->referenceValuePresent) { + self->scale=grib_arguments_get_double(a->parent->h,c,n++); + } assert(self->len <= sizeof(long)*8); @@ -175,6 +198,55 @@ static int unpack_long (grib_accessor* a, long* val, size_t *len) return ret; } +static int unpack_double (grib_accessor* a, double* val, size_t *len) +{ + grib_accessor_bits* self = (grib_accessor_bits*)a; + grib_accessor* x=NULL; + unsigned char* p=NULL; + grib_handle* h=a->parent->h; + long start,length; + int ret=0; + + if(*len < 1) return GRIB_WRONG_ARRAY_SIZE; + + start=self->start; + length=self->len; + + x=grib_find_accessor(a->parent->h,self->argument); + if (!x) return GRIB_NOT_FOUND; + + p = h->buffer->data + grib_byte_offset(x); + *val=grib_decode_unsigned_long(p,&start,length); + + *val=(*val+self->referenceValue)/self->scale; + + *len=1; + + return ret; +} + +static int pack_double(grib_accessor* a, const double* val, size_t *len) +{ + grib_accessor_bits* self = (grib_accessor_bits*)a; + grib_accessor* x=NULL; + grib_handle* h=a->parent->h; + unsigned char* p=NULL; + long start,length,lval; + + if(*len != 1) return GRIB_WRONG_ARRAY_SIZE; + + start = self->start; + length = self->len; + + x=grib_find_accessor(a->parent->h,self->argument); + if (!x) return GRIB_NOT_FOUND; + + p=h->buffer->data + grib_byte_offset(x); + + lval= *val *self->scale - self->referenceValue; + return grib_encode_unsigned_longb(p,lval,&start,length); + +} static int pack_long(grib_accessor* a, const long* val, size_t *len) { @@ -198,9 +270,47 @@ static int pack_long(grib_accessor* a, const long* val, size_t *len) } static int get_native_type(grib_accessor* a){ - return GRIB_TYPE_BYTES; + int type=GRIB_TYPE_BYTES; + grib_accessor_bits* self = (grib_accessor_bits*)a; + + if (a->flags & GRIB_ACCESSOR_FLAG_STRING_TYPE) + type=GRIB_TYPE_STRING; + + if (a->flags & GRIB_ACCESSOR_FLAG_LONG_TYPE) + type=GRIB_TYPE_LONG; + + if (self->referenceValuePresent) + type=GRIB_TYPE_DOUBLE; + + return type; + + +} + +static int unpack_string(grib_accessor*a , char* v, size_t *len){ + int ret=0; + double dval=0; + long lval=0; + size_t llen=1; + + switch (get_native_type(a)) { + case GRIB_TYPE_LONG: + ret=unpack_long(a,&lval,&llen); + sprintf(v,"%ld",lval); + *len=strlen(v); + break; + + case GRIB_TYPE_DOUBLE: + ret=unpack_double(a,&dval,&llen); + sprintf(v,"%g",dval); + *len=strlen(v); + break; + + default: + Assert(0); + } + return ret; } - diff --git a/src/grib_accessor_class_change_scanning_direction.c b/src/grib_accessor_class_change_scanning_direction.c index 0570b1a46..b47b54598 100644 --- a/src/grib_accessor_class_change_scanning_direction.c +++ b/src/grib_accessor_class_change_scanning_direction.c @@ -89,6 +89,8 @@ static grib_accessor_class _grib_accessor_class_change_scanning_direction = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -124,6 +126,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_codeflag.c b/src/grib_accessor_class_codeflag.c index 9d3490700..9ed2cebf7 100644 --- a/src/grib_accessor_class_codeflag.c +++ b/src/grib_accessor_class_codeflag.c @@ -79,6 +79,8 @@ static grib_accessor_class _grib_accessor_class_codeflag = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -114,6 +116,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_codetable_title.c b/src/grib_accessor_class_codetable_title.c index 574e70b89..0a3d3e827 100644 --- a/src/grib_accessor_class_codetable_title.c +++ b/src/grib_accessor_class_codetable_title.c @@ -76,6 +76,8 @@ static grib_accessor_class _grib_accessor_class_codetable_title = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ &unpack_string, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -111,6 +113,8 @@ static void init_class(grib_accessor_class* c) c->pack_double = (*(c->super))->pack_double; c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_codetable_units.c b/src/grib_accessor_class_codetable_units.c index 20c06d19d..ef60f1505 100644 --- a/src/grib_accessor_class_codetable_units.c +++ b/src/grib_accessor_class_codetable_units.c @@ -76,6 +76,8 @@ static grib_accessor_class _grib_accessor_class_codetable_units = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ &unpack_string, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -111,6 +113,8 @@ static void init_class(grib_accessor_class* c) c->pack_double = (*(c->super))->pack_double; c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_count_file.c b/src/grib_accessor_class_count_file.c index 5fec161e9..940482596 100644 --- a/src/grib_accessor_class_count_file.c +++ b/src/grib_accessor_class_count_file.c @@ -72,6 +72,8 @@ static grib_accessor_class _grib_accessor_class_count_file = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -108,6 +110,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_count_missing.c b/src/grib_accessor_class_count_missing.c index c14eacd1c..2c59b6f3e 100644 --- a/src/grib_accessor_class_count_missing.c +++ b/src/grib_accessor_class_count_missing.c @@ -77,6 +77,8 @@ static grib_accessor_class _grib_accessor_class_count_missing = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -112,6 +114,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_count_total.c b/src/grib_accessor_class_count_total.c index afecd7ee8..e36b1a11c 100644 --- a/src/grib_accessor_class_count_total.c +++ b/src/grib_accessor_class_count_total.c @@ -74,6 +74,8 @@ static grib_accessor_class _grib_accessor_class_count_total = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -110,6 +112,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_data_2order_packing.c b/src/grib_accessor_class_data_2order_packing.c index 42cefa138..30e5759d8 100644 --- a/src/grib_accessor_class_data_2order_packing.c +++ b/src/grib_accessor_class_data_2order_packing.c @@ -128,6 +128,8 @@ static grib_accessor_class _grib_accessor_class_data_2order_packing = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -162,6 +164,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_data_2order_packing_count.c b/src/grib_accessor_class_data_2order_packing_count.c index 176db64af..33e426181 100644 --- a/src/grib_accessor_class_data_2order_packing_count.c +++ b/src/grib_accessor_class_data_2order_packing_count.c @@ -85,6 +85,8 @@ static grib_accessor_class _grib_accessor_class_data_2order_packing_count = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -121,6 +123,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_data_apply_gdsnotpresent.c b/src/grib_accessor_class_data_apply_gdsnotpresent.c index bb5eb7697..fc7905798 100644 --- a/src/grib_accessor_class_data_apply_gdsnotpresent.c +++ b/src/grib_accessor_class_data_apply_gdsnotpresent.c @@ -96,6 +96,8 @@ static grib_accessor_class _grib_accessor_class_data_apply_gdsnotpresent = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -128,6 +130,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_data_complex_packing.c b/src/grib_accessor_class_data_complex_packing.c index 2de9d1b41..102cfa553 100644 --- a/src/grib_accessor_class_data_complex_packing.c +++ b/src/grib_accessor_class_data_complex_packing.c @@ -110,6 +110,8 @@ static grib_accessor_class _grib_accessor_class_data_complex_packing = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -144,6 +146,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_data_constant_field.c b/src/grib_accessor_class_data_constant_field.c index c61373947..862892f88 100644 --- a/src/grib_accessor_class_data_constant_field.c +++ b/src/grib_accessor_class_data_constant_field.c @@ -85,6 +85,8 @@ static grib_accessor_class _grib_accessor_class_data_constant_field = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -119,6 +121,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_data_dummy_field.c b/src/grib_accessor_class_data_dummy_field.c index 8324b2f38..cb2bc1dc8 100644 --- a/src/grib_accessor_class_data_dummy_field.c +++ b/src/grib_accessor_class_data_dummy_field.c @@ -100,6 +100,8 @@ static grib_accessor_class _grib_accessor_class_data_dummy_field = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -134,6 +136,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_data_g1complex_packing.c b/src/grib_accessor_class_data_g1complex_packing.c index eeda860d8..c61a47b20 100644 --- a/src/grib_accessor_class_data_g1complex_packing.c +++ b/src/grib_accessor_class_data_g1complex_packing.c @@ -107,6 +107,8 @@ static grib_accessor_class _grib_accessor_class_data_g1complex_packing = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -143,6 +145,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_data_g1second_order_constant_width_packing.c b/src/grib_accessor_class_data_g1second_order_constant_width_packing.c index be123f84a..254206163 100644 --- a/src/grib_accessor_class_data_g1second_order_constant_width_packing.c +++ b/src/grib_accessor_class_data_g1second_order_constant_width_packing.c @@ -122,6 +122,8 @@ static grib_accessor_class _grib_accessor_class_data_g1second_order_constant_wid &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -156,6 +158,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_data_g1second_order_general_packing.c b/src/grib_accessor_class_data_g1second_order_general_packing.c index b4bdf3f45..f281ecb09 100644 --- a/src/grib_accessor_class_data_g1second_order_general_packing.c +++ b/src/grib_accessor_class_data_g1second_order_general_packing.c @@ -122,6 +122,8 @@ static grib_accessor_class _grib_accessor_class_data_g1second_order_general_pack &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -156,6 +158,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_data_g1second_order_row_by_row_packing.c b/src/grib_accessor_class_data_g1second_order_row_by_row_packing.c index 0202788ba..106faa2e2 100644 --- a/src/grib_accessor_class_data_g1second_order_row_by_row_packing.c +++ b/src/grib_accessor_class_data_g1second_order_row_by_row_packing.c @@ -122,6 +122,8 @@ static grib_accessor_class _grib_accessor_class_data_g1second_order_row_by_row_p &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -156,6 +158,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_data_g1secondary_bitmap.c b/src/grib_accessor_class_data_g1secondary_bitmap.c index 4c26a1a27..0acdd6b50 100644 --- a/src/grib_accessor_class_data_g1secondary_bitmap.c +++ b/src/grib_accessor_class_data_g1secondary_bitmap.c @@ -77,6 +77,8 @@ static grib_accessor_class _grib_accessor_class_data_g1secondary_bitmap = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -112,6 +114,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_data_g1shsimple_packing.c b/src/grib_accessor_class_data_g1shsimple_packing.c index 35d4e4681..1d81027d5 100644 --- a/src/grib_accessor_class_data_g1shsimple_packing.c +++ b/src/grib_accessor_class_data_g1shsimple_packing.c @@ -72,6 +72,8 @@ static grib_accessor_class _grib_accessor_class_data_g1shsimple_packing = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -107,6 +109,8 @@ static void init_class(grib_accessor_class* c) c->pack_double = (*(c->super))->pack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_data_g1simple_packing.c b/src/grib_accessor_class_data_g1simple_packing.c index 981f64b61..3063c4e65 100644 --- a/src/grib_accessor_class_data_g1simple_packing.c +++ b/src/grib_accessor_class_data_g1simple_packing.c @@ -95,6 +95,8 @@ static grib_accessor_class _grib_accessor_class_data_g1simple_packing = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -130,6 +132,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_data_g22order_packing.c b/src/grib_accessor_class_data_g22order_packing.c index e0ca85061..0878145bf 100644 --- a/src/grib_accessor_class_data_g22order_packing.c +++ b/src/grib_accessor_class_data_g22order_packing.c @@ -120,6 +120,8 @@ static grib_accessor_class _grib_accessor_class_data_g22order_packing = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -154,6 +156,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_data_g2complex_packing.c b/src/grib_accessor_class_data_g2complex_packing.c index 32dd133d0..c1d50d5ad 100644 --- a/src/grib_accessor_class_data_g2complex_packing.c +++ b/src/grib_accessor_class_data_g2complex_packing.c @@ -100,6 +100,8 @@ static grib_accessor_class _grib_accessor_class_data_g2complex_packing = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -135,6 +137,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_data_g2secondary_bitmap.c b/src/grib_accessor_class_data_g2secondary_bitmap.c index 2f1818df1..a8f2a7d9a 100644 --- a/src/grib_accessor_class_data_g2secondary_bitmap.c +++ b/src/grib_accessor_class_data_g2secondary_bitmap.c @@ -77,6 +77,8 @@ static grib_accessor_class _grib_accessor_class_data_g2secondary_bitmap = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -112,6 +114,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_data_g2shsimple_packing.c b/src/grib_accessor_class_data_g2shsimple_packing.c index c53fe750d..79e0d7a7f 100644 --- a/src/grib_accessor_class_data_g2shsimple_packing.c +++ b/src/grib_accessor_class_data_g2shsimple_packing.c @@ -78,6 +78,8 @@ static grib_accessor_class _grib_accessor_class_data_g2shsimple_packing = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -112,6 +114,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_data_g2simple_packing_with_preprocessing.c b/src/grib_accessor_class_data_g2simple_packing_with_preprocessing.c index fd0371d8b..e45d26fc8 100644 --- a/src/grib_accessor_class_data_g2simple_packing_with_preprocessing.c +++ b/src/grib_accessor_class_data_g2simple_packing_with_preprocessing.c @@ -104,6 +104,8 @@ static grib_accessor_class _grib_accessor_class_data_g2simple_packing_with_prepr &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -138,6 +140,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_data_png_packing.c b/src/grib_accessor_class_data_png_packing.c index 525e1fb89..fe0ba7eb2 100644 --- a/src/grib_accessor_class_data_png_packing.c +++ b/src/grib_accessor_class_data_png_packing.c @@ -101,6 +101,8 @@ static grib_accessor_class _grib_accessor_class_data_png_packing = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -135,6 +137,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_data_secondary_bitmap.c b/src/grib_accessor_class_data_secondary_bitmap.c index 1de0968a8..d0c93bd96 100644 --- a/src/grib_accessor_class_data_secondary_bitmap.c +++ b/src/grib_accessor_class_data_secondary_bitmap.c @@ -79,6 +79,8 @@ static grib_accessor_class _grib_accessor_class_data_secondary_bitmap = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -113,6 +115,8 @@ static void init_class(grib_accessor_class* c) c->pack_double = (*(c->super))->pack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_data_sh_packed.c b/src/grib_accessor_class_data_sh_packed.c index 7a986748d..0751082cc 100644 --- a/src/grib_accessor_class_data_sh_packed.c +++ b/src/grib_accessor_class_data_sh_packed.c @@ -108,6 +108,8 @@ static grib_accessor_class _grib_accessor_class_data_sh_packed = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -143,6 +145,8 @@ static void init_class(grib_accessor_class* c) c->pack_double = (*(c->super))->pack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_data_sh_unpacked.c b/src/grib_accessor_class_data_sh_unpacked.c index faec8e774..312d11cae 100644 --- a/src/grib_accessor_class_data_sh_unpacked.c +++ b/src/grib_accessor_class_data_sh_unpacked.c @@ -108,6 +108,8 @@ static grib_accessor_class _grib_accessor_class_data_sh_unpacked = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -143,6 +145,8 @@ static void init_class(grib_accessor_class* c) c->pack_double = (*(c->super))->pack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_data_shsimple_packing.c b/src/grib_accessor_class_data_shsimple_packing.c index d64630bf5..5319c5c32 100644 --- a/src/grib_accessor_class_data_shsimple_packing.c +++ b/src/grib_accessor_class_data_shsimple_packing.c @@ -77,6 +77,8 @@ static grib_accessor_class _grib_accessor_class_data_shsimple_packing = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -111,6 +113,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_decimal_precision.c b/src/grib_accessor_class_decimal_precision.c index 744d7472c..fce9079db 100644 --- a/src/grib_accessor_class_decimal_precision.c +++ b/src/grib_accessor_class_decimal_precision.c @@ -81,6 +81,8 @@ static grib_accessor_class _grib_accessor_class_decimal_precision = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -116,6 +118,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_dirty.c b/src/grib_accessor_class_dirty.c index 26f76dfb9..75da09448 100644 --- a/src/grib_accessor_class_dirty.c +++ b/src/grib_accessor_class_dirty.c @@ -76,6 +76,8 @@ static grib_accessor_class _grib_accessor_class_dirty = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -111,6 +113,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_divdouble.c b/src/grib_accessor_class_divdouble.c index 396426d4f..c8d6e9c59 100644 --- a/src/grib_accessor_class_divdouble.c +++ b/src/grib_accessor_class_divdouble.c @@ -77,6 +77,8 @@ static grib_accessor_class _grib_accessor_class_divdouble = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -113,6 +115,8 @@ static void init_class(grib_accessor_class* c) c->pack_double = (*(c->super))->pack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_element.c b/src/grib_accessor_class_element.c index dc5cda045..7871c1ca4 100644 --- a/src/grib_accessor_class_element.c +++ b/src/grib_accessor_class_element.c @@ -79,6 +79,8 @@ static grib_accessor_class _grib_accessor_class_element = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -114,6 +116,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_evaluate.c b/src/grib_accessor_class_evaluate.c index a1888569a..2bcaadd6b 100644 --- a/src/grib_accessor_class_evaluate.c +++ b/src/grib_accessor_class_evaluate.c @@ -72,6 +72,8 @@ static grib_accessor_class _grib_accessor_class_evaluate = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -107,6 +109,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_forward.c b/src/grib_accessor_class_forward.c index ee9505449..a6215843f 100644 --- a/src/grib_accessor_class_forward.c +++ b/src/grib_accessor_class_forward.c @@ -68,6 +68,8 @@ static grib_accessor_class _grib_accessor_class_forward = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -104,6 +106,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_from_scale_factor_scaled_value.c b/src/grib_accessor_class_from_scale_factor_scaled_value.c index 16ef0477c..5dc562f18 100644 --- a/src/grib_accessor_class_from_scale_factor_scaled_value.c +++ b/src/grib_accessor_class_from_scale_factor_scaled_value.c @@ -79,6 +79,8 @@ static grib_accessor_class _grib_accessor_class_from_scale_factor_scaled_value = &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -114,6 +116,8 @@ static void init_class(grib_accessor_class* c) c->pack_double = (*(c->super))->pack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g1_increment.c b/src/grib_accessor_class_g1_increment.c index 4fdaf51e4..880ae9f86 100644 --- a/src/grib_accessor_class_g1_increment.c +++ b/src/grib_accessor_class_g1_increment.c @@ -84,6 +84,8 @@ static grib_accessor_class _grib_accessor_class_g1_increment = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -119,6 +121,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g1_message_length.c b/src/grib_accessor_class_g1_message_length.c index 1dc080ca7..53836b9fd 100644 --- a/src/grib_accessor_class_g1_message_length.c +++ b/src/grib_accessor_class_g1_message_length.c @@ -75,6 +75,8 @@ static grib_accessor_class _grib_accessor_class_g1_message_length = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -110,6 +112,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g1_section4_length.c b/src/grib_accessor_class_g1_section4_length.c index 9a73aa11f..52438010a 100644 --- a/src/grib_accessor_class_g1_section4_length.c +++ b/src/grib_accessor_class_g1_section4_length.c @@ -75,6 +75,8 @@ static grib_accessor_class _grib_accessor_class_g1_section4_length = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -110,6 +112,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g1area.c b/src/grib_accessor_class_g1area.c index 4e917ac48..7b00ce6d3 100644 --- a/src/grib_accessor_class_g1area.c +++ b/src/grib_accessor_class_g1area.c @@ -83,6 +83,8 @@ static grib_accessor_class _grib_accessor_class_g1area = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ &unpack_string, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -116,6 +118,8 @@ static void init_class(grib_accessor_class* c) c->pack_long = (*(c->super))->pack_long; c->unpack_long = (*(c->super))->unpack_long; c->pack_string = (*(c->super))->pack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g1date.c b/src/grib_accessor_class_g1date.c index 9c47fe7c7..bb27ab6a6 100644 --- a/src/grib_accessor_class_g1date.c +++ b/src/grib_accessor_class_g1date.c @@ -86,6 +86,8 @@ static grib_accessor_class _grib_accessor_class_g1date = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ &unpack_string, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -118,6 +120,8 @@ static void init_class(grib_accessor_class* c) c->pack_double = (*(c->super))->pack_double; c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g1day_of_the_year_date.c b/src/grib_accessor_class_g1day_of_the_year_date.c index 3c2d44593..12224f4ed 100644 --- a/src/grib_accessor_class_g1day_of_the_year_date.c +++ b/src/grib_accessor_class_g1day_of_the_year_date.c @@ -77,6 +77,8 @@ static grib_accessor_class _grib_accessor_class_g1day_of_the_year_date = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ &unpack_string, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -112,6 +114,8 @@ static void init_class(grib_accessor_class* c) c->pack_double = (*(c->super))->pack_double; c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g1fcperiod.c b/src/grib_accessor_class_g1fcperiod.c index ee218a90b..47ed344e9 100644 --- a/src/grib_accessor_class_g1fcperiod.c +++ b/src/grib_accessor_class_g1fcperiod.c @@ -78,6 +78,8 @@ static grib_accessor_class _grib_accessor_class_g1fcperiod = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ &unpack_string, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -114,6 +116,8 @@ static void init_class(grib_accessor_class* c) c->pack_double = (*(c->super))->pack_double; c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g1forecastmonth.c b/src/grib_accessor_class_g1forecastmonth.c index 1c382ef35..ac0b99f84 100644 --- a/src/grib_accessor_class_g1forecastmonth.c +++ b/src/grib_accessor_class_g1forecastmonth.c @@ -82,6 +82,8 @@ static grib_accessor_class _grib_accessor_class_g1forecastmonth = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -116,6 +118,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g1monthlydate.c b/src/grib_accessor_class_g1monthlydate.c index 0b0ddca23..0f03a05c8 100644 --- a/src/grib_accessor_class_g1monthlydate.c +++ b/src/grib_accessor_class_g1monthlydate.c @@ -78,6 +78,8 @@ static grib_accessor_class _grib_accessor_class_g1monthlydate = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -113,6 +115,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g1number_of_coded_values_sh_complex.c b/src/grib_accessor_class_g1number_of_coded_values_sh_complex.c index 429806a9e..097b258ba 100644 --- a/src/grib_accessor_class_g1number_of_coded_values_sh_complex.c +++ b/src/grib_accessor_class_g1number_of_coded_values_sh_complex.c @@ -88,6 +88,8 @@ static grib_accessor_class _grib_accessor_class_g1number_of_coded_values_sh_comp 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -124,6 +126,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g1number_of_coded_values_sh_simple.c b/src/grib_accessor_class_g1number_of_coded_values_sh_simple.c index d5006e1dd..3db6334f7 100644 --- a/src/grib_accessor_class_g1number_of_coded_values_sh_simple.c +++ b/src/grib_accessor_class_g1number_of_coded_values_sh_simple.c @@ -82,6 +82,8 @@ static grib_accessor_class _grib_accessor_class_g1number_of_coded_values_sh_simp 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -118,6 +120,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g1p1p2.c b/src/grib_accessor_class_g1p1p2.c index d9f518466..836c98e6c 100644 --- a/src/grib_accessor_class_g1p1p2.c +++ b/src/grib_accessor_class_g1p1p2.c @@ -81,6 +81,8 @@ static grib_accessor_class _grib_accessor_class_g1p1p2 = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -114,6 +116,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g1param.c b/src/grib_accessor_class_g1param.c index 847578f45..f6ee8a010 100644 --- a/src/grib_accessor_class_g1param.c +++ b/src/grib_accessor_class_g1param.c @@ -74,6 +74,8 @@ static grib_accessor_class _grib_accessor_class_g1param = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -109,6 +111,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g1step_range.c b/src/grib_accessor_class_g1step_range.c index 1ea46c1ce..1df60c22d 100644 --- a/src/grib_accessor_class_g1step_range.c +++ b/src/grib_accessor_class_g1step_range.c @@ -100,6 +100,8 @@ static grib_accessor_class _grib_accessor_class_g1step_range = { 0, /* grib_unpack procedures double */ &pack_string, /* grib_pack procedures string */ &unpack_string, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -129,6 +131,8 @@ static void init_class(grib_accessor_class* c) c->is_missing = (*(c->super))->is_missing; c->pack_double = (*(c->super))->pack_double; c->unpack_double = (*(c->super))->unpack_double; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g1verificationdate.c b/src/grib_accessor_class_g1verificationdate.c index f31222d57..c79064b57 100644 --- a/src/grib_accessor_class_g1verificationdate.c +++ b/src/grib_accessor_class_g1verificationdate.c @@ -77,6 +77,8 @@ static grib_accessor_class _grib_accessor_class_g1verificationdate = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -112,6 +114,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g2_eps.c b/src/grib_accessor_class_g2_eps.c index d819d0c55..ea4e50c55 100644 --- a/src/grib_accessor_class_g2_eps.c +++ b/src/grib_accessor_class_g2_eps.c @@ -89,6 +89,8 @@ static grib_accessor_class _grib_accessor_class_g2_eps = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -123,6 +125,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g2_mars_labeling.c b/src/grib_accessor_class_g2_mars_labeling.c index 65e63c2e0..dd3fd3b76 100644 --- a/src/grib_accessor_class_g2_mars_labeling.c +++ b/src/grib_accessor_class_g2_mars_labeling.c @@ -100,6 +100,8 @@ static grib_accessor_class _grib_accessor_class_g2_mars_labeling = { 0, /* grib_unpack procedures double */ &pack_string, /* grib_pack procedures string */ &unpack_string, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -131,6 +133,8 @@ static void init_class(grib_accessor_class* c) c->is_missing = (*(c->super))->is_missing; c->pack_double = (*(c->super))->pack_double; c->unpack_double = (*(c->super))->unpack_double; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g2bitmap.c b/src/grib_accessor_class_g2bitmap.c index db765cace..fdea587fc 100644 --- a/src/grib_accessor_class_g2bitmap.c +++ b/src/grib_accessor_class_g2bitmap.c @@ -78,6 +78,8 @@ static grib_accessor_class _grib_accessor_class_g2bitmap = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -113,6 +115,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g2bitmap_present.c b/src/grib_accessor_class_g2bitmap_present.c index 1c1a861c3..13c93e25d 100644 --- a/src/grib_accessor_class_g2bitmap_present.c +++ b/src/grib_accessor_class_g2bitmap_present.c @@ -76,6 +76,8 @@ static grib_accessor_class _grib_accessor_class_g2bitmap_present = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -111,6 +113,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g2date.c b/src/grib_accessor_class_g2date.c index 8bcc89384..94a44a124 100644 --- a/src/grib_accessor_class_g2date.c +++ b/src/grib_accessor_class_g2date.c @@ -79,6 +79,8 @@ static grib_accessor_class _grib_accessor_class_g2date = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -113,6 +115,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g2end_step.c b/src/grib_accessor_class_g2end_step.c index cd2f2625e..84438f088 100644 --- a/src/grib_accessor_class_g2end_step.c +++ b/src/grib_accessor_class_g2end_step.c @@ -111,6 +111,8 @@ static grib_accessor_class _grib_accessor_class_g2end_step = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -145,6 +147,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g2grid.c b/src/grib_accessor_class_g2grid.c index c26df8614..3116b48b8 100644 --- a/src/grib_accessor_class_g2grid.c +++ b/src/grib_accessor_class_g2grid.c @@ -92,6 +92,8 @@ static grib_accessor_class _grib_accessor_class_g2grid = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -126,6 +128,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g2latlon.c b/src/grib_accessor_class_g2latlon.c index 7e6461754..a9313a77d 100644 --- a/src/grib_accessor_class_g2latlon.c +++ b/src/grib_accessor_class_g2latlon.c @@ -83,6 +83,8 @@ static grib_accessor_class _grib_accessor_class_g2latlon = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -116,6 +118,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g2level.c b/src/grib_accessor_class_g2level.c index 6c7fadc1a..e9b423e1d 100644 --- a/src/grib_accessor_class_g2level.c +++ b/src/grib_accessor_class_g2level.c @@ -80,6 +80,8 @@ static grib_accessor_class _grib_accessor_class_g2level = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -113,6 +115,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g2lon.c b/src/grib_accessor_class_g2lon.c index 941c059e0..6b55c2d5c 100644 --- a/src/grib_accessor_class_g2lon.c +++ b/src/grib_accessor_class_g2lon.c @@ -76,6 +76,8 @@ static grib_accessor_class _grib_accessor_class_g2lon = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -111,6 +113,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g2step.c b/src/grib_accessor_class_g2step.c index 4514f4a33..5abcbdf3d 100644 --- a/src/grib_accessor_class_g2step.c +++ b/src/grib_accessor_class_g2step.c @@ -75,6 +75,8 @@ static grib_accessor_class _grib_accessor_class_g2step = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -109,6 +111,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_g2step_range.c b/src/grib_accessor_class_g2step_range.c index 438caeaa3..1d2a6e42b 100644 --- a/src/grib_accessor_class_g2step_range.c +++ b/src/grib_accessor_class_g2step_range.c @@ -85,6 +85,8 @@ static grib_accessor_class _grib_accessor_class_g2step_range = { 0, /* grib_unpack procedures double */ &pack_string, /* grib_pack procedures string */ &unpack_string, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -114,6 +116,8 @@ static void init_class(grib_accessor_class* c) c->is_missing = (*(c->super))->is_missing; c->pack_double = (*(c->super))->pack_double; c->unpack_double = (*(c->super))->unpack_double; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_gds_is_present.c b/src/grib_accessor_class_gds_is_present.c index 3a92c4df5..c95bea240 100644 --- a/src/grib_accessor_class_gds_is_present.c +++ b/src/grib_accessor_class_gds_is_present.c @@ -82,6 +82,8 @@ static grib_accessor_class _grib_accessor_class_gds_is_present = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -117,6 +119,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_gds_not_present_bitmap.c b/src/grib_accessor_class_gds_not_present_bitmap.c index 2c025f7bc..5283799a6 100644 --- a/src/grib_accessor_class_gds_not_present_bitmap.c +++ b/src/grib_accessor_class_gds_not_present_bitmap.c @@ -87,6 +87,8 @@ static grib_accessor_class _grib_accessor_class_gds_not_present_bitmap = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -121,6 +123,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_getenv.c b/src/grib_accessor_class_getenv.c index c758295fe..6656ad80e 100644 --- a/src/grib_accessor_class_getenv.c +++ b/src/grib_accessor_class_getenv.c @@ -78,6 +78,8 @@ static grib_accessor_class _grib_accessor_class_getenv = { 0, /* grib_unpack procedures double */ &pack_string, /* grib_pack procedures string */ &unpack_string, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -111,6 +113,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_double = (*(c->super))->pack_double; c->unpack_double = (*(c->super))->unpack_double; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_global_gaussian.c b/src/grib_accessor_class_global_gaussian.c index 610945e1a..62919fe30 100644 --- a/src/grib_accessor_class_global_gaussian.c +++ b/src/grib_accessor_class_global_gaussian.c @@ -93,6 +93,8 @@ static grib_accessor_class _grib_accessor_class_global_gaussian = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -128,6 +130,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_gts_header.c b/src/grib_accessor_class_gts_header.c index b03178e8c..719e441ed 100644 --- a/src/grib_accessor_class_gts_header.c +++ b/src/grib_accessor_class_gts_header.c @@ -76,6 +76,8 @@ static grib_accessor_class _grib_accessor_class_gts_header = { 0, /* grib_unpack procedures double */ &pack_string, /* grib_pack procedures string */ &unpack_string, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -109,6 +111,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_double = (*(c->super))->pack_double; c->unpack_double = (*(c->super))->unpack_double; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_headers_only.c b/src/grib_accessor_class_headers_only.c index 976bd632b..3cdfea8e5 100644 --- a/src/grib_accessor_class_headers_only.c +++ b/src/grib_accessor_class_headers_only.c @@ -8,10 +8,6 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -/*********************************************** - * Enrico Fucile - **********************************************/ - #include "grib_api_internal.h" /* This is used by make_class.pl @@ -19,7 +15,7 @@ START_CLASS_DEF CLASS = accessor SUPER = grib_accessor_class_gen - IMPLEMENTS = unpack_long + IMPLEMENTS = unpack_long; get_native_type IMPLEMENTS = init END_CLASS_DEF */ @@ -34,6 +30,7 @@ or edit "accessor.class" and rerun ./make_class.pl */ +static int get_native_type(grib_accessor*); static int unpack_long(grib_accessor*, long* val,size_t *len); static void init(grib_accessor*,const long, grib_arguments* ); static void init_class(grib_accessor_class*); @@ -61,7 +58,7 @@ static grib_accessor_class _grib_accessor_class_headers_only = { 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ - 0, /* get native type */ + &get_native_type, /* get native type */ 0, /* get sub_section */ 0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */ @@ -71,6 +68,8 @@ static grib_accessor_class _grib_accessor_class_headers_only = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -98,7 +97,6 @@ static void init_class(grib_accessor_class* c) c->value_count = (*(c->super))->value_count; c->byte_count = (*(c->super))->byte_count; c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; c->sub_section = (*(c->super))->sub_section; c->pack_missing = (*(c->super))->pack_missing; c->is_missing = (*(c->super))->is_missing; @@ -107,6 +105,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; @@ -138,3 +138,7 @@ static int unpack_long(grib_accessor* a, long* val, size_t *len) return 0; } +static int get_native_type(grib_accessor* a){ + return GRIB_TYPE_LONG; +} + diff --git a/src/grib_accessor_class_ifs_param.c b/src/grib_accessor_class_ifs_param.c index e6b7666d9..6bceb89e4 100644 --- a/src/grib_accessor_class_ifs_param.c +++ b/src/grib_accessor_class_ifs_param.c @@ -79,6 +79,8 @@ static grib_accessor_class _grib_accessor_class_ifs_param = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -113,6 +115,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_iterator.c b/src/grib_accessor_class_iterator.c index eac0600f0..dc1ee02ee 100644 --- a/src/grib_accessor_class_iterator.c +++ b/src/grib_accessor_class_iterator.c @@ -73,6 +73,8 @@ static grib_accessor_class _grib_accessor_class_iterator = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -109,6 +111,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_julian_day.c b/src/grib_accessor_class_julian_day.c index 3832a212f..dccca2bdd 100644 --- a/src/grib_accessor_class_julian_day.c +++ b/src/grib_accessor_class_julian_day.c @@ -84,6 +84,8 @@ static grib_accessor_class _grib_accessor_class_julian_day = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -116,6 +118,8 @@ static void init_class(grib_accessor_class* c) c->is_missing = (*(c->super))->is_missing; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_ksec1expver.c b/src/grib_accessor_class_ksec1expver.c index 8c9430931..a31b77401 100644 --- a/src/grib_accessor_class_ksec1expver.c +++ b/src/grib_accessor_class_ksec1expver.c @@ -73,6 +73,8 @@ static grib_accessor_class _grib_accessor_class_ksec1expver = { 0, /* grib_unpack procedures double */ &pack_string, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -107,6 +109,8 @@ static void init_class(grib_accessor_class* c) c->pack_double = (*(c->super))->pack_double; c->unpack_double = (*(c->super))->unpack_double; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_laplacian.c b/src/grib_accessor_class_laplacian.c index 385481faa..f79eb6f81 100644 --- a/src/grib_accessor_class_laplacian.c +++ b/src/grib_accessor_class_laplacian.c @@ -88,6 +88,8 @@ static grib_accessor_class _grib_accessor_class_laplacian = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -121,6 +123,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_latitudes.c b/src/grib_accessor_class_latitudes.c index e32fc4dcf..1362af6e4 100644 --- a/src/grib_accessor_class_latitudes.c +++ b/src/grib_accessor_class_latitudes.c @@ -81,6 +81,8 @@ static grib_accessor_class _grib_accessor_class_latitudes = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -116,6 +118,8 @@ static void init_class(grib_accessor_class* c) c->pack_double = (*(c->super))->pack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_latlon_increment.c b/src/grib_accessor_class_latlon_increment.c index db080ece8..325fb43f4 100644 --- a/src/grib_accessor_class_latlon_increment.c +++ b/src/grib_accessor_class_latlon_increment.c @@ -93,6 +93,8 @@ static grib_accessor_class _grib_accessor_class_latlon_increment = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -127,6 +129,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_latlonvalues.c b/src/grib_accessor_class_latlonvalues.c index 8961fd97c..3aa767d22 100644 --- a/src/grib_accessor_class_latlonvalues.c +++ b/src/grib_accessor_class_latlonvalues.c @@ -78,6 +78,8 @@ static grib_accessor_class _grib_accessor_class_latlonvalues = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -113,6 +115,8 @@ static void init_class(grib_accessor_class* c) c->pack_double = (*(c->super))->pack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_library_version.c b/src/grib_accessor_class_library_version.c index eb1bbdbd2..617abed8e 100644 --- a/src/grib_accessor_class_library_version.c +++ b/src/grib_accessor_class_library_version.c @@ -71,6 +71,8 @@ static grib_accessor_class _grib_accessor_class_library_version = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ &unpack_string, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -105,6 +107,8 @@ static void init_class(grib_accessor_class* c) c->pack_double = (*(c->super))->pack_double; c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_local_definition.c b/src/grib_accessor_class_local_definition.c index 10ace7d50..e6cb4a8b2 100644 --- a/src/grib_accessor_class_local_definition.c +++ b/src/grib_accessor_class_local_definition.c @@ -96,6 +96,8 @@ static grib_accessor_class _grib_accessor_class_local_definition = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -130,6 +132,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_long_vector.c b/src/grib_accessor_class_long_vector.c index 5db0502f4..6d31b1d69 100644 --- a/src/grib_accessor_class_long_vector.c +++ b/src/grib_accessor_class_long_vector.c @@ -85,6 +85,8 @@ static grib_accessor_class _grib_accessor_class_long_vector = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -118,6 +120,8 @@ static void init_class(grib_accessor_class* c) c->pack_double = (*(c->super))->pack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_longitudes.c b/src/grib_accessor_class_longitudes.c index f1c2e6d5f..300781a51 100644 --- a/src/grib_accessor_class_longitudes.c +++ b/src/grib_accessor_class_longitudes.c @@ -86,6 +86,8 @@ static grib_accessor_class _grib_accessor_class_longitudes = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -121,6 +123,8 @@ static void init_class(grib_accessor_class* c) c->pack_double = (*(c->super))->pack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_mars_param.c b/src/grib_accessor_class_mars_param.c index fcd9f2463..e3c433a2f 100644 --- a/src/grib_accessor_class_mars_param.c +++ b/src/grib_accessor_class_mars_param.c @@ -77,6 +77,8 @@ static grib_accessor_class _grib_accessor_class_mars_param = { 0, /* grib_unpack procedures double */ &pack_string, /* grib_pack procedures string */ &unpack_string, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -111,6 +113,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_double = (*(c->super))->pack_double; c->unpack_double = (*(c->super))->unpack_double; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_mars_step.c b/src/grib_accessor_class_mars_step.c index 4c0a59649..fe6a09ce2 100644 --- a/src/grib_accessor_class_mars_step.c +++ b/src/grib_accessor_class_mars_step.c @@ -80,6 +80,8 @@ static grib_accessor_class _grib_accessor_class_mars_step = { 0, /* grib_unpack procedures double */ &pack_string, /* grib_pack procedures string */ &unpack_string, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -111,6 +113,8 @@ static void init_class(grib_accessor_class* c) c->is_missing = (*(c->super))->is_missing; c->pack_double = (*(c->super))->pack_double; c->unpack_double = (*(c->super))->unpack_double; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_nearest.c b/src/grib_accessor_class_nearest.c index 9eb8201d1..14bce5871 100644 --- a/src/grib_accessor_class_nearest.c +++ b/src/grib_accessor_class_nearest.c @@ -69,6 +69,8 @@ static grib_accessor_class _grib_accessor_class_nearest = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -105,6 +107,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_number_of_coded_values.c b/src/grib_accessor_class_number_of_coded_values.c index 3a676402a..d356a4db7 100644 --- a/src/grib_accessor_class_number_of_coded_values.c +++ b/src/grib_accessor_class_number_of_coded_values.c @@ -82,6 +82,8 @@ static grib_accessor_class _grib_accessor_class_number_of_coded_values = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -118,6 +120,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_number_of_points.c b/src/grib_accessor_class_number_of_points.c index 0e1c030b4..767e623f5 100644 --- a/src/grib_accessor_class_number_of_points.c +++ b/src/grib_accessor_class_number_of_points.c @@ -80,6 +80,8 @@ static grib_accessor_class _grib_accessor_class_number_of_points = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -116,6 +118,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_number_of_points_gaussian.c b/src/grib_accessor_class_number_of_points_gaussian.c index ab11438ce..f900c78ba 100644 --- a/src/grib_accessor_class_number_of_points_gaussian.c +++ b/src/grib_accessor_class_number_of_points_gaussian.c @@ -92,6 +92,8 @@ static grib_accessor_class _grib_accessor_class_number_of_points_gaussian = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -128,6 +130,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_number_of_values.c b/src/grib_accessor_class_number_of_values.c index aef6f8b84..3a086ca50 100644 --- a/src/grib_accessor_class_number_of_values.c +++ b/src/grib_accessor_class_number_of_values.c @@ -84,6 +84,8 @@ static grib_accessor_class _grib_accessor_class_number_of_values = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -120,6 +122,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_number_of_values_data_raw_packing.c b/src/grib_accessor_class_number_of_values_data_raw_packing.c index 83f92a190..274b694f2 100644 --- a/src/grib_accessor_class_number_of_values_data_raw_packing.c +++ b/src/grib_accessor_class_number_of_values_data_raw_packing.c @@ -84,6 +84,8 @@ static grib_accessor_class _grib_accessor_class_number_of_values_data_raw_packin 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -120,6 +122,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_octect_number.c b/src/grib_accessor_class_octect_number.c index e4ace358d..485371e74 100644 --- a/src/grib_accessor_class_octect_number.c +++ b/src/grib_accessor_class_octect_number.c @@ -78,6 +78,8 @@ static grib_accessor_class _grib_accessor_class_octect_number = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -113,6 +115,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_offset_file.c b/src/grib_accessor_class_offset_file.c index 14256bd8b..06f5b0328 100644 --- a/src/grib_accessor_class_offset_file.c +++ b/src/grib_accessor_class_offset_file.c @@ -74,6 +74,8 @@ static grib_accessor_class _grib_accessor_class_offset_file = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ &unpack_string, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -109,6 +111,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_double = (*(c->super))->pack_double; c->pack_string = (*(c->super))->pack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_offset_values.c b/src/grib_accessor_class_offset_values.c index 6957bf075..1d36c2d3c 100644 --- a/src/grib_accessor_class_offset_values.c +++ b/src/grib_accessor_class_offset_values.c @@ -77,6 +77,8 @@ static grib_accessor_class _grib_accessor_class_offset_values = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -112,6 +114,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_reference_value_error.c b/src/grib_accessor_class_reference_value_error.c index 3a0a4fa8f..2b8ceaf93 100644 --- a/src/grib_accessor_class_reference_value_error.c +++ b/src/grib_accessor_class_reference_value_error.c @@ -78,6 +78,8 @@ static grib_accessor_class _grib_accessor_class_reference_value_error = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -114,6 +116,8 @@ static void init_class(grib_accessor_class* c) c->pack_double = (*(c->super))->pack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_round.c b/src/grib_accessor_class_round.c index b63d34c62..1b235ab83 100644 --- a/src/grib_accessor_class_round.c +++ b/src/grib_accessor_class_round.c @@ -71,6 +71,8 @@ static grib_accessor_class _grib_accessor_class_round = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ &unpack_string, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -106,6 +108,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_double = (*(c->super))->pack_double; c->pack_string = (*(c->super))->pack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_scale.c b/src/grib_accessor_class_scale.c index ce19fc271..194833ae2 100644 --- a/src/grib_accessor_class_scale.c +++ b/src/grib_accessor_class_scale.c @@ -86,6 +86,8 @@ static grib_accessor_class _grib_accessor_class_scale = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -119,6 +121,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_scale_values.c b/src/grib_accessor_class_scale_values.c index 8619a9b93..ff7431c4c 100644 --- a/src/grib_accessor_class_scale_values.c +++ b/src/grib_accessor_class_scale_values.c @@ -77,6 +77,8 @@ static grib_accessor_class _grib_accessor_class_scale_values = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -112,6 +114,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_second_order_bits_per_value.c b/src/grib_accessor_class_second_order_bits_per_value.c index 70c2c2fe1..a09aa8d3a 100644 --- a/src/grib_accessor_class_second_order_bits_per_value.c +++ b/src/grib_accessor_class_second_order_bits_per_value.c @@ -82,6 +82,8 @@ static grib_accessor_class _grib_accessor_class_second_order_bits_per_value = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -117,6 +119,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_section_length.c b/src/grib_accessor_class_section_length.c index 107249932..27aade993 100644 --- a/src/grib_accessor_class_section_length.c +++ b/src/grib_accessor_class_section_length.c @@ -73,6 +73,8 @@ static grib_accessor_class _grib_accessor_class_section_length = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -108,6 +110,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_section_pointer.c b/src/grib_accessor_class_section_pointer.c index 78d64cb32..b78044fcb 100644 --- a/src/grib_accessor_class_section_pointer.c +++ b/src/grib_accessor_class_section_pointer.c @@ -77,6 +77,8 @@ static grib_accessor_class _grib_accessor_class_section_pointer = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ &unpack_string, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -110,6 +112,8 @@ static void init_class(grib_accessor_class* c) c->pack_double = (*(c->super))->pack_double; c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_select_step_template.c b/src/grib_accessor_class_select_step_template.c index 45a71f52d..fe05889c2 100644 --- a/src/grib_accessor_class_select_step_template.c +++ b/src/grib_accessor_class_select_step_template.c @@ -83,6 +83,8 @@ static grib_accessor_class _grib_accessor_class_select_step_template = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -117,6 +119,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_simple_packing_error.c b/src/grib_accessor_class_simple_packing_error.c index 3e5b1f49a..fcd2763dd 100644 --- a/src/grib_accessor_class_simple_packing_error.c +++ b/src/grib_accessor_class_simple_packing_error.c @@ -84,6 +84,8 @@ static grib_accessor_class _grib_accessor_class_simple_packing_error = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -120,6 +122,8 @@ static void init_class(grib_accessor_class* c) c->pack_double = (*(c->super))->pack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_size.c b/src/grib_accessor_class_size.c index 3c79b5d3a..8b62e8cfa 100644 --- a/src/grib_accessor_class_size.c +++ b/src/grib_accessor_class_size.c @@ -70,6 +70,8 @@ static grib_accessor_class _grib_accessor_class_size = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -106,6 +108,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_spectral_truncation.c b/src/grib_accessor_class_spectral_truncation.c index db2acdf3f..cd7d6b7dd 100644 --- a/src/grib_accessor_class_spectral_truncation.c +++ b/src/grib_accessor_class_spectral_truncation.c @@ -82,6 +82,8 @@ static grib_accessor_class _grib_accessor_class_spectral_truncation = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -118,6 +120,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_sprintf.c b/src/grib_accessor_class_sprintf.c index 13cc13dfc..c88ead2ec 100644 --- a/src/grib_accessor_class_sprintf.c +++ b/src/grib_accessor_class_sprintf.c @@ -74,6 +74,8 @@ static grib_accessor_class _grib_accessor_class_sprintf = { 0, /* grib_unpack procedures double */ &pack_string, /* grib_pack procedures string */ &unpack_string, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -107,6 +109,8 @@ static void init_class(grib_accessor_class* c) c->unpack_long = (*(c->super))->unpack_long; c->pack_double = (*(c->super))->pack_double; c->unpack_double = (*(c->super))->unpack_double; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_step_in_units.c b/src/grib_accessor_class_step_in_units.c index 845b3e6f7..a8cfe3102 100644 --- a/src/grib_accessor_class_step_in_units.c +++ b/src/grib_accessor_class_step_in_units.c @@ -82,6 +82,8 @@ static grib_accessor_class _grib_accessor_class_step_in_units = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -116,6 +118,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_sum.c b/src/grib_accessor_class_sum.c index 7c63b746b..7644ba8ae 100644 --- a/src/grib_accessor_class_sum.c +++ b/src/grib_accessor_class_sum.c @@ -80,6 +80,8 @@ static grib_accessor_class _grib_accessor_class_sum = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -114,6 +116,8 @@ static void init_class(grib_accessor_class* c) c->pack_double = (*(c->super))->pack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_suppressed.c b/src/grib_accessor_class_suppressed.c index 0ac8344b5..a27f3647e 100644 --- a/src/grib_accessor_class_suppressed.c +++ b/src/grib_accessor_class_suppressed.c @@ -81,6 +81,8 @@ static grib_accessor_class _grib_accessor_class_suppressed = { &unpack_double, /* grib_unpack procedures double */ &pack_string, /* grib_pack procedures string */ &unpack_string, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -110,6 +112,8 @@ static void init_class(grib_accessor_class* c) c->sub_section = (*(c->super))->sub_section; c->pack_missing = (*(c->super))->pack_missing; c->is_missing = (*(c->super))->is_missing; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_time.c b/src/grib_accessor_class_time.c index e97d09eb2..42eac5fda 100644 --- a/src/grib_accessor_class_time.c +++ b/src/grib_accessor_class_time.c @@ -80,6 +80,8 @@ static grib_accessor_class _grib_accessor_class_time = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ &unpack_string, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -113,6 +115,8 @@ static void init_class(grib_accessor_class* c) c->pack_double = (*(c->super))->pack_double; c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_times.c b/src/grib_accessor_class_times.c index 7a52dbe76..a8bb34ae8 100755 --- a/src/grib_accessor_class_times.c +++ b/src/grib_accessor_class_times.c @@ -80,6 +80,8 @@ static grib_accessor_class _grib_accessor_class_times = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -114,6 +116,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_transient.c b/src/grib_accessor_class_transient.c index 6526b014d..c72e88c2d 100644 --- a/src/grib_accessor_class_transient.c +++ b/src/grib_accessor_class_transient.c @@ -69,6 +69,8 @@ static grib_accessor_class _grib_accessor_class_transient = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -106,6 +108,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_validity_date.c b/src/grib_accessor_class_validity_date.c index 136ca9491..779b043fe 100644 --- a/src/grib_accessor_class_validity_date.c +++ b/src/grib_accessor_class_validity_date.c @@ -86,6 +86,8 @@ static grib_accessor_class _grib_accessor_class_validity_date = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -121,6 +123,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_validity_time.c b/src/grib_accessor_class_validity_time.c index 9eca9ddba..c0cb5b1c7 100644 --- a/src/grib_accessor_class_validity_time.c +++ b/src/grib_accessor_class_validity_time.c @@ -84,6 +84,8 @@ static grib_accessor_class _grib_accessor_class_validity_time = { 0, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -119,6 +121,8 @@ static void init_class(grib_accessor_class* c) c->unpack_double = (*(c->super))->unpack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_class_vector.c b/src/grib_accessor_class_vector.c index fdf188e91..0f4a9848b 100644 --- a/src/grib_accessor_class_vector.c +++ b/src/grib_accessor_class_vector.c @@ -81,6 +81,8 @@ static grib_accessor_class _grib_accessor_class_vector = { &unpack_double, /* grib_unpack procedures double */ 0, /* grib_pack procedures string */ 0, /* grib_unpack procedures string */ + 0, /* grib_pack array procedures string */ + 0, /* grib_unpack array procedures string */ 0, /* grib_pack procedures bytes */ 0, /* grib_unpack procedures bytes */ 0, /* pack_expression */ @@ -117,6 +119,8 @@ static void init_class(grib_accessor_class* c) c->pack_double = (*(c->super))->pack_double; c->pack_string = (*(c->super))->pack_string; c->unpack_string = (*(c->super))->unpack_string; + c->pack_string_array = (*(c->super))->pack_string_array; + c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; diff --git a/src/grib_accessor_factory.h b/src/grib_accessor_factory.h index 4d4f30666..2e57068d0 100644 --- a/src/grib_accessor_factory.h +++ b/src/grib_accessor_factory.h @@ -1,6 +1,7 @@ /* This file is automatically generated by ./make_class.pl, do not edit */ { "abstract_long_vector", &grib_accessor_class_abstract_long_vector, }, { "abstract_vector", &grib_accessor_class_abstract_vector, }, +{ "apply_operators", &grib_accessor_class_apply_operators, }, { "array", &grib_accessor_class_array, }, { "ascii", &grib_accessor_class_ascii, }, { "assert", &grib_accessor_class_assert, }, @@ -10,6 +11,14 @@ { "bits_per_value", &grib_accessor_class_bits_per_value, }, { "box", &grib_accessor_class_box, }, { "budgdate", &grib_accessor_class_budgdate, }, +{ "bufr_data", &grib_accessor_class_bufr_data, }, +{ "bufr_data_element", &grib_accessor_class_bufr_data_element, }, +{ "bufr_element", &grib_accessor_class_bufr_element, }, +{ "bufr_group", &grib_accessor_class_bufr_group, }, +{ "bufr_group_number", &grib_accessor_class_bufr_group_number, }, +{ "bufr_has_delayed_replication", &grib_accessor_class_bufr_has_delayed_replication, }, +{ "bufr_subset_number", &grib_accessor_class_bufr_subset_number, }, +{ "bufr_uncompressed_data", &grib_accessor_class_bufr_uncompressed_data, }, { "bytes", &grib_accessor_class_bytes, }, { "change_scanning_direction", &grib_accessor_class_change_scanning_direction, }, { "codeflag", &grib_accessor_class_codeflag, }, @@ -54,11 +63,13 @@ { "data_simple_packing", &grib_accessor_class_data_simple_packing, }, { "data_szip_packing", &grib_accessor_class_data_szip_packing, }, { "decimal_precision", &grib_accessor_class_decimal_precision, }, +{ "dictionary", &grib_accessor_class_dictionary, }, { "dirty", &grib_accessor_class_dirty, }, { "divdouble", &grib_accessor_class_divdouble, }, { "double", &grib_accessor_class_double, }, { "element", &grib_accessor_class_element, }, { "evaluate", &grib_accessor_class_evaluate, }, +{ "expanded_descriptors", &grib_accessor_class_expanded_descriptors, }, { "forward", &grib_accessor_class_forward, }, { "from_scale_factor_scaled_value", &grib_accessor_class_from_scale_factor_scaled_value, }, { "g1_half_byte_codeflag", &grib_accessor_class_g1_half_byte_codeflag, }, @@ -96,7 +107,9 @@ { "gen", &grib_accessor_class_gen, }, { "getenv", &grib_accessor_class_getenv, }, { "global_gaussian", &grib_accessor_class_global_gaussian, }, +{ "group", &grib_accessor_class_group, }, { "gts_header", &grib_accessor_class_gts_header, }, +{ "hash_array", &grib_accessor_class_hash_array, }, { "headers_only", &grib_accessor_class_headers_only, }, { "ibmfloat", &grib_accessor_class_ibmfloat, }, { "ieeefloat", &grib_accessor_class_ieeefloat, }, @@ -119,8 +132,10 @@ { "mars_step", &grib_accessor_class_mars_step, }, { "md5", &grib_accessor_class_md5, }, { "message", &grib_accessor_class_message, }, +{ "message_copy", &grib_accessor_class_message_copy, }, { "missing", &grib_accessor_class_missing, }, { "nearest", &grib_accessor_class_nearest, }, +{ "non_alpha", &grib_accessor_class_non_alpha, }, { "number_of_coded_values", &grib_accessor_class_number_of_coded_values, }, { "number_of_points", &grib_accessor_class_number_of_points, }, { "number_of_points_gaussian", &grib_accessor_class_number_of_points_gaussian, }, @@ -145,11 +160,13 @@ { "section_padding", &grib_accessor_class_section_padding, }, { "section_pointer", &grib_accessor_class_section_pointer, }, { "select_step_template", &grib_accessor_class_select_step_template, }, -{ "g2_chemical", &grib_accessor_class_g2_chemical, }, +{ "sexagesimal2decimal", &grib_accessor_class_sexagesimal2decimal, }, { "signed", &grib_accessor_class_signed, }, { "signed_bits", &grib_accessor_class_signed_bits, }, { "simple_packing_error", &grib_accessor_class_simple_packing_error, }, { "size", &grib_accessor_class_size, }, +{ "smart_table", &grib_accessor_class_smart_table, }, +{ "smart_table_column", &grib_accessor_class_smart_table_column, }, { "spd", &grib_accessor_class_spd, }, { "spectral_truncation", &grib_accessor_class_spectral_truncation, }, { "sprintf", &grib_accessor_class_sprintf, }, @@ -160,7 +177,12 @@ { "suppressed", &grib_accessor_class_suppressed, }, { "time", &grib_accessor_class_time, }, { "times", &grib_accessor_class_times, }, +{ "to_double", &grib_accessor_class_to_double, }, +{ "to_integer", &grib_accessor_class_to_integer, }, +{ "to_string", &grib_accessor_class_to_string, }, { "transient", &grib_accessor_class_transient, }, +{ "unexpanded_descriptors", &grib_accessor_class_unexpanded_descriptors, }, +{ "unpack_bufr_values", &grib_accessor_class_unpack_bufr_values, }, { "unsigned", &grib_accessor_class_unsigned, }, { "unsigned_bits", &grib_accessor_class_unsigned_bits, }, { "validity_date", &grib_accessor_class_validity_date, }, diff --git a/src/grib_api_prototypes.h b/src/grib_api_prototypes.h index bca420370..42fb67aff 100644 --- a/src/grib_api_prototypes.h +++ b/src/grib_api_prototypes.h @@ -152,7 +152,7 @@ long grib_get_next_position_offset(grib_accessor *a); long grib_string_length(grib_accessor *a); long grib_byte_offset(grib_accessor *a); long grib_byte_count(grib_accessor *a); -long grib_value_count(grib_accessor *a, long *count); +int grib_value_count(grib_accessor *a, long *count); int grib_accessor_notify_change(grib_accessor *a, grib_accessor *changed); void grib_init_accessor(grib_accessor *a, const long len, grib_arguments *args); void grib_free_accessor(grib_context *ct, grib_accessor *a); diff --git a/src/grib_bits_any_endian.c b/src/grib_bits_any_endian.c index 54f1d6cf7..701665feb 100644 --- a/src/grib_bits_any_endian.c +++ b/src/grib_bits_any_endian.c @@ -13,6 +13,64 @@ * * ***************************************************************************/ +typedef struct bits_all_one_t { + int inited; + int size; + long v[128]; +} bits_all_one_t; + +static bits_all_one_t bits_all_one={0,0,{0,}}; + +static void init_bits_all_one() { + int size=sizeof(long)*8; + long* v=0; + unsigned long cmask=-1; + bits_all_one.size=size; + bits_all_one.inited=1; + v=bits_all_one.v+size; + *v= cmask << size; + while (size>0) *(--v)= ~(cmask << --size); + +} + +int grib_is_all_bits_one(long val, long nbits) { + + if (!bits_all_one.inited) init_bits_all_one(); + return bits_all_one.v[nbits]==val; + +} + + +char* grib_decode_string(const unsigned char* bitStream, long *bitOffset, size_t numberOfCharacters,char* string) +{ + size_t i; + long byteOffset = *bitOffset / 8; + int remainder = *bitOffset % 8; + unsigned char c; + unsigned char* p; + char* s=string; + unsigned char mask[] ={ 0, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE }; + int remainderComplement=8-remainder; + + if (numberOfCharacters==0) return string; + + p=(unsigned char*)bitStream+byteOffset; + + if ( remainder == 0 ) { + memcpy(string,bitStream+byteOffset,numberOfCharacters); + *bitOffset+=numberOfCharacters*8; + return string; + } + + for (i=0;i>remainderComplement ); + s++; + } + *bitOffset+=numberOfCharacters*8; + return string; +} unsigned long grib_decode_unsigned_long(const unsigned char* p, long *bitp, long nbits) { diff --git a/src/grib_bits_fast_big_endian.c b/src/grib_bits_fast_big_endian.c index 02ded51ab..0060337a5 100644 --- a/src/grib_bits_fast_big_endian.c +++ b/src/grib_bits_fast_big_endian.c @@ -13,6 +13,67 @@ * * ***************************************************************************/ + +typedef struct bits_all_one_t { + int inited; + int size; + long v[128]; +} bits_all_one_t; + +static bits_all_one_t bits_all_one={0,0,{0,}}; + +static void init_bits_all_one() { + int size=sizeof(long)*8; + long* v=0; + unsigned long cmask=-1; + bits_all_one.size=size; + bits_all_one.inited=1; + v=bits_all_one.v+size; + *v= cmask << size; + while (size>0) *(--v)= ~(cmask << --size); + +} + +int grib_is_all_bits_one(long val, long nbits) { + + if (!bits_all_one.inited) init_bits_all_one(); + return bits_all_one.v[nbits]==val; + +} + + +char* grib_decode_string(const unsigned char* bitStream, long *bitOffset, size_t numberOfCharacters,char* string) +{ + size_t i; + long byteOffset = *bitOffset / 8; + int remainder = *bitOffset % 8; + unsigned char c; + unsigned char* p; + char* s=string; + unsigned char mask[] ={ 0, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE }; + int remainderComplement=8-remainder; + + if (numberOfCharacters==0) return string; + + p=(unsigned char*)bitStream+byteOffset; + + if ( remainder == 0 ) { + memcpy(string,bitStream+byteOffset,numberOfCharacters); + *bitOffset+=numberOfCharacters*8; + return string; + } + + for (i=0;i>remainderComplement ); + s++; + } + *bitOffset+=numberOfCharacters*8; + return string; +} + + unsigned long grib_decode_unsigned_long(const unsigned char* p, long *bitp, long nbits) { long countOfLeftmostBits=0,leftmostBits=0; diff --git a/src/grib_darray.c b/src/grib_darray.c index 3f55f18d9..2824e72c7 100644 --- a/src/grib_darray.c +++ b/src/grib_darray.c @@ -19,7 +19,7 @@ grib_darray* grib_darray_new(grib_context* c,size_t size,size_t incsize) { grib_darray* v=NULL; if (!c) c=grib_context_get_default(); - v=(grib_darray*)grib_context_malloc(c,sizeof(grib_darray)); + v=(grib_darray*)grib_context_malloc_clear(c,sizeof(grib_darray)); if (!v) { grib_context_log(c,GRIB_LOG_ERROR, "grib_darray_new unable to allocate %d bytes\n",sizeof(grib_darray)); @@ -28,7 +28,7 @@ grib_darray* grib_darray_new(grib_context* c,size_t size,size_t incsize) { v->size=size; v->n=0; v->incsize=incsize; - v->v=(double*)grib_context_malloc(c,sizeof(double)*size); + v->v=(double*)grib_context_malloc_clear(c,sizeof(double)*size); if (!v->v) { grib_context_log(c,GRIB_LOG_ERROR, "grib_darray_new unable to allocate %d bytes\n",sizeof(double)*size); diff --git a/src/grib_dumper.c b/src/grib_dumper.c index 154508445..1ba86e819 100644 --- a/src/grib_dumper.c +++ b/src/grib_dumper.c @@ -94,6 +94,21 @@ void grib_dump_string(grib_dumper* d,grib_accessor* a,const char* comment) Assert(0); } +void grib_dump_string_array(grib_dumper* d,grib_accessor* a,const char* comment) +{ + grib_dumper_class *c = d->cclass; + while(c) + { + if(c->dump_string_array) + { + c->dump_string_array(d, a, comment); + return; + } + c = c->super ? *(c->super) : NULL; + } + Assert(0); +} + void grib_dump_label(grib_dumper* d,grib_accessor* a,const char* comment) { grib_dumper_class *c = d->cclass; diff --git a/src/grib_dumper_class.h b/src/grib_dumper_class.h index 5307ce8e0..f67181fe3 100644 --- a/src/grib_dumper_class.h +++ b/src/grib_dumper_class.h @@ -9,3 +9,4 @@ extern grib_dumper_class* grib_dumper_class_keys; extern grib_dumper_class* grib_dumper_class_serialize; extern grib_dumper_class* grib_dumper_class_string; extern grib_dumper_class* grib_dumper_class_wmo; +extern grib_dumper_class* grib_dumper_class_xml; diff --git a/src/grib_dumper_factory.h b/src/grib_dumper_factory.h index edad83d7d..583377059 100644 --- a/src/grib_dumper_factory.h +++ b/src/grib_dumper_factory.h @@ -6,3 +6,4 @@ { "keys", &grib_dumper_class_keys, }, { "serialize", &grib_dumper_class_serialize, }, { "wmo", &grib_dumper_class_wmo, }, +{ "xml", &grib_dumper_class_xml, }, diff --git a/src/grib_errors.c.in b/src/grib_errors.c.in index 67172dfa8..3e2f96329 100644 --- a/src/grib_errors.c.in +++ b/src/grib_errors.c.in @@ -35,7 +35,9 @@ void grib_check(const char* call,const char* file,int line,int e,const char* ms } } -void grib_fail(const char* expr,const char* file,int line) { + +void grib_fail(const char* expr,const char* file,int line,int silent) { + if (!silent) fprintf(stderr,"%s at line %d: assertion failure Assert(%s)\n",file,line,expr); abort(); } diff --git a/src/grib_errors.txt b/src/grib_errors.txt index b319b4c15..0036843fb 100644 --- a/src/grib_errors.txt +++ b/src/grib_errors.txt @@ -41,6 +41,7 @@ GRIB_MISSING_KEY Missing a key from the fieldset GRIB_OUT_OF_AREA The point is out of the grid area /* more errors*/ GRIB_CONCEPT_NO_MATCH Concept no match +GRIB_HASH_ARRAY_NO_MATCH Hash array no match GRIB_NO_DEFINITIONS Definitions files not found GRIB_WRONG_TYPE Wrong type while packing GRIB_END End of resource @@ -61,3 +62,6 @@ GRIB_INVALID_BPV Invalid number of bits per value GRIB_DIFFERENT_EDITION Edition of two messages is different GRIB_VALUE_DIFFERENT Value is different GRIB_INVALID_KEY_VALUE Invalid key value +GRIB_STRING_TOO_SMALL String is smaller than requested +GRIB_WRONG_CONVERSION Wrong type conversion +GRIB_MISSING_BUFR_ENTRY Missing BUFR table entry for descriptor diff --git a/src/grib_handle.c b/src/grib_handle.c index 167dfea08..3085983f3 100644 --- a/src/grib_handle.c +++ b/src/grib_handle.c @@ -109,6 +109,10 @@ void grib_empty_section ( grib_context *c,grib_section* b ) while ( current ) { grib_accessor* next = current->next; + if (current->sub_section) { + grib_section_delete(c,current->sub_section); + current->sub_section=0; + } grib_free_accessor ( c,current ); current = next; } diff --git a/src/grib_io.c b/src/grib_io.c index 790423aab..eb6455d00 100644 --- a/src/grib_io.c +++ b/src/grib_io.c @@ -706,6 +706,105 @@ static int read_any_gts(reader *r) return err; } +static int read_any_taf(reader *r) +{ + unsigned char c; + int err = 0; + unsigned char* buffer=NULL; + unsigned long magic = 0; + unsigned long start = 0x54414620; + unsigned char tmp[1000]={0,}; /* Should be enough */ + size_t message_size=0; + size_t already_read=0; + int i=0; + + while(r->read(r->read_data,&c,1,&err) == 1 && err == 0) + { + magic <<= 8; + magic |= c; + magic &= 0xffffffff; + + if (magic == start) { + tmp[i++]=0x54; + tmp[i++]=0x41; + tmp[i++]=0x46; + tmp[i++]=0x20; + + r->offset=r->tell(r->read_data)-4; + + already_read=4; + message_size=already_read; + while(r->read(r->read_data,&c,1,&err) == 1 && err == 0) { + message_size++; + if (c == '=') { + r->seek(r->read_data,already_read-message_size); + buffer = (unsigned char*)r->alloc(r->alloc_data,&message_size,&err); + if (!buffer) return GRIB_OUT_OF_MEMORY; + if (err) return err; + memcpy(buffer,tmp,already_read); + r->read(r->read_data,buffer+already_read,message_size-already_read,&err); + r->message_size=message_size; + return err; + } + } + } + } + + return err; +} + +static int read_any_metar(reader *r) +{ + unsigned char c; + int err = 0; + unsigned char* buffer=NULL; + unsigned long magic = 0; + unsigned long start = 0x4d455441; + unsigned char tmp[32]={0,}; /* Should be enough */ + size_t message_size=0; + size_t already_read=0; + int i=0; + + while(r->read(r->read_data,&c,1,&err) == 1 && err == 0) + { + magic <<= 8; + magic |= c; + magic &= 0xffffffff; + + if (magic == start) { + if (r->read(r->read_data,&c,1,&err) != 1 || err!=0) + break; + if (c == 'R' ) { + tmp[i++]=0x4d; + tmp[i++]=0x45; + tmp[i++]=0x54; + tmp[i++]=0x41; + tmp[i++]='R'; + + r->offset=r->tell(r->read_data)-4; + + already_read=5; + message_size=already_read; + while(r->read(r->read_data,&c,1,&err) == 1 && err == 0) { + message_size++; + if (c == '=') { + r->seek(r->read_data,already_read-message_size); + buffer = (unsigned char*)r->alloc(r->alloc_data,&message_size,&err); + if (!buffer) return GRIB_OUT_OF_MEMORY; + if (err) return err; + memcpy(buffer,tmp,already_read); + r->read(r->read_data,buffer+already_read,message_size-already_read,&err); + r->message_size=message_size; + return err; + } + } + } + } + } + + return err; +} + off_t stdio_tell(void* data) { FILE* f = (FILE*)data; @@ -817,6 +916,52 @@ int wmo_read_gts_from_file(FILE* f,void* buffer,size_t* len) return err; } +int wmo_read_taf_from_file(FILE* f,void* buffer,size_t* len) +{ + int err; + user_buffer u; + reader r; + + u.user_buffer = buffer; + u.buffer_size = *len; + + r.read_data = f; + r.read = &stdio_read; + r.seek = &stdio_seek; + r.tell = &stdio_tell; + r.alloc_data = &u; + r.alloc = &user_provider_buffer; + r.headers_only = 0; + + err = read_any_taf(&r); + *len = r.message_size; + + return err; +} + +int wmo_read_metar_from_file(FILE* f,void* buffer,size_t* len) +{ + int err; + user_buffer u; + reader r; + + u.user_buffer = buffer; + u.buffer_size = *len; + + r.read_data = f; + r.read = &stdio_read; + r.seek = &stdio_seek; + r.tell = &stdio_tell; + r.alloc_data = &u; + r.alloc = &user_provider_buffer; + r.headers_only = 0; + + err = read_any_metar(&r); + *len = r.message_size; + + return err; +} + /*================== */ typedef struct stream_struct { @@ -916,6 +1061,51 @@ void *wmo_read_gts_from_file_malloc(FILE* f,int headers_only,size_t *size,off_t return u.buffer; } + +void *wmo_read_taf_from_file_malloc(FILE* f,int headers_only,size_t *size,off_t *offset,int* err) +{ + alloc_buffer u; + reader r; + + u.buffer = NULL; + + r.read_data = f; + r.read = &stdio_read; + r.seek = &stdio_seek; + r.tell = &stdio_tell; + r.alloc_data = &u; + r.alloc = &allocate_buffer; + r.headers_only = headers_only; + + *err = read_any_taf(&r); + *size = r.message_size; + *offset = r.offset; + + return u.buffer; +} + +void *wmo_read_metar_from_file_malloc(FILE* f,int headers_only,size_t *size,off_t *offset,int* err) +{ + alloc_buffer u; + reader r; + + u.buffer = NULL; + + r.read_data = f; + r.read = &stdio_read; + r.seek = &stdio_seek; + r.tell = &stdio_tell; + r.alloc_data = &u; + r.alloc = &allocate_buffer; + r.headers_only = headers_only; + + *err = read_any_metar(&r); + *size = r.message_size; + *offset = r.offset; + + return u.buffer; +} + static void *_wmo_read_any_from_file_malloc(FILE* f,int* err,size_t *size,off_t *offset, int grib_ok,int bufr_ok,int headers_only) { diff --git a/src/grib_query.c b/src/grib_query.c index 604563a3d..190b745cc 100644 --- a/src/grib_query.c +++ b/src/grib_query.c @@ -42,7 +42,16 @@ static int matching(grib_accessor* a,const char* name,const char* name_space) } -static grib_accessor* search(grib_section* s,const char* name,const char* name_space) +static int matching_group_number(grib_accessor* a) { + if ( a->bufr_group_number==0 || + a->parent->h->bufr_group_number==0 || + a->bufr_group_number==a->parent->h->bufr_group_number ) + return 1; + else + return 0; +} + +static grib_accessor* search(grib_section* s,const char* name,const char* name_space,int no_group_match) { grib_accessor* match = NULL; @@ -57,10 +66,11 @@ static grib_accessor* search(grib_section* s,const char* name,const char* name_s { grib_section* sub = a->sub_section; - if(matching(a,name,name_space)) + if(matching(a,name,name_space) && (no_group_match || matching_group_number(a)) ) match = a; - if((b = search(sub,name,name_space)) != NULL) + if((b = search(sub,name,name_space,no_group_match) ) != NULL + && (no_group_match || matching_group_number(b)) ) match = b; a = a->next; @@ -148,21 +158,48 @@ static grib_accessor* search_and_cache(grib_handle* h, const char* name,const ch { id = grib_hash_keys_get_id(h->context->keys,name); - if ((a=h->accessors[id])!=NULL && (namespace==NULL || matching(a,name,namespace))) + if ((a=h->accessors[id])!=NULL && + (namespace==NULL || matching(a,name,namespace) ) && + matching_group_number(a)) return a; } - a = search(h->root,name,namespace); + a = search(h->root,name,namespace,0); h->accessors[id] = a; return a; } else { - return search(h->root,name,namespace); + return search(h->root,name,namespace,0); } } +static grib_accessor* _grib_find_accessor_navigate_subgroups(grib_handle* h, const char* name,int recursive) +{ + grib_accessor* a = NULL; + grib_section* group=h->groups[h->bufr_group_number]->sub_section; + + Assert(name); + + a=search(group,name,NULL,1); + + if (recursive && h->unpacked==0 && a==NULL) { + char type[6]={0,}; + size_t ltype=6; + int nav=h->navigate_subgroups; + h->navigate_subgroups=0; + grib_get_string(h,"identifier",type,<ype); + h->navigate_subgroups=nav; + if (!strcmp(type,"BUFR") && h->context->unpack) { + grib_set_long(h,"unpack",1); + a=_grib_find_accessor_navigate_subgroups(h,name,0); + } + } + + return a; +} + /* Only look in trie */ grib_accessor* grib_find_accessor_fast(grib_handle* h, const char* name) { @@ -202,6 +239,18 @@ grib_accessor* grib_find_accessor_fast(grib_handle* h, const char* name) return a; } +int grib_navigate_subgroups(grib_handle* h) { + if (!h) return GRIB_NULL_HANDLE; + h->navigate_subgroups=1; + return GRIB_SUCCESS; +} + +int grib_not_navigate_subgroups(grib_handle* h) { + if (!h) return GRIB_NULL_HANDLE; + h->navigate_subgroups=0; + return GRIB_SUCCESS; +} + grib_accessor* grib_find_accessor(grib_handle* h, const char* name) { grib_accessor* a = NULL; diff --git a/src/grib_value.c b/src/grib_value.c index 8ed9fa460..589b3164c 100644 --- a/src/grib_value.c +++ b/src/grib_value.c @@ -1017,6 +1017,35 @@ int grib_get_offset(grib_handle* h, const char* key,size_t* val) return GRIB_NOT_FOUND; } +int _grib_get_string_array_internal(grib_handle* h,grib_accessor* a,char** val, size_t buffer_len,size_t *decoded_length) +{ + if(a) { + int err = _grib_get_string_array_internal(h,a->same,val,buffer_len,decoded_length); + + if(err == GRIB_SUCCESS && + (a->bufr_group_number==0 || h->bufr_group_number==0 || h->bufr_group_number==a->bufr_group_number) ) + { + size_t len = buffer_len - *decoded_length; + err = grib_unpack_string_array(a, val + *decoded_length, &len); + *decoded_length += len; + } + + return err; + + } else { + return GRIB_SUCCESS; + } +} + +int grib_get_string_array(grib_handle* h, const char* name, char** val, size_t *length) +{ + size_t len = *length; + grib_accessor* a = grib_find_accessor(h, name); + if(!a) return GRIB_NOT_FOUND; + + *length = 0; + return _grib_get_string_array_internal(h,a,val,len,length); +} int _grib_get_long_array_internal(grib_handle* h,grib_accessor* a,long* val, size_t buffer_len,size_t *decoded_length) {