GRIB-663: Support for HDF5 headers. Part 2

This commit is contained in:
Shahram Najm 2014-12-17 11:41:04 +00:00
parent c10e4742dd
commit fe084565cf
16 changed files with 92 additions and 32 deletions

View File

@ -63,13 +63,15 @@ static grib_accessor_class _grib_accessor_class_blob = {
&get_native_type, /* get native type */ &get_native_type, /* get native type */
0, /* get sub_section */ 0, /* get sub_section */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
0, /* grib_unpack procedures long */ 0, /* grib_unpack procedures long */
0, /* grib_pack procedures double */ 0, /* grib_pack procedures double */
0, /* grib_unpack procedures double */ 0, /* grib_unpack procedures double */
0, /* grib_pack procedures string */ 0, /* grib_pack procedures string */
0, /* grib_unpack 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_pack procedures bytes */
&unpack_bytes, /* grib_unpack procedures bytes */ &unpack_bytes, /* grib_unpack procedures bytes */
0, /* pack_expression */ 0, /* pack_expression */
@ -105,6 +107,8 @@ static void init_class(grib_accessor_class* c)
c->unpack_double = (*(c->super))->unpack_double; c->unpack_double = (*(c->super))->unpack_double;
c->pack_string = (*(c->super))->pack_string; c->pack_string = (*(c->super))->pack_string;
c->unpack_string = (*(c->super))->unpack_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->pack_bytes = (*(c->super))->pack_bytes;
c->pack_expression = (*(c->super))->pack_expression; c->pack_expression = (*(c->super))->pack_expression;
c->notify_change = (*(c->super))->notify_change; c->notify_change = (*(c->super))->notify_change;

View File

@ -62,13 +62,15 @@ static grib_accessor_class _grib_accessor_class_int16 = {
0, /* get native type */ 0, /* get native type */
0, /* get sub_section */ 0, /* get sub_section */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
&pack_long, /* grib_pack procedures long */ &pack_long, /* grib_pack procedures long */
&unpack_long, /* grib_unpack procedures long */ &unpack_long, /* grib_unpack procedures long */
0, /* grib_pack procedures double */ 0, /* grib_pack procedures double */
0, /* grib_unpack procedures double */ 0, /* grib_unpack procedures double */
0, /* grib_pack procedures string */ 0, /* grib_pack procedures string */
0, /* grib_unpack 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_pack procedures bytes */
0, /* grib_unpack procedures bytes */ 0, /* grib_unpack procedures bytes */
0, /* pack_expression */ 0, /* pack_expression */
@ -104,6 +106,8 @@ static void init_class(grib_accessor_class* c)
c->unpack_double = (*(c->super))->unpack_double; c->unpack_double = (*(c->super))->unpack_double;
c->pack_string = (*(c->super))->pack_string; c->pack_string = (*(c->super))->pack_string;
c->unpack_string = (*(c->super))->unpack_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->pack_bytes = (*(c->super))->pack_bytes;
c->unpack_bytes = (*(c->super))->unpack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes;
c->pack_expression = (*(c->super))->pack_expression; c->pack_expression = (*(c->super))->pack_expression;
@ -124,8 +128,8 @@ static void init_class(grib_accessor_class* c)
static int unpack_long(grib_accessor* a, long* val, size_t *len) static int unpack_long(grib_accessor* a, long* val, size_t *len)
{ {
long value = 0; long value = 0;
long pos = a->offset; /* long pos = a->offset; */
unsigned char* data = a->parent->h->buffer->data; /* unsigned char* data = a->parent->h->buffer->data; */
if(*len < 1) if(*len < 1)
{ {

View File

@ -62,13 +62,15 @@ static grib_accessor_class _grib_accessor_class_int16_little_endian = {
0, /* get native type */ 0, /* get native type */
0, /* get sub_section */ 0, /* get sub_section */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
&pack_long, /* grib_pack procedures long */ &pack_long, /* grib_pack procedures long */
&unpack_long, /* grib_unpack procedures long */ &unpack_long, /* grib_unpack procedures long */
0, /* grib_pack procedures double */ 0, /* grib_pack procedures double */
0, /* grib_unpack procedures double */ 0, /* grib_unpack procedures double */
0, /* grib_pack procedures string */ 0, /* grib_pack procedures string */
0, /* grib_unpack 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_pack procedures bytes */
0, /* grib_unpack procedures bytes */ 0, /* grib_unpack procedures bytes */
0, /* pack_expression */ 0, /* pack_expression */
@ -104,6 +106,8 @@ static void init_class(grib_accessor_class* c)
c->unpack_double = (*(c->super))->unpack_double; c->unpack_double = (*(c->super))->unpack_double;
c->pack_string = (*(c->super))->pack_string; c->pack_string = (*(c->super))->pack_string;
c->unpack_string = (*(c->super))->unpack_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->pack_bytes = (*(c->super))->pack_bytes;
c->unpack_bytes = (*(c->super))->unpack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes;
c->pack_expression = (*(c->super))->pack_expression; c->pack_expression = (*(c->super))->pack_expression;
@ -124,8 +128,8 @@ static void init_class(grib_accessor_class* c)
static int unpack_long(grib_accessor* a, long* val, size_t *len) static int unpack_long(grib_accessor* a, long* val, size_t *len)
{ {
long value = 0; long value = 0;
long pos = a->offset; /*long pos = a->offset;*/
unsigned char* data = a->parent->h->buffer->data; /*unsigned char* data = a->parent->h->buffer->data;*/
if(*len < 1) if(*len < 1)
{ {

View File

@ -62,13 +62,15 @@ static grib_accessor_class _grib_accessor_class_int32 = {
0, /* get native type */ 0, /* get native type */
0, /* get sub_section */ 0, /* get sub_section */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
&pack_long, /* grib_pack procedures long */ &pack_long, /* grib_pack procedures long */
&unpack_long, /* grib_unpack procedures long */ &unpack_long, /* grib_unpack procedures long */
0, /* grib_pack procedures double */ 0, /* grib_pack procedures double */
0, /* grib_unpack procedures double */ 0, /* grib_unpack procedures double */
0, /* grib_pack procedures string */ 0, /* grib_pack procedures string */
0, /* grib_unpack 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_pack procedures bytes */
0, /* grib_unpack procedures bytes */ 0, /* grib_unpack procedures bytes */
0, /* pack_expression */ 0, /* pack_expression */
@ -104,6 +106,8 @@ static void init_class(grib_accessor_class* c)
c->unpack_double = (*(c->super))->unpack_double; c->unpack_double = (*(c->super))->unpack_double;
c->pack_string = (*(c->super))->pack_string; c->pack_string = (*(c->super))->pack_string;
c->unpack_string = (*(c->super))->unpack_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->pack_bytes = (*(c->super))->pack_bytes;
c->unpack_bytes = (*(c->super))->unpack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes;
c->pack_expression = (*(c->super))->pack_expression; c->pack_expression = (*(c->super))->pack_expression;
@ -124,8 +128,8 @@ static void init_class(grib_accessor_class* c)
static int unpack_long(grib_accessor* a, long* val, size_t *len) static int unpack_long(grib_accessor* a, long* val, size_t *len)
{ {
long value = 0; long value = 0;
long pos = a->offset; /*long pos = a->offset;*/
unsigned char* data = a->parent->h->buffer->data; /*unsigned char* data = a->parent->h->buffer->data;*/
if(*len < 1) if(*len < 1)
{ {

View File

@ -62,13 +62,15 @@ static grib_accessor_class _grib_accessor_class_int32_little_endian = {
0, /* get native type */ 0, /* get native type */
0, /* get sub_section */ 0, /* get sub_section */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
&pack_long, /* grib_pack procedures long */ &pack_long, /* grib_pack procedures long */
&unpack_long, /* grib_unpack procedures long */ &unpack_long, /* grib_unpack procedures long */
0, /* grib_pack procedures double */ 0, /* grib_pack procedures double */
0, /* grib_unpack procedures double */ 0, /* grib_unpack procedures double */
0, /* grib_pack procedures string */ 0, /* grib_pack procedures string */
0, /* grib_unpack 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_pack procedures bytes */
0, /* grib_unpack procedures bytes */ 0, /* grib_unpack procedures bytes */
0, /* pack_expression */ 0, /* pack_expression */
@ -104,6 +106,8 @@ static void init_class(grib_accessor_class* c)
c->unpack_double = (*(c->super))->unpack_double; c->unpack_double = (*(c->super))->unpack_double;
c->pack_string = (*(c->super))->pack_string; c->pack_string = (*(c->super))->pack_string;
c->unpack_string = (*(c->super))->unpack_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->pack_bytes = (*(c->super))->pack_bytes;
c->unpack_bytes = (*(c->super))->unpack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes;
c->pack_expression = (*(c->super))->pack_expression; c->pack_expression = (*(c->super))->pack_expression;
@ -124,8 +128,8 @@ static void init_class(grib_accessor_class* c)
static int unpack_long(grib_accessor* a, long* val, size_t *len) static int unpack_long(grib_accessor* a, long* val, size_t *len)
{ {
long value = 0; long value = 0;
long pos = a->offset; /* long pos = a->offset; */
unsigned char* data = a->parent->h->buffer->data; /* unsigned char* data = a->parent->h->buffer->data; */
if(*len < 1) if(*len < 1)
{ {

View File

@ -62,13 +62,15 @@ static grib_accessor_class _grib_accessor_class_int64 = {
0, /* get native type */ 0, /* get native type */
0, /* get sub_section */ 0, /* get sub_section */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
&pack_long, /* grib_pack procedures long */ &pack_long, /* grib_pack procedures long */
&unpack_long, /* grib_unpack procedures long */ &unpack_long, /* grib_unpack procedures long */
0, /* grib_pack procedures double */ 0, /* grib_pack procedures double */
0, /* grib_unpack procedures double */ 0, /* grib_unpack procedures double */
0, /* grib_pack procedures string */ 0, /* grib_pack procedures string */
0, /* grib_unpack 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_pack procedures bytes */
0, /* grib_unpack procedures bytes */ 0, /* grib_unpack procedures bytes */
0, /* pack_expression */ 0, /* pack_expression */
@ -104,6 +106,8 @@ static void init_class(grib_accessor_class* c)
c->unpack_double = (*(c->super))->unpack_double; c->unpack_double = (*(c->super))->unpack_double;
c->pack_string = (*(c->super))->pack_string; c->pack_string = (*(c->super))->pack_string;
c->unpack_string = (*(c->super))->unpack_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->pack_bytes = (*(c->super))->pack_bytes;
c->unpack_bytes = (*(c->super))->unpack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes;
c->pack_expression = (*(c->super))->pack_expression; c->pack_expression = (*(c->super))->pack_expression;

View File

@ -62,13 +62,15 @@ static grib_accessor_class _grib_accessor_class_int64_little_endian = {
0, /* get native type */ 0, /* get native type */
0, /* get sub_section */ 0, /* get sub_section */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
&pack_long, /* grib_pack procedures long */ &pack_long, /* grib_pack procedures long */
&unpack_long, /* grib_unpack procedures long */ &unpack_long, /* grib_unpack procedures long */
0, /* grib_pack procedures double */ 0, /* grib_pack procedures double */
0, /* grib_unpack procedures double */ 0, /* grib_unpack procedures double */
0, /* grib_pack procedures string */ 0, /* grib_pack procedures string */
0, /* grib_unpack 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_pack procedures bytes */
0, /* grib_unpack procedures bytes */ 0, /* grib_unpack procedures bytes */
0, /* pack_expression */ 0, /* pack_expression */
@ -104,6 +106,8 @@ static void init_class(grib_accessor_class* c)
c->unpack_double = (*(c->super))->unpack_double; c->unpack_double = (*(c->super))->unpack_double;
c->pack_string = (*(c->super))->pack_string; c->pack_string = (*(c->super))->pack_string;
c->unpack_string = (*(c->super))->unpack_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->pack_bytes = (*(c->super))->pack_bytes;
c->unpack_bytes = (*(c->super))->unpack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes;
c->pack_expression = (*(c->super))->pack_expression; c->pack_expression = (*(c->super))->pack_expression;

View File

@ -62,13 +62,15 @@ static grib_accessor_class _grib_accessor_class_int8 = {
0, /* get native type */ 0, /* get native type */
0, /* get sub_section */ 0, /* get sub_section */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
&pack_long, /* grib_pack procedures long */ &pack_long, /* grib_pack procedures long */
&unpack_long, /* grib_unpack procedures long */ &unpack_long, /* grib_unpack procedures long */
0, /* grib_pack procedures double */ 0, /* grib_pack procedures double */
0, /* grib_unpack procedures double */ 0, /* grib_unpack procedures double */
0, /* grib_pack procedures string */ 0, /* grib_pack procedures string */
0, /* grib_unpack 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_pack procedures bytes */
0, /* grib_unpack procedures bytes */ 0, /* grib_unpack procedures bytes */
0, /* pack_expression */ 0, /* pack_expression */
@ -104,6 +106,8 @@ static void init_class(grib_accessor_class* c)
c->unpack_double = (*(c->super))->unpack_double; c->unpack_double = (*(c->super))->unpack_double;
c->pack_string = (*(c->super))->pack_string; c->pack_string = (*(c->super))->pack_string;
c->unpack_string = (*(c->super))->unpack_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->pack_bytes = (*(c->super))->pack_bytes;
c->unpack_bytes = (*(c->super))->unpack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes;
c->pack_expression = (*(c->super))->pack_expression; c->pack_expression = (*(c->super))->pack_expression;

View File

@ -62,13 +62,15 @@ static grib_accessor_class _grib_accessor_class_uint16 = {
0, /* get native type */ 0, /* get native type */
0, /* get sub_section */ 0, /* get sub_section */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
&pack_long, /* grib_pack procedures long */ &pack_long, /* grib_pack procedures long */
&unpack_long, /* grib_unpack procedures long */ &unpack_long, /* grib_unpack procedures long */
0, /* grib_pack procedures double */ 0, /* grib_pack procedures double */
0, /* grib_unpack procedures double */ 0, /* grib_unpack procedures double */
0, /* grib_pack procedures string */ 0, /* grib_pack procedures string */
0, /* grib_unpack 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_pack procedures bytes */
0, /* grib_unpack procedures bytes */ 0, /* grib_unpack procedures bytes */
0, /* pack_expression */ 0, /* pack_expression */
@ -104,6 +106,8 @@ static void init_class(grib_accessor_class* c)
c->unpack_double = (*(c->super))->unpack_double; c->unpack_double = (*(c->super))->unpack_double;
c->pack_string = (*(c->super))->pack_string; c->pack_string = (*(c->super))->pack_string;
c->unpack_string = (*(c->super))->unpack_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->pack_bytes = (*(c->super))->pack_bytes;
c->unpack_bytes = (*(c->super))->unpack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes;
c->pack_expression = (*(c->super))->pack_expression; c->pack_expression = (*(c->super))->pack_expression;
@ -124,8 +128,8 @@ static void init_class(grib_accessor_class* c)
static int unpack_long(grib_accessor* a, long* val, size_t *len) static int unpack_long(grib_accessor* a, long* val, size_t *len)
{ {
long value = 0; long value = 0;
long pos = a->offset; /*long pos = a->offset;*/
unsigned char* data = a->parent->h->buffer->data; /*unsigned char* data = a->parent->h->buffer->data;*/
if(*len < 1) if(*len < 1)
{ {

View File

@ -62,13 +62,15 @@ static grib_accessor_class _grib_accessor_class_uint16_little_endian = {
0, /* get native type */ 0, /* get native type */
0, /* get sub_section */ 0, /* get sub_section */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
&pack_long, /* grib_pack procedures long */ &pack_long, /* grib_pack procedures long */
&unpack_long, /* grib_unpack procedures long */ &unpack_long, /* grib_unpack procedures long */
0, /* grib_pack procedures double */ 0, /* grib_pack procedures double */
0, /* grib_unpack procedures double */ 0, /* grib_unpack procedures double */
0, /* grib_pack procedures string */ 0, /* grib_pack procedures string */
0, /* grib_unpack 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_pack procedures bytes */
0, /* grib_unpack procedures bytes */ 0, /* grib_unpack procedures bytes */
0, /* pack_expression */ 0, /* pack_expression */
@ -104,6 +106,8 @@ static void init_class(grib_accessor_class* c)
c->unpack_double = (*(c->super))->unpack_double; c->unpack_double = (*(c->super))->unpack_double;
c->pack_string = (*(c->super))->pack_string; c->pack_string = (*(c->super))->pack_string;
c->unpack_string = (*(c->super))->unpack_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->pack_bytes = (*(c->super))->pack_bytes;
c->unpack_bytes = (*(c->super))->unpack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes;
c->pack_expression = (*(c->super))->pack_expression; c->pack_expression = (*(c->super))->pack_expression;
@ -124,8 +128,8 @@ static void init_class(grib_accessor_class* c)
static int unpack_long(grib_accessor* a, long* val, size_t *len) static int unpack_long(grib_accessor* a, long* val, size_t *len)
{ {
long value = 0; long value = 0;
long pos = a->offset; /*long pos = a->offset;*/
unsigned char* data = a->parent->h->buffer->data; /*unsigned char* data = a->parent->h->buffer->data;*/
if(*len < 1) if(*len < 1)
{ {

View File

@ -62,13 +62,15 @@ static grib_accessor_class _grib_accessor_class_uint32 = {
0, /* get native type */ 0, /* get native type */
0, /* get sub_section */ 0, /* get sub_section */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
&pack_long, /* grib_pack procedures long */ &pack_long, /* grib_pack procedures long */
&unpack_long, /* grib_unpack procedures long */ &unpack_long, /* grib_unpack procedures long */
0, /* grib_pack procedures double */ 0, /* grib_pack procedures double */
0, /* grib_unpack procedures double */ 0, /* grib_unpack procedures double */
0, /* grib_pack procedures string */ 0, /* grib_pack procedures string */
0, /* grib_unpack 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_pack procedures bytes */
0, /* grib_unpack procedures bytes */ 0, /* grib_unpack procedures bytes */
0, /* pack_expression */ 0, /* pack_expression */
@ -104,6 +106,8 @@ static void init_class(grib_accessor_class* c)
c->unpack_double = (*(c->super))->unpack_double; c->unpack_double = (*(c->super))->unpack_double;
c->pack_string = (*(c->super))->pack_string; c->pack_string = (*(c->super))->pack_string;
c->unpack_string = (*(c->super))->unpack_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->pack_bytes = (*(c->super))->pack_bytes;
c->unpack_bytes = (*(c->super))->unpack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes;
c->pack_expression = (*(c->super))->pack_expression; c->pack_expression = (*(c->super))->pack_expression;
@ -124,8 +128,8 @@ static void init_class(grib_accessor_class* c)
static int unpack_long(grib_accessor* a, long* val, size_t *len) static int unpack_long(grib_accessor* a, long* val, size_t *len)
{ {
long value = 0; long value = 0;
long pos = a->offset; /* long pos = a->offset; */
unsigned char* data = a->parent->h->buffer->data; /* unsigned char* data = a->parent->h->buffer->data; */
if(*len < 1) if(*len < 1)
{ {

View File

@ -62,13 +62,15 @@ static grib_accessor_class _grib_accessor_class_uint32_little_endian = {
0, /* get native type */ 0, /* get native type */
0, /* get sub_section */ 0, /* get sub_section */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
&pack_long, /* grib_pack procedures long */ &pack_long, /* grib_pack procedures long */
&unpack_long, /* grib_unpack procedures long */ &unpack_long, /* grib_unpack procedures long */
0, /* grib_pack procedures double */ 0, /* grib_pack procedures double */
0, /* grib_unpack procedures double */ 0, /* grib_unpack procedures double */
0, /* grib_pack procedures string */ 0, /* grib_pack procedures string */
0, /* grib_unpack 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_pack procedures bytes */
0, /* grib_unpack procedures bytes */ 0, /* grib_unpack procedures bytes */
0, /* pack_expression */ 0, /* pack_expression */
@ -104,6 +106,8 @@ static void init_class(grib_accessor_class* c)
c->unpack_double = (*(c->super))->unpack_double; c->unpack_double = (*(c->super))->unpack_double;
c->pack_string = (*(c->super))->pack_string; c->pack_string = (*(c->super))->pack_string;
c->unpack_string = (*(c->super))->unpack_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->pack_bytes = (*(c->super))->pack_bytes;
c->unpack_bytes = (*(c->super))->unpack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes;
c->pack_expression = (*(c->super))->pack_expression; c->pack_expression = (*(c->super))->pack_expression;
@ -124,8 +128,8 @@ static void init_class(grib_accessor_class* c)
static int unpack_long(grib_accessor* a, long* val, size_t *len) static int unpack_long(grib_accessor* a, long* val, size_t *len)
{ {
long value = 0; long value = 0;
long pos = a->offset; /* long pos = a->offset; */
unsigned char* data = a->parent->h->buffer->data; /* unsigned char* data = a->parent->h->buffer->data; */
if(*len < 1) if(*len < 1)
{ {

View File

@ -64,13 +64,15 @@ static grib_accessor_class _grib_accessor_class_uint64 = {
&get_native_type, /* get native type */ &get_native_type, /* get native type */
0, /* get sub_section */ 0, /* get sub_section */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
&pack_long, /* grib_pack procedures long */ &pack_long, /* grib_pack procedures long */
&unpack_long, /* grib_unpack procedures long */ &unpack_long, /* grib_unpack procedures long */
0, /* grib_pack procedures double */ 0, /* grib_pack procedures double */
0, /* grib_unpack procedures double */ 0, /* grib_unpack procedures double */
0, /* grib_pack procedures string */ 0, /* grib_pack procedures string */
0, /* grib_unpack 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_pack procedures bytes */
0, /* grib_unpack procedures bytes */ 0, /* grib_unpack procedures bytes */
0, /* pack_expression */ 0, /* pack_expression */
@ -105,6 +107,8 @@ static void init_class(grib_accessor_class* c)
c->unpack_double = (*(c->super))->unpack_double; c->unpack_double = (*(c->super))->unpack_double;
c->pack_string = (*(c->super))->pack_string; c->pack_string = (*(c->super))->pack_string;
c->unpack_string = (*(c->super))->unpack_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->pack_bytes = (*(c->super))->pack_bytes;
c->unpack_bytes = (*(c->super))->unpack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes;
c->pack_expression = (*(c->super))->pack_expression; c->pack_expression = (*(c->super))->pack_expression;

View File

@ -62,13 +62,15 @@ static grib_accessor_class _grib_accessor_class_uint64_little_endian = {
0, /* get native type */ 0, /* get native type */
0, /* get sub_section */ 0, /* get sub_section */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
&pack_long, /* grib_pack procedures long */ &pack_long, /* grib_pack procedures long */
&unpack_long, /* grib_unpack procedures long */ &unpack_long, /* grib_unpack procedures long */
0, /* grib_pack procedures double */ 0, /* grib_pack procedures double */
0, /* grib_unpack procedures double */ 0, /* grib_unpack procedures double */
0, /* grib_pack procedures string */ 0, /* grib_pack procedures string */
0, /* grib_unpack 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_pack procedures bytes */
0, /* grib_unpack procedures bytes */ 0, /* grib_unpack procedures bytes */
0, /* pack_expression */ 0, /* pack_expression */
@ -104,6 +106,8 @@ static void init_class(grib_accessor_class* c)
c->unpack_double = (*(c->super))->unpack_double; c->unpack_double = (*(c->super))->unpack_double;
c->pack_string = (*(c->super))->pack_string; c->pack_string = (*(c->super))->pack_string;
c->unpack_string = (*(c->super))->unpack_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->pack_bytes = (*(c->super))->pack_bytes;
c->unpack_bytes = (*(c->super))->unpack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes;
c->pack_expression = (*(c->super))->pack_expression; c->pack_expression = (*(c->super))->pack_expression;

View File

@ -62,13 +62,15 @@ static grib_accessor_class _grib_accessor_class_uint8 = {
0, /* get native type */ 0, /* get native type */
0, /* get sub_section */ 0, /* get sub_section */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
0, /* grib_pack procedures long */ 0, /* grib_pack procedures long */
&pack_long, /* grib_pack procedures long */ &pack_long, /* grib_pack procedures long */
&unpack_long, /* grib_unpack procedures long */ &unpack_long, /* grib_unpack procedures long */
0, /* grib_pack procedures double */ 0, /* grib_pack procedures double */
0, /* grib_unpack procedures double */ 0, /* grib_unpack procedures double */
0, /* grib_pack procedures string */ 0, /* grib_pack procedures string */
0, /* grib_unpack 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_pack procedures bytes */
0, /* grib_unpack procedures bytes */ 0, /* grib_unpack procedures bytes */
0, /* pack_expression */ 0, /* pack_expression */
@ -104,6 +106,8 @@ static void init_class(grib_accessor_class* c)
c->unpack_double = (*(c->super))->unpack_double; c->unpack_double = (*(c->super))->unpack_double;
c->pack_string = (*(c->super))->pack_string; c->pack_string = (*(c->super))->pack_string;
c->unpack_string = (*(c->super))->unpack_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->pack_bytes = (*(c->super))->pack_bytes;
c->unpack_bytes = (*(c->super))->unpack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes;
c->pack_expression = (*(c->super))->pack_expression; c->pack_expression = (*(c->super))->pack_expression;

View File

@ -96,7 +96,7 @@ int grib_jasper_encode(grib_context *c, j2k_encode_helper *helper) {
unsigned char *p = NULL; unsigned char *p = NULL;
jas_image_t image = {0,}; jas_image_t image = {0};
jas_stream_t *jpcstream = 0; jas_stream_t *jpcstream = 0;
jas_stream_t *istream = 0; jas_stream_t *istream = 0;
jas_image_cmpt_t cmpt = {0,}; jas_image_cmpt_t cmpt = {0,};