Fortran: Only single underscore methods should be used

This commit is contained in:
Shahram Najm 2023-12-28 16:58:40 +00:00
parent ab0c9dd71e
commit afc43e9973
1 changed files with 3 additions and 343 deletions

View File

@ -856,9 +856,6 @@ int grib_f_read_any_headers_only_from_file_(int* fid, char* buffer, size_t* nbyt
return GRIB_INVALID_FILE;
}
}
int grib_f_read_any_headers_only_from_file(int* fid, char* buffer, size_t* nbytes) {
return grib_f_read_any_headers_only_from_file_(fid,buffer,nbytes);
}
/*****************************************************************************/
int grib_f_read_any_from_file_(int* fid, void* buffer, size_t* nbytes) {
@ -874,9 +871,6 @@ int grib_f_read_any_from_file_(int* fid, void* buffer, size_t* nbytes) {
return GRIB_INVALID_FILE;
}
}
int grib_f_read_any_from_file(int* fid, void* buffer, size_t* nbytes) {
return grib_f_read_any_from_file_(fid,buffer,nbytes);
}
/*****************************************************************************/
int grib_f_write_file_(int* fid, void* buffer, size_t* nbytes) {
@ -896,9 +890,6 @@ int grib_f_write_file_(int* fid, void* buffer, size_t* nbytes) {
return GRIB_INVALID_FILE;
}
}
int grib_f_write_file(int* fid, void* buffer, size_t* nbytes) {
return grib_f_write_file_(fid,buffer,nbytes);
}
/*****************************************************************************/
int grib_f_read_file_(int* fid, void* buffer, size_t* nbytes) {
@ -918,9 +909,6 @@ int grib_f_read_file_(int* fid, void* buffer, size_t* nbytes) {
return GRIB_INVALID_FILE;
}
}
int grib_f_read_file(int* fid, void* buffer, size_t* nbytes) {
return grib_f_read_file_(fid,buffer,nbytes);
}
/*****************************************************************************/
int grib_f_open_file_(int* fid, char* name , char* op, int lname, int lop) {
@ -968,17 +956,11 @@ int grib_f_open_file_(int* fid, char* name , char* op, int lname, int lop) {
}
return ret;
}
int grib_f_open_file(int* fid, char* name , char* op, int lname, int lop){
return grib_f_open_file_(fid, name, op, lname, lop);
}
/*****************************************************************************/
int grib_f_close_file_(int* fid){
return clear_file(*fid);
}
int grib_f_close_file(int* fid){
return grib_f_close_file_(fid);
}
/*****************************************************************************/
static int file_count=0;
@ -1009,17 +991,11 @@ int grib_f_multi_support_on_(){
grib_multi_support_on(0);
return GRIB_SUCCESS;
}
int grib_f_multi_support_on(){
return grib_f_multi_support_on_();
}
int grib_f_multi_support_off_(){
grib_multi_support_off(0);
return GRIB_SUCCESS;
}
int grib_f_multi_support_off(){
return grib_f_multi_support_off_();
}
/*****************************************************************************/
#ifdef FORTRAN_GEOITERATOR_SUPPORT
@ -1136,25 +1112,16 @@ int grib_f_iterator_new_(int* gid,int* iterid,int* mode) {
GRIB_MUTEX_UNLOCK(&iterator_mutex)
return ret;
}
int grib_f_iterator_new(int* gid,int* iterid,int* mode) {
return grib_f_iterator_new_(gid,iterid,mode);
}
/*****************************************************************************/
int grib_f_iterator_next_(int* iterid,double* lat,double* lon,double* value) {
grib_iterator* iter=get_iterator(*iterid);
if (!iter) return GRIB_INVALID_ITERATOR;
return grib_iterator_next(iter,lat,lon,value);
}
int grib_f_iterator_next(int* iterid,double* lat,double* lon,double* value) {
return grib_f_iterator_next_(iterid,lat,lon,value);
}
/*****************************************************************************/
int grib_f_iterator_delete_(int* iterid) {
return clear_iterator(*iterid);
}
int grib_f_iterator_delete(int* iterid) {
return grib_f_iterator_delete_(iterid);
}
#endif /*FORTRAN_GEOITERATOR_SUPPORT*/
/*****************************************************************************/
@ -1208,10 +1175,6 @@ int grib_f_gribex_mode_off_() {
grib_gribex_mode_off(0);
return GRIB_SUCCESS;
}
int grib_f_gribex_mode_off() {
grib_gribex_mode_off(0);
return GRIB_SUCCESS;
}
/*****************************************************************************/
int grib_f_skip_computed_(int* iterid) {
@ -1219,54 +1182,36 @@ int grib_f_skip_computed_(int* iterid) {
if (!iter) return GRIB_INVALID_KEYS_ITERATOR;
return grib_keys_iterator_set_flags(iter,GRIB_KEYS_ITERATOR_SKIP_COMPUTED);
}
int grib_f_skip_computed(int* iterid) {
return grib_f_skip_computed_(iterid);
}
int grib_f_skip_coded_(int* iterid) {
grib_keys_iterator* iter=get_keys_iterator(*iterid);
if (!iter) return GRIB_INVALID_KEYS_ITERATOR;
return grib_keys_iterator_set_flags(iter,GRIB_KEYS_ITERATOR_SKIP_CODED);
}
int grib_f_skip_coded(int* iterid) {
return grib_f_skip_coded_(iterid);
}
int grib_f_skip_edition_specific_(int* iterid) {
grib_keys_iterator* iter=get_keys_iterator(*iterid);
if (!iter) return GRIB_INVALID_KEYS_ITERATOR;
return grib_keys_iterator_set_flags(iter,GRIB_KEYS_ITERATOR_SKIP_EDITION_SPECIFIC);
}
int grib_f_skip_edition_specific(int* iterid) {
return grib_f_skip_edition_specific_(iterid);
}
int grib_f_skip_duplicates_(int* iterid) {
grib_keys_iterator* iter=get_keys_iterator(*iterid);
if (!iter) return GRIB_INVALID_KEYS_ITERATOR;
return grib_keys_iterator_set_flags(iter,GRIB_KEYS_ITERATOR_SKIP_DUPLICATES);
}
int grib_f_skip_duplicates(int* iterid) {
return grib_f_skip_duplicates_(iterid);
}
int grib_f_skip_read_only_(int* iterid) {
grib_keys_iterator* iter=get_keys_iterator(*iterid);
if (!iter) return GRIB_INVALID_KEYS_ITERATOR;
return grib_keys_iterator_set_flags(iter,GRIB_KEYS_ITERATOR_SKIP_READ_ONLY);
}
int grib_f_skip_read_only(int* iterid) {
return grib_f_skip_read_only_(iterid);
}
int grib_f_skip_function_(int* iterid) {
grib_keys_iterator* iter=get_keys_iterator(*iterid);
if (!iter) return GRIB_INVALID_KEYS_ITERATOR;
return grib_keys_iterator_set_flags(iter,GRIB_KEYS_ITERATOR_SKIP_FUNCTION);
}
int grib_f_skip_function(int* iterid) {
return grib_f_skip_function_(iterid);
}
/*****************************************************************************/
int grib_f_keys_iterator_get_name_(int* iterid,char* name,int len) {
@ -1289,9 +1234,6 @@ int grib_f_keys_iterator_get_name_(int* iterid,char* name,int len) {
return 0;
}
int grib_f_keys_iterator_get_name(int* kiter,char* name,int len) {
return grib_f_keys_iterator_get_name_(kiter,name,len);
}
/*****************************************************************************/
int grib_f_keys_iterator_rewind_(int* kiter) {
@ -1300,9 +1242,6 @@ int grib_f_keys_iterator_rewind_(int* kiter) {
if (!i) return GRIB_INVALID_KEYS_ITERATOR;
return grib_keys_iterator_rewind(i);
}
int grib_f_keys_iterator_rewind(int* kiter) {
return grib_f_keys_iterator_rewind_(kiter);
}
/* BUFR keys iterator */
/*****************************************************************************/
@ -1332,9 +1271,6 @@ int codes_f_bufr_keys_iterator_new_(int* gid,int* iterid) {
GRIB_MUTEX_UNLOCK(&keys_iterator_mutex)
return ret;
}
int codes_f_bufr_keys_iterator_new(int* gid,int* iterid) {
return codes_f_bufr_keys_iterator_new_(gid,iterid);
}
/*****************************************************************************/
int codes_f_bufr_keys_iterator_next_(int* iterid) {
bufr_keys_iterator* iter=get_bufr_keys_iterator(*iterid);
@ -1342,9 +1278,7 @@ int codes_f_bufr_keys_iterator_next_(int* iterid) {
return codes_bufr_keys_iterator_next(iter);
}
int codes_f_bufr_keys_iterator_next(int* iterid) {
return codes_f_bufr_keys_iterator_next_(iterid);
}
/*****************************************************************************/
int codes_f_bufr_keys_iterator_get_name_(int* iterid,char* name,int len) {
size_t lsize=len;
@ -1366,9 +1300,6 @@ int codes_f_bufr_keys_iterator_get_name_(int* iterid,char* name,int len) {
return 0;
}
int codes_f_bufr_keys_iterator_get_name(int* kiter,char* name,int len) {
return codes_f_bufr_keys_iterator_get_name_(kiter,name,len);
}
/*****************************************************************************/
int codes_f_bufr_keys_iterator_rewind_(int* kiter) {
bufr_keys_iterator* i=get_bufr_keys_iterator(*kiter);
@ -1376,16 +1307,11 @@ int codes_f_bufr_keys_iterator_rewind_(int* kiter) {
if (!i) return GRIB_INVALID_KEYS_ITERATOR;
return codes_bufr_keys_iterator_rewind(i);
}
int codes_f_bufr_keys_iterator_rewind(int* kiter) {
return codes_f_bufr_keys_iterator_rewind_(kiter);
}
/*****************************************************************************/
int codes_f_bufr_keys_iterator_delete_(int* iterid) {
return clear_bufr_keys_iterator(*iterid);
}
int codes_f_bufr_keys_iterator_delete(int* iterid) {
return codes_f_bufr_keys_iterator_delete_(iterid);
}
/*****************************************************************************/
int grib_f_new_from_message_(int* gid, void* buffer, size_t* bufsize) {
@ -1398,18 +1324,12 @@ int grib_f_new_from_message_(int* gid, void* buffer, size_t* bufsize) {
*gid = -1;
return GRIB_INTERNAL_ERROR;
}
int grib_f_new_from_message(int* gid, void* buffer, size_t* bufsize){
return grib_f_new_from_message_(gid, buffer, bufsize);
}
/* See SUP-3893: Need to provide an 'int' version */
int grib_f_new_from_message_int_(int* gid, int* buffer , size_t* bufsize) {
/* Call the version with void pointer */
return grib_f_new_from_message_(gid, (void*)buffer, bufsize);
}
int grib_f_new_from_message_int(int* gid, int* buffer, size_t* bufsize){
return grib_f_new_from_message_int_(gid, buffer, bufsize);
}
/*****************************************************************************/
int grib_f_new_from_message_copy_(int* gid, void* buffer, size_t* bufsize){
grib_handle *h = NULL;
@ -1421,9 +1341,6 @@ int grib_f_new_from_message_copy_(int* gid, void* buffer, size_t* bufsize){
*gid = -1;
return GRIB_INTERNAL_ERROR;
}
int grib_f_new_from_message_copy(int* gid, void* buffer, size_t* bufsize){
return grib_f_new_from_message_copy_(gid, buffer, bufsize);
}
/*****************************************************************************/
int grib_f_new_from_samples_(int* gid, char* name, int lname){
@ -1438,9 +1355,6 @@ int grib_f_new_from_samples_(int* gid, char* name, int lname){
*gid = -1;
return GRIB_FILE_NOT_FOUND;
}
int grib_f_new_from_samples(int* gid, char* name , int lname){
return grib_f_new_from_samples_(gid, name, lname);
}
/*****************************************************************************/
int codes_bufr_f_new_from_samples_(int* gid, char* name, int lname){
@ -1455,9 +1369,6 @@ int codes_bufr_f_new_from_samples_(int* gid, char* name, int lname){
*gid = -1;
return GRIB_FILE_NOT_FOUND;
}
int codes_bufr_f_new_from_samples(int* gid, char* name, int lname){
return codes_bufr_f_new_from_samples_(gid, name, lname);
}
/*****************************************************************************/
int grib_f_clone_(int* gidsrc,int* giddest){
@ -1475,9 +1386,6 @@ int grib_f_clone_(int* gidsrc,int* giddest){
*giddest = -1;
return GRIB_INVALID_GRIB;
}
int grib_f_clone(int* gidsrc,int* giddest){
return grib_f_clone_(gidsrc, giddest);
}
/*****************************************************************************/
int grib_f_copy_key_(int* gidsrc, char* key, int* giddest, int len)
@ -1494,9 +1402,7 @@ int grib_f_copy_key_(int* gidsrc, char* key, int* giddest, int len)
return GRIB_INVALID_GRIB;
}
int grib_f_copy_key(int* gidsrc, char* name, int* giddest, int len){
return grib_f_copy_key_(gidsrc, name, giddest, len);
}
/*****************************************************************************/
int grib_f_util_sections_copy_(int* gidfrom,int* gidto,int* what,int *gidout){
int err=0;
@ -1512,9 +1418,6 @@ int grib_f_util_sections_copy_(int* gidfrom,int* gidto,int* what,int *gidout){
return err;
}
int grib_f_util_sections_copy(int* gidfrom,int* gidto,int* what,int *gidout){
return grib_f_util_sections_copy_(gidfrom,gidto,what,gidout);
}
/*****************************************************************************/
int grib_f_copy_namespace_(int* gidsrc,char* name,int* giddest,int len){
@ -1527,9 +1430,6 @@ int grib_f_copy_namespace_(int* gidsrc,char* name,int* giddest,int len){
return GRIB_INVALID_GRIB;
}
int grib_f_copy_namespace(int* gidsrc,char* name,int* giddest,int len){
return grib_f_copy_namespace_(gidsrc,name,giddest,len);
}
/*****************************************************************************/
int any_f_scan_file(int* fid,int* n) {
@ -1777,9 +1677,6 @@ int grib_f_headers_only_new_from_file_(int* fid, int* gid){
*gid=-1;
return GRIB_INVALID_FILE;
}
int grib_f_headers_only_new_from_file(int* fid, int* gid){
return grib_f_headers_only_new_from_file_( fid, gid);
}
/*****************************************************************************/
int grib_f_new_from_index_(int* iid, int* gid){
@ -1802,9 +1699,6 @@ int grib_f_new_from_index_(int* iid, int* gid){
*gid=-1;
return GRIB_INVALID_INDEX;
}
int grib_f_new_from_index(int* iid, int* gid){
return grib_f_new_from_index_(iid,gid);
}
/*****************************************************************************/
int grib_f_index_new_from_file_(char* file ,char* keys ,int* gid, int lfile, int lkeys){
@ -1829,9 +1723,6 @@ int grib_f_index_new_from_file_(char* file ,char* keys ,int* gid, int lfile, int
*gid=-1;
return GRIB_INVALID_FILE;
}
int grib_f_index_new_from_file(char* file, char* keys, int* gid, int lfile, int lkeys){
return grib_f_index_new_from_file_(file ,keys ,gid, lfile, lkeys);
}
/*****************************************************************************/
int grib_f_index_add_file_(int* iid, char* file, int lfile) {
@ -1846,9 +1737,6 @@ int grib_f_index_add_file_(int* iid, char* file, int lfile) {
return err;
}
}
int grib_f_index_add_file(int* iid, char* file, int lfile) {
return grib_f_index_add_file_(iid,file,lfile);
}
/*****************************************************************************/
int grib_f_index_read_(char* file, int* gid, int lfile) {
@ -1871,9 +1759,6 @@ int grib_f_index_read_(char* file, int* gid, int lfile) {
*gid=-1;
return GRIB_INVALID_FILE;
}
int grib_f_index_read(char* file, int* gid, int lfile) {
return grib_f_index_read_(file,gid,lfile);
}
/*****************************************************************************/
int grib_f_index_write_(int* gid, char* file, int lfile) {
@ -1888,31 +1773,19 @@ int grib_f_index_write_(int* gid, char* file, int lfile) {
return err;
}
}
int grib_f_index_write(int* gid, char* file, int lfile) {
return grib_f_index_write_(gid,file,lfile);
}
/*****************************************************************************/
int grib_f_index_release_(int* hid){
return clear_index(*hid);
}
int grib_f_index_release(int* hid){
return grib_f_index_release_(hid);
}
int grib_f_multi_handle_release_(int* hid){
return clear_multi_handle(*hid);
}
int grib_f_multi_handle_release(int* hid){
return grib_f_multi_handle_release_(hid);
}
int grib_f_release_(int* hid){
return clear_handle(*hid);
}
int grib_f_release(int* hid){
return grib_f_release_( hid);
}
/*****************************************************************************/
static void do_the_dump(grib_handle* h)
@ -1946,9 +1819,6 @@ int grib_f_dump_(int* gid){
return GRIB_SUCCESS;
}
int grib_f_dump(int* gid){
return grib_f_dump_( gid);
}
/*****************************************************************************/
#ifdef USE_GRIB_PRINT
@ -1967,9 +1837,6 @@ int grib_f_print_(int* gid, char* key, int len){
return err;
}
}
int grib_f_print(int* gid, char* key, int len){
return grib_f_print_(gid, key, len);
}
#endif
/*****************************************************************************/
int grib_f_get_error_string_(int* err, char* buf, int len){
@ -1979,18 +1846,12 @@ int grib_f_get_error_string_(int* err, char* buf, int len){
strncpy(buf, err_msg, (size_t)erlen); /* ECC-1488 */
return GRIB_SUCCESS;
}
int grib_f_get_error_string(int* err, char* buf, int len){
return grib_f_get_error_string_(err, buf, len);
}
/*****************************************************************************/
int grib_f_get_api_version_(int* apiVersion,int len){
*apiVersion = grib_get_api_version();
return GRIB_SUCCESS;
}
int grib_f_get_api_version(int* apiVersion, int len){
return grib_f_get_api_version_(apiVersion, len);
}
/*****************************************************************************/
int grib_f_get_size_int_(int* gid, char* key, int* val, int len){
@ -2007,9 +1868,6 @@ int grib_f_get_size_int_(int* gid, char* key, int* val, int len){
return err;
}
}
int grib_f_get_size_int(int* gid, char* key, int* val, int len){
return grib_f_get_size_int_( gid, key, val, len);
}
int grib_f_get_size_long_(int* gid, char* key, long* val, int len){
grib_handle *h = get_handle(*gid);
@ -2025,9 +1883,6 @@ int grib_f_get_size_long_(int* gid, char* key, long* val, int len){
return err;
}
}
int grib_f_get_size_long(int* gid, char* key, long* val, int len){
return grib_f_get_size_long_( gid, key, val, len);
}
int grib_f_index_get_size_int_(int* gid, char* key, int* val, int len){
grib_index *h = get_index(*gid);
@ -2043,9 +1898,6 @@ int grib_f_index_get_size_int_(int* gid, char* key, int* val, int len){
return err;
}
}
int grib_f_index_get_size_int(int* gid, char* key, int* val, int len){
return grib_f_index_get_size_int_( gid, key, val, len);
}
int grib_f_index_get_size_long_(int* gid, char* key, long* val, int len){
grib_index *h = get_index(*gid);
@ -2061,9 +1913,6 @@ int grib_f_index_get_size_long_(int* gid, char* key, long* val, int len){
return err;
}
}
int grib_f_index_get_size_long(int* gid, char* key, long* val, int len){
return grib_f_index_get_size_long_( gid, key, val, len);
}
int grib_f_get_int_(int* gid, char* key, int* val, int len){
grib_handle *h = get_handle(*gid);
@ -2076,9 +1925,6 @@ int grib_f_get_int_(int* gid, char* key, int* val, int len){
*val = long_val;
return err;
}
int grib_f_get_int(int* gid, char* key, int* val, int len){
return grib_f_get_int_( gid, key, val, len);
}
int grib_f_get_long_(int* gid, char* key, long* val, int len){
grib_handle *h = get_handle(*gid);
@ -2089,9 +1935,6 @@ int grib_f_get_long_(int* gid, char* key, long* val, int len){
err = grib_get_long(h, cast_char(buf,key,len),val);
return err;
}
int grib_f_get_long(int* gid, char* key, long* val, int len){
return grib_f_get_long_( gid, key, val, len);
}
/*****************************************************************************/
int grib_f_get_native_type_(int* gid, char* key, int* val, int len){
@ -2105,9 +1948,6 @@ int grib_f_get_native_type_(int* gid, char* key, int* val, int len){
*val = type_val;
return err;
}
int grib_f_get_native_type(int* gid, char* key, int* val, int len){
return grib_f_get_native_type_( gid, key, val, len);
}
/*****************************************************************************/
int grib_f_get_int_array_(int* gid, char* key, int *val, int* size, int len){
@ -2140,9 +1980,6 @@ int grib_f_get_int_array_(int* gid, char* key, int *val, int* size, int len){
grib_context_free(h->context,long_val);
return err;
}
int grib_f_get_int_array(int* gid, char* key, int*val, int* size, int len){
return grib_f_get_int_array_( gid, key, val, size, len);
}
/*****************************************************************************/
int grib_f_get_long_array_(int* gid, char* key, long *val, int* size, int len){
@ -2158,9 +1995,6 @@ int grib_f_get_long_array_(int* gid, char* key, long *val, int* size, int len){
return err;
}
int grib_f_get_long_array(int* gid, char* key, long *val, int* size, int len){
return grib_f_get_long_array_( gid, key, val, size, len);
}
/*****************************************************************************/
int grib_f_get_byte_array_(int* gid, char* key, unsigned char *val, int* size, int len, int lenv){
@ -2177,9 +2011,6 @@ int grib_f_get_byte_array_(int* gid, char* key, unsigned char *val, int* size, i
return err;
}
int grib_f_get_byte_array(int* gid, char* key, unsigned char *val, int* size, int len, int lenv){
return grib_f_get_byte_array_( gid, key, val, size, len, lenv);
}
/*****************************************************************************/
int grib_f_index_get_string_(int* gid, char* key, char* val, int *eachsize,int* size, int len){
@ -2220,9 +2051,6 @@ int grib_f_index_get_string_(int* gid, char* key, char* val, int *eachsize,int*
return err;
}
int grib_f_index_get_string(int* gid, char* key, char* val, int* eachsize, int* size, int len){
return grib_f_index_get_string_(gid,key,val,eachsize,size,len);
}
/*****************************************************************************/
int grib_f_index_get_long_(int* gid, char* key, long *val, int* size, int len){
@ -2237,9 +2065,6 @@ int grib_f_index_get_long_(int* gid, char* key, long *val, int* size, int len){
*size = lsize;
return err;
}
int grib_f_index_get_long(int* gid, char* key, long *val, int* size, int len){
return grib_f_index_get_long_(gid,key,val,size,len);
}
/*****************************************************************************/
int grib_f_index_get_int_(int* gid, char* key, int *val, int* size, int len){
@ -2263,9 +2088,6 @@ int grib_f_index_get_int_(int* gid, char* key, int *val, int* size, int len){
grib_context_free(h->context, lval);
return err;
}
int grib_f_index_get_int(int* gid, char* key, int *val, int* size, int len){
return grib_f_index_get_int_(gid,key,val,size,len);
}
/*****************************************************************************/
int grib_f_index_get_real8_(int* gid, char* key, double *val, int* size, int len){
@ -2280,9 +2102,6 @@ int grib_f_index_get_real8_(int* gid, char* key, double *val, int* size, int len
*size = lsize;
return err;
}
int grib_f_index_get_real8(int* gid, char* key, double *val, int* size, int len){
return grib_f_index_get_real8_(gid,key,val,size,len);
}
/*****************************************************************************/
int grib_f_set_int_array_(int* gid, char* key, int* val, int* size, int len){
@ -2314,9 +2133,6 @@ int grib_f_set_int_array_(int* gid, char* key, int* val, int* size, int len){
grib_context_free(h->context,long_val);
return err;
}
int grib_f_set_int_array(int* gid, char* key, int* val, int* size, int len){
return grib_f_set_int_array_( gid, key, val, size, len);
}
/*****************************************************************************/
int grib_f_set_long_array_(int* gid, char* key, long* val, int* size, int len){
@ -2328,9 +2144,6 @@ int grib_f_set_long_array_(int* gid, char* key, long* val, int* size, int len){
return grib_set_long_array(h, cast_char(buf,key,len), val, lsize);
}
int grib_f_set_long_array(int* gid, char* key, long* val, int* size, int len){
return grib_f_set_long_array_( gid, key, val, size, len);
}
/*****************************************************************************/
int grib_f_set_byte_array_(int* gid, char* key, unsigned char* val, int* size, int len, int lenv){
@ -2346,9 +2159,6 @@ int grib_f_set_byte_array_(int* gid, char* key, unsigned char* val, int* size, i
return err;
}
int grib_f_set_byte_array(int* gid, char* key, unsigned char* val, int* size, int len, int lenv){
return grib_f_set_byte_array_( gid, key, val, size, len, lenv);
}
/*****************************************************************************/
int grib_f_set_int_(int* gid, char* key, int* val, int len){
@ -2358,9 +2168,6 @@ int grib_f_set_int_(int* gid, char* key, int* val, int len){
if(!h) return GRIB_INVALID_GRIB;
return grib_set_long(h, cast_char(buf,key,len), long_val);
}
int grib_f_set_int(int* gid, char* key, int* val, int len){
return grib_f_set_int_( gid, key, val, len);
}
int grib_f_set_long_(int* gid, char* key, long* val, int len){
grib_handle *h = get_handle(*gid);
@ -2368,9 +2175,6 @@ int grib_f_set_long_(int* gid, char* key, long* val, int len){
if(!h) return GRIB_INVALID_GRIB;
return grib_set_long(h, cast_char(buf,key,len), *val);
}
int grib_f_set_long(int* gid, char* key, long* val, int len){
return grib_f_set_long_( gid, key, val, len);
}
/*****************************************************************************/
int grib_f_set_missing_(int* gid, char* key,int len){
@ -2394,9 +2198,6 @@ int grib_f_is_missing_(int* gid, char* key,int* isMissing,int len){
*isMissing=grib_is_missing(h, cast_char(buf,key,len),&err);
return err;
}
int grib_f_is_missing(int* gid, char* key,int* isMissing,int len){
return grib_f_is_missing_(gid,key,isMissing,len);
}
/*****************************************************************************/
int grib_f_is_defined_(int* gid, char* key,int* isDefined,int len){
@ -2407,9 +2208,6 @@ int grib_f_is_defined_(int* gid, char* key,int* isDefined,int len){
*isDefined=grib_is_defined(h, cast_char(buf,key,len));
return GRIB_SUCCESS;
}
int grib_f_is_defined(int* gid, char* key,int* isDefined,int len){
return grib_f_is_defined_(gid,key,isDefined,len);
}
/*****************************************************************************/
int grib_f_set_real4_(int* gid, char* key, float* val, int len){
@ -2454,7 +2252,6 @@ int grib_f_get_real4_elements_(int* gid, char* key,int* index, float *val,int* s
if(!val8) return GRIB_OUT_OF_MEMORY;
err = grib_get_double_elements(h, cast_char(buf,key,len), index,(long)lsize,val8);
for(i=0;i<lsize;(i)++)
@ -2478,9 +2275,6 @@ int grib_f_get_real4_(int* gid, char* key, float* val, int len){
*val = val8;
return err;
}
int grib_f_get_real4(int* gid, char* key, float* val, int len){
return grib_f_get_real4_( gid, key, val, len);
}
int grib_f_get_real4_array_(int* gid, char* key, float* val, int* size, int len)
{
@ -2525,9 +2319,6 @@ int grib_f_get_real4_array_(int* gid, char* key, float* val, int* size, int len)
return err;
}
int grib_f_get_real4_array(int* gid, char* key, float* val, int* size, int len){
return grib_f_get_real4_array_( gid, key, val, size, len);
}
/*****************************************************************************/
int grib_f_set_force_real4_array_(int* gid, char* key, float* val, int* size, int len)
@ -2554,9 +2345,6 @@ int grib_f_set_force_real4_array_(int* gid, char* key, float* val, int* size, in
grib_context_free(h->context,val8);
return err;
}
int grib_f_set_force_real4_array(int* gid, char* key, float*val, int* size, int len){
return grib_f_set_force_real4_array_( gid, key, val, size, len);
}
/*****************************************************************************/
int grib_f_set_real4_array_(int* gid, char* key, float* val, int* size, int len)
@ -2591,9 +2379,6 @@ int grib_f_set_real4_array_(int* gid, char* key, float* val, int* size, int len)
return err;
}
int grib_f_set_real4_array(int* gid, char* key, float* val, int* size, int len) {
return grib_f_set_real4_array_(gid, key, val, size, len);
}
/*****************************************************************************/
int grib_f_index_select_real8_(int* gid, char* key, double* val, int len)
@ -2604,9 +2389,6 @@ int grib_f_index_select_real8_(int* gid, char* key, double* val, int len)
if(!h) return GRIB_INVALID_GRIB;
return grib_index_select_double(h, cast_char(buf,key,len), *val);
}
int grib_f_index_select_real8(int* gid, char* key, double* val, int len){
return grib_f_index_select_real8_(gid,key,val,len);
}
/*****************************************************************************/
int grib_f_index_select_string_(int* gid, char* key, char* val, int len, int vallen)
@ -2624,9 +2406,6 @@ int grib_f_index_select_string_(int* gid, char* key, char* val, int len, int val
return grib_index_select_string(h, cast_char(buf,key,len), bufval);
}
int grib_f_index_select_string(int* gid, char* key, char* val, int len, int vallen){
return grib_f_index_select_string_(gid,key,val,len,vallen);
}
/*****************************************************************************/
int grib_f_index_select_int_(int* gid, char* key, int* val, int len)
@ -2638,9 +2417,6 @@ int grib_f_index_select_int_(int* gid, char* key, int* val, int len)
if(!h) return GRIB_INVALID_GRIB;
return grib_index_select_long(h, cast_char(buf,key,len), lval);
}
int grib_f_index_select_int(int* gid, char* key, int* val, int len){
return grib_f_index_select_int_(gid,key,val,len);
}
/*****************************************************************************/
int grib_f_index_select_long_(int* gid, char* key, long* val, int len)
@ -2651,9 +2427,6 @@ int grib_f_index_select_long_(int* gid, char* key, long* val, int len)
if(!h) return GRIB_INVALID_GRIB;
return grib_index_select_long(h, cast_char(buf,key,len), *val);
}
int grib_f_index_select_long(int* gid, char* key, long* val, int len){
return grib_f_index_select_long_(gid,key,val,len);
}
/*****************************************************************************/
int grib_f_set_real8_(int* gid, char* key, double* val, int len)
@ -2664,9 +2437,6 @@ int grib_f_set_real8_(int* gid, char* key, double* val, int len)
if(!h) return GRIB_INVALID_GRIB;
return grib_set_double(h, cast_char(buf,key,len), *val);
}
int grib_f_set_real8(int* gid, char* key, double* val, int len){
return grib_f_set_real8_( gid, key, val, len);
}
int grib_f_get_real8_(int* gid, char* key, double* val, int len)
{
@ -2676,10 +2446,6 @@ int grib_f_get_real8_(int* gid, char* key, double* val, int len)
if(!h) return GRIB_INVALID_GRIB;
return grib_get_double(h, cast_char(buf,key,len), val);
}
int grib_f_get_real8(int* gid, char* key, double* val, int len){
return grib_f_get_real8_( gid, key, val, len);
}
int grib_f_get_real8_element_(int* gid, char* key,int* index, double* val, int len){
@ -2690,10 +2456,6 @@ int grib_f_get_real8_element_(int* gid, char* key,int* index, double* val, int l
if(!h) return GRIB_INVALID_GRIB;
return grib_get_double_element(h, cast_char(buf,key,len), *index,val);
}
int grib_f_get_real8_element(int* gid, char* key, int* index,double* val, int len){
return grib_f_get_real8_element_( gid, key, index, val,len);
}
/*****************************************************************************/
@ -2705,10 +2467,6 @@ int grib_f_get_real8_elements_(int* gid, char* key,int* index, double* val, int
if(!h) return GRIB_INVALID_GRIB;
return grib_get_double_elements(h, cast_char(buf,key,len), index,*size,val);
}
int grib_f_get_real8_elements(int* gid, char* key, int* index,double* val, int* len,int size){
return grib_f_get_real8_elements_( gid, key, index, val,len,size);
}
/*****************************************************************************/
@ -2735,16 +2493,6 @@ int grib_f_find_nearest_four_single_(int* gid,int* is_lsm,
grib_nearest_delete(nearest);
return result;
}
int grib_f_find_nearest_four_single(int* gid,int* is_lsm,
double* inlats,double* inlons,
double* outlats,double* outlons,
double* values,double* distances,
int* indexes) {
return grib_f_find_nearest_four_single_(gid,is_lsm,
inlats,inlons,outlats,outlons,values,
distances,indexes);
}
/*****************************************************************************/
int grib_f_find_nearest_single_(int* gid,int* is_lsm,
@ -2761,16 +2509,6 @@ int grib_f_find_nearest_single_(int* gid,int* is_lsm,
inlats,inlons,1,outlats,outlons,
values,distances,indexes);
}
int grib_f_find_nearest_single(int* gid,int* is_lsm,
double* inlats,double* inlons,
double* outlats,double* outlons,
double* values,double* distances,
int* indexes) {
return grib_f_find_nearest_single_(gid,is_lsm,
inlats,inlons,outlats,outlons,values,
distances,indexes);
}
/*****************************************************************************/
int grib_f_find_nearest_multiple_(int* gid,int* is_lsm,
@ -2787,16 +2525,6 @@ int grib_f_find_nearest_multiple_(int* gid,int* is_lsm,
inlats,inlons,*npoints,outlats,outlons,
values,distances,indexes);
}
int grib_f_find_nearest_multiple(int* gid,int* is_lsm,
double* inlats,double* inlons,
double* outlats,double* outlons,
double* values,double* distances,
int* indexes, int* npoints) {
return grib_f_find_nearest_multiple_(gid,is_lsm,
inlats,inlons,outlats,outlons,values,
distances,indexes,npoints);
}
/*****************************************************************************/
int grib_f_get_real8_array_(int* gid, char* key, double*val, int* size, int len){
@ -2814,12 +2542,6 @@ int grib_f_get_real8_array_(int* gid, char* key, double*val, int* size, int len)
return err;
}
}
int grib_f_get_real8_array(int* gid, char* key, double*val, int* size, int len){
return grib_f_get_real8_array_( gid, key, val, size, len);
}
int grib_f_set_force_real8_array(int* gid, char* key, double *val, int* size, int len){
return grib_f_set_force_real8_array_( gid, key, val, size, len);
}
int grib_f_set_force_real8_array_(int* gid, char* key, double*val, int* size, int len){
@ -2843,9 +2565,6 @@ int grib_f_set_real8_array_(int* gid, char* key, double*val, int* size, int len)
return grib_set_double_array(h, cast_char(buf,key,len), val, lsize);
}
int grib_f_set_real8_array(int* gid, char* key, double *val, int* size, int len){
return grib_f_set_real8_array_( gid, key, val, size, len);
}
/*****************************************************************************/
int grib_f_get_string_array_(int* gid, char* key, char* val,int* nvals,int* slen, int len)
@ -2876,9 +2595,6 @@ int grib_f_get_string_array_(int* gid, char* key, char* val,int* nvals,int* slen
return err;
}
int grib_f_get_string_array(int* gid, char* key, char* val,int* nvals,int* slen, int len){
return grib_f_get_string_array_( gid, key, val, nvals, slen, len);
}
/*****************************************************************************/
int codes_f_bufr_copy_data_(int* gid1,int* gid2)
@ -2894,9 +2610,6 @@ int codes_f_bufr_copy_data_(int* gid1,int* gid2)
return err;
}
int codes_f_bufr_copy_data(int* gid1,int* gid2){
return codes_f_bufr_copy_data_(gid1, gid2);
}
/*****************************************************************************/
int grib_f_set_string_array_(int* gid, char* key, char* val,int* nvals,int* slen, int len)
@ -2930,9 +2643,6 @@ int grib_f_set_string_array_(int* gid, char* key, char* val,int* nvals,int* slen
return err;
}
int grib_f_set_string_array(int* gid, char* key, char* val,int* nvals,int* slen, int len){
return grib_f_set_string_array_( gid, key, val, nvals, slen, len);
}
/*****************************************************************************/
int grib_f_get_string_(int* gid, char* key, char* val,int len, int len2){
@ -2952,9 +2662,6 @@ int grib_f_get_string_(int* gid, char* key, char* val,int len, int len2){
return err;
}
int grib_f_get_string(int* gid, char* key, char* val, int len, int len2){
return grib_f_get_string_( gid, key, val, len, len2);
}
static int is_all_spaces(const char *s)
{
@ -2986,9 +2693,6 @@ int grib_f_set_string_(int* gid, char* key, char* val, int len, int len2){
return grib_set_string(h, cast_char(buf,key,len), val_str, &lsize);
}
int grib_f_set_string(int* gid, char* key, char* val, int len, int len2){
return grib_f_set_string_( gid, key, val, len, len2);
}
/*****************************************************************************/
int grib_f_get_data_real4_(int* gid,float* lats, float* lons,float* values,size_t* size) {
@ -3021,18 +2725,12 @@ int grib_f_get_data_real4_(int* gid,float* lats, float* lons,float* values,size_
return err;
}
int grib_f_get_data_real4(int* gid,float* lats, float* lons,float* values,size_t* size) {
return grib_f_get_data_real4_(gid,lats,lons,values,size);
}
int grib_f_get_data_real8_(int* gid,double* lats, double* lons,double* values,size_t* size) {
grib_handle *h = get_handle(*gid);
return grib_get_data(h,lats,lons,values);
}
int grib_f_get_data_real8(int* gid,double* lats, double* lons,double* values,size_t* size) {
return grib_f_get_data_real8_(gid,lats,lons,values,size);
}
/*****************************************************************************/
int grib_f_get_message_size_(int* gid, size_t *len){
@ -3041,9 +2739,6 @@ int grib_f_get_message_size_(int* gid, size_t *len){
*len = h->buffer->ulength;
return GRIB_SUCCESS;
}
int grib_f_get_message_size(int* gid, size_t *len){
return grib_f_get_message_size_( gid, len);
}
/*****************************************************************************/
int grib_f_copy_message_(int* gid, void* mess, size_t* len){
@ -3061,9 +2756,6 @@ int grib_f_copy_message_(int* gid, void* mess, size_t* len){
*len=h->buffer->ulength;
return GRIB_SUCCESS;
}
int grib_f_copy_message(int* gid, void* mess, size_t* len){
return grib_f_copy_message_( gid, mess, len);
}
/*****************************************************************************/
void grib_f_check_(int* err,char* call,char* str,int lencall,int lenstr){
@ -3079,9 +2771,6 @@ void grib_f_check_(int* err,char* call,char* str,int lencall,int lenstr){
bufcall,bufstr,grib_get_error_message(*err));
exit(*err);
}
void grib_f_check(int* err,char* call, char* key, int lencall, int lenkey){
grib_f_check_(err,call,key,lencall,lenkey);
}
/*****************************************************************************/
int grib_f_write_(int* gid, int* fid) {
@ -3101,9 +2790,6 @@ int grib_f_write_(int* gid, int* fid) {
return GRIB_SUCCESS;
}
int grib_f_write(int* gid, int* fid) {
return grib_f_write_(gid,fid);
}
/*****************************************************************************/
int grib_f_multi_write_(int* gid, int* fid) {
@ -3115,10 +2801,6 @@ int grib_f_multi_write_(int* gid, int* fid) {
return grib_multi_handle_write(h,f);
}
int grib_f_multi_write(int* gid, int* fid) {
return grib_f_multi_write_(gid,fid);
}
int grib_f_multi_append_(int* ingid, int* sec,int* mgid) {
grib_handle *h = get_handle(*ingid);
@ -3133,27 +2815,17 @@ int grib_f_multi_append_(int* ingid, int* sec,int* mgid) {
return grib_multi_handle_append(h,*sec,mh);
}
int grib_f_multi_append(int* ingid, int* sec,int* mgid) {
return grib_f_multi_append_(ingid, sec, mgid);
}
/*****************************************************************************/
int codes_f_bufr_multi_element_constant_arrays_on_() {
codes_bufr_multi_element_constant_arrays_on(NULL);
return GRIB_SUCCESS;
}
int codes_f_bufr_multi_element_constant_arrays_on() {
return codes_f_bufr_multi_element_constant_arrays_on_();
}
int codes_f_bufr_multi_element_constant_arrays_off_() {
codes_bufr_multi_element_constant_arrays_off(NULL);
return GRIB_SUCCESS;
}
int codes_f_bufr_multi_element_constant_arrays_off() {
return codes_f_bufr_multi_element_constant_arrays_off_();
}
/*****************************************************************************/
int grib_f_set_definitions_path_(char* path, int len){
@ -3162,9 +2834,6 @@ int grib_f_set_definitions_path_(char* path, int len){
grib_context_set_definitions_path(c, cast_char(buf,path,len));
return GRIB_SUCCESS;
}
int grib_f_set_definitions_path(char* path, int len){
return grib_f_set_definitions_path_(path, len);
}
/*****************************************************************************/
int grib_f_set_samples_path_(char* path, int len){
@ -3173,22 +2842,13 @@ int grib_f_set_samples_path_(char* path, int len){
grib_context_set_samples_path(c, cast_char(buf,path,len));
return GRIB_SUCCESS;
}
int grib_f_set_samples_path(char* path, int len){
return grib_f_set_samples_path_(path, len);
}
/*****************************************************************************/
int grib_f_julian_to_datetime_(double* jd,long* year,long* month,long* day,long *hour,long *minute,long *second) {
return grib_julian_to_datetime(*jd,year,month,day,hour,minute,second);
}
int grib_f_julian_to_datetime(double* jd,long* year,long* month,long* day,long *hour,long *minute,long *second) {
return grib_julian_to_datetime(*jd,year,month,day,hour,minute,second);
}
/*****************************************************************************/
int grib_f_datetime_to_julian_(long* year,long* month,long* day, long* hour,long* minute,long* second,double* jd) {
return grib_datetime_to_julian(*year,*month,*day,*hour,*minute,*second,jd);
}
int grib_f_datetime_to_julian(long* year,long* month,long* day, long* hour,long* minute,long* second,double* jd) {
return grib_datetime_to_julian(*year,*month,*day,*hour,*minute,*second,jd);
}