ECC-1063: Apply consistent code style to source

This commit is contained in:
Shahram Najm 2020-01-29 10:16:32 +00:00
parent c9ab23baf7
commit 1975eae139
11 changed files with 2365 additions and 2311 deletions

View File

@ -181,13 +181,13 @@ typedef struct grib_util_packing_spec codes_util_packing_spec;
typedef struct grib_util_grid_spec codes_util_grid_spec;
codes_fieldset *codes_fieldset_new_from_files(codes_context *c, char *filenames[], int nfiles, char **keys, int nkeys, const char *where_string, const char *order_by_string, int *err);
codes_fieldset* codes_fieldset_new_from_files(codes_context* c, char* filenames[], int nfiles, char** keys, int nkeys, const char* where_string, const char* order_by_string, int* err);
void codes_fieldset_delete(codes_fieldset* set);
void codes_fieldset_rewind(codes_fieldset* set);
int codes_fieldset_apply_order_by(codes_fieldset* set, const char* order_by_string);
codes_handle* codes_fieldset_next_handle(codes_fieldset* set, int* err);
int codes_fieldset_count(codes_fieldset *set);
int codes_fieldset_count(codes_fieldset* set);
int codes_values_check(codes_handle* h, codes_values* values, int count);
/*! \defgroup codes_index The indexing feature
@ -214,7 +214,7 @@ typedef struct grib_index codes_index;
* @param err : 0 if OK, integer value on error
* @return the newly created index
*/
codes_index* codes_index_new_from_file(codes_context* c, char* filename, const char* keys, int *err);
codes_index* codes_index_new_from_file(codes_context* c, char* filename, const char* keys, int* err);
/**
* Create a new index based on a set of keys.
@ -228,7 +228,7 @@ codes_index* codes_index_new_from_file(codes_context* c, char* filename, const c
* @param err : 0 if OK, integer value on error
* @return the newly created index
*/
codes_index* codes_index_new(codes_context* c, const char* keys, int *err);
codes_index* codes_index_new(codes_context* c, const char* keys, int* err);
/**
* Indexes the file given in argument in the index given in argument.
@ -237,9 +237,9 @@ codes_index* codes_index_new(codes_context* c, const char* keys, int *err);
* @param filename : name of the file of messages to be indexed
* @return 0 if OK, integer value on error
*/
int codes_index_add_file(codes_index* index, const char *filename);
int codes_index_write(codes_index* index, const char *filename);
codes_index* codes_index_read(codes_context* c, const char* filename, int *err);
int codes_index_add_file(codes_index* index, const char* filename);
int codes_index_write(codes_index* index, const char* filename);
codes_index* codes_index_read(codes_context* c, const char* filename, int* err);
/**
* Get the number of distinct values of the key in argument contained in the index. The key must belong to the index.
@ -262,7 +262,7 @@ int codes_index_get_size(const codes_index* index, const char* key, size_t* size
* @param size : size of the values array
* @return 0 if OK, integer value on error
*/
int codes_index_get_long(const codes_index* index, const char* key, long* values, size_t *size);
int codes_index_get_long(const codes_index* index, const char* key, long* values, size_t* size);
/**
* Get the distinct values of the key in argument contained in the index. The key must belong to the index. This function is used when the type of the key was explicitly defined as double or when the native type of the key is double.
@ -274,7 +274,7 @@ int codes_index_get_long(const codes_index* index, const char* key, long* values
* @param size : size of the values array
* @return 0 if OK, integer value on error
*/
int codes_index_get_double(const codes_index* index, const char* key, double* values, size_t *size);
int codes_index_get_double(const codes_index* index, const char* key, double* values, size_t* size);
/**
* Get the distinct values of the key in argument contained in the index. The key must belong to the index. This function is used when the type of the key was explicitly defined as string or when the native type of the key is string.
@ -286,7 +286,7 @@ int codes_index_get_double(const codes_index* index, const char* key, double* va
* @param size : size of the values array
* @return 0 if OK, integer value on error
*/
int codes_index_get_string(const codes_index* index, const char* key, char** values, size_t *size);
int codes_index_get_string(const codes_index* index, const char* key, char** values, size_t* size);
/**
@ -331,7 +331,7 @@ int codes_index_select_string(codes_index* index, const char* key, char* value);
* @param err : 0 if OK, integer value on error. CODES_END_OF_INDEX when no more handles are contained in the index.
* @return grib handle.
*/
codes_handle* codes_handle_new_from_index(codes_index* index, int *err);
codes_handle* codes_handle_new_from_index(codes_index* index, int* err);
/**
* Delete the index.
@ -417,7 +417,7 @@ codes_handle* codes_bufr_handle_new_from_file(codes_context* c, FILE* f, int* er
*/
int codes_write_message(const codes_handle* h, const char* file, const char* mode);
codes_handle* codes_grib_util_sections_copy(codes_handle* hfrom, codes_handle* hto, int what, int *err);
codes_handle* codes_grib_util_sections_copy(codes_handle* hfrom, codes_handle* hto, int what, int* err);
codes_string_list* codes_grib_util_get_param_id(const char* mars_param);
codes_string_list* codes_grib_util_get_mars_param(const char* param_id);
@ -444,7 +444,7 @@ codes_handle* codes_handle_new_from_message(codes_context* c, const void* data,
* @return the new handle, NULL if the message is invalid or a problem is encountered
*/
codes_handle* codes_grib_handle_new_from_multi_message(codes_context* c, void** data,
size_t *data_len, int* error);
size_t* data_len, int* error);
/**
* Create a handle from a user message. The message is copied and will be freed with the handle
@ -552,7 +552,7 @@ int codes_grib_multi_handle_write(codes_multi_handle* mh, FILE* f);
* @param message_length : On exit, the message size in number of bytes
* @return 0 if OK, integer value on error
*/
int codes_get_message(const codes_handle* h, const void** message, size_t *message_length);
int codes_get_message(const codes_handle* h, const void** message, size_t* message_length);
/**
@ -564,7 +564,7 @@ int codes_get_message(const codes_handle* h, const void** message, size_t *messa
* On exit, the actual message length in number of bytes
* @return 0 if OK, integer value on error
*/
int codes_get_message_copy(const codes_handle* h, void* message, size_t *message_length);
int codes_get_message_copy(const codes_handle* h, void* message, size_t* message_length);
/*! @} */
/*! \defgroup iterators Iterating on latitude/longitude/values */
@ -591,7 +591,7 @@ codes_iterator* codes_grib_iterator_new(const codes_handle* h, unsigned long fla
* @param values : returned array of data values
* @return 0 if OK, integer value on error
*/
int codes_grib_get_data(const codes_handle *h, double *lats, double *lons, double *values);
int codes_grib_get_data(const codes_handle* h, double* lats, double* lons, double* values);
/**
* Get the next value from a geoiterator.
@ -602,7 +602,7 @@ int codes_grib_get_data(const codes_handle *h, double *lats, double *lons, doubl
* @param value : on output value of the point
* @return positive value if successful, 0 if no more data are available
*/
int codes_grib_iterator_next(codes_iterator *i, double* lat, double* lon, double* value);
int codes_grib_iterator_next(codes_iterator* i, double* lat, double* lon, double* value);
/**
* Get the previous value from a geoiterator.
@ -613,7 +613,7 @@ int codes_grib_iterator_next(codes_iterator *i, double* lat, double* lon, double
* @param value : on output value of the point*
* @return positive value if successful, 0 if no more data are available
*/
int codes_grib_iterator_previous(codes_iterator *i, double* lat, double* lon, double* value);
int codes_grib_iterator_previous(codes_iterator* i, double* lat, double* lon, double* value);
/**
* Test procedure for values in a geoiterator.
@ -621,7 +621,7 @@ int codes_grib_iterator_previous(codes_iterator *i, double* lat, double* lon, do
* @param i : the geoiterator
* @return boolean, 1 if the iterator still nave next values, 0 otherwise
*/
int codes_grib_iterator_has_next(codes_iterator *i);
int codes_grib_iterator_has_next(codes_iterator* i);
/**
* Test procedure for values in a geoiterator.
@ -629,7 +629,7 @@ int codes_grib_iterator_has_next(codes_iterator *i);
* @param i : the geoiterator
* @return 0 if OK, integer value on error
*/
int codes_grib_iterator_reset(codes_iterator *i);
int codes_grib_iterator_reset(codes_iterator* i);
/**
* Frees the geoiterator from memory.
@ -637,7 +637,7 @@ int codes_grib_iterator_reset(codes_iterator *i);
* @param i : the geoiterator
* @return 0 if OK, integer value on error
*/
int codes_grib_iterator_delete(codes_iterator *i);
int codes_grib_iterator_delete(codes_iterator* i);
/*!
* \brief Create a new nearest neighbour object from a handle, using current geometry.
@ -669,9 +669,9 @@ codes_nearest* codes_grib_nearest_new(const codes_handle* h, int* error);
* @param len : size of the arrays
* @return 0 if OK, integer value on error
*/
int codes_grib_nearest_find(codes_nearest *nearest, const codes_handle* h, double inlat, double inlon,
int codes_grib_nearest_find(codes_nearest* nearest, const codes_handle* h, double inlat, double inlon,
unsigned long flags, double* outlats, double* outlons,
double* values, double* distances, int* indexes, size_t *len);
double* values, double* distances, int* indexes, size_t* len);
/**
* Frees an nearest from memory
@ -679,7 +679,7 @@ int codes_grib_nearest_find(codes_nearest *nearest, const codes_handle* h, doubl
* @param nearest : the nearest
* @return 0 if OK, integer value on error
*/
int codes_grib_nearest_delete(codes_nearest *nearest);
int codes_grib_nearest_delete(codes_nearest* nearest);
/**
* Find the nearest point of a set of points whose latitudes and longitudes
@ -733,7 +733,7 @@ int codes_get_offset(const codes_handle* h, const char* key, size_t* offset);
* @param size : the address of a size_t where the size will be set
* @return 0 if OK, integer value on error
*/
int codes_get_size(const codes_handle* h, const char* key, size_t *size);
int codes_get_size(const codes_handle* h, const char* key, size_t* size);
/**
* Get the length of the string representation of the key, if several keys of the same name are present, the maximum length is returned
@ -743,7 +743,7 @@ int codes_get_size(const codes_handle* h, const char* key, size_t *size);
* @param length : the address of a size_t where the length will be set
* @return 0 if OK, integer value on error
*/
int codes_get_length(const codes_handle* h, const char* key, size_t *length);
int codes_get_length(const codes_handle* h, const char* key, size_t* length);
/**
* Get a long value from a key, if several keys of the same name are present, the last one is returned
@ -800,7 +800,7 @@ int codes_get_double_elements(const codes_handle* h, const char* key, int* i, lo
* @param length : the address of a size_t that contains allocated length of the string on input, and that contains the actual length of the string on output
* @return 0 if OK, integer value on error
*/
int codes_get_string(const codes_handle* h, const char* key, char* mesg, size_t *length);
int codes_get_string(const codes_handle* h, const char* key, char* mesg, size_t* length);
/**
* Get string array values from a key. If several keys of the same name are present, the last one is returned
@ -812,7 +812,7 @@ int codes_get_string(const codes_handle* h, const char* key, char* mesg, size_t
* @param length : the address of a size_t that contains allocated length of the array on input, and that contains the actual length of the array on output
* @return 0 if OK, integer value on error
*/
int codes_get_string_array(const codes_handle* h, const char* key, char** vals, size_t *length);
int codes_get_string_array(const codes_handle* h, const char* key, char** vals, size_t* length);
/**
* Get raw bytes values from a key. If several keys of the same name are present, the last one is returned
@ -824,7 +824,7 @@ int codes_get_string_array(const codes_handle* h, const char* key, char** vals,
* @param length : the address of a size_t that contains allocated length of the byte array on input, and that contains the actual length of the byte array on output
* @return 0 if OK, integer value on error
*/
int codes_get_bytes(const codes_handle* h, const char* key, unsigned char* bytes, size_t *length);
int codes_get_bytes(const codes_handle* h, const char* key, unsigned char* bytes, size_t* length);
/**
* Get double array values from a key. If several keys of the same name are present, the last one is returned
@ -836,7 +836,7 @@ int codes_get_bytes(const codes_handle* h, const char* key, unsigned char* bytes
* @param length : the address of a size_t that contains allocated length of the double array on input, and that contains the actual length of the double array on output
* @return 0 if OK, integer value on error
*/
int codes_get_double_array(const codes_handle* h, const char* key, double* vals, size_t *length);
int codes_get_double_array(const codes_handle* h, const char* key, double* vals, size_t* length);
/**
* Get long array values from a key. If several keys of the same name are present, the last one is returned
@ -848,7 +848,7 @@ int codes_get_double_array(const codes_handle* h, const char* key, double* vals,
* @param length : the address of a size_t that contains allocated length of the long array on input, and that contains the actual length of the long array on output
* @return 0 if OK, integer value on error
*/
int codes_get_long_array(const codes_handle* h, const char* key, long* vals, size_t *length);
int codes_get_long_array(const codes_handle* h, const char* key, long* vals, size_t* length);
/* setting data */
@ -895,7 +895,7 @@ int codes_set_double(codes_handle* h, const char* key, double val);
* @param length : the address of a size_t that contains the length of the string on input, and that contains the actual packed length of the string on output
* @return 0 if OK, integer value on error
*/
int codes_set_string(codes_handle* h, const char* key , const char* mesg, size_t *length);
int codes_set_string(codes_handle* h, const char* key, const char* mesg, size_t* length);
/**
* Set a bytes array from a key. If several keys of the same name are present, the last one is set
@ -907,7 +907,7 @@ int codes_set_string(codes_handle* h, const char* key , const char* mesg, size_
* @param length : the address of a size_t that contains the length of the byte array on input, and that contains the actual packed length of the byte array on output
* @return 0 if OK, integer value on error
*/
int codes_set_bytes(codes_handle* h, const char* key, const unsigned char* bytes, size_t *length);
int codes_set_bytes(codes_handle* h, const char* key, const unsigned char* bytes, size_t* length);
/**
* Set a double array from a key. If several keys of the same name are present, the last one is set
@ -950,7 +950,7 @@ int codes_set_long_array(codes_handle* h, const char* key, const long* vals, siz
* @param length : a size_t that contains the length of the array on input
* @return 0 if OK, integer value on error
*/
int codes_set_string_array(codes_handle *h, const char *key, const char **vals, size_t length);
int codes_set_string_array(codes_handle* h, const char* key, const char** vals, size_t length);
/*! @} */
@ -1088,8 +1088,8 @@ void codes_grib_multi_support_off(codes_context* c);
*/
void codes_grib_multi_support_reset_file(codes_context* c, FILE* f);
char* codes_samples_path(const codes_context *c);
char* codes_definition_path(const codes_context *c);
char* codes_samples_path(const codes_context* c);
char* codes_definition_path(const codes_context* c);
/*! @} */
/**
@ -1140,7 +1140,7 @@ codes_keys_iterator* codes_keys_iterator_new(codes_handle* h, unsigned long filt
* structure as the aim is to copy what is possible to be copied.
* This will allow the user to add something to a message by creating a new message with additions or changes to the
* unexpandedDescriptors and copying what is possible to copy from the original message. */
char **codes_bufr_copy_data_return_copied_keys(codes_handle *hin, codes_handle *hout, size_t *nkeys, int *err);
char** codes_bufr_copy_data_return_copied_keys(codes_handle* hin, codes_handle* hout, size_t* nkeys, int* err);
int codes_bufr_copy_data(codes_handle* hin, codes_handle* hout);
@ -1148,14 +1148,14 @@ int codes_bufr_copy_data(codes_handle* hin, codes_handle* hout);
* @param kiter : valid codes_keys_iterator
* @return 1 if next iterator exists, 0 if no more elements to iterate on
*/
int codes_keys_iterator_next(codes_keys_iterator *kiter);
int codes_keys_iterator_next(codes_keys_iterator* kiter);
/*! get the key name from the keys iterator
* @param kiter : valid codes_keys_iterator
* @return key name
*/
const char* codes_keys_iterator_get_name(const codes_keys_iterator *kiter);
const char* codes_keys_iterator_get_name(const codes_keys_iterator* kiter);
/*! Delete the keys iterator.
* @param kiter : valid codes_keys_iterator
@ -1170,11 +1170,11 @@ int codes_keys_iterator_delete(codes_keys_iterator* kiter);
int codes_keys_iterator_rewind(codes_keys_iterator* kiter);
int codes_keys_iterator_set_flags(codes_keys_iterator *kiter, unsigned long flags);
int codes_keys_iterator_get_long(const codes_keys_iterator *kiter, long *v, size_t *len);
int codes_keys_iterator_get_double(const codes_keys_iterator *kiter, double *v, size_t *len);
int codes_keys_iterator_get_string(const codes_keys_iterator *kiter, char *v, size_t *len);
int codes_keys_iterator_get_bytes(const codes_keys_iterator *kiter, unsigned char *v, size_t *len);
int codes_keys_iterator_set_flags(codes_keys_iterator* kiter, unsigned long flags);
int codes_keys_iterator_get_long(const codes_keys_iterator* kiter, long* v, size_t* len);
int codes_keys_iterator_get_double(const codes_keys_iterator* kiter, double* v, size_t* len);
int codes_keys_iterator_get_string(const codes_keys_iterator* kiter, char* v, size_t* len);
int codes_keys_iterator_get_bytes(const codes_keys_iterator* kiter, unsigned char* v, size_t* len);
/* @} */
@ -1205,13 +1205,13 @@ int codes_set_missing(codes_handle* h, const char* key);
/* The truncation is the Gaussian number (or order) */
int codes_get_gaussian_latitudes(long truncation, double* latitudes);
int codes_julian_to_datetime(double jd, long *year, long *month, long *day, long *hour, long *minute, long *second);
int codes_datetime_to_julian(long year, long month, long day, long hour, long minute, long second, double *jd);
int codes_julian_to_datetime(double jd, long* year, long* month, long* day, long* hour, long* minute, long* second);
int codes_datetime_to_julian(long year, long month, long day, long hour, long minute, long second, double* jd);
long codes_julian_to_date(long jdate);
long codes_date_to_julian(long ddate);
void codes_get_reduced_row(long pl, double lon_first, double lon_last, long* npoints, long* ilon_first, long* ilon_last);
void codes_get_reduced_row_p(long pl, double lon_first, double lon_last, long *npoints, double *olon_first, double *olon_last);
void codes_get_reduced_row_p(long pl, double lon_first, double lon_last, long* npoints, double* olon_first, double* olon_last);
/* read products */
@ -1222,7 +1222,7 @@ int codes_check_message_header(const void* bytes, size_t length, ProductKind pro
int codes_check_message_footer(const void* bytes, size_t length, ProductKind product);
codes_box* codes_box_new(codes_handle* h, int* error);
codes_points* codes_box_get_points(codes_box *box, double north, double west, double south, double east, int *err);
codes_points* codes_box_get_points(codes_box* box, double north, double west, double south, double east, int* err);
int codes_points_get_values(codes_handle* h, codes_points* points, double* val);
/* --------------------------------------- */
@ -1254,13 +1254,13 @@ int codes_points_get_values(codes_handle* h, codes_points* points, double* val);
#define CODES_UTIL_ACCURACY_USE_PROVIDED_DECIMAL_SCALE_FACTOR GRIB_UTIL_ACCURACY_USE_PROVIDED_DECIMAL_SCALE_FACTOR
codes_handle *codes_grib_util_set_spec(codes_handle *h,
const codes_util_grid_spec *grid_spec,
const codes_util_packing_spec *packing_spec, /* NULL for defaults (same as input) */
codes_handle* codes_grib_util_set_spec(codes_handle* h,
const codes_util_grid_spec* grid_spec,
const codes_util_packing_spec* packing_spec, /* NULL for defaults (same as input) */
int flags,
const double *data_values,
const double* data_values,
size_t data_values_count,
int *err);
int* err);
/* EXPERIMENTAL FEATURE
* Build an array of headers from input BUFR file.
@ -1271,7 +1271,7 @@ codes_handle *codes_grib_util_set_spec(codes_handle *h,
* returns 0 if OK, integer value on error.
*/
int codes_bufr_extract_headers_malloc(codes_context* c, const char* filename, codes_bufr_header** result, int* num_messages, int strict_mode);
int codes_bufr_header_get_string(codes_bufr_header* bh, const char* key, char *val, size_t *len);
int codes_bufr_header_get_string(codes_bufr_header* bh, const char* key, char* val, size_t* len);
/* --------------------------------------- */
#ifdef __cplusplus

View File

@ -13,10 +13,10 @@
/* Microsoft Windows Visual Studio support */
#if defined(_WIN32) && defined(_MSC_VER)
#define ECCODES_ON_WINDOWS
#ifndef YY_NO_UNISTD_H
#define YY_NO_UNISTD_H
#endif
#define ECCODES_ON_WINDOWS
#ifndef YY_NO_UNISTD_H
#define YY_NO_UNISTD_H
#endif
#endif
#endif

View File

@ -1416,7 +1416,7 @@ static int encode_new_replication(grib_context* c, grib_accessor_bufr_data_array
if (self->compressedData) {
grib_buffer_set_ulength_bits(c, buff, buff->ulength_bits + 6);
grib_encode_unsigned_longb(buff->data, 0, pos, 6);
};
}
return err;
}

View File

@ -28,13 +28,21 @@
#endif
#include <math.h>
#if defined( __GNUC__) || defined(__clang__)
#if defined(__GNUC__) || defined(__clang__)
#define ECCODES_DEPRECATED __attribute__((deprecated))
#else
#define ECCODES_DEPRECATED
#endif
typedef enum ProductKind {PRODUCT_ANY, PRODUCT_GRIB, PRODUCT_BUFR, PRODUCT_METAR, PRODUCT_GTS, PRODUCT_TAF} ProductKind;
typedef enum ProductKind
{
PRODUCT_ANY,
PRODUCT_GRIB,
PRODUCT_BUFR,
PRODUCT_METAR,
PRODUCT_GTS,
PRODUCT_TAF
} ProductKind;
#include "eccodes_version.h"
@ -43,11 +51,11 @@ extern "C" {
#endif
/* sections */
#define GRIB_SECTION_PRODUCT (1<<0)
#define GRIB_SECTION_GRID (1<<1)
#define GRIB_SECTION_LOCAL (1<<2)
#define GRIB_SECTION_DATA (1<<3)
#define GRIB_SECTION_BITMAP (1<<4)
#define GRIB_SECTION_PRODUCT (1 << 0)
#define GRIB_SECTION_GRID (1 << 1)
#define GRIB_SECTION_LOCAL (1 << 2)
#define GRIB_SECTION_DATA (1 << 3)
#define GRIB_SECTION_BITMAP (1 << 4)
/* LOG MODES
@ -89,25 +97,25 @@ Log mode for information for processing information
#define GRIB_MISSING_DOUBLE -1e+100
/*set spec flags*/
#define GRIB_UTIL_SET_SPEC_FLAGS_ONLY_PACKING (1<<0)
#define GRIB_UTIL_SET_SPEC_FLAGS_ONLY_PACKING (1 << 0)
/* Dump option flags*/
#define GRIB_DUMP_FLAG_READ_ONLY (1<<0)
#define GRIB_DUMP_FLAG_DUMP_OK (1<<1)
#define GRIB_DUMP_FLAG_VALUES (1<<2)
#define GRIB_DUMP_FLAG_CODED (1<<3)
#define GRIB_DUMP_FLAG_OCTECT (1<<4)
#define GRIB_DUMP_FLAG_ALIASES (1<<5)
#define GRIB_DUMP_FLAG_TYPE (1<<6)
#define GRIB_DUMP_FLAG_HEXADECIMAL (1<<7)
#define GRIB_DUMP_FLAG_NO_DATA (1<<8)
#define GRIB_DUMP_FLAG_ALL_DATA (1<<9)
#define GRIB_DUMP_FLAG_ALL_ATTRIBUTES (1<<10)
#define GRIB_DUMP_FLAG_READ_ONLY (1 << 0)
#define GRIB_DUMP_FLAG_DUMP_OK (1 << 1)
#define GRIB_DUMP_FLAG_VALUES (1 << 2)
#define GRIB_DUMP_FLAG_CODED (1 << 3)
#define GRIB_DUMP_FLAG_OCTECT (1 << 4)
#define GRIB_DUMP_FLAG_ALIASES (1 << 5)
#define GRIB_DUMP_FLAG_TYPE (1 << 6)
#define GRIB_DUMP_FLAG_HEXADECIMAL (1 << 7)
#define GRIB_DUMP_FLAG_NO_DATA (1 << 8)
#define GRIB_DUMP_FLAG_ALL_DATA (1 << 9)
#define GRIB_DUMP_FLAG_ALL_ATTRIBUTES (1 << 10)
/* grib_nearest flags */
#define GRIB_NEAREST_SAME_GRID (1<<0)
#define GRIB_NEAREST_SAME_DATA (1<<1)
#define GRIB_NEAREST_SAME_POINT (1<<2)
#define GRIB_NEAREST_SAME_GRID (1 << 0)
#define GRIB_NEAREST_SAME_DATA (1 << 1)
#define GRIB_NEAREST_SAME_POINT (1 << 2)
/*! Iteration is carried out on all the keys available in the message
\ingroup keys_iterator
@ -119,48 +127,49 @@ Log mode for information for processing information
\ingroup keys_iterator
\see grib_keys_iterator_new
*/
#define GRIB_KEYS_ITERATOR_SKIP_READ_ONLY (1<<0)
#define GRIB_KEYS_ITERATOR_SKIP_READ_ONLY (1 << 0)
/*! optional keys are skipped by keys iterator.
\ingroup keys_iterator
\see grib_keys_iterator_new */
#define GRIB_KEYS_ITERATOR_SKIP_OPTIONAL (1<<1)
#define GRIB_KEYS_ITERATOR_SKIP_OPTIONAL (1 << 1)
/*! edition specific keys are skipped by keys iterator.
\ingroup keys_iterator
\see grib_keys_iterator_new */
#define GRIB_KEYS_ITERATOR_SKIP_EDITION_SPECIFIC (1<<2)
#define GRIB_KEYS_ITERATOR_SKIP_EDITION_SPECIFIC (1 << 2)
/*! coded keys are skipped by keys iterator.
\ingroup keys_iterator
\see grib_keys_iterator_new */
#define GRIB_KEYS_ITERATOR_SKIP_CODED (1<<3)
#define GRIB_KEYS_ITERATOR_SKIP_CODED (1 << 3)
/*! computed keys are skipped by keys iterator.
\ingroup keys_iterator
\see grib_keys_iterator_new */
#define GRIB_KEYS_ITERATOR_SKIP_COMPUTED (1<<4)
#define GRIB_KEYS_ITERATOR_SKIP_COMPUTED (1 << 4)
/*! duplicates of a key are skipped by keys iterator.
\ingroup keys_iterator
\see grib_keys_iterator_new */
#define GRIB_KEYS_ITERATOR_SKIP_DUPLICATES (1<<5)
#define GRIB_KEYS_ITERATOR_SKIP_DUPLICATES (1 << 5)
/*! function keys are skipped by keys iterator.
\ingroup keys_iterator
\see grib_keys_iterator_new */
#define GRIB_KEYS_ITERATOR_SKIP_FUNCTION (1<<6)
#define GRIB_KEYS_ITERATOR_SKIP_FUNCTION (1 << 6)
/*! only keys present in the dump
\ingroup keys_iterator
\see grib_keys_iterator_new */
#define GRIB_KEYS_ITERATOR_DUMP_ONLY (1<<7)
#define GRIB_KEYS_ITERATOR_DUMP_ONLY (1 << 7)
typedef struct grib_key_value_list grib_key_value_list;
typedef struct grib_values grib_values;
struct grib_values {
struct grib_values
{
const char* name;
int type;
long long_value;
@ -170,7 +179,7 @@ struct grib_values {
int has_value;
int equal;
grib_values* next;
} ;
};
/*! Grib handle, structure giving access to parsed message values by keys
@ -226,12 +235,12 @@ typedef struct bufr_descriptor bufr_descriptor;
typedef struct bufr_descriptors_array bufr_descriptors_array;
typedef struct bufr_descriptors_map_list bufr_descriptors_map_list;
grib_fieldset *grib_fieldset_new_from_files(grib_context *c, char *filenames[], int nfiles, char **keys, int nkeys, const char *where_string, const char *order_by_string, int *err);
grib_fieldset* grib_fieldset_new_from_files(grib_context* c, char* filenames[], int nfiles, char** keys, int nkeys, const char* where_string, const char* order_by_string, int* err);
void grib_fieldset_delete(grib_fieldset* set);
void grib_fieldset_rewind(grib_fieldset* set);
int grib_fieldset_apply_order_by(grib_fieldset* set,const char* order_by_string);
grib_handle* grib_fieldset_next_handle(grib_fieldset* set,int* err);
int grib_fieldset_count(grib_fieldset *set);
int grib_fieldset_apply_order_by(grib_fieldset* set, const char* order_by_string);
grib_handle* grib_fieldset_next_handle(grib_fieldset* set, int* err);
int grib_fieldset_count(grib_fieldset* set);
int grib_values_check(grib_handle* h, grib_values* values, int count);
/*! \defgroup grib_index The grib_index
@ -257,7 +266,7 @@ typedef struct grib_index grib_index;
* @return the newly created index
*/
grib_index* grib_index_new_from_file(grib_context* c,
char* filename,const char* keys,int *err);
char* filename, const char* keys, int* err);
/**
* Create a new index based on a set of keys.
*
@ -270,7 +279,7 @@ grib_index* grib_index_new_from_file(grib_context* c,
* @param err : 0 if OK, integer value on error
* @return the newly created index
*/
grib_index* grib_index_new(grib_context* c, const char* keys,int *err);
grib_index* grib_index_new(grib_context* c, const char* keys, int* err);
/**
* Indexes the file given in argument in the index given in argument.
@ -279,9 +288,9 @@ grib_index* grib_index_new(grib_context* c, const char* keys,int *err);
* @param filename : name of the file of messages to be indexed
* @return 0 if OK, integer value on error
*/
int grib_index_add_file(grib_index *index, const char *filename);
int grib_index_write(grib_index *index, const char *filename);
grib_index* grib_index_read(grib_context* c,const char* filename,int *err);
int grib_index_add_file(grib_index* index, const char* filename);
int grib_index_write(grib_index* index, const char* filename);
grib_index* grib_index_read(grib_context* c, const char* filename, int* err);
/**
* Get the number of distinct values of the key in argument contained in the index. The key must belong to the index.
@ -292,7 +301,7 @@ grib_index* grib_index_read(grib_context* c,const char* filename,int *err);
* @param size : number of distinct values of the key in the index
* @return 0 if OK, integer value on error
*/
int grib_index_get_size(const grib_index* index,const char* key,size_t* size);
int grib_index_get_size(const grib_index* index, const char* key, size_t* size);
/**
* Get the distinct values of the key in argument contained in the index. The key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.
@ -304,8 +313,8 @@ int grib_index_get_size(const grib_index* index,const char* key,size_t* size);
* @param size : size of the values array
* @return 0 if OK, integer value on error
*/
int grib_index_get_long(const grib_index* index,const char* key,
long* values,size_t *size);
int grib_index_get_long(const grib_index* index, const char* key,
long* values, size_t* size);
/**
* Get the distinct values of the key in argument contained in the index. The key must belong to the index. This function is used when the type of the key was explicitly defined as double or when the native type of the key is double.
@ -317,8 +326,8 @@ int grib_index_get_long(const grib_index* index,const char* key,
* @param size : size of the values array
* @return 0 if OK, integer value on error
*/
int grib_index_get_double(const grib_index* index,const char* key,
double* values,size_t *size);
int grib_index_get_double(const grib_index* index, const char* key,
double* values, size_t* size);
/**
* Get the distinct values of the key in argument contained in the index. The key must belong to the index. This function is used when the type of the key was explicitly defined as string or when the native type of the key is string.
@ -330,8 +339,8 @@ int grib_index_get_double(const grib_index* index,const char* key,
* @param size : size of the values array
* @return 0 if OK, integer value on error
*/
int grib_index_get_string(const grib_index* index,const char* key,
char** values,size_t *size);
int grib_index_get_string(const grib_index* index, const char* key,
char** values, size_t* size);
/**
@ -343,7 +352,7 @@ int grib_index_get_string(const grib_index* index,const char* key,
* @param value : value of the key to select
* @return 0 if OK, integer value on error
*/
int grib_index_select_long(grib_index* index,const char* key,long value);
int grib_index_select_long(grib_index* index, const char* key, long value);
/**
* Select the message subset with key==value. The value is a double. The key must have been created with double type or have double as native type if the type was not explicitly defined in the index creation.
@ -354,7 +363,7 @@ int grib_index_select_long(grib_index* index,const char* key,long value);
* @param value : value of the key to select
* @return 0 if OK, integer value on error
*/
int grib_index_select_double(grib_index* index,const char* key,double value);
int grib_index_select_double(grib_index* index, const char* key, double value);
/**
* Select the message subset with key==value. The value is a string. The key must have been created with string type or have string as native type if the type was not explicitly defined in the index creation.
@ -365,7 +374,7 @@ int grib_index_select_double(grib_index* index,const char* key,double value);
* @param value : value of the key to select
* @return 0 if OK, integer value on error
*/
int grib_index_select_string(grib_index* index,const char* key,char* value);
int grib_index_select_string(grib_index* index, const char* key, char* value);
/**
* Create a new handle from an index after having selected the key values.
@ -376,7 +385,7 @@ int grib_index_select_string(grib_index* index,const char* key,char* value);
* @param err : 0 if OK, integer value on error. GRIB_END_OF_INDEX when no more handles are contained in the index.
* @return grib handle.
*/
grib_handle* grib_handle_new_from_index(grib_index* index,int *err);
grib_handle* grib_handle_new_from_index(grib_index* index, int* err);
/**
* Delete the index.
@ -399,7 +408,7 @@ The grib_handle is the structure giving access to parsed grib values by keys.
* @param n : the number of messages in the file
* @return 0 if OK, integer value on error
*/
int grib_count_in_file(grib_context* c, FILE* f,int* n);
int grib_count_in_file(grib_context* c, FILE* f, int* n);
/**
* Counts the messages contained in a file.
@ -433,16 +442,17 @@ grib_handle* grib_handle_new_from_file(grib_context* c, FILE* f, int* error);
* @param mode : mode
* @return 0 if OK, integer value on error
*/
int grib_write_message(const grib_handle* h,const char* file,const char* mode);
int grib_write_message(const grib_handle* h, const char* file, const char* mode);
typedef struct grib_string_list grib_string_list;
struct grib_string_list {
struct grib_string_list
{
char* value;
int count;
grib_string_list* next;
};
grib_handle* grib_util_sections_copy(grib_handle* hfrom,grib_handle* hto,int what,int *err);
grib_handle* grib_util_sections_copy(grib_handle* hfrom, grib_handle* hto, int what, int* err);
grib_string_list* grib_util_get_param_id(const char* mars_param);
grib_string_list* grib_util_get_mars_param(const char* param_id);
@ -469,8 +479,8 @@ grib_handle* grib_handle_new_from_message(grib_context* c, const void* data, siz
* @param error : error code
* @return the new handle, NULL if the message is invalid or a problem is encountered
*/
grib_handle* grib_handle_new_from_multi_message(grib_context* c,void** data,
size_t *data_len,int* error);
grib_handle* grib_handle_new_from_multi_message(grib_context* c, void** data,
size_t* data_len, int* error);
/**
* Create a handle from a user message. The message is copied and will be freed with the handle
@ -491,8 +501,7 @@ grib_handle* grib_handle_new_from_message_copy(grib_context* c, const void* data
* @param sample_name : the name of the sample file (without the .tmpl extension)
* @return the new handle, NULL if the resource is invalid or a problem is encountered
*/
grib_handle* grib_handle_new_from_samples (grib_context* c, const char* sample_name);
grib_handle* grib_handle_new_from_samples(grib_context* c, const char* sample_name);
/**
@ -502,7 +511,7 @@ grib_handle* grib_handle_new_from_samples (grib_context* c, const char* sample_n
* @param h : The handle to be cloned
* @return the new handle, NULL if the message is invalid or a problem is encountered
*/
grib_handle* grib_handle_clone(const grib_handle* h) ;
grib_handle* grib_handle_clone(const grib_handle* h);
/**
* Frees a handle, also frees the message if it is not a user message
@ -519,7 +528,7 @@ int grib_handle_delete(grib_handle* h);
*
* @param c : the context from which the handle will be created (NULL for default context)
*/
grib_multi_handle* grib_multi_handle_new (grib_context* c);
grib_multi_handle* grib_multi_handle_new(grib_context* c);
/**
* Append the sections starting with start_section of the message pointed by h at
@ -532,7 +541,7 @@ grib_multi_handle* grib_multi_handle_new (grib_context* c);
* @param mh : The multi field handle on which the sections are appended.
* @return 0 if OK, integer value on error
*/
int grib_multi_handle_append(grib_handle* h,int start_section,grib_multi_handle* mh);
int grib_multi_handle_append(grib_handle* h, int start_section, grib_multi_handle* mh);
/**
* Delete multi field handle.
@ -551,7 +560,7 @@ int grib_multi_handle_delete(grib_multi_handle* mh);
* @param f : File on which the file handle is written.
* @return 0 if OK, integer value on error
*/
int grib_multi_handle_write(grib_multi_handle* mh,FILE* f);
int grib_multi_handle_write(grib_multi_handle* mh, FILE* f);
/*! @} */
@ -565,7 +574,7 @@ int grib_multi_handle_write(grib_multi_handle* mh,FILE* f);
* @param message_length : On exit, the message size in number of bytes
* @return 0 if OK, integer value on error
*/
int grib_get_message(const grib_handle* h ,const void** message, size_t *message_length);
int grib_get_message(const grib_handle* h, const void** message, size_t* message_length);
/**
@ -577,7 +586,7 @@ int grib_get_message(const grib_handle* h ,const void** message, size_t *message
* On exit, the actual message length in number of bytes
* @return 0 if OK, integer value on error
*/
int grib_get_message_copy(const grib_handle* h, void* message,size_t *message_length);
int grib_get_message_copy(const grib_handle* h, void* message, size_t* message_length);
/*! @} */
/*! \defgroup iterators Iterating on latitude/longitude/values */
@ -604,7 +613,7 @@ grib_iterator* grib_iterator_new(const grib_handle* h, unsigned long flags, int*
* @param values : returned array of data values
* @return 0 if OK, integer value on error
*/
int grib_get_data(const grib_handle *h, double *lats, double *lons, double *values);
int grib_get_data(const grib_handle* h, double* lats, double* lons, double* values);
/**
* Get the next value from a geoiterator.
@ -615,7 +624,7 @@ int grib_get_data(const grib_handle *h, double *lats, double *lons, double *valu
* @param value : on output value of the point
* @return positive value if successful, 0 if no more data are available
*/
int grib_iterator_next(grib_iterator *i, double* lat,double* lon,double* value);
int grib_iterator_next(grib_iterator* i, double* lat, double* lon, double* value);
/**
* Get the previous value from a geoiterator.
@ -626,7 +635,7 @@ int grib_iterator_next(grib_iterator *i, double* lat,double* lon,double* value);
* @param value : on output value of the point*
* @return positive value if successful, 0 if no more data are available
*/
int grib_iterator_previous(grib_iterator *i, double* lat,double* lon,double* value);
int grib_iterator_previous(grib_iterator* i, double* lat, double* lon, double* value);
/**
* Test procedure for values in a geoiterator.
@ -634,7 +643,7 @@ int grib_iterator_previous(grib_iterator *i, double* lat,double* lon,double* val
* @param i : the geoiterator
* @return boolean, 1 if the geoiterator still nave next values, 0 otherwise
*/
int grib_iterator_has_next(grib_iterator *i);
int grib_iterator_has_next(grib_iterator* i);
/**
* Test procedure for values in a geoiterator.
@ -642,7 +651,7 @@ int grib_iterator_has_next(grib_iterator *i);
* @param i : the geoiterator
* @return 0 if OK, integer value on error
*/
int grib_iterator_reset(grib_iterator *i);
int grib_iterator_reset(grib_iterator* i);
/**
* Frees a geoiterator from memory
@ -650,7 +659,7 @@ int grib_iterator_reset(grib_iterator *i);
* @param i : the geoiterator
* @return 0 if OK, integer value on error
*/
int grib_iterator_delete(grib_iterator *i);
int grib_iterator_delete(grib_iterator* i);
/*!
* \brief Create a new nearest neighbour object from a handle, using current geometry.
@ -692,7 +701,7 @@ int grib_nearest_find(grib_nearest* nearest, const grib_handle* h, double inlat,
* @param nearest : the nearest
* @return 0 if OK, integer value on error
*/
int grib_nearest_delete(grib_nearest *nearest);
int grib_nearest_delete(grib_nearest* nearest);
/**
* Find the nearest point of a set of points whose latitudes and longitudes
@ -746,7 +755,7 @@ int grib_get_offset(const grib_handle* h, const char* key, size_t* offset);
* @param size : the address of a size_t where the size will be set
* @return 0 if OK, integer value on error
*/
int grib_get_size(const grib_handle* h, const char* key,size_t *size);
int grib_get_size(const grib_handle* h, const char* key, size_t* size);
/**
* Get the length of the string representation of the key, if several keys of the same name are present, the maximum length is returned
@ -756,7 +765,7 @@ int grib_get_size(const grib_handle* h, const char* key,size_t *size);
* @param length : the address of a size_t where the length will be set
* @return 0 if OK, integer value on error
*/
int grib_get_length(const grib_handle* h, const char* key,size_t *length);
int grib_get_length(const grib_handle* h, const char* key, size_t* length);
/**
* Get a long value from a key, if several keys of the same name are present, the last one is returned
@ -813,7 +822,7 @@ int grib_get_double_elements(const grib_handle* h, const char* key, int* i, long
* @param length : the address of a size_t that contains allocated length of the string on input, and that contains the actual length of the string on output
* @return 0 if OK, integer value on error
*/
int grib_get_string(const grib_handle* h, const char* key, char* mesg, size_t *length);
int grib_get_string(const grib_handle* h, const char* key, char* mesg, size_t* length);
/**
* Get string array values from a key. If several keys of the same name are present, the last one is returned
@ -825,7 +834,7 @@ int grib_get_string(const grib_handle* h, const char* key, char* mesg, size_t *l
* @param length : the address of a size_t that contains allocated length of the array on input, and that contains the actual length of the array on output
* @return 0 if OK, integer value on error
*/
int grib_get_string_array(const grib_handle* h, const char* key, char** vals, size_t *length);
int grib_get_string_array(const grib_handle* h, const char* key, char** vals, size_t* length);
/**
* Get raw bytes values from a key. If several keys of the same name are present, the last one is returned
@ -837,7 +846,7 @@ int grib_get_string_array(const grib_handle* h, const char* key, char** vals, si
* @param length : the address of a size_t that contains allocated length of the byte array on input, and that contains the actual length of the byte array on output
* @return 0 if OK, integer value on error
*/
int grib_get_bytes(const grib_handle* h, const char* key, unsigned char* bytes, size_t *length);
int grib_get_bytes(const grib_handle* h, const char* key, unsigned char* bytes, size_t* length);
/**
* Get double array values from a key. If several keys of the same name are present, the last one is returned
* @see grib_set_double_array
@ -848,7 +857,7 @@ int grib_get_bytes(const grib_handle* h, const char* key, unsigned char* bytes,
* @param length : the address of a size_t that contains allocated length of the double array on input, and that contains the actual length of the double array on output
* @return 0 if OK, integer value on error
*/
int grib_get_double_array(const grib_handle* h, const char* key, double* vals, size_t *length);
int grib_get_double_array(const grib_handle* h, const char* key, double* vals, size_t* length);
/**
* Get long array values from a key. If several keys of the same name are present, the last one is returned
@ -860,7 +869,7 @@ int grib_get_double_array(const grib_handle* h, const char* key, double* vals, s
* @param length : the address of a size_t that contains allocated length of the long array on input, and that contains the actual length of the long array on output
* @return 0 if OK, integer value on error
*/
int grib_get_long_array(const grib_handle* h, const char* key, long* vals, size_t *length);
int grib_get_long_array(const grib_handle* h, const char* key, long* vals, size_t* length);
/* setting data */
@ -907,7 +916,7 @@ int grib_set_double(grib_handle* h, const char* key, double val);
* @param length : the address of a size_t that contains the length of the string on input, and that contains the actual packed length of the string on output
* @return 0 if OK, integer value on error
*/
int grib_set_string(grib_handle* h, const char* key, const char* mesg, size_t *length);
int grib_set_string(grib_handle* h, const char* key, const char* mesg, size_t* length);
/**
* Set a bytes array from a key. If several keys of the same name are present, the last one is set
@ -919,7 +928,7 @@ int grib_set_string(grib_handle* h, const char* key, const char* mesg, size_t *l
* @param length : the address of a size_t that contains the length of the byte array on input, and that contains the actual packed length of the byte array on output
* @return 0 if OK, integer value on error
*/
int grib_set_bytes(grib_handle* h, const char* key, const unsigned char* bytes, size_t *length);
int grib_set_bytes(grib_handle* h, const char* key, const unsigned char* bytes, size_t* length);
/**
* Set a double array from a key. If several keys of the same name are present, the last one is set
@ -931,7 +940,7 @@ int grib_set_bytes(grib_handle* h, const char* key, const unsigned char* bytes,
* @param length : a size_t that contains the length of the byte array on input
* @return 0 if OK, integer value on error
*/
int grib_set_double_array(grib_handle* h, const char* key , const double* vals , size_t length);
int grib_set_double_array(grib_handle* h, const char* key, const double* vals, size_t length);
/**
* Same as grib_set_double_array but allows setting of READ-ONLY keys like codedValues.
@ -950,7 +959,7 @@ int grib_set_force_double_array(grib_handle* h, const char* key, const double* v
* @param length : a size_t that contains the length of the long array on input
* @return 0 if OK, integer value on error
*/
int grib_set_long_array(grib_handle* h, const char* key , const long* vals, size_t length);
int grib_set_long_array(grib_handle* h, const char* key, const long* vals, size_t length);
/**
* Set a string array from a key. If several keys of the same name are present, the last one is set
@ -962,7 +971,7 @@ int grib_set_long_array(grib_handle* h, const char* key , const long* vals, siz
* @param length : a size_t that contains the length of the array on input
* @return 0 if OK, integer value on error
*/
int grib_set_string_array(grib_handle* h, const char *key, const char **vals, size_t length);
int grib_set_string_array(grib_handle* h, const char* key, const char** vals, size_t length);
/*! @} */
@ -975,7 +984,7 @@ int grib_set_string_array(grib_handle* h, const char *key, const char **vals, si
* @param option_flags : all the GRIB_DUMP_FLAG_x flags can be used
* @param arg : used to provide a format to output data (experimental)
*/
void grib_dump_content(const grib_handle* h,FILE* out,const char* mode, unsigned long option_flags,void* arg);
void grib_dump_content(const grib_handle* h, FILE* out, const char* mode, unsigned long option_flags, void* arg);
/**
* Print all keys from the parsed definition files available in a context
@ -983,7 +992,7 @@ void grib_dump_content(const grib_handle* h,FILE* out,const char* mode, unsigned
* @param f : the File used to print the keys on
* @param c : the context that contains the cached definition files to be printed
*/
void grib_dump_action_tree(grib_context* c, FILE* f) ;
void grib_dump_action_tree(grib_context* c, FILE* f);
/*! \defgroup context The context object
The context is a long life configuration object of the grib_api.
@ -1046,7 +1055,7 @@ typedef void (*grib_print_proc)(const grib_context* c, void* descriptor, const
* @param stream : the stream
* @return size read
*/
typedef size_t (*grib_data_read_proc)(const grib_context* c,void *ptr, size_t size, void *stream);
typedef size_t (*grib_data_read_proc)(const grib_context* c, void* ptr, size_t size, void* stream);
/**
* Grib data read write, format of a procedure referenced in the context that is used to write to a stream from a resource
@ -1057,7 +1066,7 @@ typedef size_t (*grib_data_read_proc)(const grib_context* c,void *ptr, size_t si
* @param stream : the stream
* @return size written
*/
typedef size_t (*grib_data_write_proc)(const grib_context* c,const void *ptr, size_t size, void *stream);
typedef size_t (*grib_data_write_proc)(const grib_context* c, const void* ptr, size_t size, void* stream);
/**
* Grib data tell, format of a procedure referenced in the context that is used to tell the current position in a stream
@ -1066,7 +1075,7 @@ typedef size_t (*grib_data_write_proc)(const grib_context* c,const void *ptr, si
* @param stream : the stream
* @return the position in the stream
*/
typedef off_t (*grib_data_tell_proc) (const grib_context* c, void *stream);
typedef off_t (*grib_data_tell_proc)(const grib_context* c, void* stream);
/**
* Grib data seek, format of a procedure referenced in the context that is used to seek the current position in a stream
@ -1079,7 +1088,7 @@ typedef off_t (*grib_data_tell_proc) (const grib_context* c, void *stream);
* @param stream : the stream
* @return 0 if OK, integer value on error
*/
typedef off_t (*grib_data_seek_proc)(const grib_context* c, off_t offset, int whence, void *stream);
typedef off_t (*grib_data_seek_proc)(const grib_context* c, off_t offset, int whence, void* stream);
/**
* Grib data eof, format of a procedure referenced in the context that is used to test end of file
@ -1088,7 +1097,7 @@ typedef off_t (*grib_data_seek_proc)(const grib_context* c, off_t offset, int w
* @param stream : the stream
* @return the position in the stream
*/
typedef int (*grib_data_eof_proc) (const grib_context* c, void *stream);
typedef int (*grib_data_eof_proc)(const grib_context* c, void* stream);
/**
* Get the static default context
@ -1110,7 +1119,7 @@ void grib_context_delete(grib_context* c);
*
* @param c : the context
*/
void grib_gts_header_on(grib_context* c) ;
void grib_gts_header_on(grib_context* c);
/**
* Set the GTS header mode off.
@ -1229,8 +1238,8 @@ void grib_multi_support_off(grib_context* c);
*/
void grib_multi_support_reset_file(grib_context* c, FILE* f);
char* grib_samples_path(const grib_context *c);
char* grib_definition_path(const grib_context *c);
char* grib_samples_path(const grib_context* c);
char* grib_definition_path(const grib_context* c);
/*! @} */
/**
@ -1273,7 +1282,7 @@ attributes or by the namespace they belong to.
* @return keys iterator ready to iterate through keys according to filter_flags
* and namespace
*/
grib_keys_iterator* grib_keys_iterator_new(grib_handle* h,unsigned long filter_flags, const char* name_space);
grib_keys_iterator* grib_keys_iterator_new(grib_handle* h, unsigned long filter_flags, const char* name_space);
bufr_keys_iterator* codes_bufr_keys_iterator_new(grib_handle* h, unsigned long filter_flags);
bufr_keys_iterator* codes_bufr_data_section_keys_iterator_new(grib_handle* h);
@ -1288,7 +1297,7 @@ int codes_bufr_keys_iterator_next(bufr_keys_iterator* kiter);
* @param kiter : valid grib_keys_iterator
* @return key name
*/
const char* grib_keys_iterator_get_name(const grib_keys_iterator *kiter);
const char* grib_keys_iterator_get_name(const grib_keys_iterator* kiter);
char* codes_bufr_keys_iterator_get_name(const bufr_keys_iterator* kiter);
/*! Delete the iterator.
@ -1305,13 +1314,13 @@ int codes_bufr_keys_iterator_delete(bufr_keys_iterator* kiter);
int grib_keys_iterator_rewind(grib_keys_iterator* kiter);
int codes_bufr_keys_iterator_rewind(bufr_keys_iterator* kiter);
int grib_keys_iterator_set_flags(grib_keys_iterator *kiter,unsigned long flags);
int grib_keys_iterator_set_flags(grib_keys_iterator* kiter, unsigned long flags);
int grib_keys_iterator_get_long(const grib_keys_iterator *kiter, long *v, size_t *len);
int grib_keys_iterator_get_double(const grib_keys_iterator *kiter, double *v, size_t *len);
int grib_keys_iterator_get_string(const grib_keys_iterator *kiter, char *v, size_t *len);
int grib_keys_iterator_get_bytes(const grib_keys_iterator *kiter, unsigned char *v, size_t *len);
int codes_copy_key(grib_handle* h1,grib_handle* h2,const char* key,int type);
int grib_keys_iterator_get_long(const grib_keys_iterator* kiter, long* v, size_t* len);
int grib_keys_iterator_get_double(const grib_keys_iterator* kiter, double* v, size_t* len);
int grib_keys_iterator_get_string(const grib_keys_iterator* kiter, char* v, size_t* len);
int grib_keys_iterator_get_bytes(const grib_keys_iterator* kiter, unsigned char* v, size_t* len);
int codes_copy_key(grib_handle* h1, grib_handle* h2, const char* key, int type);
/* @} */
@ -1326,49 +1335,50 @@ void grib_update_sections_lengths(grib_handle* h);
const char* grib_get_error_message(int code);
const char* grib_get_type_name(int type);
int grib_get_native_type(const grib_handle* h, const char* name,int* type);
int grib_get_native_type(const grib_handle* h, const char* name, int* type);
void grib_check(const char* call,const char* file,int line,int e,const char* msg);
#define GRIB_CHECK(a,msg) grib_check(#a,__FILE__,__LINE__,a,msg)
#define GRIB_CHECK_NOLINE(a,msg) grib_check(#a,0,0,a,msg)
void grib_check(const char* call, const char* file, int line, int e, const char* msg);
#define GRIB_CHECK(a, msg) grib_check(#a, __FILE__, __LINE__, a, msg)
#define GRIB_CHECK_NOLINE(a, msg) grib_check(#a, 0, 0, a, msg)
int grib_set_values(grib_handle* h,grib_values* grib_values , size_t arg_count);
int grib_set_values(grib_handle* h, grib_values* grib_values, size_t arg_count);
grib_handle* grib_handle_new_from_partial_message_copy(grib_context* c, const void* data, size_t size);
grib_handle* grib_handle_new_from_partial_message(grib_context* c, const void* data, size_t buflen);
int grib_is_missing(const grib_handle* h, const char* key, int* err);
int grib_is_defined(const grib_handle* h, const char* key);
int grib_set_missing(grib_handle* h, const char* key);
/* The truncation is the Gaussian number (or order) */
int grib_get_gaussian_latitudes(long truncation,double* latitudes);
int grib_get_gaussian_latitudes(long truncation, double* latitudes);
int grib_julian_to_datetime(double jd, long *year, long *month, long *day, long *hour, long *minute, long *second);
int grib_datetime_to_julian(long year, long month, long day, long hour, long minute, long second, double *jd);
int grib_julian_to_datetime(double jd, long* year, long* month, long* day, long* hour, long* minute, long* second);
int grib_datetime_to_julian(long year, long month, long day, long hour, long minute, long second, double* jd);
long grib_julian_to_date(long jdate);
long grib_date_to_julian(long ddate);
void grib_get_reduced_row(long pl,double lon_first,double lon_last,long* npoints,long* ilon_first, long* ilon_last);
void grib_get_reduced_row_p(long pl, double lon_first, double lon_last, long *npoints, double *olon_first, double *olon_last);
void grib_get_reduced_row(long pl, double lon_first, double lon_last, long* npoints, long* ilon_first, long* ilon_last);
void grib_get_reduced_row_p(long pl, double lon_first, double lon_last, long* npoints, double* olon_first, double* olon_last);
/* read products */
int wmo_read_any_from_file(FILE *f, void *buffer, size_t *len);
int wmo_read_grib_from_file(FILE* f,void* buffer,size_t* len);
int wmo_read_bufr_from_file(FILE* f,void* buffer,size_t* len);
int wmo_read_gts_from_file(FILE* f,void* buffer,size_t* len);
int wmo_read_any_from_stream(void *stream_data, long (*stream_proc )(void *, void *buffer, long len ), void *buffer, size_t *len);
int wmo_read_any_from_file(FILE* f, void* buffer, size_t* len);
int wmo_read_grib_from_file(FILE* f, void* buffer, size_t* len);
int wmo_read_bufr_from_file(FILE* f, void* buffer, size_t* len);
int wmo_read_gts_from_file(FILE* f, void* buffer, size_t* len);
int wmo_read_any_from_stream(void* stream_data, long (*stream_proc)(void*, void* buffer, long len), void* buffer, size_t* len);
/* These functions allocate memory for the result so the user is responsible for freeing it */
void* wmo_read_any_from_stream_malloc(void* stream_data,long (*stream_proc)(void*,void* buffer,long len) ,size_t *size, int* err);
void *wmo_read_any_from_file_malloc(FILE* f,int headers_only,size_t *size,off_t *offset,int* err);
void *wmo_read_gts_from_file_malloc(FILE* f,int headers_only,size_t *size,off_t *offset,int* err);
void *wmo_read_bufr_from_file_malloc(FILE* f,int headers_only,size_t *size,off_t *offset,int* err);
void *wmo_read_grib_from_file_malloc(FILE* f,int headers_only,size_t *size,off_t *offset,int* err);
void* wmo_read_any_from_stream_malloc(void* stream_data, long (*stream_proc)(void*, void* buffer, long len), size_t* size, int* err);
void* wmo_read_any_from_file_malloc(FILE* f, int headers_only, size_t* size, off_t* offset, int* err);
void* wmo_read_gts_from_file_malloc(FILE* f, int headers_only, size_t* size, off_t* offset, int* err);
void* wmo_read_bufr_from_file_malloc(FILE* f, int headers_only, size_t* size, off_t* offset, int* err);
void* wmo_read_grib_from_file_malloc(FILE* f, int headers_only, size_t* size, off_t* offset, int* err);
int grib_read_any_from_file(grib_context *ctx, FILE *f, void *buffer, size_t *len);
int grib_get_message_offset(const grib_handle* h,off_t* offset);
int grib_get_message_size(const grib_handle* h,size_t* size);
int grib_read_any_from_file(grib_context* ctx, FILE* f, void* buffer, size_t* len);
int grib_get_message_offset(const grib_handle* h, off_t* offset);
int grib_get_message_size(const grib_handle* h, size_t* size);
struct grib_points {
struct grib_points
{
grib_context* context;
double* latitudes;
double* longitudes;
@ -1380,8 +1390,8 @@ struct grib_points {
size_t size;
};
grib_box* grib_box_new(grib_handle* h,int* error);
grib_points* grib_box_get_points(grib_box *box,double north, double west,double south,double east, int *err);
grib_box* grib_box_new(grib_handle* h, int* error);
grib_points* grib_box_get_points(grib_box* box, double north, double west, double south, double east, int* err);
int grib_points_get_values(grib_handle* h, grib_points* points, double* val);
@ -1402,8 +1412,8 @@ int grib_points_get_values(grib_handle* h, grib_points* points, double* val);
#define GRIB_UTIL_GRID_SPEC_UNSTRUCTURED 12
typedef struct grib_util_grid_spec {
typedef struct grib_util_grid_spec
{
int grid_type;
/* Grid */
@ -1436,7 +1446,7 @@ typedef struct grib_util_grid_spec {
double missingValue;
/* pl list for reduced */
const long *pl;
const long* pl;
long pl_size;
/* Spherical harmonics */
@ -1449,8 +1459,8 @@ typedef struct grib_util_grid_spec {
} grib_util_grid_spec;
typedef struct grib_util_grid_spec2 {
typedef struct grib_util_grid_spec2
{
int grid_type;
const char* grid_name; /* e.g. N320 */
@ -1485,7 +1495,7 @@ typedef struct grib_util_grid_spec2 {
double missingValue;
/* pl list for reduced */
const long *pl;
const long* pl;
long pl_size;
/* Spherical harmonics */
@ -1516,8 +1526,8 @@ typedef struct grib_util_grid_spec2 {
#define GRIB_UTIL_ACCURACY_SAME_DECIMAL_SCALE_FACTOR_AS_INPUT 2
#define GRIB_UTIL_ACCURACY_USE_PROVIDED_DECIMAL_SCALE_FACTOR 3
typedef struct grib_util_packing_spec {
typedef struct grib_util_packing_spec
{
/* Packing options */
long packing_type;
long packing;
@ -1543,27 +1553,28 @@ typedef struct grib_util_packing_spec {
} grib_util_packing_spec;
grib_handle *grib_util_set_spec(grib_handle *h,
const grib_util_grid_spec *grid_spec,
const grib_util_packing_spec *packing_spec, /* NULL for defaults (same as input) */
grib_handle* grib_util_set_spec(grib_handle* h,
const grib_util_grid_spec* grid_spec,
const grib_util_packing_spec* packing_spec, /* NULL for defaults (same as input) */
int flags,
const double *data_values,
const double* data_values,
size_t data_values_count,
int *err);
int* err);
grib_handle *grib_util_set_spec2(grib_handle *h,
const grib_util_grid_spec2 *grid_spec,
const grib_util_packing_spec *packing_spec, /* NULL for defaults (same as input) */
grib_handle* grib_util_set_spec2(grib_handle* h,
const grib_util_grid_spec2* grid_spec,
const grib_util_packing_spec* packing_spec, /* NULL for defaults (same as input) */
int flags,
const double *data_values,
const double* data_values,
size_t data_values_count,
int *err);
int* err);
int parse_keyval_string(const char *grib_tool, char *arg, int values_required, int default_type, grib_values values[], int *count);
grib_handle *grib_new_from_file(grib_context *c, FILE *f, int headers_only, int *error);
int parse_keyval_string(const char* grib_tool, char* arg, int values_required, int default_type, grib_values values[], int* count);
grib_handle* grib_new_from_file(grib_context* c, FILE* f, int headers_only, int* error);
/* EXPERIMENTAL */
typedef struct codes_bufr_header {
typedef struct codes_bufr_header
{
unsigned long message_offset;
unsigned long message_size;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,6 @@
* virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
*/
int igglat_(long* KLAT, float *PGAUSS, long* KPR, long* KERR);
void gribex_(long* KSEC0, long* KSEC1, long* KSEC2, double *PSEC2,long* KSEC3, double *PSEC3, long* KSEC4,
double *PSEC4, long* KLENP, void* KGRIB, long* KLENG,long* KWORD, char* HOPER, long* KRET);
int igglat_(long* KLAT, float* PGAUSS, long* KPR, long* KERR);
void gribex_(long* KSEC0, long* KSEC1, long* KSEC2, double* PSEC2, long* KSEC3, double* PSEC3, long* KSEC4,
double* PSEC4, long* KLENP, void* KGRIB, long* KLENG, long* KWORD, char* HOPER, long* KRET);

View File

@ -22,48 +22,42 @@ extern "C" {
* Method: gribGetNextHandle
* Signature: (J)Ljgribapi/GribHandle;
*/
JNIEXPORT jobject JNICALL Java_jgribapi_GribFile_gribGetNextHandle
(JNIEnv *, jobject, jlong);
JNIEXPORT jobject JNICALL Java_jgribapi_GribFile_gribGetNextHandle(JNIEnv*, jobject, jlong);
/*
* Class: jgribapi_GribFile
* Method: gribEOFReached
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_jgribapi_GribFile_gribEOFReached
(JNIEnv *, jobject, jlong);
JNIEXPORT jlong JNICALL Java_jgribapi_GribFile_gribEOFReached(JNIEnv*, jobject, jlong);
/*
* Class: jgribapi_GribFile
* Method: gribGetGribFile
* Signature: (Ljava/lang/String;)J
*/
JNIEXPORT jlong JNICALL Java_jgribapi_GribFile_gribGetGribFile
(JNIEnv *, jobject, jstring);
JNIEXPORT jlong JNICALL Java_jgribapi_GribFile_gribGetGribFile(JNIEnv*, jobject, jstring);
/*
* Class: jgribapi_GribFile
* Method: gribCloseFile
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_jgribapi_GribFile_gribCloseFile
(JNIEnv *, jobject, jlong);
JNIEXPORT void JNICALL Java_jgribapi_GribFile_gribCloseFile(JNIEnv*, jobject, jlong);
/*
* Class: jgribapi_GribFile
* Method: gribNewFile
* Signature: (Ljava/lang/String;)J
*/
JNIEXPORT jlong JNICALL Java_jgribapi_GribFile_gribNewFile
(JNIEnv *, jobject, jstring);
JNIEXPORT jlong JNICALL Java_jgribapi_GribFile_gribNewFile(JNIEnv*, jobject, jstring);
/*
* Class: jgribapi_GribFile
* Method: gribWriteHandle
* Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_jgribapi_GribFile_gribWriteHandle
(JNIEnv *, jobject, jlong, jlong);
JNIEXPORT void JNICALL Java_jgribapi_GribFile_gribWriteHandle(JNIEnv*, jobject, jlong, jlong);
#ifdef __cplusplus
}

View File

@ -22,152 +22,133 @@ extern "C" {
* Method: getIteratorID
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_jgribapi_GribHandle_getIteratorID
(JNIEnv *, jobject, jlong);
JNIEXPORT jlong JNICALL Java_jgribapi_GribHandle_getIteratorID(JNIEnv*, jobject, jlong);
/*
* Class: jgribapi_GribHandle
* Method: gribGetString
* Signature: (JLjava/lang/String;)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_jgribapi_GribHandle_gribGetString
(JNIEnv *, jobject, jlong, jstring);
JNIEXPORT jstring JNICALL Java_jgribapi_GribHandle_gribGetString(JNIEnv*, jobject, jlong, jstring);
/*
* Class: jgribapi_GribHandle
* Method: gribGetLong
* Signature: (JLjava/lang/String;)J
*/
JNIEXPORT jlong JNICALL Java_jgribapi_GribHandle_gribGetLong
(JNIEnv *, jobject, jlong, jstring);
JNIEXPORT jlong JNICALL Java_jgribapi_GribHandle_gribGetLong(JNIEnv*, jobject, jlong, jstring);
/*
* Class: jgribapi_GribHandle
* Method: gribGetDouble
* Signature: (JLjava/lang/String;)D
*/
JNIEXPORT jdouble JNICALL Java_jgribapi_GribHandle_gribGetDouble
(JNIEnv *, jobject, jlong, jstring);
JNIEXPORT jdouble JNICALL Java_jgribapi_GribHandle_gribGetDouble(JNIEnv*, jobject, jlong, jstring);
/*
* Class: jgribapi_GribHandle
* Method: gribGetLongArray
* Signature: (JLjava/lang/String;)[J
*/
JNIEXPORT jlongArray JNICALL Java_jgribapi_GribHandle_gribGetLongArray
(JNIEnv *, jobject, jlong, jstring);
JNIEXPORT jlongArray JNICALL Java_jgribapi_GribHandle_gribGetLongArray(JNIEnv*, jobject, jlong, jstring);
/*
* Class: jgribapi_GribHandle
* Method: gribGetDoubleArray
* Signature: (JLjava/lang/String;)[D
*/
JNIEXPORT jdoubleArray JNICALL Java_jgribapi_GribHandle_gribGetDoubleArray
(JNIEnv *, jobject, jlong, jstring);
JNIEXPORT jdoubleArray JNICALL Java_jgribapi_GribHandle_gribGetDoubleArray(JNIEnv*, jobject, jlong, jstring);
/*
* Class: jgribapi_GribHandle
* Method: gribSetString
* Signature: (JLjava/lang/String;Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribSetString
(JNIEnv *, jobject, jlong, jstring, jstring);
JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribSetString(JNIEnv*, jobject, jlong, jstring, jstring);
/*
* Class: jgribapi_GribHandle
* Method: gribCreateNext
* Signature: (J)Ljgribapi/GribKey;
*/
JNIEXPORT jobject JNICALL Java_jgribapi_GribHandle_gribCreateNext
(JNIEnv *, jobject, jlong);
JNIEXPORT jobject JNICALL Java_jgribapi_GribHandle_gribCreateNext(JNIEnv*, jobject, jlong);
/*
* Class: jgribapi_GribHandle
* Method: gribSetSearch
* Signature: (JLjava/lang/String;)J
*/
JNIEXPORT jlong JNICALL Java_jgribapi_GribHandle_gribSetSearch
(JNIEnv *, jobject, jlong, jstring);
JNIEXPORT jlong JNICALL Java_jgribapi_GribHandle_gribSetSearch(JNIEnv*, jobject, jlong, jstring);
/*
* Class: jgribapi_GribHandle
* Method: gribSetLong
* Signature: (JLjava/lang/String;J)I
*/
JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribSetLong
(JNIEnv *, jobject, jlong, jstring, jlong);
JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribSetLong(JNIEnv*, jobject, jlong, jstring, jlong);
/*
* Class: jgribapi_GribHandle
* Method: gribSetDouble
* Signature: (JLjava/lang/String;D)I
*/
JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribSetDouble
(JNIEnv *, jobject, jlong, jstring, jdouble);
JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribSetDouble(JNIEnv*, jobject, jlong, jstring, jdouble);
/*
* Class: jgribapi_GribHandle
* Method: gribSetLongArray
* Signature: (JLjava/lang/String;[J)I
*/
JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribSetLongArray
(JNIEnv *, jobject, jlong, jstring, jlongArray);
JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribSetLongArray(JNIEnv*, jobject, jlong, jstring, jlongArray);
/*
* Class: jgribapi_GribHandle
* Method: gribSetDoubleArray
* Signature: (JLjava/lang/String;[D)I
*/
JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribSetDoubleArray
(JNIEnv *, jobject, jlong, jstring, jdoubleArray);
JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribSetDoubleArray(JNIEnv*, jobject, jlong, jstring, jdoubleArray);
/*
* Class: jgribapi_GribHandle
* Method: gribGetXml
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_jgribapi_GribHandle_gribGetXml__J
(JNIEnv *, jobject, jlong);
JNIEXPORT jstring JNICALL Java_jgribapi_GribHandle_gribGetXml__J(JNIEnv*, jobject, jlong);
/*
* Class: jgribapi_GribHandle
* Method: gribGetXml
* Signature: (JLjava/lang/String;)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_jgribapi_GribHandle_gribGetXml__JLjava_lang_String_2
(JNIEnv *, jobject, jlong, jstring);
JNIEXPORT jstring JNICALL Java_jgribapi_GribHandle_gribGetXml__JLjava_lang_String_2(JNIEnv*, jobject, jlong, jstring);
/*
* Class: jgribapi_GribHandle
* Method: gribGetAscii
* Signature: (JLjava/lang/String;)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_jgribapi_GribHandle_gribGetAscii
(JNIEnv *, jobject, jlong, jstring);
JNIEXPORT jstring JNICALL Java_jgribapi_GribHandle_gribGetAscii(JNIEnv*, jobject, jlong, jstring);
/*
* Class: jgribapi_GribHandle
* Method: gribGetBytes
* Signature: (JLjava/lang/String;)[B
*/
JNIEXPORT jbyteArray JNICALL Java_jgribapi_GribHandle_gribGetBytes
(JNIEnv *, jobject, jlong, jstring);
JNIEXPORT jbyteArray JNICALL Java_jgribapi_GribHandle_gribGetBytes(JNIEnv*, jobject, jlong, jstring);
/*
* Class: jgribapi_GribHandle
* Method: gribDeleteHandle
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribDeleteHandle
(JNIEnv *, jobject, jlong);
JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribDeleteHandle(JNIEnv*, jobject, jlong);
/*
* Class: jgribapi_GribHandle
* Method: gribResetHandle
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_jgribapi_GribHandle_gribResetHandle
(JNIEnv *, jobject, jlong);
JNIEXPORT void JNICALL Java_jgribapi_GribHandle_gribResetHandle(JNIEnv*, jobject, jlong);
#ifdef __cplusplus
}

View File

@ -22,16 +22,14 @@ extern "C" {
* Method: gribIteratorGetNext
* Signature: (J)Ljgribapi/GribPoint;
*/
JNIEXPORT jobject JNICALL Java_jgribapi_GribIterator_gribIteratorGetNext
(JNIEnv *, jobject, jlong);
JNIEXPORT jobject JNICALL Java_jgribapi_GribIterator_gribIteratorGetNext(JNIEnv*, jobject, jlong);
/*
* Class: jgribapi_GribIterator
* Method: gribIteratorHasNext
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_jgribapi_GribIterator_gribIteratorHasNext
(JNIEnv *, jobject, jlong);
JNIEXPORT jlong JNICALL Java_jgribapi_GribIterator_gribIteratorHasNext(JNIEnv*, jobject, jlong);
#ifdef __cplusplus
}

View File

@ -14,7 +14,8 @@
#include <stdlib.h>
#include <stdint.h>
typedef struct grib_md5_state {
typedef struct grib_md5_state
{
uint64_t size;
unsigned long words[64];
@ -31,6 +32,6 @@ typedef struct grib_md5_state {
void grib_md5_init(grib_md5_state* s);
void grib_md5_add(grib_md5_state* s, const void* data, size_t len);
void grib_md5_end(grib_md5_state* s, char *digest);
void grib_md5_end(grib_md5_state* s, char* digest);
#endif