ECC-49: codes_bufr_new_from_file should be defined in the C API

This commit is contained in:
Shahram Najm 2015-02-10 18:02:22 +00:00
parent 54a9455734
commit 9f18935216
10 changed files with 15 additions and 8 deletions

View File

@ -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");

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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