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

@ -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

@ -34,7 +34,15 @@
#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"
@ -160,7 +168,8 @@ 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;
@ -436,7 +445,8 @@ grib_handle* grib_handle_new_from_file(grib_context* c, FILE* f, int* error);
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;
@ -494,7 +504,6 @@ grib_handle* grib_handle_new_from_message_copy(grib_context* c, const void* data
grib_handle* grib_handle_new_from_samples(grib_context* c, const char* sample_name);
/**
* Clone an existing handle using the context of the original handle,
* The message is copied and reparsed
@ -1368,7 +1377,8 @@ int grib_read_any_from_file(grib_context *ctx, FILE *f, void *buffer, size_t *le
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;
@ -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 */
@ -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 */
@ -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;
@ -1563,7 +1573,8 @@ int parse_keyval_string(const char *grib_tool, char *arg, int values_required, i
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;

View File

@ -161,7 +161,10 @@
#define ftello ftell
#endif
#define Assert(a) do { if(!(a)) codes_assertion_failed(#a, __FILE__, __LINE__); } while(0)
#define Assert(a) \
do { \
if (!(a)) codes_assertion_failed(#a, __FILE__, __LINE__); \
} while (0)
#ifdef __gnu_hurd__
#define COMPILE_TIME_ASSERT(condition) \
@ -170,7 +173,10 @@
/* Compile time assertion - Thanks to Ralf Holly */
#define COMPILE_TIME_ASSERT(condition) \
do { \
enum { assert_static__ = 1/(condition) }; \
enum \
{ \
assert_static__ = 1 / (condition) \
}; \
} while (0)
#endif
@ -178,7 +184,10 @@
#define DebugAssert(a) Assert(a)
#define DebugAssertAccess(array, index, size) \
do { \
if (!((index) >= 0 && (index) < (size)) ) {printf("ARRAY ACCESS ERROR: array=%s idx=%ld size=%ld @ %s +%d \n", #array, index, size, __FILE__, __LINE__); abort();} \
if (!((index) >= 0 && (index) < (size))) { \
printf("ARRAY ACCESS ERROR: array=%s idx=%ld size=%ld @ %s +%d \n", #array, index, size, __FILE__, __LINE__); \
abort(); \
} \
} while (0)
#else
#define DebugAssert(a)
@ -348,8 +357,8 @@ typedef struct second_order_packed second_order_packed;
typedef void grib_expression_visit_proc(void* udata, grib_expression* e);
struct grib_key_value_list {
struct grib_key_value_list
{
const char* name;
int type;
int size;
@ -363,7 +372,8 @@ struct grib_key_value_list {
};
struct second_order_packed {
struct second_order_packed
{
unsigned long nbits_per_widths;
unsigned long nbits_per_group_size;
size_t size_of_group_array;
@ -379,7 +389,8 @@ struct second_order_packed {
*
* @see grib_action_create_data
*/
struct grib_packer {
struct grib_packer
{
const char* name;
grib_pack_proc pack; /** < packing procedure */
grib_unpack_proc unpack; /** < unpacking procedure */
@ -392,7 +403,8 @@ typedef struct grib_loader grib_loader;
typedef int (*grib_loader_init_accessor_proc)(grib_loader*, grib_accessor*, grib_arguments*);
typedef int (*grib_loader_lookup_long_proc)(grib_context*, grib_loader*, const char* name, long* value);
struct grib_loader {
struct grib_loader
{
void* data;
grib_loader_init_accessor_proc init_accessor;
grib_loader_lookup_long_proc lookup_long;
@ -423,7 +435,8 @@ struct grib_action
typedef struct grib_accessors_list grib_accessors_list;
struct grib_accessors_list {
struct grib_accessors_list
{
grib_accessor* accessor;
int rank;
grib_accessors_list* next;
@ -468,11 +481,9 @@ struct grib_action_class
action_reparse_proc reparse;
action_execute_proc execute;
};
/**
* a buffer
* Structure containing the data of a message
@ -498,7 +509,8 @@ struct grib_buffer
typedef struct grib_virtual_value grib_virtual_value;
struct grib_virtual_value {
struct grib_virtual_value
{
long lval;
double dval;
char* cval;
@ -572,8 +584,8 @@ struct grib_section
};
struct grib_iterator_class{
struct grib_iterator_class
{
grib_iterator_class** super;
char* name;
size_t size;
@ -588,10 +600,10 @@ struct grib_iterator_class{
iterator_previous_proc previous;
iterator_reset_proc reset;
iterator_has_next_proc has_next;
};
struct grib_nearest_class{
struct grib_nearest_class
{
grib_nearest_class** super;
char* name;
size_t size;
@ -605,7 +617,8 @@ struct grib_nearest_class{
nearest_find_proc find;
};
struct grib_box_class{
struct grib_box_class
{
grib_box_class** super;
char* name;
size_t size;
@ -630,7 +643,8 @@ typedef void (*dumper_header_proc) (grib_dumper*,grib_handle*);
typedef void (*dumper_footer_proc)(grib_dumper*, grib_handle*);
typedef void (*dumper_init_class_proc)(grib_dumper_class*);
struct grib_dumper {
struct grib_dumper
{
FILE* out;
unsigned long option_flags;
void* arg;
@ -640,7 +654,8 @@ struct grib_dumper {
grib_dumper_class* cclass;
};
struct grib_dumper_class {
struct grib_dumper_class
{
grib_dumper_class** super;
char* name;
size_t size;
@ -661,7 +676,8 @@ struct grib_dumper_class {
dumper_footer_proc footer;
};
struct grib_iterator{
struct grib_iterator
{
grib_arguments* args; /** args of iterator */
grib_handle* h;
long e; /** current element */
@ -671,7 +687,8 @@ struct grib_iterator{
unsigned long flags;
};
struct grib_nearest{
struct grib_nearest
{
grib_arguments* args; /** args of iterator */
grib_handle* h;
grib_context* context;
@ -679,10 +696,10 @@ struct grib_nearest{
size_t values_count;
grib_nearest_class* cclass;
unsigned long flags;
};
struct grib_box {
struct grib_box
{
grib_box_class* cclass;
grib_context* context;
grib_arguments* args;
@ -691,7 +708,8 @@ struct grib_box {
grib_points* points;
};
struct grib_dependency {
struct grib_dependency
{
grib_dependency* next;
grib_accessor* observed;
grib_accessor* observer;
@ -711,7 +729,8 @@ typedef struct grib_trie_with_rank grib_trie_with_rank;
typedef struct grib_itrie grib_itrie;
struct grib_sarray {
struct grib_sarray
{
char** v;
size_t size;
size_t n;
@ -719,7 +738,8 @@ struct grib_sarray {
grib_context* context;
};
struct grib_oarray {
struct grib_oarray
{
void** v;
size_t size;
size_t n;
@ -727,7 +747,8 @@ struct grib_oarray {
grib_context* context;
};
struct grib_darray {
struct grib_darray
{
double* v;
size_t size;
size_t n;
@ -735,7 +756,8 @@ struct grib_darray {
grib_context* context;
};
struct grib_iarray {
struct grib_iarray
{
long* v;
size_t size;
size_t n;
@ -744,7 +766,8 @@ struct grib_iarray {
grib_context* context;
};
struct grib_vdarray {
struct grib_vdarray
{
grib_darray** v;
size_t size;
size_t n;
@ -752,7 +775,8 @@ struct grib_vdarray {
grib_context* context;
};
struct grib_vsarray {
struct grib_vsarray
{
grib_sarray** v;
size_t size;
size_t n;
@ -760,7 +784,8 @@ struct grib_vsarray {
grib_context* context;
};
struct grib_viarray {
struct grib_viarray
{
grib_iarray** v;
size_t size;
size_t n;
@ -779,7 +804,8 @@ struct grib_viarray {
#define BUFR_DESCRIPTOR_TYPE_OPERATOR 7
#define BUFR_DESCRIPTOR_TYPE_SEQUENCE 8
struct bufr_descriptor {
struct bufr_descriptor
{
grib_context* context;
long code;
int F;
@ -797,7 +823,8 @@ struct bufr_descriptor {
grib_accessor* a;
};
struct bufr_descriptors_array {
struct bufr_descriptors_array
{
bufr_descriptor** v;
size_t size;
size_t n;
@ -806,7 +833,8 @@ struct bufr_descriptors_array {
grib_context* context;
};
struct bufr_descriptors_map_list {
struct bufr_descriptors_map_list
{
bufr_descriptors_array* unexpanded;
bufr_descriptors_array* expanded;
bufr_descriptors_map_list* next;
@ -814,13 +842,15 @@ struct bufr_descriptors_map_list {
/* BUFR: Operator 203YYY: Linked list storing Table B changed reference values */
typedef struct bufr_tableb_override bufr_tableb_override;
struct bufr_tableb_override {
struct bufr_tableb_override
{
bufr_tableb_override* next;
int code;
long new_ref_val;
};
struct codes_condition {
struct codes_condition
{
char* left;
int rightType;
char* rightString;
@ -869,7 +899,8 @@ struct grib_handle
grib_trie* bufr_elements_table;
};
struct grib_multi_handle {
struct grib_multi_handle
{
grib_context* context; /** < context attached to this handle */
grib_buffer* buffer; /** < buffer attached to the handle */
size_t offset;
@ -940,7 +971,8 @@ struct grib_accessor_class
typedef struct grib_multi_support grib_multi_support;
struct grib_multi_support {
struct grib_multi_support
{
FILE* file;
size_t offset;
unsigned char* message;
@ -956,7 +988,8 @@ struct grib_multi_support {
/* Hash_array */
typedef struct grib_hash_array_value grib_hash_array_value;
struct grib_hash_array_value {
struct grib_hash_array_value
{
grib_hash_array_value* next;
char* name;
int type;
@ -968,7 +1001,8 @@ struct grib_hash_array_value {
/* Concepts */
typedef struct grib_concept_condition grib_concept_condition;
struct grib_concept_condition {
struct grib_concept_condition
{
grib_concept_condition* next;
char* name;
grib_expression* expression;
@ -976,14 +1010,16 @@ struct grib_concept_condition {
};
typedef struct grib_concept_value_name grib_concept_value_name;
struct grib_concept_value_name {
struct grib_concept_value_name
{
grib_concept_value_name* next;
char* name;
};
typedef struct grib_concept_value grib_concept_value;
struct grib_concept_value {
struct grib_concept_value
{
grib_concept_value* next;
char* name;
grib_concept_condition* conditions;
@ -1067,7 +1103,6 @@ struct grib_context
#elif GRIB_OMP_THREADS
omp_nest_lock_t mutex;
#endif
};
/* expression*/
@ -1088,11 +1123,13 @@ typedef void (*expression_destroy_proc) (grib_context*,grib_expression*e)
typedef int (*expression_native_type_proc)(grib_expression*, grib_handle*);
struct grib_expression {
struct grib_expression
{
grib_expression_class* cclass;
};
struct grib_expression_class {
struct grib_expression_class
{
grib_expression_class** super;
const char* name;
size_t size;
@ -1115,7 +1152,8 @@ struct grib_expression_class {
};
struct grib_arguments {
struct grib_arguments
{
struct grib_arguments* next;
grib_expression* expression;
char value[80];
@ -1136,7 +1174,8 @@ extern grib_string_list grib_file_not_found;
typedef struct grib_file grib_file;
typedef struct grib_file_pool grib_file_pool;
struct grib_file {
struct grib_file
{
grib_context* context;
char* name;
FILE* handle;
@ -1147,7 +1186,8 @@ struct grib_file {
short id;
};
struct grib_file_pool {
struct grib_file_pool
{
grib_context* context;
grib_file* first;
grib_file* current;
@ -1162,12 +1202,14 @@ typedef struct grib_column grib_column;
typedef struct grib_fields grib_fields;
typedef struct grib_int_array grib_int_array;
struct grib_where {
struct grib_where
{
grib_context* context;
char* string;
};
struct grib_column {
struct grib_column
{
grib_context* context;
int refcount;
char* name;
@ -1180,7 +1222,8 @@ struct grib_column {
int* errors;
};
struct grib_order_by {
struct grib_order_by
{
char* key;
int idkey;
int mode;
@ -1188,28 +1231,32 @@ struct grib_order_by {
};
#ifdef NEWDB
struct grib_query {
struct grib_query
{
grib_context* context;
char* where_string;
grib_order_by* order_by;
};
#endif
struct grib_field {
struct grib_field
{
grib_file* file;
off_t offset;
long length;
grib_field* next;
};
struct grib_int_array {
struct grib_int_array
{
grib_context* context;
size_t size;
int* el;
};
#ifndef NEWDB
struct grib_fieldset {
struct grib_fieldset
{
grib_context* context;
grib_int_array* filter;
grib_int_array* order;
@ -1226,7 +1273,8 @@ struct grib_fieldset {
#ifdef NEWDB
/* grib db */
struct grib_db {
struct grib_db
{
grib_context* context;
size_t size;
size_t fields_array_size;
@ -1235,7 +1283,8 @@ struct grib_db {
grib_field** fields;
};
struct grib_fieldset {
struct grib_fieldset
{
grib_context* context;
grib_db* db;
grib_int_array* filter;
@ -1254,26 +1303,30 @@ typedef struct grib_conditions_tree grib_conditions_tree;
typedef struct grib_concept_entry grib_concept_entry;
typedef struct grib_concept_key grib_concept_key;
struct grib_concept_index_entry {
struct grib_concept_index_entry
{
char* name;
char* value;
int type;
grib_concept_entry* next;
};
struct grib_concept_index_key {
struct grib_concept_index_key
{
char* name;
int type;
grib_concept_key* next;
};
struct grib_concept_index {
struct grib_concept_index
{
grib_context* context;
grib_concept_key* keys;
grib_conditions_tree* conditions;
};
struct grib_conditions_tree {
struct grib_conditions_tree
{
char* value;
void* object;
grib_conditions_tree* next;
@ -1291,7 +1344,8 @@ extern FILE* codes_memfs_open(const char* path);
typedef struct grib_field_tree grib_field_tree;
struct grib_field_tree {
struct grib_field_tree
{
grib_field* field;
char* value;
grib_field_tree* next;
@ -1300,7 +1354,8 @@ struct grib_field_tree {
typedef struct grib_index_key grib_index_key;
struct grib_index_key {
struct grib_index_key
{
char* name;
int type;
char value[STRING_VALUE_LEN];
@ -1312,13 +1367,15 @@ struct grib_index_key {
};
typedef struct grib_field_list grib_field_list;
struct grib_field_list {
struct grib_field_list
{
grib_field* field;
grib_field_list* next;
};
struct grib_index {
struct grib_index
{
grib_context* context;
grib_index_key* keys;
int rewind;
@ -1334,7 +1391,8 @@ struct grib_index {
/* header compute */
typedef struct grib_math grib_math;
struct grib_math{
struct grib_math
{
struct grib_math* left;
struct grib_math* right;
char* name;
@ -1344,7 +1402,8 @@ struct grib_math{
typedef double (*mathproc)(void);
typedef int (*funcproc)(grib_math*, mathproc);
typedef struct func {
typedef struct func
{
char* name;
funcproc addr;
mathproc proc;
@ -1367,7 +1426,8 @@ struct grib_action_file_list
};
/* Common keys iterator */
struct grib_keys_iterator{
struct grib_keys_iterator
{
grib_handle* handle;
unsigned long filter_flags; /** flags to filter out accessors */
unsigned long accessor_flags_skip;
@ -1382,7 +1442,8 @@ struct grib_keys_iterator{
};
/* BUFR-specific keys iterator */
struct bufr_keys_iterator{
struct bufr_keys_iterator
{
grib_handle* handle;
unsigned long filter_flags; /** flags to filter out accessors */
unsigned long accessor_flags_skip;
@ -1401,7 +1462,8 @@ struct bufr_keys_iterator{
/* md5 */
typedef unsigned long cvs_uint32;
struct cvs_MD5Context {
struct cvs_MD5Context
{
cvs_uint32 buf[4];
cvs_uint32 bits[2];
unsigned char in[64];
@ -1410,7 +1472,8 @@ struct cvs_MD5Context {
typedef struct grib_rule_entry grib_rule_entry;
struct grib_rule_entry {
struct grib_rule_entry
{
grib_rule_entry* next;
char* name;
grib_expression* value;
@ -1418,7 +1481,8 @@ struct grib_rule_entry {
typedef struct grib_rule grib_rule;
struct grib_rule {
struct grib_rule
{
grib_rule* next;
grib_expression* condition;
grib_rule_entry* entries;
@ -1426,7 +1490,8 @@ struct grib_rule {
typedef struct grib_case grib_case;
struct grib_case {
struct grib_case
{
grib_arguments* values;
grib_action* action;
grib_case* next;
@ -1434,13 +1499,15 @@ struct grib_case {
/* ----------*/
typedef struct code_table_entry {
typedef struct code_table_entry
{
char* abbreviation;
char* title;
char* units;
} code_table_entry;
struct grib_codetable {
struct grib_codetable
{
char* filename[2];
char* recomposed_name[2];
grib_codetable* next;
@ -1448,13 +1515,15 @@ struct grib_codetable {
code_table_entry entries[1];
};
typedef struct grib_smart_table_entry {
typedef struct grib_smart_table_entry
{
/*int code;*/
char* abbreviation;
char* column[MAX_SMART_TABLE_COLUMNS];
} grib_smart_table_entry;
struct grib_smart_table {
struct grib_smart_table
{
char* filename[3];
char* recomposed_name[3];
grib_smart_table* next;
@ -1464,8 +1533,8 @@ struct grib_smart_table {
#if GRIB_TIMER
typedef struct grib_timer {
typedef struct grib_timer
{
struct timeval start_;
double timer_;
int active_;
@ -1483,13 +1552,14 @@ typedef struct grib_timer {
struct grib_timer* next_;
} grib_timer;
#else
typedef struct grib_timer {
typedef struct grib_timer
{
char nothing;
} grib_timer;
#endif
typedef struct j2k_encode_helper {
typedef struct j2k_encode_helper
{
size_t buffer_size;
long width;

View File

@ -11,4 +11,3 @@
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];