mirror of https://github.com/ecmwf/eccodes.git
ECC-49: codes_bufr_new_from_file should be defined in the C API
This commit is contained in:
parent
54a9455734
commit
9f18935216
|
@ -52,7 +52,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
/* create a handle for the first message */
|
||||
source_handle = bufr_new_from_file(0,in,&err);
|
||||
source_handle = codes_bufr_new_from_file(0,in,&err);
|
||||
|
||||
if (source_handle == NULL) {
|
||||
perror("ERROR: could not create handle for message");
|
||||
|
|
|
@ -47,7 +47,7 @@ int main(int argc,char* argv[])
|
|||
}
|
||||
|
||||
/* loop over the messages in the bufr file */
|
||||
while ((h = bufr_new_from_file(NULL,in,&err)) != NULL || err != CODES_SUCCESS)
|
||||
while ((h = codes_bufr_new_from_file(NULL,in,&err)) != NULL || err != CODES_SUCCESS)
|
||||
{
|
||||
if (h == NULL) {
|
||||
printf("Error: unable to create handle for message %d\n",cnt);
|
||||
|
|
|
@ -46,7 +46,7 @@ int main(int argc,char* argv[])
|
|||
}
|
||||
|
||||
/* loop over the messages in the bufr file */
|
||||
while ((h = bufr_new_from_file(NULL,in,&err)) != NULL || err != CODES_SUCCESS)
|
||||
while ((h = codes_bufr_new_from_file(NULL,in,&err)) != NULL || err != CODES_SUCCESS)
|
||||
{
|
||||
if (h == NULL) {
|
||||
printf("Error: unable to create handle for message %d\n",cnt);
|
||||
|
|
|
@ -68,7 +68,7 @@ int main(int argc,char* argv[])
|
|||
}
|
||||
|
||||
/* loop over the messages in the bufr file */
|
||||
while ((h = bufr_new_from_file(NULL,in,&err)) != NULL || err != CODES_SUCCESS)
|
||||
while ((h = codes_bufr_new_from_file(NULL,in,&err)) != NULL || err != CODES_SUCCESS)
|
||||
{
|
||||
codes_keys_iterator* kiter=NULL;
|
||||
if (h == NULL) {
|
||||
|
|
|
@ -42,7 +42,7 @@ int main(int argc,char* argv[])
|
|||
}
|
||||
|
||||
/* loop over the messages in the bufr file */
|
||||
while ((h = bufr_new_from_file(NULL,in,&err)) != NULL || err != CODES_SUCCESS)
|
||||
while ((h = codes_bufr_new_from_file(NULL,in,&err)) != NULL || err != CODES_SUCCESS)
|
||||
{
|
||||
if (h == NULL) {
|
||||
printf("Error: unable to create handle for message %d\n",cnt);
|
||||
|
|
|
@ -43,7 +43,7 @@ int main(int argc,char* argv[])
|
|||
}
|
||||
|
||||
/* loop over the messages in the bufr file */
|
||||
while ((h = bufr_new_from_file(NULL,in,&err)) != NULL || err != CODES_SUCCESS)
|
||||
while ((h = codes_bufr_new_from_file(NULL,in,&err)) != NULL || err != CODES_SUCCESS)
|
||||
{
|
||||
if (h == NULL) {
|
||||
printf("Error: unable to create handle for message %d\n",cnt);
|
||||
|
|
|
@ -54,7 +54,7 @@ int main(int argc,char* argv[])
|
|||
}
|
||||
|
||||
/* loop over the messages in the bufr file */
|
||||
while ((h = bufr_new_from_file(NULL,in,&err)) != NULL || err != CODES_SUCCESS)
|
||||
while ((h = codes_bufr_new_from_file(NULL,in,&err)) != NULL || err != CODES_SUCCESS)
|
||||
{
|
||||
if (h == NULL) {
|
||||
printf("Error: unable to create handle for message %d\n",cnt);
|
||||
|
|
|
@ -43,7 +43,7 @@ int main(int argc,char* argv[])
|
|||
}
|
||||
|
||||
/* loop over the messages in the bufr file */
|
||||
while ((h = bufr_new_from_file(NULL,in,&err)) != NULL || err != CODES_SUCCESS)
|
||||
while ((h = codes_bufr_new_from_file(NULL,in,&err)) != NULL || err != CODES_SUCCESS)
|
||||
{
|
||||
if (h == NULL) {
|
||||
printf("Error: unable to create handle for message %d\n",cnt);
|
||||
|
|
|
@ -108,6 +108,11 @@ grib_handle* codes_handle_new_from_file(grib_context* c, FILE* f, int* error)
|
|||
{
|
||||
return grib_handle_new_from_file(c, f, error);
|
||||
}
|
||||
codes_handle* codes_bufr_new_from_file (codes_context* c, FILE* f, int* error)
|
||||
{
|
||||
return bufr_new_from_file(c, f, error);
|
||||
}
|
||||
|
||||
|
||||
int codes_write_message(grib_handle* h,const char* file,const char* mode)
|
||||
{
|
||||
|
|
|
@ -290,6 +290,8 @@ int codes_count_in_file(codes_context* c, FILE* f,int* n);
|
|||
*/
|
||||
codes_handle* codes_handle_new_from_file(codes_context* c, FILE* f, int* error);
|
||||
|
||||
codes_handle* codes_bufr_new_from_file (codes_context* c, FILE* f, int* error);
|
||||
|
||||
/**
|
||||
* Write a coded message in a file.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue