mirror of https://github.com/ecmwf/eccodes.git
Clean up
This commit is contained in:
parent
78cc6f4cc6
commit
c6a5511fc9
|
@ -24,9 +24,9 @@ int main(int argc,char* argv[])
|
||||||
char** shortName=NULL;
|
char** shortName=NULL;
|
||||||
int i,j,k,l;
|
int i,j,k,l;
|
||||||
size_t stepSize,levelSize,shortNameSize,numberSize;
|
size_t stepSize,levelSize,shortNameSize,numberSize;
|
||||||
long ostep,olevel,onumber;
|
long oStep,oLevel,oNumber;
|
||||||
char oshortName[200];
|
char oShortName[200];
|
||||||
size_t lenshortName=200;
|
size_t lenShortName=200;
|
||||||
int ret=0,count=0;
|
int ret=0,count=0;
|
||||||
|
|
||||||
if (argc != 2) usage(argv[0]);
|
if (argc != 2) usage(argv[0]);
|
||||||
|
@ -111,15 +111,15 @@ int main(int argc,char* argv[])
|
||||||
while ((h=grib_handle_new_from_index(index,&ret))!=NULL){
|
while ((h=grib_handle_new_from_index(index,&ret))!=NULL){
|
||||||
count++;
|
count++;
|
||||||
if (ret) {printf("error: %d\n",ret); exit(ret);}
|
if (ret) {printf("error: %d\n",ret); exit(ret);}
|
||||||
lenshortName=200;
|
lenShortName=200;
|
||||||
grib_get_string(h,"shortName",oshortName,&lenshortName);
|
grib_get_string(h,"shortName",oShortName,&lenShortName);
|
||||||
grib_get_long(h,"level",&olevel);
|
grib_get_long(h,"level",&oLevel);
|
||||||
grib_get_long(h,"number",&onumber);
|
grib_get_long(h,"number",&oNumber);
|
||||||
grib_get_long(h,"step",&ostep);
|
grib_get_long(h,"step",&oStep);
|
||||||
printf("shortName=%s ",oshortName);
|
printf("shortName=%s ",oShortName);
|
||||||
printf("level=%ld ",olevel);
|
printf("level=%ld ",oLevel);
|
||||||
printf("number=%ld ",onumber);
|
printf("number=%ld ",oNumber);
|
||||||
printf("step=%ld \n",ostep);
|
printf("step=%ld \n",oStep);
|
||||||
grib_handle_delete(h);
|
grib_handle_delete(h);
|
||||||
}
|
}
|
||||||
if (ret && ret!=GRIB_END_OF_INDEX ) {printf("error: %s\n",grib_get_error_message(ret)); exit(ret);}
|
if (ret && ret!=GRIB_END_OF_INDEX ) {printf("error: %s\n",grib_get_error_message(ret)); exit(ret);}
|
||||||
|
|
Loading…
Reference in New Issue